pax_global_header00006660000000000000000000000064131220553350014511gustar00rootroot0000000000000052 comment=b63044e5f833781eb7b305bc035392480ee06a82 govmomi-0.15.0/000077500000000000000000000000001312205533500132515ustar00rootroot00000000000000govmomi-0.15.0/.drone.sec000066400000000000000000000011261312205533500151320ustar00rootroot00000000000000eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.kK6pryC8R-O1R0Gj9ydLvQuIZlcYLGze23WdW7xbpiEEKdz6nweJrMm7ysy8lgu1tM47JVo19p2_b26bNKSQshCUOETvd7Hb2UMZOjnyUnqdyAAyoi6UkIquXfUUbHTNS0iMxwSxxW9KMp2GXNq8-o6T8xQZTDirBJFKKd8ZNUasTaoa5j8U9IfdR1aCavTBuOhvk8IVs-jSbY5TVJMJiE0IOPXois7aRJ6uAiANQBk9VKLegEcZD_qAewecXHDsHi-u0jbmg3o3PPaJaK_Qv5dsPlR2M-E2kE3AGUn0-zn5zYRngoAZ8WZr2O4GvLdltJKq9i2z7jOrdOzzRcDRow.96qvwl_E1Hj15u7Q.hWs-jQ8FsqQFD7pE9N-UEP1BWQ9rsJIcCaPvQRIp8Fukm_vvlw9YEaEq0ERLrsUWsJWpd1ca8_h8x7xD6f_d5YppwRqRHIeGIsdBOTMhNs0lG8ikkQXLat-UroCpy8EC17nuUtDE2E2Kdxrk4Cdd6Bk-dKk0Ta4w3Ud0YBKa.P8zrO7xizgv0i98eVWWzEggovmomi-0.15.0/.drone.yml000066400000000000000000000007021312205533500151600ustar00rootroot00000000000000clone: tags: true path: github.com/vmware/govmomi build: image: golang:1.7 pull: true environment: - GOVC_TEST_URL=$$GOVC_TEST_URL - GOVC_INSECURE=1 - VCA=1 commands: - make all install - git clone https://github.com/sstephenson/bats.git /tmp/bats - /tmp/bats/install.sh /usr/local - apt-get -qq update && apt-get install -yqq uuid-runtime bsdmainutils jq - govc/test/images/update.sh - bats govc/test govmomi-0.15.0/.gitignore000066400000000000000000000000141312205533500152340ustar00rootroot00000000000000secrets.yml govmomi-0.15.0/.mailmap000066400000000000000000000021101312205533500146640ustar00rootroot00000000000000Amit Bathla Bruce Downs Bruce Downs Clint Greenwood Cédric Blomart Cédric Blomart cedric David Stark Eric Gray Eric Yutao eric Henrik Hodne Jeremy Canady Pieter Noordhuis Takaaki Furukawa takaaki.furukawa Takaaki Furukawa tkak Vadim Egorov Zach Tucker Zee Yang govmomi-0.15.0/.travis.yml000066400000000000000000000001461312205533500153630ustar00rootroot00000000000000sudo: false language: go go: - 1.7 before_install: - make vendor script: - make check test govmomi-0.15.0/CHANGELOG.md000066400000000000000000000150121312205533500150610ustar00rootroot00000000000000# changelog ### 0.15.0 (2017-06-19) * WaitOptions.MaxWaitSeconds is now optional * Support removal of ExtraConfig entries * GuestPosixFileAttributes OwnerId and GroupId fields are now pointers, rather than omitempty ints to allow chown with root uid:gid * Updated examples/ using view package * Add DatastoreFile.TailFunc method * Export VirtualMachine.FindSnapshot method * Add AuthorizationManager {Enable,Disable}Methods * Add PBM client ### 0.14.0 (2017-04-08) * Add view.ContainerView type and methods * Add Collector.RetrieveWithFilter method * Add property.Filter type * Implement EthernetCardBackingInfo for OpaqueNetwork * Finder: support changing object root in find mode * Add VirtualDiskManager.QueryVirtualDiskInfo * Add performance.Manager APIs ### 0.13.0 (2017-03-02) * Add DatastoreFileManager API wrapper * Add HostVsanInternalSystem API wrappers * Add Container support to view package * Finder supports Folder recursion without specifying a path * Add VirtualMachine.QueryConfigTarget method * Add device option to VirtualMachine.WaitForNetIP * Remove _Task suffix from vapp methods ### 0.12.1 (2016-12-19) * Add DiagnosticLog helper * Add DatastorePath helper ### 0.12.0 (2016-12-01) * Disable use of service ticket for datastore HTTP access by default * Attach context to HTTP requests for cancellations * Update to vim25/6.5 API ### 0.11.4 (2016-11-15) * Add object.AuthorizationManager methods: RetrieveRolePermissions, RetrieveAllPermissions, AddRole, RemoveRole, UpdateRole ### 0.11.3 (2016-11-08) * Allow DatastoreFile.Follow reader to drain current body after stopping ### 0.11.2 (2016-11-01) * Avoid possible NPE in VirtualMachine.Device method * Add support for OpaqueNetwork type to Finder * Add HostConfigManager.AccountManager support for ESX 5.5 ### 0.11.1 (2016-10-27) * Add Finder.ResourcePoolListAll method ### 0.11.0 (2016-10-25) * Add object.DistributedVirtualPortgroup.Reconfigure method ### 0.10.0 (2016-10-20) * Add option to set soap.Client.UserAgent * Add service ticket thumbprint validation * Update use of http.DefaultTransport fields to 1.7 * Set default locale to en_US (override with GOVMOMI_LOCALE env var) * Add object.HostCertificateInfo (types.HostCertificateManagerCertificateInfo helpers) * Add object.HostCertificateManager type and HostConfigManager.CertificateManager method * Add soap.Client SetRootCAs and SetDialTLS methods ### 0.9.0 (2016-09-09) * Add object.DatastoreFile helpers for streaming and tailing datastore files * Add object VirtualMachine.Unregister method * Add object.ListView methods: Add, Remove, Reset * Update to Go 1.7 - using stdlib's context package ### 0.8.0 (2016-06-30) * Add session.Manager.AcquireLocalTicket * Include StoragePod in Finder.FolderList * Add Finder methods for finding by ManagedObjectReference: Element, ObjectReference * Add mo.ManagedObjectReference methods: Reference, String, FromString * Add support using SessionManagerGenericServiceTicket.HostName for Datastore HTTP access ### 0.7.1 (2016-06-03) * Fix object.ObjectName method ### 0.7.0 (2016-06-02) * Move InventoryPath field to object.Common * Add HostDatastoreSystem.CreateLocalDatastore method * Add DatastoreNamespaceManager methods: CreateDirectory, DeleteDirectory * Add HostServiceSystem * Add HostStorageSystem methods: MarkAsSdd, MarkAsNonSdd, MarkAsLocal, MarkAsNonLocal * Add HostStorageSystem.RescanAllHba method ### 0.6.2 (2016-05-11) * Get complete file details in Datastore.Stat * SOAP decoding fixes * Add VirtualMachine.RemoveAllSnapshot ### 0.6.1 (2016-04-30) * Fix mo.Entity interface ### 0.6.0 (2016-04-29) * Add Common.Rename method * Add mo.Entity interface * Add OptionManager * Add Finder.FolderList method * Add VirtualMachine.WaitForNetIP method * Add VirtualMachine.RevertToSnapshot method * Add Datastore.Download method ### 0.5.0 (2016-03-30) Generated fields using xsd type 'int' change to Go type 'int32' VirtualDevice.UnitNumber field changed to pointer type ### 0.4.0 (2016-02-26) * Add method to convert virtual device list to array with virtual device changes that can be used in the VirtualMachineConfigSpec. * Make datastore cluster traversable in lister * Add finder.DatastoreCluster methods (also known as storage pods) * Add Drone CI check * Add object.Datastore Type and AttachedClusterHosts methods * Add finder.*OrDefault methods ### 0.3.0 (2016-01-16) * Add object.VirtualNicManager wrapper * Add object.HostVsanSystem wrapper * Add object.HostSystem methods: EnterMaintenanceMode, ExitMaintenanceMode, Disconnect, Reconnect * Add finder.Folder method * Add object.Common.Destroy method * Add object.ComputeResource.Reconfigure method * Add license.AssignmentManager wrapper * Add object.HostFirewallSystem wrapper * Add object.DiagnosticManager wrapper * Add LoginExtensionByCertificate support * Add object.ExtensionManager ... ### 0.2.0 (2015-09-15) * Update to vim25/6.0 API * Stop returning children from `ManagedObjectList` Change the `ManagedObjectList` function in the `find` package to only return the managed objects specified by the path argument and not their children. The original behavior was used by govc's `ls` command and is now available in the newly added function `ManagedObjectListChildren`. * Add retry functionality to vim25 package * Change finder functions to no longer take varargs The `find` package had functions to return a list of objects, given a variable number of patterns. This makes it impossible to distinguish which patterns produced results and which ones didn't. In particular for govc, where multiple arguments can be passed from the command line, it is useful to let the user know which ones produce results and which ones don't. To evaluate multiple patterns, the user should call the find functions multiple times (either serially or in parallel). * Make optional boolean fields pointers (`vim25/types`). False is the zero value of a boolean field, which means they are not serialized if the field is marked "omitempty". If the field is a pointer instead, the zero value will be the nil pointer, and both true and false values are serialized. ### 0.1.0 (2015-03-17) Prior to this version the API of this library was in flux. Notable changes w.r.t. the state of this library before March 2015 are: * All functions that may execute a request take a `context.Context` parameter. * The `vim25` package contains a minimal client implementation. * The property collector and its convenience functions live in the `property` package. govmomi-0.15.0/CONTRIBUTING.md000066400000000000000000000056411312205533500155100ustar00rootroot00000000000000# Contributing to govmomi ## Getting started First, fork the repository on GitHub to your personal account. Note that _GOPATH_ can be any directory, the example below uses _$HOME/govmomi_. Change _$USER_ below to your github username if they are not the same. ``` shell export GOPATH=$HOME/govmomi go get github.com/vmware/govmomi cd $GOPATH/src/github.com/vmware/govmomi git config push.default nothing # anything to avoid pushing to vmware/govmomi by default git remote rename origin vmware git remote add $USER git@github.com:$USER/govmomi.git git fetch $USER ``` ## Installing from source Compile the govmomi libraries and install govc using: ``` shell go install -v github.com/vmware/govmomi/govc ``` Note that **govc/build.sh** is only used for building release binaries. ## Contribution flow This is a rough outline of what a contributor's workflow looks like: - Create a topic branch from where you want to base your work. - Make commits of logical units. - Make sure your commit messages are in the proper format (see below). - Update CHANGELOG.md and/or govc/CHANGELOG.md when appropriate. - Push your changes to a topic branch in your fork of the repository. - Submit a pull request to vmware/govmomi. Example: ``` shell git checkout -b my-new-feature vmware/master git commit -a git push $USER my-new-feature ``` ### Stay in sync with upstream When your branch gets out of sync with the vmware/master branch, use the following to update: ``` shell git checkout my-new-feature git fetch -a git rebase vmware/master git push --force-with-lease $USER my-new-feature ``` ### Updating pull requests If your PR fails to pass CI or needs changes based on code review, you'll most likely want to squash these changes into existing commits. If your pull request contains a single commit or your changes are related to the most recent commit, you can simply amend the commit. ``` shell git add . git commit --amend git push --force-with-lease $USER my-new-feature ``` If you need to squash changes into an earlier commit, you can use: ``` shell git add . git commit --fixup git rebase -i --autosquash vmware/master git push --force-with-lease $USER my-new-feature ``` Be sure to add a comment to the PR indicating your new changes are ready to review, as github does not generate a notification when you git push. ### Code style The coding style suggested by the Golang community is used in govmomi. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. Try to limit column width to 120 characters for both code and markdown documents such as this one. ### Format of the Commit Message We follow the conventions on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/). Be sure to include any related GitHub issue references in the commit message. ## Reporting Bugs and Creating Issues When opening a new issue, try to roughly follow the commit message format conventions above. govmomi-0.15.0/CONTRIBUTORS000066400000000000000000000042221312205533500151310ustar00rootroot00000000000000# People who can (and typically have) contributed to this repository. # # This script is generated by contributors.sh # abrarshivani Alvaro Miranda amandahla Amit Bathla Andrew Chin aniketGslab Arran Walker Aryeh Weinreb Austin Parker Balu Dontu bastienbc Bob Killen Brad Fitzpatrick Bruce Downs Cédric Blomart Christian Höltje Clint Greenwood Danny Lockard Dave Tucker Davide Agnello David Stark Doug MacEachern Eloy Coto Eric Gray Eric Yutao Fabio Rapposelli Faiyaz Ahmed forkbomber Gavin Gray Gavrie Philipson George Hicken Gerrit Renker gthombare Hasan Mahmood Henrik Hodne Isaac Rodman Ivan Porto Carrero Jason Kincl Jeremy Canady Louie Jiang Marc Carmier Mevan Samaratunga Nicolas Lamirault Pieter Noordhuis runner.mei S.Çağlar Onur Sergey Ignatov Steve Purcell Takaaki Furukawa Ted Zlatanov Thibaut Ackermann Vadim Egorov Yang Yang Yuya Kusakabe Zach Tucker Zee Yang govmomi-0.15.0/LICENSE.txt000066400000000000000000000261361312205533500151040ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. govmomi-0.15.0/Makefile000066400000000000000000000006221312205533500147110ustar00rootroot00000000000000.PHONY: test all: check test check: goimports govet goimports: @echo checking go imports... @go get golang.org/x/tools/cmd/goimports @! goimports -d . 2>&1 | egrep -v '^$$' govet: @echo checking go vet... @go tool vet -structtags=false -methods=false . test: go test -v $(TEST_OPTS) ./... install: go install github.com/vmware/govmomi/govc doc: install ./govc/usage.sh > ./govc/USAGE.md govmomi-0.15.0/README.md000066400000000000000000000055721312205533500145410ustar00rootroot00000000000000[![Build Status](https://travis-ci.org/vmware/govmomi.png?branch=master)](https://travis-ci.org/vmware/govmomi) [![Go Report Card](https://goreportcard.com/badge/github.com/vmware/govmomi)](https://goreportcard.com/report/github.com/vmware/govmomi) # govmomi A Go library for interacting with VMware vSphere APIs (ESXi and/or vCenter). For `govc`, a CLI built on top of govmomi, check out the [govc](./govc) directory and [USAGE](./govc/USAGE.md) document. ## Compatibility This library is built for and tested against ESXi and vCenter 5.5, 6.0 and 6.5. If you're able to use it against older versions of ESXi and/or vCenter, please leave a note and we'll include it in this compatibility list. ## Documentation The APIs exposed by this library very closely follow the API described in the [VMware vSphere API Reference Documentation][apiref]. Refer to this document to become familiar with the upstream API. The code in the `govmomi` package is a wrapper for the code that is generated from the vSphere API description. It primarily provides convenience functions for working with the vSphere API. See [godoc.org][godoc] for documentation. [apiref]:http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.wssdk.apiref.doc/right-pane.html [godoc]:http://godoc.org/github.com/vmware/govmomi [drone]:https://drone.io [dronesrc]:https://github.com/drone/drone [dronecli]:http://readme.drone.io/devs/cli/ #### Building with CI Merges to this repository will trigger builds in both Travis and [Drone][drone]. To build locally with Drone: - Ensure that you have Docker 1.6 or higher installed. - Install the [Drone command line tools][dronecli]. - Run `drone exec` from within the root directory of the govmomi repository. ## Discussion Contributors and users are encouraged to collaborate using GitHub issues and/or [Slack](https://vmwarecode.slack.com/messages/govmomi). Access to Slack requires a [VMware {code} membership](https://code.vmware.com/join/). ## Status Changes to the API are subject to [semantic versioning](http://semver.org). Refer to the [CHANGELOG](CHANGELOG.md) for version to version changes. ## Projects using govmomi * [Docker Machine](https://github.com/docker/machine/tree/master/drivers/vmwarevsphere) * [Kubernetes](https://github.com/kubernetes/kubernetes/tree/master/pkg/cloudprovider/providers/vsphere) * [Terraform](https://github.com/hashicorp/terraform/tree/master/builtin/providers/vsphere) * [VMware VIC Engine](https://github.com/vmware/vic) * [Travis CI](https://github.com/travis-ci/jupiter-brain) * [collectd-vsphere](https://github.com/travis-ci/collectd-vsphere) * [Gru](https://github.com/dnaeon/gru) * [Libretto](https://github.com/apcera/libretto/tree/master/virtualmachine/vsphere) ## Related projects * [rbvmomi](https://github.com/vmware/rbvmomi) * [pyvmomi](https://github.com/vmware/pyvmomi) ## License govmomi is available under the [Apache 2 license](LICENSE). govmomi-0.15.0/client.go000066400000000000000000000125011312205533500150550ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* This package is the root package of the govmomi library. The library is structured as follows: Package vim25 The minimal usable functionality is available through the vim25 package. It contains subpackages that contain generated types, managed objects, and all available methods. The vim25 package is entirely independent of the other packages in the govmomi tree -- it has no dependencies on its peers. The vim25 package itself contains a client structure that is passed around throughout the entire library. It abstracts a session and its immutable state. See the vim25 package for more information. Package session The session package contains an abstraction for the session manager that allows a user to login and logout. It also provides access to the current session (i.e. to determine if the user is in fact logged in) Package object The object package contains wrappers for a selection of managed objects. The constructors of these objects all take a *vim25.Client, which they pass along to derived objects, if applicable. Package govc The govc package contains the govc CLI. The code in this tree is not intended to be used as a library. Any functionality that govc contains that _could_ be used as a library function but isn't, _should_ live in a root level package. Other packages Other packages, such as "event", "guest", or "license", provide wrappers for the respective subsystems. They are typically not needed in normal workflows so are kept outside the object package. */ package govmomi import ( "context" "crypto/tls" "net/url" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/session" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type Client struct { *vim25.Client SessionManager *session.Manager } // NewClient creates a new client from a URL. The client authenticates with the // server with username/password before returning if the URL contains user information. func NewClient(ctx context.Context, u *url.URL, insecure bool) (*Client, error) { soapClient := soap.NewClient(u, insecure) vimClient, err := vim25.NewClient(ctx, soapClient) if err != nil { return nil, err } c := &Client{ Client: vimClient, SessionManager: session.NewManager(vimClient), } // Only login if the URL contains user information. if u.User != nil { err = c.Login(ctx, u.User) if err != nil { return nil, err } } return c, nil } // NewClientWithCertificate creates a new client from a URL. The client authenticates with the // server with the certificate before returning if the URL contains user information. func NewClientWithCertificate(ctx context.Context, u *url.URL, insecure bool, cert tls.Certificate) (*Client, error) { soapClient := soap.NewClient(u, insecure) soapClient.SetCertificate(cert) vimClient, err := vim25.NewClient(ctx, soapClient) if err != nil { return nil, err } c := &Client{ Client: vimClient, SessionManager: session.NewManager(vimClient), } if u.User != nil { err = c.LoginExtensionByCertificate(ctx, u.User.Username(), "") if err != nil { return nil, err } } return c, nil } // Login dispatches to the SessionManager. func (c *Client) Login(ctx context.Context, u *url.Userinfo) error { return c.SessionManager.Login(ctx, u) } // Login dispatches to the SessionManager. func (c *Client) LoginExtensionByCertificate(ctx context.Context, key string, locale string) error { return c.SessionManager.LoginExtensionByCertificate(ctx, key, locale) } // Logout dispatches to the SessionManager. func (c *Client) Logout(ctx context.Context) error { // Close any idle connections after logging out. defer c.Client.CloseIdleConnections() return c.SessionManager.Logout(ctx) } // PropertyCollector returns the session's default property collector. func (c *Client) PropertyCollector() *property.Collector { return property.DefaultCollector(c.Client) } // RetrieveOne dispatches to the Retrieve function on the default property collector. func (c *Client) RetrieveOne(ctx context.Context, obj types.ManagedObjectReference, p []string, dst interface{}) error { return c.PropertyCollector().RetrieveOne(ctx, obj, p, dst) } // Retrieve dispatches to the Retrieve function on the default property collector. func (c *Client) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, p []string, dst interface{}) error { return c.PropertyCollector().Retrieve(ctx, objs, p, dst) } // Wait dispatches to property.Wait. func (c *Client) Wait(ctx context.Context, obj types.ManagedObjectReference, ps []string, f func([]types.PropertyChange) bool) error { return property.Wait(ctx, c.PropertyCollector(), obj, ps, f) } // IsVC returns true if we are connected to a vCenter func (c *Client) IsVC() bool { return c.Client.IsVC() } govmomi-0.15.0/client_test.go000066400000000000000000000056361312205533500161270ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package govmomi import ( "context" "errors" "net/http" "net/url" "testing" "github.com/vmware/govmomi/test" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) func TestNewClient(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } c, err := NewClient(context.Background(), u, true) if err != nil { t.Fatal(err) } f := func() error { var x mo.Folder err = mo.RetrieveProperties(context.Background(), c, c.ServiceContent.PropertyCollector, c.ServiceContent.RootFolder, &x) if err != nil { return err } if len(x.Name) == 0 { return errors.New("empty response") } return nil } // check cookie is valid with an sdk request if err := f(); err != nil { t.Fatal(err) } // check cookie is valid with a non-sdk request u.User = nil // turn off Basic auth u.Path = "/folder" r, err := c.Client.Get(u.String()) if err != nil { t.Fatal(err) } if r.StatusCode != http.StatusOK { t.Fatal(r) } // sdk request should fail w/o a valid cookie c.Client.Jar = nil if err := f(); err == nil { t.Fatal("should fail") } // invalid login u.Path = "/sdk" u.User = url.UserPassword("ENOENT", "EINVAL") _, err = NewClient(context.Background(), u, true) if err == nil { t.Fatal("should fail") } } func TestInvalidSdk(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } // a URL other than a valid /sdk should error, not panic u.Path = "/mob" _, err := NewClient(context.Background(), u, true) if err == nil { t.Fatal("should fail") } } func TestPropertiesN(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } c, err := NewClient(context.Background(), u, true) if err != nil { t.Fatal(err) } var f mo.Folder err = c.RetrieveOne(context.Background(), c.ServiceContent.RootFolder, nil, &f) if err != nil { t.Fatal(err) } var dc mo.Datacenter err = c.RetrieveOne(context.Background(), f.ChildEntity[0], nil, &dc) if err != nil { t.Fatal(err) } var folderReferences = []types.ManagedObjectReference{ dc.DatastoreFolder, dc.HostFolder, dc.NetworkFolder, dc.VmFolder, } var folders []mo.Folder err = c.Retrieve(context.Background(), folderReferences, []string{"name"}, &folders) if err != nil { t.Fatal(err) } if len(folders) != len(folderReferences) { t.Fatalf("Expected %d, got %d", len(folderReferences), len(folders)) } } govmomi-0.15.0/event/000077500000000000000000000000001312205533500143725ustar00rootroot00000000000000govmomi-0.15.0/event/history_collector.go000066400000000000000000000036561312205533500205020ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package event import ( "context" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HistoryCollector struct { *object.HistoryCollector } func NewHistoryCollector(c *vim25.Client, ref types.ManagedObjectReference) *HistoryCollector { return &HistoryCollector{ HistoryCollector: object.NewHistoryCollector(c, ref), } } func (h HistoryCollector) LatestPage(ctx context.Context) ([]types.BaseEvent, error) { var o mo.EventHistoryCollector err := h.Properties(ctx, h.Reference(), []string{"latestPage"}, &o) if err != nil { return nil, err } return o.LatestPage, nil } func (h HistoryCollector) ReadNextEvents(ctx context.Context, maxCount int32) ([]types.BaseEvent, error) { req := types.ReadNextEvents{ This: h.Reference(), MaxCount: maxCount, } res, err := methods.ReadNextEvents(ctx, h.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (h HistoryCollector) ReadPreviousEvents(ctx context.Context, maxCount int32) ([]types.BaseEvent, error) { req := types.ReadPreviousEvents{ This: h.Reference(), MaxCount: maxCount, } res, err := methods.ReadPreviousEvents(ctx, h.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } govmomi-0.15.0/event/manager.go000066400000000000000000000110661312205533500163370ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package event import ( "context" "fmt" "reflect" "sync" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type Manager struct { object.Common eventCategory map[string]string eventCategoryMu *sync.Mutex maxObjects int } func NewManager(c *vim25.Client) *Manager { m := Manager{ Common: object.NewCommon(c, *c.ServiceContent.EventManager), eventCategory: make(map[string]string), eventCategoryMu: new(sync.Mutex), maxObjects: 10, } return &m } func (m Manager) CreateCollectorForEvents(ctx context.Context, filter types.EventFilterSpec) (*HistoryCollector, error) { req := types.CreateCollectorForEvents{ This: m.Common.Reference(), Filter: filter, } res, err := methods.CreateCollectorForEvents(ctx, m.Client(), &req) if err != nil { return nil, err } return NewHistoryCollector(m.Client(), res.Returnval), nil } func (m Manager) LogUserEvent(ctx context.Context, entity types.ManagedObjectReference, msg string) error { req := types.LogUserEvent{ This: m.Common.Reference(), Entity: entity, Msg: msg, } _, err := methods.LogUserEvent(ctx, m.Client(), &req) if err != nil { return err } return nil } func (m Manager) PostEvent(ctx context.Context, eventToPost types.BaseEvent, taskInfo types.TaskInfo) error { req := types.PostEvent{ This: m.Common.Reference(), EventToPost: eventToPost, TaskInfo: &taskInfo, } _, err := methods.PostEvent(ctx, m.Client(), &req) if err != nil { return err } return nil } func (m Manager) QueryEvents(ctx context.Context, filter types.EventFilterSpec) ([]types.BaseEvent, error) { req := types.QueryEvents{ This: m.Common.Reference(), Filter: filter, } res, err := methods.QueryEvents(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m Manager) RetrieveArgumentDescription(ctx context.Context, eventTypeID string) ([]types.EventArgDesc, error) { req := types.RetrieveArgumentDescription{ This: m.Common.Reference(), EventTypeId: eventTypeID, } res, err := methods.RetrieveArgumentDescription(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m Manager) eventCategoryMap(ctx context.Context) (map[string]string, error) { m.eventCategoryMu.Lock() defer m.eventCategoryMu.Unlock() if len(m.eventCategory) != 0 { return m.eventCategory, nil } var o mo.EventManager ps := []string{"description.eventInfo"} err := property.DefaultCollector(m.Client()).RetrieveOne(ctx, m.Common.Reference(), ps, &o) if err != nil { return nil, err } for _, info := range o.Description.EventInfo { m.eventCategory[info.Key] = info.Category } return m.eventCategory, nil } // EventCategory returns the category for an event, such as "info" or "error" for example. func (m Manager) EventCategory(ctx context.Context, event types.BaseEvent) (string, error) { // Most of the event details are included in the Event.FullFormattedMessage, but the category // is only available via the EventManager description.eventInfo property. The value of this // property is static, so we fetch and once and cache. eventCategory, err := m.eventCategoryMap(ctx) if err != nil { return "", err } class := reflect.TypeOf(event).Elem().Name() return eventCategory[class], nil } // Get the events from the specified object(s) and optionanlly tail the event stream func (m Manager) Events(ctx context.Context, objects []types.ManagedObjectReference, pageSize int32, tail bool, force bool, f func(types.ManagedObjectReference, []types.BaseEvent) error) error { if len(objects) >= m.maxObjects && !force { return fmt.Errorf("Maximum number of objects to monitor (%d) exceeded, refine search", m.maxObjects) } proc := newEventProcessor(m, pageSize, f) for _, o := range objects { proc.addObject(ctx, o) } return proc.run(ctx, tail) } govmomi-0.15.0/event/processor.go000066400000000000000000000103521312205533500167410ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package event import ( "context" "fmt" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25/types" ) const latestPageProp = "latestPage" type tailInfo struct { t *eventTailer obj types.ManagedObjectReference collector types.ManagedObjectReference } type eventProcessor struct { mgr Manager pageSize int32 tailers map[types.ManagedObjectReference]*tailInfo // tailers by collector ref callback func(types.ManagedObjectReference, []types.BaseEvent) error } func newEventProcessor(mgr Manager, pageSize int32, callback func(types.ManagedObjectReference, []types.BaseEvent) error) *eventProcessor { return &eventProcessor{ mgr: mgr, tailers: make(map[types.ManagedObjectReference]*tailInfo), callback: callback, pageSize: pageSize, } } func (p *eventProcessor) addObject(ctx context.Context, obj types.ManagedObjectReference) error { filter := types.EventFilterSpec{ Entity: &types.EventFilterSpecByEntity{ Entity: obj, Recursion: types.EventFilterSpecRecursionOptionAll, }, } collector, err := p.mgr.CreateCollectorForEvents(ctx, filter) if err != nil { return fmt.Errorf("[%#v] %s", obj, err) } err = collector.SetPageSize(ctx, p.pageSize) if err != nil { return err } p.tailers[collector.Reference()] = &tailInfo{ t: newEventTailer(), obj: obj, collector: collector.Reference(), } return nil } func (p *eventProcessor) run(ctx context.Context, tail bool) error { if len(p.tailers) == 0 { return nil } var err error var collectors []types.ManagedObjectReference for _, t := range p.tailers { collectors = append(collectors, t.collector) } if len(p.tailers) > 1 { // create and populate a ListView viewMgr := view.NewManager(p.mgr.Client()) var listView *view.ListView listView, err = viewMgr.CreateListView(ctx, collectors) if err != nil { return err } count := 0 // Retrieve the property from the objects in the ListView err = property.WaitForView(ctx, property.DefaultCollector(p.mgr.Client()), listView.Reference(), collectors[0], []string{latestPageProp}, func(c types.ManagedObjectReference, pc []types.PropertyChange) bool { if err = p.process(c, pc); err != nil { return false } count++ if count == len(collectors) && !tail { return true } return false }) return err } // only one object to follow err = property.Wait(ctx, property.DefaultCollector(p.mgr.Client()), collectors[0], []string{latestPageProp}, func(pc []types.PropertyChange) bool { if err = p.process(collectors[0], pc); err != nil { return false } if !tail { return true } return false }) return err } func (p *eventProcessor) process(c types.ManagedObjectReference, pc []types.PropertyChange) error { t := p.tailers[c] if t == nil { return fmt.Errorf("unknown collector %s", c.String()) } for _, u := range pc { if u.Name != latestPageProp { continue } evs := t.t.newEvents(u.Val.(types.ArrayOfEvent).Event) if len(evs) == 0 { continue } if err := p.callback(t.obj, evs); err != nil { return err } } return nil } const invalidKey = int32(-1) type eventTailer struct { lastKey int32 } func newEventTailer() *eventTailer { return &eventTailer{ lastKey: invalidKey, } } func (t *eventTailer) newEvents(evs []types.BaseEvent) []types.BaseEvent { var ret []types.BaseEvent if t.lastKey == invalidKey { ret = evs } else { found := false for i := range evs { if evs[i].GetEvent().Key != t.lastKey { continue } found = true ret = evs[:i] break } if !found { ret = evs } } if len(ret) > 0 { t.lastKey = ret[0].GetEvent().Key } return ret } govmomi-0.15.0/event/sort.go000066400000000000000000000022531312205533500157120ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package event import ( "sort" "github.com/vmware/govmomi/vim25/types" ) // Sort events in ascending order base on Key // From the EventHistoryCollector.latestPage sdk docs: // The "oldest event" is the one with the smallest key (event ID). // The events in the returned page are unordered. func Sort(events []types.BaseEvent) { sort.Sort(baseEvent(events)) } type baseEvent []types.BaseEvent func (d baseEvent) Len() int { return len(d) } func (d baseEvent) Less(i, j int) bool { return d[i].GetEvent().Key < d[j].GetEvent().Key } func (d baseEvent) Swap(i, j int) { d[i], d[j] = d[j], d[i] } govmomi-0.15.0/examples/000077500000000000000000000000001312205533500150675ustar00rootroot00000000000000govmomi-0.15.0/examples/datastores/000077500000000000000000000000001312205533500172405ustar00rootroot00000000000000govmomi-0.15.0/examples/datastores/main.go000066400000000000000000000041521312205533500205150ustar00rootroot00000000000000/* Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* This example program shows how the `view` and `property` packages can be used to navigate a vSphere inventory structure using govmomi. */ package main import ( "context" "fmt" "log" "os" "text/tabwriter" "github.com/vmware/govmomi/examples" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25/mo" ) func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Connect and log in to ESX or vCenter c, err := examples.NewClient(ctx) if err != nil { log.Fatal(err) } defer c.Logout(ctx) // Create a view of Datastore objects m := view.NewManager(c.Client) v, err := m.CreateContainerView(ctx, c.ServiceContent.RootFolder, []string{"Datastore"}, true) if err != nil { log.Fatal(err) } defer v.Destroy(ctx) // Retrieve summary property for all datastores // Reference: http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.Datastore.html var dss []mo.Datastore err = v.Retrieve(ctx, []string{"Datastore"}, []string{"summary"}, &dss) if err != nil { log.Fatal(err) } // Print summary per datastore (see also: govc/datastore/info.go) tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Name:\tType:\tCapacity:\tFree:\n") for _, ds := range dss { fmt.Fprintf(tw, "%s\t", ds.Summary.Name) fmt.Fprintf(tw, "%s\t", ds.Summary.Type) fmt.Fprintf(tw, "%s\t", units.ByteSize(ds.Summary.Capacity)) fmt.Fprintf(tw, "%s\t", units.ByteSize(ds.Summary.FreeSpace)) fmt.Fprintf(tw, "\n") } _ = tw.Flush() } govmomi-0.15.0/examples/examples.go000066400000000000000000000051341312205533500172370ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package examples import ( "context" "flag" "fmt" "net/url" "os" "strings" "github.com/vmware/govmomi" "github.com/vmware/govmomi/vim25/soap" ) // getEnvString returns string from environment variable. func getEnvString(v string, def string) string { r := os.Getenv(v) if r == "" { return def } return r } // getEnvBool returns boolean from environment variable. func getEnvBool(v string, def bool) bool { r := os.Getenv(v) if r == "" { return def } switch strings.ToLower(r[0:1]) { case "t", "y", "1": return true } return false } const ( envURL = "GOVMOMI_URL" envUserName = "GOVMOMI_USERNAME" envPassword = "GOVMOMI_PASSWORD" envInsecure = "GOVMOMI_INSECURE" ) var urlDescription = fmt.Sprintf("ESX or vCenter URL [%s]", envURL) var urlFlag = flag.String("url", getEnvString(envURL, "https://username:password@host/sdk"), urlDescription) var insecureDescription = fmt.Sprintf("Don't verify the server's certificate chain [%s]", envInsecure) var insecureFlag = flag.Bool("insecure", getEnvBool(envInsecure, false), insecureDescription) func processOverride(u *url.URL) { envUsername := os.Getenv(envUserName) envPassword := os.Getenv(envPassword) // Override username if provided if envUsername != "" { var password string var ok bool if u.User != nil { password, ok = u.User.Password() } if ok { u.User = url.UserPassword(envUsername, password) } else { u.User = url.User(envUsername) } } // Override password if provided if envPassword != "" { var username string if u.User != nil { username = u.User.Username() } u.User = url.UserPassword(username, envPassword) } } // NewClient creates a govmomi.Client for use in the examples func NewClient(ctx context.Context) (*govmomi.Client, error) { flag.Parse() // Parse URL from string u, err := soap.ParseURL(*urlFlag) if err != nil { return nil, err } // Override username and/or password as required processOverride(u) // Connect and log in to ESX or vCenter return govmomi.NewClient(ctx, u, *insecureFlag) } govmomi-0.15.0/examples/hosts/000077500000000000000000000000001312205533500162275ustar00rootroot00000000000000govmomi-0.15.0/examples/hosts/main.go000066400000000000000000000051261312205533500175060ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* This example program shows how the `view` and `property` packages can be used to navigate a vSphere inventory structure using govmomi. */ package main import ( "context" "fmt" "log" "os" "text/tabwriter" "github.com/vmware/govmomi/examples" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25/mo" ) func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Connect and login to ESX or vCenter c, err := examples.NewClient(ctx) if err != nil { log.Fatal(err) } defer c.Logout(ctx) // Create a view of HostSystem objects m := view.NewManager(c.Client) v, err := m.CreateContainerView(ctx, c.ServiceContent.RootFolder, []string{"HostSystem"}, true) if err != nil { log.Fatal(err) } defer v.Destroy(ctx) // Retrieve summary property for all hosts // Reference: http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.HostSystem.html var hss []mo.HostSystem err = v.Retrieve(ctx, []string{"HostSystem"}, []string{"summary"}, &hss) if err != nil { log.Fatal(err) } // Print summary per host (see also: govc/host/info.go) tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Name:\tUsed CPU:\tTotal CPU:\tFree CPU:\tUsed Memory:\tTotal Memory:\tFree Memory\t:\n") for _, hs := range hss { totalCPU := int64(hs.Summary.Hardware.CpuMhz) * int64(hs.Summary.Hardware.NumCpuCores) freeCPU := int64(totalCPU) - int64(hs.Summary.QuickStats.OverallCpuUsage) freeMemory := int64(hs.Summary.Hardware.MemorySize) - (int64(hs.Summary.QuickStats.OverallMemoryUsage) * 1024 * 1024) fmt.Fprintf(tw, "%s\t", hs.Summary.Config.Name) fmt.Fprintf(tw, "%d\t", hs.Summary.QuickStats.OverallCpuUsage) fmt.Fprintf(tw, "%d\t", totalCPU) fmt.Fprintf(tw, "%d\t", freeCPU) fmt.Fprintf(tw, "%s\t", units.ByteSize(hs.Summary.QuickStats.OverallMemoryUsage)) fmt.Fprintf(tw, "%s\t", units.ByteSize(hs.Summary.Hardware.MemorySize)) fmt.Fprintf(tw, "%d\t", freeMemory) fmt.Fprintf(tw, "\n") } _ = tw.Flush() } govmomi-0.15.0/examples/networks/000077500000000000000000000000001312205533500167435ustar00rootroot00000000000000govmomi-0.15.0/examples/networks/main.go000066400000000000000000000027431312205533500202240ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( "context" "fmt" "log" "github.com/vmware/govmomi/examples" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25/mo" ) func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Connect and login to ESX or vCenter c, err := examples.NewClient(ctx) if err != nil { log.Fatal(err) } defer c.Logout(ctx) // Create a view of Network types m := view.NewManager(c.Client) v, err := m.CreateContainerView(ctx, c.ServiceContent.RootFolder, []string{"Network"}, true) if err != nil { log.Fatal(err) } defer v.Destroy(ctx) // Reference: http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.Network.html var networks []mo.Network err = v.Retrieve(ctx, []string{"Network"}, nil, &networks) if err != nil { log.Fatal(err) } for _, net := range networks { fmt.Printf("%s: %s\n", net.Name, net.Reference()) } } govmomi-0.15.0/examples/virtualmachines/000077500000000000000000000000001312205533500202655ustar00rootroot00000000000000govmomi-0.15.0/examples/virtualmachines/main.go000066400000000000000000000034071312205533500215440ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* This example program shows how the `view` package can be used to navigate a vSphere inventory structure using govmomi. */ package main import ( "context" "fmt" "log" "github.com/vmware/govmomi/examples" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25/mo" ) func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Connect and login to ESX or vCenter c, err := examples.NewClient(ctx) if err != nil { log.Fatal(err) } defer c.Logout(ctx) // Create view of VirtualMachine objects m := view.NewManager(c.Client) v, err := m.CreateContainerView(ctx, c.ServiceContent.RootFolder, []string{"VirtualMachine"}, true) if err != nil { log.Fatal(err) } defer v.Destroy(ctx) // Retrieve summary property for all machines // Reference: http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html var vms []mo.VirtualMachine err = v.Retrieve(ctx, []string{"VirtualMachine"}, []string{"summary"}, &vms) if err != nil { log.Fatal(err) } // Print summary per vm (see also: govc/vm/info.go) for _, vm := range vms { fmt.Printf("%s: %s\n", vm.Summary.Config.Name, vm.Summary.Config.GuestFullName) } } govmomi-0.15.0/find/000077500000000000000000000000001312205533500141715ustar00rootroot00000000000000govmomi-0.15.0/find/doc.go000066400000000000000000000033771312205533500152770ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Package find implements inventory listing and searching. The Finder is an alternative to the object.SearchIndex FindByInventoryPath() and FindChild() methods. SearchIndex.FindByInventoryPath requires an absolute path, whereas the Finder also supports relative paths and patterns via path.Match. SearchIndex.FindChild requires a parent to find the child, whereas the Finder also supports an ancestor via recursive object traversal. The various Finder methods accept a "path" argument, which can absolute or relative to the Folder for the object type. The Finder supports two modes, "list" and "find". The "list" mode behaves like the "ls" command, only searching within the immediate path. The "find" mode behaves like the "find" command, with the search starting at the immediate path but also recursing into sub Folders relative to the Datacenter. The default mode is "list" if the given path contains a "/", otherwise "find" mode is used. The exception is to use a "..." wildcard with a path to find all objects recursively underneath any root object. For example: VirtualMachineList("/DC1/...") See also: https://github.com/vmware/govmomi/blob/master/govc/README.md#usage */ package find govmomi-0.15.0/find/error.go000066400000000000000000000027761312205533500156650ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package find import "fmt" type NotFoundError struct { kind string path string } func (e *NotFoundError) Error() string { return fmt.Sprintf("%s '%s' not found", e.kind, e.path) } type MultipleFoundError struct { kind string path string } func (e *MultipleFoundError) Error() string { return fmt.Sprintf("path '%s' resolves to multiple %ss", e.path, e.kind) } type DefaultNotFoundError struct { kind string } func (e *DefaultNotFoundError) Error() string { return fmt.Sprintf("no default %s found", e.kind) } type DefaultMultipleFoundError struct { kind string } func (e DefaultMultipleFoundError) Error() string { return fmt.Sprintf("default %s resolves to multiple instances, please specify", e.kind) } func toDefaultError(err error) error { switch e := err.(type) { case *NotFoundError: return &DefaultNotFoundError{e.kind} case *MultipleFoundError: return &DefaultMultipleFoundError{e.kind} default: return err } } govmomi-0.15.0/find/finder.go000066400000000000000000000536251312205533500160020ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package find import ( "context" "errors" "path" "strings" "github.com/vmware/govmomi/list" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type Finder struct { client *vim25.Client r recurser dc *object.Datacenter si *object.SearchIndex folders *object.DatacenterFolders } func NewFinder(client *vim25.Client, all bool) *Finder { f := &Finder{ client: client, si: object.NewSearchIndex(client), r: recurser{ Collector: property.DefaultCollector(client), All: all, }, } return f } func (f *Finder) SetDatacenter(dc *object.Datacenter) *Finder { f.dc = dc f.folders = nil return f } // findRoot makes it possible to use "find" mode with a different root path. // Example: ResourcePoolList("/dc1/host/cluster1/...") func (f *Finder) findRoot(ctx context.Context, root *list.Element, parts []string) bool { if len(parts) == 0 { return false } ix := len(parts) - 1 if parts[ix] != "..." { return false } if ix == 0 { return true // We already have the Object for root.Path } // Lookup the Object for the new root.Path rootPath := path.Join(root.Path, path.Join(parts[:ix]...)) ref, err := f.si.FindByInventoryPath(ctx, rootPath) if err != nil || ref == nil { // If we get an error or fail to match, fall through to find() with the original root and path return false } root.Path = rootPath root.Object = ref return true } func (f *Finder) find(ctx context.Context, arg string, s *spec) ([]list.Element, error) { isPath := strings.Contains(arg, "/") root := list.Element{ Path: "/", Object: object.NewRootFolder(f.client), } parts := list.ToParts(arg) if len(parts) > 0 { switch parts[0] { case "..": // Not supported; many edge case, little value return nil, errors.New("cannot traverse up a tree") case ".": // Relative to whatever pivot, err := s.Relative(ctx) if err != nil { return nil, err } mes, err := mo.Ancestors(ctx, f.client, f.client.ServiceContent.PropertyCollector, pivot.Reference()) if err != nil { return nil, err } for _, me := range mes { // Skip root entity in building inventory path. if me.Parent == nil { continue } root.Path = path.Join(root.Path, me.Name) } root.Object = pivot parts = parts[1:] } } if s.listMode(isPath) { if f.findRoot(ctx, &root, parts) { parts = []string{"*"} } else { return f.r.List(ctx, s, root, parts) } } s.Parents = append(s.Parents, s.Nested...) return f.r.Find(ctx, s, root, parts) } func (f *Finder) datacenter() (*object.Datacenter, error) { if f.dc == nil { return nil, errors.New("please specify a datacenter") } return f.dc, nil } // datacenterPath returns the absolute path to the Datacenter containing the given ref func (f *Finder) datacenterPath(ctx context.Context, ref types.ManagedObjectReference) (string, error) { mes, err := mo.Ancestors(ctx, f.client, f.client.ServiceContent.PropertyCollector, ref) if err != nil { return "", err } // Chop leaves under the Datacenter for i := len(mes) - 1; i > 0; i-- { if mes[i].Self.Type == "Datacenter" { break } mes = mes[:i] } var p string for _, me := range mes { // Skip root entity in building inventory path. if me.Parent == nil { continue } p = p + "/" + me.Name } return p, nil } func (f *Finder) dcFolders(ctx context.Context) (*object.DatacenterFolders, error) { if f.folders != nil { return f.folders, nil } dc, err := f.datacenter() if err != nil { return nil, err } folders, err := dc.Folders(ctx) if err != nil { return nil, err } f.folders = folders return f.folders, nil } func (f *Finder) dcReference(_ context.Context) (object.Reference, error) { dc, err := f.datacenter() if err != nil { return nil, err } return dc, nil } func (f *Finder) vmFolder(ctx context.Context) (object.Reference, error) { folders, err := f.dcFolders(ctx) if err != nil { return nil, err } return folders.VmFolder, nil } func (f *Finder) hostFolder(ctx context.Context) (object.Reference, error) { folders, err := f.dcFolders(ctx) if err != nil { return nil, err } return folders.HostFolder, nil } func (f *Finder) datastoreFolder(ctx context.Context) (object.Reference, error) { folders, err := f.dcFolders(ctx) if err != nil { return nil, err } return folders.DatastoreFolder, nil } func (f *Finder) networkFolder(ctx context.Context) (object.Reference, error) { folders, err := f.dcFolders(ctx) if err != nil { return nil, err } return folders.NetworkFolder, nil } func (f *Finder) rootFolder(_ context.Context) (object.Reference, error) { return object.NewRootFolder(f.client), nil } func (f *Finder) managedObjectList(ctx context.Context, path string, tl bool, include []string) ([]list.Element, error) { fn := f.rootFolder if f.dc != nil { fn = f.dcReference } if len(path) == 0 { path = "." } s := &spec{ Relative: fn, Parents: []string{"ComputeResource", "ClusterComputeResource", "HostSystem", "VirtualApp", "StoragePod"}, Include: include, } if tl { s.Contents = true s.ListMode = types.NewBool(true) } return f.find(ctx, path, s) } // Element returns an Element for the given ManagedObjectReference // This method is only useful for looking up the InventoryPath of a ManagedObjectReference. func (f *Finder) Element(ctx context.Context, ref types.ManagedObjectReference) (*list.Element, error) { rl := func(_ context.Context) (object.Reference, error) { return ref, nil } s := &spec{ Relative: rl, } e, err := f.find(ctx, "./", s) if err != nil { return nil, err } if len(e) == 0 { return nil, &NotFoundError{ref.Type, ref.Value} } if len(e) > 1 { panic("ManagedObjectReference must be unique") } return &e[0], nil } // ObjectReference converts the given ManagedObjectReference to a type from the object package via object.NewReference // with the object.Common.InventoryPath field set. func (f *Finder) ObjectReference(ctx context.Context, ref types.ManagedObjectReference) (object.Reference, error) { e, err := f.Element(ctx, ref) if err != nil { return nil, err } r := object.NewReference(f.client, ref) type common interface { SetInventoryPath(string) } r.(common).SetInventoryPath(e.Path) if f.dc != nil { if ds, ok := r.(*object.Datastore); ok { ds.DatacenterPath = f.dc.InventoryPath } } return r, nil } func (f *Finder) ManagedObjectList(ctx context.Context, path string, include ...string) ([]list.Element, error) { return f.managedObjectList(ctx, path, false, include) } func (f *Finder) ManagedObjectListChildren(ctx context.Context, path string, include ...string) ([]list.Element, error) { return f.managedObjectList(ctx, path, true, include) } func (f *Finder) DatacenterList(ctx context.Context, path string) ([]*object.Datacenter, error) { s := &spec{ Relative: f.rootFolder, Include: []string{"Datacenter"}, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var dcs []*object.Datacenter for _, e := range es { ref := e.Object.Reference() if ref.Type == "Datacenter" { dc := object.NewDatacenter(f.client, ref) dc.InventoryPath = e.Path dcs = append(dcs, dc) } } if len(dcs) == 0 { return nil, &NotFoundError{"datacenter", path} } return dcs, nil } func (f *Finder) Datacenter(ctx context.Context, path string) (*object.Datacenter, error) { dcs, err := f.DatacenterList(ctx, path) if err != nil { return nil, err } if len(dcs) > 1 { return nil, &MultipleFoundError{"datacenter", path} } return dcs[0], nil } func (f *Finder) DefaultDatacenter(ctx context.Context) (*object.Datacenter, error) { dc, err := f.Datacenter(ctx, "*") if err != nil { return nil, toDefaultError(err) } return dc, nil } func (f *Finder) DatacenterOrDefault(ctx context.Context, path string) (*object.Datacenter, error) { if path != "" { dc, err := f.Datacenter(ctx, path) if err != nil { return nil, err } return dc, nil } return f.DefaultDatacenter(ctx) } func (f *Finder) DatastoreList(ctx context.Context, path string) ([]*object.Datastore, error) { s := &spec{ Relative: f.datastoreFolder, Parents: []string{"StoragePod"}, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var dss []*object.Datastore for _, e := range es { ref := e.Object.Reference() if ref.Type == "Datastore" { ds := object.NewDatastore(f.client, ref) ds.InventoryPath = e.Path if f.dc == nil { // In this case SetDatacenter was not called and path is absolute ds.DatacenterPath, err = f.datacenterPath(ctx, ref) if err != nil { return nil, err } } else { ds.DatacenterPath = f.dc.InventoryPath } dss = append(dss, ds) } } if len(dss) == 0 { return nil, &NotFoundError{"datastore", path} } return dss, nil } func (f *Finder) Datastore(ctx context.Context, path string) (*object.Datastore, error) { dss, err := f.DatastoreList(ctx, path) if err != nil { return nil, err } if len(dss) > 1 { return nil, &MultipleFoundError{"datastore", path} } return dss[0], nil } func (f *Finder) DefaultDatastore(ctx context.Context) (*object.Datastore, error) { ds, err := f.Datastore(ctx, "*") if err != nil { return nil, toDefaultError(err) } return ds, nil } func (f *Finder) DatastoreOrDefault(ctx context.Context, path string) (*object.Datastore, error) { if path != "" { ds, err := f.Datastore(ctx, path) if err != nil { return nil, err } return ds, nil } return f.DefaultDatastore(ctx) } func (f *Finder) DatastoreClusterList(ctx context.Context, path string) ([]*object.StoragePod, error) { s := &spec{ Relative: f.datastoreFolder, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var sps []*object.StoragePod for _, e := range es { ref := e.Object.Reference() if ref.Type == "StoragePod" { sp := object.NewStoragePod(f.client, ref) sp.InventoryPath = e.Path sps = append(sps, sp) } } if len(sps) == 0 { return nil, &NotFoundError{"datastore cluster", path} } return sps, nil } func (f *Finder) DatastoreCluster(ctx context.Context, path string) (*object.StoragePod, error) { sps, err := f.DatastoreClusterList(ctx, path) if err != nil { return nil, err } if len(sps) > 1 { return nil, &MultipleFoundError{"datastore cluster", path} } return sps[0], nil } func (f *Finder) DefaultDatastoreCluster(ctx context.Context) (*object.StoragePod, error) { sp, err := f.DatastoreCluster(ctx, "*") if err != nil { return nil, toDefaultError(err) } return sp, nil } func (f *Finder) DatastoreClusterOrDefault(ctx context.Context, path string) (*object.StoragePod, error) { if path != "" { sp, err := f.DatastoreCluster(ctx, path) if err != nil { return nil, err } return sp, nil } return f.DefaultDatastoreCluster(ctx) } func (f *Finder) ComputeResourceList(ctx context.Context, path string) ([]*object.ComputeResource, error) { s := &spec{ Relative: f.hostFolder, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var crs []*object.ComputeResource for _, e := range es { var cr *object.ComputeResource switch o := e.Object.(type) { case mo.ComputeResource, mo.ClusterComputeResource: cr = object.NewComputeResource(f.client, o.Reference()) default: continue } cr.InventoryPath = e.Path crs = append(crs, cr) } if len(crs) == 0 { return nil, &NotFoundError{"compute resource", path} } return crs, nil } func (f *Finder) ComputeResource(ctx context.Context, path string) (*object.ComputeResource, error) { crs, err := f.ComputeResourceList(ctx, path) if err != nil { return nil, err } if len(crs) > 1 { return nil, &MultipleFoundError{"compute resource", path} } return crs[0], nil } func (f *Finder) DefaultComputeResource(ctx context.Context) (*object.ComputeResource, error) { cr, err := f.ComputeResource(ctx, "*") if err != nil { return nil, toDefaultError(err) } return cr, nil } func (f *Finder) ComputeResourceOrDefault(ctx context.Context, path string) (*object.ComputeResource, error) { if path != "" { cr, err := f.ComputeResource(ctx, path) if err != nil { return nil, err } return cr, nil } return f.DefaultComputeResource(ctx) } func (f *Finder) ClusterComputeResourceList(ctx context.Context, path string) ([]*object.ClusterComputeResource, error) { s := &spec{ Relative: f.hostFolder, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var ccrs []*object.ClusterComputeResource for _, e := range es { var ccr *object.ClusterComputeResource switch o := e.Object.(type) { case mo.ClusterComputeResource: ccr = object.NewClusterComputeResource(f.client, o.Reference()) default: continue } ccr.InventoryPath = e.Path ccrs = append(ccrs, ccr) } if len(ccrs) == 0 { return nil, &NotFoundError{"cluster", path} } return ccrs, nil } func (f *Finder) ClusterComputeResource(ctx context.Context, path string) (*object.ClusterComputeResource, error) { ccrs, err := f.ClusterComputeResourceList(ctx, path) if err != nil { return nil, err } if len(ccrs) > 1 { return nil, &MultipleFoundError{"cluster", path} } return ccrs[0], nil } func (f *Finder) HostSystemList(ctx context.Context, path string) ([]*object.HostSystem, error) { s := &spec{ Relative: f.hostFolder, Parents: []string{"ComputeResource", "ClusterComputeResource"}, Include: []string{"HostSystem"}, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var hss []*object.HostSystem for _, e := range es { var hs *object.HostSystem switch o := e.Object.(type) { case mo.HostSystem: hs = object.NewHostSystem(f.client, o.Reference()) hs.InventoryPath = e.Path hss = append(hss, hs) case mo.ComputeResource, mo.ClusterComputeResource: cr := object.NewComputeResource(f.client, o.Reference()) cr.InventoryPath = e.Path hosts, err := cr.Hosts(ctx) if err != nil { return nil, err } hss = append(hss, hosts...) } } if len(hss) == 0 { return nil, &NotFoundError{"host", path} } return hss, nil } func (f *Finder) HostSystem(ctx context.Context, path string) (*object.HostSystem, error) { hss, err := f.HostSystemList(ctx, path) if err != nil { return nil, err } if len(hss) > 1 { return nil, &MultipleFoundError{"host", path} } return hss[0], nil } func (f *Finder) DefaultHostSystem(ctx context.Context) (*object.HostSystem, error) { hs, err := f.HostSystem(ctx, "*/*") if err != nil { return nil, toDefaultError(err) } return hs, nil } func (f *Finder) HostSystemOrDefault(ctx context.Context, path string) (*object.HostSystem, error) { if path != "" { hs, err := f.HostSystem(ctx, path) if err != nil { return nil, err } return hs, nil } return f.DefaultHostSystem(ctx) } func (f *Finder) NetworkList(ctx context.Context, path string) ([]object.NetworkReference, error) { s := &spec{ Relative: f.networkFolder, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var ns []object.NetworkReference for _, e := range es { ref := e.Object.Reference() switch ref.Type { case "Network": r := object.NewNetwork(f.client, ref) r.InventoryPath = e.Path ns = append(ns, r) case "OpaqueNetwork": r := object.NewOpaqueNetwork(f.client, ref) r.InventoryPath = e.Path ns = append(ns, r) case "DistributedVirtualPortgroup": r := object.NewDistributedVirtualPortgroup(f.client, ref) r.InventoryPath = e.Path ns = append(ns, r) case "DistributedVirtualSwitch", "VmwareDistributedVirtualSwitch": r := object.NewDistributedVirtualSwitch(f.client, ref) r.InventoryPath = e.Path ns = append(ns, r) } } if len(ns) == 0 { return nil, &NotFoundError{"network", path} } return ns, nil } func (f *Finder) Network(ctx context.Context, path string) (object.NetworkReference, error) { networks, err := f.NetworkList(ctx, path) if err != nil { return nil, err } if len(networks) > 1 { return nil, &MultipleFoundError{"network", path} } return networks[0], nil } func (f *Finder) DefaultNetwork(ctx context.Context) (object.NetworkReference, error) { network, err := f.Network(ctx, "*") if err != nil { return nil, toDefaultError(err) } return network, nil } func (f *Finder) NetworkOrDefault(ctx context.Context, path string) (object.NetworkReference, error) { if path != "" { network, err := f.Network(ctx, path) if err != nil { return nil, err } return network, nil } return f.DefaultNetwork(ctx) } func (f *Finder) ResourcePoolList(ctx context.Context, path string) ([]*object.ResourcePool, error) { s := &spec{ Relative: f.hostFolder, Parents: []string{"ComputeResource", "ClusterComputeResource", "VirtualApp"}, Nested: []string{"ResourcePool"}, Contents: true, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var rps []*object.ResourcePool for _, e := range es { var rp *object.ResourcePool switch o := e.Object.(type) { case mo.ResourcePool: rp = object.NewResourcePool(f.client, o.Reference()) rp.InventoryPath = e.Path rps = append(rps, rp) } } if len(rps) == 0 { return nil, &NotFoundError{"resource pool", path} } return rps, nil } func (f *Finder) ResourcePool(ctx context.Context, path string) (*object.ResourcePool, error) { rps, err := f.ResourcePoolList(ctx, path) if err != nil { return nil, err } if len(rps) > 1 { return nil, &MultipleFoundError{"resource pool", path} } return rps[0], nil } func (f *Finder) DefaultResourcePool(ctx context.Context) (*object.ResourcePool, error) { rp, err := f.ResourcePool(ctx, "*/Resources") if err != nil { return nil, toDefaultError(err) } return rp, nil } func (f *Finder) ResourcePoolOrDefault(ctx context.Context, path string) (*object.ResourcePool, error) { if path != "" { rp, err := f.ResourcePool(ctx, path) if err != nil { return nil, err } return rp, nil } return f.DefaultResourcePool(ctx) } // ResourcePoolListAll combines ResourcePoolList and VirtualAppList // VirtualAppList is only called if ResourcePoolList does not find any pools with the given path. func (f *Finder) ResourcePoolListAll(ctx context.Context, path string) ([]*object.ResourcePool, error) { pools, err := f.ResourcePoolList(ctx, path) if err != nil { if _, ok := err.(*NotFoundError); !ok { return nil, err } vapps, _ := f.VirtualAppList(ctx, path) if len(vapps) == 0 { return nil, err } for _, vapp := range vapps { pools = append(pools, vapp.ResourcePool) } } return pools, nil } func (f *Finder) DefaultFolder(ctx context.Context) (*object.Folder, error) { ref, err := f.vmFolder(ctx) if err != nil { return nil, toDefaultError(err) } folder := object.NewFolder(f.client, ref.Reference()) return folder, nil } func (f *Finder) FolderOrDefault(ctx context.Context, path string) (*object.Folder, error) { if path != "" { folder, err := f.Folder(ctx, path) if err != nil { return nil, err } return folder, nil } return f.DefaultFolder(ctx) } func (f *Finder) VirtualMachineList(ctx context.Context, path string) ([]*object.VirtualMachine, error) { s := &spec{ Relative: f.vmFolder, Parents: []string{"VirtualApp"}, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var vms []*object.VirtualMachine for _, e := range es { switch o := e.Object.(type) { case mo.VirtualMachine: vm := object.NewVirtualMachine(f.client, o.Reference()) vm.InventoryPath = e.Path vms = append(vms, vm) } } if len(vms) == 0 { return nil, &NotFoundError{"vm", path} } return vms, nil } func (f *Finder) VirtualMachine(ctx context.Context, path string) (*object.VirtualMachine, error) { vms, err := f.VirtualMachineList(ctx, path) if err != nil { return nil, err } if len(vms) > 1 { return nil, &MultipleFoundError{"vm", path} } return vms[0], nil } func (f *Finder) VirtualAppList(ctx context.Context, path string) ([]*object.VirtualApp, error) { s := &spec{ Relative: f.vmFolder, } es, err := f.find(ctx, path, s) if err != nil { return nil, err } var apps []*object.VirtualApp for _, e := range es { switch o := e.Object.(type) { case mo.VirtualApp: app := object.NewVirtualApp(f.client, o.Reference()) app.InventoryPath = e.Path apps = append(apps, app) } } if len(apps) == 0 { return nil, &NotFoundError{"app", path} } return apps, nil } func (f *Finder) VirtualApp(ctx context.Context, path string) (*object.VirtualApp, error) { apps, err := f.VirtualAppList(ctx, path) if err != nil { return nil, err } if len(apps) > 1 { return nil, &MultipleFoundError{"app", path} } return apps[0], nil } func (f *Finder) FolderList(ctx context.Context, path string) ([]*object.Folder, error) { es, err := f.ManagedObjectList(ctx, path) if err != nil { return nil, err } var folders []*object.Folder for _, e := range es { switch o := e.Object.(type) { case mo.Folder, mo.StoragePod: folder := object.NewFolder(f.client, o.Reference()) folder.InventoryPath = e.Path folders = append(folders, folder) case *object.Folder: // RootFolder folders = append(folders, o) } } if len(folders) == 0 { return nil, &NotFoundError{"folder", path} } return folders, nil } func (f *Finder) Folder(ctx context.Context, path string) (*object.Folder, error) { folders, err := f.FolderList(ctx, path) if err != nil { return nil, err } if len(folders) > 1 { return nil, &MultipleFoundError{"folder", path} } return folders[0], nil } govmomi-0.15.0/find/recurser.go000066400000000000000000000130411312205533500163510ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package find import ( "context" "os" "path" "github.com/vmware/govmomi/list" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" ) // spec is used to specify per-search configuration, independent of the Finder instance. type spec struct { // Relative returns the root object to resolve Relative paths (starts with ".") Relative func(ctx context.Context) (object.Reference, error) // ListMode can be used to optionally force "ls" behavior, rather than "find" behavior ListMode *bool // Contents configures the Recurser to list the Contents of traversable leaf nodes. // This is typically set to true when used from the ls command, where listing // a folder means listing its Contents. This is typically set to false for // commands that take managed entities that are not folders as input. Contents bool // Parents specifies the types which can contain the child types being searched for. // for example, when searching for a HostSystem, parent types can be // "ComputeResource" or "ClusterComputeResource". Parents []string // Include specifies which types to be included in the results, used only in "find" mode. Include []string // Nested should be set to types that can be Nested, used only in "find" mode. Nested []string // ChildType avoids traversing into folders that can't contain the Include types, used only in "find" mode. ChildType []string } func (s *spec) traversable(o mo.Reference) bool { ref := o.Reference() switch ref.Type { case "Datacenter": if len(s.Include) == 1 && s.Include[0] == "Datacenter" { // No point in traversing deeper as Datacenters cannot be nested return false } return true case "Folder": if f, ok := o.(mo.Folder); ok { // TODO: Not making use of this yet, but here we can optimize when searching the entire // inventory across Datacenters for specific types, for example: 'govc ls -t VirtualMachine /**' // should not traverse into a Datacenter's host, network or datatore folders. if !s.traversableChildType(f.ChildType) { return false } } return true } for _, kind := range s.Parents { if kind == ref.Type { return true } } return false } func (s *spec) traversableChildType(ctypes []string) bool { if len(s.ChildType) == 0 { return true } for _, t := range ctypes { for _, c := range s.ChildType { if t == c { return true } } } return false } func (s *spec) wanted(e list.Element) bool { if len(s.Include) == 0 { return true } w := e.Object.Reference().Type for _, kind := range s.Include { if w == kind { return true } } return false } // listMode is a global option to revert to the original Finder behavior, // disabling the newer "find" mode. var listMode = os.Getenv("GOVMOMI_FINDER_LIST_MODE") == "true" func (s *spec) listMode(isPath bool) bool { if listMode { return true } if s.ListMode != nil { return *s.ListMode } return isPath } type recurser struct { Collector *property.Collector // All configures the recurses to fetch complete objects for leaf nodes. All bool } func (r recurser) List(ctx context.Context, s *spec, root list.Element, parts []string) ([]list.Element, error) { if len(parts) == 0 { // Include non-traversable leaf elements in result. For example, consider // the pattern "./vm/my-vm-*", where the pattern should match the VMs and // not try to traverse them. // // Include traversable leaf elements in result, if the contents // field is set to false. // if !s.Contents || !s.traversable(root.Object.Reference()) { return []list.Element{root}, nil } } k := list.Lister{ Collector: r.Collector, Reference: root.Object.Reference(), Prefix: root.Path, } if r.All && len(parts) < 2 { k.All = true } in, err := k.List(ctx) if err != nil { return nil, err } // This folder is a leaf as far as the glob goes. if len(parts) == 0 { return in, nil } pattern := parts[0] parts = parts[1:] var out []list.Element for _, e := range in { matched, err := path.Match(pattern, path.Base(e.Path)) if err != nil { return nil, err } if !matched { continue } nres, err := r.List(ctx, s, e, parts) if err != nil { return nil, err } out = append(out, nres...) } return out, nil } func (r recurser) Find(ctx context.Context, s *spec, root list.Element, parts []string) ([]list.Element, error) { var out []list.Element if len(parts) > 0 { pattern := parts[0] matched, err := path.Match(pattern, path.Base(root.Path)) if err != nil { return nil, err } if matched && s.wanted(root) { out = append(out, root) } } if !s.traversable(root.Object) { return out, nil } k := list.Lister{ Collector: r.Collector, Reference: root.Object.Reference(), Prefix: root.Path, } in, err := k.List(ctx) if err != nil { return nil, err } for _, e := range in { nres, err := r.Find(ctx, s, e, parts) if err != nil { return nil, err } out = append(out, nres...) } return out, nil } govmomi-0.15.0/gen/000077500000000000000000000000001312205533500140225ustar00rootroot00000000000000govmomi-0.15.0/gen/Gemfile000066400000000000000000000000561312205533500153160ustar00rootroot00000000000000source "https://rubygems.org" gem "nokogiri" govmomi-0.15.0/gen/Gemfile.lock000066400000000000000000000002451312205533500162450ustar00rootroot00000000000000GEM remote: https://rubygems.org/ specs: mini_portile (0.6.0) nokogiri (1.6.3.1) mini_portile (= 0.6.0) PLATFORMS ruby DEPENDENCIES nokogiri govmomi-0.15.0/gen/gen.sh000077500000000000000000000024131312205533500151320ustar00rootroot00000000000000#!/bin/bash # Copyright (c) 2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e generate() { dst="$1" wsdl="$2" modl="$3" pkgs=(types methods) if [ -n "$modl" ] ; then pkgs+=(mo) fi for p in "${pkgs[@]}" do mkdir -p "$dst/$p" done echo "generating $dst/..." bundle exec ruby gen_from_wsdl.rb "$dst" "$wsdl" if [ -n "$modl" ] ; then bundle exec ruby gen_from_vmodl.rb "$dst" "$wsdl" "$modl" fi for p in "${pkgs[@]}" do pushd "$dst/$p" >/dev/null goimports -w ./*.go go install popd >/dev/null done } # ./sdk/ contains the contents of wsdl.zip from vimbase build 5037323 generate "../vim25" "vim" "./rbvmomi/vmodl.db" # from github.com/vmware/rbvmomi@f6907e6 generate "../pbm" "pbm" govmomi-0.15.0/gen/gen_from_vmodl.rb000066400000000000000000000106251312205533500173500ustar00rootroot00000000000000# Copyright (c) 2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. $:.unshift(File.expand_path(File.dirname(__FILE__))) require "vim_wsdl" require "test/unit" def read(file) File.open(file) end class Prop def initialize(vmodl, data) @vmodl = vmodl @data = data end def slice? @data["is-array"] end def optional? @data["is-optional"] end def name @data["name"] end def var_field n = name n[0].capitalize + n[1..-1] end def var_type_prefix(base=false) if slice? "[]" else if optional? && !base "*" else "" end end end def var_type type = @data["wsdl_type"] if @vmodl.managed_hash.has_key?(type) type = "ManagedObjectReference" end # Fix up type from vmodl case type when "TypeName", "MethodName" type = "xsd:string" when "ManagedObject" type = "ManagedObjectReference" when "xsd:anyType" type = "AnyType" end if type =~ /^xsd:(.*)$/ type = $1 case type when "string" when "int" type = "int32" when "boolean" type ="bool" when "long" type ="int64" when "dateTime" type ="time.Time" prefix += "*" if !slice? && optional? when "byte" when "double" type ="float64" when "float" type ="float32" when "short" type ="int16" when "base64Binary" type ="[]byte" else raise "unknown type: %s" % type end else if Peek.base?(type) type = "Base" + type base = true end type = "types." + type end var_type_prefix(base) + type end def var_tag "mo:\"%s\"" % name end def dump(io) io.print "%s %s `%s`\n" % [var_field, var_type, var_tag] end end class Managed def initialize(vmodl, name, data) @vmodl = vmodl @name = name @data = data end def name @name end def props @data["props"].map do |p| Prop.new(@vmodl, p) end end def dump(io) include_ref_getter = false include_ent_getter = false io.print "type %s struct {\n" % name case @data["wsdl_base"] when nil, "ManagedObject", "View" include_ref_getter = true io.print "Self types.ManagedObjectReference\n\n" else io.print "%s\n\n" % @data["wsdl_base"] if @data["wsdl_base"] == "ManagedEntity" include_ent_getter = true end end props.each do |p| p.dump(io) end io.print "}\n\n" if include_ref_getter io.print "func (m %s) Reference() types.ManagedObjectReference {\n" % [name] io.print "return m.Self\n" io.print "}\n\n" end if include_ent_getter io.print "func (m *%s) Entity() *ManagedEntity {\n" % [name] io.print "return &m.ManagedEntity\n" io.print "}\n\n" end end def dump_init(io) io.print "func init() {\n" io.print "t[\"%s\"] = reflect.TypeOf((*%s)(nil)).Elem()\n" % [name, name] io.print "}\n\n" end end class Vmodl def initialize(data) @data = Marshal.load(data) end def managed_hash @managed_hash ||= begin h = {} managed.each do |m| h[m.name] = m end h end end def managed @data.map do |k,v| next if !v.is_a?(Hash) next if v["kind"] != "managed" Managed.new(self, k, v) end.compact end end if !File.directory?(ARGV.first) raise "first argument not a directory" end wsdl = WSDL.new(WSDL.read ARGV[1]+".wsdl") wsdl.validate_assumptions! wsdl.peek() vmodl = Vmodl.new(read ARGV[2] || "./rbvmomi/vmodl.db") File.open(File.join(ARGV.first, "mo/mo.go"), "w") do |io| io.print WSDL.header("mo") vmodl. managed. sort_by { |m| m.name }. each { |m| m.dump(io); m.dump_init(io); } end exit(0) govmomi-0.15.0/gen/gen_from_wsdl.rb000066400000000000000000000045231312205533500172000ustar00rootroot00000000000000# Copyright (c) 2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. $:.unshift(File.expand_path(File.dirname(__FILE__))) require "vim_wsdl" if !File.directory?(ARGV.first) raise "first argument not a directory" end target = ARGV[1] wsdl = WSDL.new(WSDL.read target+".wsdl") wsdl.validate_assumptions! wsdl.peek() ifs = Peek.types.keys.select { |name| Peek.base?(name) }.size() puts "%d classes, %d interfaces" % [Peek.types.size(), ifs] File.open(File.join(ARGV.first, "types/enum.go"), "w") do |io| io.print WSDL.header("types") wsdl. types. sort_by { |x| x.name }. uniq { |x| x.name }. select { |x| x.name[0] == x.name[0].upcase }. # Only capitalized methods for now... select { |t| t.is_enum? }. each { |e| e.dump(io); e.dump_init(io) } end File.open(File.join(ARGV.first, "types/types.go"), "w") do |io| io.print WSDL.header("types") if target != "vim" io.print < object.mv * Add dvs.portgroup.change command * Add vlan flag to dvs.portgroup.add command ### 0.10.0 (2016-10-20) * Add generated govc/USAGE.md * Add host.date info and change commands * Add session ls and rm commands * Add `-tls-known-hosts` and `-tls-ca-certs` flags * Add host.cert commands : info, csr, import * Add about.cert command (similar to the Chrome Certificate Viewer) * Add `-vspc-proxy` flag to device.serial.connect command * Rename license.list -> license.ls, license.assigned.list -> license.assigned.ls ### 0.9.0 (2016-09-09) * Add `-R` option to datastore.ls * Add datastore.tail command * Add vm.migrate command * Add govc vm.register and vm.unregister commands * Add govc vm snapshot commands: create, remove, revert, tree * Add device.usb.add command * Support stdin/stdout in datastore upload/download * Add host.portgroup.change command * Add host.portgroup.info command * Add HostNetworkPolicy to host.vswitch.info * Add `-json` support to host.vswitch.info command * Support instance uuid in SearchFlag * Add `-json` support to esxcli command * Add `-unclaimed` flag to host.storage.info command * Support Network mapping in import.{ova,ovf} commands ### 0.8.0 (2016-06-30) * If username (`-u` / GOVC_USERNAME) is empty, attempt login via local ticket (Workstation) * Add StoragePod support to govc folder.create * Add `-folder` flag to datacenter.create command * Logout when session persistence is disabled * Add `-L` flag to ls command for resolving by managed object reference * Add `-i` flag to ls command for listing the managed object reference * Add vm.markasvm command * Add vm.markastemplate command ### 0.7.1 (2016-06-03) * Fix datastore.{upload,download} against VirtualCenter ### 0.7.0 (2016-06-02) * Add `-require` flag to version command * Add support for local type in the datastore.create command * Add `-namespace` option to datastore.mkdir and datastore.rm to create/remove namespaces on VSANs * Add host.service command * Add host.storage.mark command * Add `-rescan` option to host.storage.info command ### 0.6.0 (2016-04-29) * Add folder commands: info, create, destroy, rename, moveinto * Add datastore.info command * Add `-a` and `-v4` flags to vm.ip command * Add host.account.{create,update,remove} commands * Add env command * Add vm.clone command ### 0.5.0 (2016-03-30) * Add dvs.portgroup.info command * Add `-folder` flag to vm.create command * Add `-dump` flag to OutputFlag * Add `-f` flag to events command * Add `-mode` flag to vm.disk.create command * Add `-net` flag to device.info command * Add `-eager` and `-thick` options to vm.create command ### 0.4.0 (2016-02-26) * Add support for placement in datastore cluster to vm.create command * Add support for creating new disks in vm.create command * Add `-p` and `-a` options to govc datastore.ls command ### 0.3.0 (2016-01-16) * Add permissions.{ls,set,remove} commands * Add datastore.{create,remove} commands. The new create command supports both creating NAS and VMFS datastores. * Add dvs.{create,add} and dvs.portgroup.add commands * Add host.vnic.{service,info} commands * Add cluster.{create,change,add} commands * Add host.{disconnect,reconnect,remove,maintenance.enter,maintenance.exit} commands * Add license.decode, license.assigned.list and license.assign commands * Add firewall.ruleset.find command * Add logs, logs.ls and logs.download commands * Add support for LoginExtensionByCertificate with new `-cert` and `-key` flags * Add govc extension.{info,register,unregister,setcert} commands * Add govc vapp.{info,destroy,power} commands ### 0.2.0 (2015-09-15) * The `vm.power` guest `-s` and `-r` options will fallback to hard `-off` / `-reset` if tools is unavailable and `-force` flag is given * Add `PowerOn, InjectOvfEnv, WaitForIP` options to `import.ovf` and `import.ova` option spec file * Add `import.spec` to produce an example json document * Add `-options` to `import.ovf` and `import.ova` * Add `-folder` to `import.ovf` and `import.ova` * Add `fields` command to manage custom fields * Add `datastore.info` command * Add `events` command * Add `-net.address` (Hardware Address) option to `vm.change` and `vm.create` * Add `host.add` command to add host to datacenter. * Add `GOVC_USERNAME` and `GOVC_PASSWORD` to allow overriding username and/or password (used when they contain special characters that prevent them from being embedded in the URL). * Add `-e' (ExtraConfig) option to `vm.change` and `vm.info` * Retry twice on temporary network errors. * Add `host.autostart` commands to manage VM autostart. * Add `-persist-session` flag to control whether or not the session is persisted to disk (defaults to true). ### 0.1.0 (2015-03-17) Prior to this version the changes to govc's command set were not documented. govmomi-0.15.0/govc/README.md000066400000000000000000000134111312205533500154660ustar00rootroot00000000000000# govc govc is a vSphere CLI built on top of govmomi. ## Installation You can find prebuilt govc binaries on the [releases page](https://github.com/vmware/govmomi/releases). Download and install a binary locally like this: ```sh curl -L $URL_TO_BINARY | gunzip > /usr/local/bin/govc chmod +x /usr/local/bin/govc ``` ### Source You can install the latest govc version from source if you have the Go toolchain installed. ```sh go get -u github.com/vmware/govmomi/govc ``` (make sure `$GOPATH/bin` is in your `PATH`) ## Usage For the complete list of commands and flags, refer to the [USAGE](USAGE.md) document. Common flags include: * `-u`: ESXi or vCenter URL (ex: `user:pass@host`) * `-debug`: Trace requests and responses (to `~/.govmomi/debug`) Managed entities can be referred to by their absolute path or by their relative path. For example, when specifying a datastore to use for a subcommand, you can either specify it as `/mydatacenter/datastore/mydatastore`, or as `mydatastore`. If you're not sure about the name of the datastore, or even the full path to the datastore, you can specify a pattern to match. Both `/*center/*/my*` (absolute) and `my*store` (relative) will resolve to the same datastore, given there are no other datastores that match those globs. The relative path in this example can only be used if the command can umambigously resolve a datacenter to use as origin for the query. If no datacenter is specified, govc defaults to the only datacenter, if there is only one. The datacenter itself can be specified as a pattern as well, enabling the following arguments: `-dc='my*' -ds='*store'`. The datastore pattern is looked up and matched relative to the datacenter which itself is specified as a pattern. Besides specifying managed entities as arguments, they can also be specified using environment variables. The following environment variables are used by govc to set defaults: * `GOVC_URL`: URL of ESXi or vCenter instance to connect to. > The URL scheme defaults to `https` and the URL path defaults to `/sdk`. > This means that specifying `user:pass@host` is equivalent to > `https://user:pass@host/sdk`. > If password include special characters like `#` or `:` you can use > `GOVC_USERNAME` and `GOVC_PASSWORD` to have a simple `GOVC_URL` > When using govc against VMware Workstation, GOVC_URL can be set to "localhost" > without a user or pass, in which case local ticket based authentication is used. * `GOVC_USERNAME`: USERNAME to use if not specified in GOVC_URL. * `GOVC_PASSWORD`: PASSWORD to use if not specified in GOVC_URL. * `GOVC_TLS_CA_CERTS`: Override system root certificate authorities. > export GOVC_TLS_CA_CERTS=~/.govc_ca.crt > Use path separator to specify multiple files: > export GOVC_TLS_CA_CERTS=~/ca-certificates/bar.crt:~/ca-certificates/foo.crt * `GOVC_TLS_KNOWN_HOSTS`: File(s) for thumbprint based certificate verification. > Thumbprint based verification can be used in addition to or as an alternative to > GOVC_TLS_CA_CERTS for self-signed certificates. Example: > export GOVC_TLS_KNOWN_HOSTS=~/.govc_known_hosts > govc about.cert -u host -k -thumbprint | tee -a $GOVC_TLS_KNOWN_HOSTS > govc about -u user:pass@host * `GOVC_INSECURE`: Disable certificate verification. > This option sets Go's tls.Config.InsecureSkipVerify flag and is false by default. > Quoting https://golang.org/pkg/crypto/tls/#Config: > > InsecureSkipVerify controls whether a client verifies the > > server's certificate chain and host name. > > If InsecureSkipVerify is true, TLS accepts any certificate > > presented by the server and any host name in that certificate. > > In this mode, TLS is susceptible to man-in-the-middle attacks. > > This should be used only for testing. * `GOVC_DATACENTER` * `GOVC_DATASTORE` * `GOVC_NETWORK` * `GOVC_RESOURCE_POOL` * `GOVC_HOST` * `GOVC_GUEST_LOGIN`: Guest credentials for guest operations * `GOVC_VIM_NAMESPACE`: Vim namespace defaults to `urn:vim25` * `GOVC_VIM_VERSION`: Vim version defaults to `6.0` ## Platform specific notes ### MSYS2 (Windows) Inventory path arguments with a leading '/' are subject to [Posix path conversion](http://www.mingw.org/wiki/Posix_path_conversion). ## Examples Several examples are embedded in the govc command [help](USAGE.md) * [Upload ssh public key to a VM](examples/lib/ssh.sh) * [Create and configure a vCenter VM](examples/vcsa.sh) * [Create a CoreOS VM](https://github.com/vmware/vic/blob/master/pkg/vsphere/toolbox/toolbox-test.sh) * [Create a Debian VM](https://github.com/kubernetes/kubernetes/tree/master/cluster/vsphere) * [Create a Windows VM](https://github.com/dougm/govc-windows-box/blob/master/provision-esx.sh) * [Create an ESX VM](https://github.com/vmware/vic/blob/master/infra/machines/vcsa/create-esxi-vm.sh) * [Create a vCenter VM](https://github.com/vmware/vic/blob/master/infra/machines/vcsa/create-vcsa-vm.sh) * [Create a Cluster](https://github.com/vmware/vic/blob/master/infra/machines/vcsa/create-cluster.sh) ## Status Changes to the cli are subject to [semantic versioning](http://semver.org). Refer to the [CHANGELOG](CHANGELOG.md) for version to version changes. When new govc commands or flags are added, the PATCH version will be incremented. This enables you to require a minimum version from within a script, for example: ``` govc version -require 0.14 ``` ## Projects using govc * [Emacs govc package](./emacs) * [Kubernetes vSphere Provider](https://github.com/kubernetes/kubernetes/tree/master/cluster/vsphere) * [VMware VIC Engine](https://github.com/vmware/vic) * [vSphere Docker Volume Service](https://github.com/vmware/docker-volume-vsphere) * [golang/build](https://github.com/golang/build) ## Related projects * [rvc](https://github.com/vmware/rvc) ## License govc is available under the [Apache 2 license](../LICENSE). govmomi-0.15.0/govc/USAGE.md000066400000000000000000002246031312205533500154040ustar00rootroot00000000000000# govc usage This document is generated from `govc -h` and `govc $cmd -h` commands. The following common options are filtered out in this document, but appear via `govc $cmd -h`: ``` -cert= Certificate [GOVC_CERTIFICATE] -debug=false Store debug logs [GOVC_DEBUG] -dump=false Enable output dump -json=false Enable JSON output -k=false Skip verification of server certificate [GOVC_INSECURE] -key= Private key [GOVC_PRIVATE_KEY] -persist-session=true Persist session to disk [GOVC_PERSIST_SESSION] -tls-ca-certs= TLS CA certificates file [GOVC_TLS_CA_CERTS] -tls-known-hosts= TLS known hosts file [GOVC_TLS_KNOWN_HOSTS] -u= ESX or vCenter URL [GOVC_URL] -vim-namespace=urn:vim25 Vim namespace [GOVC_VIM_NAMESPACE] -vim-version=6.0 Vim version [GOVC_VIM_VERSION] -dc= Datacenter [GOVC_DATACENTER] -host.dns= Find host by FQDN -host.ip= Find host by IP address -host.ipath= Find host by inventory path -host.uuid= Find host by UUID -vm.dns= Find VM by FQDN -vm.ip= Find VM by IP address -vm.ipath= Find VM by inventory path -vm.path= Find VM by path to .vmx file -vm.uuid= Find VM by UUID ``` ## about ``` Usage: govc about [OPTIONS] Display About info for HOST. System information including the name, type, version, and build number. Examples: govc about govc about -json | jq -r .About.ProductLineId Options: -l=false Include service content ``` ## about.cert ``` Usage: govc about.cert [OPTIONS] Display TLS certificate info for HOST. If the HOST certificate cannot be verified, about.cert will return with exit code 60 (as curl does). If the '-k' flag is provided, about.cert will return with exit code 0 in this case. The SHA1 thumbprint can also be used as '-thumbprint' for the 'host.add' and 'cluster.add' commands. Examples: govc about.cert -k -json | jq -r .ThumbprintSHA1 govc about.cert -k -show | sudo tee /usr/local/share/ca-certificates/host.crt govc about.cert -k -thumbprint | tee -a ~/.govmomi/known_hosts Options: -show=false Show PEM encoded server certificate only -thumbprint=false Output host hash and thumbprint only ``` ## cluster.add ``` Usage: govc cluster.add [OPTIONS] Add HOST to CLUSTER. The host is added to the cluster specified by the 'cluster' flag. Examples: thumbprint=$(govc about.cert -k -u host.example.com -thumbprint | awk '{print $2}') govc cluster.add -cluster ClusterA -hostname host.example.com -username root -password pass -thumbprint $thumbprint govc cluster.add -cluster ClusterB -hostname 10.0.6.1 -username root -password pass -noverify Options: -cluster=* Path to cluster -connect=true Immediately connect to host -force=false Force when host is managed by another VC -hostname= Hostname or IP address of the host -license= Assign license key -noverify=false Accept host thumbprint without verification -password= Password of administration account on the host -thumbprint= SHA-1 thumbprint of the host's SSL certificate -username= Username of administration account on the host ``` ## cluster.change ``` Usage: govc cluster.change [OPTIONS] CLUSTER... Change configuration of the given clusters. Examples: govc cluster.change -drs-enabled -vsan-enabled -vsan-autoclaim ClusterA govc cluster.change -drs-enabled=false ClusterB Options: -drs-enabled= Enable DRS -drs-mode= DRS behavior for virtual machines: manual, partiallyAutomated, fullyAutomated -ha-enabled= Enable HA -vsan-autoclaim= Autoclaim storage on cluster hosts -vsan-enabled= Enable vSAN ``` ## cluster.create ``` Usage: govc cluster.create [OPTIONS] CLUSTER Create CLUSTER in datacenter. The cluster is added to the folder specified by the 'folder' flag. If not given, this defaults to the host folder in the specified or default datacenter. Examples: govc cluster.create ClusterA govc cluster.create -folder /dc2/test-folder ClusterB Options: -folder= Inventory folder [GOVC_FOLDER] ``` ## datacenter.create ``` Usage: govc datacenter.create [OPTIONS] NAME... Options: -folder= Inventory folder [GOVC_FOLDER] ``` ## datacenter.info ``` Usage: govc datacenter.info [OPTIONS] [PATH]... Options: ``` ## datastore.cp ``` Usage: govc datastore.cp [OPTIONS] SRC DST Copy SRC to DST on DATASTORE. Examples: govc datastore.cp foo/foo.vmx foo/foo.vmx.old govc datastore.cp -f my.vmx foo/foo.vmx Options: -ds= Datastore [GOVC_DATASTORE] -f=false If true, overwrite any identically named file at the destination ``` ## datastore.create ``` Usage: govc datastore.create [OPTIONS] HOST... Create datastore on HOST. Examples: govc datastore.create -type nfs -name nfsDatastore -remote-host 10.143.2.232 -remote-path /share cluster1 govc datastore.create -type vmfs -name vmfsDatastore -disk=mpx.vmhba0:C0:T0:L0 cluster1 govc datastore.create -type local -name localDatastore -path /var/datastore host1 Options: -disk= Canonical name of disk (VMFS only) -force=false Ignore DuplicateName error if datastore is already mounted on a host -host= Host system [GOVC_HOST] -mode=readOnly Access mode for the mount point (readOnly|readWrite) -name= Datastore name -password= Password to use when connecting (CIFS only) -path= Local directory path for the datastore (local only) -remote-host= Remote hostname of the NAS datastore -remote-path= Remote path of the NFS mount point -type= Datastore type (NFS|NFS41|CIFS|VMFS|local) -username= Username to use when connecting (CIFS only) ``` ## datastore.disk.create ``` Usage: govc datastore.disk.create [OPTIONS] VMDK Create VMDK on DS. Examples: govc datastore.mkdir disks govc datastore.disk.create -size 24G disks/disk1.vmdk Options: -ds= Datastore [GOVC_DATASTORE] -size=10.0GB Size of new disk ``` ## datastore.disk.info ``` Usage: govc datastore.disk.info [OPTIONS] VMDK Query VMDK info on DS. Examples: govc datastore.disk.info disks/disk1.vmdk Options: -c=false Chain format -d=false Include datastore in output -ds= Datastore [GOVC_DATASTORE] -p=true Include parents ``` ## datastore.download ``` Usage: govc datastore.download [OPTIONS] SOURCE DEST Copy SOURCE from DS to DEST on the local system. If DEST name is "-", source is written to stdout. Examples: govc datastore.download vm-name/vmware.log ./local.log govc datastore.download vm-name/vmware.log - | grep -i error Options: -ds= Datastore [GOVC_DATASTORE] -host= Host system [GOVC_HOST] ``` ## datastore.info ``` Usage: govc datastore.info [OPTIONS] [PATH]... Options: ``` ## datastore.ls ``` Usage: govc datastore.ls [OPTIONS] [FILE]... Options: -R=false List subdirectories recursively -a=false Do not ignore entries starting with . -ds= Datastore [GOVC_DATASTORE] -l=false Long listing format -p=false Append / indicator to directories ``` ## datastore.mkdir ``` Usage: govc datastore.mkdir [OPTIONS] DIRECTORY Options: -ds= Datastore [GOVC_DATASTORE] -namespace=false Return uuid of namespace created on vsan datastore -p=false Create intermediate directories as needed ``` ## datastore.mv ``` Usage: govc datastore.mv [OPTIONS] SRC DST Move SRC to DST on DATASTORE. Examples: govc datastore.mv foo/foo.vmx foo/foo.vmx.old govc datastore.mv -f my.vmx foo/foo.vmx Options: -ds= Datastore [GOVC_DATASTORE] -f=false If true, overwrite any identically named file at the destination ``` ## datastore.remove ``` Usage: govc datastore.remove [OPTIONS] HOST... Remove datastore from HOST. Examples: govc datastore.remove -ds nfsDatastore cluster1 govc datastore.remove -ds nasDatastore host1 host2 host3 Options: -ds= Datastore [GOVC_DATASTORE] -host= Host system [GOVC_HOST] ``` ## datastore.rm ``` Usage: govc datastore.rm [OPTIONS] FILE Remove FILE from DATASTORE. Examples: govc datastore.rm vm/vmware.log govc datastore.rm vm govc datastore.rm -f images/base.vmdk Options: -ds= Datastore [GOVC_DATASTORE] -f=false Force; ignore nonexistent files and arguments -namespace=false Path is uuid of namespace on vsan datastore -t=true Use file type to choose disk or file manager ``` ## datastore.tail ``` Usage: govc datastore.tail [OPTIONS] PATH Output the last part of datastore files. Examples: govc datastore.tail -n 100 vm-name/vmware.log govc datastore.tail -n 0 -f vm-name/vmware.log Options: -c=-1 Output the last NUM bytes -ds= Datastore [GOVC_DATASTORE] -f=false Output appended data as the file grows -host= Host system [GOVC_HOST] -n=10 Output the last NUM lines ``` ## datastore.upload ``` Usage: govc datastore.upload [OPTIONS] SOURCE DEST Copy SOURCE from the local system to DEST on DS. If SOURCE name is "-", read source from stdin. Examples: govc datastore.upload -ds datastore1 ./config.iso vm-name/config.iso genisoimage ... | govc datastore.upload -ds datastore1 - vm-name/config.iso Options: -ds= Datastore [GOVC_DATASTORE] ``` ## datastore.vsan.dom.ls ``` Usage: govc datastore.vsan.dom.ls [OPTIONS] [UUID]... List vSAN DOM objects in DS. Examples: govc datastore.vsan.dom.ls govc datastore.vsan.dom.ls -ds vsanDatastore -l govc datastore.vsan.dom.ls -l d85aa758-63f5-500a-3150-0200308e589c Options: -ds= Datastore [GOVC_DATASTORE] -l=false Long listing -o=false List orphan objects ``` ## datastore.vsan.dom.rm ``` Usage: govc datastore.vsan.dom.rm [OPTIONS] UUID... Remove vSAN DOM objects in DS. Examples: govc datastore.vsan.dom.rm d85aa758-63f5-500a-3150-0200308e589c govc datastore.vsan.dom.rm -f d85aa758-63f5-500a-3150-0200308e589c govc datastore.vsan.dom.ls -o | xargs govc datastore.vsan.dom.rm Options: -ds= Datastore [GOVC_DATASTORE] -f=false Force delete -v=false Print deleted UUIDs to stdout, failed to stderr ``` ## device.boot ``` Usage: govc device.boot [OPTIONS] Configure VM boot settings. Examples: govc device.boot -vm $vm -delay 1000 -order floppy,cdrom,ethernet,disk Options: -delay=0 Delay in ms before starting the boot sequence -order= Boot device order -retry=false If true, retry boot after retry-delay -retry-delay=0 Delay in ms before a boot retry -setup=false If true, enter BIOS setup on next boot -vm= Virtual machine [GOVC_VM] ``` ## device.cdrom.add ``` Usage: govc device.cdrom.add [OPTIONS] Add CD-ROM device to VM. Examples: govc device.cdrom.add -vm $vm govc device.ls -vm $vm | grep ide- govc device.cdrom.add -vm $vm -controller ide-200 govc device.info cdrom-* Options: -controller= IDE controller name -vm= Virtual machine [GOVC_VM] ``` ## device.cdrom.eject ``` Usage: govc device.cdrom.eject [OPTIONS] Eject media from CD-ROM device. If device is not specified, the first CD-ROM device is used. Examples: govc device.cdrom.eject -vm vm-1 govc device.cdrom.eject -vm vm-1 -device floppy-1 Options: -device= CD-ROM device name -vm= Virtual machine [GOVC_VM] ``` ## device.cdrom.insert ``` Usage: govc device.cdrom.insert [OPTIONS] ISO Insert media on datastore into CD-ROM device. If device is not specified, the first CD-ROM device is used. Examples: govc device.cdrom.insert -vm vm-1 -device cdrom-3000 images/boot.iso Options: -device= CD-ROM device name -ds= Datastore [GOVC_DATASTORE] -vm= Virtual machine [GOVC_VM] ``` ## device.connect ``` Usage: govc device.connect [OPTIONS] DEVICE... Connect DEVICE on VM. Examples: govc device.connect -vm $name cdrom-3000 Options: -vm= Virtual machine [GOVC_VM] ``` ## device.disconnect ``` Usage: govc device.disconnect [OPTIONS] DEVICE... Disconnect DEVICE on VM. Examples: govc device.disconnect -vm $name cdrom-3000 Options: -vm= Virtual machine [GOVC_VM] ``` ## device.floppy.add ``` Usage: govc device.floppy.add [OPTIONS] Add floppy device to VM. Examples: govc device.floppy.add -vm $vm govc device.info floppy-* Options: -vm= Virtual machine [GOVC_VM] ``` ## device.floppy.eject ``` Usage: govc device.floppy.eject [OPTIONS] Eject image from floppy device. If device is not specified, the first floppy device is used. Examples: govc device.floppy.eject -vm vm-1 Options: -device= Floppy device name -vm= Virtual machine [GOVC_VM] ``` ## device.floppy.insert ``` Usage: govc device.floppy.insert [OPTIONS] IMG Insert IMG on datastore into floppy device. If device is not specified, the first floppy device is used. Examples: govc device.floppy.insert -vm vm-1 vm-1/config.img Options: -device= Floppy device name -ds= Datastore [GOVC_DATASTORE] -vm= Virtual machine [GOVC_VM] ``` ## device.info ``` Usage: govc device.info [OPTIONS] [DEVICE]... Device info for VM. Examples: govc device.info -vm $name govc device.info -vm $name disk-* govc device.info -vm $name -json ethernet-0 | jq -r .Devices[].MacAddress Options: -net= Network [GOVC_NETWORK] -net.adapter=e1000 Network adapter type -net.address= Network hardware address -vm= Virtual machine [GOVC_VM] ``` ## device.ls ``` Usage: govc device.ls [OPTIONS] List devices for VM. Examples: govc device.ls -vm $name Options: -boot=false List devices configured in the VM's boot options -vm= Virtual machine [GOVC_VM] ``` ## device.remove ``` Usage: govc device.remove [OPTIONS] DEVICE... Remove DEVICE from VM. Examples: govc device.remove -vm $name cdrom-3000 govc device.remove -vm $name -keep disk-1000 Options: -keep=false Keep files in datastore -vm= Virtual machine [GOVC_VM] ``` ## device.scsi.add ``` Usage: govc device.scsi.add [OPTIONS] Add SCSI controller to VM. Examples: govc device.scsi.add -vm $vm govc device.scsi.add -vm $vm -type pvscsi govc device.info -vm $vm {lsi,pv}* Options: -hot=false Enable hot-add/remove -sharing=noSharing SCSI sharing -type=lsilogic SCSI controller type (lsilogic|buslogic|pvscsi|lsilogic-sas) -vm= Virtual machine [GOVC_VM] ``` ## device.serial.add ``` Usage: govc device.serial.add [OPTIONS] Add serial port to VM. Examples: govc device.serial.add -vm $vm govc device.info -vm $vm serialport-* Options: -vm= Virtual machine [GOVC_VM] ``` ## device.serial.connect ``` Usage: govc device.serial.connect [OPTIONS] URI Connect service URI to serial port. If "-" is given as URI, connects file backed device with file name of device name + .log suffix in the VM Config.Files.LogDirectory. Defaults to the first serial port if no DEVICE is given. Examples: govc device.ls | grep serialport- govc device.serial.connect -vm $vm -device serialport-8000 telnet://:33233 govc device.info -vm $vm serialport-* govc device.serial.connect -vm $vm "[datastore1] $vm/console.log" govc device.serial.connect -vm $vm - govc datastore.tail -f $vm/serialport-8000.log Options: -client=false Use client direction -device= serial port device name -vm= Virtual machine [GOVC_VM] -vspc-proxy= vSPC proxy URI ``` ## device.serial.disconnect ``` Usage: govc device.serial.disconnect [OPTIONS] Disconnect service URI from serial port. Examples: govc device.ls | grep serialport- govc device.serial.disconnect -vm $vm -device serialport-8000 govc device.info -vm $vm serialport-* Options: -device= serial port device name -vm= Virtual machine [GOVC_VM] ``` ## device.usb.add ``` Usage: govc device.usb.add [OPTIONS] Add USB device to VM. Examples: govc device.usb.add -vm $vm govc device.usb.add -type xhci -vm $vm govc device.info usb* Options: -auto=true Enable ability to hot plug devices -ehci=true Enable enhanced host controller interface (USB 2.0) -type=usb USB controller type (usb|xhci) -vm= Virtual machine [GOVC_VM] ``` ## dvs.add ``` Usage: govc dvs.add [OPTIONS] HOST... Add hosts to DVS. Examples: govc dvs.add -dvs dvsName -pnic vmnic1 hostA hostB hostC Options: -dvs= DVS path -host= Host system [GOVC_HOST] -pnic=vmnic0 Name of the host physical NIC ``` ## dvs.create ``` Usage: govc dvs.create [OPTIONS] DVS Create DVS (DistributedVirtualSwitch) in datacenter. The dvs is added to the folder specified by the 'folder' flag. If not given, this defaults to the network folder in the specified or default datacenter. Examples: govc dvs.create DSwitch govc dvs.create -product-version 5.5.0 DSwitch Options: -folder= Inventory folder [GOVC_FOLDER] -product-version= DVS product version ``` ## dvs.portgroup.add ``` Usage: govc dvs.portgroup.add [OPTIONS] NAME Add portgroup to DVS. Examples: govc dvs.create DSwitch govc dvs.portgroup.add -dvs DSwitch -type earlyBinding -nports 16 ExternalNetwork govc dvs.portgroup.add -dvs DSwitch -type ephemeral InternalNetwork Options: -dvs= DVS path -nports=128 Number of ports -type=earlyBinding Portgroup type (earlyBinding|lateBinding|ephemeral) -vlan=0 VLAN ID ``` ## dvs.portgroup.change ``` Usage: govc dvs.portgroup.change [OPTIONS] PATH Change DVS portgroup configuration. Examples: govc dvs.portgroup.change -nports 26 ExternalNetwork govc dvs.portgroup.change -vlan 3214 ExternalNetwork Options: -nports=0 Number of ports -type=earlyBinding Portgroup type (earlyBinding|lateBinding|ephemeral) -vlan=0 VLAN ID ``` ## dvs.portgroup.info ``` Usage: govc dvs.portgroup.info [OPTIONS] DVS Portgroup info for DVS. Examples: govc dvs.portgroup.info DSwitch govc find / -type DistributedVirtualSwitch | xargs -n1 govc dvs.portgroup.info Options: -active=false Filter by port active or inactive status -connected=false Filter by port connected or disconnected status -count=0 Number of matches to return (0 = unlimited) -inside=true Filter by port inside or outside status -pg= Distributed Virtual Portgroup -uplinkPort=false Filter for uplink ports -vlan=0 Filter by VLAN ID (0 = unfiltered) ``` ## env ``` Usage: govc env [OPTIONS] Output the environment variables for this client. If credentials are included in the url, they are split into separate variables. Useful as bash scripting helper to parse GOVC_URL. Options: -x=false Output variables for each GOVC_URL component ``` ## events ``` Usage: govc events [OPTIONS] [PATH]... Display events. Examples: govc events vm/my-vm1 vm/my-vm2 govc events /dc1/vm/* /dc2/vm/* govc ls -t HostSystem host/* | xargs govc events | grep -i vsan Options: -f=false Follow event stream -force=false Disable number objects to monitor limit -n=25 Output the last N events ``` ## extension.info ``` Usage: govc extension.info [OPTIONS] [KEY]... Options: ``` ## extension.register ``` Usage: govc extension.register [OPTIONS] Options: -update=false Update extension ``` ## extension.setcert ``` Usage: govc extension.setcert [OPTIONS] ID Set certificate for the extension ID. The '-cert-pem' option can be one of the following: '-' : Read the certificate from stdin '+' : Generate a new key pair and save locally to ID.crt and ID.key ... : Any other value is passed as-is to ExtensionManager.SetCertificate Options: -cert-pem=- PEM encoded certificate -org=VMware Organization for generated certificate ``` ## extension.unregister ``` Usage: govc extension.unregister [OPTIONS] Options: ``` ## fields.add ``` Usage: govc fields.add [OPTIONS] NAME Options: ``` ## fields.ls ``` Usage: govc fields.ls [OPTIONS] Options: ``` ## fields.rename ``` Usage: govc fields.rename [OPTIONS] KEY NAME Options: ``` ## fields.rm ``` Usage: govc fields.rm [OPTIONS] KEY... Options: ``` ## fields.set ``` Usage: govc fields.set [OPTIONS] KEY VALUE PATH... Options: ``` ## find ``` Usage: govc find [OPTIONS] [ROOT] [KEY VAL]... Find managed objects. ROOT can be an inventory path or ManagedObjectReference. ROOT defaults to '.', an alias for the root folder or DC if set. Optional KEY VAL pairs can be used to filter results against object instance properties. The '-type' flag value can be a managed entity type or one of the following aliases: a VirtualApp c ClusterComputeResource d Datacenter f Folder g DistributedVirtualPortgroup h HostSystem m VirtualMachine n Network o OpaqueNetwork p ResourcePool r ComputeResource s Datastore w DistributedVirtualSwitch Examples: govc find govc find /dc1 -type c govc find vm -name my-vm-* govc find . -type n govc find . -type m -runtime.powerState poweredOn govc find . -type m -datastore $(govc find -i datastore -name vsanDatastore) govc find . -type s -summary.type vsan govc find . -type h -hardware.cpuInfo.numCpuCores 16 Options: -i=false Print the managed object reference -maxdepth=-1 Max depth -name=* Resource name -type=[] Resource type ``` ## firewall.ruleset.find ``` Usage: govc firewall.ruleset.find [OPTIONS] Find firewall rulesets matching the given rule. For a complete list of rulesets: govc host.esxcli network firewall ruleset list For a complete list of rules: govc host.esxcli network firewall ruleset rule list Examples: govc firewall.ruleset.find -direction inbound -port 22 govc firewall.ruleset.find -direction outbound -port 2377 Options: -c=true Check if esx firewall is enabled -direction=outbound Direction -enabled=true Find enabled rule sets if true, disabled if false -host= Host system [GOVC_HOST] -port=0 Port -proto=tcp Protocol -type=dst Port type ``` ## folder.create ``` Usage: govc folder.create [OPTIONS] PATH... Create folder with PATH. Examples: govc folder.create /dc1/vm/folder-foo govc object.mv /dc1/vm/vm-foo-* /dc1/vm/folder-foo govc folder.create -pod /dc1/datastore/sdrs govc object.mv /dc1/datastore/iscsi-* /dc1/datastore/sdrs Options: -pod=false Create folder(s) of type StoragePod (DatastoreCluster) ``` ## folder.info ``` Usage: govc folder.info [OPTIONS] [PATH]... Options: ``` ## guest.chmod ``` Usage: govc guest.chmod [OPTIONS] MODE FILE Change FILE MODE on VM. Examples: govc guest.chmod -vm $name 0644 /var/log/foo.log Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.chown ``` Usage: govc guest.chown [OPTIONS] UID[:GID] FILE Change FILE UID and GID on VM. Examples: govc guest.chown -vm $name UID[:GID] /var/log/foo.log Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.download ``` Usage: govc guest.download [OPTIONS] SOURCE DEST Copy SOURCE from the guest VM to DEST on the local system. If DEST name is "-", source is written to stdout. Examples: govc guest.download -l user:pass -vm=my-vm /var/log/my.log ./local.log govc guest.download -l user:pass -vm=my-vm /etc/motd - Options: -f=false If set, the local destination file is clobbered -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.getenv ``` Usage: govc guest.getenv [OPTIONS] [NAME]... Read NAME environment variables from VM. Examples: govc guest.getenv -vm $name govc guest.getenv -vm $name HOME Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.kill ``` Usage: govc guest.kill [OPTIONS] Kill process ID on VM. Examples: govc guest.kill -vm $name -p 12345 Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -p=[] Process ID -vm= Virtual machine [GOVC_VM] ``` ## guest.ls ``` Usage: govc guest.ls [OPTIONS] PATH List PATH files in VM. Examples: govc guest.ls -vm $name /tmp Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -s=false Simple path only listing -vm= Virtual machine [GOVC_VM] ``` ## guest.mkdir ``` Usage: govc guest.mkdir [OPTIONS] PATH Create directory PATH in VM. Examples: govc guest.mkdir -vm $name /tmp/logs govc guest.mkdir -vm $name -p /tmp/logs/foo/bar Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -p=false Create intermediate directories as needed -vm= Virtual machine [GOVC_VM] ``` ## guest.mktemp ``` Usage: govc guest.mktemp [OPTIONS] Create a temporary file or directory in VM. Examples: govc guest.mktemp -vm $name govc guest.mktemp -vm $name -d govc guest.mktemp -vm $name -t myprefix govc guest.mktemp -vm $name -p /var/tmp/$USER Options: -d=false Make a directory instead of a file -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -p= If specified, create relative to this directory -s= Suffix -t= Prefix -vm= Virtual machine [GOVC_VM] ``` ## guest.mv ``` Usage: govc guest.mv [OPTIONS] SOURCE DEST Move (rename) files in VM. Examples: govc guest.mv -vm $name /tmp/foo.sh /tmp/bar.sh govc guest.mv -vm $name -n /tmp/baz.sh /tmp/bar.sh Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -n=false Do not overwrite an existing file -vm= Virtual machine [GOVC_VM] ``` ## guest.ps ``` Usage: govc guest.ps [OPTIONS] List processes in VM. By default, unless the '-e', '-p' or '-U' flag is specified, only processes owned by the '-l' flag user are displayed. The '-x' and '-X' flags only apply to processes started by vmware-tools, such as those started with the govc guest.start command. Examples: govc guest.ps -vm $name govc guest.ps -vm $name -e govc guest.ps -vm $name -p 12345 govc guest.ps -vm $name -U root Options: -U= Select by process UID -X=false Wait for process to exit -e=false Select all processes -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -p=[] Select by process ID -vm= Virtual machine [GOVC_VM] -x=false Output exit time and code ``` ## guest.rm ``` Usage: govc guest.rm [OPTIONS] PATH Remove file PATH in VM. Examples: govc guest.rm -vm $name /tmp/foo.log Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.rmdir ``` Usage: govc guest.rmdir [OPTIONS] PATH Remove directory PATH in VM. Examples: govc guest.rmdir -vm $name /tmp/empty-dir govc guest.rmdir -vm $name -r /tmp/non-empty-dir Options: -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -r=false Recursive removal -vm= Virtual machine [GOVC_VM] ``` ## guest.start ``` Usage: govc guest.start [OPTIONS] PATH [ARG]... Start program in VM. The process can have its status queried with govc guest.ps. When the process completes, its exit code and end time will be available for 5 minutes after completion. Examples: govc guest.start -vm $name /bin/mount /dev/hdb1 /data pid=$(govc guest.start -vm $name /bin/long-running-thing) govc guest.ps -vm $name -p $pid -X Options: -C= The absolute path of the working directory for the program to start -e=[] Set environment variable (key=val) -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.touch ``` Usage: govc guest.touch [OPTIONS] FILE Change FILE times on VM. Examples: govc guest.touch -vm $name /var/log/foo.log govc guest.touch -vm $name -d "$(date -d '1 day ago')" /var/log/foo.log Options: -a=false Change only the access time -c=false Do not create any files -d= Use DATE instead of current time -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -vm= Virtual machine [GOVC_VM] ``` ## guest.upload ``` Usage: govc guest.upload [OPTIONS] SOURCE DEST Copy SOURCE from the local system to DEST in the guest VM. If SOURCE name is "-", read source from stdin. Examples: govc guest.upload -l user:pass -vm=my-vm ~/.ssh/id_rsa.pub /home/$USER/.ssh/authorized_keys cowsay "have a great day" | govc guest.upload -l user:pass -vm=my-vm - /etc/motd Options: -f=false If set, the guest destination file is clobbered -gid= Group ID -l=: Guest VM credentials [GOVC_GUEST_LOGIN] -perm=0 File permissions -uid= User ID -vm= Virtual machine [GOVC_VM] ``` ## host.account.create ``` Usage: govc host.account.create [OPTIONS] Create local account on HOST. Examples: govc host.account.create -id $USER -password password-for-esx60 Options: -description= The description of the specified account -host= Host system [GOVC_HOST] -id= The ID of the specified account -password= The password for the specified account id ``` ## host.account.remove ``` Usage: govc host.account.remove [OPTIONS] Remove local account on HOST. Examples: govc host.account.remove -id $USER Options: -description= The description of the specified account -host= Host system [GOVC_HOST] -id= The ID of the specified account -password= The password for the specified account id ``` ## host.account.update ``` Usage: govc host.account.update [OPTIONS] Update local account on HOST. Examples: govc host.account.update -id root -password password-for-esx60 Options: -description= The description of the specified account -host= Host system [GOVC_HOST] -id= The ID of the specified account -password= The password for the specified account id ``` ## host.add ``` Usage: govc host.add [OPTIONS] Add host to datacenter. The host is added to the folder specified by the 'folder' flag. If not given, this defaults to the host folder in the specified or default datacenter. Examples: thumbprint=$(govc about.cert -k -u host.example.com -thumbprint | awk '{print $2}') govc host.add -hostname host.example.com -username root -password pass -thumbprint $thumbprint govc host.add -hostname 10.0.6.1 -username root -password pass -noverify Options: -connect=true Immediately connect to host -folder= Inventory folder [GOVC_FOLDER] -force=false Force when host is managed by another VC -hostname= Hostname or IP address of the host -noverify=false Accept host thumbprint without verification -password= Password of administration account on the host -thumbprint= SHA-1 thumbprint of the host's SSL certificate -username= Username of administration account on the host ``` ## host.autostart.add ``` Usage: govc host.autostart.add [OPTIONS] VM... Options: -host= Host system [GOVC_HOST] -start-action=powerOn Start Action -start-delay=-1 Start Delay -start-order=-1 Start Order -stop-action=systemDefault Stop Action -stop-delay=-1 Stop Delay -wait=systemDefault Wait for Hearbeat Setting (systemDefault|yes|no) ``` ## host.autostart.configure ``` Usage: govc host.autostart.configure [OPTIONS] Options: -enabled= -host= Host system [GOVC_HOST] -start-delay=0 -stop-action= -stop-delay=0 -wait-for-heartbeat= ``` ## host.autostart.info ``` Usage: govc host.autostart.info [OPTIONS] Options: -host= Host system [GOVC_HOST] ``` ## host.autostart.remove ``` Usage: govc host.autostart.remove [OPTIONS] VM... Options: -host= Host system [GOVC_HOST] ``` ## host.cert.csr ``` Usage: govc host.cert.csr [OPTIONS] Generate a certificate-signing request (CSR) for HOST. Options: -host= Host system [GOVC_HOST] -ip=false Use IP address as CN ``` ## host.cert.import ``` Usage: govc host.cert.import [OPTIONS] FILE Install SSL certificate FILE on HOST. If FILE name is "-", read certificate from stdin. Options: -host= Host system [GOVC_HOST] ``` ## host.cert.info ``` Usage: govc host.cert.info [OPTIONS] Display SSL certificate info for HOST. Options: -host= Host system [GOVC_HOST] ``` ## host.date.change ``` Usage: govc host.date.change [OPTIONS] Change date and time for HOST. Examples: govc host.date.change -date "$(date -u)" govc host.date.change -server time.vmware.com govc host.service enable ntpd govc host.service start ntpd Options: -date= Update the date/time on the host -host= Host system [GOVC_HOST] -server= IP or FQDN for NTP server(s) -tz= Change timezone of the host ``` ## host.date.info ``` Usage: govc host.date.info [OPTIONS] Display date and time info for HOST. Options: -host= Host system [GOVC_HOST] ``` ## host.disconnect ``` Usage: govc host.disconnect [OPTIONS] Disconnect HOST from vCenter. Options: -host= Host system [GOVC_HOST] ``` ## host.esxcli ``` Usage: govc host.esxcli [OPTIONS] COMMAND [ARG]... Invoke esxcli command on HOST. Output is rendered in table form when possible, unless disabled with '-hints=false'. Examples: govc host.esxcli network ip connection list govc host.esxcli system settings advanced set -o /Net/GuestIPHack -i 1 govc host.esxcli network firewall ruleset set -r remoteSerialPort -e true govc host.esxcli network firewall set -e false Options: -hints=true Use command info hints when formatting output -host= Host system [GOVC_HOST] ``` ## host.info ``` Usage: govc host.info [OPTIONS] Options: -host= Host system [GOVC_HOST] ``` ## host.maintenance.enter ``` Usage: govc host.maintenance.enter [OPTIONS] HOST... Put HOST in maintenance mode. While this task is running and when the host is in maintenance mode, no VMs can be powered on and no provisioning operations can be performed on the host. Options: -evacuate=false Evacuate powered off VMs -host= Host system [GOVC_HOST] -timeout=0 Timeout ``` ## host.maintenance.exit ``` Usage: govc host.maintenance.exit [OPTIONS] HOST... Take HOST out of maintenance mode. This blocks if any concurrent running maintenance-only host configurations operations are being performed. For example, if VMFS volumes are being upgraded. The 'timeout' flag is the number of seconds to wait for the exit maintenance mode to succeed. If the timeout is less than or equal to zero, there is no timeout. Options: -host= Host system [GOVC_HOST] -timeout=0 Timeout ``` ## host.option.ls ``` Usage: govc host.option.ls [OPTIONS] [NAME] List option with the given NAME. If NAME ends with a dot, all options for that subtree are listed. Examples: govc host.option.ls govc host.option.ls Config.HostAgent. govc host.option.ls Config.HostAgent.plugins.solo.enableMob Options: -host= Host system [GOVC_HOST] ``` ## host.option.set ``` Usage: govc host.option.set [OPTIONS] NAME VALUE Set option NAME to VALUE. Examples: govc host.option.set Config.HostAgent.plugins.solo.enableMob true govc host.option.set Config.HostAgent.log.level verbose Options: -host= Host system [GOVC_HOST] ``` ## host.portgroup.add ``` Usage: govc host.portgroup.add [OPTIONS] NAME Add portgroup to HOST. Examples: govc host.portgroup.add -vswitch vSwitch0 -vlan 3201 bridge Options: -host= Host system [GOVC_HOST] -vlan=0 VLAN ID -vswitch= vSwitch Name ``` ## host.portgroup.change ``` Usage: govc host.portgroup.change [OPTIONS] NAME Change configuration of HOST portgroup NAME. Examples: govc host.portgroup.change -allow-promiscuous -forged-transmits -mac-changes "VM Network" govc host.portgroup.change -vswitch-name vSwitch1 "Management Network" Options: -allow-promiscuous= Allow promiscuous mode -forged-transmits= Allow forged transmits -host= Host system [GOVC_HOST] -mac-changes= Allow MAC changes -name= Portgroup name -vlan-id=-1 VLAN ID -vswitch-name= vSwitch name ``` ## host.portgroup.info ``` Usage: govc host.portgroup.info [OPTIONS] Options: -host= Host system [GOVC_HOST] ``` ## host.portgroup.remove ``` Usage: govc host.portgroup.remove [OPTIONS] NAME Remove portgroup from HOST. Examples: govc host.portgroup.remove bridge Options: -host= Host system [GOVC_HOST] ``` ## host.reconnect ``` Usage: govc host.reconnect [OPTIONS] Reconnect HOST to vCenter. This command can also be used to change connection properties (hostname, fingerprint, username, password), without disconnecting the host. Options: -force=false Force when host is managed by another VC -host= Host system [GOVC_HOST] -hostname= Hostname or IP address of the host -noverify=false Accept host thumbprint without verification -password= Password of administration account on the host -sync-state=false Sync state -thumbprint= SHA-1 thumbprint of the host's SSL certificate -username= Username of administration account on the host ``` ## host.remove ``` Usage: govc host.remove [OPTIONS] HOST... Remove HOST from vCenter. Options: -host= Host system [GOVC_HOST] ``` ## host.service ``` Usage: govc host.service [OPTIONS] ACTION ID Apply host service ACTION to service ID. Where ACTION is one of: start, stop, restart, status, enable, disable Examples: govc host.service enable TSM-SSH govc host.service start TSM-SSH Options: -host= Host system [GOVC_HOST] ``` ## host.service.ls ``` Usage: govc host.service.ls [OPTIONS] List HOST services. Options: -host= Host system [GOVC_HOST] ``` ## host.shutdown ``` Usage: govc host.shutdown [OPTIONS] Shutdown HOST. Options: -f=false Force shutdown when host is not in maintenance mode -host= Host system [GOVC_HOST] ``` ## host.storage.info ``` Usage: govc host.storage.info [OPTIONS] Show HOST storage system information. Examples: govc ls -t HostSystem host/* | xargs -n1 govc host.storage.info -unclaimed -host Options: -host= Host system [GOVC_HOST] -rescan=false Rescan for new storage devices -t=lun Type (hba,lun) -unclaimed=false Only show disks that can be used as new VMFS datastores ``` ## host.storage.mark ``` Usage: govc host.storage.mark [OPTIONS] DEVICE_PATH Mark device at DEVICE_PATH. Options: -host= Host system [GOVC_HOST] -local= Mark as local -ssd= Mark as SSD ``` ## host.storage.partition ``` Usage: govc host.storage.partition [OPTIONS] DEVICE_PATH Show partition table for device at DEVICE_PATH. Options: -host= Host system [GOVC_HOST] ``` ## host.vnic.info ``` Usage: govc host.vnic.info [OPTIONS] Options: -host= Host system [GOVC_HOST] ``` ## host.vnic.service ``` Usage: govc host.vnic.service [OPTIONS] SERVICE DEVICE Enable or disable service on a virtual nic device. Where SERVICE is one of: vmotion|faultToleranceLogging|vSphereReplication|vSphereReplicationNFC|management|vsan|vSphereProvisioning Where DEVICE is one of: vmk0|vmk1|... Examples: govc host.vnic.service -host hostname -enable vsan vmk0 govc host.vnic.service -host hostname -enable=false vmotion vmk1 Options: -enable=true Enable service -host= Host system [GOVC_HOST] ``` ## host.vswitch.add ``` Usage: govc host.vswitch.add [OPTIONS] NAME Options: -host= Host system [GOVC_HOST] -mtu=0 MTU -nic= Bridge nic device -ports=128 Number of ports ``` ## host.vswitch.info ``` Usage: govc host.vswitch.info [OPTIONS] Options: -host= Host system [GOVC_HOST] ``` ## host.vswitch.remove ``` Usage: govc host.vswitch.remove [OPTIONS] NAME Options: -host= Host system [GOVC_HOST] ``` ## import.ova ``` Usage: govc import.ova [OPTIONS] PATH_TO_OVA Options: -ds= Datastore [GOVC_DATASTORE] -folder= Path to folder to add the VM to -host= Host system [GOVC_HOST] -name= Name to use for new entity -options= Options spec file path for VM deployment -pool= Resource pool [GOVC_RESOURCE_POOL] ``` ## import.ovf ``` Usage: govc import.ovf [OPTIONS] PATH_TO_OVF Options: -ds= Datastore [GOVC_DATASTORE] -folder= Path to folder to add the VM to -host= Host system [GOVC_HOST] -name= Name to use for new entity -options= Options spec file path for VM deployment -pool= Resource pool [GOVC_RESOURCE_POOL] ``` ## import.spec ``` Usage: govc import.spec [OPTIONS] PATH_TO_OVF_OR_OVA Options: -verbose=false Verbose spec output ``` ## import.vmdk ``` Usage: govc import.vmdk [OPTIONS] PATH_TO_VMDK [REMOTE_DIRECTORY] Options: -ds= Datastore [GOVC_DATASTORE] -force=false Overwrite existing disk -keep=false Keep uploaded disk after import -pool= Resource pool [GOVC_RESOURCE_POOL] -upload=true Upload specified disk ``` ## license.add ``` Usage: govc license.add [OPTIONS] KEY... Options: ``` ## license.assign ``` Usage: govc license.assign [OPTIONS] KEY Options: -host= Host system [GOVC_HOST] -name= Display name -remove=false Remove assignment ``` ## license.assigned.ls ``` Usage: govc license.assigned.ls [OPTIONS] Options: -id= Entity ID ``` ## license.decode ``` Usage: govc license.decode [OPTIONS] KEY... Options: -feature= List licenses with given feature ``` ## license.ls ``` Usage: govc license.ls [OPTIONS] Options: -feature= List licenses with given feature ``` ## license.remove ``` Usage: govc license.remove [OPTIONS] KEY... Options: ``` ## logs ``` Usage: govc logs [OPTIONS] View VPX and ESX logs. The '-log' option defaults to "hostd" when connected directly to a host or when connected to VirtualCenter and a '-host' option is given. Otherwise, the '-log' option defaults to "vpxd:vpxd.log". The '-host' option is ignored when connected directly to a host. See 'govc logs.ls' for other '-log' options. Examples: govc logs -n 1000 -f govc logs -host esx1 govc logs -host esx1 -log vmkernel Options: -f=false Follow log file changes -host= Host system [GOVC_HOST] -log= Log file key -n=25 Output the last N log lines ``` ## logs.download ``` Usage: govc logs.download [OPTIONS] [PATH]... Generate diagnostic bundles. A diagnostic bundle includes log files and other configuration information. Use PATH to include a specific set of hosts to include. Examples: govc logs.download govc logs.download host-a host-b Options: -default=true Specifies if the bundle should include the default server ``` ## logs.ls ``` Usage: govc logs.ls [OPTIONS] List diagnostic log keys. Examples: govc logs.ls govc logs.ls -host host-a Options: -host= Host system [GOVC_HOST] ``` ## ls ``` Usage: govc ls [OPTIONS] [PATH]... List inventory items. Examples: govc ls -l '*' govc ls -t ClusterComputeResource host govc ls -t Datastore host/ClusterA/* | grep -v local | xargs -n1 basename | sort | uniq Options: -L=false Follow managed object references -i=false Print the managed object reference -l=false Long listing format -t= Object type ``` ## metric.change ``` Usage: govc metric.change [OPTIONS] NAME... Change counter NAME levels. Examples: govc metric.change -level 1 net.bytesRx.average net.bytesTx.average Options: -device-level=0 Level for the per device counter -i=0 Interval ID -level=0 Level for the aggregate counter ``` ## metric.info ``` Usage: govc metric.info [OPTIONS] PATH [NAME]... Metric info for NAME. If PATH is a value other than '-', provider summary and instance list are included for the given object type. If NAME is not specified, all available metrics for the given INTERVAL are listed. An object PATH must be provided in this case. Examples: govc metric.info vm/my-vm govc metric.info -i 300 vm/my-vm govc metric.info - cpu.usage.average govc metric.info /dc1/host/cluster cpu.usage.average Options: -i=0 Interval ID ``` ## metric.interval.change ``` Usage: govc metric.interval.change [OPTIONS] Change historical metric intervals. Examples: govc metric.interval.change -i 300 -level 2 govc metric.interval.change -i 86400 -enabled=false Options: -enabled= Enable or disable -i=0 Interval ID -level=0 Level ``` ## metric.interval.info ``` Usage: govc metric.interval.info [OPTIONS] List historical metric intervals. Examples: govc metric.interval.info govc metric.interval.info -i 300 Options: -i=0 Interval ID ``` ## metric.ls ``` Usage: govc metric.ls [OPTIONS] PATH List available metrics for PATH. Examples: govc metric.ls /dc1/host/cluster1 govc metric.ls datastore/* govc metric.ls vm/* | grep mem. | xargs govc metric.sample vm/* Options: -i=0 Interval ID -l=false Long listing format ``` ## metric.reset ``` Usage: govc metric.reset [OPTIONS] NAME... Reset counter NAME to the default level of data collection. Examples: govc metric.reset net.bytesRx.average net.bytesTx.average Options: -i=0 Interval ID ``` ## metric.sample ``` Usage: govc metric.sample [OPTIONS] PATH... NAME... Sample for object PATH of metric NAME. Interval ID defaults to 20 (realtime) if supported, otherwise 300 (5m interval). By default, INSTANCE '*' samples all instances and the aggregate counter. An INSTANCE value of '-' will only sample the aggregate counter. An INSTANCE value other than '*' or '-' will only sample the given instance counter. If PLOT value is set to '-', output a gnuplot script. If non-empty with another value, PLOT will pipe the script to gnuplot for you. The value is also used to set the gnuplot 'terminal' variable, unless the value is that of the DISPLAY env var. Only 1 metric NAME can be specified when the PLOT flag is set. Examples: govc metric.sample host/cluster1/* cpu.usage.average govc metric.sample -plot .png host/cluster1/* cpu.usage.average | xargs open govc metric.sample vm/* net.bytesTx.average net.bytesTx.average govc metric.sample -instance vmnic0 vm/* net.bytesTx.average govc metric.sample -instance - vm/* net.bytesTx.average Options: -d=30 Limit object display name to D chars -i=0 Interval ID -instance=* Instance -n=6 Max number of samples -plot= Plot data using gnuplot -t=false Include sample times ``` ## object.collect ``` Usage: govc object.collect [OPTIONS] [MOID] [PROPERTY]... Collect managed object properties. MOID can be an inventory path or ManagedObjectReference. MOID defaults to '-', an alias for 'ServiceInstance:ServiceInstance'. By default only the current property value(s) are collected. Use the '-n' flag to wait for updates. Examples: govc object.collect - content govc object.collect -s HostSystem:ha-host hardware.systemInfo.uuid govc object.collect -s /ha-datacenter/vm/foo overallStatus govc object.collect -json -n=-1 EventManager:ha-eventmgr latestEvent | jq . govc object.collect -json -s $(govc object.collect -s - content.perfManager) description.counterType | jq . Options: -n=0 Wait for N property updates -s=false Output property value only ``` ## object.destroy ``` Usage: govc object.destroy [OPTIONS] PATH... Destroy managed objects. Examples: govc object.destroy /dc1/network/dvs /dc1/host/cluster Options: ``` ## object.method ``` Usage: govc object.method [OPTIONS] PATH... Enable or disable methods for managed objects. Examples: govc object.method -name Destroy_Task -enable=false /dc1/vm/foo govc object.collect /dc1/vm/foo disabledMethod | grep --color Destroy_Task govc object.method -name Destroy_Task -enable /dc1/vm/foo Options: -enable=true Enable method -name= Method name -reason= Reason for disabling method -source=govc Source ID ``` ## object.mv ``` Usage: govc object.mv [OPTIONS] PATH... FOLDER Move managed entities to FOLDER. Examples: govc folder.create /dc1/host/example govc object.mv /dc2/host/*.example.com /dc1/host/example Options: ``` ## object.reload ``` Usage: govc object.reload [OPTIONS] PATH... Reload managed object state. Examples: govc datastore.upload $vm.vmx $vm/$vm.vmx govc object.reload /dc1/vm/$vm Options: ``` ## object.rename ``` Usage: govc object.rename [OPTIONS] PATH NAME Rename managed objects. Examples: govc object.rename /dc1/network/dvs1 Switch1 Options: ``` ## option.ls ``` Usage: govc option.ls [OPTIONS] [NAME] List option with the given NAME. If NAME ends with a dot, all options for that subtree are listed. Examples: govc option.ls govc option.ls config.vpxd.sso. govc option.ls config.vpxd.sso.sts.uri Options: ``` ## option.set ``` Usage: govc option.set [OPTIONS] NAME VALUE Set option NAME to VALUE. Examples: govc option.set log.level info govc option.set logger.Vsan verbose Options: ``` ## permissions.ls ``` Usage: govc permissions.ls [OPTIONS] [PATH]... List the permissions defined on or effective on managed entities. Examples: govc permissions.ls govc permissions.ls /dc1/host/cluster1 Options: -a=true Include inherited permissions defined by parent entities -i=false Use moref instead of inventory path ``` ## permissions.remove ``` Usage: govc permissions.remove [OPTIONS] [PATH]... Removes a permission rule from managed entities. Examples: govc permissions.remove -principal root govc permissions.remove -principal $USER@vsphere.local -role Admin /dc1/host/cluster1 Options: -group=false True, if principal refers to a group name; false, for a user name -i=false Use moref instead of inventory path -principal= User or group for which the permission is defined ``` ## permissions.set ``` Usage: govc permissions.set [OPTIONS] [PATH]... Set the permissions managed entities. Examples: govc permissions.set -principal root -role Admin govc permissions.set -principal $USER@vsphere.local -role Admin /dc1/host/cluster1 Options: -group=false True, if principal refers to a group name; false, for a user name -i=false Use moref instead of inventory path -principal= User or group for which the permission is defined -propagate=true Whether or not this permission propagates down the hierarchy to sub-entities -role=Admin Permission role name ``` ## pool.change ``` Usage: govc pool.change [OPTIONS] POOL... Change the configuration of one or more resource POOLs. POOL may be an absolute or relative path to a resource pool or a (clustered) compute host. If it resolves to a compute host, the associated root resource pool is returned. If a relative path is specified, it is resolved with respect to the current datacenter's "host" folder (i.e. /ha-datacenter/host). Paths to nested resource pools must traverse through the root resource pool of the selected compute host, i.e. "compute-host/Resources/nested-pool". The same globbing rules that apply to the "ls" command apply here. For example, POOL may be specified as "*/Resources/*" to expand to all resource pools that are nested one level under the root resource pool, on all (clustered) compute hosts in the current datacenter. Options: -cpu.expandable= CPU expandable reservation -cpu.limit=0 CPU limit in MHz -cpu.reservation=0 CPU reservation in MHz -cpu.shares= CPU shares level or number -mem.expandable= Memory expandable reservation -mem.limit=0 Memory limit in MB -mem.reservation=0 Memory reservation in MB -mem.shares= Memory shares level or number -name= Resource pool name ``` ## pool.create ``` Usage: govc pool.create [OPTIONS] POOL... Create one or more resource POOLs. POOL may be an absolute or relative path to a resource pool. The parent of the specified POOL must be an existing resource pool. If a relative path is specified, it is resolved with respect to the current datacenter's "host" folder (i.e. /ha-datacenter/host). The basename of the specified POOL is used as the name for the new resource pool. The same globbing rules that apply to the "ls" command apply here. For example, the path to the parent resource pool in POOL may be specified as "*/Resources" to expand to the root resource pools on all (clustered) compute hosts in the current datacenter. For example: */Resources/test Create resource pool "test" on all (clustered) compute hosts in the current datacenter. somehost/Resources/*/nested Create resource pool "nested" in every resource pool that is a direct descendant of the root resource pool on "somehost". Options: -cpu.expandable=true CPU expandable reservation -cpu.limit=0 CPU limit in MHz -cpu.reservation=0 CPU reservation in MHz -cpu.shares=normal CPU shares level or number -mem.expandable=true Memory expandable reservation -mem.limit=0 Memory limit in MB -mem.reservation=0 Memory reservation in MB -mem.shares=normal Memory shares level or number ``` ## pool.destroy ``` Usage: govc pool.destroy [OPTIONS] POOL... Destroy one or more resource POOLs. POOL may be an absolute or relative path to a resource pool or a (clustered) compute host. If it resolves to a compute host, the associated root resource pool is returned. If a relative path is specified, it is resolved with respect to the current datacenter's "host" folder (i.e. /ha-datacenter/host). Paths to nested resource pools must traverse through the root resource pool of the selected compute host, i.e. "compute-host/Resources/nested-pool". The same globbing rules that apply to the "ls" command apply here. For example, POOL may be specified as "*/Resources/*" to expand to all resource pools that are nested one level under the root resource pool, on all (clustered) compute hosts in the current datacenter. Options: -children=false Remove all children pools ``` ## pool.info ``` Usage: govc pool.info [OPTIONS] POOL... Retrieve information about one or more resource POOLs. POOL may be an absolute or relative path to a resource pool or a (clustered) compute host. If it resolves to a compute host, the associated root resource pool is returned. If a relative path is specified, it is resolved with respect to the current datacenter's "host" folder (i.e. /ha-datacenter/host). Paths to nested resource pools must traverse through the root resource pool of the selected compute host, i.e. "compute-host/Resources/nested-pool". The same globbing rules that apply to the "ls" command apply here. For example, POOL may be specified as "*/Resources/*" to expand to all resource pools that are nested one level under the root resource pool, on all (clustered) compute hosts in the current datacenter. Options: -a=false List virtual app resource pools -p=true List resource pools ``` ## role.create ``` Usage: govc role.create [OPTIONS] NAME [PRIVILEGE]... Create authorization role. Optionally populate the role with the given PRIVILEGE(s). Examples: govc role.create MyRole govc role.create NoDC $(govc role.ls Admin | grep -v Datacenter.) Options: -i=false Use moref instead of inventory path ``` ## role.ls ``` Usage: govc role.ls [OPTIONS] [NAME] List authorization roles. If NAME is provided, list privileges for the role. Examples: govc role.ls govc role.ls Admin Options: -i=false Use moref instead of inventory path ``` ## role.remove ``` Usage: govc role.remove [OPTIONS] NAME Remove authorization role. Examples: govc role.remove MyRole govc role.remove MyRole -force Options: -force=false Force removal if role is in use -i=false Use moref instead of inventory path ``` ## role.update ``` Usage: govc role.update [OPTIONS] NAME [PRIVILEGE]... Update authorization role. Set, Add or Remove role PRIVILEGE(s). Examples: govc role.update MyRole $(govc role.ls Admin | grep VirtualMachine.) govc role.update -r MyRole $(govc role.ls Admin | grep VirtualMachine.GuestOperations.) govc role.update -a MyRole $(govc role.ls Admin | grep Datastore.) govc role.update -name RockNRole MyRole Options: -a=false Add given PRIVILEGE(s) -i=false Use moref instead of inventory path -name= Change role name -r=false Remove given PRIVILEGE(s) ``` ## role.usage ``` Usage: govc role.usage [OPTIONS] NAME... List usage for role NAME. Examples: govc role.usage govc role.usage Admin Options: -i=false Use moref instead of inventory path ``` ## session.ls ``` Usage: govc session.ls [OPTIONS] List active sessions. Examples: govc session.ls govc session.ls -json | jq -r .CurrentSession.Key Options: ``` ## session.rm ``` Usage: govc session.rm [OPTIONS] KEY... Remove active sessions. Examples: govc session.ls | grep root govc session.rm 5279e245-e6f1-4533-4455-eb94353b213a Options: ``` ## snapshot.create ``` Usage: govc snapshot.create [OPTIONS] NAME Create snapshot of VM with NAME. Examples: govc snapshot.create -vm my-vm happy-vm-state Options: -d= Snapshot description -m=true Include memory state -q=false Quiesce guest file system -vm= Virtual machine [GOVC_VM] ``` ## snapshot.remove ``` Usage: govc snapshot.remove [OPTIONS] NAME Remove snapshot of VM with given NAME. NAME can be the snapshot name, tree path, moid or '*' to remove all snapshots. Examples: govc snapshot.remove -vm my-vm happy-vm-state Options: -c=true Consolidate disks -r=false Remove snapshot children -vm= Virtual machine [GOVC_VM] ``` ## snapshot.revert ``` Usage: govc snapshot.revert [OPTIONS] [NAME] Revert to snapshot of VM with given NAME. If NAME is not provided, revert to the current snapshot. Otherwise, NAME can be the snapshot name, tree path or moid. Examples: govc snapshot.revert -vm my-vm happy-vm-state Options: -s=false Suppress power on -vm= Virtual machine [GOVC_VM] ``` ## snapshot.tree ``` Usage: govc snapshot.tree [OPTIONS] List VM snapshots in a tree-like format. The command will exit 0 with no output if VM does not have any snapshots. Examples: govc snapshot.tree -vm my-vm govc snapshot.tree -vm my-vm -D -i Options: -D=false Print the snapshot creation date -c=true Print the current snapshot -f=false Print the full path prefix for snapshot -i=false Print the snapshot id -vm= Virtual machine [GOVC_VM] ``` ## vapp.destroy ``` Usage: govc vapp.destroy [OPTIONS] VAPP... Options: ``` ## vapp.power ``` Usage: govc vapp.power [OPTIONS] Options: -force=false Force (If force is false, the shutdown order in the vApp is executed. If force is true, all virtual machines are powered-off (regardless of shutdown order)) -off=false Power off -on=false Power on -suspend=false Power suspend -vapp.ipath= Find vapp by inventory path ``` ## version ``` Usage: govc version [OPTIONS] Options: -require= Require govc version >= this value ``` ## vm.change ``` Usage: govc vm.change [OPTIONS] Change VM configuration. To add ExtraConfig variables that can read within the guest, use the 'guestinfo.' prefix. Examples: govc vm.change -vm $vm -e smc.present=TRUE -e ich7m.present=TRUE govc vm.change -vm $vm -e guestinfo.vmname $vm # Read the variable set above inside the guest: vmware-rpctool "info-get guestinfo.vmname" Options: -c=0 Number of CPUs -e=[] ExtraConfig. = -g= Guest OS -m=0 Size in MB of memory -name= Display name -nested-hv-enabled= Enable nested hardware-assisted virtualization -sync-time-with-host= Enable SyncTimeWithHost -vm= Virtual machine [GOVC_VM] ``` ## vm.clone ``` Usage: govc vm.clone [OPTIONS] NAME Clone VM to NAME. Examples: govc vm.clone -vm template-vm new-vm Options: -annotation= VM description -c=0 Number of CPUs -customization= Customization Specification Name -datastore-cluster= Datastore cluster [GOVC_DATASTORE_CLUSTER] -ds= Datastore [GOVC_DATASTORE] -folder= Inventory folder [GOVC_FOLDER] -force=false Create VM if vmx already exists -host= Host system [GOVC_HOST] -m=0 Size in MB of memory -net= Network [GOVC_NETWORK] -net.adapter=e1000 Network adapter type -net.address= Network hardware address -on=true Power on VM -pool= Resource pool [GOVC_RESOURCE_POOL] -template=false Create a Template -vm= Virtual machine [GOVC_VM] -waitip=false Wait for VM to acquire IP address ``` ## vm.create ``` Usage: govc vm.create [OPTIONS] Options: -annotation= VM description -c=1 Number of CPUs -datastore-cluster= Datastore cluster [GOVC_DATASTORE_CLUSTER] -disk= Disk path (to use existing) OR size (to create new, e.g. 20GB) -disk-datastore= Datastore for disk file -disk.controller=scsi Disk controller type -ds= Datastore [GOVC_DATASTORE] -folder= Inventory folder [GOVC_FOLDER] -force=false Create VM if vmx already exists -g=otherGuest Guest OS -host= Host system [GOVC_HOST] -iso= ISO path -iso-datastore= Datastore for ISO file -link=true Link specified disk -m=1024 Size in MB of memory -net= Network [GOVC_NETWORK] -net.adapter=e1000 Network adapter type -net.address= Network hardware address -on=true Power on VM. Default is true if -disk argument is given. -pool= Resource pool [GOVC_RESOURCE_POOL] ``` ## vm.destroy ``` Usage: govc vm.destroy [OPTIONS] Options: ``` ## vm.disk.attach ``` Usage: govc vm.disk.attach [OPTIONS] Options: -controller= Disk controller -disk= Disk path name -ds= Datastore [GOVC_DATASTORE] -link=true Link specified disk -persist=true Persist attached disk -vm= Virtual machine [GOVC_VM] ``` ## vm.disk.change ``` Usage: govc vm.disk.change [OPTIONS] Change some properties of a VM's DISK In particular, you can change the DISK mode, and the size (as long as it is bigger) Examples: govc vm.disk.change -vm VM -disk.key 2001 -size 10G govc vm.disk.change -vm VM -disk.label "BDD disk" -size 10G govc vm.disk.change -vm VM -disk.name "hard-1000-0" -size 12G govc vm.disk.change -vm VM -disk.filePath "[DS] VM/VM-1.vmdk" -mode nonpersistent Options: -disk.filePath= Disk file name -disk.key=0 Disk unique key -disk.label= Disk label -disk.name= Disk name -mode= Disk mode (persistent|nonpersistent|undoable|independent_persistent|independent_nonpersistent|append) -size=0B New disk size -vm= Virtual machine [GOVC_VM] ``` ## vm.disk.create ``` Usage: govc vm.disk.create [OPTIONS] Create disk and attach to VM. Examples: govc vm.disk.create -vm $name -name $name/disk1 -size 10G Options: -controller= Disk controller -ds= Datastore [GOVC_DATASTORE] -eager=false Eagerly scrub new disk -mode=persistent Disk mode (persistent|nonpersistent|undoable|independent_persistent|independent_nonpersistent|append) -name= Name for new disk -size=10.0GB Size of new disk -thick=false Thick provision new disk -vm= Virtual machine [GOVC_VM] ``` ## vm.guest.tools ``` Usage: govc vm.guest.tools [OPTIONS] VM... Manage guest tools in VM. Examples: govc vm.guest.tools -mount VM govc vm.guest.tools -unmount VM govc vm.guest.tools -upgrade -options "opt1 opt2" VM Options: -mount=false Mount tools CD installer in the guest -options= Installer options -unmount=false Unmount tools CD installer in the guest -upgrade=false Upgrade tools in the guest ``` ## vm.info ``` Usage: govc vm.info [OPTIONS] Options: -e=false Show ExtraConfig -g=true Show general summary -r=false Show resource summary -t=false Show ToolsConfigInfo -waitip=false Wait for VM to acquire IP address ``` ## vm.ip ``` Usage: govc vm.ip [OPTIONS] VM... List IPs for VM. By default the vm.ip command depends on vmware-tools to report the 'guest.ipAddress' field and will wait until it has done so. This value can also be obtained using: govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.IpAddress When given the '-a' flag, only IP addresses for which there is a corresponding virtual nic are listed. If there are multiple nics, the listed addresses will be comma delimited. The '-a' flag depends on vmware-tools to report the 'guest.net' field and will wait until it has done so for all nics. Note that this list includes IPv6 addresses if any, use '-v4' to filter them out. IP addresses reported by tools for which there is no virtual nic are not included, for example that of the 'docker0' interface. These values can also be obtained using: govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.Net[].IpConfig.IpAddress[].IpAddress When given the '-n' flag, filters '-a' behavior to the nic specified by MAC address or device name. The 'esxcli' flag does not require vmware-tools to be installed, but does require the ESX host to have the /Net/GuestIPHack setting enabled. The 'wait' flag default to 1hr (original default was infinite). If a VM does not obtain an IP within the wait time, the command will still exit with status 0. Examples: govc vm.ip $vm govc vm.ip -wait 5m $vm govc vm.ip -a -v4 $vm govc vm.ip -n 00:0c:29:57:7b:c3 $vm govc vm.ip -n ethernet-0 $vm govc host.esxcli system settings advanced set -o /Net/GuestIPHack -i 1 govc vm.ip -esxcli $vm Options: -a=false Wait for an IP address on all NICs -esxcli=false Use esxcli instead of guest tools -n= Wait for IP address on NIC, specified by device name or MAC -v4=false Only report IPv4 addresses -wait=1h0m0s Wait time for the VM obtain an IP address ``` ## vm.markastemplate ``` Usage: govc vm.markastemplate [OPTIONS] VM... Mark VM as a virtual machine template. Examples: govc vm.markastemplate $name Options: ``` ## vm.markasvm ``` Usage: govc vm.markasvm [OPTIONS] VM... Mark VM template as a virtual machine. Examples: govc vm.markasvm $name -host host1 govc vm.markasvm $name -pool cluster1/Resources Options: -host= Host system [GOVC_HOST] -pool= Resource pool [GOVC_RESOURCE_POOL] ``` ## vm.migrate ``` Usage: govc vm.migrate [OPTIONS] VM... Migrates VM to a specific resource pool, host or datastore. Examples: govc vm.migrate -host another-host vm-1 vm-2 vm-3 govc vm.migrate -ds another-ds vm-1 vm-2 vm-3 Options: -ds= Datastore [GOVC_DATASTORE] -host= Host system [GOVC_HOST] -pool= Resource pool [GOVC_RESOURCE_POOL] -priority=defaultPriority The task priority ``` ## vm.network.add ``` Usage: govc vm.network.add [OPTIONS] Add network adapter to VM. Examples: govc vm.network.add -vm $vm -net "VM Network" -net.adapter e1000e govc device.info -vm $vm ethernet-* Options: -net= Network [GOVC_NETWORK] -net.adapter=e1000 Network adapter type -net.address= Network hardware address -vm= Virtual machine [GOVC_VM] ``` ## vm.network.change ``` Usage: govc vm.network.change [OPTIONS] DEVICE Change network DEVICE configuration. Examples: govc vm.network.change -vm $vm -net PG2 ethernet-0 govc vm.network.change -vm $vm -net.address 00:00:0f:2e:5d:69 ethernet-0 govc device.info -vm $vm ethernet-* Options: -net= Network [GOVC_NETWORK] -net.adapter=e1000 Network adapter type -net.address= Network hardware address -vm= Virtual machine [GOVC_VM] ``` ## vm.power ``` Usage: govc vm.power [OPTIONS] Options: -force=false Force (ignore state error and hard shutdown/reboot if tools unavailable) -off=false Power off -on=false Power on -r=false Reboot guest -reset=false Power reset -s=false Shutdown guest -suspend=false Power suspend ``` ## vm.question ``` Usage: govc vm.question [OPTIONS] Options: -answer= Answer to question -vm= Virtual machine [GOVC_VM] ``` ## vm.rdm.attach ``` Usage: govc vm.rdm.attach [OPTIONS] Attach DEVICE to VM with RDM. Examples: govc vm.rdm.attach -vm VM -device /vmfs/devices/disks/naa.000000000000000000000000000000000 Options: -device= Device Name -vm= Virtual machine [GOVC_VM] ``` ## vm.rdm.ls ``` Usage: govc vm.rdm.ls [OPTIONS] List available devices that could be attach to VM with RDM. Examples: govc vm.rdm.ls -vm VM Options: -vm= Virtual machine [GOVC_VM] ``` ## vm.register ``` Usage: govc vm.register [OPTIONS] VMX Add an existing VM to the inventory. VMX is a path to the vm config file, relative to DATASTORE. Examples: govc vm.register path/name.vmx Options: -as-template=false Mark VM as template -ds= Datastore [GOVC_DATASTORE] -folder= Inventory folder [GOVC_FOLDER] -host= Host system [GOVC_HOST] -name= Name of the VM -pool= Resource pool [GOVC_RESOURCE_POOL] ``` ## vm.unregister ``` Usage: govc vm.unregister [OPTIONS] VM... Remove VM from inventory without removing any of the VM files on disk. Options: ``` ## vm.vnc ``` Usage: govc vm.vnc [OPTIONS] VM... Enable or disable VNC for VM. Port numbers are automatically chosen if not specified. If neither -enable or -disable is specified, the current state is returned. Examples: govc vm.vnc -enable -password 1234 $vm | awk '{print $2}' | xargs open Options: -disable=false Disable VNC -enable=false Enable VNC -password= VNC password -port=-1 VNC port (-1 for auto-select) -port-range=5900-5999 VNC port auto-select range ``` govmomi-0.15.0/govc/about/000077500000000000000000000000001312205533500153215ustar00rootroot00000000000000govmomi-0.15.0/govc/about/cert.go000066400000000000000000000060071312205533500166100ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package about import ( "context" "encoding/pem" "flag" "fmt" "io" "net/http" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/soap" ) type cert struct { *flags.ClientFlag *flags.OutputFlag show bool thumbprint bool } func init() { cli.Register("about.cert", &cert{}) } func (cmd *cert) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.show, "show", false, "Show PEM encoded server certificate only") f.BoolVar(&cmd.thumbprint, "thumbprint", false, "Output host hash and thumbprint only") } func (cmd *cert) Description() string { return `Display TLS certificate info for HOST. If the HOST certificate cannot be verified, about.cert will return with exit code 60 (as curl does). If the '-k' flag is provided, about.cert will return with exit code 0 in this case. The SHA1 thumbprint can also be used as '-thumbprint' for the 'host.add' and 'cluster.add' commands. Examples: govc about.cert -k -json | jq -r .ThumbprintSHA1 govc about.cert -k -show | sudo tee /usr/local/share/ca-certificates/host.crt govc about.cert -k -thumbprint | tee -a ~/.govmomi/known_hosts` } func (cmd *cert) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } type certResult struct { cmd *cert info object.HostCertificateInfo } func (r *certResult) Write(w io.Writer) error { if r.cmd.show { return pem.Encode(w, &pem.Block{Type: "CERTIFICATE", Bytes: r.info.Certificate.Raw}) } if r.cmd.thumbprint { u := r.cmd.URLWithoutPassword() _, err := fmt.Fprintf(w, "%s %s\n", u.Host, r.info.ThumbprintSHA1) return err } return r.cmd.WriteResult(&r.info) } func (cmd *cert) Run(ctx context.Context, f *flag.FlagSet) error { u := cmd.URLWithoutPassword() c := soap.NewClient(u, false) t := c.Client.Transport.(*http.Transport) r := certResult{cmd: cmd} if err := cmd.SetRootCAs(c); err != nil { return err } if err := r.info.FromURL(u, t.TLSClientConfig); err != nil { return err } if r.info.Err != nil && r.cmd.IsSecure() { cmd.Out = os.Stderr // using same exit code as curl: defer os.Exit(60) } return r.Write(cmd.Out) } govmomi-0.15.0/govc/about/command.go000066400000000000000000000051271312205533500172730ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package about import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type about struct { *flags.ClientFlag *flags.OutputFlag Long bool } func init() { cli.Register("about", &about{}) } func (cmd *about) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.Long, "l", false, "Include service content") } func (cmd *about) Description() string { return `Display About info for HOST. System information including the name, type, version, and build number. Examples: govc about govc about -json | jq -r .About.ProductLineId` } func (cmd *about) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *about) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } res := infoResult{ a: &c.ServiceContent.About, } if cmd.Long { res.Content = &c.ServiceContent } else { res.About = res.a } return cmd.WriteResult(&res) } type infoResult struct { Content *types.ServiceContent `json:",omitempty"` About *types.AboutInfo `json:",omitempty"` a *types.AboutInfo } func (r *infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Name:\t%s\n", r.a.Name) fmt.Fprintf(tw, "Vendor:\t%s\n", r.a.Vendor) fmt.Fprintf(tw, "Version:\t%s\n", r.a.Version) fmt.Fprintf(tw, "Build:\t%s\n", r.a.Build) fmt.Fprintf(tw, "OS type:\t%s\n", r.a.OsType) fmt.Fprintf(tw, "API type:\t%s\n", r.a.ApiType) fmt.Fprintf(tw, "API version:\t%s\n", r.a.ApiVersion) fmt.Fprintf(tw, "Product ID:\t%s\n", r.a.ProductLineId) fmt.Fprintf(tw, "UUID:\t%s\n", r.a.InstanceUuid) return tw.Flush() } govmomi-0.15.0/govc/build.sh000077500000000000000000000013371312205533500156510ustar00rootroot00000000000000#!/bin/bash -e git_version=$(git describe) if git_status=$(git status --porcelain 2>/dev/null) && [ -n "${git_status}" ]; then git_version="${git_version}-dirty" fi ldflags="-X github.com/vmware/govmomi/govc/version.gitVersion=${git_version}" BUILD_OS=${BUILD_OS:-darwin linux windows freebsd} BUILD_ARCH=${BUILD_ARCH:-386 amd64} for os in ${BUILD_OS}; do export GOOS="${os}" for arch in ${BUILD_ARCH}; do export GOARCH="${arch}" out="govc_${os}_${arch}" if [ "${os}" == "windows" ]; then out="${out}.exe" fi set -x go build \ -o="${out}" \ -pkgdir="./_pkg" \ -compiler='gc' \ -ldflags="${ldflags}" \ github.com/vmware/govmomi/govc & set +x done done wait govmomi-0.15.0/govc/cli/000077500000000000000000000000001312205533500147565ustar00rootroot00000000000000govmomi-0.15.0/govc/cli/command.go000066400000000000000000000061551312205533500167320ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cli import ( "context" "flag" "fmt" "io" "io/ioutil" "os" "sort" "text/tabwriter" ) type HasFlags interface { // Register may be called more than once and should be idempotent. Register(ctx context.Context, f *flag.FlagSet) // Process may be called more than once and should be idempotent. Process(ctx context.Context) error } type Command interface { HasFlags Run(ctx context.Context, f *flag.FlagSet) error } func generalHelp(w io.Writer) { fmt.Fprintf(w, "Usage of %s:\n", os.Args[0]) cmds := []string{} for name := range commands { cmds = append(cmds, name) } sort.Strings(cmds) for _, name := range cmds { fmt.Fprintf(w, " %s\n", name) } } func commandHelp(w io.Writer, name string, cmd Command, f *flag.FlagSet) { type HasUsage interface { Usage() string } fmt.Fprintf(w, "Usage: %s %s [OPTIONS]", os.Args[0], name) if u, ok := cmd.(HasUsage); ok { fmt.Fprintf(w, " %s", u.Usage()) } fmt.Fprintf(w, "\n") type HasDescription interface { Description() string } if u, ok := cmd.(HasDescription); ok { fmt.Fprintf(w, "\n%s\n", u.Description()) } n := 0 f.VisitAll(func(_ *flag.Flag) { n += 1 }) if n > 0 { fmt.Fprintf(w, "\nOptions:\n") tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) f.VisitAll(func(f *flag.Flag) { fmt.Fprintf(tw, "\t-%s=%s\t%s\n", f.Name, f.DefValue, f.Usage) }) tw.Flush() } } func clientLogout(ctx context.Context, cmd Command) error { type logout interface { Logout(context.Context) error } if l, ok := cmd.(logout); ok { return l.Logout(ctx) } return nil } func Run(args []string) int { hw := os.Stderr rc := 1 hwrc := func(arg string) { if arg == "-h" { hw = os.Stdout rc = 0 } } var err error if len(args) == 0 { generalHelp(hw) return rc } // Look up real command name in aliases table. name, ok := aliases[args[0]] if !ok { name = args[0] } cmd, ok := commands[name] if !ok { hwrc(name) generalHelp(hw) return rc } fs := flag.NewFlagSet("", flag.ContinueOnError) fs.SetOutput(ioutil.Discard) ctx := context.Background() cmd.Register(ctx, fs) if err = fs.Parse(args[1:]); err != nil { goto error } if err = cmd.Process(ctx); err != nil { goto error } if err = cmd.Run(ctx, fs); err != nil { goto error } if err = clientLogout(ctx, cmd); err != nil { goto error } return 0 error: if err == flag.ErrHelp { if len(args) == 2 { hwrc(args[1]) } commandHelp(hw, args[0], cmd, fs) } else { fmt.Fprintf(os.Stderr, "%s: %s\n", os.Args[0], err) } _ = clientLogout(ctx, cmd) return rc } govmomi-0.15.0/govc/cli/register.go000066400000000000000000000015341312205533500171340ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cli var commands = map[string]Command{} var aliases = map[string]string{} func Register(name string, c Command) { commands[name] = c } func Alias(name string, alias string) { aliases[alias] = name } func Commands() map[string]Command { return commands } govmomi-0.15.0/govc/cluster/000077500000000000000000000000001312205533500156705ustar00rootroot00000000000000govmomi-0.15.0/govc/cluster/add.go000066400000000000000000000057211312205533500167540ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cluster import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type add struct { *flags.DatacenterFlag *flags.HostConnectFlag cluster string connect bool license string } func init() { cli.Register("cluster.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx) cmd.HostConnectFlag.Register(ctx, f) f.StringVar(&cmd.cluster, "cluster", "*", "Path to cluster") f.StringVar(&cmd.license, "license", "", "Assign license key") f.BoolVar(&cmd.connect, "connect", true, "Immediately connect to host") } func (cmd *add) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.HostConnectFlag.Process(ctx); err != nil { return err } if cmd.HostName == "" { return flag.ErrHelp } if cmd.UserName == "" { return flag.ErrHelp } if cmd.Password == "" { return flag.ErrHelp } return nil } func (cmd *add) Description() string { return `Add HOST to CLUSTER. The host is added to the cluster specified by the 'cluster' flag. Examples: thumbprint=$(govc about.cert -k -u host.example.com -thumbprint | awk '{print $2}') govc cluster.add -cluster ClusterA -hostname host.example.com -username root -password pass -thumbprint $thumbprint govc cluster.add -cluster ClusterB -hostname 10.0.6.1 -username root -password pass -noverify` } func (cmd *add) Add(ctx context.Context, cluster *object.ClusterComputeResource) error { spec := cmd.HostConnectSpec var license *string if cmd.license != "" { license = &cmd.license } task, err := cluster.AddHost(ctx, cmd.Spec(cluster.Client()), cmd.connect, license, nil) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("adding %s to cluster %s... ", spec.HostName, cluster.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 0 { return flag.ErrHelp } finder, err := cmd.Finder() if err != nil { return err } cluster, err := finder.ClusterComputeResource(ctx, cmd.cluster) if err != nil { return err } return cmd.Fault(cmd.Add(ctx, cluster)) } govmomi-0.15.0/govc/cluster/change.go000066400000000000000000000056141312205533500174520ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cluster import ( "context" "flag" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type change struct { *flags.DatacenterFlag types.ClusterConfigSpecEx } func init() { cli.Register("cluster.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DrsConfig = new(types.ClusterDrsConfigInfo) cmd.DasConfig = new(types.ClusterDasConfigInfo) cmd.VsanConfig = new(types.VsanClusterConfigInfo) cmd.VsanConfig.DefaultConfig = new(types.VsanClusterConfigInfoHostDefaultInfo) // DRS f.Var(flags.NewOptionalBool(&cmd.DrsConfig.Enabled), "drs-enabled", "Enable DRS") drsModes := []string{ string(types.DrsBehaviorManual), string(types.DrsBehaviorPartiallyAutomated), string(types.DrsBehaviorFullyAutomated), } f.StringVar((*string)(&cmd.DrsConfig.DefaultVmBehavior), "drs-mode", "", "DRS behavior for virtual machines: "+strings.Join(drsModes, ", ")) // HA f.Var(flags.NewOptionalBool(&cmd.DasConfig.Enabled), "ha-enabled", "Enable HA") // vSAN f.Var(flags.NewOptionalBool(&cmd.VsanConfig.Enabled), "vsan-enabled", "Enable vSAN") f.Var(flags.NewOptionalBool(&cmd.VsanConfig.DefaultConfig.AutoClaimStorage), "vsan-autoclaim", "Autoclaim storage on cluster hosts") } func (cmd *change) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Usage() string { return "CLUSTER..." } func (cmd *change) Description() string { return `Change configuration of the given clusters. Examples: govc cluster.change -drs-enabled -vsan-enabled -vsan-autoclaim ClusterA govc cluster.change -drs-enabled=false ClusterB` } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { finder, err := cmd.Finder() if err != nil { return err } for _, path := range f.Args() { clusters, err := finder.ClusterComputeResourceList(ctx, path) if err != nil { return err } for _, cluster := range clusters { task, err := cluster.Reconfigure(ctx, &cmd.ClusterConfigSpecEx, true) if err != nil { return err } _, err = task.WaitForResult(ctx, nil) if err != nil { return err } } } return nil } govmomi-0.15.0/govc/cluster/create.go000066400000000000000000000034721312205533500174700ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cluster import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.FolderFlag types.ClusterConfigSpecEx } func init() { cli.Register("cluster.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) } func (cmd *create) Usage() string { return "CLUSTER" } func (cmd *create) Description() string { return `Create CLUSTER in datacenter. The cluster is added to the folder specified by the 'folder' flag. If not given, this defaults to the host folder in the specified or default datacenter. Examples: govc cluster.create ClusterA govc cluster.create -folder /dc2/test-folder ClusterB` } func (cmd *create) Process(ctx context.Context) error { if err := cmd.FolderFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } folder, err := cmd.FolderOrDefault("host") if err != nil { return err } _, err = folder.CreateCluster(ctx, f.Arg(0), cmd.ClusterConfigSpecEx) return err } govmomi-0.15.0/govc/datacenter/000077500000000000000000000000001312205533500163215ustar00rootroot00000000000000govmomi-0.15.0/govc/datacenter/create.go000066400000000000000000000027331312205533500201200ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datacenter import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type create struct { *flags.FolderFlag } func init() { cli.Register("datacenter.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) } func (cmd *create) Usage() string { return "NAME..." } func (cmd *create) Process(ctx context.Context) error { if err := cmd.FolderFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { folder, err := cmd.FolderOrDefault("/") if err != nil { return err } if f.NArg() == 0 { return flag.ErrHelp } for _, name := range f.Args() { _, err := folder.CreateDatacenter(ctx, name) if err != nil { return err } } return nil } govmomi-0.15.0/govc/datacenter/info.go000066400000000000000000000100101312205533500175730ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datacenter import ( "context" "flag" "fmt" "io" "path" "text/tabwriter" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.DatacenterFlag } func init() { cli.Register("datacenter.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "[PATH]..." } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } args := f.Args() if len(args) == 0 { args = []string{"*"} } var props []string res := infoResult{ finder: finder, ctx: ctx, } if !cmd.OutputFlag.JSON { props = []string{ "name", "vmFolder", "hostFolder", "datastoreFolder", "networkFolder", "datastore", "network", } } for _, arg := range args { objects, err := finder.DatacenterList(ctx, arg) if err != nil { return err } res.objects = append(res.objects, objects...) } if len(res.objects) != 0 { refs := make([]types.ManagedObjectReference, 0, len(res.objects)) for _, o := range res.objects { refs = append(refs, o.Reference()) } pc := property.DefaultCollector(c) err = pc.Retrieve(ctx, refs, props, &res.Datacenters) if err != nil { return err } } return cmd.WriteResult(&res) } type infoResult struct { Datacenters []mo.Datacenter objects []*object.Datacenter finder *find.Finder ctx context.Context } func (r *infoResult) Write(w io.Writer) error { // Maintain order via r.objects as Property collector does not always return results in order. objects := make(map[types.ManagedObjectReference]mo.Datacenter, len(r.Datacenters)) for _, o := range r.Datacenters { objects[o.Reference()] = o } tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, o := range r.objects { dc := objects[o.Reference()] fmt.Fprintf(tw, "Name:\t%s\n", dc.Name) fmt.Fprintf(tw, " Path:\t%s\n", o.InventoryPath) folders, err := o.Folders(r.ctx) if err != nil { return err } r.finder.SetDatacenter(o) hosts, _ := r.finder.HostSystemList(r.ctx, path.Join(folders.HostFolder.InventoryPath, "*")) fmt.Fprintf(tw, " Hosts:\t%d\n", len(hosts)) clusters, _ := r.finder.ClusterComputeResourceList(r.ctx, path.Join(folders.HostFolder.InventoryPath, "*")) fmt.Fprintf(tw, " Clusters:\t%d\n", len(clusters)) vms, _ := r.finder.VirtualMachineList(r.ctx, path.Join(folders.VmFolder.InventoryPath, "*")) fmt.Fprintf(tw, " Virtual Machines:\t%d\n", len(vms)) fmt.Fprintf(tw, " Networks:\t%d\n", len(dc.Network)) fmt.Fprintf(tw, " Datastores:\t%d\n", len(dc.Datastore)) } return tw.Flush() } govmomi-0.15.0/govc/datastore/000077500000000000000000000000001312205533500161755ustar00rootroot00000000000000govmomi-0.15.0/govc/datastore/cp.go000066400000000000000000000044111312205533500171260ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "errors" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type cp struct { *flags.OutputFlag *flags.DatastoreFlag force bool } func init() { cli.Register("datastore.cp", &cp{}) } func (cmd *cp) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.force, "f", false, "If true, overwrite any identically named file at the destination") } func (cmd *cp) Process(ctx context.Context) error { if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *cp) Usage() string { return "SRC DST" } func (cmd *cp) Description() string { return `Copy SRC to DST on DATASTORE. Examples: govc datastore.cp foo/foo.vmx foo/foo.vmx.old govc datastore.cp -f my.vmx foo/foo.vmx` } func (cmd *cp) Run(ctx context.Context, f *flag.FlagSet) error { args := f.Args() if len(args) != 2 { return errors.New("SRC and DST arguments are required") } c, err := cmd.Client() if err != nil { return err } dc, err := cmd.Datacenter() if err != nil { return err } // TODO: support cross-datacenter copy src, err := cmd.DatastorePath(args[0]) if err != nil { return err } dst, err := cmd.DatastorePath(args[1]) if err != nil { return err } m := object.NewFileManager(c) task, err := m.CopyDatastoreFile(ctx, src, dc, dst, dc, cmd.force) if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/datastore/create.go000066400000000000000000000170061312205533500177730ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "errors" "flag" "fmt" "os" "path/filepath" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.HostSystemFlag // Generic options Type typeFlag Name string Force bool // Options for NAS RemoteHost string RemotePath string AccessMode string UserName string Password string // Options for VMFS DiskCanonicalName string // Options for local Path string } func init() { cli.Register("datastore.create", &create{}) } var nasTypes = []string{ string(types.HostFileSystemVolumeFileSystemTypeNFS), string(types.HostFileSystemVolumeFileSystemTypeNFS41), string(types.HostFileSystemVolumeFileSystemTypeCIFS), } var vmfsTypes = []string{ string(types.HostFileSystemVolumeFileSystemTypeVMFS), } var localTypes = []string{ "local", } var allTypes = []string{} func init() { allTypes = append(allTypes, nasTypes...) allTypes = append(allTypes, vmfsTypes...) allTypes = append(allTypes, localTypes...) } type typeFlag string func (t *typeFlag) Set(s string) error { s = strings.ToLower(s) for _, e := range allTypes { if s == strings.ToLower(e) { *t = typeFlag(e) return nil } } return fmt.Errorf("unknown type") } func (t *typeFlag) String() string { return string(*t) } func (t *typeFlag) partOf(m []string) bool { for _, e := range m { if t.String() == e { return true } } return false } func (t *typeFlag) IsNasType() bool { return t.partOf(nasTypes) } func (t *typeFlag) IsVmfsType() bool { return t.partOf(vmfsTypes) } func (t *typeFlag) IsLocalType() bool { return t.partOf(localTypes) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) modes := []string{ string(types.HostMountModeReadOnly), string(types.HostMountModeReadWrite), } f.StringVar(&cmd.Name, "name", "", "Datastore name") f.Var(&cmd.Type, "type", fmt.Sprintf("Datastore type (%s)", strings.Join(allTypes, "|"))) f.BoolVar(&cmd.Force, "force", false, "Ignore DuplicateName error if datastore is already mounted on a host") // Options for NAS f.StringVar(&cmd.RemoteHost, "remote-host", "", "Remote hostname of the NAS datastore") f.StringVar(&cmd.RemotePath, "remote-path", "", "Remote path of the NFS mount point") f.StringVar(&cmd.AccessMode, "mode", modes[0], fmt.Sprintf("Access mode for the mount point (%s)", strings.Join(modes, "|"))) f.StringVar(&cmd.UserName, "username", "", "Username to use when connecting (CIFS only)") f.StringVar(&cmd.Password, "password", "", "Password to use when connecting (CIFS only)") // Options for VMFS f.StringVar(&cmd.DiskCanonicalName, "disk", "", "Canonical name of disk (VMFS only)") // Options for Local f.StringVar(&cmd.Path, "path", "", "Local directory path for the datastore (local only)") } func (cmd *create) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Usage() string { return "HOST..." } func (cmd *create) Description() string { return `Create datastore on HOST. Examples: govc datastore.create -type nfs -name nfsDatastore -remote-host 10.143.2.232 -remote-path /share cluster1 govc datastore.create -type vmfs -name vmfsDatastore -disk=mpx.vmhba0:C0:T0:L0 cluster1 govc datastore.create -type local -name localDatastore -path /var/datastore host1` } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } switch { case cmd.Type.IsNasType(): return cmd.CreateNasDatastore(ctx, hosts) case cmd.Type.IsVmfsType(): return cmd.CreateVmfsDatastore(ctx, hosts) case cmd.Type.IsLocalType(): return cmd.CreateLocalDatastore(ctx, hosts) default: return fmt.Errorf("unhandled type %#v", cmd.Type) } } func (cmd *create) GetHostNasVolumeSpec() types.HostNasVolumeSpec { localPath := cmd.Path if localPath == "" { localPath = cmd.Name } s := types.HostNasVolumeSpec{ LocalPath: localPath, Type: cmd.Type.String(), RemoteHost: cmd.RemoteHost, RemotePath: cmd.RemotePath, AccessMode: cmd.AccessMode, UserName: cmd.UserName, Password: cmd.Password, } return s } func (cmd *create) CreateNasDatastore(ctx context.Context, hosts []*object.HostSystem) error { object := types.ManagedObjectReference{ Type: "Datastore", Value: fmt.Sprintf("%s:%s", cmd.RemoteHost, cmd.RemotePath), } spec := cmd.GetHostNasVolumeSpec() for _, host := range hosts { ds, err := host.ConfigManager().DatastoreSystem(ctx) if err != nil { return err } _, err = ds.CreateNasDatastore(ctx, spec) if err != nil { if soap.IsSoapFault(err) { switch fault := soap.ToSoapFault(err).VimFault().(type) { case types.PlatformConfigFault: if len(fault.FaultMessage) != 0 { return errors.New(fault.FaultMessage[0].Message) } case types.DuplicateName: if cmd.Force && fault.Object == object { fmt.Fprintf(os.Stderr, "%s: '%s' already mounted\n", host.InventoryPath, cmd.Name) continue } } } return fmt.Errorf("%s: %s", host.InventoryPath, err) } } return nil } func (cmd *create) CreateVmfsDatastore(ctx context.Context, hosts []*object.HostSystem) error { for _, host := range hosts { ds, err := host.ConfigManager().DatastoreSystem(ctx) if err != nil { return err } // Find the specified disk disks, err := ds.QueryAvailableDisksForVmfs(ctx) if err != nil { return err } var disk *types.HostScsiDisk for _, e := range disks { if e.CanonicalName == cmd.DiskCanonicalName { disk = &e break } } if disk == nil { return fmt.Errorf("no eligible disk found for name %#v", cmd.DiskCanonicalName) } // Query for creation options and pick the right one options, err := ds.QueryVmfsDatastoreCreateOptions(ctx, disk.DevicePath) if err != nil { return err } var option *types.VmfsDatastoreOption for _, e := range options { if _, ok := e.Info.(*types.VmfsDatastoreAllExtentOption); ok { option = &e break } } if option == nil { return fmt.Errorf("cannot use entire disk for datastore for name %#v", cmd.DiskCanonicalName) } spec := *option.Spec.(*types.VmfsDatastoreCreateSpec) spec.Vmfs.VolumeName = cmd.Name _, err = ds.CreateVmfsDatastore(ctx, spec) if err != nil { return err } } return nil } func (cmd *create) CreateLocalDatastore(ctx context.Context, hosts []*object.HostSystem) error { for _, host := range hosts { ds, err := host.ConfigManager().DatastoreSystem(ctx) if err != nil { return err } if cmd.Path == "" { cmd.Path = cmd.Name } if cmd.Name == "" { cmd.Name = filepath.Base(cmd.Path) } _, err = ds.CreateLocalDatastore(ctx, cmd.Name, cmd.Path) if err != nil { return err } } return nil } govmomi-0.15.0/govc/datastore/disk/000077500000000000000000000000001312205533500171275ustar00rootroot00000000000000govmomi-0.15.0/govc/datastore/disk/create.go000066400000000000000000000042551312205533500207270ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package disk import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.DatastoreFlag Bytes units.ByteSize } func init() { cli.Register("datastore.disk.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) _ = cmd.Bytes.Set("10G") f.Var(&cmd.Bytes, "size", "Size of new disk") } func (cmd *create) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Usage() string { return "VMDK" } func (cmd *create) Description() string { return `Create VMDK on DS. Examples: govc datastore.mkdir disks govc datastore.disk.create -size 24G disks/disk1.vmdk` } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } dc, err := cmd.Datacenter() if err != nil { return err } ds, err := cmd.Datastore() if err != nil { return err } m := object.NewVirtualDiskManager(ds.Client()) spec := &types.FileBackedVirtualDiskSpec{ VirtualDiskSpec: types.VirtualDiskSpec{ AdapterType: string(types.VirtualDiskAdapterTypeLsiLogic), DiskType: string(types.VirtualDiskTypeThin), }, CapacityKb: int64(cmd.Bytes) / 1024, } task, err := m.CreateVirtualDisk(ctx, ds.Path(f.Arg(0)), dc, spec) if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/datastore/disk/info.go000066400000000000000000000054551312205533500204220ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package disk import ( "context" "flag" "fmt" "io" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type info struct { *flags.DatastoreFlag c bool d bool p bool } func init() { cli.Register("datastore.disk.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.c, "c", false, "Chain format") f.BoolVar(&cmd.d, "d", false, "Include datastore in output") f.BoolVar(&cmd.p, "p", true, "Include parents") } func (cmd *info) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "VMDK" } func (cmd *info) Description() string { return `Query VMDK info on DS. Examples: govc datastore.disk.info disks/disk1.vmdk` } func fullPath(s string) string { return s } func dsPath(s string) string { var p object.DatastorePath if p.FromString(s) { return p.Path } return s } var infoPath = dsPath type infoResult []object.VirtualDiskInfo func (r infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, info := range r { fmt.Fprintf(tw, "Name:\t%s\n", infoPath(info.Name)) fmt.Fprintf(tw, " Type:\t%s\n", info.DiskType) fmt.Fprintf(tw, " Parent:\t%s\n", infoPath(info.Parent)) } return tw.Flush() } type chainResult []object.VirtualDiskInfo func (r chainResult) Write(w io.Writer) error { for i, info := range r { fmt.Fprint(w, strings.Repeat(" ", i*2)) fmt.Fprintln(w, infoPath(info.Name)) } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } dc, err := cmd.Datacenter() if err != nil { return err } ds, err := cmd.Datastore() if err != nil { return err } m := object.NewVirtualDiskManager(ds.Client()) info, err := m.QueryVirtualDiskInfo(ctx, ds.Path(f.Arg(0)), dc, cmd.p) if err != nil { return err } if cmd.d { infoPath = fullPath } var r flags.OutputWriter = infoResult(info) if cmd.c { r = chainResult(info) } return cmd.WriteResult(r) } govmomi-0.15.0/govc/datastore/download.go000066400000000000000000000050211312205533500203310ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "errors" "flag" "fmt" "io" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/soap" ) type download struct { *flags.DatastoreFlag *flags.HostSystemFlag } func init() { cli.Register("datastore.download", &download{}) } func (cmd *download) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *download) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *download) Usage() string { return "SOURCE DEST" } func (cmd *download) Description() string { return `Copy SOURCE from DS to DEST on the local system. If DEST name is "-", source is written to stdout. Examples: govc datastore.download vm-name/vmware.log ./local.log govc datastore.download vm-name/vmware.log - | grep -i error` } func (cmd *download) Run(ctx context.Context, f *flag.FlagSet) error { args := f.Args() if len(args) != 2 { return errors.New("invalid arguments") } ds, err := cmd.Datastore() if err != nil { return err } h, err := cmd.HostSystemIfSpecified() if err != nil { return err } var via string if h != nil { via = fmt.Sprintf(" via %s", h.InventoryPath) ctx = ds.HostContext(ctx, h) } p := soap.DefaultDownload src := args[0] dst := args[1] if dst == "-" { f, _, err := ds.Download(ctx, src, &p) if err != nil { return err } _, err = io.Copy(os.Stdout, f) return err } if cmd.DatastoreFlag.OutputFlag.TTY { logger := cmd.DatastoreFlag.ProgressLogger(fmt.Sprintf("Downloading%s... ", via)) p.Progress = logger defer logger.Wait() } return ds.DownloadFile(ctx, src, dst, &p) } govmomi-0.15.0/govc/datastore/info.go000066400000000000000000000071011312205533500174560ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "flag" "fmt" "io" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.DatacenterFlag } func init() { cli.Register("datastore.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "[PATH]..." } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } args := f.Args() if len(args) == 0 { args = []string{"*"} } var res infoResult var props []string if cmd.OutputFlag.JSON { props = nil // Load everything } else { props = []string{"info", "summary"} // Load summary } for _, arg := range args { objects, err := finder.DatastoreList(ctx, arg) if err != nil { return err } res.objects = append(res.objects, objects...) } if len(res.objects) != 0 { refs := make([]types.ManagedObjectReference, 0, len(res.objects)) for _, o := range res.objects { refs = append(refs, o.Reference()) } pc := property.DefaultCollector(c) err = pc.Retrieve(ctx, refs, props, &res.Datastores) if err != nil { return err } } return cmd.WriteResult(&res) } type infoResult struct { Datastores []mo.Datastore objects []*object.Datastore } func (r *infoResult) Write(w io.Writer) error { // Maintain order via r.objects as Property collector does not always return results in order. objects := make(map[types.ManagedObjectReference]mo.Datastore, len(r.Datastores)) for _, o := range r.Datastores { objects[o.Reference()] = o } tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, o := range r.objects { ds := objects[o.Reference()] s := ds.Summary fmt.Fprintf(tw, "Name:\t%s\n", s.Name) fmt.Fprintf(tw, " Path:\t%s\n", o.InventoryPath) fmt.Fprintf(tw, " Type:\t%s\n", s.Type) fmt.Fprintf(tw, " URL:\t%s\n", s.Url) fmt.Fprintf(tw, " Capacity:\t%.1f GB\n", float64(s.Capacity)/(1<<30)) fmt.Fprintf(tw, " Free:\t%.1f GB\n", float64(s.FreeSpace)/(1<<30)) switch info := ds.Info.(type) { case *types.NasDatastoreInfo: fmt.Fprintf(tw, " Remote:\t%s:%s\n", info.Nas.RemoteHost, info.Nas.RemotePath) } } return tw.Flush() } govmomi-0.15.0/govc/datastore/ls.go000066400000000000000000000137331312205533500171510ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "encoding/json" "flag" "fmt" "io" "path" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *flags.DatastoreFlag *flags.OutputFlag long bool slash bool all bool recurse bool } func init() { cli.Register("datastore.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.long, "l", false, "Long listing format") f.BoolVar(&cmd.slash, "p", false, "Append / indicator to directories") f.BoolVar(&cmd.all, "a", false, "Do not ignore entries starting with .") f.BoolVar(&cmd.recurse, "R", false, "List subdirectories recursively") } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Usage() string { return "[FILE]..." } func isInvalid(err error) bool { if f, ok := err.(types.HasFault); ok { switch f.Fault().(type) { case *types.InvalidArgument: return true } } return false } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { ds, err := cmd.Datastore() if err != nil { return err } b, err := ds.Browser(ctx) if err != nil { return err } args := f.Args() if len(args) == 0 { args = []string{""} } result := &listOutput{ rs: make([]types.HostDatastoreBrowserSearchResults, 0), cmd: cmd, } for _, arg := range args { spec := types.HostDatastoreBrowserSearchSpec{ MatchPattern: []string{"*"}, } if cmd.long { spec.Details = &types.FileQueryFlags{ FileType: true, FileSize: true, FileOwner: types.NewBool(true), // TODO: omitempty is generated, but seems to be required Modification: true, } } for i := 0; ; i++ { r, err := cmd.ListPath(b, arg, spec) if err != nil { // Treat the argument as a match pattern if not found as directory if i == 0 && types.IsFileNotFound(err) || isInvalid(err) { spec.MatchPattern[0] = path.Base(arg) arg = path.Dir(arg) continue } return err } // Treat an empty result against match pattern as file not found if i == 1 && len(r) == 1 && len(r[0].File) == 0 { return fmt.Errorf("File %s/%s was not found", r[0].FolderPath, spec.MatchPattern[0]) } for n := range r { result.add(r[n]) } break } } return cmd.WriteResult(result) } func (cmd *ls) ListPath(b *object.HostDatastoreBrowser, path string, spec types.HostDatastoreBrowserSearchSpec) ([]types.HostDatastoreBrowserSearchResults, error) { ctx := context.TODO() path, err := cmd.DatastorePath(path) if err != nil { return nil, err } search := b.SearchDatastore if cmd.recurse { search = b.SearchDatastoreSubFolders } task, err := search(ctx, path, &spec) if err != nil { return nil, err } info, err := task.WaitForResult(ctx, nil) if err != nil { return nil, err } switch r := info.Result.(type) { case types.HostDatastoreBrowserSearchResults: return []types.HostDatastoreBrowserSearchResults{r}, nil case types.ArrayOfHostDatastoreBrowserSearchResults: return r.HostDatastoreBrowserSearchResults, nil default: panic(fmt.Sprintf("unknown result type: %T", r)) } } type listOutput struct { rs []types.HostDatastoreBrowserSearchResults cmd *ls } func (o *listOutput) add(r types.HostDatastoreBrowserSearchResults) { if o.cmd.recurse && !o.cmd.all { // filter out ".hidden" directories path := strings.SplitN(r.FolderPath, " ", 2) if len(path) == 2 { path = strings.Split(path[1], "/") if path[0] == "." { path = path[1:] } for _, p := range path { if len(p) != 0 && p[0] == '.' { return } } } } res := r res.File = nil for _, f := range r.File { if f.GetFileInfo().Path[0] == '.' && !o.cmd.all { continue } if o.cmd.slash { if d, ok := f.(*types.FolderFileInfo); ok { d.Path += "/" } } res.File = append(res.File, f) } o.rs = append(o.rs, res) } // hasMultiplePaths returns whether or not the slice of search results contains // results from more than one folder path. func (o *listOutput) hasMultiplePaths() bool { if len(o.rs) == 0 { return false } p := o.rs[0].FolderPath // Multiple paths if any entry is not equal to the first one. for _, e := range o.rs { if e.FolderPath != p { return true } } return false } func (o *listOutput) MarshalJSON() ([]byte, error) { return json.Marshal(o.rs) } func (o *listOutput) Write(w io.Writer) error { // Only include path header if we're dealing with more than one path. includeHeader := false if o.hasMultiplePaths() { includeHeader = true } tw := tabwriter.NewWriter(w, 3, 0, 2, ' ', 0) for i, r := range o.rs { if includeHeader { if i > 0 { fmt.Fprintf(tw, "\n") } fmt.Fprintf(tw, "%s:\n", r.FolderPath) } for _, file := range r.File { info := file.GetFileInfo() if o.cmd.long { fmt.Fprintf(tw, "%s\t%s\t%s\n", units.ByteSize(info.FileSize), info.Modification.Format("Mon Jan 2 15:04:05 2006"), info.Path) } else { fmt.Fprintf(tw, "%s\n", info.Path) } } } tw.Flush() return nil } govmomi-0.15.0/govc/datastore/mkdir.go000066400000000000000000000050761312205533500176420ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "errors" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type mkdir struct { *flags.DatastoreFlag createParents bool isNamespace bool } func init() { cli.Register("datastore.mkdir", &mkdir{}) } func (cmd *mkdir) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.createParents, "p", false, "Create intermediate directories as needed") f.BoolVar(&cmd.isNamespace, "namespace", false, "Return uuid of namespace created on vsan datastore") } func (cmd *mkdir) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mkdir) Usage() string { return "DIRECTORY" } func (cmd *mkdir) Run(ctx context.Context, f *flag.FlagSet) error { args := f.Args() if len(args) == 0 { return errors.New("missing operand") } c, err := cmd.Client() if err != nil { return err } if cmd.isNamespace { var uuid string var ds *object.Datastore if ds, err = cmd.Datastore(); err != nil { return err } path := args[0] nm := object.NewDatastoreNamespaceManager(c) if uuid, err = nm.CreateDirectory(ctx, ds, path, ""); err != nil { return err } fmt.Println(uuid) } else { var dc *object.Datacenter var path string dc, err = cmd.Datacenter() if err != nil { return err } path, err = cmd.DatastorePath(args[0]) if err != nil { return err } m := object.NewFileManager(c) err = m.MakeDirectory(ctx, path, dc, cmd.createParents) // ignore EEXIST if -p flag is given if err != nil && cmd.createParents { if soap.IsSoapFault(err) { soapFault := soap.ToSoapFault(err) if _, ok := soapFault.VimFault().(types.FileAlreadyExists); ok { return nil } } } } return err } govmomi-0.15.0/govc/datastore/mv.go000066400000000000000000000041371312205533500171530ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "errors" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type mv struct { *flags.DatastoreFlag force bool } func init() { cli.Register("datastore.mv", &mv{}) } func (cmd *mv) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.force, "f", false, "If true, overwrite any identically named file at the destination") } func (cmd *mv) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mv) Usage() string { return "SRC DST" } func (cmd *mv) Description() string { return `Move SRC to DST on DATASTORE. Examples: govc datastore.mv foo/foo.vmx foo/foo.vmx.old govc datastore.mv -f my.vmx foo/foo.vmx` } func (cmd *mv) Run(ctx context.Context, f *flag.FlagSet) error { args := f.Args() if len(args) != 2 { return errors.New("SRC and DST arguments are required") } c, err := cmd.Client() if err != nil { return err } dc, err := cmd.Datacenter() if err != nil { return err } // TODO: support cross-datacenter move src, err := cmd.DatastorePath(args[0]) if err != nil { return err } dst, err := cmd.DatastorePath(args[1]) if err != nil { return err } m := object.NewFileManager(c) task, err := m.MoveDatastoreFile(ctx, src, dc, dst, dc, cmd.force) if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/datastore/remove.go000066400000000000000000000037031312205533500200240ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type remove struct { *flags.HostSystemFlag *flags.DatastoreFlag } func init() { cli.Register("datastore.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "HOST..." } func (cmd *remove) Description() string { return `Remove datastore from HOST. Examples: govc datastore.remove -ds nfsDatastore cluster1 govc datastore.remove -ds nasDatastore host1 host2 host3` } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { ds, err := cmd.Datastore() if err != nil { return err } hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { hds, err := host.ConfigManager().DatastoreSystem(ctx) if err != nil { return err } err = hds.Remove(ctx, ds) if err != nil { return err } } return nil } govmomi-0.15.0/govc/datastore/rm.go000066400000000000000000000050171312205533500171450ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type rm struct { *flags.DatastoreFlag kind bool force bool isNamespace bool } func init() { cli.Register("datastore.rm", &rm{}) cli.Alias("datastore.rm", "datastore.delete") } func (cmd *rm) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.kind, "t", true, "Use file type to choose disk or file manager") f.BoolVar(&cmd.force, "f", false, "Force; ignore nonexistent files and arguments") f.BoolVar(&cmd.isNamespace, "namespace", false, "Path is uuid of namespace on vsan datastore") } func (cmd *rm) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *rm) Usage() string { return "FILE" } func (cmd *rm) Description() string { return `Remove FILE from DATASTORE. Examples: govc datastore.rm vm/vmware.log govc datastore.rm vm govc datastore.rm -f images/base.vmdk` } func (cmd *rm) Run(ctx context.Context, f *flag.FlagSet) error { args := f.Args() if len(args) == 0 { return flag.ErrHelp } c, err := cmd.Client() if err != nil { return err } var dc *object.Datacenter dc, err = cmd.Datacenter() if err != nil { return err } ds, err := cmd.Datastore() if err != nil { return err } if cmd.isNamespace { path := args[0] nm := object.NewDatastoreNamespaceManager(c) err = nm.DeleteDirectory(ctx, dc, path) } else { fm := ds.NewFileManager(dc, cmd.force) remove := fm.DeleteFile // File delete if cmd.kind { remove = fm.Delete // VirtualDisk or File delete } err = remove(ctx, args[0]) } if err != nil { if types.IsFileNotFound(err) && cmd.force { // Ignore error return nil } } return err } govmomi-0.15.0/govc/datastore/tail.go000066400000000000000000000052311312205533500174560ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "flag" "io" "os" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type tail struct { *flags.DatastoreFlag *flags.HostSystemFlag count int64 lines int follow bool } func init() { cli.Register("datastore.tail", &tail{}) } func (cmd *tail) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.Int64Var(&cmd.count, "c", -1, "Output the last NUM bytes") f.IntVar(&cmd.lines, "n", 10, "Output the last NUM lines") f.BoolVar(&cmd.follow, "f", false, "Output appended data as the file grows") } func (cmd *tail) Description() string { return `Output the last part of datastore files. Examples: govc datastore.tail -n 100 vm-name/vmware.log govc datastore.tail -n 0 -f vm-name/vmware.log` } func (cmd *tail) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *tail) Usage() string { return "PATH" } func (cmd *tail) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } ds, err := cmd.Datastore() if err != nil { return err } h, err := cmd.HostSystemIfSpecified() if err != nil { return err } if h != nil { ctx = ds.HostContext(ctx, h) } file, err := ds.Open(ctx, f.Arg(0)) if err != nil { return err } var reader io.ReadCloser = file var offset int64 if cmd.count >= 0 { info, serr := file.Stat() if serr != nil { return serr } if info.Size() > cmd.count { offset = info.Size() - cmd.count _, err = file.Seek(offset, io.SeekStart) if err != nil { return err } } } else if cmd.lines >= 0 { err = file.Tail(cmd.lines) if err != nil { return err } } if cmd.follow { reader = file.Follow(time.Second) } _, err = io.Copy(os.Stdout, reader) _ = reader.Close() return err } govmomi-0.15.0/govc/datastore/upload.go000066400000000000000000000042701312205533500200130ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package datastore import ( "context" "errors" "flag" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/soap" ) type upload struct { *flags.OutputFlag *flags.DatastoreFlag } func init() { cli.Register("datastore.upload", &upload{}) } func (cmd *upload) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) } func (cmd *upload) Process(ctx context.Context) error { if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *upload) Usage() string { return "SOURCE DEST" } func (cmd *upload) Description() string { return `Copy SOURCE from the local system to DEST on DS. If SOURCE name is "-", read source from stdin. Examples: govc datastore.upload -ds datastore1 ./config.iso vm-name/config.iso genisoimage ... | govc datastore.upload -ds datastore1 - vm-name/config.iso` } func (cmd *upload) Run(ctx context.Context, f *flag.FlagSet) error { args := f.Args() if len(args) != 2 { return errors.New("invalid arguments") } ds, err := cmd.Datastore() if err != nil { return err } p := soap.DefaultUpload src := args[0] dst := args[1] if src == "-" { return ds.Upload(ctx, os.Stdin, dst, &p) } if cmd.OutputFlag.TTY { logger := cmd.ProgressLogger("Uploading... ") p.Progress = logger defer logger.Wait() } return ds.UploadFile(ctx, src, dst, &p) } govmomi-0.15.0/govc/datastore/vsan/000077500000000000000000000000001312205533500171445ustar00rootroot00000000000000govmomi-0.15.0/govc/datastore/vsan/ls.go000066400000000000000000000060131312205533500201110ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vsan import ( "context" "flag" "fmt" "net/url" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" ) type ls struct { *flags.DatastoreFlag long bool orphan bool } func init() { cli.Register("datastore.vsan.dom.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.long, "l", false, "Long listing") f.BoolVar(&cmd.orphan, "o", false, "List orphan objects") } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Usage() string { return "[UUID]..." } func (cmd *ls) Description() string { return `List vSAN DOM objects in DS. Examples: govc datastore.vsan.dom.ls govc datastore.vsan.dom.ls -ds vsanDatastore -l govc datastore.vsan.dom.ls -l d85aa758-63f5-500a-3150-0200308e589c` } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { ds, err := cmd.Datastore() if err != nil { return err } var mds mo.Datastore err = ds.Properties(ctx, ds.Reference(), []string{"summary"}, &mds) if err != nil { return err } if mds.Summary.Type != "vsan" { return flag.ErrHelp } hosts, err := ds.AttachedHosts(ctx) if err != nil { return err } if len(hosts) == 0 { return flag.ErrHelp } m, err := hosts[0].ConfigManager().VsanInternalSystem(ctx) if err != nil { return err } ids, err := m.QueryVsanObjectUuidsByFilter(ctx, f.Args(), 0, 0) if err != nil { return err } if len(ids) == 0 { return nil } if !cmd.long && !cmd.orphan { for _, id := range ids { fmt.Fprintln(cmd.Out, id) } return nil } objs, err := m.GetVsanObjExtAttrs(ctx, ids) if err != nil { return err } u, err := url.Parse(mds.Summary.Url) if err != nil { return err } tw := tabwriter.NewWriter(cmd.Out, 2, 0, 2, ' ', 0) cmd.Out = tw for id, obj := range objs { path := obj.DatastorePath(u.Path) if cmd.orphan { _, err = ds.Stat(ctx, path) if err == nil { continue } switch err.(type) { case object.DatastoreNoSuchDirectoryError, object.DatastoreNoSuchFileError: default: return err } if !cmd.long { fmt.Fprintln(cmd.Out, id) continue } } fmt.Fprintf(cmd.Out, "%s\t%s\t%s\n", id, obj.Class, path) } return tw.Flush() } govmomi-0.15.0/govc/datastore/vsan/rm.go000066400000000000000000000044311312205533500201130ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vsan import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type rm struct { *flags.DatastoreFlag force bool verbose bool } func init() { cli.Register("datastore.vsan.dom.rm", &rm{}) } func (cmd *rm) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.force, "f", false, "Force delete") f.BoolVar(&cmd.verbose, "v", false, "Print deleted UUIDs to stdout, failed to stderr") } func (cmd *rm) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *rm) Usage() string { return "UUID..." } func (cmd *rm) Description() string { return `Remove vSAN DOM objects in DS. Examples: govc datastore.vsan.dom.rm d85aa758-63f5-500a-3150-0200308e589c govc datastore.vsan.dom.rm -f d85aa758-63f5-500a-3150-0200308e589c govc datastore.vsan.dom.ls -o | xargs govc datastore.vsan.dom.rm` } func (cmd *rm) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } ds, err := cmd.Datastore() if err != nil { return err } hosts, err := ds.AttachedHosts(ctx) if err != nil { return err } if len(hosts) == 0 { return flag.ErrHelp } m, err := hosts[0].ConfigManager().VsanInternalSystem(ctx) if err != nil { return err } res, err := m.DeleteVsanObjects(ctx, f.Args(), &cmd.force) if err != nil { return err } if cmd.verbose { for _, r := range res { if r.Success { fmt.Fprintln(cmd.Out, r.Uuid) } else { fmt.Fprintf(os.Stderr, "%s %s\n", r.Uuid, r.FailureReason[0].Message) } } } return nil } govmomi-0.15.0/govc/device/000077500000000000000000000000001312205533500154465ustar00rootroot00000000000000govmomi-0.15.0/govc/device/boot.go000066400000000000000000000044161312205533500167450ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package device import ( "context" "flag" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type boot struct { *flags.VirtualMachineFlag order string types.VirtualMachineBootOptions } func init() { cli.Register("device.boot", &boot{}) } func (cmd *boot) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.Int64Var(&cmd.BootDelay, "delay", 0, "Delay in ms before starting the boot sequence") f.StringVar(&cmd.order, "order", "", "Boot device order") f.Int64Var(&cmd.BootRetryDelay, "retry-delay", 0, "Delay in ms before a boot retry") cmd.BootRetryEnabled = types.NewBool(false) f.BoolVar(cmd.BootRetryEnabled, "retry", false, "If true, retry boot after retry-delay") cmd.EnterBIOSSetup = types.NewBool(false) f.BoolVar(cmd.EnterBIOSSetup, "setup", false, "If true, enter BIOS setup on next boot") } func (cmd *boot) Description() string { return `Configure VM boot settings. Examples: govc device.boot -vm $vm -delay 1000 -order floppy,cdrom,ethernet,disk` } func (cmd *boot) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *boot) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } if cmd.order != "" { o := strings.Split(cmd.order, ",") cmd.BootOrder = devices.BootOrder(o) } return vm.SetBootOptions(ctx, &cmd.VirtualMachineBootOptions) } govmomi-0.15.0/govc/device/cdrom/000077500000000000000000000000001312205533500165525ustar00rootroot00000000000000govmomi-0.15.0/govc/device/cdrom/add.go000066400000000000000000000041561312205533500176370ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cdrom import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type add struct { *flags.VirtualMachineFlag controller string } func init() { cli.Register("device.cdrom.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.controller, "controller", "", "IDE controller name") } func (cmd *add) Description() string { return `Add CD-ROM device to VM. Examples: govc device.cdrom.add -vm $vm govc device.ls -vm $vm | grep ide- govc device.cdrom.add -vm $vm -controller ide-200 govc device.info cdrom-*` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } c, err := devices.FindIDEController(cmd.controller) if err != nil { return err } d, err := devices.CreateCdrom(c) if err != nil { return err } err = vm.AddDevice(ctx, d) if err != nil { return err } // output name of device we just created devices, err = vm.Device(ctx) if err != nil { return err } devices = devices.SelectByType(d) name := devices.Name(devices[len(devices)-1]) fmt.Println(name) return nil } govmomi-0.15.0/govc/device/cdrom/eject.go000066400000000000000000000034631312205533500202010ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cdrom import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type eject struct { *flags.VirtualMachineFlag device string } func init() { cli.Register("device.cdrom.eject", &eject{}) } func (cmd *eject) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.device, "device", "", "CD-ROM device name") } func (cmd *eject) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *eject) Description() string { return `Eject media from CD-ROM device. If device is not specified, the first CD-ROM device is used. Examples: govc device.cdrom.eject -vm vm-1 govc device.cdrom.eject -vm vm-1 -device floppy-1` } func (cmd *eject) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } c, err := devices.FindCdrom(cmd.device) if err != nil { return err } return vm.EditDevice(ctx, devices.EjectIso(c)) } govmomi-0.15.0/govc/device/cdrom/insert.go000066400000000000000000000042071312205533500204100ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cdrom import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type insert struct { *flags.DatastoreFlag *flags.VirtualMachineFlag device string } func init() { cli.Register("device.cdrom.insert", &insert{}) } func (cmd *insert) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.device, "device", "", "CD-ROM device name") } func (cmd *insert) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *insert) Usage() string { return "ISO" } func (cmd *insert) Description() string { return `Insert media on datastore into CD-ROM device. If device is not specified, the first CD-ROM device is used. Examples: govc device.cdrom.insert -vm vm-1 -device cdrom-3000 images/boot.iso` } func (cmd *insert) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil || f.NArg() != 1 { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } c, err := devices.FindCdrom(cmd.device) if err != nil { return err } iso, err := cmd.DatastorePath(f.Arg(0)) if err != nil { return nil } return vm.EditDevice(ctx, devices.InsertIso(c, iso)) } govmomi-0.15.0/govc/device/connect.go000066400000000000000000000035511312205533500174320ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package device import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type connect struct { *flags.VirtualMachineFlag } func init() { cli.Register("device.connect", &connect{}) } func (cmd *connect) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) } func (cmd *connect) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *connect) Usage() string { return "DEVICE..." } func (cmd *connect) Description() string { return `Connect DEVICE on VM. Examples: govc device.connect -vm $name cdrom-3000` } func (cmd *connect) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } for _, name := range f.Args() { device := devices.Find(name) if device == nil { return fmt.Errorf("device '%s' not found", name) } if err = devices.Connect(device); err != nil { return err } if err = vm.EditDevice(ctx, device); err != nil { return err } } return nil } govmomi-0.15.0/govc/device/disconnect.go000066400000000000000000000036121312205533500201300ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package device import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type disconnect struct { *flags.VirtualMachineFlag } func init() { cli.Register("device.disconnect", &disconnect{}) } func (cmd *disconnect) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) } func (cmd *disconnect) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *disconnect) Usage() string { return "DEVICE..." } func (cmd *disconnect) Description() string { return `Disconnect DEVICE on VM. Examples: govc device.disconnect -vm $name cdrom-3000` } func (cmd *disconnect) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } for _, name := range f.Args() { device := devices.Find(name) if device == nil { return fmt.Errorf("device '%s' not found", name) } if err = devices.Disconnect(device); err != nil { return err } if err = vm.EditDevice(ctx, device); err != nil { return err } } return nil } govmomi-0.15.0/govc/device/floppy/000077500000000000000000000000001312205533500167575ustar00rootroot00000000000000govmomi-0.15.0/govc/device/floppy/add.go000066400000000000000000000035461312205533500200460ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package floppy import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type add struct { *flags.VirtualMachineFlag } func init() { cli.Register("device.floppy.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) } func (cmd *add) Description() string { return `Add floppy device to VM. Examples: govc device.floppy.add -vm $vm govc device.info floppy-*` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } d, err := devices.CreateFloppy() if err != nil { return err } err = vm.AddDevice(ctx, d) if err != nil { return err } // output name of device we just created devices, err = vm.Device(ctx) if err != nil { return err } devices = devices.SelectByType(d) name := devices.Name(devices[len(devices)-1]) fmt.Println(name) return nil } govmomi-0.15.0/govc/device/floppy/eject.go000066400000000000000000000034031312205533500204000ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package floppy import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type eject struct { *flags.VirtualMachineFlag device string } func init() { cli.Register("device.floppy.eject", &eject{}) } func (cmd *eject) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.device, "device", "", "Floppy device name") } func (cmd *eject) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *eject) Description() string { return `Eject image from floppy device. If device is not specified, the first floppy device is used. Examples: govc device.floppy.eject -vm vm-1` } func (cmd *eject) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } c, err := devices.FindFloppy(cmd.device) if err != nil { return err } return vm.EditDevice(ctx, devices.EjectImg(c)) } govmomi-0.15.0/govc/device/floppy/insert.go000066400000000000000000000041661312205533500206210ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package floppy import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type insert struct { *flags.DatastoreFlag *flags.VirtualMachineFlag device string } func init() { cli.Register("device.floppy.insert", &insert{}) } func (cmd *insert) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.device, "device", "", "Floppy device name") } func (cmd *insert) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *insert) Usage() string { return "IMG" } func (cmd *insert) Description() string { return `Insert IMG on datastore into floppy device. If device is not specified, the first floppy device is used. Examples: govc device.floppy.insert -vm vm-1 vm-1/config.img` } func (cmd *insert) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil || f.NArg() != 1 { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } c, err := devices.FindFloppy(cmd.device) if err != nil { return err } img, err := cmd.DatastorePath(f.Arg(0)) if err != nil { return nil } return vm.EditDevice(ctx, devices.InsertImg(c, img)) } govmomi-0.15.0/govc/device/info.go000066400000000000000000000127001312205533500167300ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package device import ( "context" "flag" "fmt" "io" "os" "path" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.VirtualMachineFlag *flags.OutputFlag *flags.NetworkFlag } func init() { cli.Register("device.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.NetworkFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "[DEVICE]..." } func (cmd *info) Description() string { return `Device info for VM. Examples: govc device.info -vm $name govc device.info -vm $name disk-* govc device.info -vm $name -json ethernet-0 | jq -r .Devices[].MacAddress` } func (cmd *info) match(p string, devices object.VirtualDeviceList) object.VirtualDeviceList { var matches object.VirtualDeviceList match := func(name string) bool { matched, _ := path.Match(p, name) return matched } for _, device := range devices { name := devices.Name(device) eq := name == p if eq || match(name) { matches = append(matches, device) } if eq { break } } return matches } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } res := infoResult{ list: devices, } if cmd.NetworkFlag.IsSet() { net, err := cmd.Network() if err != nil { return err } backing, err := net.EthernetCardBackingInfo(ctx) if err != nil { return err } devices = devices.SelectByBackingInfo(backing) } if f.NArg() == 0 { res.Devices = devices } else { for _, name := range f.Args() { matches := cmd.match(name, devices) if len(matches) == 0 { return fmt.Errorf("device '%s' not found", name) } res.Devices = append(res.Devices, matches...) } } return cmd.WriteResult(&res) } type infoResult struct { Devices object.VirtualDeviceList // need the full list of devices to lookup attached devices and controllers list object.VirtualDeviceList } func (r *infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, device := range r.Devices { d := device.GetVirtualDevice() info := d.DeviceInfo.GetDescription() fmt.Fprintf(tw, "Name:\t%s\n", r.Devices.Name(device)) fmt.Fprintf(tw, " Type:\t%s\n", r.Devices.TypeName(device)) fmt.Fprintf(tw, " Label:\t%s\n", info.Label) fmt.Fprintf(tw, " Summary:\t%s\n", info.Summary) fmt.Fprintf(tw, " Key:\t%d\n", d.Key) if c, ok := device.(types.BaseVirtualController); ok { var attached []string for _, key := range c.GetVirtualController().Device { attached = append(attached, r.Devices.Name(r.list.FindByKey(key))) } fmt.Fprintf(tw, " Devices:\t%s\n", strings.Join(attached, ", ")) } else { if c := r.list.FindByKey(d.ControllerKey); c != nil { fmt.Fprintf(tw, " Controller:\t%s\n", r.Devices.Name(c)) if d.UnitNumber != nil { fmt.Fprintf(tw, " Unit number:\t%d\n", *d.UnitNumber) } else { fmt.Fprintf(tw, " Unit number:\t\n") } } } if ca := d.Connectable; ca != nil { fmt.Fprintf(tw, " Connected:\t%t\n", ca.Connected) fmt.Fprintf(tw, " Start connected:\t%t\n", ca.StartConnected) fmt.Fprintf(tw, " Guest control:\t%t\n", ca.AllowGuestControl) fmt.Fprintf(tw, " Status:\t%s\n", ca.Status) } switch md := device.(type) { case types.BaseVirtualEthernetCard: fmt.Fprintf(tw, " MAC Address:\t%s\n", md.GetVirtualEthernetCard().MacAddress) fmt.Fprintf(tw, " Address type:\t%s\n", md.GetVirtualEthernetCard().AddressType) case *types.VirtualDisk: if b, ok := md.Backing.(types.BaseVirtualDeviceFileBackingInfo); ok { fmt.Fprintf(tw, " File:\t%s\n", b.GetVirtualDeviceFileBackingInfo().FileName) } if b, ok := md.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok && b.Parent != nil { fmt.Fprintf(tw, " Parent:\t%s\n", b.Parent.GetVirtualDeviceFileBackingInfo().FileName) } case *types.VirtualSerialPort: if b, ok := md.Backing.(*types.VirtualSerialPortURIBackingInfo); ok { fmt.Fprintf(tw, " Direction:\t%s\n", b.Direction) fmt.Fprintf(tw, " Service URI:\t%s\n", b.ServiceURI) fmt.Fprintf(tw, " Proxy URI:\t%s\n", b.ProxyURI) } } } return tw.Flush() } govmomi-0.15.0/govc/device/ls.go000066400000000000000000000037511312205533500164210ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package device import ( "context" "flag" "fmt" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type ls struct { *flags.VirtualMachineFlag boot bool } func init() { cli.Register("device.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.boot, "boot", false, "List devices configured in the VM's boot options") } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Description() string { return `List devices for VM. Examples: govc device.ls -vm $name` } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } if cmd.boot { options, err := vm.BootOptions(ctx) if err != nil { return err } devices = devices.SelectBootOrder(options.BootOrder) } tw := tabwriter.NewWriter(os.Stdout, 3, 0, 2, ' ', 0) for _, device := range devices { fmt.Fprintf(tw, "%s\t%s\t%s\n", devices.Name(device), devices.TypeName(device), device.GetVirtualDevice().DeviceInfo.GetDescription().Summary) } return tw.Flush() } govmomi-0.15.0/govc/device/remove.go000066400000000000000000000036621312205533500173010ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package device import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type remove struct { *flags.VirtualMachineFlag keepFiles bool } func init() { cli.Register("device.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.keepFiles, "keep", false, "Keep files in datastore") } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "DEVICE..." } func (cmd *remove) Description() string { return `Remove DEVICE from VM. Examples: govc device.remove -vm $name cdrom-3000 govc device.remove -vm $name -keep disk-1000` } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } for _, name := range f.Args() { device := devices.Find(name) if device == nil { return fmt.Errorf("device '%s' not found", name) } if err = vm.RemoveDevice(ctx, cmd.keepFiles, device); err != nil { return err } } return nil } govmomi-0.15.0/govc/device/scsi/000077500000000000000000000000001312205533500164075ustar00rootroot00000000000000govmomi-0.15.0/govc/device/scsi/add.go000066400000000000000000000052041312205533500174670ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package scsi import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.VirtualMachineFlag controller string sharedBus string hotAddRemove bool } func init() { cli.Register("device.scsi.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) var ctypes []string ct := object.SCSIControllerTypes() for _, t := range ct { ctypes = append(ctypes, ct.Type(t)) } f.StringVar(&cmd.controller, "type", ct.Type(ct[0]), fmt.Sprintf("SCSI controller type (%s)", strings.Join(ctypes, "|"))) f.StringVar(&cmd.sharedBus, "sharing", string(types.VirtualSCSISharingNoSharing), "SCSI sharing") f.BoolVar(&cmd.hotAddRemove, "hot", false, "Enable hot-add/remove") } func (cmd *add) Description() string { return `Add SCSI controller to VM. Examples: govc device.scsi.add -vm $vm govc device.scsi.add -vm $vm -type pvscsi govc device.info -vm $vm {lsi,pv}*` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } d, err := devices.CreateSCSIController(cmd.controller) if err != nil { return err } c := d.(types.BaseVirtualSCSIController).GetVirtualSCSIController() c.HotAddRemove = &cmd.hotAddRemove c.SharedBus = types.VirtualSCSISharing(cmd.sharedBus) err = vm.AddDevice(ctx, d) if err != nil { return err } // output name of device we just created devices, err = vm.Device(ctx) if err != nil { return err } devices = devices.SelectByType(d) name := devices.Name(devices[len(devices)-1]) fmt.Println(name) return nil } govmomi-0.15.0/govc/device/serial/000077500000000000000000000000001312205533500167255ustar00rootroot00000000000000govmomi-0.15.0/govc/device/serial/add.go000066400000000000000000000035641312205533500200140ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package serial import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type add struct { *flags.VirtualMachineFlag } func init() { cli.Register("device.serial.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) } func (cmd *add) Description() string { return `Add serial port to VM. Examples: govc device.serial.add -vm $vm govc device.info -vm $vm serialport-*` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } d, err := devices.CreateSerialPort() if err != nil { return err } err = vm.AddDevice(ctx, d) if err != nil { return err } // output name of device we just created devices, err = vm.Device(ctx) if err != nil { return err } devices = devices.SelectByType(d) name := devices.Name(devices[len(devices)-1]) fmt.Println(name) return nil } govmomi-0.15.0/govc/device/serial/connect.go000066400000000000000000000054421312205533500207120ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package serial import ( "context" "flag" "fmt" "path" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/mo" ) type connect struct { *flags.VirtualMachineFlag proxy string device string client bool } func init() { cli.Register("device.serial.connect", &connect{}) } func (cmd *connect) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.proxy, "vspc-proxy", "", "vSPC proxy URI") f.StringVar(&cmd.device, "device", "", "serial port device name") f.BoolVar(&cmd.client, "client", false, "Use client direction") } func (cmd *connect) Usage() string { return "URI" } func (cmd *connect) Description() string { return `Connect service URI to serial port. If "-" is given as URI, connects file backed device with file name of device name + .log suffix in the VM Config.Files.LogDirectory. Defaults to the first serial port if no DEVICE is given. Examples: govc device.ls | grep serialport- govc device.serial.connect -vm $vm -device serialport-8000 telnet://:33233 govc device.info -vm $vm serialport-* govc device.serial.connect -vm $vm "[datastore1] $vm/console.log" govc device.serial.connect -vm $vm - govc datastore.tail -f $vm/serialport-8000.log` } func (cmd *connect) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *connect) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } d, err := devices.FindSerialPort(cmd.device) if err != nil { return err } uri := f.Arg(0) if uri == "-" { var mvm mo.VirtualMachine err = vm.Properties(ctx, vm.Reference(), []string{"config.files.logDirectory"}, &mvm) if err != nil { return err } uri = path.Join(mvm.Config.Files.LogDirectory, fmt.Sprintf("%s.log", devices.Name(d))) } return vm.EditDevice(ctx, devices.ConnectSerialPort(d, uri, cmd.client, cmd.proxy)) } govmomi-0.15.0/govc/device/serial/disconnect.go000066400000000000000000000035561312205533500214160ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package serial import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type disconnect struct { *flags.VirtualMachineFlag device string } func init() { cli.Register("device.serial.disconnect", &disconnect{}) } func (cmd *disconnect) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.device, "device", "", "serial port device name") } func (cmd *disconnect) Description() string { return `Disconnect service URI from serial port. Examples: govc device.ls | grep serialport- govc device.serial.disconnect -vm $vm -device serialport-8000 govc device.info -vm $vm serialport-*` } func (cmd *disconnect) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *disconnect) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } d, err := devices.FindSerialPort(cmd.device) if err != nil { return err } return vm.EditDevice(ctx, devices.DisconnectSerialPort(d)) } govmomi-0.15.0/govc/device/usb/000077500000000000000000000000001312205533500162375ustar00rootroot00000000000000govmomi-0.15.0/govc/device/usb/add.go000066400000000000000000000050021312205533500173130ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package usb import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.VirtualMachineFlag controller string autoConnect bool ehciEnabled bool } func init() { cli.Register("device.usb.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) ctypes := []string{"usb", "xhci"} f.StringVar(&cmd.controller, "type", ctypes[0], fmt.Sprintf("USB controller type (%s)", strings.Join(ctypes, "|"))) f.BoolVar(&cmd.autoConnect, "auto", true, "Enable ability to hot plug devices") f.BoolVar(&cmd.ehciEnabled, "ehci", true, "Enable enhanced host controller interface (USB 2.0)") } func (cmd *add) Description() string { return `Add USB device to VM. Examples: govc device.usb.add -vm $vm govc device.usb.add -type xhci -vm $vm govc device.info usb*` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } var d types.BaseVirtualDevice switch cmd.controller { case "usb": c := new(types.VirtualUSBController) c.AutoConnectDevices = &cmd.autoConnect c.EhciEnabled = &cmd.ehciEnabled d = c case "xhci": c := new(types.VirtualUSBXHCIController) c.AutoConnectDevices = &cmd.autoConnect d = c default: return flag.ErrHelp } err = vm.AddDevice(ctx, d) if err != nil { return err } // output name of device we just created devices, err := vm.Device(ctx) if err != nil { return err } devices = devices.SelectByType(d) name := devices.Name(devices[len(devices)-1]) fmt.Println(name) return nil } govmomi-0.15.0/govc/dvs/000077500000000000000000000000001312205533500150035ustar00rootroot00000000000000govmomi-0.15.0/govc/dvs/add.go000066400000000000000000000065151312205533500160710ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package dvs import ( "context" "flag" "fmt" "os" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.HostSystemFlag path string pnic string } func init() { cli.Register("dvs.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.StringVar(&cmd.path, "dvs", "", "DVS path") f.StringVar(&cmd.pnic, "pnic", "vmnic0", "Name of the host physical NIC") } func (cmd *add) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Usage() string { return "HOST..." } func (cmd *add) Description() string { return `Add hosts to DVS. Examples: govc dvs.add -dvs dvsName -pnic vmnic1 hostA hostB hostC` } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } finder, err := cmd.Finder() if err != nil { return err } net, err := finder.Network(ctx, cmd.path) if err != nil { return err } dvs, ok := net.(*object.DistributedVirtualSwitch) if !ok { return fmt.Errorf("%s (%T) is not of type %T", cmd.path, net, dvs) } var s mo.VmwareDistributedVirtualSwitch err = dvs.Properties(ctx, dvs.Reference(), []string{"config"}, &s) if err != nil { return err } backing := new(types.DistributedVirtualSwitchHostMemberPnicBacking) for _, vmnic := range strings.Split(cmd.pnic, ",") { backing.PnicSpec = append(backing.PnicSpec, types.DistributedVirtualSwitchHostMemberPnicSpec{ PnicDevice: strings.TrimSpace(vmnic), }) } config := &types.DVSConfigSpec{ ConfigVersion: s.Config.GetDVSConfigInfo().ConfigVersion, } hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } existing := make(map[string]bool) // TODO: host.pnic.info command for _, member := range s.Config.GetDVSConfigInfo().Host { existing[member.Config.Host.Value] = true } for _, host := range hosts { ref := host.Reference() if existing[ref.Value] { fmt.Fprintf(os.Stderr, "%s is already a member of %s\n", host.InventoryPath, dvs.InventoryPath) continue } config.Host = append(config.Host, types.DistributedVirtualSwitchHostMemberConfigSpec{ Operation: "add", Host: ref, Backing: backing, }) } if len(config.Host) == 0 { return nil } task, err := dvs.Reconfigure(ctx, config) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("adding %d hosts to dvs %s... ", len(config.Host), dvs.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } govmomi-0.15.0/govc/dvs/create.go000066400000000000000000000045221312205533500166000ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package dvs import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.FolderFlag types.DVSCreateSpec configSpec *types.VMwareDVSConfigSpec } func init() { cli.Register("dvs.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.configSpec = new(types.VMwareDVSConfigSpec) cmd.DVSCreateSpec.ConfigSpec = cmd.configSpec cmd.DVSCreateSpec.ProductInfo = new(types.DistributedVirtualSwitchProductSpec) f.StringVar(&cmd.ProductInfo.Version, "product-version", "", "DVS product version") } func (cmd *create) Usage() string { return "DVS" } func (cmd *create) Description() string { return `Create DVS (DistributedVirtualSwitch) in datacenter. The dvs is added to the folder specified by the 'folder' flag. If not given, this defaults to the network folder in the specified or default datacenter. Examples: govc dvs.create DSwitch govc dvs.create -product-version 5.5.0 DSwitch` } func (cmd *create) Process(ctx context.Context) error { if err := cmd.FolderFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } name := f.Arg(0) cmd.configSpec.Name = name folder, err := cmd.FolderOrDefault("network") if err != nil { return err } task, err := folder.CreateDVS(ctx, cmd.DVSCreateSpec) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("adding %s to folder %s... ", name, folder.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } govmomi-0.15.0/govc/dvs/portgroup/000077500000000000000000000000001312205533500170445ustar00rootroot00000000000000govmomi-0.15.0/govc/dvs/portgroup/add.go000066400000000000000000000046161312205533500201320ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.DatacenterFlag DVPortgroupConfigSpec path string } func init() { cli.Register("dvs.portgroup.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.StringVar(&cmd.path, "dvs", "", "DVS path") cmd.DVPortgroupConfigSpec.NumPorts = 128 // default cmd.DVPortgroupConfigSpec.Register(ctx, f) } func (cmd *add) Description() string { return `Add portgroup to DVS. Examples: govc dvs.create DSwitch govc dvs.portgroup.add -dvs DSwitch -type earlyBinding -nports 16 ExternalNetwork govc dvs.portgroup.add -dvs DSwitch -type ephemeral InternalNetwork` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Usage() string { return "NAME" } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } name := f.Arg(0) finder, err := cmd.Finder() if err != nil { return err } net, err := finder.Network(ctx, cmd.path) if err != nil { return err } dvs, ok := net.(*object.DistributedVirtualSwitch) if !ok { return fmt.Errorf("%s (%T) is not of type %T", cmd.path, net, dvs) } cmd.DVPortgroupConfigSpec.Name = name task, err := dvs.AddPortgroup(ctx, []types.DVPortgroupConfigSpec{cmd.Spec()}) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("adding %s portgroup to dvs %s... ", name, dvs.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } govmomi-0.15.0/govc/dvs/portgroup/change.go000066400000000000000000000046101312205533500206210ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" ) type change struct { *flags.DatacenterFlag DVPortgroupConfigSpec } func init() { cli.Register("dvs.portgroup.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DVPortgroupConfigSpec.Register(ctx, f) } func (cmd *change) Description() string { return `Change DVS portgroup configuration. Examples: govc dvs.portgroup.change -nports 26 ExternalNetwork govc dvs.portgroup.change -vlan 3214 ExternalNetwork` } func (cmd *change) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Usage() string { return "PATH" } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } path := f.Arg(0) finder, err := cmd.Finder() if err != nil { return err } net, err := finder.Network(ctx, path) if err != nil { return err } pg, ok := net.(*object.DistributedVirtualPortgroup) if !ok { return fmt.Errorf("%s (%T) is not of type %T", path, net, pg) } var s mo.DistributedVirtualPortgroup err = pg.Properties(ctx, pg.Reference(), []string{"config.configVersion"}, &s) if err != nil { return err } spec := cmd.Spec() spec.ConfigVersion = s.Config.ConfigVersion task, err := pg.Reconfigure(ctx, spec) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("changing %s portgroup configuration %s... ", pg.Name(), pg.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } govmomi-0.15.0/govc/dvs/portgroup/info.go000066400000000000000000000112501312205533500203250ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.DatacenterFlag pg string active bool connected bool inside bool uplinkPort bool vlanID int count uint } func init() { cli.Register("dvs.portgroup.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.StringVar(&cmd.pg, "pg", "", "Distributed Virtual Portgroup") f.BoolVar(&cmd.active, "active", false, "Filter by port active or inactive status") f.BoolVar(&cmd.connected, "connected", false, "Filter by port connected or disconnected status") f.BoolVar(&cmd.inside, "inside", true, "Filter by port inside or outside status") f.BoolVar(&cmd.uplinkPort, "uplinkPort", false, "Filter for uplink ports") f.IntVar(&cmd.vlanID, "vlan", 0, "Filter by VLAN ID (0 = unfiltered)") f.UintVar(&cmd.count, "count", 0, "Number of matches to return (0 = unlimited)") } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "DVS" } func (cmd *info) Description() string { return `Portgroup info for DVS. Examples: govc dvs.portgroup.info DSwitch govc find / -type DistributedVirtualSwitch | xargs -n1 govc dvs.portgroup.info` } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } client, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } // Retrieve DVS reference net, err := finder.Network(ctx, f.Arg(0)) if err != nil { return err } // Convert to DVS object type dvs, ok := net.(*object.DistributedVirtualSwitch) if !ok { return fmt.Errorf("%s (%s) is not a DVS", f.Arg(0), net.Reference().Type) } // Set base search criteria criteria := types.DistributedVirtualSwitchPortCriteria{ Connected: types.NewBool(cmd.connected), Active: types.NewBool(cmd.active), UplinkPort: types.NewBool(cmd.uplinkPort), Inside: types.NewBool(cmd.inside), } // If a distributed virtual portgroup path is set, then add its portgroup key to the base criteria if len(cmd.pg) > 0 { // Retrieve distributed virtual portgroup reference net, err = finder.Network(ctx, cmd.pg) if err != nil { return err } // Convert distributed virtual portgroup object type dvpg, ok := net.(*object.DistributedVirtualPortgroup) if !ok { return fmt.Errorf("%s (%s) is not a DVPG", cmd.pg, net.Reference().Type) } // Obtain portgroup key property var dvp mo.DistributedVirtualPortgroup if err := dvpg.Properties(ctx, dvpg.Reference(), []string{"key"}, &dvp); err != nil { return err } // Add portgroup key to port search criteria criteria.PortgroupKey = []string{dvp.Key} } // Prepare request req := types.FetchDVPorts{ This: dvs.Reference(), Criteria: &criteria, } // Fetch ports res, err := methods.FetchDVPorts(ctx, client, &req) if err != nil { return err } var returnedPorts uint // Iterate over returned ports for _, port := range res.Returnval { portConfigSetting := port.Config.Setting.(*types.VMwareDVSPortSetting) portVlan := portConfigSetting.Vlan.(*types.VmwareDistributedVirtualSwitchVlanIdSpec) portVlanID := portVlan.VlanId // Show port info if: VLAN ID is not defined, or VLAN ID matches requested VLAN if cmd.vlanID == 0 || portVlanID == int32(cmd.vlanID) { returnedPorts++ fmt.Printf("PortgroupKey: %s\n", port.PortgroupKey) fmt.Printf("DvsUuid: %s\n", port.DvsUuid) fmt.Printf("VlanId: %d\n", portVlanID) fmt.Printf("PortKey: %s\n\n", port.Key) // If we are limiting the count and have reached the count, then stop returning output if cmd.count > 0 && returnedPorts == cmd.count { break } } } return nil } govmomi-0.15.0/govc/dvs/portgroup/spec.go000066400000000000000000000031271312205533500203300ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type DVPortgroupConfigSpec struct { types.DVPortgroupConfigSpec } func (spec *DVPortgroupConfigSpec) Register(ctx context.Context, f *flag.FlagSet) { ptypes := []string{ string(types.DistributedVirtualPortgroupPortgroupTypeEarlyBinding), string(types.DistributedVirtualPortgroupPortgroupTypeLateBinding), string(types.DistributedVirtualPortgroupPortgroupTypeEphemeral), } f.StringVar(&spec.Type, "type", ptypes[0], fmt.Sprintf("Portgroup type (%s)", strings.Join(ptypes, "|"))) f.Var(flags.NewInt32(&spec.NumPorts), "nports", "Number of ports") config := new(types.VMwareDVSPortSetting) vlan := new(types.VmwareDistributedVirtualSwitchVlanIdSpec) spec.DefaultPortConfig = config config.Vlan = vlan f.Var(flags.NewInt32(&vlan.VlanId), "vlan", "VLAN ID") } func (spec *DVPortgroupConfigSpec) Spec() types.DVPortgroupConfigSpec { return spec.DVPortgroupConfigSpec } govmomi-0.15.0/govc/emacs/000077500000000000000000000000001312205533500152775ustar00rootroot00000000000000govmomi-0.15.0/govc/emacs/.gitignore000066400000000000000000000000211312205533500172600ustar00rootroot00000000000000.cask elpa *.elc govmomi-0.15.0/govc/emacs/Cask000066400000000000000000000002341312205533500161020ustar00rootroot00000000000000(source gnu) (source melpa) (package-file "govc.el") (development (depends-on "dash") (depends-on "json-mode") (depends-on "magit") (depends-on "s")) govmomi-0.15.0/govc/emacs/Makefile000066400000000000000000000007361312205533500167450ustar00rootroot00000000000000CASK = cask EMACS_BIN ?= emacs EMACS_FLAGS = EMACS_EXEC = $(CASK) exec $(EMACS_BIN) --no-site-file --no-site-lisp --batch $(EMACS_FLAGS) OBJECTS = govc.elc elpa: $(CASK) install $(CASK) update touch $@ .PHONY: build test docs clean build: elpa $(OBJECTS) test: build docs $(EMACS_EXEC) -l test/make.el -f make-test docs: build $(EMACS_EXEC) -l test/make.el -f make-docs clean: rm -f $(OBJECTS) elpa rm -rf .cask %.elc: %.el $(EMACS_EXEC) -f batch-byte-compile $< govmomi-0.15.0/govc/emacs/README.md000066400000000000000000000245651312205533500165720ustar00rootroot00000000000000# govc.el Interface to govc for managing VMware ESXi and vCenter. The goal of this package is to provide a simple interface for commonly used govc commands within Emacs. This includes table based inventory/state modes for vms, hosts, datastores and pools. The keymap for each mode provides shortcuts for easily feeding the data in view to other govc commands. Within the various govc modes, press `?` to see a popup menu of options. A menu bar is enabled for certain modes, such as `govc-vm-mode` and `govc-host-mode`. There is also a `govc` menu at all times under the `Tools` menu. The recommended way to install govc.el is via MELPA (http://melpa.org/). ## govc-mode Running `govc-global-mode` creates key bindings to the various govc modes. The default prefix is `C-c ;` and can be changed by setting `govc-keymap-prefix`. ### govc-command-map Keybinding | Description ---------------|------------------------------------------------------------ h | Host info via govc p | Pool info via govc v | VM info via govc s | Datastore info via govc ### govc-urls List of URLs for use with `govc-session`. The `govc-session-name` displayed by `govc-mode-line` uses `url-target` (anchor) if set, otherwise `url-host` is used. Example: ``` (setq govc-urls `("root:vagrant@localhost:18443#Vagrant-ESXi" "root:password@192.168.1.192#Intel-NUC" "Administrator@vsphere.local:password!@vcva-clovervm")) ``` To enter a URL that is not in the list, prefix `universal-argument`, for example: `C-u M-x govc-vm` To avoid putting your credentials in a variable, you can use the auth-source search integration. ``` (setq govc-urls `("myserver-vmware-2")) ``` And then put this line in your `auth-sources` (e.g. `~/.authinfo.gpg`): ``` machine myserver-vmware-2 login tzz password mypass url "myserver-vmware-2.some.domain.here:443?insecure=true" ``` Which will result in the URL "tzz:mypass@myserver-vmware-2.some.domain.here:443?insecure=true". For more details on `auth-sources`, see Info node `(auth) Help for users`. When in `govc-vm` or `govc-host` mode, a default URL is composed with the current session credentials and the IP address of the current vm/host and the vm/host name as the session name. This makes it easier to connect to nested ESX/vCenter VMs or directly to an ESX host. ### govc-session-url ESX or vCenter URL set by `govc-session` via `govc-urls` selection. ### govc-session-insecure Skip verification of server certificate when true. This variable is set to the value of the `GOVC_INSECURE` env var by default. It can also be set per-url via the query string (insecure=true). For example: ``` (setq govc-urls `("root:password@hostname?insecure=true")) ``` ### govc-session-datacenter Datacenter to use for the current `govc-session`. If the endpoint has a single Datacenter it will be used by default, otherwise `govc-session` will prompt for selection. It can also be set per-url via the query string. For example: ``` (setq govc-urls `("root:password@hostname?datacenter=dc1")) ``` ### govc-session-datastore Datastore to use for the current `govc-session`. If the endpoint has a single Datastore it will be used by default, otherwise `govc-session` will prompt for selection. It can also be set per-url via the query string. For example: ``` (setq govc-urls `("root:password@hostname?datastore=vsanDatastore")) ``` ### govc-session-network Network to use for the current `govc-session`. ## govc-tabulated-list-mode Generic table bindings to mark/unmark rows. In addition to any hooks its parent mode `tabulated-list-mode` might have run, this mode runs the hook `govc-tabulated-list-mode-hook`, as the final step during initialization. ### govc-tabulated-list-mode-map Keybinding | Description ---------------|------------------------------------------------------------ m | Mark and move to the next line u | Unmark and move to the next line t | Toggle mark U | Unmark all M-& | Shell CMD with current `govc-session` exported as GOVC_ env vars M-w | Copy current selection or region to the kill ring M-E | Export session to `process-environment` and `kill-ring` ## govc-host-mode Major mode for handling a list of govc hosts. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-host-mode-hook`, as the final step during initialization. ### govc-host-mode-map Keybinding | Description ---------------|------------------------------------------------------------ E | Events via govc events -n `govc-max-events` L | Logs via govc logs -n `govc-max-events` J | JSON via govc host M | Metrics info N | Netstat via `govc-esxcli-netstat-info` with current host id O | Object browser via govc object c | Connect new session for the current govc mode p | Pool-mode with current session s | Datastore-mode with current session v | VM-mode with current session ## govc-pool-mode Major mode for handling a list of govc pools. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-pool-mode-hook`, as the final step during initialization. ### govc-pool-mode-map Keybinding | Description ---------------|------------------------------------------------------------ D | Destroy via `govc-pool-destroy` on the pool selection E | Events via govc events -n `govc-max-events` J | JSON via govc pool M | Metrics info O | Object browser via govc object c | Connect new session for the current govc mode h | Host-mode with current session s | Datastore-mode with current session v | VM-mode with current session ## govc-datastore-mode Major mode for govc datastore.info. In addition to any hooks its parent mode `tabulated-list-mode` might have run, this mode runs the hook `govc-datastore-mode-hook`, as the final step during initialization. ### govc-datastore-mode-map Keybinding | Description ---------------|------------------------------------------------------------ J | JSON via govc datastore M | Metrics info O | Object browser via govc object RET | Browse datastore c | Connect new session for the current govc mode h | Host-mode with current session p | Pool-mode with current session v | VM-mode with current session ## govc-datastore-ls-mode Major mode govc datastore.ls. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-datastore-ls-mode-hook`, as the final step during initialization. ### govc-datastore-ls-mode-map Keybinding | Description ---------------|------------------------------------------------------------ J | JSON via govc datastore S | Search via govc datastore D | Delete selected datastore paths T | Tail datastore file + | Mkdir via govc datastore DEL | Up to parent folder RET | Open datastore folder or file ## govc-vm-mode Major mode for handling a list of govc vms. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-vm-mode-hook`, as the final step during initialization. ### govc-vm-mode-map Keybinding | Description ---------------|------------------------------------------------------------ E | Events via govc events -n `govc-max-events` J | JSON via govc vm O | Object browser via govc object X | ExtraConfig via `govc-vm-extra-config` on the current selection RET | Devices via `govc-device` on the current selection C | Console screenshot via `govc-vm-screen` on the current selection V | VNC via `govc-vm-vnc` on the current selection D | Destroy via `govc-vm-destroy` on the current selection ^ | Start via `govc-vm-start` on the current selection ! | Shutdown via `govc-vm-shutdown` on the current selection @ | Reboot via `govc-vm-reboot` on the current selection & | Suspend via `govc-vm-suspend` on the current selection H | Host info via `govc-host` with host(s) of current selection M | Metrics info P | Ping VM S | Datastore via `govc-datastore-ls` with datastore of current selection c | Connect new session for the current govc mode h | Host-mode with current session p | Pool-mode with current session s | Datastore-mode with current session ## govc-device-mode Major mode for handling a govc device. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-device-mode-hook`, as the final step during initialization. ### govc-device-mode-map Keybinding | Description ---------------|------------------------------------------------------------ J | JSON via govc device RET | Tabulated govc device ## govc-object-mode Major mode for handling a govc object. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-object-mode-hook`, as the final step during initialization. ### govc-object-mode-map Keybinding | Description ---------------|------------------------------------------------------------ J | JSON object selection via govc object N | Next managed object reference O | Object browser via govc object DEL | Parent object selection if reachable, otherwise prompt with `govc-object-history` RET | Expand object selection via govc object ## govc-metric-mode Major mode for handling a govc metric. In addition to any hooks its parent mode `govc-tabulated-list-mode` might have run, this mode runs the hook `govc-metric-mode-hook`, as the final step during initialization. ### govc-metric-mode-map Keybinding | Description ---------------|------------------------------------------------------------ RET | Sample metrics P | Plot metric sample s | Select metric names govmomi-0.15.0/govc/emacs/govc.el000066400000000000000000001604361312205533500165710ustar00rootroot00000000000000;;; govc.el --- Interface to govc for managing VMware ESXi and vCenter ;; Author: The govc developers ;; URL: https://github.com/vmware/govmomi/tree/master/govc/emacs ;; Keywords: convenience ;; Version: 0.14.0 ;; Package-Requires: ((emacs "24.3") (dash "1.5.0") (s "1.9.0") (magit-popup "2.0.50") (json-mode "1.6.0")) ;; This file is NOT part of GNU Emacs. ;; Copyright (c) 2016 VMware, Inc. All Rights Reserved. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; http://www.apache.org/licenses/LICENSE-2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ;; distributed under the License is distributed on an "AS IS" BASIS, ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;; See the License for the specific language governing permissions and ;; limitations under the License. ;;; Commentary: ;; The goal of this package is to provide a simple interface for commonly used ;; govc commands within Emacs. This includes table based inventory/state modes ;; for vms, hosts, datastores and pools. The keymap for each mode provides ;; shortcuts for easily feeding the data in view to other govc commands. ;; ;; Within the various govc modes, press `?' to see a popup menu of options. ;; A menu bar is enabled for certain modes, such as `govc-vm-mode' and `govc-host-mode'. ;; There is also a `govc' menu at all times under the `Tools' menu. ;; ;; The recommended way to install govc.el is via MELPA (http://melpa.org/). ;;; Code: (eval-when-compile (require 'cl)) (require 'dash) (require 'diff) (require 'dired) (require 'json-mode) (require 'magit-popup) (require 'url-parse) (require 's) (autoload 'auth-source-search "auth-source") (defgroup govc nil "Emacs customization group for govc." :group 'convenience) (defcustom govc-keymap-prefix "C-c ;" "Prefix for `govc-mode'." :group 'govc) (defcustom govc-command "govc" "Executable path to the govc utility." :type 'string :group 'govc) (defvar govc-command-map (let ((map (make-sparse-keymap))) (define-key map "h" 'govc-host) (define-key map "p" 'govc-pool) (define-key map "v" 'govc-vm) (define-key map "s" 'govc-datastore) (define-key map "?" 'govc-popup) map) "Keymap for `govc-mode' after `govc-keymap-prefix' was pressed.") (defvar govc-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd govc-keymap-prefix) govc-command-map) map) "Keymap for `govc-mode'.") ;;;###autoload (define-minor-mode govc-mode "Running `govc-global-mode' creates key bindings to the various govc modes. The default prefix is `C-c ;' and can be changed by setting `govc-keymap-prefix'. \\{govc-mode-map\}" nil govc-mode-line govc-mode-map :group 'govc) ;;;###autoload (define-globalized-minor-mode govc-global-mode govc-mode govc-mode) (defcustom govc-mode-line '(:eval (format " govc[%s]" (or (govc-session-name) "-"))) "Mode line lighter for govc." :group 'govc :type 'sexp :risky t) ;;; Tabulated list mode extensions (derived from https://github.com/Silex/docker.el tabulated-list-ext.el) (defun govc-tabulated-list-mark () "Mark and move to the next line." (interactive) (tabulated-list-put-tag (char-to-string dired-marker-char) t)) (defun govc-tabulated-list-unmark () "Unmark and move to the next line." (interactive) (tabulated-list-put-tag "" t)) (defun govc-tabulated-list-toggle-marks () "Toggle mark." (interactive) (save-excursion (goto-char (point-min)) (let ((cmd)) (while (not (eobp)) (setq cmd (char-after)) (tabulated-list-put-tag (if (eq cmd dired-marker-char) "" (char-to-string dired-marker-char)) t))))) (defun govc-tabulated-list-unmark-all () "Unmark all." (interactive) (save-excursion (goto-char (point-min)) (while (not (eobp)) (tabulated-list-put-tag "" t)))) (defun govc-selection () "Get the current selection as a list of names." (let ((selection)) (save-excursion (goto-char (point-min)) (while (not (eobp)) (when (eq (char-after) ?*) (add-to-list 'selection (tabulated-list-get-id))) (forward-line))) (or selection (let ((id (tabulated-list-get-id))) (if id (list id)))))) (defun govc-do-selection (fn action) "Call FN with `govc-selection' confirming ACTION." (let* ((selection (govc-selection)) (count (length selection)) (prompt (if (= count 1) (car selection) (format "* [%d] marked" count)))) (if (yes-or-no-p (format "%s %s ?" action prompt)) (funcall fn selection)))) (defun govc-copy-selection () "Copy current selection or region to the kill ring." (interactive) (if (region-active-p) (copy-region-as-kill (mark) (point) 'region) (kill-new (message "%s" (s-join " " (--map (format "'%s'" it) (govc-selection))))))) (defvar govc-font-lock-keywords (list (list dired-re-mark '(0 dired-mark-face)) (list "types.ManagedObjectReference\\(.*\\)" '(1 dired-directory-face)) (list "[^ ]*/$" '(0 dired-directory-face)) (list "\\.\\.\\.$" '(0 dired-symlink-face)))) (defvar govc-tabulated-list-mode-map (let ((map (make-sparse-keymap))) (define-key map "m" 'govc-tabulated-list-mark) (define-key map "u" 'govc-tabulated-list-unmark) (define-key map "t" 'govc-tabulated-list-toggle-marks) (define-key map "U" 'govc-tabulated-list-unmark-all) (define-key map (kbd "M-&") 'govc-shell-command) (define-key map (kbd "M-w") 'govc-copy-selection) (define-key map (kbd "M-E") 'govc-copy-environment) map) "Keymap for `govc-tabulated-list-mode'.") (define-derived-mode govc-tabulated-list-mode tabulated-list-mode "Tabulated govc" "Generic table bindings to mark/unmark rows." (setq-local font-lock-defaults '(govc-font-lock-keywords t nil nil beginning-of-line))) ;;; Keymap helpers for generating menus and popups (defun govc-keymap-list (keymap) "Return a list of (key name function) for govc bindings in the given KEYMAP. The name returned is the first word of the function `documentation'." (let ((map)) (map-keymap (lambda (k f) (when (keymapp f) (setq map (append map (--map (and (setcar it (kbd (format "M-%s" (char-to-string (car it))))) it) (govc-keymap-list f))))) (when (and (symbolp f) (s-starts-with? "govc-" (symbol-name f))) (if (not (eq ?? k)) (add-to-list 'map (list k (car (split-string (documentation f))) f))))) keymap) map)) (defun govc-keymap-menu (keymap) "Return a list of [key function t] for govc bindings in the given KEYMAP. For use with `easy-menu-define'." (-map (lambda (item) (vector (nth 1 item) (nth 2 item) t)) (govc-keymap-list keymap))) (defun govc-key-description (key) "Call `key-description' ensuring KEY is a sequence." (key-description (if (integerp key) (list key) key))) (defun govc-keymap-list-to-help (keymap) "Convert KEYMAP to list of help text." (--map (list (govc-key-description (car it)) (car (split-string (documentation (nth 2 it)) "\\."))) keymap)) (defun govc-keymap-popup-help () "Default keymap help for `govc-keymap-popup'." (append (govc-keymap-list-to-help (govc-keymap-list govc-tabulated-list-mode-map)) '(("g" "Refresh current buffer") ("C-h m" "Show all key bindings")))) (defun govc-keymap-popup (keymap) "Convert a `govc-keymap-list' using KEYMAP for use with `magit-define-popup'. Keys in the ASCII range of 32-97 are mapped to popup commands, all others are listed as help text." (let* ((maps (--separate (and (integerp (car it)) (>= (car it) 32) (<= (car it) 97)) (govc-keymap-list keymap))) (help (govc-keymap-list-to-help (cadr maps)))) (append '("Commands") (car maps) (list (s-join "\n" (--map (format " %-6s %s" (car it) (cadr it)) (append help (govc-keymap-popup-help)))) nil)))) ;;; govc process helpers (defcustom govc-urls nil "List of URLs for use with `govc-session'. The `govc-session-name' displayed by `govc-mode-line' uses `url-target' (anchor) if set, otherwise `url-host' is used. Example: ``` (setq govc-urls '(\"root:vagrant@localhost:18443#Vagrant-ESXi\" \"root:password@192.168.1.192#Intel-NUC\" \"Administrator@vsphere.local:password!@vcva-clovervm\")) ``` To enter a URL that is not in the list, prefix `universal-argument', for example: `\\[universal-argument] \\[govc-vm]' To avoid putting your credentials in a variable, you can use the auth-source search integration. ``` (setq govc-urls '(\"myserver-vmware-2\")) ``` And then put this line in your `auth-sources' (e.g. `~/.authinfo.gpg'): ``` machine myserver-vmware-2 login tzz password mypass url \"myserver-vmware-2.some.domain.here:443?insecure=true\" ``` Which will result in the URL \"tzz:mypass@myserver-vmware-2.some.domain.here:443?insecure=true\". For more details on `auth-sources', see Info node `(auth) Help for users'. When in `govc-vm' or `govc-host' mode, a default URL is composed with the current session credentials and the IP address of the current vm/host and the vm/host name as the session name. This makes it easier to connect to nested ESX/vCenter VMs or directly to an ESX host." :group 'govc :type '(repeat (string :tag "vcenter URL or auth-source machine reference"))) (defvar-local govc-session-url nil "ESX or vCenter URL set by `govc-session' via `govc-urls' selection.") (defvar-local govc-session-path nil) (defvar-local govc-session-insecure nil "Skip verification of server certificate when true. This variable is set to the value of the `GOVC_INSECURE' env var by default. It can also be set per-url via the query string (insecure=true). For example: ``` (setq govc-urls '(\"root:password@hostname?insecure=true\")) ```") (defvar-local govc-session-datacenter nil "Datacenter to use for the current `govc-session'. If the endpoint has a single Datacenter it will be used by default, otherwise `govc-session' will prompt for selection. It can also be set per-url via the query string. For example: ``` (setq govc-urls '(\"root:password@hostname?datacenter=dc1\")) ```") (defvar-local govc-session-datastore nil "Datastore to use for the current `govc-session'. If the endpoint has a single Datastore it will be used by default, otherwise `govc-session' will prompt for selection. It can also be set per-url via the query string. For example: ``` (setq govc-urls '(\"root:password@hostname?datastore=vsanDatastore\")) ```") (defvar-local govc-session-network nil "Network to use for the current `govc-session'.") (defvar-local govc-filter nil "Resource path filter.") (defvar-local govc-args nil "Additional govc arguments.") (defun govc-session-name () "Return a name for the current session. Derived from `govc-session-url' if set, otherwise from the 'GOVC_URL' env var. Return value is the url anchor if set, otherwise the hostname is returned." (let* ((u (or govc-session-url (getenv "GOVC_URL"))) (url (if u (govc-url-parse u)))) (if url (concat (or (url-target url) (url-host url)) govc-session-path)))) (defun govc-format-command (command &rest args) "Format govc COMMAND ARGS." (format "%s %s %s" govc-command command (s-join " " (--map (format "'%s'" it) (-flatten (-non-nil args)))))) (defconst govc-environment-map (--map (cons (concat "GOVC_" (upcase it)) (intern (concat "govc-session-" it))) '("url" "insecure" "datacenter" "datastore" "network")) "Map of `GOVC_*' environment variable names to `govc-session-*' symbol names.") (defun govc-environment (&optional unset) "Return `process-environment' for govc. Optionally clear govc env if UNSET is non-nil." (let ((process-environment (copy-sequence process-environment))) (dolist (e govc-environment-map) (setenv (car e) (unless unset (symbol-value (cdr e))))) process-environment)) (defun govc-export-environment (arg) "Set if ARG is \\[universal-argument], unset if ARG is \\[negative-argument]." (if (equal arg '-) (progn (setq process-environment (govc-environment t)) (cons "unset" (--map (car it) govc-environment-map))) (progn (setq process-environment (govc-environment)) (cons "export" (--map (format "%s='%s'" (car it) (or (symbol-value (cdr it)) "")) govc-environment-map))))) (defun govc-copy-environment (&optional arg) "Export session to `process-environment' and `kill-ring'. Optionally set `GOVC_*' vars in `process-environment' using prefix \\[universal-argument] ARG or unset with prefix \\[negative-argument] ARG." (interactive "P") (message (kill-new (if arg (s-join " " (govc-export-environment arg)) govc-session-url)))) (defun govc-process (command handler) "Run COMMAND, calling HANDLER upon successful exit of the process." (message command) (let ((process-environment (govc-environment)) (exit-code)) (add-to-list 'govc-command-history command) (with-temp-buffer (setq exit-code (call-process-shell-command command nil (current-buffer))) (if (zerop exit-code) (funcall handler) (error (buffer-string)))))) (defun govc (command &rest args) "Execute govc COMMAND with ARGS. Return value is `buffer-string' split on newlines." (govc-process (govc-format-command command args) (lambda () (split-string (buffer-string) "\n" t)))) (defun govc-json (command &rest args) "Execute govc COMMAND passing arguments ARGS. Return value is `json-read'." (govc-process (govc-format-command command (cons "-json" args)) (lambda () (goto-char (point-min)) (let ((json-object-type 'plist)) (json-read))))) (defun govc-ls-datacenter () "List datacenters." (govc "ls" "-t" "Datacenter" "./...")) (defun govc-object-prompt (prompt ls) "PROMPT for object name via LS function. Return object without PROMPT if there is just one instance." (let ((objs (if (listp ls) ls (funcall ls)))) (if (eq 1 (length objs)) (car objs) (completing-read prompt objs)))) (defun govc-url-parse (url) "A `url-generic-parse-url' wrapper to handle URL with password, but no scheme. Also fixes the case where user contains an '@'." (let* ((full (s-contains? "://" url)) (u (url-generic-parse-url (concat (unless full "https://") url)))) (unless full (setf (url-type u) nil) (setf (url-fullness u) nil)) (if (s-contains? "@" (url-host u)) (let* ((h (split-string (url-host u) "@")) (p (split-string (car h) ":"))) (setf (url-host u) (cadr h)) (setf (url-user u) (concat (url-user u) "@" (car p))) (setf (url-password u) (cadr p)))) u)) (defun govc-url-default () "Default URL when creating a new session." (if govc-session-url (let ((url (govc-url-parse govc-session-url))) (if (equal major-mode 'govc-host-mode) (progn (setf (url-host url) (govc-table-column-value "Name")) (setf (url-target url) nil)) (progn (setf (url-host url) (govc-table-column-value "IP address")) (setf (url-target url) (govc-table-column-value "Name")))) (setf (url-filename url) "") ; erase query string (if (string-empty-p (url-user url)) (setf (url-user url) "root")) ; local workstation url has no user set (url-recreate-url url)))) (defun govc-urls-completing-read () "A wrapper for `completing-read' to mask credentials in `govc-urls'." (let ((alist)) (dolist (ent govc-urls) (let ((u (govc-url-parse ent))) (setf (url-password u) nil) (add-to-list 'alist `(,(url-recreate-url u) . ,ent) t))) (let ((u (completing-read "govc url: " (-map 'car alist)))) (cdr (assoc u alist))))) (defun govc-session-url-lookup-auth-source (url-or-address) "Check if URL-OR-ADDRESS is a logical name in the authinfo file. Given URL-OR-ADDRESS `myserver-vmware-2' this function will find a line like machine myserver-vmware-2 login tzz password mypass url \"myserver-vmware-2.some.domain.here:443?insecure=true\" and will return the URL \"tzz:mypass@myserver-vmware-2.some.domain.here:443?insecure=true\". If the line is not found, the original URL-OR-ADDRESS is returned, assuming that's what the user wanted." (let ((found (nth 0 (auth-source-search :max 1 :host url-or-address :require '(:user :secret :url) :create nil)))) (if found (format "%s:%s@%s" (plist-get found :user) (let ((secret (plist-get found :secret))) (if (functionp secret) (funcall secret) secret)) (plist-get found :url)) url-or-address))) (defun govc-session-set-url (url) "Set `govc-session-url' to URL and optionally set other govc-session-* variables via URL query." ;; Replace the original URL with the auth-source lookup if there is no user. (unless (url-user (govc-url-parse url)) (setq url (govc-session-url-lookup-auth-source url))) (let ((q (cdr (url-path-and-query (govc-url-parse url))))) (dolist (opt (if q (url-parse-query-string q))) (let ((var (intern (concat "govc-session-" (car opt))))) (if (boundp var) (set var (cadr opt)))))) (setq govc-session-url url)) (defun govc-session () "Initialize a govc session." (interactive) (let ((url (if (or current-prefix-arg (eq 0 (length govc-urls))) (read-string "govc url: " (govc-url-default)) (if (eq 1 (length govc-urls)) (car govc-urls) (govc-urls-completing-read))))) ;; Wait until this point to clear so current session is preserved in the ;; event of `keyboard-quit' in `read-string'. (setq govc-session-datacenter nil govc-session-datastore nil govc-session-network nil govc-filter nil) (govc-session-set-url url)) (unless govc-session-insecure (setq govc-session-insecure (or (getenv "GOVC_INSECURE") (completing-read "govc insecure: " '("true" "false"))))) (unless govc-session-datacenter (setq govc-session-datacenter (govc-object-prompt "govc datacenter: " 'govc-ls-datacenter))) (add-to-list 'govc-urls govc-session-url)) (defalias 'govc-current-session 'buffer-local-variables) (defun govc-session-clone (session) "Clone a session from SESSION buffer locals." (dolist (v session) (let ((s (car v))) (when (s-starts-with? "govc-session-" (symbol-name s)) (set s (assoc-default s session)))))) (defvar govc-command-history nil "History list for govc commands used by `govc-shell-command'.") (defun govc-shell-command (&optional cmd) "Shell CMD with current `govc-session' exported as GOVC_ env vars." (interactive) (let ((process-environment (govc-environment)) (current-prefix-arg "*govc*") (url govc-session-url) (shell-command-history govc-command-history)) (if cmd (async-shell-command cmd current-prefix-arg) (call-interactively 'async-shell-command)) (setq govc-command-history shell-command-history) (with-current-buffer (get-buffer current-prefix-arg) (setq govc-session-url url)))) (defcustom govc-max-events 100 "Limit events output to the last N events." :type 'integer :group 'govc) (defun govc-events () "Events via govc events -n `govc-max-events'." (interactive) (govc-shell-command (govc-format-command "events" (list "-n" govc-max-events (if current-prefix-arg "-f") (govc-selection))))) (defun govc-logs () "Logs via govc logs -n `govc-max-events'." (interactive) (govc-shell-command (let ((host (govc-selection))) (govc-format-command "logs" (list "-n" govc-max-events (if current-prefix-arg "-f") (if host (list "-host" host))))))) (defun govc-parse-info (output) "Parse govc info command OUTPUT." (let* ((entries) (entry) (entry-key)) (-each output (lambda (line) (let* ((ix (s-index-of ":" line)) (key (s-trim (substring line 0 ix))) (val (s-trim (substring line (+ ix 1))))) (unless entry-key (setq entry-key key)) (when (s-equals? key entry-key) (setq entry (make-hash-table :test 'equal)) (add-to-list 'entries entry)) (puthash key val entry)))) entries)) (defun govc-table-column-names () "Return a list of column names from `tabulated-list-format'." (--map (car (aref tabulated-list-format it)) (number-sequence 0 (- (length tabulated-list-format) 1)))) (defun govc-table-column-value (key) "Return current column value for given KEY." (let ((names (govc-table-column-names)) (entry (tabulated-list-get-entry)) (value)) (dotimes (ix (- (length names) 1)) (if (s-equals? key (nth ix names)) (setq value (elt entry ix)))) value)) (defun govc-table-info (command &optional args) "Convert `govc-parse-info' COMMAND ARGS output to `tabulated-list-entries' format." (let ((names (govc-table-column-names))) (-map (lambda (info) (let ((id (or (gethash "Path" info) (gethash (car names) info)))) (list id (vconcat (--map (or (gethash it info) "-") names))))) (govc-parse-info (govc command args))))) (defun govc-map-info (command &optional args) "Populate key=val map table with govc COMMAND ARGS output." (-map (lambda (line) (let* ((ix (s-index-of ":" line)) (key (s-trim (substring line 0 ix))) (val (s-trim (substring line (+ ix 1))))) (list key (vector key val)))) (govc command args))) (defun govc-map-info-table (entries) "Tabulated `govc-map-info' data via ENTRIES." (let ((session (govc-current-session)) (args (append govc-args (govc-selection))) (buffer (get-buffer-create "*govc-info*"))) (pop-to-buffer buffer) (tabulated-list-mode) (setq govc-args args) (govc-session-clone session) (setq tabulated-list-format [("Name" 50) ("Value" 50)] tabulated-list-padding 2 tabulated-list-entries entries) (tabulated-list-print))) (defun govc-type-list-entries (command) "Convert govc COMMAND type table output to `tabulated-list-entries'." (-map (lambda (line) (let* ((entry (s-split-up-to " " (s-collapse-whitespace line) 2)) (name (car entry)) (type (nth 1 entry)) (value (car (last entry)))) (list name (vector name type value)))) (govc command govc-args))) (defun govc-json-info-selection (command) "Run govc COMMAND -json on `govc-selection'." (if current-prefix-arg (--each (govc-selection) (govc-json-info command it)) (govc-json-info command (govc-selection)))) (defun govc-json-diff () "Diff two *govc-json* buffers in view." (let ((buffers)) (-each (window-list-1) (lambda (w) (with-current-buffer (window-buffer w) (if (and (eq major-mode 'json-mode) (s-starts-with? "*govc-json*" (buffer-name))) (push (current-buffer) buffers)))) ) (if (= (length buffers) 2) (pop-to-buffer (diff-no-select (car buffers) (cadr buffers)))))) (defun govc-json-info (command selection) "Run govc COMMAND -json on SELECTION." (govc-process (govc-format-command command "-json" govc-args selection) (lambda () (let ((buffer (get-buffer-create (concat "*govc-json*" (if current-prefix-arg selection))))) (copy-to-buffer buffer (point-min) (point-max)) (with-current-buffer buffer (json-mode) ;; We use `json-mode-beautify' as `json-pretty-print-buffer' does not work for `govc-host-json-info' (json-mode-beautify)) (display-buffer buffer)))) (if current-prefix-arg (govc-json-diff))) (defun govc-mode-new-session () "Connect new session for the current govc mode." (interactive) (call-interactively 'govc-session) (revert-buffer)) (defun govc-host-with-session () "Host-mode with current session." (interactive) (govc-host nil (govc-current-session))) (defun govc-vm-with-session () "VM-mode with current session." (interactive) (govc-vm nil (govc-current-session))) (defun govc-datastore-with-session () "Datastore-mode with current session." (interactive) (govc-datastore nil (govc-current-session))) (defun govc-pool-with-session () "Pool-mode with current session." (interactive) (govc-pool nil (govc-current-session))) ;;; govc object mode (defvar-local govc-object-history '("-") "History list of visited objects.") (defun govc-object-collect () "Wrapper for govc object.collect." (interactive) (let ((id (car govc-args))) (add-to-list 'govc-object-history id) (setq govc-session-path id)) (govc-type-list-entries "object.collect")) (defun govc-object-collect-selection (&optional json) "Expand object selection via govc object.collect. Optionally specify JSON encoding." (interactive) (let* ((entry (or (tabulated-list-get-entry) (error "No entry"))) (name (elt entry 0)) (type (elt entry 1)) (val (elt entry 2))) (setq govc-args (list (car govc-args) name)) (cond ((s-blank? val)) ((and (not json) (s-ends-with? "types.ManagedObjectReference" type)) (let ((ids (govc "ls" "-L" (split-string val ",")))) (setq govc-args (list (govc-object-prompt "moid: " ids))))) ((string= val "...") (if (s-starts-with? "[]" type) (setq json t)))) (if json (govc-json-info "object.collect" nil) (tabulated-list-revert)))) (defun govc-object-collect-selection-json () "JSON object selection via govc object.collect." (interactive) (govc-object-collect-selection t)) (defun govc-object-next () "Next managed object reference." (interactive) (if (search-forward "types.ManagedObjectReference" nil t) (progn (govc-tabulated-list-unmark-all) (tabulated-list-put-tag (char-to-string dired-marker-char))) (goto-char (point-min)))) (defun govc-object-collect-parent () "Parent object selection if reachable, otherwise prompt with `govc-object-history'." (interactive) (if (cadr govc-args) (let ((prop (butlast (split-string (cadr govc-args) "\\.")))) (setq govc-args (list (car govc-args) (if prop (s-join "." prop))))) (save-excursion (goto-char (point-min)) (if (re-search-forward "^[[:space:]]*parent" nil t) (govc-object-collect-selection) (let ((id (govc-object-prompt "moid: " govc-object-history))) (setq govc-args (list id (if (string= id "-") "content"))))))) (tabulated-list-revert)) (defun govc-object (&optional moid property session) "Object browser aka MOB (Managed Object Browser). Optionally starting at MOID and PROPERTY if given. Inherit SESSION if given." (interactive) (let ((buffer (get-buffer-create "*govc-object*"))) (if (called-interactively-p 'interactive) (switch-to-buffer buffer) (pop-to-buffer buffer)) (govc-object-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-args (list (or moid "-") property)) (tabulated-list-print))) (defun govc-object-info () "Object browser via govc object.collect on `govc-selection'." (interactive) (if (equal major-mode 'govc-object-mode) (progn (setq govc-args (list (govc-object-prompt "moid: " govc-object-history))) (tabulated-list-revert)) (govc-object (tabulated-list-get-id) nil (govc-current-session)))) (defvar govc-object-mode-map (let ((map (make-sparse-keymap))) (define-key map "J" 'govc-object-collect-selection-json) (define-key map "N" 'govc-object-next) (define-key map "O" 'govc-object-info) (define-key map (kbd "DEL") 'govc-object-collect-parent) (define-key map (kbd "RET") 'govc-object-collect-selection) (define-key map "?" 'govc-object-popup) map) "Keymap for `govc-object-mode'.") (define-derived-mode govc-object-mode govc-tabulated-list-mode "Object" "Major mode for handling a govc object." (setq tabulated-list-format [("Name" 40 t) ("Type" 40 t) ("Value" 40 t)] tabulated-list-padding 2 tabulated-list-entries #'govc-object-collect) (tabulated-list-init-header)) (magit-define-popup govc-object-popup "Object popup." :actions (govc-keymap-popup govc-object-mode-map)) ;;; govc metric mode (defun govc-metric-sample () "Sample metrics." (interactive) (govc-shell-command (govc-format-command "metric.sample" govc-args govc-filter (govc-selection)))) (defun govc-metric-sample-plot () "Plot metric sample." (interactive) (let* ((type (if (and (display-images-p) (not (eq current-prefix-arg '-))) 'png 'dumb)) (max (if (member "-i" govc-args) "60" "180")) (args (append govc-args (list "-n" max "-plot" type govc-filter))) (session (govc-current-session)) (metrics (govc-selection))) (with-current-buffer (get-buffer-create "*govc*") (govc-session-clone session) (erase-buffer) (delete-other-windows) (if (eq type 'dumb) (split-window-right) (split-window-below)) (display-buffer-use-some-window (current-buffer) '((inhibit-same-window . t))) (--each metrics (let* ((cmd (govc-format-command "metric.sample" args it)) (data (govc-process cmd 'buffer-string))) (if (eq type 'dumb) (insert data) (insert-image (create-image (string-as-unibyte data) type t)))))))) (defun govc-metric-select (metrics) "Select metric names. METRICS is a regexp." (interactive (list (read-regexp "Select metrics" (regexp-quote ".usage.")))) (save-excursion (goto-char (point-min)) (while (not (eobp)) (if (string-match-p metrics (tabulated-list-get-id)) (govc-tabulated-list-mark) (govc-tabulated-list-unmark))))) (defun govc-metric-info () "Wrapper for govc metric.info." (govc-table-info "metric.info" (list govc-args (car govc-filter)))) (defvar govc-metric-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") 'govc-metric-sample) (define-key map (kbd "P") 'govc-metric-sample-plot) (define-key map (kbd "s") 'govc-metric-select) map) "Keymap for `govc-metric-mode'.") (defun govc-metric () "Metrics info." (interactive) (let ((session (govc-current-session)) (filter (or (govc-selection) (list govc-session-path))) (buffer (get-buffer-create "*govc-metric*"))) (pop-to-buffer buffer) (govc-metric-mode) (govc-session-clone session) (if current-prefix-arg (setq govc-args '("-i" "300"))) (setq govc-filter filter) (tabulated-list-print))) (define-derived-mode govc-metric-mode govc-tabulated-list-mode "Metric" "Major mode for handling a govc metric." (setq tabulated-list-format [("Name" 35 t) ("Group" 15 t) ("Unit" 4 t) ("Level" 5 t) ("Summary" 50)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-metric-info) (tabulated-list-init-header)) ;;; govc host mode (defun govc-ls-host () "List hosts." (govc "ls" "-t" "HostSystem" "host/*")) (defun govc-esxcli-netstat-info () "Wrapper for govc host.esxcli network ip connection list." (govc-table-info "host.esxcli" (append govc-args '("-hints=false" "--" "network" "ip" "connection" "list")))) (defun govc-esxcli-netstat (host) "Tabulated `govc-esxcli-netstat-info' HOST." (interactive (list (govc-object-prompt "Host: " 'govc-ls-host))) (let ((session (govc-current-session)) (buffer (get-buffer-create "*govc-esxcli*"))) (pop-to-buffer buffer) (tabulated-list-mode) (setq govc-args (list "-host" host)) (govc-session-clone session) (setq tabulated-list-format [("CCAlgo" 10 t) ("ForeignAddress" 20 t) ("LocalAddress" 20 t) ("Proto" 5 t) ("RecvQ" 5 t) ("SendQ" 5 t) ("State" 15 t) ("WorldID" 7 t) ("WorldName" 10 t)] tabulated-list-padding 2 tabulated-list-entries #'govc-esxcli-netstat-info) (tabulated-list-init-header) (tabulated-list-print))) (defun govc-host-esxcli-netstat () "Netstat via `govc-esxcli-netstat-info' with current host id." (interactive) (govc-esxcli-netstat (tabulated-list-get-id))) (defun govc-host-info () "Wrapper for govc host.info." (govc-table-info "host.info" (or govc-filter "*"))) (defun govc-host-json-info () "JSON via govc host.info -json on current selection." (interactive) (govc-json-info-selection "host.info")) (defvar govc-host-mode-map (let ((map (make-sparse-keymap))) (define-key map "E" 'govc-events) (define-key map "L" 'govc-logs) (define-key map "J" 'govc-host-json-info) (define-key map "M" 'govc-metric) (define-key map "N" 'govc-host-esxcli-netstat) (define-key map "O" 'govc-object-info) (define-key map "c" 'govc-mode-new-session) (define-key map "p" 'govc-pool-with-session) (define-key map "s" 'govc-datastore-with-session) (define-key map "v" 'govc-vm-with-session) (define-key map "?" 'govc-host-popup) map) "Keymap for `govc-host-mode'.") (defun govc-host (&optional filter session) "Host info via govc. Optionally filter by FILTER and inherit SESSION." (interactive) (let ((buffer (get-buffer-create "*govc-host*"))) (pop-to-buffer buffer) (govc-host-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-filter filter) (tabulated-list-print))) (define-derived-mode govc-host-mode govc-tabulated-list-mode "Host" "Major mode for handling a list of govc hosts." (setq tabulated-list-format [("Name" 30 t) ("Logical CPUs" 20 t) ("CPU usage" 25 t) ("Memory" 10 t) ("Memory usage" 25 t) ("Manufacturer" 13 t) ("Boot time" 15 t)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-host-info) (tabulated-list-init-header)) (magit-define-popup govc-host-popup "Host popup." :actions (govc-keymap-popup govc-host-mode-map)) (easy-menu-define govc-host-mode-menu govc-host-mode-map "Host menu." (cons "Host" (govc-keymap-menu govc-host-mode-map))) ;;; govc pool mode (defun govc-pool-destroy (name) "Destroy pool with given NAME." (interactive (list (completing-read "Destroy pool: " (govc "ls" "-t" "ResourcePool" "host/*")))) (govc "pool.destroy" name)) (defun govc-pool-destroy-selection () "Destroy via `govc-pool-destroy' on the pool selection." (interactive) (govc-do-selection 'govc-pool-destroy "Delete") (tabulated-list-revert)) (defun govc-pool-info () "Wrapper for govc pool.info." (govc-table-info "pool.info" (list "-a" (or govc-filter (setq govc-filter "*"))))) (defun govc-pool-json-info () "JSON via govc pool.info -json on current selection." (interactive) (govc-json-info-selection "pool.info")) (defvar govc-pool-mode-map (let ((map (make-sparse-keymap))) (define-key map "D" 'govc-pool-destroy-selection) (define-key map "E" 'govc-events) (define-key map "J" 'govc-pool-json-info) (define-key map "M" 'govc-metric) (define-key map "O" 'govc-object-info) (define-key map "c" 'govc-mode-new-session) (define-key map "h" 'govc-host-with-session) (define-key map "s" 'govc-datastore-with-session) (define-key map "v" 'govc-vm-with-session) (define-key map "?" 'govc-pool-popup) map) "Keymap for `govc-pool-mode'.") (defun govc-pool (&optional filter session) "Pool info via govc. Optionally filter by FILTER and inherit SESSION." (interactive) (let ((buffer (get-buffer-create "*govc-pool*"))) (pop-to-buffer buffer) (govc-pool-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-filter filter) (tabulated-list-print))) (define-derived-mode govc-pool-mode govc-tabulated-list-mode "Pool" "Major mode for handling a list of govc pools." (setq tabulated-list-format [("Name" 30 t) ("CPU Usage" 25 t) ("CPU Shares" 25 t) ("CPU Reservation" 25 t) ("CPU Limit" 10 t) ("Mem Usage" 25 t) ("Mem Shares" 25 t) ("Mem Reservation" 25 t) ("Mem Limit" 10 t)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-pool-info) (tabulated-list-init-header)) (magit-define-popup govc-pool-popup "Pool popup." :actions (govc-keymap-popup govc-pool-mode-map)) (easy-menu-define govc-host-mode-menu govc-pool-mode-map "Pool menu." (cons "Pool" (govc-keymap-menu govc-pool-mode-map))) ;;; govc datastore mode (defun govc-ls-datastore () "List datastores." (govc "ls" "datastore")) (defun govc-datastore-ls-entries () "Wrapper for govc datastore.ls." (let* ((data (govc-json "datastore.ls" "-l" "-p" govc-filter)) (file (plist-get (elt data 0) :File))) (-map (lambda (ent) (let ((name (plist-get ent :Path)) (size (plist-get ent :FileSize)) (time (plist-get ent :Modification)) (user (plist-get ent :Owner))) (list (concat govc-filter name) (vector (file-size-human-readable size) (current-time-string (date-to-time time)) name)))) file))) (defun govc-datastore-ls-parent () "Up to parent folder." (interactive) (if (s-blank? govc-filter) (let ((session (govc-current-session))) (govc-datastore-mode) (govc-session-clone session)) (setq govc-filter (file-name-directory (directory-file-name govc-filter)))) (tabulated-list-revert)) (defun govc-datastore-ls-child () "Open datastore folder or file." (interactive) (let ((id (tabulated-list-get-id))) (if current-prefix-arg (govc-shell-command (govc-format-command "datastore.ls" "-l" "-p" "-R" id)) (if (s-ends-with? "/" id) (progn (setq govc-filter id) (tabulated-list-revert)) (govc-datastore-open))))) (defun govc-datastore-open () "Open datastore file." (lexical-let* ((srcfile (tabulated-list-get-id)) (srcpath (format "[%s] %s" (file-name-nondirectory govc-session-datastore) (s-chop-prefix "/" srcfile))) (suffix (file-name-extension srcfile t)) (tmpfile (make-temp-file "govc-ds" nil suffix)) (session (govc-current-session))) (when (yes-or-no-p (concat "Open " srcpath "?")) (govc "datastore.download" srcfile tmpfile) (with-current-buffer (pop-to-buffer (find-file-noselect tmpfile)) (govc-session-clone session) (add-hook 'kill-buffer-hook (lambda () (with-demoted-errors (delete-file tmpfile))) t t) (add-hook 'after-save-hook (lambda () (if (yes-or-no-p (concat "Upload changes to " srcpath "?")) (with-demoted-errors (govc "datastore.upload" tmpfile srcfile)))) t t))))) (defun govc-datastore-tail () "Tail datastore file." (interactive) (govc-shell-command (govc-format-command "datastore.tail" (list "-n" govc-max-events (if current-prefix-arg "-f")) (govc-selection)))) (defun govc-datastore-disk-info () "Info datastore disk." (interactive) (delete-other-windows) (govc-shell-command (govc-format-command "datastore.disk.info" (if current-prefix-arg "-c") (govc-selection)))) (defun govc-datastore-ls-json () "JSON via govc datastore.ls -json on current selection." (interactive) (let ((govc-args '("-l" "-p"))) (govc-json-info-selection "datastore.ls"))) (defun govc-datastore-ls-r-json () "Search via govc datastore.ls -json -R on current selection." (interactive) (let ((govc-args '("-l" "-p" "-R"))) (govc-json-info-selection "datastore.ls"))) (defun govc-datastore-mkdir (name) "Mkdir via govc datastore.mkdir with given NAME." (interactive (list (read-from-minibuffer "Create directory: " govc-filter))) (govc "datastore.mkdir" name) (tabulated-list-revert)) (defun govc-datastore-rm (paths) "Delete datastore PATHS." (--each paths (govc "datastore.rm" (if current-prefix-arg "-f") it))) (defun govc-datastore-rm-selection () "Delete selected datastore paths." (interactive) (govc-do-selection 'govc-datastore-rm "Delete") (tabulated-list-revert)) (defvar govc-datastore-ls-mode-map (let ((map (make-sparse-keymap))) (define-key map "I" 'govc-datastore-disk-info) (define-key map "J" 'govc-datastore-ls-json) (define-key map "S" 'govc-datastore-ls-r-json) (define-key map "D" 'govc-datastore-rm-selection) (define-key map "T" 'govc-datastore-tail) (define-key map "+" 'govc-datastore-mkdir) (define-key map (kbd "DEL") 'govc-datastore-ls-parent) (define-key map (kbd "RET") 'govc-datastore-ls-child) (define-key map "?" 'govc-datastore-ls-popup) map) "Keymap for `govc-datastore-ls-mode'.") (defun govc-datastore-ls (&optional datastore session filter) "List govc datastore. Optionally specify DATASTORE, SESSION and FILTER." (interactive) (let ((buffer (get-buffer-create "*govc-datastore*"))) (pop-to-buffer buffer) (govc-datastore-ls-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-session-datastore (or datastore (govc-object-prompt "govc datastore: " 'govc-ls-datastore))) (setq govc-filter filter) (tabulated-list-print))) (define-derived-mode govc-datastore-ls-mode govc-tabulated-list-mode "Datastore" "Major mode govc datastore.ls." (setq tabulated-list-format [("Size" 10 t) ("Modification time" 25 t) ("Name" 40 t)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-datastore-ls-entries) (tabulated-list-init-header)) (magit-define-popup govc-datastore-ls-popup "Datastore ls popup." :actions (govc-keymap-popup govc-datastore-ls-mode-map)) (easy-menu-define govc-datastore-ls-mode-menu govc-datastore-ls-mode-map "Datastore ls menu." (cons "Datastore" (govc-keymap-menu govc-datastore-ls-mode-map))) (defvar govc-datastore-mode-map (let ((map (make-sparse-keymap))) (define-key map "J" 'govc-datastore-json-info) (define-key map "M" 'govc-metric) (define-key map "O" 'govc-object-info) (define-key map (kbd "RET") 'govc-datastore-ls-selection) (define-key map "c" 'govc-mode-new-session) (define-key map "h" 'govc-host-with-session) (define-key map "p" 'govc-pool-with-session) (define-key map "v" 'govc-vm-with-session) (define-key map "?" 'govc-datastore-popup) map) "Keymap for `govc-datastore-mode'.") (defun govc-datastore-json-info () "JSON via govc datastore.info -json on current selection." (interactive) (govc-json-info-selection "datastore.info")) (defun govc-datastore-info () "Wrapper for govc datastore.info." (govc-table-info "datastore.info" (or govc-filter "*"))) (defun govc-datastore-ls-selection () "Browse datastore." (interactive) (govc-datastore-ls (tabulated-list-get-id) (govc-current-session))) (defun govc-datastore (&optional filter session) "Datastore info via govc. Optionally filter by FILTER and inherit SESSION." (interactive) (let ((buffer (get-buffer-create "*govc-datastore*"))) (pop-to-buffer buffer) (govc-datastore-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-filter filter) (tabulated-list-print) (if (and govc-session-datastore (search-forward govc-session-datastore nil t)) (beginning-of-line)))) (define-derived-mode govc-datastore-mode tabulated-list-mode "Datastore" "Major mode for govc datastore.info." (setq tabulated-list-format [("Name" 15 t) ("Type" 10 t) ("Capacity" 10 t) ("Free" 10 t) ("Remote" 30 t)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-datastore-info) (tabulated-list-init-header)) (magit-define-popup govc-datastore-popup "Datastore popup." :actions (govc-keymap-popup govc-datastore-mode-map)) (easy-menu-define govc-datastore-mode-menu govc-datastore-mode-map "Datastore menu." (cons "Datastore" (govc-keymap-menu govc-datastore-mode-map))) ;;; govc vm mode (defun govc-vm-prompt (prompt) "PROMPT for a vm name." (completing-read prompt (govc "ls" "vm"))) (defun govc-vm-start (name) "Start vm with given NAME." (interactive (list (govc-vm-prompt "Start vm: "))) (govc "vm.power" "-on" name)) (defun govc-vm-shutdown (name) "Shutdown vm with given NAME." (interactive (list (govc-vm-prompt "Shutdown vm: "))) (govc "vm.power" "-s" "-force" name)) (defun govc-vm-reboot (name) "Reboot vm with given NAME." (interactive (list (govc-vm-prompt "Reboot vm: "))) (govc "vm.power" "-r" "-force" name)) (defun govc-vm-suspend (name) "Suspend vm with given NAME." (interactive (list (govc-vm-prompt "Suspend vm: "))) (govc "vm.power" "-suspend" name)) (defun govc-vm-destroy (name) "Destroy vm with given NAME." (interactive (list (govc-vm-prompt "Destroy vm: "))) (govc "vm.destroy" name)) (defun govc-vm-vnc-enable (name) "Enable vnc on vm with given NAME." (--map (last (split-string it)) (govc "vm.vnc" "-enable" "-port" "-1" "-password" (format "%08x" (random (expt 16 8))) name))) (defun govc-vm-vnc (name &optional arg) "VNC for vm with given NAME. By default, enable and open VNC for the given vm NAME. With prefix \\[negative-argument] ARG, VNC will be disabled. With prefix \\[universal-argument] ARG, VNC will be enabled but not opened." (interactive (list (govc-vm-prompt "VNC vm: ") current-prefix-arg)) (if (equal arg '-) (govc "vm.vnc" "-disable" name) (let ((urls (govc-vm-vnc-enable name))) (unless arg (-each (-flatten urls) 'browse-url))))) (defun govc-vm-screen (name &optional arg) "Console screenshot of vm NAME console. Open via `eww' by default, via `browse-url' if ARG is non-nil." (interactive (list (govc-vm-prompt "Console screenshot vm: ") current-prefix-arg)) (let* ((data (govc-json "vm.info" name)) (vms (plist-get data :VirtualMachines)) (url (govc-url-parse govc-session-url))) (mapc (lambda (vm) (let* ((moid (plist-get (plist-get vm :Self) :Value)) (on (string= "poweredOn" (plist-get (plist-get vm :Runtime) :PowerState))) (host (format "%s:%d" (url-host url) (or (url-port url) 443))) (path (concat "/screen?id=" moid)) (auth (concat (url-user url) ":" (url-password url)))) (if current-prefix-arg (browse-url (concat "https://" auth "@" host path)) (let ((creds `((,host ("VMware HTTP server" . ,(base64-encode-string auth))))) (url-basic-auth-storage 'creds) (u (concat "https://" host path))) (require 'eww) (if on (url-retrieve u 'eww-render (list u)) (kill-new (message u))))))) vms))) (defun govc-vm-start-selection () "Start via `govc-vm-start' on the current selection." (interactive) (govc-vm-start (govc-selection)) (tabulated-list-revert)) (defun govc-vm-shutdown-selection () "Shutdown via `govc-vm-shutdown' on the current selection." (interactive) (govc-vm-shutdown (govc-selection)) (tabulated-list-revert)) (defun govc-vm-reboot-selection () "Reboot via `govc-vm-reboot' on the current selection." (interactive) (govc-vm-reboot (govc-selection)) (tabulated-list-revert)) (defun govc-vm-suspend-selection () "Suspend via `govc-vm-suspend' on the current selection." (interactive) (govc-vm-suspend (govc-selection)) (tabulated-list-revert)) (defun govc-vm-destroy-selection () "Destroy via `govc-vm-destroy' on the current selection." (interactive) (govc-do-selection 'govc-vm-destroy "Destroy") (tabulated-list-revert)) (defun govc-vm-vnc-selection () "VNC via `govc-vm-vnc' on the current selection." (interactive) (govc-vm-vnc (govc-selection) current-prefix-arg)) (defun govc-vm-screen-selection () "Console screenshot via `govc-vm-screen' on the current selection." (interactive) (govc-vm-screen (govc-selection) current-prefix-arg)) (defun govc-vm-info () "Wrapper for govc vm.info." (govc-table-info "vm.info" (list "-r" (or govc-filter (setq govc-filter "*"))))) (defun govc-vm-host () "Host info via `govc-host' with host(s) of current selection." (interactive) (govc-host (concat "*/" (govc-table-column-value "Host")) (govc-current-session))) (defun govc-vm-datastore () "Datastore via `govc-datastore-ls' with datastore of current selection." (interactive) (if current-prefix-arg (govc-datastore (s-split ", " (govc-table-column-value "Storage") t) (govc-current-session)) (let* ((data (govc-json "vm.info" (tabulated-list-get-id))) (vm (elt (plist-get data :VirtualMachines) 0)) (dir (plist-get (plist-get (plist-get vm :Config) :Files) :LogDirectory)) (args (s-split "\\[\\|\\]" dir t))) (govc-datastore-ls (first args) (govc-current-session) (concat (s-trim (second args)) "/"))))) (defun govc-vm-ping () "Ping VM." (interactive) (let ((ping-program-options '("-c" "20"))) (ping (govc-table-column-value "IP address")))) (defun govc-vm-device-ls () "Devices via `govc-device' on the current selection." (interactive) (govc-device (tabulated-list-get-id) (govc-current-session))) (defun govc-vm-extra-config () "Populate table with govc vm.info -e output." (let* ((data (govc-json "vm.info" govc-args)) (vms (plist-get data :VirtualMachines)) (info)) (mapc (lambda (vm) (let* ((config (plist-get vm :Config)) (name (plist-get config :Name))) (mapc (lambda (x) (let ((key (plist-get x :Key)) (val (plist-get x :Value))) (push (list key (vector key val)) info))) (plist-get config :ExtraConfig)) (if (> (length vms) 1) (push (list name (vector "vm.name" name)) info)))) vms) info)) (defun govc-vm-extra-config-table () "ExtraConfig via `govc-vm-extra-config' on the current selection." (interactive) (govc-map-info-table #'govc-vm-extra-config)) (defun govc-vm-json-info () "JSON via govc vm.info -json on current selection." (interactive) (govc-json-info-selection "vm.info")) (defvar govc-vm-mode-map (let ((map (make-sparse-keymap))) (define-key map "E" 'govc-events) (define-key map "J" 'govc-vm-json-info) (define-key map "O" 'govc-object-info) (define-key map "X" 'govc-vm-extra-config-table) (define-key map (kbd "RET") 'govc-vm-device-ls) (define-key map "C" 'govc-vm-screen-selection) (define-key map "V" 'govc-vm-vnc-selection) (define-key map "D" 'govc-vm-destroy-selection) (define-key map "^" 'govc-vm-start-selection) (define-key map "!" 'govc-vm-shutdown-selection) (define-key map "@" 'govc-vm-reboot-selection) (define-key map "&" 'govc-vm-suspend-selection) (define-key map "H" 'govc-vm-host) (define-key map "M" 'govc-metric) (define-key map "P" 'govc-vm-ping) (define-key map "S" 'govc-vm-datastore) (define-key map "c" 'govc-mode-new-session) (define-key map "h" 'govc-host-with-session) (define-key map "p" 'govc-pool-with-session) (define-key map "s" 'govc-datastore-with-session) (define-key map "?" 'govc-vm-popup) map) "Keymap for `govc-vm-mode'.") (defun govc-vm (&optional filter session) "VM info via govc. Optionally filter by FILTER and inherit SESSION." (interactive) (let ((buffer (get-buffer-create "*govc-vm*"))) (pop-to-buffer buffer) (govc-vm-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-filter filter) (tabulated-list-print))) (define-derived-mode govc-vm-mode govc-tabulated-list-mode "VM" "Major mode for handling a list of govc vms." (setq tabulated-list-format [("Name" 40 t) ("Power state" 12 t) ("Boot time" 13 t) ("IP address" 15 t) ("Guest name" 20 t) ("Host" 20 t) ("CPU usage" 15 t) ("Host memory usage" 18 t) ("Guest memory usage" 19 t) ("Storage committed" 18 t) ("Storage" 10 t) ("Network" 10 t)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-vm-info) (tabulated-list-init-header)) (magit-define-popup govc-vm-popup "VM popup." :actions (govc-keymap-popup govc-vm-mode-map)) (easy-menu-define govc-vm-mode-menu govc-vm-mode-map "VM menu." (cons "VM" (govc-keymap-menu govc-vm-mode-map))) ;;; govc device mode (defun govc-device-ls () "Wrapper for govc device.ls -vm VM." (govc-type-list-entries "device.ls")) (defun govc-device-info () "Populate table with govc device.info output." (govc-map-info "device.info" govc-args)) (defun govc-device-info-table () "Tabulated govc device.info." (interactive) (govc-map-info-table #'govc-device-info)) (defun govc-device-json-info () "JSON via govc device.info -json on current selection." (interactive) (govc-json-info-selection "device.info")) (defvar govc-device-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "J") 'govc-device-json-info) (define-key map (kbd "RET") 'govc-device-info-table) map) "Keymap for `govc-device-mode'.") (defun govc-device (&optional vm session) "List govc devices for VM. Optionally inherit SESSION." (interactive) (let ((buffer (get-buffer-create "*govc-device*"))) (pop-to-buffer buffer) (govc-device-mode) (if session (govc-session-clone session) (call-interactively 'govc-session)) (setq govc-args (list "-vm" (or vm (govc-vm-prompt "vm: ")))) (tabulated-list-print))) (define-derived-mode govc-device-mode govc-tabulated-list-mode "Device" "Major mode for handling a govc device." (setq tabulated-list-format [("Name" 15 t) ("Type" 30 t) ("Summary" 40 t)] tabulated-list-sort-key (cons "Name" nil) tabulated-list-padding 2 tabulated-list-entries #'govc-device-ls) (tabulated-list-init-header)) (magit-define-popup govc-popup "govc popup." :actions (govc-keymap-list govc-command-map)) (easy-menu-change '("Tools") "govc" (govc-keymap-menu govc-command-map) "Search Files (Grep)...") (provide 'govc) ;;; govc.el ends here govmomi-0.15.0/govc/emacs/test/000077500000000000000000000000001312205533500162565ustar00rootroot00000000000000govmomi-0.15.0/govc/emacs/test/govc-test.el000066400000000000000000000112311312205533500205110ustar00rootroot00000000000000(defconst testsuite-dir (if load-file-name (file-name-directory load-file-name) ;; Fall back to default directory (in case of M-x eval-buffer) default-directory) "Directory of the test suite.") (defconst govc-test-helper-path (concat (expand-file-name (concat testsuite-dir "/../../test/test_helper.bash")))) (load (expand-file-name "../govc" testsuite-dir) nil :no-message) (ert-deftest test-govc-url-parse () (dolist (u '("root:vagrant@localhost:18443" "Administrator@vsphere.local:vagrant@localhost" "https://root:vagrant@localhost:18443/sdk" "https://Administrator@vsphere.local:vagrant@localhost/sdk")) (should (equal u (url-recreate-url (govc-url-parse u)))))) (ert-deftest test-govc-session-set-url () (should (equal govc-session-insecure nil)) (should (equal govc-session-datacenter nil)) (with-temp-buffer (govc-session-set-url "vc.example.com?insecure=true&datacenter=foo&ignored=true") (should (equal govc-session-insecure "true")) (should (equal govc-session-datacenter "foo")) (should (equal govc-session-datastore nil)))) (ert-deftest test-govc-copy-environment () (let ((process-environment) (govc-session-url "vc.example.com") (govc-session-insecure "false") (govc-session-datacenter "dc1") (govc-session-datastore "ds1") (govc-session-network "net1")) (govc-export-environment '-) (dolist (e govc-environment-map) (should (equal nil (getenv (car e))))) (govc-export-environment (universal-argument)) (dolist (e govc-environment-map) (should (not (equal nil (getenv (car e)))))))) (defun govc-test-env () (let ((url (getenv "GOVC_TEST_URL"))) (unless url (ert-skip "env GOVC_TEST_URL not set")) (setq govc-session-url url govc-session-insecure "true"))) (defun govc-test-helper (arg) (shell-command-to-string (format "bash -c \"source %s; %s\"" govc-test-helper-path arg))) (defun govc-test-new-vm () (s-trim-right (govc-test-helper "new_empty_vm"))) (defun govc-test-new-id () (s-trim-right (govc-test-helper "new_id"))) (defun govc-test-teardown () (ignore-errors (govc-test-helper "teardown"))) (ert-deftest test-govc-vm-info () (govc-test-env) (unwind-protect (let ((id (govc-test-new-vm))) (govc-json-info "vm.info" (list id)) (with-current-buffer "*govc-json*" (goto-char (point-min)) (let ((data (json-read))) (should (= (length data) 1)) (should (cdr (assq 'VirtualMachines data))))) (govc-json-info "vm.info" (list "ENOENT")) (with-current-buffer "*govc-json*" (goto-char (point-min)) (let ((data (json-read))) (should (= (length data) 1)) (should (not (cdr (assq 'VirtualMachines data)))))) (let ((govc-args (list id)) (len1) (len2)) (setq len1 (length (govc-vm-extra-config))) (should (>= len1 1)) (govc "vm.change" "-vm" id "-e" "govc-test-one=1" "-e" "govc-test-two:2.2=2" ;; test that we don't choke on \n "-e" "foo=bar baz") (setq len2 (length (govc-vm-extra-config))) (should (= (- len2 len1) 3))) (let ((govc-filter "*")) (should (>= (length (govc-vm-info)) 1))) (let ((govc-filter "ENOENT")) (should (= (length (govc-vm-info)) 0))) (govc-vm-screen id)) (govc-test-teardown))) (ert-deftest test-govc-datastore-ls-entries () (govc-test-env) (unwind-protect (let ((id (govc-test-new-id))) (should (>= (length (govc-datastore-ls-entries)) 1)) (let ((govc-filter (concat id "/"))) (should-error (govc-datastore-ls-entries)) (govc "datastore.mkdir" id) (should (= (length (govc-datastore-ls-entries)) 0)) (dotimes (i 3) (govc "datastore.mkdir" (format "%s/dir %d" id i))) (let ((entries (govc-datastore-ls-entries))) (should (= (length entries) 3)) (should (s-starts-with? (concat id "/dir ") (caar entries)))))) (govc-test-teardown))) (ert-deftest test-govc-pool-ls () (govc-test-env) (unwind-protect (let* ((pools (govc-ls-pool)) (num (length pools)) (path (concat (car pools) "/" (govc-test-new-id)))) (should (>= num 1)) (message "%d existing pools [%S]" num pools) (govc "pool.create" path) (setq pools (govc-ls-pool)) (govc-pool-destroy path) (should (= (- (length pools) num) 1))) (govc-test-teardown))) (ert-deftest test-govc-about () (govc-test-env) (govc "about")) govmomi-0.15.0/govc/emacs/test/make.el000077500000000000000000000056421312205533500175270ustar00rootroot00000000000000#!/usr/bin/env emacs --script (let ((current-directory (file-name-directory load-file-name))) (setq project-test-path (expand-file-name "." current-directory)) (setq project-root-path (expand-file-name ".." current-directory))) (add-to-list 'load-path project-root-path) (add-to-list 'load-path project-test-path) (require 'lisp-mnt) (require 'govc) (require 's) (defun make-test () (dolist (test-file (or argv (directory-files project-test-path t "-test.el$"))) (load test-file nil t)) (ert-run-tests-batch-and-exit t)) (defun govc-help () "Summary of govc modes in markdown format." (interactive) (with-help-window (help-buffer) ; TODO: this turned into a mess, but does the job of generating README.md from govc.el (dolist (kind '(govc-mode govc-urls govc-session-url govc-session-insecure govc-session-datacenter govc-session-datastore govc-session-network tabulated-list host pool datastore datastore-ls vm device object metric)) (let* ((name (if (boundp kind) (symbol-name kind) (format "govc-%s-mode" kind))) (map (if (equal 'govc-mode kind) 'govc-command-map (intern (concat name "-map")))) (doc (lambda (f &optional all) (let* ((txt (if (functionp f) (documentation f t) (documentation-property f 'variable-documentation))) (ix (if all (length txt) (s-index-of "." txt)))) (s-replace (format "\n\n\\\{%s\}" (concat name "-map")) "" (s-replace "'" "`" (substring txt 0 ix))))))) (princ (concat (s-repeat (if (and (boundp kind) (not (fboundp kind))) 3 2) "#") " " name "\n")) (princ (concat "\n" (funcall doc (intern name) t) "\n\n")) (when (boundp map) (princ (concat "### " (symbol-name map) "\n\n")) (princ "Keybinding | Description\n") (princ "---------------|------------------------------------------------------------\n") (dolist (kl (govc-keymap-list (symbol-value map))) (let ((key (govc-key-description (car kl)))) (princ (format "%s%s| %s\n" key (s-repeat (- 4 (length key)) " ") (funcall doc (nth 2 kl)))))) (princ "\n")))))) (defun make-docs () (let ((commentary) (summary)) (with-current-buffer (find-file-noselect (concat project-root-path "/govc.el")) (setq commentary (s-replace ";;; Commentary:" "" (lm-commentary)) summary (lm-summary))) (let ((readme (find-file-noselect (concat project-root-path "/README.md")))) (with-current-buffer readme (erase-buffer) (govc-help) (with-current-buffer (help-buffer) (copy-to-buffer readme (point-min) (point-max))) (goto-char (point-min)) (insert (concat "# govc.el\n\n" summary ".\n")) (insert (s-replace "'" "`" (replace-regexp-in-string ";; ?" "" commentary t t))) (save-buffer 0))))) govmomi-0.15.0/govc/env/000077500000000000000000000000001312205533500147775ustar00rootroot00000000000000govmomi-0.15.0/govc/env/command.go000066400000000000000000000043511312205533500167470ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package env import ( "context" "flag" "fmt" "io" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type env struct { *flags.OutputFlag *flags.ClientFlag extra bool } func init() { cli.Register("env", &env{}) } func (cmd *env) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) f.BoolVar(&cmd.extra, "x", false, "Output variables for each GOVC_URL component") } func (cmd *env) Process(ctx context.Context) error { if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.ClientFlag.Process(ctx); err != nil { return err } return nil } func (cmd *env) Description() string { return `Output the environment variables for this client. If credentials are included in the url, they are split into separate variables. Useful as bash scripting helper to parse GOVC_URL.` } func (cmd *env) Run(ctx context.Context, f *flag.FlagSet) error { env := envResult(cmd.ClientFlag.Environ(cmd.extra)) if f.NArg() > 1 { return flag.ErrHelp } // Option to just output the value, example use: // password=$(govc env GOVC_PASSWORD) if f.NArg() == 1 { var output []string prefix := fmt.Sprintf("%s=", f.Arg(0)) for _, e := range env { if strings.HasPrefix(e, prefix) { output = append(output, e[len(prefix):]) break } } return cmd.WriteResult(envResult(output)) } return cmd.WriteResult(env) } type envResult []string func (r envResult) Write(w io.Writer) error { for _, e := range r { fmt.Println(e) } return nil } govmomi-0.15.0/govc/events/000077500000000000000000000000001312205533500155135ustar00rootroot00000000000000govmomi-0.15.0/govc/events/command.go000066400000000000000000000064471312205533500174730ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package events import ( "context" "flag" "fmt" "os" "strings" "time" "github.com/vmware/govmomi/event" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type events struct { *flags.DatacenterFlag Max int32 Tail bool Force bool } func init() { // initialize with the maximum allowed objects set cli.Register("events", &events{}) } func (cmd *events) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.Max = 25 // default f.Var(flags.NewInt32(&cmd.Max), "n", "Output the last N events") f.BoolVar(&cmd.Tail, "f", false, "Follow event stream") f.BoolVar(&cmd.Force, "force", false, "Disable number objects to monitor limit") } func (cmd *events) Description() string { return `Display events. Examples: govc events vm/my-vm1 vm/my-vm2 govc events /dc1/vm/* /dc2/vm/* govc ls -t HostSystem host/* | xargs govc events | grep -i vsan` } func (cmd *events) Usage() string { return "[PATH]..." } func (cmd *events) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *events) printEvents(ctx context.Context, obj *types.ManagedObjectReference, page []types.BaseEvent, m *event.Manager) error { event.Sort(page) if obj != nil { // print the object reference fmt.Fprintf(os.Stdout, "\n==> %s <==\n", obj.String()) } for _, e := range page { cat, err := m.EventCategory(ctx, e) if err != nil { return err } event := e.GetEvent() msg := strings.TrimSpace(event.FullFormattedMessage) // if this is a TaskEvent gather a little more information if t, ok := e.(*types.TaskEvent); ok { // some tasks won't have this information, so just use the event message if t.Info.Entity != nil { msg = fmt.Sprintf("%s (target=%s %s)", msg, t.Info.Entity.Type, t.Info.EntityName) } } fmt.Fprintf(os.Stdout, "[%s] [%s] %s\n", event.CreatedTime.Local().Format(time.ANSIC), cat, msg) } return nil } func (cmd *events) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } objs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } if len(objs) > 0 { // need an event manager m := event.NewManager(c) // get the event stream err = m.Events(ctx, objs, cmd.Max, cmd.Tail, cmd.Force, func(obj types.ManagedObjectReference, ee []types.BaseEvent) error { var o *types.ManagedObjectReference if len(objs) > 1 { o = &obj } err = cmd.printEvents(ctx, o, ee, m) if err != nil { return err } return nil }) if err != nil { return err } } return nil } govmomi-0.15.0/govc/examples/000077500000000000000000000000001312205533500160255ustar00rootroot00000000000000govmomi-0.15.0/govc/examples/lib/000077500000000000000000000000001312205533500165735ustar00rootroot00000000000000govmomi-0.15.0/govc/examples/lib/ssh.sh000066400000000000000000000015441312205533500177300ustar00rootroot00000000000000function public-key { local dir=${HOME}/.ssh for f in $HOME/.ssh/{id_{rsa,dsa},*}.pub; do if [ -r $f ]; then echo $f return fi done echo "Can't find public key file..." exit 1 } PUBLIC_KEY_FILE=${PUBLIC_KEY_FILE-$(public-key)} SSH_OPTS="-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oLogLevel=quiet" function upload-public-key { local vm_name=$1 local dir=$2 if [ -z "$dir" ] then uid=$(echo $GOVC_GUEST_LOGIN | awk -F: '{print $1}') dir=$(govc guest.getenv -vm ${vm_name} HOME | awk -F= '{print $2}') if [ -z "$dir" ] then echo "Can't find ${uid}'s HOME dir..." exit 1 fi fi govc guest.mkdir \ -vm ${vm_name} \ -p \ ${dir}/.ssh govc guest.upload \ -vm ${vm_name} \ -f \ ${PUBLIC_KEY_FILE} \ ${dir}/.ssh/authorized_keys } govmomi-0.15.0/govc/examples/vcsa.sh000077500000000000000000000023551312205533500173250ustar00rootroot00000000000000#!/bin/bash -e lib=$(readlink -nf $(dirname $0))/lib . $lib/ssh.sh ova=$1 if [ -z "$ova" ] then ova=./VMware-vCenter-Server-Appliance-5.5.0.10300-2000350_OVF10.ova fi # default to local Vagrant esxbox for testing export GOVC_URL=${GOVC_URL-"https://root:vagrant@localhost:8443/sdk"} # default VCSA credentials export GOVC_GUEST_LOGIN=root:vmware # VM name as defined in the VCSA .ovf vm_name=VMware_vCenter_Server_Appliance echo "Importing $ova..." govc import.ova $ova echo "Powering on $vm_name..." govc vm.power -on $vm_name echo "Waiting for $vm_name's IP address..." vc=$(govc vm.ip $vm_name) govc vm.info $vm_name echo "Uploading ssh public key to $vm_name..." upload-public-key $vm_name echo "Configuring vCenter Server Appliance..." # http://www.virtuallyghetto.com/2012/02/automating-vcenter-server-appliance.html ssh ${SSH_OPTS} root@$vc < 1 return nil, flag.err } return flag.dc, err } func (flag *DatacenterFlag) DatacenterIfSpecified() (*object.Datacenter, error) { if flag.path == "" { return nil, nil } return flag.Datacenter() } func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, error) { var refs []types.ManagedObjectReference c, err := flag.Client() if err != nil { return nil, err } if len(args) == 0 { refs = append(refs, c.ServiceContent.RootFolder) return refs, nil } finder, err := flag.Finder() if err != nil { return nil, err } for _, arg := range args { elements, err := finder.ManagedObjectList(ctx, arg) if err != nil { return nil, err } if len(elements) == 0 { return nil, fmt.Errorf("object '%s' not found", arg) } for _, e := range elements { refs = append(refs, e.Object.Reference()) } } return refs, nil } govmomi-0.15.0/govc/flags/datastore.go000066400000000000000000000052471312205533500176300ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type DatastoreFlag struct { common *DatacenterFlag Name string ds *object.Datastore } var datastoreFlagKey = flagKey("datastore") // NewCustomDatastoreFlag creates and returns a new DatastoreFlag without // trying to retrieve an existing one from the specified context. func NewCustomDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context) { v := &DatastoreFlag{} v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) return v, ctx } func NewDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context) { if v := ctx.Value(datastoreFlagKey); v != nil { return v.(*DatastoreFlag), ctx } v, ctx := NewCustomDatastoreFlag(ctx) ctx = context.WithValue(ctx, datastoreFlagKey, v) return v, ctx } func (f *DatastoreFlag) Register(ctx context.Context, fs *flag.FlagSet) { f.RegisterOnce(func() { f.DatacenterFlag.Register(ctx, fs) env := "GOVC_DATASTORE" value := os.Getenv(env) usage := fmt.Sprintf("Datastore [%s]", env) fs.StringVar(&f.Name, "ds", value, usage) }) } func (f *DatastoreFlag) Process(ctx context.Context) error { return f.ProcessOnce(func() error { if err := f.DatacenterFlag.Process(ctx); err != nil { return err } return nil }) } func (f *DatastoreFlag) Datastore() (*object.Datastore, error) { if f.ds != nil { return f.ds, nil } finder, err := f.Finder() if err != nil { return nil, err } if f.ds, err = finder.DatastoreOrDefault(context.TODO(), f.Name); err != nil { return nil, err } return f.ds, nil } func (flag *DatastoreFlag) DatastoreIfSpecified() (*object.Datastore, error) { if flag.Name == "" { return nil, nil } return flag.Datastore() } func (f *DatastoreFlag) DatastorePath(name string) (string, error) { ds, err := f.Datastore() if err != nil { return "", err } return ds.Path(name), nil } func (f *DatastoreFlag) Stat(ctx context.Context, file string) (types.BaseFileInfo, error) { ds, err := f.Datastore() if err != nil { return nil, err } return ds.Stat(ctx, file) } govmomi-0.15.0/govc/flags/debug.go000066400000000000000000000040641312205533500167240ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "path/filepath" "strings" "time" "github.com/vmware/govmomi/vim25/debug" ) type DebugFlag struct { common enable bool } var debugFlagKey = flagKey("debug") func NewDebugFlag(ctx context.Context) (*DebugFlag, context.Context) { if v := ctx.Value(debugFlagKey); v != nil { return v.(*DebugFlag), ctx } v := &DebugFlag{} ctx = context.WithValue(ctx, debugFlagKey, v) return v, ctx } func (flag *DebugFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { env := "GOVC_DEBUG" enable := false switch env := strings.ToLower(os.Getenv(env)); env { case "1", "true": enable = true } usage := fmt.Sprintf("Store debug logs [%s]", env) f.BoolVar(&flag.enable, "debug", enable, usage) }) } func (flag *DebugFlag) Process(ctx context.Context) error { if !flag.enable { return nil } return flag.ProcessOnce(func() error { // Base path for storing debug logs. r := os.Getenv("GOVC_DEBUG_PATH") if r == "" { r = home } r = filepath.Join(r, "debug") // Path for this particular run. run := os.Getenv("GOVC_DEBUG_PATH_RUN") if run == "" { now := time.Now().Format("2006-01-02T15-04-05.999999999") r = filepath.Join(r, now) } else { // reuse the same path r = filepath.Join(r, run) _ = os.RemoveAll(r) } err := os.MkdirAll(r, 0700) if err != nil { return err } p := debug.FileProvider{ Path: r, } debug.SetProvider(&p) return nil }) } govmomi-0.15.0/govc/flags/empty.go000066400000000000000000000014521312205533500167720ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" ) type EmptyFlag struct{} func (flag *EmptyFlag) Register(ctx context.Context, f *flag.FlagSet) { } func (flag *EmptyFlag) Process(ctx context.Context) error { return nil } govmomi-0.15.0/govc/flags/folder.go000066400000000000000000000052551312205533500171140ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" ) type FolderFlag struct { common *DatacenterFlag name string folder *object.Folder } var folderFlagKey = flagKey("folder") func NewFolderFlag(ctx context.Context) (*FolderFlag, context.Context) { if v := ctx.Value(folderFlagKey); v != nil { return v.(*FolderFlag), ctx } v := &FolderFlag{} v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) ctx = context.WithValue(ctx, folderFlagKey, v) return v, ctx } func (flag *FolderFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { flag.DatacenterFlag.Register(ctx, f) env := "GOVC_FOLDER" value := os.Getenv(env) usage := fmt.Sprintf("Inventory folder [%s]", env) f.StringVar(&flag.name, "folder", value, usage) }) } func (flag *FolderFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } return nil }) } func (flag *FolderFlag) Folder() (*object.Folder, error) { if flag.folder != nil { return flag.folder, nil } finder, err := flag.Finder() if err != nil { return nil, err } if flag.folder, err = finder.FolderOrDefault(context.TODO(), flag.name); err != nil { return nil, err } return flag.folder, nil } func (flag *FolderFlag) FolderOrDefault(kind string) (*object.Folder, error) { if flag.folder != nil { return flag.folder, nil } if flag.name != "" { return flag.Folder() } // RootFolder, no dc required if kind == "/" { client, err := flag.Client() if err != nil { return nil, err } flag.folder = object.NewRootFolder(client) return flag.folder, nil } dc, err := flag.Datacenter() if err != nil { return nil, err } folders, err := dc.Folders(context.TODO()) if err != nil { return nil, err } switch kind { case "vm": flag.folder = folders.VmFolder case "host": flag.folder = folders.HostFolder case "datastore": flag.folder = folders.DatastoreFolder case "network": flag.folder = folders.NetworkFolder default: panic(kind) } return flag.folder, nil } govmomi-0.15.0/govc/flags/host_connect.go000066400000000000000000000055461312205533500203320ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "net/http" "net/url" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/types" ) type HostConnectFlag struct { common types.HostConnectSpec noverify bool } var hostConnectFlagKey = flagKey("hostConnect") func NewHostConnectFlag(ctx context.Context) (*HostConnectFlag, context.Context) { if v := ctx.Value(hostConnectFlagKey); v != nil { return v.(*HostConnectFlag), ctx } v := &HostConnectFlag{} ctx = context.WithValue(ctx, hostConnectFlagKey, v) return v, ctx } func (flag *HostConnectFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { f.StringVar(&flag.HostName, "hostname", "", "Hostname or IP address of the host") f.StringVar(&flag.UserName, "username", "", "Username of administration account on the host") f.StringVar(&flag.Password, "password", "", "Password of administration account on the host") f.StringVar(&flag.SslThumbprint, "thumbprint", "", "SHA-1 thumbprint of the host's SSL certificate") f.BoolVar(&flag.Force, "force", false, "Force when host is managed by another VC") f.BoolVar(&flag.noverify, "noverify", false, "Accept host thumbprint without verification") }) } func (flag *HostConnectFlag) Process(ctx context.Context) error { return nil } // Spec attempts to fill in SslThumbprint if empty. // First checks GOVC_TLS_KNOWN_HOSTS, if not found and noverify=true then // use object.HostCertificateInfo to get the thumbprint. func (flag *HostConnectFlag) Spec(c *vim25.Client) types.HostConnectSpec { spec := flag.HostConnectSpec if spec.SslThumbprint == "" { spec.SslThumbprint = c.Thumbprint(spec.HostName) if spec.SslThumbprint == "" && flag.noverify { var info object.HostCertificateInfo t := c.Transport.(*http.Transport) _ = info.FromURL(&url.URL{Host: spec.HostName}, t.TLSClientConfig) spec.SslThumbprint = info.ThumbprintSHA1 } } return spec } // Fault checks if error is SSLVerifyFault, including the thumbprint if so func (flag *HostConnectFlag) Fault(err error) error { if err == nil { return nil } if f, ok := err.(types.HasFault); ok { switch fault := f.Fault().(type) { case *types.SSLVerifyFault: return fmt.Errorf("%s thumbprint=%s", err, fault.Thumbprint) } } return err } govmomi-0.15.0/govc/flags/host_system.go000066400000000000000000000063311312205533500202160ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" ) type HostSystemFlag struct { common *ClientFlag *DatacenterFlag *SearchFlag name string host *object.HostSystem pool *object.ResourcePool } var hostSystemFlagKey = flagKey("hostSystem") func NewHostSystemFlag(ctx context.Context) (*HostSystemFlag, context.Context) { if v := ctx.Value(hostSystemFlagKey); v != nil { return v.(*HostSystemFlag), ctx } v := &HostSystemFlag{} v.ClientFlag, ctx = NewClientFlag(ctx) v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) v.SearchFlag, ctx = NewSearchFlag(ctx, SearchHosts) ctx = context.WithValue(ctx, hostSystemFlagKey, v) return v, ctx } func (flag *HostSystemFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { flag.ClientFlag.Register(ctx, f) flag.DatacenterFlag.Register(ctx, f) flag.SearchFlag.Register(ctx, f) env := "GOVC_HOST" value := os.Getenv(env) usage := fmt.Sprintf("Host system [%s]", env) f.StringVar(&flag.name, "host", value, usage) }) } func (flag *HostSystemFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.ClientFlag.Process(ctx); err != nil { return err } if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } if err := flag.SearchFlag.Process(ctx); err != nil { return err } return nil }) } func (flag *HostSystemFlag) HostSystemIfSpecified() (*object.HostSystem, error) { if flag.host != nil { return flag.host, nil } // Use search flags if specified. if flag.SearchFlag.IsSet() { host, err := flag.SearchFlag.HostSystem() if err != nil { return nil, err } flag.host = host return flag.host, nil } // Never look for a default host system. // A host system parameter is optional for vm creation. It uses a mandatory // resource pool parameter to determine where the vm should be placed. if flag.name == "" { return nil, nil } finder, err := flag.Finder() if err != nil { return nil, err } flag.host, err = finder.HostSystem(context.TODO(), flag.name) return flag.host, err } func (flag *HostSystemFlag) HostSystem() (*object.HostSystem, error) { host, err := flag.HostSystemIfSpecified() if err != nil { return nil, err } if host != nil { return host, nil } finder, err := flag.Finder() if err != nil { return nil, err } flag.host, err = finder.DefaultHostSystem(context.TODO()) return flag.host, err } func (flag *HostSystemFlag) HostNetworkSystem() (*object.HostNetworkSystem, error) { host, err := flag.HostSystem() if err != nil { return nil, err } return host.ConfigManager().NetworkSystem(context.TODO()) } govmomi-0.15.0/govc/flags/int32.go000066400000000000000000000030731312205533500165740ustar00rootroot00000000000000/* Copyright (c) 2016-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "flag" "fmt" "strconv" ) // This flag type is internal to stdlib: // https://github.com/golang/go/blob/master/src/cmd/internal/obj/flag.go type int32Value int32 func (i *int32Value) Set(s string) error { v, err := strconv.ParseInt(s, 0, 32) *i = int32Value(v) return err } func (i *int32Value) Get() interface{} { return int32(*i) } func (i *int32Value) String() string { return fmt.Sprintf("%v", *i) } // NewInt32 behaves as flag.IntVar, but using an int32 type. func NewInt32(v *int32) flag.Value { return (*int32Value)(v) } type int32ptrValue struct { val **int32 } func (i *int32ptrValue) Set(s string) error { v, err := strconv.ParseInt(s, 0, 32) *i.val = new(int32) **i.val = int32(v) return err } func (i *int32ptrValue) Get() interface{} { if i.val == nil { return -1 } return *i.val } func (i *int32ptrValue) String() string { return fmt.Sprintf("%v", i.Get()) } func NewOptionalInt32(v **int32) flag.Value { return &int32ptrValue{val: v} } govmomi-0.15.0/govc/flags/network.go000066400000000000000000000056551312205533500173360ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type NetworkFlag struct { common *DatacenterFlag name string net object.NetworkReference adapter string address string isset bool } var networkFlagKey = flagKey("network") func NewNetworkFlag(ctx context.Context) (*NetworkFlag, context.Context) { if v := ctx.Value(networkFlagKey); v != nil { return v.(*NetworkFlag), ctx } v := &NetworkFlag{} v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) ctx = context.WithValue(ctx, networkFlagKey, v) return v, ctx } func (flag *NetworkFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { flag.DatacenterFlag.Register(ctx, f) env := "GOVC_NETWORK" value := os.Getenv(env) flag.name = value usage := fmt.Sprintf("Network [%s]", env) f.Var(flag, "net", usage) f.StringVar(&flag.adapter, "net.adapter", "e1000", "Network adapter type") f.StringVar(&flag.address, "net.address", "", "Network hardware address") }) } func (flag *NetworkFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } return nil }) } func (flag *NetworkFlag) String() string { return flag.name } func (flag *NetworkFlag) Set(name string) error { flag.name = name flag.isset = true return nil } func (flag *NetworkFlag) IsSet() bool { return flag.isset } func (flag *NetworkFlag) Network() (object.NetworkReference, error) { if flag.net != nil { return flag.net, nil } finder, err := flag.Finder() if err != nil { return nil, err } if flag.net, err = finder.NetworkOrDefault(context.TODO(), flag.name); err != nil { return nil, err } return flag.net, nil } func (flag *NetworkFlag) Device() (types.BaseVirtualDevice, error) { net, err := flag.Network() if err != nil { return nil, err } backing, err := net.EthernetCardBackingInfo(context.TODO()) if err != nil { return nil, err } device, err := object.EthernetCardTypes().CreateEthernetCard(flag.adapter, backing) if err != nil { return nil, err } if flag.address != "" { card := device.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() card.AddressType = string(types.VirtualEthernetCardMacTypeManual) card.MacAddress = flag.address } return device, nil } govmomi-0.15.0/govc/flags/optional_bool.go000066400000000000000000000024471312205533500205010ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "flag" "fmt" "strconv" ) type optionalBool struct { val **bool } func (b *optionalBool) Set(s string) error { v, err := strconv.ParseBool(s) *b.val = &v return err } func (b *optionalBool) Get() interface{} { if *b.val == nil { return nil } return **b.val } func (b *optionalBool) String() string { if b.val == nil || *b.val == nil { return "" } return fmt.Sprintf("%v", **b.val) } func (b *optionalBool) IsBoolFlag() bool { return true } // NewOptionalBool returns a flag.Value implementation where there is no default value. // This avoids sending a default value over the wire as using flag.BoolVar() would. func NewOptionalBool(v **bool) flag.Value { return &optionalBool{v} } govmomi-0.15.0/govc/flags/optional_bool_test.go000066400000000000000000000024511312205533500215330ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "flag" "testing" ) func TestOptionalBool(t *testing.T) { fs := flag.NewFlagSet("", flag.ContinueOnError) var val *bool fs.Var(NewOptionalBool(&val), "obool", "optional bool") b := fs.Lookup("obool") if b.DefValue != "" { t.Fail() } if b.Value.String() != "" { t.Fail() } if b.Value.(flag.Getter).Get() != nil { t.Fail() } b.Value.Set("true") if b.Value.String() != "true" { t.Fail() } if b.Value.(flag.Getter).Get() != true { t.Fail() } if val == nil || *val != true { t.Fail() } b.Value.Set("false") if b.Value.String() != "false" { t.Fail() } if b.Value.(flag.Getter).Get() != false { t.Fail() } if val == nil || *val != false { t.Fail() } } govmomi-0.15.0/govc/flags/output.go000066400000000000000000000105121312205533500171710ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "encoding/json" "flag" "fmt" "io" "os" "sync" "time" "github.com/vmware/govmomi/vim25/progress" "github.com/davecgh/go-spew/spew" ) type OutputWriter interface { Write(io.Writer) error } type OutputFlag struct { common JSON bool TTY bool Dump bool Out io.Writer } var outputFlagKey = flagKey("output") func NewOutputFlag(ctx context.Context) (*OutputFlag, context.Context) { if v := ctx.Value(outputFlagKey); v != nil { return v.(*OutputFlag), ctx } v := &OutputFlag{Out: os.Stdout} ctx = context.WithValue(ctx, outputFlagKey, v) return v, ctx } func (flag *OutputFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { f.BoolVar(&flag.JSON, "json", false, "Enable JSON output") f.BoolVar(&flag.Dump, "dump", false, "Enable output dump") }) } func (flag *OutputFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if !flag.JSON { // Assume we have a tty if not outputting JSON flag.TTY = true } return nil }) } // Log outputs the specified string, prefixed with the current time. // A newline is not automatically added. If the specified string // starts with a '\r', the current line is cleared first. func (flag *OutputFlag) Log(s string) (int, error) { if len(s) > 0 && s[0] == '\r' { flag.Write([]byte{'\r', 033, '[', 'K'}) s = s[1:] } return flag.WriteString(time.Now().Format("[02-01-06 15:04:05] ") + s) } func (flag *OutputFlag) Write(b []byte) (int, error) { if !flag.TTY { return 0, nil } n, err := os.Stdout.Write(b) os.Stdout.Sync() return n, err } func (flag *OutputFlag) WriteString(s string) (int, error) { return flag.Write([]byte(s)) } func (flag *OutputFlag) WriteResult(result OutputWriter) error { var err error if flag.JSON { err = json.NewEncoder(flag.Out).Encode(result) } else if flag.Dump { scs := spew.ConfigState{Indent: " "} scs.Fdump(flag.Out, result) } else { err = result.Write(flag.Out) } return err } type progressLogger struct { flag *OutputFlag prefix string wg sync.WaitGroup sink chan chan progress.Report done chan struct{} } func newProgressLogger(flag *OutputFlag, prefix string) *progressLogger { p := &progressLogger{ flag: flag, prefix: prefix, sink: make(chan chan progress.Report), done: make(chan struct{}), } p.wg.Add(1) go p.loopA() return p } // loopA runs before Sink() has been called. func (p *progressLogger) loopA() { var err error defer p.wg.Done() tick := time.NewTicker(100 * time.Millisecond) defer tick.Stop() for stop := false; !stop; { select { case ch := <-p.sink: err = p.loopB(tick, ch) stop = true case <-p.done: stop = true case <-tick.C: line := fmt.Sprintf("\r%s", p.prefix) p.flag.Log(line) } } if err != nil && err != io.EOF { p.flag.Log(fmt.Sprintf("\r%sError: %s\n", p.prefix, err)) } else { p.flag.Log(fmt.Sprintf("\r%sOK\n", p.prefix)) } } // loopA runs after Sink() has been called. func (p *progressLogger) loopB(tick *time.Ticker, ch <-chan progress.Report) error { var r progress.Report var ok bool var err error for ok = true; ok; { select { case r, ok = <-ch: if !ok { break } err = r.Error() case <-tick.C: line := fmt.Sprintf("\r%s", p.prefix) if r != nil { line += fmt.Sprintf("(%.0f%%", r.Percentage()) detail := r.Detail() if detail != "" { line += fmt.Sprintf(", %s", detail) } line += ")" } p.flag.Log(line) } } return err } func (p *progressLogger) Sink() chan<- progress.Report { ch := make(chan progress.Report) p.sink <- ch return ch } func (p *progressLogger) Wait() { close(p.done) p.wg.Wait() } func (flag *OutputFlag) ProgressLogger(prefix string) *progressLogger { return newProgressLogger(flag, prefix) } govmomi-0.15.0/govc/flags/resource_pool.go000066400000000000000000000041721312205533500205160ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" ) type ResourcePoolFlag struct { common *DatacenterFlag name string pool *object.ResourcePool } var resourcePoolFlagKey = flagKey("resourcePool") func NewResourcePoolFlag(ctx context.Context) (*ResourcePoolFlag, context.Context) { if v := ctx.Value(resourcePoolFlagKey); v != nil { return v.(*ResourcePoolFlag), ctx } v := &ResourcePoolFlag{} v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) ctx = context.WithValue(ctx, resourcePoolFlagKey, v) return v, ctx } func (flag *ResourcePoolFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { flag.DatacenterFlag.Register(ctx, f) env := "GOVC_RESOURCE_POOL" value := os.Getenv(env) usage := fmt.Sprintf("Resource pool [%s]", env) f.StringVar(&flag.name, "pool", value, usage) }) } func (flag *ResourcePoolFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } return nil }) } func (flag *ResourcePoolFlag) ResourcePool() (*object.ResourcePool, error) { if flag.pool != nil { return flag.pool, nil } finder, err := flag.Finder() if err != nil { return nil, err } if flag.pool, err = finder.ResourcePoolOrDefault(context.TODO(), flag.name); err != nil { return nil, err } return flag.pool, nil } func (flag *ResourcePoolFlag) ResourcePoolIfSpecified() (*object.ResourcePool, error) { if flag.name == "" { return nil, nil } return flag.ResourcePool() } govmomi-0.15.0/govc/flags/search.go000066400000000000000000000221431312205533500171010ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "errors" "flag" "fmt" "strings" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) const ( SearchVirtualMachines = iota + 1 SearchHosts SearchVirtualApps ) type SearchFlag struct { common *ClientFlag *DatacenterFlag t int entity string byDatastorePath string byDNSName string byInventoryPath string byIP string byUUID string isset bool } var searchFlagKey = flagKey("search") func NewSearchFlag(ctx context.Context, t int) (*SearchFlag, context.Context) { if v := ctx.Value(searchFlagKey); v != nil { return v.(*SearchFlag), ctx } v := &SearchFlag{ t: t, } v.ClientFlag, ctx = NewClientFlag(ctx) v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) switch t { case SearchVirtualMachines: v.entity = "VM" case SearchHosts: v.entity = "host" case SearchVirtualApps: v.entity = "vapp" default: panic("invalid search type") } ctx = context.WithValue(ctx, searchFlagKey, v) return v, ctx } func (flag *SearchFlag) Register(ctx context.Context, fs *flag.FlagSet) { flag.RegisterOnce(func() { flag.ClientFlag.Register(ctx, fs) flag.DatacenterFlag.Register(ctx, fs) register := func(v *string, f string, d string) { f = fmt.Sprintf("%s.%s", strings.ToLower(flag.entity), f) d = fmt.Sprintf(d, flag.entity) fs.StringVar(v, f, "", d) } switch flag.t { case SearchVirtualMachines: register(&flag.byDatastorePath, "path", "Find %s by path to .vmx file") } switch flag.t { case SearchVirtualMachines, SearchHosts: register(&flag.byDNSName, "dns", "Find %s by FQDN") register(&flag.byIP, "ip", "Find %s by IP address") register(&flag.byUUID, "uuid", "Find %s by UUID") } register(&flag.byInventoryPath, "ipath", "Find %s by inventory path") }) } func (flag *SearchFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.ClientFlag.Process(ctx); err != nil { return err } if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } flags := []string{ flag.byDatastorePath, flag.byDNSName, flag.byInventoryPath, flag.byIP, flag.byUUID, } flag.isset = false for _, f := range flags { if f != "" { if flag.isset { return errors.New("cannot use more than one search flag") } flag.isset = true } } return nil }) } func (flag *SearchFlag) IsSet() bool { return flag.isset } func (flag *SearchFlag) searchIndex(c *vim25.Client) *object.SearchIndex { return object.NewSearchIndex(c) } func (flag *SearchFlag) searchByDatastorePath(c *vim25.Client, dc *object.Datacenter) (object.Reference, error) { ctx := context.TODO() switch flag.t { case SearchVirtualMachines: return flag.searchIndex(c).FindByDatastorePath(ctx, dc, flag.byDatastorePath) default: panic("unsupported type") } } func (flag *SearchFlag) searchByDNSName(c *vim25.Client, dc *object.Datacenter) (object.Reference, error) { ctx := context.TODO() switch flag.t { case SearchVirtualMachines: return flag.searchIndex(c).FindByDnsName(ctx, dc, flag.byDNSName, true) case SearchHosts: return flag.searchIndex(c).FindByDnsName(ctx, dc, flag.byDNSName, false) default: panic("unsupported type") } } func (flag *SearchFlag) searchByInventoryPath(c *vim25.Client, dc *object.Datacenter) (object.Reference, error) { // TODO(PN): The datacenter flag should not be set because it is ignored. ctx := context.TODO() return flag.searchIndex(c).FindByInventoryPath(ctx, flag.byInventoryPath) } func (flag *SearchFlag) searchByIP(c *vim25.Client, dc *object.Datacenter) (object.Reference, error) { ctx := context.TODO() switch flag.t { case SearchVirtualMachines: return flag.searchIndex(c).FindByIp(ctx, dc, flag.byIP, true) case SearchHosts: return flag.searchIndex(c).FindByIp(ctx, dc, flag.byIP, false) default: panic("unsupported type") } } func (flag *SearchFlag) searchByUUID(c *vim25.Client, dc *object.Datacenter) (object.Reference, error) { ctx := context.TODO() isVM := false switch flag.t { case SearchVirtualMachines: isVM = true case SearchHosts: default: panic("unsupported type") } var ref object.Reference var err error for _, iu := range []*bool{nil, types.NewBool(true)} { ref, err = flag.searchIndex(c).FindByUuid(ctx, dc, flag.byUUID, isVM, iu) if err != nil { if soap.IsSoapFault(err) { fault := soap.ToSoapFault(err).VimFault() if _, ok := fault.(types.InvalidArgument); ok { continue } } return nil, err } if ref != nil { break } } return ref, nil } func (flag *SearchFlag) search() (object.Reference, error) { ctx := context.TODO() var ref object.Reference var err error c, err := flag.Client() if err != nil { return nil, err } dc, err := flag.Datacenter() if err != nil { return nil, err } switch { case flag.byDatastorePath != "": ref, err = flag.searchByDatastorePath(c, dc) case flag.byDNSName != "": ref, err = flag.searchByDNSName(c, dc) case flag.byInventoryPath != "": ref, err = flag.searchByInventoryPath(c, dc) case flag.byIP != "": ref, err = flag.searchByIP(c, dc) case flag.byUUID != "": ref, err = flag.searchByUUID(c, dc) default: err = errors.New("no search flag specified") } if err != nil { return nil, err } if ref == nil { return nil, fmt.Errorf("no such %s", flag.entity) } // set the InventoryPath field finder, err := flag.Finder() if err != nil { return nil, err } ref, err = finder.ObjectReference(ctx, ref.Reference()) if err != nil { return nil, err } return ref, nil } func (flag *SearchFlag) VirtualMachine() (*object.VirtualMachine, error) { ref, err := flag.search() if err != nil { return nil, err } vm, ok := ref.(*object.VirtualMachine) if !ok { return nil, fmt.Errorf("expected VirtualMachine entity, got %s", ref.Reference().Type) } return vm, nil } func (flag *SearchFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error) { ctx := context.TODO() var out []*object.VirtualMachine if flag.IsSet() { vm, err := flag.VirtualMachine() if err != nil { return nil, err } out = append(out, vm) return out, nil } // List virtual machines if len(args) == 0 { return nil, errors.New("no argument") } finder, err := flag.Finder() if err != nil { return nil, err } var nfe error // List virtual machines for every argument for _, arg := range args { vms, err := finder.VirtualMachineList(ctx, arg) if err != nil { if _, ok := err.(*find.NotFoundError); ok { // Let caller decide how to handle NotFoundError nfe = err continue } return nil, err } out = append(out, vms...) } return out, nfe } func (flag *SearchFlag) VirtualApp() (*object.VirtualApp, error) { ref, err := flag.search() if err != nil { return nil, err } app, ok := ref.(*object.VirtualApp) if !ok { return nil, fmt.Errorf("expected VirtualApp entity, got %s", ref.Reference().Type) } return app, nil } func (flag *SearchFlag) VirtualApps(args []string) ([]*object.VirtualApp, error) { ctx := context.TODO() var out []*object.VirtualApp if flag.IsSet() { app, err := flag.VirtualApp() if err != nil { return nil, err } out = append(out, app) return out, nil } // List virtual apps if len(args) == 0 { return nil, errors.New("no argument") } finder, err := flag.Finder() if err != nil { return nil, err } // List virtual apps for every argument for _, arg := range args { apps, err := finder.VirtualAppList(ctx, arg) if err != nil { return nil, err } out = append(out, apps...) } return out, nil } func (flag *SearchFlag) HostSystem() (*object.HostSystem, error) { ref, err := flag.search() if err != nil { return nil, err } host, ok := ref.(*object.HostSystem) if !ok { return nil, fmt.Errorf("expected HostSystem entity, got %s", ref.Reference().Type) } return host, nil } func (flag *SearchFlag) HostSystems(args []string) ([]*object.HostSystem, error) { ctx := context.TODO() var out []*object.HostSystem if flag.IsSet() { host, err := flag.HostSystem() if err != nil { return nil, err } out = append(out, host) return out, nil } // List host system if len(args) == 0 { return nil, errors.New("no argument") } finder, err := flag.Finder() if err != nil { return nil, err } // List host systems for every argument for _, arg := range args { vms, err := finder.HostSystemList(ctx, arg) if err != nil { return nil, err } out = append(out, vms...) } return out, nil } govmomi-0.15.0/govc/flags/storage_pod.go000066400000000000000000000026721312205533500201470ustar00rootroot00000000000000package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" ) type StoragePodFlag struct { common *DatacenterFlag Name string sp *object.StoragePod } var storagePodFlagKey = flagKey("storagePod") func NewStoragePodFlag(ctx context.Context) (*StoragePodFlag, context.Context) { if v := ctx.Value(storagePodFlagKey); v != nil { return v.(*StoragePodFlag), ctx } v := &StoragePodFlag{} v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) ctx = context.WithValue(ctx, storagePodFlagKey, v) return v, ctx } func (f *StoragePodFlag) Register(ctx context.Context, fs *flag.FlagSet) { f.RegisterOnce(func() { f.DatacenterFlag.Register(ctx, fs) env := "GOVC_DATASTORE_CLUSTER" value := os.Getenv(env) usage := fmt.Sprintf("Datastore cluster [%s]", env) fs.StringVar(&f.Name, "datastore-cluster", value, usage) }) } func (f *StoragePodFlag) Process(ctx context.Context) error { return f.DatacenterFlag.Process(ctx) } func (f *StoragePodFlag) Isset() bool { return f.Name != "" } func (f *StoragePodFlag) StoragePod() (*object.StoragePod, error) { ctx := context.TODO() if f.sp != nil { return f.sp, nil } finder, err := f.Finder() if err != nil { return nil, err } if f.Isset() { f.sp, err = finder.DatastoreCluster(ctx, f.Name) if err != nil { return nil, err } } else { f.sp, err = finder.DefaultDatastoreCluster(ctx) if err != nil { return nil, err } } return f.sp, nil } govmomi-0.15.0/govc/flags/version.go000066400000000000000000000023311312205533500173160ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "strconv" "strings" ) const Version = "0.15.0" type version []int func ParseVersion(s string) (version, error) { v := make(version, 0) ps := strings.Split(s, ".") for _, p := range ps { i, err := strconv.Atoi(p) if err != nil { return nil, err } v = append(v, i) } return v, nil } func (v version) Lte(u version) bool { lv := len(v) lu := len(u) for i := 0; i < lv; i++ { // Everything up to here has been equal and v has more elements than u. if i >= lu { return false } // Move to next digit if equal. if v[i] == u[i] { continue } return v[i] < u[i] } // Equal. return true } govmomi-0.15.0/govc/flags/version_test.go000066400000000000000000000023641312205533500203630ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import "testing" func TestParseVersion(t *testing.T) { var v version var err error v, err = ParseVersion("5.5.5.5") if err != nil { t.Error(err) } if len(v) != 4 { t.Errorf("Expected %d elements, got %d", 4, len(v)) } for i := 0; i < len(v); i++ { if v[i] != 5 { t.Errorf("Expected %d, got %d", 5, v[i]) } } } func TestLte(t *testing.T) { v1, err := ParseVersion("5.5") if err != nil { panic(err) } v2, err := ParseVersion("5.6") if err != nil { panic(err) } if !v1.Lte(v1) { t.Errorf("Expected 5.5 <= 5.5") } if !v1.Lte(v2) { t.Errorf("Expected 5.5 <= 5.6") } if v2.Lte(v1) { t.Errorf("Expected not 5.6 <= 5.5") } } govmomi-0.15.0/govc/flags/virtual_app.go000066400000000000000000000045151312205533500201650ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" ) type VirtualAppFlag struct { common *DatacenterFlag *SearchFlag name string app *object.VirtualApp } var virtualAppFlagKey = flagKey("virtualApp") func NewVirtualAppFlag(ctx context.Context) (*VirtualAppFlag, context.Context) { if v := ctx.Value(virtualAppFlagKey); v != nil { return v.(*VirtualAppFlag), ctx } v := &VirtualAppFlag{} v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) v.SearchFlag, ctx = NewSearchFlag(ctx, SearchVirtualApps) ctx = context.WithValue(ctx, virtualAppFlagKey, v) return v, ctx } func (flag *VirtualAppFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { flag.DatacenterFlag.Register(ctx, f) flag.SearchFlag.Register(ctx, f) env := "GOVC_VAPP" value := os.Getenv(env) usage := fmt.Sprintf("Virtual App [%s]", env) f.StringVar(&flag.name, "vapp", value, usage) }) } func (flag *VirtualAppFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } if err := flag.SearchFlag.Process(ctx); err != nil { return err } return nil }) } func (flag *VirtualAppFlag) VirtualApp() (*object.VirtualApp, error) { ctx := context.TODO() if flag.app != nil { return flag.app, nil } // Use search flags if specified. if flag.SearchFlag.IsSet() { app, err := flag.SearchFlag.VirtualApp() if err != nil { return nil, err } flag.app = app return flag.app, nil } // Never look for a default virtual app. if flag.name == "" { return nil, nil } finder, err := flag.Finder() if err != nil { return nil, err } flag.app, err = finder.VirtualApp(ctx, flag.name) return flag.app, err } govmomi-0.15.0/govc/flags/virtual_machine.go000066400000000000000000000050671312205533500210140ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flags import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/object" ) type VirtualMachineFlag struct { common *ClientFlag *DatacenterFlag *SearchFlag name string vm *object.VirtualMachine } var virtualMachineFlagKey = flagKey("virtualMachine") func NewVirtualMachineFlag(ctx context.Context) (*VirtualMachineFlag, context.Context) { if v := ctx.Value(virtualMachineFlagKey); v != nil { return v.(*VirtualMachineFlag), ctx } v := &VirtualMachineFlag{} v.ClientFlag, ctx = NewClientFlag(ctx) v.DatacenterFlag, ctx = NewDatacenterFlag(ctx) v.SearchFlag, ctx = NewSearchFlag(ctx, SearchVirtualMachines) ctx = context.WithValue(ctx, virtualMachineFlagKey, v) return v, ctx } func (flag *VirtualMachineFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.RegisterOnce(func() { flag.ClientFlag.Register(ctx, f) flag.DatacenterFlag.Register(ctx, f) flag.SearchFlag.Register(ctx, f) env := "GOVC_VM" value := os.Getenv(env) usage := fmt.Sprintf("Virtual machine [%s]", env) f.StringVar(&flag.name, "vm", value, usage) }) } func (flag *VirtualMachineFlag) Process(ctx context.Context) error { return flag.ProcessOnce(func() error { if err := flag.ClientFlag.Process(ctx); err != nil { return err } if err := flag.DatacenterFlag.Process(ctx); err != nil { return err } if err := flag.SearchFlag.Process(ctx); err != nil { return err } return nil }) } func (flag *VirtualMachineFlag) VirtualMachine() (*object.VirtualMachine, error) { ctx := context.TODO() if flag.vm != nil { return flag.vm, nil } // Use search flags if specified. if flag.SearchFlag.IsSet() { vm, err := flag.SearchFlag.VirtualMachine() if err != nil { return nil, err } flag.vm = vm return flag.vm, nil } // Never look for a default virtual machine. if flag.name == "" { return nil, nil } finder, err := flag.Finder() if err != nil { return nil, err } flag.vm, err = finder.VirtualMachine(ctx, flag.name) return flag.vm, err } govmomi-0.15.0/govc/folder/000077500000000000000000000000001312205533500154625ustar00rootroot00000000000000govmomi-0.15.0/govc/folder/create.go000066400000000000000000000042611312205533500172570ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package folder import ( "context" "flag" "path" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type create struct { *flags.DatacenterFlag pod bool } func init() { cli.Register("folder.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.BoolVar(&cmd.pod, "pod", false, "Create folder(s) of type StoragePod (DatastoreCluster)") } func (cmd *create) Usage() string { return "PATH..." } func (cmd *create) Description() string { return `Create folder with PATH. Examples: govc folder.create /dc1/vm/folder-foo govc object.mv /dc1/vm/vm-foo-* /dc1/vm/folder-foo govc folder.create -pod /dc1/datastore/sdrs govc object.mv /dc1/datastore/iscsi-* /dc1/datastore/sdrs` } func (cmd *create) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { finder, err := cmd.Finder() if err != nil { return err } for _, arg := range f.Args() { dir := path.Dir(arg) name := path.Base(arg) if dir == "" { dir = "/" } folder, err := finder.Folder(ctx, dir) if err != nil { return err } var create func() error if cmd.pod { create = func() error { _, err = folder.CreateStoragePod(ctx, name) return err } } else { create = func() error { _, err = folder.CreateFolder(ctx, name) return err } } err = create() if err != nil { return err } } return nil } govmomi-0.15.0/govc/folder/info.go000066400000000000000000000063731312205533500167550ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package folder import ( "context" "flag" "fmt" "io" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.DatacenterFlag } func init() { cli.Register("folder.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "[PATH]..." } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } args := f.Args() if len(args) == 0 { args = []string{"/"} } var props []string var res infoResult if !cmd.OutputFlag.JSON { props = []string{ "name", "childEntity", "childType", } } for _, arg := range args { object, err := finder.FolderList(ctx, arg) if err != nil { return err } res.objects = append(res.objects, object...) } if len(res.objects) != 0 { refs := make([]types.ManagedObjectReference, 0, len(res.objects)) for _, o := range res.objects { refs = append(refs, o.Reference()) } pc := property.DefaultCollector(c) err = pc.Retrieve(ctx, refs, props, &res.Folders) if err != nil { return err } } return cmd.WriteResult(&res) } type infoResult struct { Folders []mo.Folder objects []*object.Folder } func (r *infoResult) Write(w io.Writer) error { // Maintain order via r.objects as Property collector does not always return results in order. objects := make(map[types.ManagedObjectReference]mo.Folder, len(r.Folders)) for _, o := range r.Folders { objects[o.Reference()] = o } tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, o := range r.objects { info := objects[o.Reference()] fmt.Fprintf(tw, "Name:\t%s\n", info.Name) fmt.Fprintf(tw, " Path:\t%s\n", o.InventoryPath) fmt.Fprintf(tw, " Types:\t%v\n", strings.Join(info.ChildType, ",")) fmt.Fprintf(tw, " Children:\t%d\n", len(info.ChildEntity)) } return tw.Flush() } govmomi-0.15.0/govc/host/000077500000000000000000000000001312205533500151645ustar00rootroot00000000000000govmomi-0.15.0/govc/host/account/000077500000000000000000000000001312205533500166205ustar00rootroot00000000000000govmomi-0.15.0/govc/host/account/account.go000066400000000000000000000040141312205533500206020ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package account import ( "context" "flag" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type AccountFlag struct { *flags.ClientFlag *flags.DatacenterFlag *flags.HostSystemFlag types.HostAccountSpec } func newAccountFlag(ctx context.Context) (*AccountFlag, context.Context) { f := &AccountFlag{} f.ClientFlag, ctx = flags.NewClientFlag(ctx) f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) f.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) return f, ctx } func (f *AccountFlag) Register(ctx context.Context, fs *flag.FlagSet) { f.ClientFlag.Register(ctx, fs) f.DatacenterFlag.Register(ctx, fs) f.HostSystemFlag.Register(ctx, fs) fs.StringVar(&f.Id, "id", "", "The ID of the specified account") fs.StringVar(&f.Password, "password", "", "The password for the specified account id") fs.StringVar(&f.Description, "description", "", "The description of the specified account") } func (f *AccountFlag) Process(ctx context.Context) error { if err := f.ClientFlag.Process(ctx); err != nil { return err } if err := f.DatacenterFlag.Process(ctx); err != nil { return err } if err := f.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (f *AccountFlag) HostAccountManager(ctx context.Context) (*object.HostAccountManager, error) { h, err := f.HostSystem() if err != nil { return nil, err } return h.ConfigManager().AccountManager(ctx) } govmomi-0.15.0/govc/host/account/create.go000066400000000000000000000026221312205533500204140ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package account import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type create struct { *AccountFlag } func init() { cli.Register("host.account.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.AccountFlag, ctx = newAccountFlag(ctx) cmd.AccountFlag.Register(ctx, f) } func (cmd *create) Description() string { return `Create local account on HOST. Examples: govc host.account.create -id $USER -password password-for-esx60` } func (cmd *create) Process(ctx context.Context) error { if err := cmd.AccountFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.AccountFlag.HostAccountManager(ctx) if err != nil { return err } return m.Create(ctx, &cmd.HostAccountSpec) } govmomi-0.15.0/govc/host/account/remove.go000066400000000000000000000025671312205533500204560ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package account import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type remove struct { *AccountFlag } func init() { cli.Register("host.account.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.AccountFlag, ctx = newAccountFlag(ctx) cmd.AccountFlag.Register(ctx, f) } func (cmd *remove) Description() string { return `Remove local account on HOST. Examples: govc host.account.remove -id $USER` } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.AccountFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.AccountFlag.HostAccountManager(ctx) if err != nil { return err } return m.Remove(ctx, cmd.HostAccountSpec.Id) } govmomi-0.15.0/govc/host/account/update.go000066400000000000000000000026211312205533500204320ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package account import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type update struct { *AccountFlag } func init() { cli.Register("host.account.update", &update{}) } func (cmd *update) Register(ctx context.Context, f *flag.FlagSet) { cmd.AccountFlag, ctx = newAccountFlag(ctx) cmd.AccountFlag.Register(ctx, f) } func (cmd *update) Description() string { return `Update local account on HOST. Examples: govc host.account.update -id root -password password-for-esx60` } func (cmd *update) Process(ctx context.Context) error { if err := cmd.AccountFlag.Process(ctx); err != nil { return err } return nil } func (cmd *update) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.AccountFlag.HostAccountManager(ctx) if err != nil { return err } return m.Update(ctx, &cmd.HostAccountSpec) } govmomi-0.15.0/govc/host/add.go000066400000000000000000000056311312205533500162500ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package host import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.FolderFlag *flags.HostConnectFlag connect bool } func init() { cli.Register("host.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx) cmd.HostConnectFlag.Register(ctx, f) f.BoolVar(&cmd.connect, "connect", true, "Immediately connect to host") } func (cmd *add) Process(ctx context.Context) error { if err := cmd.FolderFlag.Process(ctx); err != nil { return err } if err := cmd.HostConnectFlag.Process(ctx); err != nil { return err } if cmd.HostName == "" { return flag.ErrHelp } if cmd.UserName == "" { return flag.ErrHelp } if cmd.Password == "" { return flag.ErrHelp } return nil } func (cmd *add) Description() string { return `Add host to datacenter. The host is added to the folder specified by the 'folder' flag. If not given, this defaults to the host folder in the specified or default datacenter. Examples: thumbprint=$(govc about.cert -k -u host.example.com -thumbprint | awk '{print $2}') govc host.add -hostname host.example.com -username root -password pass -thumbprint $thumbprint govc host.add -hostname 10.0.6.1 -username root -password pass -noverify` } func (cmd *add) Add(ctx context.Context, parent *object.Folder) error { spec := cmd.Spec(parent.Client()) req := types.AddStandaloneHost_Task{ This: parent.Reference(), Spec: spec, AddConnected: cmd.connect, } res, err := methods.AddStandaloneHost_Task(ctx, parent.Client(), &req) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("adding %s to folder %s... ", spec.HostName, parent.InventoryPath)) defer logger.Wait() task := object.NewTask(parent.Client(), res.Returnval) _, err = task.WaitForResult(ctx, logger) return err } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 0 { return flag.ErrHelp } folder, err := cmd.FolderOrDefault("host") if err != nil { return err } return cmd.Fault(cmd.Add(ctx, folder)) } govmomi-0.15.0/govc/host/autostart/000077500000000000000000000000001312205533500172125ustar00rootroot00000000000000govmomi-0.15.0/govc/host/autostart/add.go000066400000000000000000000050351312205533500202740ustar00rootroot00000000000000/* Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package autostart import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type add struct { *AutostartFlag // from types.AutoStartPowerInfo StartOrder int32 StartDelay int32 WaitForHeartbeat string StartAction string StopDelay int32 StopAction string } func init() { cli.Register("host.autostart.add", &add{}) } var waitHeartbeatTypes = []string{ string(types.AutoStartWaitHeartbeatSettingSystemDefault), string(types.AutoStartWaitHeartbeatSettingYes), string(types.AutoStartWaitHeartbeatSettingNo), } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.AutostartFlag, ctx = newAutostartFlag(ctx) cmd.AutostartFlag.Register(ctx, f) cmd.StartOrder = -1 cmd.StartDelay = -1 cmd.StopDelay = -1 f.Var(flags.NewInt32(&cmd.StartOrder), "start-order", "Start Order") f.Var(flags.NewInt32(&cmd.StartDelay), "start-delay", "Start Delay") f.Var(flags.NewInt32(&cmd.StopDelay), "stop-delay", "Stop Delay") f.StringVar(&cmd.StartAction, "start-action", "powerOn", "Start Action") f.StringVar(&cmd.StopAction, "stop-action", "systemDefault", "Stop Action") f.StringVar(&cmd.WaitForHeartbeat, "wait", waitHeartbeatTypes[0], fmt.Sprintf("Wait for Hearbeat Setting (%s)", strings.Join(waitHeartbeatTypes, "|"))) } func (cmd *add) Process(ctx context.Context) error { if err := cmd.AutostartFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Usage() string { return "VM..." } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { powerInfo := types.AutoStartPowerInfo{ StartOrder: cmd.StartOrder, StartDelay: cmd.StartDelay, WaitForHeartbeat: types.AutoStartWaitHeartbeatSetting(cmd.WaitForHeartbeat), StartAction: cmd.StartAction, StopDelay: cmd.StopDelay, StopAction: cmd.StopAction, } return cmd.ReconfigureVMs(f.Args(), powerInfo) } govmomi-0.15.0/govc/host/autostart/autostart.go000066400000000000000000000077341312205533500216020ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package autostart import ( "context" "errors" "flag" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type AutostartFlag struct { *flags.ClientFlag *flags.DatacenterFlag *flags.HostSystemFlag } func newAutostartFlag(ctx context.Context) (*AutostartFlag, context.Context) { f := &AutostartFlag{} f.ClientFlag, ctx = flags.NewClientFlag(ctx) f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) f.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) return f, ctx } func (f *AutostartFlag) Register(ctx context.Context, fs *flag.FlagSet) { f.ClientFlag.Register(ctx, fs) f.DatacenterFlag.Register(ctx, fs) f.HostSystemFlag.Register(ctx, fs) } func (f *AutostartFlag) Process(ctx context.Context) error { if err := f.ClientFlag.Process(ctx); err != nil { return err } if err := f.DatacenterFlag.Process(ctx); err != nil { return err } if err := f.HostSystemFlag.Process(ctx); err != nil { return err } return nil } // VirtualMachines returns list of virtual machine objects based on the // arguments specified on the command line. This helper is defined in // flags.SearchFlag as well, but that pulls in other virtual machine flags that // are not relevant here. func (f *AutostartFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error) { ctx := context.TODO() if len(args) == 0 { return nil, errors.New("no argument") } finder, err := f.Finder() if err != nil { return nil, err } var out []*object.VirtualMachine for _, arg := range args { vms, err := finder.VirtualMachineList(ctx, arg) if err != nil { return nil, err } out = append(out, vms...) } return out, nil } func (f *AutostartFlag) HostAutoStartManager() (*mo.HostAutoStartManager, error) { ctx := context.TODO() h, err := f.HostSystem() if err != nil { return nil, err } var mhs mo.HostSystem err = h.Properties(ctx, h.Reference(), []string{"configManager.autoStartManager"}, &mhs) if err != nil { return nil, err } var mhas mo.HostAutoStartManager err = h.Properties(ctx, *mhs.ConfigManager.AutoStartManager, nil, &mhas) if err != nil { return nil, err } return &mhas, nil } func (f *AutostartFlag) ReconfigureDefaults(template types.AutoStartDefaults) error { ctx := context.TODO() c, err := f.Client() if err != nil { return err } mhas, err := f.HostAutoStartManager() if err != nil { return err } req := types.ReconfigureAutostart{ This: mhas.Reference(), Spec: types.HostAutoStartManagerConfig{ Defaults: &template, }, } _, err = methods.ReconfigureAutostart(ctx, c, &req) if err != nil { return err } return nil } func (f *AutostartFlag) ReconfigureVMs(args []string, template types.AutoStartPowerInfo) error { ctx := context.TODO() c, err := f.Client() if err != nil { return err } mhas, err := f.HostAutoStartManager() if err != nil { return err } req := types.ReconfigureAutostart{ This: mhas.Reference(), Spec: types.HostAutoStartManagerConfig{ PowerInfo: make([]types.AutoStartPowerInfo, 0), }, } vms, err := f.VirtualMachines(args) if err != nil { return err } for _, vm := range vms { pi := template pi.Key = vm.Reference() req.Spec.PowerInfo = append(req.Spec.PowerInfo, pi) } _, err = methods.ReconfigureAutostart(ctx, c, &req) if err != nil { return err } return nil } govmomi-0.15.0/govc/host/autostart/configure.go000066400000000000000000000032331312205533500215230ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package autostart import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type configure struct { *AutostartFlag types.AutoStartDefaults } func init() { cli.Register("host.autostart.configure", &configure{}) } func (cmd *configure) Register(ctx context.Context, f *flag.FlagSet) { cmd.AutostartFlag, ctx = newAutostartFlag(ctx) cmd.AutostartFlag.Register(ctx, f) f.Var(flags.NewOptionalBool(&cmd.Enabled), "enabled", "") f.Var(flags.NewInt32(&cmd.StartDelay), "start-delay", "") f.StringVar(&cmd.StopAction, "stop-action", "", "") f.Var(flags.NewInt32(&cmd.StopDelay), "stop-delay", "") f.Var(flags.NewOptionalBool(&cmd.WaitForHeartbeat), "wait-for-heartbeat", "") } func (cmd *configure) Process(ctx context.Context) error { if err := cmd.AutostartFlag.Process(ctx); err != nil { return err } return nil } func (cmd *configure) Usage() string { return "" } func (cmd *configure) Run(ctx context.Context, f *flag.FlagSet) error { return cmd.ReconfigureDefaults(cmd.AutoStartDefaults) } govmomi-0.15.0/govc/host/autostart/info.go000066400000000000000000000063531312205533500205030ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package autostart import ( "context" "encoding/json" "flag" "fmt" "io" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" ) type info struct { cli.Command *AutostartFlag *flags.OutputFlag } func init() { cli.Register("host.autostart.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.AutostartFlag, ctx = newAutostartFlag(ctx) cmd.AutostartFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.AutostartFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "" } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } mhas, err := cmd.HostAutoStartManager() if err != nil { return err } return cmd.WriteResult(&infoResult{client, mhas}) } type infoResult struct { client *vim25.Client mhas *mo.HostAutoStartManager } func (r *infoResult) MarshalJSON() ([]byte, error) { return json.Marshal(r.mhas) } // vmPaths resolves the paths for the VMs in the result. func (r *infoResult) vmPaths() (map[string]string, error) { ctx := context.TODO() paths := make(map[string]string) for _, info := range r.mhas.Config.PowerInfo { mes, err := mo.Ancestors(ctx, r.client, r.client.ServiceContent.PropertyCollector, info.Key) if err != nil { return nil, err } path := "" for _, me := range mes { // Skip root entity in building inventory path. if me.Parent == nil { continue } path += "/" + me.Name } paths[info.Key.Value] = path } return paths, nil } func (r *infoResult) Write(w io.Writer) error { paths, err := r.vmPaths() if err != nil { return err } tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "VM") fmt.Fprintf(tw, "\tStartAction") fmt.Fprintf(tw, "\tStartDelay") fmt.Fprintf(tw, "\tStartOrder") fmt.Fprintf(tw, "\tStopAction") fmt.Fprintf(tw, "\tStopDelay") fmt.Fprintf(tw, "\tWaitForHeartbeat") fmt.Fprintf(tw, "\n") for _, info := range r.mhas.Config.PowerInfo { fmt.Fprintf(tw, "%s", paths[info.Key.Value]) fmt.Fprintf(tw, "\t%s", info.StartAction) fmt.Fprintf(tw, "\t%d", info.StartDelay) fmt.Fprintf(tw, "\t%d", info.StartOrder) fmt.Fprintf(tw, "\t%s", info.StopAction) fmt.Fprintf(tw, "\t%d", info.StopDelay) fmt.Fprintf(tw, "\t%s", info.WaitForHeartbeat) fmt.Fprintf(tw, "\n") } _ = tw.Flush() return nil } govmomi-0.15.0/govc/host/autostart/remove.go000066400000000000000000000030031312205533500210320ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package autostart import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type remove struct { *AutostartFlag } func init() { cli.Register("host.autostart.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.AutostartFlag, ctx = newAutostartFlag(ctx) cmd.AutostartFlag.Register(ctx, f) } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.AutostartFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "VM..." } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { var powerInfo = types.AutoStartPowerInfo{ StartAction: "none", StartDelay: -1, StartOrder: -1, StopAction: "none", StopDelay: -1, WaitForHeartbeat: types.AutoStartWaitHeartbeatSettingSystemDefault, } return cmd.ReconfigureVMs(f.Args(), powerInfo) } govmomi-0.15.0/govc/host/cert/000077500000000000000000000000001312205533500161215ustar00rootroot00000000000000govmomi-0.15.0/govc/host/cert/csr.go000066400000000000000000000031711312205533500172410ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cert import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type csr struct { *flags.HostSystemFlag ip bool } func init() { cli.Register("host.cert.csr", &csr{}) } func (cmd *csr) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.BoolVar(&cmd.ip, "ip", false, "Use IP address as CN") } func (cmd *csr) Description() string { return `Generate a certificate-signing request (CSR) for HOST.` } func (cmd *csr) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *csr) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } m, err := host.ConfigManager().CertificateManager(ctx) if err != nil { return err } output, err := m.GenerateCertificateSigningRequest(ctx, cmd.ip) if err != nil { return err } _, err = fmt.Println(output) return err } govmomi-0.15.0/govc/host/cert/info.go000066400000000000000000000032471312205533500174110ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cert import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type info struct { *flags.HostSystemFlag *flags.OutputFlag } func init() { cli.Register("host.cert.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *info) Description() string { return `Display SSL certificate info for HOST.` } func (cmd *info) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } m, err := host.ConfigManager().CertificateManager(ctx) if err != nil { return err } info, err := m.CertificateInfo(ctx) if err != nil { return err } return cmd.WriteResult(info) } govmomi-0.15.0/govc/host/cert/install.go000066400000000000000000000036041312205533500201210ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cert import ( "bytes" "context" "flag" "io" "io/ioutil" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type install struct { *flags.HostSystemFlag } func init() { cli.Register("host.cert.import", &install{}) } func (cmd *install) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *install) Usage() string { return "FILE" } func (cmd *install) Description() string { return `Install SSL certificate FILE on HOST. If FILE name is "-", read certificate from stdin.` } func (cmd *install) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *install) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } m, err := host.ConfigManager().CertificateManager(ctx) if err != nil { return err } var cert string name := f.Arg(0) if name == "-" || name == "" { var buf bytes.Buffer if _, err := io.Copy(&buf, os.Stdin); err != nil { return err } cert = buf.String() } else { b, err := ioutil.ReadFile(name) if err != nil { return err } cert = string(b) } return m.InstallServerCertificate(ctx, cert) } govmomi-0.15.0/govc/host/date/000077500000000000000000000000001312205533500161015ustar00rootroot00000000000000govmomi-0.15.0/govc/host/date/change.go000066400000000000000000000045731312205533500176660ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package date import ( "context" "flag" "strings" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type change struct { *flags.HostSystemFlag types.HostNtpConfig types.HostDateTimeConfig date string } func init() { cli.Register("host.date.change", &change{}) } type serverConfig types.HostNtpConfig func (s *serverConfig) String() string { return strings.Join(s.Server, ",") } func (s *serverConfig) Set(v string) error { s.Server = append(s.Server, v) return nil } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.Var((*serverConfig)(&cmd.HostNtpConfig), "server", "IP or FQDN for NTP server(s)") f.StringVar(&cmd.TimeZone, "tz", "", "Change timezone of the host") f.StringVar(&cmd.date, "date", "", "Update the date/time on the host") } func (cmd *change) Description() string { return `Change date and time for HOST. Examples: govc host.date.change -date "$(date -u)" govc host.date.change -server time.vmware.com govc host.service enable ntpd govc host.service start ntpd` } func (cmd *change) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } s, err := host.ConfigManager().DateTimeSystem(ctx) if err != nil { return err } if cmd.date != "" { d, err := time.Parse(time.UnixDate, cmd.date) if err != nil { return err } return s.Update(ctx, d) } if len(cmd.HostNtpConfig.Server) > 0 { cmd.NtpConfig = &cmd.HostNtpConfig } return s.UpdateConfig(ctx, cmd.HostDateTimeConfig) } govmomi-0.15.0/govc/host/date/info.go000066400000000000000000000056631312205533500173750ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package date import ( "context" "flag" "fmt" "io" "strings" "text/tabwriter" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/host/service" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.HostSystemFlag *flags.OutputFlag } func init() { cli.Register("host.date.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *info) Description() string { return `Display date and time info for HOST.` } func (cmd *info) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } type dateInfo struct { types.HostDateTimeInfo Service *types.HostService Current *time.Time } func (info *dateInfo) servers() string { if len(info.NtpConfig.Server) == 0 { return "None" } return strings.Join(info.NtpConfig.Server, ", ") } func (info *dateInfo) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Current date and time:\t%s\n", info.Current.Format(time.UnixDate)) if info.Service != nil { fmt.Fprintf(tw, "NTP client status:\t%s\n", service.Policy(*info.Service)) fmt.Fprintf(tw, "NTP service status:\t%s\n", service.Status(*info.Service)) } fmt.Fprintf(tw, "NTP servers:\t%s\n", info.servers()) return tw.Flush() } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } s, err := host.ConfigManager().DateTimeSystem(ctx) if err != nil { return err } var hs mo.HostDateTimeSystem if err = s.Properties(ctx, s.Reference(), nil, &hs); err != nil { return nil } ss, err := host.ConfigManager().ServiceSystem(ctx) if err != nil { return err } services, err := ss.Service(ctx) if err != nil { return err } res := &dateInfo{HostDateTimeInfo: hs.DateTimeInfo} for i, service := range services { if service.Key == "ntpd" { res.Service = &services[i] break } } res.Current, err = s.Query(ctx) if err != nil { return err } return cmd.WriteResult(res) } govmomi-0.15.0/govc/host/disconnect.go000066400000000000000000000035061312205533500176500ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package host import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type disconnect struct { *flags.HostSystemFlag } func init() { cli.Register("host.disconnect", &disconnect{}) } func (cmd *disconnect) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *disconnect) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *disconnect) Description() string { return `Disconnect HOST from vCenter.` } func (cmd *disconnect) Disconnect(ctx context.Context, host *object.HostSystem) error { task, err := host.Disconnect(ctx) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("%s disconnecting... ", host.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *disconnect) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { err = cmd.Disconnect(ctx, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/host/esxcli/000077500000000000000000000000001312205533500164535ustar00rootroot00000000000000govmomi-0.15.0/govc/host/esxcli/command.go000066400000000000000000000062671312205533500204330ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "flag" "fmt" "strings" "github.com/vmware/govmomi/vim25/types" ) type Command struct { name []string args []string } type CommandInfoItem struct { Name string `xml:"name"` DisplayName string `xml:"displayName"` Help string `xml:"help"` } type CommandInfoParam struct { CommandInfoItem Aliases []string `xml:"aliases"` Flag bool `xml:"flag"` } type CommandInfoHint struct { Key string `xml:"key"` Value string `xml:"value"` } type CommandInfoHints []CommandInfoHint type CommandInfoMethod struct { CommandInfoItem Param []CommandInfoParam `xml:"param"` Hints CommandInfoHints `xml:"hints"` } type CommandInfo struct { CommandInfoItem Method []*CommandInfoMethod `xml:"method"` } func NewCommand(args []string) *Command { c := &Command{} for i, arg := range args { if strings.HasPrefix(arg, "-") { c.args = args[i:] break } else { c.name = append(c.name, arg) } } return c } func (c *Command) Namespace() string { return strings.Join(c.name[:len(c.name)-1], ".") } func (c *Command) Name() string { return c.name[len(c.name)-1] } func (c *Command) Method() string { return "vim.EsxCLI." + strings.Join(c.name, ".") } func (c *Command) Moid() string { return "ha-cli-handler-" + strings.Join(c.name[:len(c.name)-1], "-") } // Parse generates a flag.FlagSet based on the given []CommandInfoParam and // returns arguments for use with methods.ExecuteSoap func (c *Command) Parse(params []CommandInfoParam) ([]types.ReflectManagedMethodExecuterSoapArgument, error) { flags := flag.NewFlagSet(strings.Join(c.name, " "), flag.ExitOnError) vals := make([]string, len(params)) for i, p := range params { v := &vals[i] for _, a := range p.Aliases { a = strings.TrimPrefix(a[1:], "-") flags.StringVar(v, a, "", p.Help) } } err := flags.Parse(c.args) if err != nil { return nil, err } args := []types.ReflectManagedMethodExecuterSoapArgument{} for i, p := range params { if vals[i] == "" { continue } args = append(args, c.Argument(p.Name, vals[i])) } return args, nil } func (c *Command) Argument(name string, val string) types.ReflectManagedMethodExecuterSoapArgument { return types.ReflectManagedMethodExecuterSoapArgument{ Name: name, Val: fmt.Sprintf("<%s>%s", name, val, name), } } func (h CommandInfoHints) Formatter() string { for _, hint := range h { if hint.Key == "formatter" { return hint.Value } } return "simple" } func (h CommandInfoHints) Fields() []string { for _, hint := range h { if strings.HasPrefix(hint.Key, "fields:") { return strings.Split(hint.Value, ",") } } return nil } govmomi-0.15.0/govc/host/esxcli/command_test.go000066400000000000000000000063351312205533500214660ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "reflect" "testing" "github.com/vmware/govmomi/vim25/types" ) func TestSystemSettingsAdvancedSetCommand(t *testing.T) { c := NewCommand([]string{"system", "settings", "advanced", "set", "-o", "/Net/GuestIPHack", "-i", "1"}) tests := []struct { f func() string expect string }{ {c.Name, "set"}, {c.Namespace, "system.settings.advanced"}, {c.Method, "vim.EsxCLI.system.settings.advanced.set"}, {c.Moid, "ha-cli-handler-system-settings-advanced"}, } for _, test := range tests { actual := test.f() if actual != test.expect { t.Errorf("%s != %s", actual, test.expect) } } params := []CommandInfoParam{ { CommandInfoItem: CommandInfoItem{Name: "default", DisplayName: "default", Help: "Reset the option to its default value."}, Aliases: []string{"-d", "--default"}, Flag: true, }, { CommandInfoItem: CommandInfoItem{Name: "intvalue", DisplayName: "int-value", Help: "If the option is an integer value use this option."}, Aliases: []string{"-i", "--int-value"}, Flag: false, }, { CommandInfoItem: CommandInfoItem{Name: "option", DisplayName: "option", Help: "The name of the option to set the value of. Example: \"/Misc/HostName\""}, Aliases: []string{"-o", "--option"}, Flag: false, }, { CommandInfoItem: CommandInfoItem{Name: "stringvalue", DisplayName: "string-value", Help: "If the option is a string use this option."}, Aliases: []string{"-s", "--string-value"}, Flag: false, }, } args, err := c.Parse(params) if err != nil { t.Fatal(err) } expect := []types.ReflectManagedMethodExecuterSoapArgument{ { DynamicData: types.DynamicData{}, Name: "intvalue", Val: "1", }, { DynamicData: types.DynamicData{}, Name: "option", Val: "", }, } if !reflect.DeepEqual(args, expect) { t.Errorf("%s != %s", args, expect) } } func TestNetworkVmListCommand(t *testing.T) { c := NewCommand([]string{"network", "vm", "list"}) tests := []struct { f func() string expect string }{ {c.Name, "list"}, {c.Namespace, "network.vm"}, {c.Method, "vim.EsxCLI.network.vm.list"}, {c.Moid, "ha-cli-handler-network-vm"}, } for _, test := range tests { actual := test.f() if actual != test.expect { t.Errorf("%s != %s", actual, test.expect) } } var params []CommandInfoParam args, err := c.Parse(params) if err != nil { t.Fatal(err) } expect := []types.ReflectManagedMethodExecuterSoapArgument{} if !reflect.DeepEqual(args, expect) { t.Errorf("%s != %s", args, expect) } } govmomi-0.15.0/govc/host/esxcli/esxcli.go000066400000000000000000000070101312205533500202670ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "context" "flag" "fmt" "io" "sort" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type esxcli struct { *flags.HostSystemFlag hints bool } func init() { cli.Register("host.esxcli", &esxcli{}) } func (cmd *esxcli) Usage() string { return "COMMAND [ARG]..." } func (cmd *esxcli) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.BoolVar(&cmd.hints, "hints", true, "Use command info hints when formatting output") } func (cmd *esxcli) Description() string { return `Invoke esxcli command on HOST. Output is rendered in table form when possible, unless disabled with '-hints=false'. Examples: govc host.esxcli network ip connection list govc host.esxcli system settings advanced set -o /Net/GuestIPHack -i 1 govc host.esxcli network firewall ruleset set -r remoteSerialPort -e true govc host.esxcli network firewall set -e false` } func (cmd *esxcli) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *esxcli) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return nil } host, err := cmd.HostSystem() if err != nil { return err } e, err := NewExecutor(c, host) if err != nil { return err } res, err := e.Run(f.Args()) if err != nil { return err } if len(res.Values) == 0 { return nil } return cmd.WriteResult(&result{res, cmd}) } type result struct { *Response cmd *esxcli } func (r *result) Write(w io.Writer) error { var formatType string if r.cmd.hints { formatType = r.Info.Hints.Formatter() } switch formatType { case "table": r.cmd.formatTable(w, r.Response) default: r.cmd.formatSimple(w, r.Response) } return nil } func (cmd *esxcli) formatSimple(w io.Writer, res *Response) { var keys []string for key := range res.Values[0] { keys = append(keys, key) } sort.Strings(keys) tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for i, rv := range res.Values { if i > 0 { fmt.Fprintln(tw) _ = tw.Flush() } for _, key := range keys { fmt.Fprintf(tw, "%s:\t%s\n", key, strings.Join(rv[key], ", ")) } } _ = tw.Flush() } func (cmd *esxcli) formatTable(w io.Writer, res *Response) { fields := res.Info.Hints.Fields() tw := tabwriter.NewWriter(w, len(fields), 0, 2, ' ', 0) var hr []string for _, name := range fields { hr = append(hr, strings.Repeat("-", len(name))) } fmt.Fprintln(tw, strings.Join(fields, "\t")) fmt.Fprintln(tw, strings.Join(hr, "\t")) for _, vals := range res.Values { var row []string for _, name := range fields { key := strings.Replace(name, " ", "", -1) if val, ok := vals[key]; ok { row = append(row, strings.Join(val, ", ")) } else { row = append(row, "") } } fmt.Fprintln(tw, strings.Join(row, "\t")) } _ = tw.Flush() } govmomi-0.15.0/govc/host/esxcli/executor.go000066400000000000000000000067041312205533500206470ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "context" "errors" "fmt" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/xml" ) type Executor struct { c *vim25.Client host *object.HostSystem mme *types.ReflectManagedMethodExecuter dtm *types.InternalDynamicTypeManager info map[string]*CommandInfo } func NewExecutor(c *vim25.Client, host *object.HostSystem) (*Executor, error) { ctx := context.TODO() e := &Executor{ c: c, host: host, info: make(map[string]*CommandInfo), } { req := types.RetrieveManagedMethodExecuter{ This: host.Reference(), } res, err := methods.RetrieveManagedMethodExecuter(ctx, c, &req) if err != nil { return nil, err } e.mme = res.Returnval } { req := types.RetrieveDynamicTypeManager{ This: host.Reference(), } res, err := methods.RetrieveDynamicTypeManager(ctx, c, &req) if err != nil { return nil, err } e.dtm = res.Returnval } return e, nil } func (e *Executor) CommandInfo(c *Command) (*CommandInfoMethod, error) { ns := c.Namespace() var info *CommandInfo var ok bool if info, ok = e.info[ns]; !ok { req := types.ExecuteSoap{ Moid: "ha-dynamic-type-manager-local-cli-cliinfo", Method: "vim.CLIInfo.FetchCLIInfo", Argument: []types.ReflectManagedMethodExecuterSoapArgument{ c.Argument("typeName", "vim.EsxCLI."+ns), }, } info = new(CommandInfo) if err := e.Execute(&req, info); err != nil { return nil, err } e.info[ns] = info } name := c.Name() for _, method := range info.Method { if method.Name == name { return method, nil } } return nil, fmt.Errorf("method '%s' not found in name space '%s'", name, c.Namespace()) } func (e *Executor) NewRequest(args []string) (*types.ExecuteSoap, *CommandInfoMethod, error) { c := NewCommand(args) info, err := e.CommandInfo(c) if err != nil { return nil, nil, err } sargs, err := c.Parse(info.Param) if err != nil { return nil, nil, err } sreq := types.ExecuteSoap{ Moid: c.Moid(), Method: c.Method(), Argument: sargs, } return &sreq, info, nil } func (e *Executor) Execute(req *types.ExecuteSoap, res interface{}) error { ctx := context.TODO() req.This = e.mme.ManagedObjectReference req.Version = "urn:vim25/5.0" x, err := methods.ExecuteSoap(ctx, e.c, req) if err != nil { return err } if x.Returnval != nil { if x.Returnval.Fault != nil { return errors.New(x.Returnval.Fault.FaultMsg) } if err := xml.Unmarshal([]byte(x.Returnval.Response), res); err != nil { return err } } return nil } func (e *Executor) Run(args []string) (*Response, error) { req, info, err := e.NewRequest(args) if err != nil { return nil, err } res := &Response{ Info: info, } if err := e.Execute(req, res); err != nil { return nil, err } return res, nil } govmomi-0.15.0/govc/host/esxcli/firewall_info.go000066400000000000000000000025651312205533500216320ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import "github.com/vmware/govmomi/object" type FirewallInfo struct { Loaded bool Enabled bool DefaultAction string } // GetFirewallInfo via 'esxcli network firewall get' // The HostFirewallSystem type does not expose this data. // This helper can be useful in particular to determine if the firewall is enabled or disabled. func GetFirewallInfo(s *object.HostSystem) (*FirewallInfo, error) { x, err := NewExecutor(s.Client(), s) if err != nil { return nil, err } res, err := x.Run([]string{"network", "firewall", "get"}) if err != nil { return nil, err } info := &FirewallInfo{ Loaded: res.Values[0]["Loaded"][0] == "true", Enabled: res.Values[0]["Enabled"][0] == "true", DefaultAction: res.Values[0]["DefaultAction"][0], } return info, nil } govmomi-0.15.0/govc/host/esxcli/fixtures/000077500000000000000000000000001312205533500203245ustar00rootroot00000000000000govmomi-0.15.0/govc/host/esxcli/fixtures/network_vm_list.xml000066400000000000000000000010411312205533500242700ustar00rootroot00000000000000 foo VM Network dougm 2 98842 bar VM Network 1 236235 govmomi-0.15.0/govc/host/esxcli/fixtures/network_vm_port_list.xml000066400000000000000000000010141312205533500253340ustar00rootroot00000000000000 192.168.247.149 00:0c:29:12:b2:cf 33554438 VM Network vmnic0 33554434 vSwitch0 govmomi-0.15.0/govc/host/esxcli/fixtures/system_hostname_get.xml000066400000000000000000000005321312205533500251270ustar00rootroot00000000000000 localdomain esxbox.localdomain esxbox govmomi-0.15.0/govc/host/esxcli/guest_info.go000066400000000000000000000055461312205533500211560ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "context" "strings" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type hostInfo struct { *Executor wids map[string]string } type GuestInfo struct { c *vim25.Client hosts map[string]*hostInfo } func NewGuestInfo(c *vim25.Client) *GuestInfo { return &GuestInfo{ c: c, hosts: make(map[string]*hostInfo), } } func (g *GuestInfo) hostInfo(ref *types.ManagedObjectReference) (*hostInfo, error) { // cache exectuor and uuid -> worldid map if h, ok := g.hosts[ref.Value]; ok { return h, nil } host := object.NewHostSystem(g.c, *ref) e, err := NewExecutor(g.c, host) if err != nil { return nil, err } res, err := e.Run([]string{"vm", "process", "list"}) if err != nil { return nil, err } ids := make(map[string]string, len(res.Values)) for _, process := range res.Values { // Normalize uuid, esxcli and mo.VirtualMachine have different formats uuid := strings.Replace(process["UUID"][0], " ", "", -1) uuid = strings.Replace(uuid, "-", "", -1) ids[uuid] = process["WorldID"][0] } h := &hostInfo{e, ids} g.hosts[ref.Value] = h return h, nil } // IpAddress attempts to find the guest IP address using esxcli. // ESX hosts must be configured with the /Net/GuestIPHack enabled. // For example: // $ govc host.esxcli -- system settings advanced set -o /Net/GuestIPHack -i 1 func (g *GuestInfo) IpAddress(vm *object.VirtualMachine) (string, error) { ctx := context.TODO() const any = "0.0.0.0" var mvm mo.VirtualMachine pc := property.DefaultCollector(g.c) err := pc.RetrieveOne(ctx, vm.Reference(), []string{"runtime.host", "config.uuid"}, &mvm) if err != nil { return "", err } h, err := g.hostInfo(mvm.Runtime.Host) if err != nil { return "", err } // Normalize uuid, esxcli and mo.VirtualMachine have different formats uuid := strings.Replace(mvm.Config.Uuid, "-", "", -1) if wid, ok := h.wids[uuid]; ok { res, err := h.Run([]string{"network", "vm", "port", "list", "--world-id", wid}) if err != nil { return "", err } for _, val := range res.Values { if ip, ok := val["IPAddress"]; ok { if ip[0] != any { return ip[0], nil } } } } return any, nil } govmomi-0.15.0/govc/host/esxcli/response.go000066400000000000000000000036531312205533500206470ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "io" "github.com/vmware/govmomi/vim25/xml" ) type Values map[string][]string type Response struct { Info *CommandInfoMethod Values []Values } func (v Values) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { for { t, err := d.Token() if err != nil { if err == io.EOF { return nil } return err } if s, ok := t.(xml.StartElement); ok { t, err = d.Token() if err != nil { return err } key := s.Name.Local var val string if c, ok := t.(xml.CharData); ok { val = string(c) } v[key] = append(v[key], val) } } } func (r *Response) Type(start xml.StartElement) string { for _, a := range start.Attr { if a.Name.Local == "type" { return a.Value } } return "" } func (r *Response) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { stype := r.Type(start) if stype != "ArrayOfDataObject" { v := Values{} if err := d.DecodeElement(&v, &start); err != nil { return err } r.Values = append(r.Values, v) return nil } for { t, err := d.Token() if err != nil { if err == io.EOF { return nil } return err } if s, ok := t.(xml.StartElement); ok { if s.Name.Local == "DataObject" { v := Values{} if err := d.DecodeElement(&v, &s); err != nil { return err } r.Values = append(r.Values, v) } } } } govmomi-0.15.0/govc/host/esxcli/response_test.go000066400000000000000000000043511312205533500217020ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package esxcli import ( "os" "reflect" "testing" "github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/xml" ) func load(name string) *Response { f, err := os.Open(name) if err != nil { panic(err) } defer f.Close() var b Response dec := xml.NewDecoder(f) dec.TypeFunc = types.TypeFunc() if err := dec.Decode(&b); err != nil { panic(err) } return &b } func TestSystemHostnameGetResponse(t *testing.T) { res := load("fixtures/system_hostname_get.xml") expect := []Values{ { "DomainName": {"localdomain"}, "FullyQualifiedDomainName": {"esxbox.localdomain"}, "HostName": {"esxbox"}, }, } if !reflect.DeepEqual(res.Values, expect) { t.Errorf("%s != %s", res.Values, expect) } } func TestNetworkVmList(t *testing.T) { res := load("fixtures/network_vm_list.xml") expect := []Values{ { "Name": {"foo"}, "Networks": {"VM Network", "dougm"}, "NumPorts": {"2"}, "WorldID": {"98842"}, }, { "Name": {"bar"}, "Networks": {"VM Network"}, "NumPorts": {"1"}, "WorldID": {"236235"}, }, } if !reflect.DeepEqual(res.Values, expect) { t.Errorf("%s != %s", res.Values, expect) } } func TestNetworkVmPortList(t *testing.T) { r := load("fixtures/network_vm_port_list.xml") expect := []Values{ { "IPAddress": {"192.168.247.149"}, "MACAddress": {"00:0c:29:12:b2:cf"}, "PortID": {"33554438"}, "Portgroup": {"VM Network"}, "TeamUplink": {"vmnic0"}, "UplinkPortID": {"33554434"}, "vSwitch": {"vSwitch0"}, "DVPortID": {""}, }, } if !reflect.DeepEqual(r.Values, expect) { t.Errorf("%s != %s", r.Values, expect) } } govmomi-0.15.0/govc/host/firewall/000077500000000000000000000000001312205533500167715ustar00rootroot00000000000000govmomi-0.15.0/govc/host/firewall/find.go000066400000000000000000000064601312205533500202460ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package firewall import ( "context" "flag" "fmt" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/host/esxcli" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type find struct { *flags.ClientFlag *flags.OutputFlag *flags.HostSystemFlag enabled bool check bool types.HostFirewallRule } func init() { cli.Register("firewall.ruleset.find", &find{}) } func (cmd *find) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.BoolVar(&cmd.check, "c", true, "Check if esx firewall is enabled") f.BoolVar(&cmd.enabled, "enabled", true, "Find enabled rule sets if true, disabled if false") f.StringVar((*string)(&cmd.Direction), "direction", string(types.HostFirewallRuleDirectionOutbound), "Direction") f.StringVar((*string)(&cmd.PortType), "type", string(types.HostFirewallRulePortTypeDst), "Port type") f.StringVar((*string)(&cmd.Protocol), "proto", string(types.HostFirewallRuleProtocolTcp), "Protocol") f.Var(flags.NewInt32(&cmd.Port), "port", "Port") } func (cmd *find) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *find) Description() string { return `Find firewall rulesets matching the given rule. For a complete list of rulesets: govc host.esxcli network firewall ruleset list For a complete list of rules: govc host.esxcli network firewall ruleset rule list Examples: govc firewall.ruleset.find -direction inbound -port 22 govc firewall.ruleset.find -direction outbound -port 2377` } func (cmd *find) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } fs, err := host.ConfigManager().FirewallSystem(ctx) if err != nil { return err } if cmd.check { esxfw, err := esxcli.GetFirewallInfo(host) if err != nil { return err } if !esxfw.Enabled { fmt.Fprintln(os.Stderr, "host firewall is disabled") } } info, err := fs.Info(ctx) if err != nil { return err } if f.NArg() != 0 { // TODO: f.Args() -> types.HostFirewallRulesetIpList return flag.ErrHelp } rs := object.HostFirewallRulesetList(info.Ruleset) matched, err := rs.EnabledByRule(cmd.HostFirewallRule, cmd.enabled) if err != nil { return err } for _, r := range matched { fmt.Println(r.Key) } return nil } govmomi-0.15.0/govc/host/info.go000066400000000000000000000077561312205533500164650ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package host import ( "context" "flag" "fmt" "io" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.HostSystemFlag } func init() { cli.Register("host.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } var res infoResult var props []string if cmd.OutputFlag.JSON { props = nil // Load everything } else { props = []string{"summary"} // Load summary } // We could do without the -host flag, leaving it for compat host, err := cmd.HostSystemIfSpecified() if err != nil { return err } // Default only if there is a single host if host == nil && f.NArg() == 0 { host, err = cmd.HostSystem() if err != nil { return err } } if host != nil { res.objects = append(res.objects, host) } else { res.objects, err = cmd.HostSystems(f.Args()) if err != nil { return err } } if len(res.objects) != 0 { refs := make([]types.ManagedObjectReference, 0, len(res.objects)) for _, o := range res.objects { refs = append(refs, o.Reference()) } pc := property.DefaultCollector(c) err = pc.Retrieve(ctx, refs, props, &res.HostSystems) if err != nil { return err } } return cmd.WriteResult(&res) } type infoResult struct { HostSystems []mo.HostSystem objects []*object.HostSystem } func (r *infoResult) Write(w io.Writer) error { // Maintain order via r.objects as Property collector does not always return results in order. objects := make(map[types.ManagedObjectReference]mo.HostSystem, len(r.HostSystems)) for _, o := range r.HostSystems { objects[o.Reference()] = o } tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, o := range r.objects { host := objects[o.Reference()] s := host.Summary h := s.Hardware z := s.QuickStats ncpu := int32(h.NumCpuPkgs * h.NumCpuCores) cpuUsage := 100 * float64(z.OverallCpuUsage) / float64(ncpu*h.CpuMhz) memUsage := 100 * float64(z.OverallMemoryUsage<<20) / float64(h.MemorySize) fmt.Fprintf(tw, "Name:\t%s\n", s.Config.Name) fmt.Fprintf(tw, " Path:\t%s\n", o.InventoryPath) fmt.Fprintf(tw, " Manufacturer:\t%s\n", h.Vendor) fmt.Fprintf(tw, " Logical CPUs:\t%d CPUs @ %dMHz\n", ncpu, h.CpuMhz) fmt.Fprintf(tw, " Processor type:\t%s\n", h.CpuModel) fmt.Fprintf(tw, " CPU usage:\t%d MHz (%.1f%%)\n", z.OverallCpuUsage, cpuUsage) fmt.Fprintf(tw, " Memory:\t%dMB\n", h.MemorySize/(1024*1024)) fmt.Fprintf(tw, " Memory usage:\t%d MB (%.1f%%)\n", z.OverallMemoryUsage, memUsage) fmt.Fprintf(tw, " Boot time:\t%s\n", s.Runtime.BootTime) } return tw.Flush() } govmomi-0.15.0/govc/host/maintenance/000077500000000000000000000000001312205533500174465ustar00rootroot00000000000000govmomi-0.15.0/govc/host/maintenance/enter.go000066400000000000000000000044101312205533500211110ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package maintenance import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type enter struct { *flags.HostSystemFlag timeout int32 evacuate bool } func init() { cli.Register("host.maintenance.enter", &enter{}) } func (cmd *enter) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.Var(flags.NewInt32(&cmd.timeout), "timeout", "Timeout") f.BoolVar(&cmd.evacuate, "evacuate", false, "Evacuate powered off VMs") } func (cmd *enter) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *enter) Usage() string { return "HOST..." } func (cmd *enter) Description() string { return `Put HOST in maintenance mode. While this task is running and when the host is in maintenance mode, no VMs can be powered on and no provisioning operations can be performed on the host.` } func (cmd *enter) EnterMaintenanceMode(ctx context.Context, host *object.HostSystem) error { task, err := host.EnterMaintenanceMode(ctx, cmd.timeout, cmd.evacuate, nil) // TODO: spec param if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("%s entering maintenance mode... ", host.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *enter) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { err = cmd.EnterMaintenanceMode(ctx, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/host/maintenance/exit.go000066400000000000000000000044431312205533500207530ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package maintenance import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type exit struct { *flags.HostSystemFlag timeout int32 } func init() { cli.Register("host.maintenance.exit", &exit{}) } func (cmd *exit) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.Var(flags.NewInt32(&cmd.timeout), "timeout", "Timeout") } func (cmd *exit) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *exit) Usage() string { return "HOST..." } func (cmd *exit) Description() string { return `Take HOST out of maintenance mode. This blocks if any concurrent running maintenance-only host configurations operations are being performed. For example, if VMFS volumes are being upgraded. The 'timeout' flag is the number of seconds to wait for the exit maintenance mode to succeed. If the timeout is less than or equal to zero, there is no timeout.` } func (cmd *exit) ExitMaintenanceMode(ctx context.Context, host *object.HostSystem) error { task, err := host.ExitMaintenanceMode(ctx, cmd.timeout) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("%s exiting maintenance mode... ", host.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *exit) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { err = cmd.ExitMaintenanceMode(ctx, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/host/option/000077500000000000000000000000001312205533500164745ustar00rootroot00000000000000govmomi-0.15.0/govc/host/option/ls.go000066400000000000000000000035561312205533500174520ustar00rootroot00000000000000/* Copyright (c) 2016-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package option import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/option" ) type ls struct { *option.List *flags.HostSystemFlag } func init() { cli.Register("host.option.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.List = &option.List{} cmd.List.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.List.ClientFlag.Register(ctx, f) cmd.List.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.List.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.List.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Description() string { return option.ListDescription + ` Examples: govc host.option.ls govc host.option.ls Config.HostAgent. govc host.option.ls Config.HostAgent.plugins.solo.enableMob` } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } m, err := host.ConfigManager().OptionManager(ctx) if err != nil { return err } return cmd.Query(ctx, f, m) } govmomi-0.15.0/govc/host/option/set.go000066400000000000000000000034251312205533500176220ustar00rootroot00000000000000/* Copyright (c) 2016-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package option import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/option" ) type set struct { *option.Set *flags.HostSystemFlag } func init() { cli.Register("host.option.set", &set{}) } func (cmd *set) Register(ctx context.Context, f *flag.FlagSet) { cmd.Set = &option.Set{} cmd.Set.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.Set.ClientFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *set) Process(ctx context.Context) error { if err := cmd.Set.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *set) Description() string { return option.SetDescription + ` Examples: govc host.option.set Config.HostAgent.plugins.solo.enableMob true govc host.option.set Config.HostAgent.log.level verbose` } func (cmd *set) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } m, err := host.ConfigManager().OptionManager(ctx) if err != nil { return err } return cmd.Update(ctx, f, m) } govmomi-0.15.0/govc/host/portgroup/000077500000000000000000000000001312205533500172255ustar00rootroot00000000000000govmomi-0.15.0/govc/host/portgroup/add.go000066400000000000000000000033011312205533500203010ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.HostSystemFlag spec types.HostPortGroupSpec } func init() { cli.Register("host.portgroup.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.StringVar(&cmd.spec.VswitchName, "vswitch", "", "vSwitch Name") f.Var(flags.NewInt32(&cmd.spec.VlanId), "vlan", "VLAN ID") } func (cmd *add) Description() string { return `Add portgroup to HOST. Examples: govc host.portgroup.add -vswitch vSwitch0 -vlan 3201 bridge` } func (cmd *add) Usage() string { return "NAME" } func (cmd *add) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { ns, err := cmd.HostNetworkSystem() if err != nil { return err } cmd.spec.Name = f.Arg(0) return ns.AddPortGroup(ctx, cmd.spec) } govmomi-0.15.0/govc/host/portgroup/change.go000066400000000000000000000056661312205533500210160ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type change struct { *flags.ClientFlag *flags.HostSystemFlag types.HostPortGroupSpec types.HostNetworkSecurityPolicy } func init() { cli.Register("host.portgroup.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.VlanId = -1 f.Var(flags.NewInt32(&cmd.VlanId), "vlan-id", "VLAN ID") f.StringVar(&cmd.Name, "name", "", "Portgroup name") f.StringVar(&cmd.VswitchName, "vswitch-name", "", "vSwitch name") f.Var(flags.NewOptionalBool(&cmd.AllowPromiscuous), "allow-promiscuous", "Allow promiscuous mode") f.Var(flags.NewOptionalBool(&cmd.ForgedTransmits), "forged-transmits", "Allow forged transmits") f.Var(flags.NewOptionalBool(&cmd.MacChanges), "mac-changes", "Allow MAC changes") } func (cmd *change) Description() string { return `Change configuration of HOST portgroup NAME. Examples: govc host.portgroup.change -allow-promiscuous -forged-transmits -mac-changes "VM Network" govc host.portgroup.change -vswitch-name vSwitch1 "Management Network"` } func (cmd *change) Usage() string { return "NAME" } func (cmd *change) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } pg, err := networkInfoPortgroup(ctx, cmd.ClientFlag, cmd.HostSystemFlag) if err != nil { return err } ns, err := cmd.HostNetworkSystem() if err != nil { return err } name := f.Arg(0) var current *types.HostPortGroupSpec for _, g := range pg { if g.Spec.Name == name { current = &g.Spec break } } if current != nil { if cmd.Name == "" { cmd.Name = current.Name } if cmd.VswitchName == "" { cmd.VswitchName = current.VswitchName } if cmd.VlanId < 0 { cmd.VlanId = current.VlanId } } cmd.HostPortGroupSpec.Policy.Security = &cmd.HostNetworkSecurityPolicy return ns.UpdatePortGroup(ctx, name, cmd.HostPortGroupSpec) } govmomi-0.15.0/govc/host/portgroup/info.go000066400000000000000000000055371312205533500205210ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/host/vswitch" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.HostSystemFlag } func init() { cli.Register("host.portgroup.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func networkInfoPortgroup(ctx context.Context, c *flags.ClientFlag, h *flags.HostSystemFlag) ([]types.HostPortGroup, error) { client, err := c.Client() if err != nil { return nil, err } ns, err := h.HostNetworkSystem() if err != nil { return nil, err } var mns mo.HostNetworkSystem pc := property.DefaultCollector(client) err = pc.RetrieveOne(ctx, ns.Reference(), []string{"networkInfo.portgroup"}, &mns) if err != nil { return nil, err } return mns.NetworkInfo.Portgroup, nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { pg, err := networkInfoPortgroup(ctx, cmd.ClientFlag, cmd.HostSystemFlag) if err != nil { return err } r := &infoResult{pg} return cmd.WriteResult(r) } type infoResult struct { Portgroup []types.HostPortGroup } func (r *infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for i, s := range r.Portgroup { if i > 0 { fmt.Fprintln(tw) } fmt.Fprintf(tw, "Name:\t%s\n", s.Spec.Name) fmt.Fprintf(tw, "Virtual switch:\t%s\n", s.Spec.VswitchName) fmt.Fprintf(tw, "VLAN ID:\t%d\n", s.Spec.VlanId) fmt.Fprintf(tw, "Active ports:\t%d\n", len(s.Port)) vswitch.HostNetworkPolicy(tw, &s.ComputedPolicy) } return tw.Flush() } govmomi-0.15.0/govc/host/portgroup/remove.go000066400000000000000000000027441312205533500210600ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package portgroup import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type remove struct { *flags.HostSystemFlag } func init() { cli.Register("host.portgroup.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *remove) Description() string { return `Remove portgroup from HOST. Examples: govc host.portgroup.remove bridge` } func (cmd *remove) Usage() string { return "NAME" } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { ns, err := cmd.HostNetworkSystem() if err != nil { return err } return ns.RemovePortGroup(ctx, f.Arg(0)) } govmomi-0.15.0/govc/host/reconnect.go000066400000000000000000000046271312205533500175040ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package host import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type reconnect struct { *flags.HostSystemFlag *flags.HostConnectFlag types.HostSystemReconnectSpec } func init() { cli.Register("host.reconnect", &reconnect{}) } func (cmd *reconnect) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx) cmd.HostConnectFlag.Register(ctx, f) cmd.HostSystemReconnectSpec.SyncState = types.NewBool(false) f.BoolVar(cmd.HostSystemReconnectSpec.SyncState, "sync-state", false, "Sync state") } func (cmd *reconnect) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.HostConnectFlag.Process(ctx); err != nil { return err } return nil } func (cmd *reconnect) Description() string { return `Reconnect HOST to vCenter. This command can also be used to change connection properties (hostname, fingerprint, username, password), without disconnecting the host.` } func (cmd *reconnect) Reconnect(ctx context.Context, host *object.HostSystem) error { task, err := host.Reconnect(ctx, &cmd.HostConnectSpec, &cmd.HostSystemReconnectSpec) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("%s reconnecting... ", host.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *reconnect) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { err = cmd.Reconnect(ctx, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/host/remove.go000066400000000000000000000045301312205533500170120ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package host import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" ) type remove struct { *flags.HostSystemFlag } func init() { cli.Register("host.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "HOST..." } func (cmd *remove) Description() string { return `Remove HOST from vCenter.` } func (cmd *remove) Remove(ctx context.Context, host *object.HostSystem) error { var h mo.HostSystem err := host.Properties(ctx, host.Reference(), []string{"parent"}, &h) if err != nil { return err } remove := host.Destroy if h.Parent.Type == "ComputeResource" { // Standalone host. From the docs: // "Invoking remove on a HostSystem of standalone type throws a NotSupported fault. // A standalone HostSystem can be removeed only by invoking remove on its parent ComputeResource." remove = object.NewComputeResource(host.Client(), *h.Parent).Destroy } task, err := remove(ctx) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("%s removing... ", host.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { err = cmd.Remove(ctx, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/host/service/000077500000000000000000000000001312205533500166245ustar00rootroot00000000000000govmomi-0.15.0/govc/host/service/command.go000066400000000000000000000052711312205533500205760ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package service import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type service struct { *flags.ClientFlag *flags.HostSystemFlag } func init() { cli.Register("host.service", &service{}) } func (cmd *service) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *service) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *service) Usage() string { return "ACTION ID" } func (cmd *service) Description() string { return `Apply host service ACTION to service ID. Where ACTION is one of: start, stop, restart, status, enable, disable Examples: govc host.service enable TSM-SSH govc host.service start TSM-SSH` } func (cmd *service) status(ctx context.Context, s *object.HostServiceSystem, id string) (string, error) { services, err := s.Service(ctx) if err != nil { return "", err } for _, service := range services { if id == service.Key { return Status(service), nil } } return "N/A", nil } func (cmd *service) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } if f.NArg() != 2 { return flag.ErrHelp } arg := f.Arg(0) id := f.Arg(1) s, err := host.ConfigManager().ServiceSystem(ctx) if err != nil { return err } switch arg { case "start": return s.Start(ctx, id) case "stop": return s.Stop(ctx, id) case "restart": return s.Restart(ctx, id) case "status": ss, err := cmd.status(ctx, s, id) if err != nil { return err } fmt.Println(ss) return nil case "enable": return s.UpdatePolicy(ctx, id, string(types.HostServicePolicyOn)) case "disable": return s.UpdatePolicy(ctx, id, string(types.HostServicePolicyOff)) } return flag.ErrHelp } govmomi-0.15.0/govc/host/service/ls.go000066400000000000000000000051471312205533500176000ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package service import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *flags.ClientFlag *flags.OutputFlag *flags.HostSystemFlag } func init() { cli.Register("host.service.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Description() string { return `List HOST services.` } func Status(s types.HostService) string { if s.Running { return "Running" } return "Stopped" } func Policy(s types.HostService) string { switch types.HostServicePolicy(s.Policy) { case types.HostServicePolicyOff: return "Disabled" case types.HostServicePolicyOn: return "Enabled" case types.HostServicePolicyAutomatic: return "Automatic" default: return s.Policy } } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } s, err := host.ConfigManager().ServiceSystem(ctx) if err != nil { return err } services, err := s.Service(ctx) if err != nil { return err } return cmd.WriteResult(optionResult(services)) } type optionResult []types.HostService func (services optionResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "%s\t%s\t%v\t%s\n", "Key", "Policy", "Status", "Label") for _, s := range services { fmt.Fprintf(tw, "%s\t%s\t%s\t%s\n", s.Key, s.Policy, Status(s), s.Label) } return tw.Flush() } govmomi-0.15.0/govc/host/shutdown.go000066400000000000000000000042021312205533500173640ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package host import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type shutdown struct { *flags.HostSystemFlag force bool } func init() { cli.Register("host.shutdown", &shutdown{}) } func (cmd *shutdown) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.BoolVar(&cmd.force, "f", false, "Force shutdown when host is not in maintenance mode") } func (cmd *shutdown) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *shutdown) Description() string { return `Shutdown HOST.` } func (cmd *shutdown) Shutdown(ctx context.Context, host *object.HostSystem) error { req := types.ShutdownHost_Task{ This: host.Reference(), Force: cmd.force, } res, err := methods.ShutdownHost_Task(ctx, host.Client(), &req) if err != nil { return err } task := object.NewTask(host.Client(), res.Returnval) logger := cmd.ProgressLogger(fmt.Sprintf("%s shutdown... ", host.InventoryPath)) defer logger.Wait() _, err = task.WaitForResult(ctx, logger) return err } func (cmd *shutdown) Run(ctx context.Context, f *flag.FlagSet) error { hosts, err := cmd.HostSystems(f.Args()) if err != nil { return err } for _, host := range hosts { err = cmd.Shutdown(ctx, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/host/storage/000077500000000000000000000000001312205533500166305ustar00rootroot00000000000000govmomi-0.15.0/govc/host/storage/info.go000066400000000000000000000115741312205533500201220ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package storage import ( "context" "flag" "fmt" "io" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) var infoTypes = []string{"hba", "lun"} type infoType string func (t *infoType) Set(s string) error { s = strings.ToLower(s) for _, e := range infoTypes { if s == e { *t = infoType(s) return nil } } return fmt.Errorf("invalid type") } func (t *infoType) String() string { return string(*t) } func (t *infoType) Result(hss mo.HostStorageSystem) flags.OutputWriter { switch string(*t) { case "hba": return hbaResult(hss) case "lun": return lunResult(hss) default: panic("unsupported") } } type info struct { *flags.HostSystemFlag *flags.OutputFlag typ infoType rescan bool unclaimed bool } func init() { cli.Register("host.storage.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) err := cmd.typ.Set("lun") if err != nil { panic(err) } f.Var(&cmd.typ, "t", fmt.Sprintf("Type (%s)", strings.Join(infoTypes, ","))) f.BoolVar(&cmd.rescan, "rescan", false, "Rescan for new storage devices") f.BoolVar(&cmd.unclaimed, "unclaimed", false, "Only show disks that can be used as new VMFS datastores") } func (cmd *info) Description() string { return `Show HOST storage system information. Examples: govc ls -t HostSystem host/* | xargs -n1 govc host.storage.info -unclaimed -host` } func (cmd *info) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } ss, err := host.ConfigManager().StorageSystem(ctx) if err != nil { return err } if cmd.rescan { err = ss.RescanAllHba(ctx) if err != nil { return err } } var hss mo.HostStorageSystem err = ss.Properties(ctx, ss.Reference(), nil, &hss) if err != nil { return nil } if cmd.unclaimed { ds, err := host.ConfigManager().DatastoreSystem(ctx) if err != nil { return err } disks, err := ds.QueryAvailableDisksForVmfs(ctx) if err != nil { return err } var luns []types.BaseScsiLun for i := range disks { luns = append(luns, &disks[i]) } hss.StorageDeviceInfo.ScsiLun = luns } return cmd.WriteResult(cmd.typ.Result(hss)) } type hbaResult mo.HostStorageSystem func (r hbaResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Device\t") fmt.Fprintf(tw, "PCI\t") fmt.Fprintf(tw, "Driver\t") fmt.Fprintf(tw, "Status\t") fmt.Fprintf(tw, "Model\t") fmt.Fprintf(tw, "\n") for _, e := range r.StorageDeviceInfo.HostBusAdapter { hba := e.GetHostHostBusAdapter() fmt.Fprintf(tw, "%s\t", hba.Device) fmt.Fprintf(tw, "%s\t", hba.Pci) fmt.Fprintf(tw, "%s\t", hba.Driver) fmt.Fprintf(tw, "%s\t", hba.Status) fmt.Fprintf(tw, "%s\t", hba.Model) fmt.Fprintf(tw, "\n") } return tw.Flush() } type lunResult mo.HostStorageSystem func (r lunResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Name\t") fmt.Fprintf(tw, "Type\t") fmt.Fprintf(tw, "Capacity\t") fmt.Fprintf(tw, "Model\t") fmt.Fprintf(tw, "\n") for _, e := range r.StorageDeviceInfo.ScsiLun { var tags []string var capacity int64 lun := e.GetScsiLun() if disk, ok := e.(*types.HostScsiDisk); ok { capacity = int64(disk.Capacity.Block) * int64(disk.Capacity.BlockSize) if disk.LocalDisk != nil && *disk.LocalDisk { tags = append(tags, "local") } if disk.Ssd != nil && *disk.Ssd { tags = append(tags, "ssd") } } fmt.Fprintf(tw, "%s\t", lun.DeviceName) fmt.Fprintf(tw, "%s\t", lun.DeviceType) if capacity == 0 { fmt.Fprintf(tw, "-\t") } else { fmt.Fprintf(tw, "%s\t", units.ByteSize(capacity)) } fmt.Fprintf(tw, "%s", lun.Model) if len(tags) > 0 { fmt.Fprintf(tw, " (%s)", strings.Join(tags, ",")) } fmt.Fprintf(tw, "\n") } return tw.Flush() } govmomi-0.15.0/govc/host/storage/mark.go000066400000000000000000000054141312205533500201150ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package storage import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type mark struct { *flags.HostSystemFlag ssd *bool local *bool } func init() { cli.Register("host.storage.mark", &mark{}) } func (cmd *mark) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.Var(flags.NewOptionalBool(&cmd.ssd), "ssd", "Mark as SSD") f.Var(flags.NewOptionalBool(&cmd.local), "local", "Mark as local") } func (cmd *mark) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mark) Usage() string { return "DEVICE_PATH" } func (cmd *mark) Description() string { return `Mark device at DEVICE_PATH.` } func (cmd *mark) Mark(ctx context.Context, ss *object.HostStorageSystem, uuid string) error { var err error var task *object.Task if cmd.ssd != nil { if *cmd.ssd { task, err = ss.MarkAsSsd(ctx, uuid) } else { task, err = ss.MarkAsNonSsd(ctx, uuid) } if err != nil { return err } err = task.Wait(ctx) if err != nil { return err } } if cmd.local != nil { if *cmd.local { task, err = ss.MarkAsLocal(ctx, uuid) } else { task, err = ss.MarkAsNonLocal(ctx, uuid) } if err != nil { return err } err = task.Wait(ctx) if err != nil { return err } } return nil } func (cmd *mark) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return fmt.Errorf("specify device path") } path := f.Args()[0] host, err := cmd.HostSystem() if err != nil { return err } ss, err := host.ConfigManager().StorageSystem(ctx) if err != nil { return err } var hss mo.HostStorageSystem err = ss.Properties(ctx, ss.Reference(), nil, &hss) if err != nil { return nil } for _, e := range hss.StorageDeviceInfo.ScsiLun { disk, ok := e.(*types.HostScsiDisk) if !ok { continue } if disk.DevicePath == path { return cmd.Mark(ctx, ss, disk.Uuid) } } return fmt.Errorf("%s not found", path) } govmomi-0.15.0/govc/host/storage/partition.go000066400000000000000000000056611312205533500212000ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package storage import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type partition struct { *flags.HostSystemFlag *flags.OutputFlag } func init() { cli.Register("host.storage.partition", &partition{}) } func (cmd *partition) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *partition) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *partition) Usage() string { return "DEVICE_PATH" } func (cmd *partition) Description() string { return `Show partition table for device at DEVICE_PATH.` } func (cmd *partition) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return fmt.Errorf("specify device path") } path := f.Args()[0] host, err := cmd.HostSystem() if err != nil { return err } ss, err := host.ConfigManager().StorageSystem(ctx) if err != nil { return err } var hss mo.HostStorageSystem err = ss.Properties(ctx, ss.Reference(), nil, &hss) if err != nil { return nil } info, err := ss.RetrieveDiskPartitionInfo(ctx, path) if err != nil { return err } return cmd.WriteResult(partitionInfo(*info)) } type partitionInfo types.HostDiskPartitionInfo func (p partitionInfo) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "Table format: %s\n", p.Spec.PartitionFormat) fmt.Fprintf(tw, "Number of sectors: %d\n", p.Spec.TotalSectors) fmt.Fprintf(tw, "\n") fmt.Fprintf(tw, "Number\t") fmt.Fprintf(tw, "Start\t") fmt.Fprintf(tw, "End\t") fmt.Fprintf(tw, "Size\t") fmt.Fprintf(tw, "Type\t") fmt.Fprintf(tw, "\n") for _, e := range p.Spec.Partition { sectors := e.EndSector - e.StartSector fmt.Fprintf(tw, "%d\t", e.Partition) fmt.Fprintf(tw, "%d\t", e.StartSector) fmt.Fprintf(tw, "%d\t", e.EndSector) fmt.Fprintf(tw, "%s\t", units.ByteSize(sectors*512)) fmt.Fprintf(tw, "%s\t", e.Type) fmt.Fprintf(tw, "\n") } return tw.Flush() } govmomi-0.15.0/govc/host/vnic/000077500000000000000000000000001312205533500161235ustar00rootroot00000000000000govmomi-0.15.0/govc/host/vnic/info.go000066400000000000000000000066241312205533500174150ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vnic import ( "context" "flag" "fmt" "os" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.HostSystemFlag } func init() { cli.Register("host.vnic.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { host, err := cmd.HostSystem() if err != nil { return err } ns, err := cmd.HostNetworkSystem() if err != nil { return err } var mns mo.HostNetworkSystem m, err := host.ConfigManager().VirtualNicManager(ctx) if err != nil { return err } info, err := m.Info(ctx) if err != nil { return err } err = ns.Properties(ctx, ns.Reference(), []string{"networkInfo"}, &mns) if err != nil { return err } tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) type dnet struct { dvp mo.DistributedVirtualPortgroup dvs mo.VmwareDistributedVirtualSwitch } dnets := make(map[string]*dnet) for _, nic := range mns.NetworkInfo.Vnic { fmt.Fprintf(tw, "Device:\t%s\n", nic.Device) if dvp := nic.Spec.DistributedVirtualPort; dvp != nil { dn, ok := dnets[dvp.PortgroupKey] if !ok { dn = new(dnet) o := object.NewDistributedVirtualPortgroup(host.Client(), types.ManagedObjectReference{ Type: "DistributedVirtualPortgroup", Value: dvp.PortgroupKey, }) err = o.Properties(ctx, o.Reference(), []string{"name", "config.distributedVirtualSwitch"}, &dn.dvp) if err != nil { return err } err = o.Properties(ctx, *dn.dvp.Config.DistributedVirtualSwitch, []string{"name"}, &dn.dvs) if err != nil { return err } dnets[dvp.PortgroupKey] = dn } fmt.Fprintf(tw, "Network label:\t%s\n", dn.dvp.Name) fmt.Fprintf(tw, "Switch:\t%s\n", dn.dvs.Name) } else { fmt.Fprintf(tw, "Network label:\t%s\n", nic.Portgroup) for _, pg := range mns.NetworkInfo.Portgroup { if pg.Spec.Name == nic.Portgroup { fmt.Fprintf(tw, "Switch:\t%s\n", pg.Spec.VswitchName) break } } } fmt.Fprintf(tw, "IP address:\t%s\n", nic.Spec.Ip.IpAddress) fmt.Fprintf(tw, "TCP/IP stack:\t%s\n", nic.Spec.NetStackInstanceKey) var services []string for _, nc := range info.NetConfig { for _, dev := range nc.SelectedVnic { key := nc.NicType + "." + nic.Key if dev == key { services = append(services, nc.NicType) } } } fmt.Fprintf(tw, "Enabled services:\t%s\n", strings.Join(services, ", ")) } return tw.Flush() } govmomi-0.15.0/govc/host/vnic/service.go000066400000000000000000000052271312205533500201200ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vnic import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type service struct { *flags.HostSystemFlag Enable bool } func init() { cli.Register("host.vnic.service", &service{}) } func (cmd *service) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.BoolVar(&cmd.Enable, "enable", true, "Enable service") } func (cmd *service) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *service) Usage() string { return "SERVICE DEVICE" } func (cmd *service) Description() string { nicTypes := []string{ string(types.HostVirtualNicManagerNicTypeVmotion), string(types.HostVirtualNicManagerNicTypeFaultToleranceLogging), string(types.HostVirtualNicManagerNicTypeVSphereReplication), string(types.HostVirtualNicManagerNicTypeVSphereReplicationNFC), string(types.HostVirtualNicManagerNicTypeManagement), string(types.HostVirtualNicManagerNicTypeVsan), string(types.HostVirtualNicManagerNicTypeVSphereProvisioning), } return fmt.Sprintf(` Enable or disable service on a virtual nic device. Where SERVICE is one of: %s Where DEVICE is one of: %s Examples: govc host.vnic.service -host hostname -enable vsan vmk0 govc host.vnic.service -host hostname -enable=false vmotion vmk1`, strings.Join(nicTypes, "|"), strings.Join([]string{"vmk0", "vmk1", "..."}, "|")) } func (cmd *service) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 2 { return flag.ErrHelp } service := f.Arg(0) device := f.Arg(1) host, err := cmd.HostSystem() if err != nil { return err } m, err := host.ConfigManager().VirtualNicManager(ctx) if err != nil { return err } var method func(context.Context, string, string) error if cmd.Enable { method = m.SelectVnic } else { method = m.DeselectVnic } if method == nil { return flag.ErrHelp } return method(ctx, service, device) } govmomi-0.15.0/govc/host/vswitch/000077500000000000000000000000001312205533500166535ustar00rootroot00000000000000govmomi-0.15.0/govc/host/vswitch/add.go000066400000000000000000000033721312205533500177370ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vswitch import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.HostSystemFlag nic string spec types.HostVirtualSwitchSpec } func init() { cli.Register("host.vswitch.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.spec.NumPorts = 128 // default f.Var(flags.NewInt32(&cmd.spec.NumPorts), "ports", "Number of ports") f.Var(flags.NewInt32(&cmd.spec.Mtu), "mtu", "MTU") f.StringVar(&cmd.nic, "nic", "", "Bridge nic device") } func (cmd *add) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Usage() string { return "NAME" } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { ns, err := cmd.HostNetworkSystem() if err != nil { return err } if cmd.nic != "" { cmd.spec.Bridge = &types.HostVirtualSwitchBondBridge{ NicDevice: []string{cmd.nic}, } } return ns.AddVirtualSwitch(ctx, f.Arg(0), &cmd.spec) } govmomi-0.15.0/govc/host/vswitch/info.go000066400000000000000000000064321312205533500201420ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vswitch import ( "context" "flag" "fmt" "io" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.HostSystemFlag } func init() { cli.Register("host.vswitch.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } ns, err := cmd.HostNetworkSystem() if err != nil { return err } var mns mo.HostNetworkSystem pc := property.DefaultCollector(client) err = pc.RetrieveOne(ctx, ns.Reference(), []string{"networkInfo.vswitch"}, &mns) if err != nil { return err } r := &infoResult{mns.NetworkInfo.Vswitch} return cmd.WriteResult(r) } type infoResult struct { Vswitch []types.HostVirtualSwitch } func (r *infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for i, s := range r.Vswitch { if i > 0 { fmt.Fprintln(tw) } fmt.Fprintf(tw, "Name:\t%s\n", s.Name) fmt.Fprintf(tw, "Portgroup:\t%s\n", keys("key-vim.host.PortGroup-", s.Portgroup)) fmt.Fprintf(tw, "Pnic:\t%s\n", keys("key-vim.host.PhysicalNic-", s.Pnic)) fmt.Fprintf(tw, "MTU:\t%d\n", s.Mtu) fmt.Fprintf(tw, "Ports:\t%d\n", s.NumPorts) fmt.Fprintf(tw, "Ports Available:\t%d\n", s.NumPortsAvailable) HostNetworkPolicy(tw, s.Spec.Policy) } return tw.Flush() } func keys(key string, vals []string) string { for i, val := range vals { vals[i] = strings.TrimPrefix(val, key) } return strings.Join(vals, ", ") } func enabled(b *bool) string { if b != nil && *b { return "Yes" } return "No" } func HostNetworkPolicy(w io.Writer, p *types.HostNetworkPolicy) { if p == nil || p.Security == nil { return // e.g. Workstation } fmt.Fprintf(w, "Allow promiscuous mode:\t%s\n", enabled(p.Security.AllowPromiscuous)) fmt.Fprintf(w, "Allow forged transmits:\t%s\n", enabled(p.Security.ForgedTransmits)) fmt.Fprintf(w, "Allow MAC changes:\t%s\n", enabled(p.Security.MacChanges)) } govmomi-0.15.0/govc/host/vswitch/remove.go000066400000000000000000000025421312205533500205020ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vswitch import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type remove struct { *flags.HostSystemFlag } func init() { cli.Register("host.vswitch.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "NAME" } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { ns, err := cmd.HostNetworkSystem() if err != nil { return err } return ns.RemoveVirtualSwitch(ctx, f.Arg(0)) } govmomi-0.15.0/govc/importx/000077500000000000000000000000001312205533500157115ustar00rootroot00000000000000govmomi-0.15.0/govc/importx/archive.go000066400000000000000000000053161312205533500176660ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "archive/tar" "context" "flag" "fmt" "io" "io/ioutil" "os" "path" "path/filepath" "github.com/vmware/govmomi/ovf" ) // ArchiveFlag doesn't register any flags; // only encapsulates some common archive related functionality. type ArchiveFlag struct { Archive } func newArchiveFlag(ctx context.Context) (*ArchiveFlag, context.Context) { return &ArchiveFlag{}, ctx } func (f *ArchiveFlag) Register(ctx context.Context, fs *flag.FlagSet) { } func (f *ArchiveFlag) Process(ctx context.Context) error { return nil } func (f *ArchiveFlag) ReadOvf(fpath string) ([]byte, error) { r, _, err := f.Archive.Open(fpath) if err != nil { return nil, err } defer r.Close() return ioutil.ReadAll(r) } func (f *ArchiveFlag) ReadEnvelope(fpath string) (*ovf.Envelope, error) { if fpath == "" { return &ovf.Envelope{}, nil } r, _, err := f.Open(fpath) if err != nil { return nil, err } defer r.Close() e, err := ovf.Unmarshal(r) if err != nil { return nil, fmt.Errorf("failed to parse ovf: %s", err.Error()) } return e, nil } type Archive interface { Open(string) (io.ReadCloser, int64, error) } type TapeArchive struct { path string } type TapeArchiveEntry struct { io.Reader f *os.File } func (t *TapeArchiveEntry) Close() error { return t.f.Close() } func (t *TapeArchive) Open(name string) (io.ReadCloser, int64, error) { f, err := os.Open(t.path) if err != nil { return nil, 0, err } r := tar.NewReader(f) for { h, err := r.Next() if err == io.EOF { break } if err != nil { return nil, 0, err } matched, err := path.Match(name, path.Base(h.Name)) if err != nil { return nil, 0, err } if matched { return &TapeArchiveEntry{r, f}, h.Size, nil } } _ = f.Close() return nil, 0, os.ErrNotExist } type FileArchive struct { path string } func (t *FileArchive) Open(name string) (io.ReadCloser, int64, error) { fpath := name if name != t.path { fpath = filepath.Join(filepath.Dir(t.path), name) } s, err := os.Stat(fpath) if err != nil { return nil, 0, err } f, err := os.Open(fpath) if err != nil { return nil, 0, err } return f, s.Size(), nil } govmomi-0.15.0/govc/importx/folder.go000066400000000000000000000041251312205533500175150ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "errors" "flag" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type FolderFlag struct { *flags.DatacenterFlag folder string } func newFolderFlag(ctx context.Context) (*FolderFlag, context.Context) { f := &FolderFlag{} f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) return f, ctx } func (flag *FolderFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.DatacenterFlag.Register(ctx, f) f.StringVar(&flag.folder, "folder", "", "Path to folder to add the VM to") } func (flag *FolderFlag) Process(ctx context.Context) error { return flag.DatacenterFlag.Process(ctx) } func (flag *FolderFlag) Folder() (*object.Folder, error) { ctx := context.TODO() if len(flag.folder) == 0 { dc, err := flag.Datacenter() if err != nil { return nil, err } folders, err := dc.Folders(ctx) if err != nil { return nil, err } return folders.VmFolder, nil } finder, err := flag.Finder() if err != nil { return nil, err } mo, err := finder.ManagedObjectList(ctx, flag.folder) if err != nil { return nil, err } if len(mo) == 0 { return nil, errors.New("folder argument does not resolve to object") } if len(mo) > 1 { return nil, errors.New("folder argument resolves to more than one object") } ref := mo[0].Object.Reference() if ref.Type != "Folder" { return nil, errors.New("folder argument does not resolve to folder") } c, err := flag.Client() if err != nil { return nil, err } return object.NewFolder(c, ref), nil } govmomi-0.15.0/govc/importx/importable.go000066400000000000000000000024411312205533500203770ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "fmt" "path" ) type importable struct { localPath string remotePath string } func (i importable) Ext() string { return path.Ext(i.localPath) } func (i importable) Base() string { return path.Base(i.localPath) } func (i importable) BaseClean() string { b := i.Base() e := i.Ext() return b[:len(b)-len(e)] } func (i importable) RemoteSrcVMDK() string { file := fmt.Sprintf("%s-src.vmdk", i.BaseClean()) return i.toRemotePath(file) } func (i importable) RemoteDstVMDK() string { file := fmt.Sprintf("%s.vmdk", i.BaseClean()) return i.toRemotePath(file) } func (i importable) toRemotePath(p string) string { if i.remotePath == "" { return p } return path.Join(i.remotePath, p) } govmomi-0.15.0/govc/importx/lease_updater.go000066400000000000000000000054711312205533500210640ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "fmt" "net/url" "sync" "sync/atomic" "time" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/progress" "github.com/vmware/govmomi/vim25/types" ) type ovfFileItem struct { url *url.URL item types.OvfFileItem ch chan progress.Report } func (o ovfFileItem) Sink() chan<- progress.Report { return o.ch } type leaseUpdater struct { client *vim25.Client lease *object.HttpNfcLease pos int64 // Number of bytes total int64 // Total number of bytes done chan struct{} // When lease updater should stop wg sync.WaitGroup // Track when update loop is done } func newLeaseUpdater(client *vim25.Client, lease *object.HttpNfcLease, items []ovfFileItem) *leaseUpdater { l := leaseUpdater{ client: client, lease: lease, done: make(chan struct{}), } for _, item := range items { l.total += item.item.Size go l.waitForProgress(item) } // Kickstart update loop l.wg.Add(1) go l.run() return &l } func (l *leaseUpdater) waitForProgress(item ovfFileItem) { var pos, total int64 total = item.item.Size for { select { case <-l.done: return case p, ok := <-item.ch: // Return in case of error if ok && p.Error() != nil { return } if !ok { // Last element on the channel, add to total atomic.AddInt64(&l.pos, total-pos) return } // Approximate progress in number of bytes x := int64(float32(total) * (p.Percentage() / 100.0)) atomic.AddInt64(&l.pos, x-pos) pos = x } } } func (l *leaseUpdater) run() { defer l.wg.Done() tick := time.NewTicker(2 * time.Second) defer tick.Stop() for { select { case <-l.done: return case <-tick.C: // From the vim api HttpNfcLeaseProgress(percent) doc, percent == // "Completion status represented as an integer in the 0-100 range." // Always report the current value of percent, as it will renew the // lease even if the value hasn't changed or is 0. percent := int32(float32(100*atomic.LoadInt64(&l.pos)) / float32(l.total)) err := l.lease.HttpNfcLeaseProgress(context.TODO(), percent) if err != nil { fmt.Printf("from lease updater: %s\n", err) } } } } func (l *leaseUpdater) Done() { close(l.done) l.wg.Wait() } govmomi-0.15.0/govc/importx/options.go000066400000000000000000000040531312205533500177350ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "encoding/json" "flag" "os" "github.com/vmware/govmomi/ovf" "github.com/vmware/govmomi/vim25/types" ) type Property struct { types.KeyValue Spec *ovf.Property `json:",omitempty"` } type Network struct { Name string Network string } type Options struct { AllDeploymentOptions []string `json:",omitempty"` Deployment string AllDiskProvisioningOptions []string `json:",omitempty"` DiskProvisioning string AllIPAllocationPolicyOptions []string `json:",omitempty"` IPAllocationPolicy string AllIPProtocolOptions []string `json:",omitempty"` IPProtocol string PropertyMapping []Property `json:",omitempty"` NetworkMapping []Network `json:",omitempty"` Annotation string `json:",omitempty"` PowerOn bool InjectOvfEnv bool WaitForIP bool Name *string } type OptionsFlag struct { Options Options path string } func newOptionsFlag(ctx context.Context) (*OptionsFlag, context.Context) { return &OptionsFlag{}, ctx } func (flag *OptionsFlag) Register(ctx context.Context, f *flag.FlagSet) { f.StringVar(&flag.path, "options", "", "Options spec file path for VM deployment") } func (flag *OptionsFlag) Process(ctx context.Context) error { if len(flag.path) == 0 { return nil } var err error in := os.Stdin if flag.path != "-" { in, err = os.Open(flag.path) if err != nil { return err } defer in.Close() } return json.NewDecoder(in).Decode(&flag.Options) } govmomi-0.15.0/govc/importx/ova.go000066400000000000000000000024701312205533500170300ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type ova struct { *ovfx } func init() { cli.Register("import.ova", &ova{&ovfx{}}) } func (cmd *ova) Usage() string { return "PATH_TO_OVA" } func (cmd *ova) Run(ctx context.Context, f *flag.FlagSet) error { fpath, err := cmd.Prepare(f) if err != nil { return err } cmd.Archive = &TapeArchive{fpath} moref, err := cmd.Import(fpath) if err != nil { return err } vm := object.NewVirtualMachine(cmd.Client, *moref) return cmd.Deploy(vm) } func (cmd *ova) Import(fpath string) (*types.ManagedObjectReference, error) { ovf := "*.ovf" return cmd.ovfx.Import(ovf) } govmomi-0.15.0/govc/importx/ovf.go000066400000000000000000000231301312205533500170310ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "errors" "flag" "fmt" "path" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/ovf" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/progress" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type ovfx struct { *flags.DatastoreFlag *flags.HostSystemFlag *flags.OutputFlag *flags.ResourcePoolFlag *ArchiveFlag *OptionsFlag *FolderFlag Name string Client *vim25.Client Datacenter *object.Datacenter Datastore *object.Datastore ResourcePool *object.ResourcePool } func init() { cli.Register("import.ovf", &ovfx{}) } func (cmd *ovfx) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.ArchiveFlag, ctx = newArchiveFlag(ctx) cmd.ArchiveFlag.Register(ctx, f) cmd.OptionsFlag, ctx = newOptionsFlag(ctx) cmd.OptionsFlag.Register(ctx, f) cmd.FolderFlag, ctx = newFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) f.StringVar(&cmd.Name, "name", "", "Name to use for new entity") } func (cmd *ovfx) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.ArchiveFlag.Process(ctx); err != nil { return err } if err := cmd.OptionsFlag.Process(ctx); err != nil { return err } if err := cmd.FolderFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ovfx) Usage() string { return "PATH_TO_OVF" } func (cmd *ovfx) Run(ctx context.Context, f *flag.FlagSet) error { fpath, err := cmd.Prepare(f) if err != nil { return err } cmd.Archive = &FileArchive{fpath} moref, err := cmd.Import(fpath) if err != nil { return err } vm := object.NewVirtualMachine(cmd.Client, *moref) return cmd.Deploy(vm) } func (cmd *ovfx) Prepare(f *flag.FlagSet) (string, error) { var err error args := f.Args() if len(args) != 1 { return "", errors.New("no file specified") } cmd.Client, err = cmd.DatastoreFlag.Client() if err != nil { return "", err } cmd.Datacenter, err = cmd.DatastoreFlag.Datacenter() if err != nil { return "", err } cmd.Datastore, err = cmd.DatastoreFlag.Datastore() if err != nil { return "", err } cmd.ResourcePool, err = cmd.ResourcePoolFlag.ResourcePool() if err != nil { return "", err } return f.Arg(0), nil } func (cmd *ovfx) Deploy(vm *object.VirtualMachine) error { if err := cmd.InjectOvfEnv(vm); err != nil { return err } if err := cmd.PowerOn(vm); err != nil { return err } if err := cmd.WaitForIP(vm); err != nil { return err } return nil } func (cmd *ovfx) Map(op []Property) (p []types.KeyValue) { for _, v := range op { p = append(p, v.KeyValue) } return } func (cmd *ovfx) NetworkMap(e *ovf.Envelope) (p []types.OvfNetworkMapping) { ctx := context.TODO() finder, err := cmd.DatastoreFlag.Finder() if err != nil { return } networks := map[string]string{} if e.Network != nil { for _, net := range e.Network.Networks { networks[net.Name] = net.Name } } for _, net := range cmd.Options.NetworkMapping { networks[net.Name] = net.Network } for src, dst := range networks { if net, err := finder.Network(ctx, dst); err == nil { p = append(p, types.OvfNetworkMapping{ Name: src, Network: net.Reference(), }) } } return } func (cmd *ovfx) Import(fpath string) (*types.ManagedObjectReference, error) { ctx := context.TODO() o, err := cmd.ReadOvf(fpath) if err != nil { return nil, err } e, err := cmd.ReadEnvelope(fpath) if err != nil { return nil, fmt.Errorf("failed to parse ovf: %s", err.Error()) } name := "Govc Virtual Appliance" if e.VirtualSystem != nil { name = e.VirtualSystem.ID if e.VirtualSystem.Name != nil { name = *e.VirtualSystem.Name } } // Override name from options if specified if cmd.Options.Name != nil { name = *cmd.Options.Name } // Override name from arguments if specified if cmd.Name != "" { name = cmd.Name } cisp := types.OvfCreateImportSpecParams{ DiskProvisioning: cmd.Options.DiskProvisioning, EntityName: name, IpAllocationPolicy: cmd.Options.IPAllocationPolicy, IpProtocol: cmd.Options.IPProtocol, OvfManagerCommonParams: types.OvfManagerCommonParams{ DeploymentOption: cmd.Options.Deployment, Locale: "US"}, PropertyMapping: cmd.Map(cmd.Options.PropertyMapping), NetworkMapping: cmd.NetworkMap(e), } m := object.NewOvfManager(cmd.Client) spec, err := m.CreateImportSpec(ctx, string(o), cmd.ResourcePool, cmd.Datastore, cisp) if err != nil { return nil, err } if spec.Error != nil { return nil, errors.New(spec.Error[0].LocalizedMessage) } if spec.Warning != nil { for _, w := range spec.Warning { _, _ = cmd.Log(fmt.Sprintf("Warning: %s\n", w.LocalizedMessage)) } } if cmd.Options.Annotation != "" { switch s := spec.ImportSpec.(type) { case *types.VirtualMachineImportSpec: s.ConfigSpec.Annotation = cmd.Options.Annotation case *types.VirtualAppImportSpec: s.VAppConfigSpec.Annotation = cmd.Options.Annotation } } var host *object.HostSystem if cmd.SearchFlag.IsSet() { if host, err = cmd.HostSystem(); err != nil { return nil, err } } folder, err := cmd.Folder() if err != nil { return nil, err } lease, err := cmd.ResourcePool.ImportVApp(ctx, spec.ImportSpec, folder, host) if err != nil { return nil, err } info, err := lease.Wait(ctx) if err != nil { return nil, err } // Build slice of items and URLs first, so that the lease updater can know // about every item that needs to be uploaded, and thereby infer progress. var items []ovfFileItem for _, device := range info.DeviceUrl { for _, item := range spec.FileItem { if device.ImportKey != item.DeviceId { continue } u, err := cmd.Client.ParseURL(device.Url) if err != nil { return nil, err } i := ovfFileItem{ url: u, item: item, ch: make(chan progress.Report), } items = append(items, i) } } u := newLeaseUpdater(cmd.Client, lease, items) defer u.Done() for _, i := range items { err = cmd.Upload(lease, i) if err != nil { return nil, err } } return &info.Entity, lease.HttpNfcLeaseComplete(ctx) } func (cmd *ovfx) Upload(lease *object.HttpNfcLease, ofi ovfFileItem) error { item := ofi.item file := item.Path f, size, err := cmd.Open(file) if err != nil { return err } defer f.Close() logger := cmd.ProgressLogger(fmt.Sprintf("Uploading %s... ", path.Base(file))) defer logger.Wait() opts := soap.Upload{ ContentLength: size, Progress: progress.Tee(ofi, logger), } // Non-disk files (such as .iso) use the PUT method. // Overwrite: t header is also required in this case (ovftool does the same) if item.Create { opts.Method = "PUT" opts.Headers = map[string]string{ "Overwrite": "t", } } else { opts.Method = "POST" opts.Type = "application/x-vnd.vmware-streamVmdk" } return cmd.Client.Client.Upload(f, ofi.url, &opts) } func (cmd *ovfx) PowerOn(vm *object.VirtualMachine) error { ctx := context.TODO() if !cmd.Options.PowerOn { return nil } cmd.Log("Powering on VM...\n") task, err := vm.PowerOn(ctx) if err != nil { return err } if _, err = task.WaitForResult(ctx, nil); err != nil { return err } return nil } func (cmd *ovfx) InjectOvfEnv(vm *object.VirtualMachine) error { if !cmd.Options.InjectOvfEnv { return nil } cmd.Log("Injecting OVF environment...\n") var opts []types.BaseOptionValue a := cmd.Client.ServiceContent.About // build up Environment in order to marshal to xml var props []ovf.EnvProperty for _, p := range cmd.Options.PropertyMapping { props = append(props, ovf.EnvProperty{ Key: p.Key, Value: p.Value, }) } env := ovf.Env{ EsxID: vm.Reference().Value, Platform: &ovf.PlatformSection{ Kind: a.Name, Version: a.Version, Vendor: a.Vendor, Locale: "US", }, Property: &ovf.PropertySection{ Properties: props, }, } opts = append(opts, &types.OptionValue{ Key: "guestinfo.ovfEnv", Value: env.MarshalManual(), }) ctx := context.Background() task, err := vm.Reconfigure(ctx, types.VirtualMachineConfigSpec{ ExtraConfig: opts, }) if err != nil { return err } return task.Wait(ctx) } func (cmd *ovfx) WaitForIP(vm *object.VirtualMachine) error { ctx := context.TODO() if !cmd.Options.PowerOn || !cmd.Options.WaitForIP { return nil } cmd.Log("Waiting for IP address...\n") ip, err := vm.WaitForIP(ctx) if err != nil { return err } cmd.Log(fmt.Sprintf("Received IP address: %s\n", ip)) return nil } govmomi-0.15.0/govc/importx/spec.go000066400000000000000000000106631312205533500172000ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "encoding/json" "flag" "fmt" "path" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/ovf" "github.com/vmware/govmomi/vim25/types" ) var ( // all possible ovf property values // the first element being the default value allDeploymentOptions = []string{"small", "medium", "large"} allDiskProvisioningOptions = []string{"thin", "monolithicSparse", "monolithicFlat", "twoGbMaxExtentSparse", "twoGbMaxExtentFlat", "seSparse", "eagerZeroedThick", "thick", "sparse", "flat"} allIPAllocationPolicyOptions = []string{"dhcpPolicy", "transientPolicy", "fixedPolicy", "fixedAllocatedPolicy"} allIPProtocolOptions = []string{"IPv4", "IPv6"} ) type spec struct { *ArchiveFlag verbose bool } func init() { cli.Register("import.spec", &spec{}) } func (cmd *spec) Register(ctx context.Context, f *flag.FlagSet) { cmd.ArchiveFlag, ctx = newArchiveFlag(ctx) cmd.ArchiveFlag.Register(ctx, f) f.BoolVar(&cmd.verbose, "verbose", false, "Verbose spec output") } func (cmd *spec) Process(ctx context.Context) error { if err := cmd.ArchiveFlag.Process(ctx); err != nil { return err } return nil } func (cmd *spec) Usage() string { return "PATH_TO_OVF_OR_OVA" } func (cmd *spec) Run(ctx context.Context, f *flag.FlagSet) error { fpath := "" args := f.Args() if len(args) == 1 { fpath = f.Arg(0) } if len(fpath) > 0 { switch path.Ext(fpath) { case ".ovf": cmd.Archive = &FileArchive{fpath} case "", ".ova": cmd.Archive = &TapeArchive{fpath} fpath = "*.ovf" default: return fmt.Errorf("invalid file extension %s", path.Ext(fpath)) } } return cmd.Spec(fpath) } func (cmd *spec) Map(e *ovf.Envelope) (res []Property) { if e == nil || e.VirtualSystem == nil { return nil } for _, p := range e.VirtualSystem.Product { for i, v := range p.Property { d := "" if v.Default != nil { d = *v.Default } // From OVF spec, section 9.5.1: // key-value-env = [class-value "."] key-value-prod ["." instance-value] k := v.Key if p.Class != nil { k = fmt.Sprintf("%s.%s", *p.Class, k) } if p.Instance != nil { k = fmt.Sprintf("%s.%s", k, *p.Instance) } np := Property{KeyValue: types.KeyValue{Key: k, Value: d}} if cmd.verbose { np.Spec = &p.Property[i] } res = append(res, np) } } return } func (cmd *spec) Spec(fpath string) error { e, err := cmd.ReadEnvelope(fpath) if err != nil { return err } var deploymentOptions = allDeploymentOptions if e.DeploymentOption != nil && e.DeploymentOption.Configuration != nil { deploymentOptions = nil // add default first for _, c := range e.DeploymentOption.Configuration { if c.Default != nil && *c.Default { deploymentOptions = append(deploymentOptions, c.ID) } } for _, c := range e.DeploymentOption.Configuration { if c.Default == nil || !*c.Default { deploymentOptions = append(deploymentOptions, c.ID) } } } o := Options{ Deployment: deploymentOptions[0], DiskProvisioning: allDiskProvisioningOptions[0], IPAllocationPolicy: allIPAllocationPolicyOptions[0], IPProtocol: allIPProtocolOptions[0], PowerOn: false, WaitForIP: false, InjectOvfEnv: false, PropertyMapping: cmd.Map(e)} if e.VirtualSystem != nil && e.VirtualSystem.Annotation != nil { for _, a := range e.VirtualSystem.Annotation { o.Annotation += a.Annotation } } if e.Network != nil { for _, net := range e.Network.Networks { o.NetworkMapping = append(o.NetworkMapping, Network{net.Name, ""}) } } if cmd.verbose { o.AllDeploymentOptions = deploymentOptions o.AllDiskProvisioningOptions = allDiskProvisioningOptions o.AllIPAllocationPolicyOptions = allIPAllocationPolicyOptions o.AllIPProtocolOptions = allIPProtocolOptions } j, err := json.Marshal(&o) if err != nil { return err } fmt.Println(string(j)) return nil } govmomi-0.15.0/govc/importx/vmdk.go000066400000000000000000000263231312205533500172070ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package importx import ( "context" "errors" "flag" "fmt" "path" "reflect" "regexp" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/progress" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type vmdk struct { *flags.DatastoreFlag *flags.ResourcePoolFlag *flags.OutputFlag upload bool force bool keep bool Client *vim25.Client Datacenter *object.Datacenter Datastore *object.Datastore ResourcePool *object.ResourcePool } func init() { cli.Register("import.vmdk", &vmdk{}) cli.Alias("import.vmdk", "datastore.import") } func (cmd *vmdk) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.upload, "upload", true, "Upload specified disk") f.BoolVar(&cmd.force, "force", false, "Overwrite existing disk") f.BoolVar(&cmd.keep, "keep", false, "Keep uploaded disk after import") } func (cmd *vmdk) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *vmdk) Usage() string { return "PATH_TO_VMDK [REMOTE_DIRECTORY]" } func (cmd *vmdk) Run(ctx context.Context, f *flag.FlagSet) error { var err error args := f.Args() if len(args) < 1 { return errors.New("no file to import") } file := importable{ localPath: f.Arg(0), } // Include remote path if specified if len(args) >= 2 { file.remotePath = f.Arg(1) } cmd.Client, err = cmd.DatastoreFlag.Client() if err != nil { return err } cmd.Datacenter, err = cmd.DatastoreFlag.Datacenter() if err != nil { return err } cmd.Datastore, err = cmd.DatastoreFlag.Datastore() if err != nil { return err } cmd.ResourcePool, err = cmd.ResourcePoolFlag.ResourcePool() if err != nil { return err } err = cmd.PrepareDestination(file) if err != nil { return err } if cmd.upload { err = cmd.Upload(file) if err != nil { return err } } return cmd.Import(file) } // PrepareDestination makes sure that the destination VMDK does not yet exist. // If the force flag is passed, it removes the existing VMDK. This functions // exists to give a meaningful error if the remote VMDK already exists. // // CopyVirtualDisk can return a " file does not exist" error while in fact // the source file *does* exist and the *destination* file also exist. // func (cmd *vmdk) PrepareDestination(i importable) error { ctx := context.TODO() vmdkPath := i.RemoteDstVMDK() res, err := cmd.Datastore.Stat(ctx, vmdkPath) if err != nil { switch err.(type) { case object.DatastoreNoSuchDirectoryError: // The base path doesn't exist. Create it. dsPath := cmd.Datastore.Path(path.Dir(vmdkPath)) m := object.NewFileManager(cmd.Client) return m.MakeDirectory(ctx, dsPath, cmd.Datacenter, true) case object.DatastoreNoSuchFileError: // Destination path doesn't exist; all good to continue with import. return nil } return err } // Check that the returned entry has the right type. switch res.(type) { case *types.VmDiskFileInfo: default: expected := "VmDiskFileInfo" actual := reflect.TypeOf(res) panic(fmt.Sprintf("Expected: %s, actual: %s", expected, actual)) } if !cmd.force { dsPath := cmd.Datastore.Path(vmdkPath) err = fmt.Errorf("File %s already exists", dsPath) return err } // Delete existing disk. err = cmd.DeleteDisk(vmdkPath) if err != nil { return err } return nil } func (cmd *vmdk) Upload(i importable) error { ctx := context.TODO() p := soap.DefaultUpload if cmd.OutputFlag.TTY { logger := cmd.ProgressLogger("Uploading... ") p.Progress = logger defer logger.Wait() } return cmd.Datastore.UploadFile(ctx, i.localPath, i.RemoteSrcVMDK(), &p) } func (cmd *vmdk) Import(i importable) error { err := cmd.Copy(i) if err != nil { return err } if !cmd.keep { err = cmd.DeleteDisk(i.RemoteSrcVMDK()) if err != nil { return err } } return nil } func (cmd *vmdk) Copy(i importable) error { var err error logger := cmd.ProgressLogger("Importing... ") defer logger.Wait() agg := progress.NewAggregator(logger) defer agg.Done() switch p := cmd.Client.ServiceContent.About.ApiType; p { case "HostAgent": err = cmd.CopyHostAgent(i, agg) case "VirtualCenter": err = cmd.CopyVirtualCenter(i, agg) default: return fmt.Errorf("unsupported ApiType: %s", p) } return err } func (cmd *vmdk) CopyHostAgent(i importable, s progress.Sinker) error { ctx := context.TODO() spec := &types.VirtualDiskSpec{ AdapterType: "lsiLogic", DiskType: "thin", } dc := cmd.Datacenter src := cmd.Datastore.Path(i.RemoteSrcVMDK()) dst := cmd.Datastore.Path(i.RemoteDstVMDK()) vdm := object.NewVirtualDiskManager(cmd.Client) task, err := vdm.CopyVirtualDisk(ctx, src, dc, dst, dc, spec, false) if err != nil { return err } ps := progress.Prefix(s, "copying disk") _, err = task.WaitForResult(ctx, ps) if err != nil { return err } return nil } func (cmd *vmdk) CopyVirtualCenter(i importable, s progress.Sinker) error { var err error srcName := i.BaseClean() + "-srcvm" dstName := i.BaseClean() + "-dstvm" spec := &configSpec{ Name: srcName, GuestId: "otherGuest", Files: &types.VirtualMachineFileInfo{ VmPathName: fmt.Sprintf("[%s]", cmd.Datastore.Name()), }, } spec.AddDisk(cmd.Datastore, i.RemoteSrcVMDK()) src, err := cmd.CreateVM(spec) if err != nil { return err } dst, err := cmd.CloneVM(src, dstName) if err != nil { return err } err = cmd.DestroyVM(src) if err != nil { return err } vmdk, err := cmd.DetachDisk(dst) if err != nil { return err } err = cmd.MoveDisk(vmdk, i.RemoteDstVMDK()) if err != nil { return err } err = cmd.DestroyVM(dst) if err != nil { return err } return nil } func (cmd *vmdk) MoveDisk(src, dst string) error { ctx := context.TODO() dsSrc := cmd.Datastore.Path(src) dsDst := cmd.Datastore.Path(dst) vdm := object.NewVirtualDiskManager(cmd.Client) task, err := vdm.MoveVirtualDisk(ctx, dsSrc, cmd.Datacenter, dsDst, cmd.Datacenter, true) if err != nil { return err } return task.Wait(ctx) } func (cmd *vmdk) DeleteDisk(path string) error { ctx := context.TODO() vdm := object.NewVirtualDiskManager(cmd.Client) task, err := vdm.DeleteVirtualDisk(ctx, cmd.Datastore.Path(path), cmd.Datacenter) if err != nil { return err } return task.Wait(ctx) } func (cmd *vmdk) DetachDisk(vm *object.VirtualMachine) (string, error) { ctx := context.TODO() var mvm mo.VirtualMachine pc := property.DefaultCollector(cmd.Client) err := pc.RetrieveOne(ctx, vm.Reference(), []string{"config.hardware"}, &mvm) if err != nil { return "", err } spec := new(configSpec) dsFile := spec.RemoveDisk(&mvm) task, err := vm.Reconfigure(ctx, spec.ToSpec()) if err != nil { return "", err } err = task.Wait(ctx) if err != nil { return "", err } return dsFile, nil } func (cmd *vmdk) CreateVM(spec *configSpec) (*object.VirtualMachine, error) { ctx := context.TODO() folders, err := cmd.Datacenter.Folders(ctx) if err != nil { return nil, err } task, err := folders.VmFolder.CreateVM(ctx, spec.ToSpec(), cmd.ResourcePool, nil) if err != nil { return nil, err } info, err := task.WaitForResult(ctx, nil) if err != nil { return nil, err } return object.NewVirtualMachine(cmd.Client, info.Result.(types.ManagedObjectReference)), nil } func (cmd *vmdk) CloneVM(vm *object.VirtualMachine, name string) (*object.VirtualMachine, error) { ctx := context.TODO() folders, err := cmd.Datacenter.Folders(ctx) if err != nil { return nil, err } spec := types.VirtualMachineCloneSpec{ Config: &types.VirtualMachineConfigSpec{}, Location: types.VirtualMachineRelocateSpec{}, } task, err := vm.Clone(ctx, folders.VmFolder, name, spec) if err != nil { return nil, err } info, err := task.WaitForResult(ctx, nil) if err != nil { return nil, err } return object.NewVirtualMachine(cmd.Client, info.Result.(types.ManagedObjectReference)), nil } func (cmd *vmdk) DestroyVM(vm *object.VirtualMachine) error { ctx := context.TODO() _, err := cmd.DetachDisk(vm) if err != nil { return err } task, err := vm.Destroy(ctx) if err != nil { return err } err = task.Wait(ctx) if err != nil { return err } return nil } type configSpec types.VirtualMachineConfigSpec func (c *configSpec) ToSpec() types.VirtualMachineConfigSpec { return types.VirtualMachineConfigSpec(*c) } func (c *configSpec) AddChange(d types.BaseVirtualDeviceConfigSpec) { c.DeviceChange = append(c.DeviceChange, d) } func (c *configSpec) AddDisk(ds *object.Datastore, path string) { var devices object.VirtualDeviceList controller, err := devices.CreateSCSIController("") if err != nil { panic(err) } devices = append(devices, controller) disk := devices.CreateDisk(controller.(types.BaseVirtualController), ds.Reference(), ds.Path(path)) devices = append(devices, disk) spec, err := devices.ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd) if err != nil { panic(err) } c.DeviceChange = append(c.DeviceChange, spec...) } var dsPathRegexp = regexp.MustCompile(`^\[.*\] (.*)$`) func (c *configSpec) RemoveDisk(vm *mo.VirtualMachine) string { var file string for _, d := range vm.Config.Hardware.Device { switch device := d.(type) { case *types.VirtualDisk: if file != "" { panic("expected VM to have only one disk") } switch backing := device.Backing.(type) { case *types.VirtualDiskFlatVer1BackingInfo: file = backing.FileName case *types.VirtualDiskFlatVer2BackingInfo: file = backing.FileName case *types.VirtualDiskSeSparseBackingInfo: file = backing.FileName case *types.VirtualDiskSparseVer1BackingInfo: file = backing.FileName case *types.VirtualDiskSparseVer2BackingInfo: file = backing.FileName default: name := reflect.TypeOf(device.Backing).String() panic(fmt.Sprintf("unexpected backing type: %s", name)) } // Remove [datastore] prefix m := dsPathRegexp.FindStringSubmatch(file) if len(m) != 2 { panic(fmt.Sprintf("expected regexp match for %#v", file)) } file = m[1] removeOp := &types.VirtualDeviceConfigSpec{ Operation: types.VirtualDeviceConfigSpecOperationRemove, Device: device, } c.AddChange(removeOp) } } return file } govmomi-0.15.0/govc/license/000077500000000000000000000000001312205533500156315ustar00rootroot00000000000000govmomi-0.15.0/govc/license/add.go000066400000000000000000000044751312205533500167220ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/license" "github.com/vmware/govmomi/vim25/types" ) type add struct { *flags.ClientFlag *flags.OutputFlag } func init() { cli.Register("license.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *add) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Usage() string { return "KEY..." } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } m := license.NewManager(client) // From the vSphere 5.5 documentation: // // To specify the edition type and any optional functions, use // updateLicense for ESX Server and addLicense follow by // LicenseAssingmentManager.updateAssignedLicense for VirtualCenter. // var addFunc func(ctx context.Context, key string, labels map[string]string) (types.LicenseManagerLicenseInfo, error) switch t := client.ServiceContent.About.ApiType; t { case "HostAgent": addFunc = m.Update case "VirtualCenter": addFunc = m.Add default: return fmt.Errorf("unsupported ApiType: %s", t) } result := make(licenseOutput, 0) for _, v := range f.Args() { license, err := addFunc(ctx, v, nil) if err != nil { return err } result = append(result, license) } return cmd.WriteResult(licenseOutput(result)) } govmomi-0.15.0/govc/license/assign.go000066400000000000000000000046541312205533500174550ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/license" "github.com/vmware/govmomi/vim25/types" ) type assign struct { *flags.ClientFlag *flags.OutputFlag *flags.HostSystemFlag name string remove bool } func init() { cli.Register("license.assign", &assign{}) } func (cmd *assign) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Display name") f.BoolVar(&cmd.remove, "remove", false, "Remove assignment") } func (cmd *assign) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *assign) Usage() string { return "KEY" } func (cmd *assign) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } key := f.Arg(0) client, err := cmd.Client() if err != nil { return err } m, err := license.NewManager(client).AssignmentManager(ctx) if err != nil { return err } host, err := cmd.HostSystemIfSpecified() if err != nil { return err } var id string if host == nil { // Default to vCenter UUID id = client.ServiceContent.About.InstanceUuid } else { id = host.Reference().Value } if cmd.remove { return m.Remove(ctx, id) } info, err := m.Update(ctx, id, key, cmd.name) if err != nil { return err } return cmd.WriteResult(licenseOutput([]types.LicenseManagerLicenseInfo{*info})) } govmomi-0.15.0/govc/license/assigned.go000066400000000000000000000044011312205533500177540ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "flag" "fmt" "io" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/license" "github.com/vmware/govmomi/vim25/types" ) type assigned struct { *flags.ClientFlag *flags.OutputFlag id string } func init() { cli.Register("license.assigned.ls", &assigned{}) } func (cmd *assigned) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.StringVar(&cmd.id, "id", "", "Entity ID") } func (cmd *assigned) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *assigned) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } m, err := license.NewManager(client).AssignmentManager(ctx) if err != nil { return err } assigned, err := m.QueryAssigned(ctx, cmd.id) if err != nil { return err } return cmd.WriteResult(assignedOutput(assigned)) } type assignedOutput []types.LicenseAssignmentManagerLicenseAssignment func (res assignedOutput) Write(w io.Writer) error { tw := tabwriter.NewWriter(os.Stdout, 4, 0, 2, ' ', 0) fmt.Fprintf(tw, "Id:\tScope:\tName:\tLicense:\n") for _, v := range res { fmt.Fprintf(tw, "%s\t", v.EntityId) fmt.Fprintf(tw, "%s\t", v.Scope) fmt.Fprintf(tw, "%s\t", v.EntityDisplayName) fmt.Fprintf(tw, "%s\t", v.AssignedLicense.LicenseKey) fmt.Fprintf(tw, "\n") } return tw.Flush() } govmomi-0.15.0/govc/license/decode.go000066400000000000000000000035531312205533500174110ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/license" ) type decode struct { *flags.ClientFlag *flags.OutputFlag feature string } func init() { cli.Register("license.decode", &decode{}) } func (cmd *decode) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.StringVar(&cmd.feature, "feature", "", featureUsage) } func (cmd *decode) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *decode) Usage() string { return "KEY..." } func (cmd *decode) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } var result license.InfoList m := license.NewManager(client) for _, v := range f.Args() { license, err := m.Decode(ctx, v) if err != nil { return err } result = append(result, license) } if cmd.feature != "" { result = result.WithFeature(cmd.feature) } return cmd.WriteResult(licenseOutput(result)) } govmomi-0.15.0/govc/license/ls.go000066400000000000000000000033531312205533500166020ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/license" ) var featureUsage = "List licenses with given feature" type ls struct { *flags.ClientFlag *flags.OutputFlag feature string } func init() { cli.Register("license.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.StringVar(&cmd.feature, "feature", "", featureUsage) } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } m := license.NewManager(client) result, err := m.List(ctx) if err != nil { return err } if cmd.feature != "" { result = result.WithFeature(cmd.feature) } return cmd.WriteResult(licenseOutput(result)) } govmomi-0.15.0/govc/license/output.go000066400000000000000000000021551312205533500175230ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "fmt" "io" "os" "text/tabwriter" "github.com/vmware/govmomi/vim25/types" ) type licenseOutput []types.LicenseManagerLicenseInfo func (res licenseOutput) Write(w io.Writer) error { tw := tabwriter.NewWriter(os.Stdout, 4, 0, 2, ' ', 0) fmt.Fprintf(tw, "Key:\tEdition:\tUsed:\tTotal:\n") for _, v := range res { fmt.Fprintf(tw, "%s\t", v.LicenseKey) fmt.Fprintf(tw, "%s\t", v.EditionKey) fmt.Fprintf(tw, "%d\t", v.Used) fmt.Fprintf(tw, "%d\t", v.Total) fmt.Fprintf(tw, "\n") } return tw.Flush() } govmomi-0.15.0/govc/license/remove.go000066400000000000000000000031611312205533500174560ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/license" ) type remove struct { *flags.ClientFlag *flags.OutputFlag } func init() { cli.Register("license.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "KEY..." } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } m := license.NewManager(client) for _, v := range f.Args() { err = m.Remove(ctx, v) if err != nil { return err } } return nil } govmomi-0.15.0/govc/logs/000077500000000000000000000000001312205533500151535ustar00rootroot00000000000000govmomi-0.15.0/govc/logs/command.go000066400000000000000000000047671312205533500171360ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logs import ( "context" "flag" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type logs struct { *flags.HostSystemFlag Max int32 Key string follow bool } func init() { cli.Register("logs", &logs{}) } func (cmd *logs) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.Max = 25 // default f.Var(flags.NewInt32(&cmd.Max), "n", "Output the last N log lines") f.StringVar(&cmd.Key, "log", "", "Log file key") f.BoolVar(&cmd.follow, "f", false, "Follow log file changes") } func (cmd *logs) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *logs) Description() string { return `View VPX and ESX logs. The '-log' option defaults to "hostd" when connected directly to a host or when connected to VirtualCenter and a '-host' option is given. Otherwise, the '-log' option defaults to "vpxd:vpxd.log". The '-host' option is ignored when connected directly to a host. See 'govc logs.ls' for other '-log' options. Examples: govc logs -n 1000 -f govc logs -host esx1 govc logs -host esx1 -log vmkernel` } func (cmd *logs) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } defaultKey := "hostd" var host *object.HostSystem if c.IsVC() { host, err = cmd.HostSystemIfSpecified() if err != nil { return err } if host == nil { defaultKey = "vpxd:vpxd.log" } } m := object.NewDiagnosticManager(c) key := cmd.Key if key == "" { key = defaultKey } l := m.Log(ctx, host, key) err = l.Seek(ctx, cmd.Max) if err != nil { return err } for { _, err = l.Copy(ctx, cmd.Out) if err != nil { return nil } if !cmd.follow { break } <-time.After(time.Second) } return nil } govmomi-0.15.0/govc/logs/download.go000066400000000000000000000063541312205533500173210ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logs import ( "context" "flag" "fmt" "path" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type download struct { *flags.DatacenterFlag IncludeDefault bool } func init() { cli.Register("logs.download", &download{}) } func (cmd *download) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.BoolVar(&cmd.IncludeDefault, "default", true, "Specifies if the bundle should include the default server") } func (cmd *download) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *download) Usage() string { return "[PATH]..." } func (cmd *download) Description() string { return `Generate diagnostic bundles. A diagnostic bundle includes log files and other configuration information. Use PATH to include a specific set of hosts to include. Examples: govc logs.download govc logs.download host-a host-b` } func (cmd *download) DownloadFile(c *vim25.Client, b string) error { u, err := c.Client.ParseURL(b) if err != nil { return err } dst := path.Base(u.Path) p := soap.DefaultDownload if cmd.OutputFlag.TTY { logger := cmd.ProgressLogger(fmt.Sprintf("Downloading %s... ", dst)) defer logger.Wait() p.Progress = logger } return c.Client.DownloadFile(dst, u, &p) } func (cmd *download) GenerateLogBundles(m *object.DiagnosticManager, host []*object.HostSystem) ([]types.DiagnosticManagerBundleInfo, error) { ctx := context.TODO() logger := cmd.ProgressLogger("Generating log bundles... ") defer logger.Wait() task, err := m.GenerateLogBundles(ctx, cmd.IncludeDefault, host) if err != nil { return nil, err } r, err := task.WaitForResult(ctx, logger) if err != nil { return nil, err } return r.Result.(types.ArrayOfDiagnosticManagerBundleInfo).DiagnosticManagerBundleInfo, nil } func (cmd *download) Run(ctx context.Context, f *flag.FlagSet) error { finder, err := cmd.Finder() if err != nil { return err } var host []*object.HostSystem for _, arg := range f.Args() { hs, err := finder.HostSystemList(ctx, arg) if err != nil { return err } host = append(host, hs...) } c, err := cmd.Client() if err != nil { return err } m := object.NewDiagnosticManager(c) bundles, err := cmd.GenerateLogBundles(m, host) if err != nil { return err } for _, bundle := range bundles { err := cmd.DownloadFile(c, bundle.Url) if err != nil { return err } } return nil } govmomi-0.15.0/govc/logs/ls.go000066400000000000000000000034431312205533500161240ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logs import ( "context" "flag" "fmt" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type ls struct { *flags.HostSystemFlag } func init() { cli.Register("logs.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Description() string { return `List diagnostic log keys. Examples: govc logs.ls govc logs.ls -host host-a` } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } var host *object.HostSystem if c.IsVC() { host, err = cmd.HostSystemIfSpecified() if err != nil { return err } } m := object.NewDiagnosticManager(c) desc, err := m.QueryDescriptions(ctx, host) if err != nil { return err } tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, d := range desc { fmt.Fprintf(tw, "%s\t%s\n", d.Key, d.FileName) } return tw.Flush() } govmomi-0.15.0/govc/ls/000077500000000000000000000000001312205533500146255ustar00rootroot00000000000000govmomi-0.15.0/govc/ls/command.go000066400000000000000000000072121312205533500165740ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ls import ( "context" "flag" "fmt" "io" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/list" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *flags.DatacenterFlag Long bool Type string ToRef bool DeRef bool } func init() { cli.Register("ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.BoolVar(&cmd.Long, "l", false, "Long listing format") f.BoolVar(&cmd.ToRef, "i", false, "Print the managed object reference") f.BoolVar(&cmd.DeRef, "L", false, "Follow managed object references") f.StringVar(&cmd.Type, "t", "", "Object type") } func (cmd *ls) Description() string { return `List inventory items. Examples: govc ls -l '*' govc ls -t ClusterComputeResource host govc ls -t Datastore host/ClusterA/* | grep -v local | xargs -n1 basename | sort | uniq` } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Usage() string { return "[PATH]..." } func (cmd *ls) typeMatch(ref types.ManagedObjectReference) bool { if cmd.Type == "" { return true } return strings.ToLower(cmd.Type) == strings.ToLower(ref.Type) } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { finder, err := cmd.Finder() if err != nil { return err } lr := listResult{ ls: cmd, Elements: nil, } args := f.Args() if len(args) == 0 { args = []string{"."} } var ref = new(types.ManagedObjectReference) var types []string if cmd.Type != "" { // TODO: support multiple -t flags types = []string{cmd.Type} } for _, arg := range args { if cmd.DeRef && ref.FromString(arg) { e, err := finder.Element(ctx, *ref) if err == nil { if cmd.typeMatch(*ref) { if e.Path == "/" && ref.Type != "Folder" { // Special case: when given a moref with no ancestors, // just echo the moref. e.Path = ref.String() } lr.Elements = append(lr.Elements, *e) } continue } } es, err := finder.ManagedObjectListChildren(ctx, arg, types...) if err != nil { return err } for _, e := range es { if cmd.typeMatch(e.Object.Reference()) { lr.Elements = append(lr.Elements, e) } } } return cmd.WriteResult(lr) } type listResult struct { *ls Elements []list.Element `json:"elements"` } func (l listResult) Write(w io.Writer) error { var err error for _, e := range l.Elements { if l.ToRef { fmt.Fprint(w, e.Object.Reference().String()) if l.Long { fmt.Fprintf(w, " %s", e.Path) } fmt.Fprintln(w) continue } if !l.Long { fmt.Fprintf(w, "%s\n", e.Path) continue } switch e.Object.(type) { case mo.Folder: if _, err = fmt.Fprintf(w, "%s/\n", e.Path); err != nil { return err } default: if _, err = fmt.Fprintf(w, "%s (%s)\n", e.Path, e.Object.Reference().Type); err != nil { return err } } } return nil } govmomi-0.15.0/govc/main.go000066400000000000000000000060741312205533500154710ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( "os" "github.com/vmware/govmomi/govc/cli" _ "github.com/vmware/govmomi/govc/about" _ "github.com/vmware/govmomi/govc/cluster" _ "github.com/vmware/govmomi/govc/datacenter" _ "github.com/vmware/govmomi/govc/datastore" _ "github.com/vmware/govmomi/govc/datastore/disk" _ "github.com/vmware/govmomi/govc/datastore/vsan" _ "github.com/vmware/govmomi/govc/device" _ "github.com/vmware/govmomi/govc/device/cdrom" _ "github.com/vmware/govmomi/govc/device/floppy" _ "github.com/vmware/govmomi/govc/device/scsi" _ "github.com/vmware/govmomi/govc/device/serial" _ "github.com/vmware/govmomi/govc/device/usb" _ "github.com/vmware/govmomi/govc/dvs" _ "github.com/vmware/govmomi/govc/dvs/portgroup" _ "github.com/vmware/govmomi/govc/env" _ "github.com/vmware/govmomi/govc/events" _ "github.com/vmware/govmomi/govc/extension" _ "github.com/vmware/govmomi/govc/fields" _ "github.com/vmware/govmomi/govc/folder" _ "github.com/vmware/govmomi/govc/host" _ "github.com/vmware/govmomi/govc/host/account" _ "github.com/vmware/govmomi/govc/host/autostart" _ "github.com/vmware/govmomi/govc/host/cert" _ "github.com/vmware/govmomi/govc/host/date" _ "github.com/vmware/govmomi/govc/host/esxcli" _ "github.com/vmware/govmomi/govc/host/firewall" _ "github.com/vmware/govmomi/govc/host/maintenance" _ "github.com/vmware/govmomi/govc/host/option" _ "github.com/vmware/govmomi/govc/host/portgroup" _ "github.com/vmware/govmomi/govc/host/service" _ "github.com/vmware/govmomi/govc/host/storage" _ "github.com/vmware/govmomi/govc/host/vnic" _ "github.com/vmware/govmomi/govc/host/vswitch" _ "github.com/vmware/govmomi/govc/importx" _ "github.com/vmware/govmomi/govc/license" _ "github.com/vmware/govmomi/govc/logs" _ "github.com/vmware/govmomi/govc/ls" _ "github.com/vmware/govmomi/govc/metric" _ "github.com/vmware/govmomi/govc/metric/interval" _ "github.com/vmware/govmomi/govc/object" _ "github.com/vmware/govmomi/govc/option" _ "github.com/vmware/govmomi/govc/permissions" _ "github.com/vmware/govmomi/govc/pool" _ "github.com/vmware/govmomi/govc/role" _ "github.com/vmware/govmomi/govc/session" _ "github.com/vmware/govmomi/govc/vapp" _ "github.com/vmware/govmomi/govc/version" _ "github.com/vmware/govmomi/govc/vm" _ "github.com/vmware/govmomi/govc/vm/disk" _ "github.com/vmware/govmomi/govc/vm/guest" _ "github.com/vmware/govmomi/govc/vm/network" _ "github.com/vmware/govmomi/govc/vm/rdm" _ "github.com/vmware/govmomi/govc/vm/snapshot" ) func main() { os.Exit(cli.Run(os.Args[1:])) } govmomi-0.15.0/govc/main_test.go000066400000000000000000000020361312205533500165220ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package main import ( "context" "flag" "testing" "github.com/vmware/govmomi/govc/cli" ) func TestMain(t *testing.T) { // Execute flag registration for every command to verify there are no // commands with flag name collisions for _, cmd := range cli.Commands() { fs := flag.NewFlagSet("", flag.ContinueOnError) // Use fresh context for every command ctx, cancel := context.WithCancel(context.Background()) defer cancel() cmd.Register(ctx, fs) } } govmomi-0.15.0/govc/metric/000077500000000000000000000000001312205533500154725ustar00rootroot00000000000000govmomi-0.15.0/govc/metric/change.go000066400000000000000000000045231312205533500172520ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metric import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type change struct { *PerformanceFlag level int device int } func init() { cli.Register("metric.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) f.IntVar(&cmd.level, "level", 0, "Level for the aggregate counter") f.IntVar(&cmd.device, "device-level", 0, "Level for the per device counter") } func (cmd *change) Usage() string { return "NAME..." } func (cmd *change) Description() string { return `Change counter NAME levels. Examples: govc metric.change -level 1 net.bytesRx.average net.bytesTx.average` } func (cmd *change) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 || (cmd.level == 0 && cmd.device == 0) { return flag.ErrHelp } m, err := cmd.Manager(ctx) if err != nil { return err } counters, err := m.CounterInfoByName(ctx) if err != nil { return err } var mapping []types.PerformanceManagerCounterLevelMapping for _, name := range f.Args() { counter, ok := counters[name] if !ok { return cmd.ErrNotFound(name) } mapping = append(mapping, types.PerformanceManagerCounterLevelMapping{ CounterId: counter.Key, AggregateLevel: int32(cmd.level), PerDeviceLevel: int32(cmd.device), }) } _, err = methods.UpdateCounterLevelMapping(ctx, m.Client(), &types.UpdateCounterLevelMapping{ This: m.Reference(), CounterLevelMap: mapping, }) return err } govmomi-0.15.0/govc/metric/info.go000066400000000000000000000121571312205533500167620ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metric import ( "context" "encoding/json" "flag" "fmt" "io" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type info struct { *PerformanceFlag } func init() { cli.Register("metric.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) } func (cmd *info) Usage() string { return "PATH [NAME]..." } func (cmd *info) Description() string { return `Metric info for NAME. If PATH is a value other than '-', provider summary and instance list are included for the given object type. If NAME is not specified, all available metrics for the given INTERVAL are listed. An object PATH must be provided in this case. Examples: govc metric.info vm/my-vm govc metric.info -i 300 vm/my-vm govc metric.info - cpu.usage.average govc metric.info /dc1/host/cluster cpu.usage.average` } func (cmd *info) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } type EntityDetail struct { Realtime bool Historical bool Instance []string } type MetricInfo struct { Counter *types.PerfCounterInfo Enabled []string PerDeviceEnabled []string Detail *EntityDetail } type infoResult struct { cmd *info Info []*MetricInfo } func (r *infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, info := range r.Info { counter := info.Counter fmt.Fprintf(tw, "Name:\t%s\n", counter.Name()) fmt.Fprintf(tw, " Label:\t%s\n", counter.NameInfo.GetElementDescription().Label) fmt.Fprintf(tw, " Summary:\t%s\n", counter.NameInfo.GetElementDescription().Summary) fmt.Fprintf(tw, " Group:\t%s\n", counter.GroupInfo.GetElementDescription().Label) fmt.Fprintf(tw, " Unit:\t%s\n", counter.UnitInfo.GetElementDescription().Label) fmt.Fprintf(tw, " Rollup type:\t%s\n", counter.RollupType) fmt.Fprintf(tw, " Stats type:\t%s\n", counter.StatsType) fmt.Fprintf(tw, " Level:\t%d\n", counter.Level) fmt.Fprintf(tw, " Intervals:\t%s\n", strings.Join(info.Enabled, ",")) fmt.Fprintf(tw, " Per-device level:\t%d\n", counter.PerDeviceLevel) fmt.Fprintf(tw, " Intervals:\t%s\n", strings.Join(info.PerDeviceEnabled, ",")) summary := info.Detail if summary == nil { continue } fmt.Fprintf(tw, " Realtime:\t%t\n", summary.Realtime) fmt.Fprintf(tw, " Historical:\t%t\n", summary.Historical) fmt.Fprintf(tw, " Instances:\t%s\n", strings.Join(summary.Instance, ",")) } return tw.Flush() } func (r *infoResult) MarshalJSON() ([]byte, error) { m := make(map[string]*MetricInfo) for _, info := range r.Info { m[info.Counter.Name()] = info } return json.Marshal(m) } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } names := f.Args()[1:] m, err := cmd.Manager(ctx) if err != nil { return err } counters, err := m.CounterInfoByName(ctx) if err != nil { return err } intervals, err := m.HistoricalInterval(ctx) if err != nil { return err } enabled := intervals.Enabled() var summary *types.PerfProviderSummary var mids map[int32][]*types.PerfMetricId if f.Arg(0) == "-" { if len(names) == 0 { return flag.ErrHelp } } else { objs, err := cmd.ManagedObjects(ctx, f.Args()[:1]) if err != nil { return err } summary, err = m.ProviderSummary(ctx, objs[0]) if err != nil { return err } all, err := m.AvailableMetric(ctx, objs[0], cmd.Interval(summary.RefreshRate)) if err != nil { return err } mids = all.ByKey() if len(names) == 0 { nc, _ := m.CounterInfoByKey(ctx) for i := range all { id := &all[i] if id.Instance != "" { continue } names = append(names, nc[id.CounterId].Name()) } } } var metrics []*MetricInfo for _, name := range names { counter, ok := counters[name] if !ok { return cmd.ErrNotFound(name) } info := &MetricInfo{ Counter: counter, Enabled: enabled[counter.Level], PerDeviceEnabled: enabled[counter.PerDeviceLevel], } metrics = append(metrics, info) if summary == nil { continue } var instances []string for _, id := range mids[counter.Key] { if id.Instance != "" { instances = append(instances, id.Instance) } } info.Detail = &EntityDetail{ Realtime: summary.CurrentSupported, Historical: summary.SummarySupported, Instance: instances, } } return cmd.WriteResult(&infoResult{cmd, metrics}) } govmomi-0.15.0/govc/metric/interval/000077500000000000000000000000001312205533500173165ustar00rootroot00000000000000govmomi-0.15.0/govc/metric/interval/change.go000066400000000000000000000046171312205533500211020ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package interval import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/metric" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type change struct { *metric.PerformanceFlag enabled *bool level int } func init() { cli.Register("metric.interval.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = metric.NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) f.Var(flags.NewOptionalBool(&cmd.enabled), "enabled", "Enable or disable") f.IntVar(&cmd.level, "level", 0, "Level") } func (cmd *change) Description() string { return `Change historical metric intervals. Examples: govc metric.interval.change -i 300 -level 2 govc metric.interval.change -i 86400 -enabled=false` } func (cmd *change) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.Manager(ctx) if err != nil { return err } intervals, err := m.HistoricalInterval(ctx) if err != nil { return err } interval := cmd.Interval(0) if interval == 0 { return flag.ErrHelp } var current *types.PerfInterval for _, i := range intervals { if i.SamplingPeriod == interval { current = &i break } } if current == nil { return fmt.Errorf("%d interval ID not found", interval) } if cmd.level != 0 { if cmd.level > 4 { return flag.ErrHelp } current.Level = int32(cmd.level) } if cmd.enabled != nil { current.Enabled = *cmd.enabled } _, err = methods.UpdatePerfInterval(ctx, m.Client(), &types.UpdatePerfInterval{ This: m.Reference(), Interval: *current, }) return err } govmomi-0.15.0/govc/metric/interval/info.go000066400000000000000000000040071312205533500206010ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package interval import ( "context" "flag" "fmt" "text/tabwriter" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/metric" ) type info struct { *metric.PerformanceFlag } func init() { cli.Register("metric.interval.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = metric.NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) } func (cmd *info) Description() string { return `List historical metric intervals. Examples: govc metric.interval.info govc metric.interval.info -i 300` } func (cmd *info) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.Manager(ctx) if err != nil { return err } intervals, err := m.HistoricalInterval(ctx) if err != nil { return err } tw := tabwriter.NewWriter(cmd.Out, 2, 0, 2, ' ', 0) cmd.Out = tw interval := cmd.Interval(0) for _, i := range intervals { if interval != 0 && i.SamplingPeriod != interval { continue } fmt.Fprintf(cmd.Out, "ID:\t%d\n", i.SamplingPeriod) fmt.Fprintf(cmd.Out, " Enabled:\t%t\n", i.Enabled) fmt.Fprintf(cmd.Out, " Interval:\t%s\n", time.Duration(i.SamplingPeriod)*time.Second) fmt.Fprintf(cmd.Out, " Name:\t%s\n", i.Name) fmt.Fprintf(cmd.Out, " Level:\t%d\n", i.Level) } return tw.Flush() } govmomi-0.15.0/govc/metric/ls.go000066400000000000000000000054171312205533500164460ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metric import ( "context" "encoding/json" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/performance" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *PerformanceFlag long bool } func init() { cli.Register("metric.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) f.BoolVar(&cmd.long, "l", false, "Long listing format") } func (cmd *ls) Usage() string { return "PATH" } func (cmd *ls) Description() string { return `List available metrics for PATH. Examples: govc metric.ls /dc1/host/cluster1 govc metric.ls datastore/* govc metric.ls vm/* | grep mem. | xargs govc metric.sample vm/*` } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } type lsResult struct { cmd *ls counters map[int32]*types.PerfCounterInfo performance.MetricList } func (r *lsResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, id := range r.MetricList { if id.Instance != "" { continue } info := r.counters[id.CounterId] if r.cmd.long { fmt.Fprintf(w, "%s\t%s\n", info.Name(), info.NameInfo.GetElementDescription().Label) continue } fmt.Fprintln(w, info.Name()) } return tw.Flush() } func (r *lsResult) MarshalJSON() ([]byte, error) { m := make(map[string]*types.PerfCounterInfo) for _, id := range r.MetricList { info := r.counters[id.CounterId] m[info.Name()] = info } return json.Marshal(m) } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } objs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } m, err := cmd.Manager(ctx) if err != nil { return err } s, err := m.ProviderSummary(ctx, objs[0]) if err != nil { return err } mids, err := m.AvailableMetric(ctx, objs[0], cmd.Interval(s.RefreshRate)) if err != nil { return err } counters, err := m.CounterInfoByKey(ctx) if err != nil { return err } return cmd.WriteResult(&lsResult{cmd, counters, mids}) } govmomi-0.15.0/govc/metric/performance.go000066400000000000000000000040031312205533500203170ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metric import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/performance" ) type PerformanceFlag struct { *flags.DatacenterFlag *flags.OutputFlag m *performance.Manager interval int } func NewPerformanceFlag(ctx context.Context) (*PerformanceFlag, context.Context) { f := &PerformanceFlag{} f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) f.OutputFlag, ctx = flags.NewOutputFlag(ctx) return f, ctx } func (f *PerformanceFlag) Register(ctx context.Context, fs *flag.FlagSet) { f.DatacenterFlag.Register(ctx, fs) f.OutputFlag.Register(ctx, fs) fs.IntVar(&f.interval, "i", 0, "Interval ID") } func (f *PerformanceFlag) Process(ctx context.Context) error { if err := f.DatacenterFlag.Process(ctx); err != nil { return err } if err := f.OutputFlag.Process(ctx); err != nil { return err } return nil } func (f *PerformanceFlag) Manager(ctx context.Context) (*performance.Manager, error) { if f.m != nil { return f.m, nil } c, err := f.Client() if err != nil { return nil, err } f.m = performance.NewManager(c) f.m.Sort = true return f.m, err } func (f *PerformanceFlag) Interval(val int32) int32 { interval := int32(f.interval) if interval == 0 { if val == -1 { // realtime not supported return 300 } return val } return interval } func (f *PerformanceFlag) ErrNotFound(name string) error { return fmt.Errorf("counter %q not found", name) } govmomi-0.15.0/govc/metric/reset.go000066400000000000000000000036671312205533500171570ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metric import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type reset struct { *PerformanceFlag } func init() { cli.Register("metric.reset", &reset{}) } func (cmd *reset) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) } func (cmd *reset) Usage() string { return "NAME..." } func (cmd *reset) Description() string { return `Reset counter NAME to the default level of data collection. Examples: govc metric.reset net.bytesRx.average net.bytesTx.average` } func (cmd *reset) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } func (cmd *reset) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } m, err := cmd.Manager(ctx) if err != nil { return err } counters, err := m.CounterInfoByName(ctx) if err != nil { return err } var ids []int32 for _, name := range f.Args() { counter, ok := counters[name] if !ok { return cmd.ErrNotFound(name) } ids = append(ids, counter.Key) } _, err = methods.ResetCounterLevelMapping(ctx, m.Client(), &types.ResetCounterLevelMapping{ This: m.Reference(), Counters: ids, }) return err } govmomi-0.15.0/govc/metric/sample.go000066400000000000000000000166421312205533500173130ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metric import ( "context" "crypto/md5" "flag" "fmt" "io" "os" "os/exec" "path" "strings" "text/tabwriter" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/performance" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type sample struct { *PerformanceFlag d int n int t bool plot string instance string } func init() { cli.Register("metric.sample", &sample{}) } func (cmd *sample) Register(ctx context.Context, f *flag.FlagSet) { cmd.PerformanceFlag, ctx = NewPerformanceFlag(ctx) cmd.PerformanceFlag.Register(ctx, f) f.IntVar(&cmd.d, "d", 30, "Limit object display name to D chars") f.IntVar(&cmd.n, "n", 6, "Max number of samples") f.StringVar(&cmd.plot, "plot", "", "Plot data using gnuplot") f.BoolVar(&cmd.t, "t", false, "Include sample times") f.StringVar(&cmd.instance, "instance", "*", "Instance") } func (cmd *sample) Usage() string { return "PATH... NAME..." } func (cmd *sample) Description() string { return `Sample for object PATH of metric NAME. Interval ID defaults to 20 (realtime) if supported, otherwise 300 (5m interval). By default, INSTANCE '*' samples all instances and the aggregate counter. An INSTANCE value of '-' will only sample the aggregate counter. An INSTANCE value other than '*' or '-' will only sample the given instance counter. If PLOT value is set to '-', output a gnuplot script. If non-empty with another value, PLOT will pipe the script to gnuplot for you. The value is also used to set the gnuplot 'terminal' variable, unless the value is that of the DISPLAY env var. Only 1 metric NAME can be specified when the PLOT flag is set. Examples: govc metric.sample host/cluster1/* cpu.usage.average govc metric.sample -plot .png host/cluster1/* cpu.usage.average | xargs open govc metric.sample vm/* net.bytesTx.average net.bytesTx.average govc metric.sample -instance vmnic0 vm/* net.bytesTx.average govc metric.sample -instance - vm/* net.bytesTx.average` } func (cmd *sample) Process(ctx context.Context) error { if err := cmd.PerformanceFlag.Process(ctx); err != nil { return err } return nil } type sampleResult struct { cmd *sample m *performance.Manager counters map[string]*types.PerfCounterInfo Sample []performance.EntityMetric } func (r *sampleResult) name(e types.ManagedObjectReference) string { var me mo.ManagedEntity _ = r.m.Properties(context.Background(), e, []string{"name"}, &me) name := me.Name if r.cmd.d > 0 && len(name) > r.cmd.d { return name[:r.cmd.d] + "*" } return name } func sampleInfoTimes(m *performance.EntityMetric) []string { vals := make([]string, len(m.SampleInfo)) for i := range m.SampleInfo { vals[i] = m.SampleInfo[i].Timestamp.Format(time.RFC3339) } return vals } func (r *sampleResult) Plot(w io.Writer) error { if len(r.Sample) == 0 { return nil } if r.cmd.plot != "-" { cmd := exec.Command("gnuplot", "-persist") cmd.Stdout = w cmd.Stderr = os.Stderr stdin, err := cmd.StdinPipe() if err != nil { return err } if err = cmd.Start(); err != nil { return err } w = stdin defer func() { _ = stdin.Close() _ = cmd.Wait() }() } counter := r.counters[r.Sample[0].Value[0].Name] unit := counter.UnitInfo.GetElementDescription() fmt.Fprintf(w, "set title %q\n", counter.Name()) fmt.Fprintf(w, "set ylabel %q\n", unit.Label) fmt.Fprintf(w, "set xlabel %q\n", "Time") fmt.Fprintf(w, "set xdata %s\n", "time") fmt.Fprintf(w, "set format x %q\n", "%H:%M") fmt.Fprintf(w, "set timefmt %q\n", "%Y-%m-%dT%H:%M:%SZ") ext := path.Ext(r.cmd.plot) if ext != "" { // If a file name is given, use the extension as terminal type. // If just an ext is given, use the entities and counter as the file name. file := r.cmd.plot name := r.cmd.plot[:len(r.cmd.plot)-len(ext)] r.cmd.plot = ext[1:] if name == "" { h := md5.New() for i := range r.Sample { _, _ = io.WriteString(h, r.Sample[i].Entity.String()) } _, _ = io.WriteString(h, counter.Name()) file = fmt.Sprintf("govc-plot-%x%s", h.Sum(nil), ext) } fmt.Fprintf(w, "set output %q\n", file) defer func() { fmt.Fprintln(r.cmd.Out, file) }() } switch r.cmd.plot { case "-", os.Getenv("DISPLAY"): default: fmt.Fprintf(w, "set terminal %s\n", r.cmd.plot) } if unit.Key == string(types.PerformanceManagerUnitPercent) { fmt.Fprintln(w, "set yrange [0:100]") } fmt.Fprintln(w) var set []string for i := range r.Sample { name := r.name(r.Sample[i].Entity) name = strings.Replace(name, "_", "*", -1) // underscore is some gnuplot markup? set = append(set, fmt.Sprintf("'-' using 1:2 title '%s' with lines", name)) } fmt.Fprintf(w, "plot %s\n", strings.Join(set, ", ")) for i := range r.Sample { times := sampleInfoTimes(&r.Sample[i]) for _, value := range r.Sample[i].Value { for j := range value.Value { fmt.Fprintf(w, "%s %s\n", times[j], value.Format(value.Value[j])) } } fmt.Fprintln(w, "e") } return nil } func (r *sampleResult) Write(w io.Writer) error { if r.cmd.plot != "" { return r.Plot(w) } cmd := r.cmd tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for i := range r.Sample { metric := r.Sample[i] name := r.name(metric.Entity) t := "" if cmd.t { t = metric.SampleInfoCSV() } for _, v := range metric.Value { counter := r.counters[v.Name] units := counter.UnitInfo.GetElementDescription().Label instance := v.Instance if instance == "" { instance = "-" } fmt.Fprintf(tw, "%s\t%s\t%s\t%v\t%s\t%s\n", name, instance, v.Name, t, v.ValueCSV(), units) } } return tw.Flush() } func (cmd *sample) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.Manager(ctx) if err != nil { return err } var paths []string var names []string byName, err := m.CounterInfoByName(ctx) if err != nil { return err } for _, arg := range f.Args() { if _, ok := byName[arg]; ok { names = append(names, arg) } else { paths = append(paths, arg) } } if len(paths) == 0 || len(names) == 0 { return flag.ErrHelp } if cmd.plot != "" { if len(names) > 1 { return flag.ErrHelp } if cmd.instance == "*" { cmd.instance = "" } } objs, err := cmd.ManagedObjects(ctx, paths) if err != nil { return err } s, err := m.ProviderSummary(ctx, objs[0]) if err != nil { return err } if cmd.instance == "-" { cmd.instance = "" } spec := types.PerfQuerySpec{ Format: string(types.PerfFormatNormal), MaxSample: int32(cmd.n), MetricId: []types.PerfMetricId{{Instance: cmd.instance}}, IntervalId: cmd.Interval(s.RefreshRate), } sample, err := m.SampleByName(ctx, spec, names, objs) if err != nil { return err } result, err := m.ToMetricSeries(ctx, sample) if err != nil { return err } counters, err := m.CounterInfoByName(ctx) if err != nil { return err } return cmd.WriteResult(&sampleResult{cmd, m, counters, result}) } govmomi-0.15.0/govc/object/000077500000000000000000000000001312205533500154555ustar00rootroot00000000000000govmomi-0.15.0/govc/object/collect.go000066400000000000000000000125151312205533500174350ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "encoding/json" "flag" "fmt" "io" "reflect" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type collect struct { *flags.DatacenterFlag single bool simple bool n int } func init() { cli.Register("object.collect", &collect{}) } func (cmd *collect) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.BoolVar(&cmd.simple, "s", false, "Output property value only") f.IntVar(&cmd.n, "n", 0, "Wait for N property updates") } func (cmd *collect) Usage() string { return "[MOID] [PROPERTY]..." } func (cmd *collect) Description() string { return `Collect managed object properties. MOID can be an inventory path or ManagedObjectReference. MOID defaults to '-', an alias for 'ServiceInstance:ServiceInstance'. By default only the current property value(s) are collected. Use the '-n' flag to wait for updates. Examples: govc object.collect - content govc object.collect -s HostSystem:ha-host hardware.systemInfo.uuid govc object.collect -s /ha-datacenter/vm/foo overallStatus govc object.collect -json -n=-1 EventManager:ha-eventmgr latestEvent | jq . govc object.collect -json -s $(govc object.collect -s - content.perfManager) description.counterType | jq .` } func (cmd *collect) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } var stringer = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() type change struct { cmd *collect PropertyChange []types.PropertyChange } func (pc *change) MarshalJSON() ([]byte, error) { return json.Marshal(pc.PropertyChange) } func (pc *change) output(name string, rval reflect.Value, rtype reflect.Type) { s := "..." kind := rval.Kind() if kind == reflect.Ptr || kind == reflect.Interface { if rval.IsNil() { s = "" } else { rval = rval.Elem() kind = rval.Kind() } } switch kind { case reflect.Ptr, reflect.Interface: case reflect.Slice: if rval.Len() == 0 { s = "" break } etype := rtype.Elem() if etype.Kind() != reflect.Interface && etype.Kind() != reflect.Struct || etype.Implements(stringer) { var val []string for i := 0; i < rval.Len(); i++ { v := rval.Index(i).Interface() if fstr, ok := v.(fmt.Stringer); ok { s = fstr.String() } else { s = fmt.Sprintf("%v", v) } val = append(val, s) } s = strings.Join(val, ",") } case reflect.Struct: if rtype.Implements(stringer) { s = rval.Interface().(fmt.Stringer).String() } default: s = fmt.Sprintf("%v", rval.Interface()) } if pc.cmd.simple { fmt.Fprintln(pc.cmd.Out, s) return } fmt.Fprintf(pc.cmd.Out, "%s\t%s\t%s\n", name, rtype, s) } func (pc *change) writeStruct(name string, rval reflect.Value, rtype reflect.Type) { for i := 0; i < rval.NumField(); i++ { fval := rval.Field(i) field := rtype.Field(i) if field.Anonymous { pc.writeStruct(name, fval, fval.Type()) continue } fname := fmt.Sprintf("%s.%s%s", name, strings.ToLower(field.Name[:1]), field.Name[1:]) pc.output(fname, fval, field.Type) } } func (pc *change) Write(w io.Writer) error { tw := tabwriter.NewWriter(pc.cmd.Out, 4, 0, 2, ' ', 0) pc.cmd.Out = tw for _, c := range pc.PropertyChange { if c.Val == nil { // type is unknown in this case, as xsi:type was not provided - just skip for now continue } rval := reflect.ValueOf(c.Val) rtype := rval.Type() if strings.HasPrefix(rtype.Name(), "ArrayOf") { rval = rval.Field(0) rtype = rval.Type() } if pc.cmd.single && rtype.Kind() == reflect.Struct && !rtype.Implements(stringer) { pc.writeStruct(c.Name, rval, rtype) continue } pc.output(c.Name, rval, rtype) } return tw.Flush() } func (cmd *collect) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } ref := methods.ServiceInstance arg := f.Arg(0) switch arg { case "", "-": default: if !ref.FromString(arg) { l, ferr := finder.ManagedObjectList(ctx, arg) if ferr != nil { return err } switch len(l) { case 0: return fmt.Errorf("%s not found", arg) case 1: ref = l[0].Object.Reference() default: return flag.ErrHelp } } } p := property.DefaultCollector(client) var props []string if f.NArg() > 1 { props = f.Args()[1:] cmd.single = len(props) == 1 } return property.Wait(ctx, p, ref, props, func(pc []types.PropertyChange) bool { _ = cmd.WriteResult(&change{cmd, pc}) cmd.n-- return cmd.n == -1 }) } govmomi-0.15.0/govc/object/destroy.go000066400000000000000000000036211312205533500174770ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type destroy struct { *flags.DatacenterFlag } func init() { cli.Register("object.destroy", &destroy{}) } func (cmd *destroy) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *destroy) Usage() string { return "PATH..." } func (cmd *destroy) Description() string { return `Destroy managed objects. Examples: govc object.destroy /dc1/network/dvs /dc1/host/cluster` } func (cmd *destroy) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *destroy) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } c, err := cmd.Client() if err != nil { return err } objs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } for _, obj := range objs { task, err := object.NewCommon(c, obj).Destroy(ctx) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("destroying %s... ", obj)) _, err = task.WaitForResult(ctx, logger) logger.Wait() if err != nil { return err } } return nil } govmomi-0.15.0/govc/object/find.go000066400000000000000000000141721312205533500167310ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "bytes" "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/types" ) type find struct { *flags.DatacenterFlag ref bool kind kinds name string maxdepth int } var alias = []struct { name string kind string }{ {"a", "VirtualApp"}, {"c", "ClusterComputeResource"}, {"d", "Datacenter"}, {"f", "Folder"}, {"g", "DistributedVirtualPortgroup"}, {"h", "HostSystem"}, {"m", "VirtualMachine"}, {"n", "Network"}, {"o", "OpaqueNetwork"}, {"p", "ResourcePool"}, {"r", "ComputeResource"}, {"s", "Datastore"}, {"w", "DistributedVirtualSwitch"}, } func aliasHelp() string { var help bytes.Buffer for _, a := range alias { fmt.Fprintf(&help, " %s %s\n", a.name, a.kind) } return help.String() } type kinds []string func (e *kinds) String() string { return fmt.Sprint(*e) } func (e *kinds) Set(value string) error { *e = append(*e, e.alias(value)) return nil } func (e *kinds) alias(value string) string { if len(value) != 1 { return value } for _, a := range alias { if a.name == value { return a.kind } } return value } func (e *kinds) wanted(kind string) bool { if len(*e) == 0 { return true } for _, k := range *e { if kind == k { return true } } return false } func init() { cli.Register("find", &find{}) } func (cmd *find) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.Var(&cmd.kind, "type", "Resource type") f.StringVar(&cmd.name, "name", "*", "Resource name") f.IntVar(&cmd.maxdepth, "maxdepth", -1, "Max depth") f.BoolVar(&cmd.ref, "i", false, "Print the managed object reference") } func (cmd *find) Usage() string { return "[ROOT] [KEY VAL]..." } func (cmd *find) Description() string { atable := aliasHelp() return fmt.Sprintf(`Find managed objects. ROOT can be an inventory path or ManagedObjectReference. ROOT defaults to '.', an alias for the root folder or DC if set. Optional KEY VAL pairs can be used to filter results against object instance properties. The '-type' flag value can be a managed entity type or one of the following aliases: %s Examples: govc find govc find /dc1 -type c govc find vm -name my-vm-* govc find . -type n govc find . -type m -runtime.powerState poweredOn govc find . -type m -datastore $(govc find -i datastore -name vsanDatastore) govc find . -type s -summary.type vsan govc find . -type h -hardware.cpuInfo.numCpuCores 16`, atable) } func (cmd *find) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } // rootMatch returns true if the root object path should be printed func (cmd *find) rootMatch(ctx context.Context, root object.Reference, client *vim25.Client, filter property.Filter) bool { ref := root.Reference() if !cmd.kind.wanted(ref.Type) { return false } if len(filter) == 1 && filter["name"] == "*" { return true } var content []types.ObjectContent pc := property.DefaultCollector(client) _ = pc.RetrieveWithFilter(ctx, []types.ManagedObjectReference{ref}, filter.Keys(), &content, filter) return content != nil } func (cmd *find) Run(ctx context.Context, f *flag.FlagSet) error { client, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } root := client.ServiceContent.RootFolder rootPath := "/" arg := f.Arg(0) props := f.Args() if len(props) > 0 { if strings.HasPrefix(arg, "-") { arg = "." } else { props = props[1:] } } if len(props)%2 != 0 { return flag.ErrHelp } switch arg { case rootPath: case "", ".": dc, _ := cmd.DatacenterIfSpecified() if dc == nil { arg = rootPath } else { arg = "." root = dc.Reference() rootPath = dc.InventoryPath } default: l, ferr := finder.ManagedObjectList(ctx, arg) if ferr != nil { return err } switch len(l) { case 0: return fmt.Errorf("%s not found", arg) case 1: root = l[0].Object.Reference() rootPath = l[0].Path default: return flag.ErrHelp } } filter := property.Filter{} for i := 0; i < len(props); i++ { key := props[i] if !strings.HasPrefix(key, "-") { return flag.ErrHelp } key = key[1:] i++ val := props[i] if xf := f.Lookup(key); xf != nil { // Support use of -flag following the ROOT arg (flag package does not do this) if err = xf.Value.Set(val); err != nil { return err } } else { filter[key] = val } } filter["name"] = cmd.name printPath := func(o types.ManagedObjectReference, p string) { if cmd.ref { fmt.Fprintln(cmd.Out, o) return } path := strings.Replace(p, rootPath, arg, 1) fmt.Fprintln(cmd.Out, path) } recurse := false switch cmd.maxdepth { case -1: recurse = true case 0: case 1: default: return flag.ErrHelp // TODO: ? } if cmd.rootMatch(ctx, root, client, filter) { printPath(root, arg) } if cmd.maxdepth == 0 { return nil } m := view.NewManager(client) v, err := m.CreateContainerView(ctx, root, cmd.kind, recurse) if err != nil { return err } defer v.Destroy(ctx) objs, err := v.Find(ctx, cmd.kind, filter) if err != nil { return err } for _, o := range objs { var path string if !cmd.ref { e, err := finder.Element(ctx, o) if err != nil { return err } path = e.Path } printPath(o, path) } return nil } govmomi-0.15.0/govc/object/method.go000066400000000000000000000045641312205533500172750ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type method struct { *flags.DatacenterFlag name string reason string source string enable bool } func init() { cli.Register("object.method", &method{}) } func (cmd *method) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Method name") f.StringVar(&cmd.reason, "reason", "", "Reason for disabling method") f.StringVar(&cmd.source, "source", "govc", "Source ID") f.BoolVar(&cmd.enable, "enable", true, "Enable method") } func (cmd *method) Usage() string { return "PATH..." } func (cmd *method) Description() string { return `Enable or disable methods for managed objects. Examples: govc object.method -name Destroy_Task -enable=false /dc1/vm/foo govc object.collect /dc1/vm/foo disabledMethod | grep --color Destroy_Task govc object.method -name Destroy_Task -enable /dc1/vm/foo` } func (cmd *method) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *method) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } if cmd.name == "" { return flag.ErrHelp } c, err := cmd.Client() if err != nil { return err } objs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } m := object.NewAuthorizationManager(c) if cmd.enable { return m.EnableMethods(ctx, objs, []string{cmd.name}, cmd.source) } method := []object.DisabledMethodRequest{ { Method: cmd.name, Reason: cmd.reason, }, } return m.DisableMethods(ctx, objs, method, cmd.source) } govmomi-0.15.0/govc/object/mv.go000066400000000000000000000036711312205533500164350ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type mv struct { *flags.DatacenterFlag } func init() { cli.Register("object.mv", &mv{}) } func (cmd *mv) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *mv) Usage() string { return "PATH... FOLDER" } func (cmd *mv) Description() string { return `Move managed entities to FOLDER. Examples: govc folder.create /dc1/host/example govc object.mv /dc2/host/*.example.com /dc1/host/example` } func (cmd *mv) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mv) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() < 2 { return flag.ErrHelp } finder, err := cmd.Finder() if err != nil { return err } n := f.NArg() - 1 folder, err := finder.Folder(ctx, f.Arg(n)) if err != nil { return err } objs, err := cmd.ManagedObjects(ctx, f.Args()[:n]) if err != nil { return err } task, err := folder.MoveInto(ctx, objs) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("moving %d objects to %s... ", len(objs), folder.InventoryPath)) _, err = task.WaitForResult(ctx, logger) logger.Wait() return err } govmomi-0.15.0/govc/object/reload.go000066400000000000000000000035011312205533500172510ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type reload struct { *flags.DatacenterFlag } func init() { cli.Register("object.reload", &reload{}) } func (cmd *reload) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *reload) Usage() string { return "PATH..." } func (cmd *reload) Description() string { return `Reload managed object state. Examples: govc datastore.upload $vm.vmx $vm/$vm.vmx govc object.reload /dc1/vm/$vm` } func (cmd *reload) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *reload) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } c, err := cmd.Client() if err != nil { return err } objs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } for _, obj := range objs { req := types.Reload{ This: obj, } _, err = methods.Reload(ctx, c, &req) if err != nil { return err } } return nil } govmomi-0.15.0/govc/object/rename.go000066400000000000000000000035111312205533500172530ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type rename struct { *flags.DatacenterFlag } func init() { cli.Register("object.rename", &rename{}) } func (cmd *rename) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) } func (cmd *rename) Usage() string { return "PATH NAME" } func (cmd *rename) Description() string { return `Rename managed objects. Examples: govc object.rename /dc1/network/dvs1 Switch1` } func (cmd *rename) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *rename) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 2 { return flag.ErrHelp } c, err := cmd.Client() if err != nil { return err } objs, err := cmd.ManagedObjects(ctx, f.Args()[:1]) if err != nil { return err } task, err := object.NewCommon(c, objs[0]).Rename(ctx, f.Arg(1)) if err != nil { return err } logger := cmd.ProgressLogger(fmt.Sprintf("renaming %s... ", objs[0])) _, err = task.WaitForResult(ctx, logger) logger.Wait() return err } govmomi-0.15.0/govc/option/000077500000000000000000000000001312205533500155175ustar00rootroot00000000000000govmomi-0.15.0/govc/option/ls.go000066400000000000000000000052301312205533500164640ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package option import ( "context" "flag" "fmt" "io" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type List struct { *flags.ClientFlag *flags.OutputFlag } func init() { cli.Register("option.ls", &List{}) } func (cmd *List) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *List) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *List) Usage() string { return "[NAME]" } var ListDescription = `List option with the given NAME. If NAME ends with a dot, all options for that subtree are listed.` func (cmd *List) Description() string { return ListDescription + ` Examples: govc option.ls govc option.ls config.vpxd.sso. govc option.ls config.vpxd.sso.sts.uri` } func (cmd *List) Query(ctx context.Context, f *flag.FlagSet, m *object.OptionManager) error { var err error var opts []types.BaseOptionValue if f.NArg() > 1 { return flag.ErrHelp } if f.NArg() == 1 { opts, err = m.Query(ctx, f.Arg(0)) } else { var om mo.OptionManager err = m.Properties(ctx, m.Reference(), []string{"setting"}, &om) opts = om.Setting } if err != nil { return err } return cmd.WriteResult(optionResult(opts)) } func (cmd *List) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } m := object.NewOptionManager(c, *c.ServiceContent.Setting) return cmd.Query(ctx, f, m) } type optionResult []types.BaseOptionValue func (r optionResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, opt := range r { o := opt.GetOptionValue() fmt.Fprintf(tw, "%s:\t%v\n", o.Key, o.Value) } return tw.Flush() } govmomi-0.15.0/govc/option/set.go000066400000000000000000000046511312205533500166470ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package option import ( "context" "flag" "fmt" "strconv" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type Set struct { *flags.ClientFlag } func init() { cli.Register("option.set", &Set{}) } func (cmd *Set) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) } func (cmd *Set) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } return nil } func (cmd *Set) Usage() string { return "NAME VALUE" } var SetDescription = `Set option NAME to VALUE.` func (cmd *Set) Description() string { return SetDescription + ` Examples: govc option.set log.level info govc option.set logger.Vsan verbose` } func (cmd *Set) Update(ctx context.Context, f *flag.FlagSet, m *object.OptionManager) error { if f.NArg() != 2 { return flag.ErrHelp } name := f.Arg(0) opts, err := m.Query(ctx, name) if err != nil { return err } if len(opts) != 1 { return flag.ErrHelp } val := f.Arg(1) var set types.AnyType switch x := opts[0].GetOptionValue().Value.(type) { case string: set = val case bool: set, err = strconv.ParseBool(val) if err != nil { return err } case int32: s, err := strconv.ParseInt(val, 10, 32) if err != nil { return err } set = s case int64: set, err = strconv.ParseInt(val, 10, 64) if err != nil { return err } default: return fmt.Errorf("type %T conversion not supported", x) } opts[0].GetOptionValue().Value = set return m.Update(ctx, opts) } func (cmd *Set) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } m := object.NewOptionManager(c, *c.ServiceContent.Setting) return cmd.Update(ctx, f, m) } govmomi-0.15.0/govc/permissions/000077500000000000000000000000001312205533500165625ustar00rootroot00000000000000govmomi-0.15.0/govc/permissions/ls.go000066400000000000000000000034471312205533500175370ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package permissions import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type ls struct { *PermissionFlag inherited bool } func init() { cli.Register("permissions.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) f.BoolVar(&cmd.inherited, "a", true, "Include inherited permissions defined by parent entities") } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Usage() string { return "[PATH]..." } func (cmd *ls) Description() string { return `List the permissions defined on or effective on managed entities. Examples: govc permissions.ls govc permissions.ls /dc1/host/cluster1` } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { refs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } m, err := cmd.Manager(ctx) if err != nil { return err } for _, ref := range refs { perms, err := m.RetrieveEntityPermissions(ctx, ref, cmd.inherited) if err != nil { return err } cmd.List.Add(perms) } return cmd.WriteResult(&cmd.List) } govmomi-0.15.0/govc/permissions/permissions.go000066400000000000000000000071101312205533500214630ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package permissions import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type List struct { Roles object.AuthorizationRoleList `json:",omitempty"` Permissions []types.Permission `json:",omitempty"` f *PermissionFlag } type PermissionFlag struct { *flags.DatacenterFlag *flags.OutputFlag asRef bool m *object.AuthorizationManager List } func NewPermissionFlag(ctx context.Context) (*PermissionFlag, context.Context) { f := &PermissionFlag{} f.List.f = f f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) f.OutputFlag, ctx = flags.NewOutputFlag(ctx) return f, ctx } func (f *PermissionFlag) Register(ctx context.Context, fs *flag.FlagSet) { f.DatacenterFlag.Register(ctx, fs) f.OutputFlag.Register(ctx, fs) fs.BoolVar(&f.asRef, "i", false, "Use moref instead of inventory path") } func (f *PermissionFlag) Process(ctx context.Context) error { if err := f.DatacenterFlag.Process(ctx); err != nil { return err } if err := f.OutputFlag.Process(ctx); err != nil { return err } return nil } func (f *PermissionFlag) Manager(ctx context.Context) (*object.AuthorizationManager, error) { if f.m != nil { return f.m, nil } c, err := f.Client() if err != nil { return nil, err } f.m = object.NewAuthorizationManager(c) f.Roles, err = f.m.RoleList(ctx) return f.m, err } func (f *PermissionFlag) Role(name string) (*types.AuthorizationRole, error) { role := f.Roles.ByName(name) if role == nil { return nil, fmt.Errorf("role %q not found", name) } return role, nil } func (f *PermissionFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, error) { if !f.asRef { return f.DatacenterFlag.ManagedObjects(ctx, args) } var refs []types.ManagedObjectReference for _, arg := range args { var ref types.ManagedObjectReference if ref.FromString(arg) { refs = append(refs, ref) } else { return nil, fmt.Errorf("invalid moref: %s", arg) } } return refs, nil } func (l *List) Write(w io.Writer) error { ctx := context.Background() finder, err := l.f.Finder() if err != nil { return err } refs := make(map[types.ManagedObjectReference]string) tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "%s\t%s\t%s\t%s\n", "Role", "Entity", "Principal", "Propagate") for _, perm := range l.Permissions { propagate := "No" if perm.Propagate { propagate = "Yes" } name := l.Roles.ById(perm.RoleId).Name p := "-" if perm.Entity != nil { if l.f.asRef { p = perm.Entity.String() } else { // convert moref to inventory path if p = refs[*perm.Entity]; p == "" { e, err := finder.Element(ctx, *perm.Entity) if err == nil { p = e.Path } refs[*perm.Entity] = p } } } fmt.Fprintf(tw, "%s\t%s\t%s\t%s\n", name, p, perm.Principal, propagate) } return tw.Flush() } func (l *List) Add(perms []types.Permission) { l.Permissions = append(l.Permissions, perms...) } govmomi-0.15.0/govc/permissions/remove.go000066400000000000000000000037611312205533500204150ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package permissions import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type remove struct { *PermissionFlag types.Permission role string } func init() { cli.Register("permissions.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) f.StringVar(&cmd.Principal, "principal", "", "User or group for which the permission is defined") f.BoolVar(&cmd.Group, "group", false, "True, if principal refers to a group name; false, for a user name") } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "[PATH]..." } func (cmd *remove) Description() string { return `Removes a permission rule from managed entities. Examples: govc permissions.remove -principal root govc permissions.remove -principal $USER@vsphere.local -role Admin /dc1/host/cluster1` } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { refs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } m, err := cmd.Manager(ctx) if err != nil { return err } for _, ref := range refs { err = m.RemoveEntityPermission(ctx, ref, cmd.Principal, cmd.Group) if err != nil { return err } } return nil } govmomi-0.15.0/govc/permissions/set.go000066400000000000000000000044251312205533500177110ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package permissions import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type set struct { *PermissionFlag types.Permission role string } func init() { cli.Register("permissions.set", &set{}) } func (cmd *set) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) f.StringVar(&cmd.Principal, "principal", "", "User or group for which the permission is defined") f.BoolVar(&cmd.Group, "group", false, "True, if principal refers to a group name; false, for a user name") f.BoolVar(&cmd.Propagate, "propagate", true, "Whether or not this permission propagates down the hierarchy to sub-entities") f.StringVar(&cmd.role, "role", "Admin", "Permission role name") } func (cmd *set) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *set) Usage() string { return "[PATH]..." } func (cmd *set) Description() string { return `Set the permissions managed entities. Examples: govc permissions.set -principal root -role Admin govc permissions.set -principal $USER@vsphere.local -role Admin /dc1/host/cluster1` } func (cmd *set) Run(ctx context.Context, f *flag.FlagSet) error { refs, err := cmd.ManagedObjects(ctx, f.Args()) if err != nil { return err } m, err := cmd.Manager(ctx) if err != nil { return err } role, err := cmd.Role(cmd.role) if err != nil { return err } cmd.Permission.RoleId = role.RoleId perms := []types.Permission{cmd.Permission} for _, ref := range refs { err = m.SetEntityPermissions(ctx, ref, perms) if err != nil { return err } } return nil } govmomi-0.15.0/govc/pool/000077500000000000000000000000001312205533500151605ustar00rootroot00000000000000govmomi-0.15.0/govc/pool/change.go000066400000000000000000000043061312205533500167370ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pool import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type change struct { *flags.DatacenterFlag *ResourceConfigSpecFlag name string } func init() { cli.Register("pool.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.ResourceConfigSpecFlag = NewResourceConfigSpecFlag() cmd.ResourceConfigSpecFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Resource pool name") } func (cmd *change) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.ResourceConfigSpecFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Usage() string { return "POOL..." } func (cmd *change) Description() string { return "Change the configuration of one or more resource POOLs.\n" + poolNameHelp } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } finder, err := cmd.Finder() if err != nil { return err } cmd.SetAllocation(func(a types.BaseResourceAllocationInfo) { ra := a.GetResourceAllocationInfo() if ra.Shares.Level == "" { ra.Shares = nil } }) for _, arg := range f.Args() { pools, err := finder.ResourcePoolListAll(ctx, arg) if err != nil { return err } for _, pool := range pools { err := pool.UpdateConfig(ctx, cmd.name, &cmd.ResourceConfigSpec) if err != nil { return err } } } return nil } govmomi-0.15.0/govc/pool/create.go000066400000000000000000000046151312205533500167600ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pool import ( "context" "flag" "fmt" "path" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.DatacenterFlag *ResourceConfigSpecFlag } func init() { cli.Register("pool.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.ResourceConfigSpecFlag = NewResourceConfigSpecFlag() cmd.ResourceConfigSpecFlag.SetAllocation(func(a types.BaseResourceAllocationInfo) { ra := a.GetResourceAllocationInfo() ra.Shares.Level = types.SharesLevelNormal ra.ExpandableReservation = types.NewBool(true) }) cmd.ResourceConfigSpecFlag.Register(ctx, f) } func (cmd *create) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.ResourceConfigSpecFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Usage() string { return "POOL..." } func (cmd *create) Description() string { return "Create one or more resource POOLs.\n" + poolCreateHelp } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } finder, err := cmd.Finder() if err != nil { return err } for _, arg := range f.Args() { dir := path.Dir(arg) base := path.Base(arg) parents, err := finder.ResourcePoolList(ctx, dir) if err != nil { if _, ok := err.(*find.NotFoundError); ok { return fmt.Errorf("cannot create resource pool '%s': parent not found", base) } return err } for _, parent := range parents { _, err = parent.Create(ctx, base, cmd.ResourceConfigSpec) if err != nil { return err } } } return nil } govmomi-0.15.0/govc/pool/destroy.go000066400000000000000000000041251312205533500172020ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pool import ( "context" "flag" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type destroy struct { *flags.DatacenterFlag children bool } func init() { cli.Register("pool.destroy", &destroy{}) } func (cmd *destroy) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) f.BoolVar(&cmd.children, "children", false, "Remove all children pools") } func (cmd *destroy) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } return nil } func (cmd *destroy) Usage() string { return "POOL..." } func (cmd *destroy) Description() string { return "Destroy one or more resource POOLs.\n" + poolNameHelp } func (cmd *destroy) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } finder, err := cmd.Finder() if err != nil { return err } for _, arg := range f.Args() { pools, err := finder.ResourcePoolList(ctx, arg) if err != nil { if _, ok := err.(*find.NotFoundError); ok { // Ignore if pool cannot be found continue } return err } for _, pool := range pools { if cmd.children { err = pool.DestroyChildren(ctx) if err != nil { return err } } else { task, err := pool.Destroy(ctx) if err != nil { return err } err = task.Wait(ctx) if err != nil { return err } } } } return nil } govmomi-0.15.0/govc/pool/help.go000066400000000000000000000044531312205533500164450ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pool var poolNameHelp = ` POOL may be an absolute or relative path to a resource pool or a (clustered) compute host. If it resolves to a compute host, the associated root resource pool is returned. If a relative path is specified, it is resolved with respect to the current datacenter's "host" folder (i.e. /ha-datacenter/host). Paths to nested resource pools must traverse through the root resource pool of the selected compute host, i.e. "compute-host/Resources/nested-pool". The same globbing rules that apply to the "ls" command apply here. For example, POOL may be specified as "*/Resources/*" to expand to all resource pools that are nested one level under the root resource pool, on all (clustered) compute hosts in the current datacenter.` var poolCreateHelp = ` POOL may be an absolute or relative path to a resource pool. The parent of the specified POOL must be an existing resource pool. If a relative path is specified, it is resolved with respect to the current datacenter's "host" folder (i.e. /ha-datacenter/host). The basename of the specified POOL is used as the name for the new resource pool. The same globbing rules that apply to the "ls" command apply here. For example, the path to the parent resource pool in POOL may be specified as "*/Resources" to expand to the root resource pools on all (clustered) compute hosts in the current datacenter. For example: */Resources/test Create resource pool "test" on all (clustered) compute hosts in the current datacenter. somehost/Resources/*/nested Create resource pool "nested" in every resource pool that is a direct descendant of the root resource pool on "somehost".` govmomi-0.15.0/govc/pool/info.go000066400000000000000000000122611312205533500164440ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pool import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.DatacenterFlag *flags.OutputFlag pools bool apps bool } func init() { cli.Register("pool.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.pools, "p", true, "List resource pools") f.BoolVar(&cmd.apps, "a", false, "List virtual app resource pools") } func (cmd *info) Process(ctx context.Context) error { if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Usage() string { return "POOL..." } func (cmd *info) Description() string { return "Retrieve information about one or more resource POOLs.\n" + poolNameHelp } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } c, err := cmd.Client() if err != nil { return err } finder, err := cmd.Finder() if err != nil { return err } var res infoResult var props []string if cmd.OutputFlag.JSON { props = nil } else { props = []string{ "name", "config.cpuAllocation", "config.memoryAllocation", "runtime.cpu", "runtime.memory", } } var vapps []*object.VirtualApp for _, arg := range f.Args() { if cmd.pools { objects, err := finder.ResourcePoolList(ctx, arg) if err != nil { if _, ok := err.(*find.NotFoundError); !ok { return err } } res.objects = append(res.objects, objects...) } if cmd.apps { apps, err := finder.VirtualAppList(ctx, arg) if err != nil { if _, ok := err.(*find.NotFoundError); !ok { return err } } vapps = append(vapps, apps...) } } if len(res.objects) != 0 { refs := make([]types.ManagedObjectReference, 0, len(res.objects)) for _, o := range res.objects { refs = append(refs, o.Reference()) } pc := property.DefaultCollector(c) err = pc.Retrieve(ctx, refs, props, &res.ResourcePools) if err != nil { return err } } if len(vapps) != 0 { var apps []mo.VirtualApp refs := make([]types.ManagedObjectReference, 0, len(vapps)) for _, o := range vapps { refs = append(refs, o.Reference()) p := object.NewResourcePool(c, o.Reference()) p.InventoryPath = o.InventoryPath res.objects = append(res.objects, p) } pc := property.DefaultCollector(c) err = pc.Retrieve(ctx, refs, props, &apps) if err != nil { return err } for _, app := range apps { res.ResourcePools = append(res.ResourcePools, app.ResourcePool) } } return cmd.WriteResult(&res) } type infoResult struct { ResourcePools []mo.ResourcePool objects []*object.ResourcePool } func (r *infoResult) Write(w io.Writer) error { // Maintain order via r.objects as Property collector does not always return results in order. objects := make(map[types.ManagedObjectReference]mo.ResourcePool, len(r.ResourcePools)) for _, o := range r.ResourcePools { objects[o.Reference()] = o } tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, o := range r.objects { pool := objects[o.Reference()] fmt.Fprintf(tw, "Name:\t%s\n", pool.Name) fmt.Fprintf(tw, " Path:\t%s\n", o.InventoryPath) writeInfo(tw, "CPU", "MHz", &pool.Runtime.Cpu, pool.Config.CpuAllocation) pool.Runtime.Memory.MaxUsage >>= 20 pool.Runtime.Memory.OverallUsage >>= 20 writeInfo(tw, "Mem", "MB", &pool.Runtime.Memory, pool.Config.MemoryAllocation) } return tw.Flush() } func writeInfo(w io.Writer, name string, units string, ru *types.ResourcePoolResourceUsage, b types.BaseResourceAllocationInfo) { ra := b.GetResourceAllocationInfo() usage := 100.0 * float64(ru.OverallUsage) / float64(ru.MaxUsage) shares := "" limit := "unlimited" if ra.Shares.Level == types.SharesLevelCustom { shares = fmt.Sprintf(" (%d)", ra.Shares.Shares) } if ra.Limit != -1 { limit = fmt.Sprintf("%d%s", ra.Limit, units) } fmt.Fprintf(w, " %s Usage:\t%d%s (%0.1f%%)\n", name, ru.OverallUsage, units, usage) fmt.Fprintf(w, " %s Shares:\t%s%s\n", name, ra.Shares.Level, shares) fmt.Fprintf(w, " %s Reservation:\t%d%s (expandable=%v)\n", name, ra.Reservation, units, *ra.ExpandableReservation) fmt.Fprintf(w, " %s Limit:\t%s\n", name, limit) } govmomi-0.15.0/govc/pool/resource_config_spec.go000066400000000000000000000051121312205533500216740ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pool import ( "context" "flag" "strconv" "strings" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type sharesInfo types.SharesInfo func (s *sharesInfo) String() string { return string(s.Level) } func (s *sharesInfo) Set(val string) error { switch val { case string(types.SharesLevelNormal), string(types.SharesLevelLow), string(types.SharesLevelHigh): s.Level = types.SharesLevel(val) default: n, err := strconv.Atoi(val) if err != nil { return err } s.Level = types.SharesLevelCustom s.Shares = int32(n) } return nil } func NewResourceConfigSpecFlag() *ResourceConfigSpecFlag { f := new(ResourceConfigSpecFlag) f.MemoryAllocation = new(types.ResourceAllocationInfo) f.CpuAllocation = new(types.ResourceAllocationInfo) f.SetAllocation(func(a types.BaseResourceAllocationInfo) { a.GetResourceAllocationInfo().Shares = new(types.SharesInfo) }) return f } type ResourceConfigSpecFlag struct { types.ResourceConfigSpec } func (s *ResourceConfigSpecFlag) Register(ctx context.Context, f *flag.FlagSet) { opts := []struct { name string units string types.BaseResourceAllocationInfo }{ {"CPU", "MHz", s.CpuAllocation}, {"Memory", "MB", s.MemoryAllocation}, } for _, opt := range opts { prefix := strings.ToLower(opt.name)[:3] ra := opt.GetResourceAllocationInfo() shares := (*sharesInfo)(ra.Shares) f.Int64Var(&ra.Limit, prefix+".limit", 0, opt.name+" limit in "+opt.units) f.Int64Var(&ra.Reservation, prefix+".reservation", 0, opt.name+" reservation in "+opt.units) f.Var(flags.NewOptionalBool(&ra.ExpandableReservation), prefix+".expandable", opt.name+" expandable reservation") f.Var(shares, prefix+".shares", opt.name+" shares level or number") } } func (s *ResourceConfigSpecFlag) Process(ctx context.Context) error { return nil } func (s *ResourceConfigSpecFlag) SetAllocation(f func(types.BaseResourceAllocationInfo)) { for _, a := range []types.BaseResourceAllocationInfo{s.CpuAllocation, s.MemoryAllocation} { f(a) } } govmomi-0.15.0/govc/release.sh000077500000000000000000000042621312205533500161720ustar00rootroot00000000000000#!/bin/bash -e if ! which github-release > /dev/null; then echo 'Please install github-release...' echo '' echo ' $ go get github.com/aktau/github-release' echo '' exit 1 fi if [ -z "${GITHUB_TOKEN}" ]; then echo 'Please set GITHUB_TOKEN...' exit 1 fi export GITHUB_USER="${GITHUB_USER:-vmware}" export GITHUB_REPO="${GITHUB_REPO:-govmomi}" name="$(git describe)" release=(github-release release --draft --name "${name}") case "$1" in release) tag="${name}" ;; prerelease) tag="prerelease-${name}" release+=(--pre-release) ;; dryrun) ;; *) echo "Usage: $0 [release|prerelease]" exit 1 ;; esac echo "Building govc..." rm -f ./govc_* ./build.sh for name in govc_* ; do if [ "${name: -4}" == ".exe" ] ; then zip "${name}.zip" "$name" & else gzip -f "$name" & fi done wait if [ -n "$tag" ] ; then echo "Pushing tag ${tag}..." git tag -f "${tag}" git push origin "refs/tags/${tag}" fi # Generate description description=$( if [[ "${tag}" == "prerelease-"* ]]; then echo '**This is a PRERELEASE version.**' fi echo " Documentation: * [CHANGELOG](https://github.com/vmware/govmomi/blob/$tag/govc/CHANGELOG.md) * [README](https://github.com/vmware/govmomi/blob/$tag/govc/README.md) * [USAGE](https://github.com/vmware/govmomi/blob/$tag/govc/USAGE.md) The binaries below are provided without warranty, following the [Apache license](LICENSE). " echo ' Instructions: * Download the file relevant to your operating system * Decompress (i.e. `gzip -d govc_linux_amd64.gz`) * Set the executable bit (i.e. `chmod +x govc_linux_amd64`) * Move the file to a directory in your `$PATH` (i.e. `mv govc_linux_amd64 /usr/local/bin/govc`) ' echo '```' echo '$ sha1sum govc_*.gz' sha1sum govc_*.gz echo '$ sha1sum govc_*.zip' sha1sum govc_*.zip echo '```' ) release+=(--tag "${tag}" --description "${description}") if [ -n "$tag" ] ; then echo "Creating release..." "${release[@]}" else echo "${release[@]}" fi # Upload build artifacts for f in govc_*.{gz,zip}; do echo "Uploading $f..." if [ -n "$tag" ] ; then github-release upload --tag "${tag}" --name "${f}" --file "${f}" fi done echo "Remember to publish the draft release!" govmomi-0.15.0/govc/role/000077500000000000000000000000001312205533500151505ustar00rootroot00000000000000govmomi-0.15.0/govc/role/create.go000066400000000000000000000032361312205533500167460ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package role import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/permissions" ) type create struct { *permissions.PermissionFlag } func init() { cli.Register("role.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) } func (cmd *create) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Usage() string { return "NAME [PRIVILEGE]..." } func (cmd *create) Description() string { return `Create authorization role. Optionally populate the role with the given PRIVILEGE(s). Examples: govc role.create MyRole govc role.create NoDC $(govc role.ls Admin | grep -v Datacenter.)` } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } m, err := cmd.Manager(ctx) if err != nil { return err } _, err = m.AddRole(ctx, f.Arg(0), f.Args()[1:]) return err } govmomi-0.15.0/govc/role/ls.go000066400000000000000000000042671312205533500161260ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package role import ( "context" "flag" "fmt" "io" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/permissions" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *permissions.PermissionFlag } func init() { cli.Register("role.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Usage() string { return "[NAME]" } func (cmd *ls) Description() string { return `List authorization roles. If NAME is provided, list privileges for the role. Examples: govc role.ls govc role.ls Admin` } type lsRoleList object.AuthorizationRoleList func (rl lsRoleList) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) for _, role := range rl { fmt.Fprintf(tw, "%s\t%s\n", role.Name, role.Info.GetDescription().Summary) } return tw.Flush() } type lsRole types.AuthorizationRole func (r lsRole) Write(w io.Writer) error { for _, p := range r.Privilege { fmt.Println(p) } return nil } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() > 1 { return flag.ErrHelp } _, err := cmd.Manager(ctx) if err != nil { return err } if f.NArg() == 1 { role, err := cmd.Role(f.Arg(0)) if err != nil { return err } return cmd.WriteResult(lsRole(*role)) } return cmd.WriteResult(lsRoleList(cmd.Roles)) } govmomi-0.15.0/govc/role/remove.go000066400000000000000000000033021312205533500167720ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package role import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/permissions" ) type remove struct { *permissions.PermissionFlag force bool } func init() { cli.Register("role.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) f.BoolVar(&cmd.force, "force", false, "Force removal if role is in use") } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Usage() string { return "NAME" } func (cmd *remove) Description() string { return `Remove authorization role. Examples: govc role.remove MyRole govc role.remove MyRole -force` } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } m, err := cmd.Manager(ctx) if err != nil { return err } role, err := cmd.Role(f.Arg(0)) if err != nil { return err } return m.RemoveRole(ctx, role.RoleId, !cmd.force) } govmomi-0.15.0/govc/role/update.go000066400000000000000000000047471312205533500167750ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package role import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/permissions" ) type update struct { *permissions.PermissionFlag name string remove bool add bool } func init() { cli.Register("role.update", &update{}) } func (cmd *update) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Change role name") f.BoolVar(&cmd.remove, "r", false, "Remove given PRIVILEGE(s)") f.BoolVar(&cmd.add, "a", false, "Add given PRIVILEGE(s)") } func (cmd *update) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *update) Usage() string { return "NAME [PRIVILEGE]..." } func (cmd *update) Description() string { return `Update authorization role. Set, Add or Remove role PRIVILEGE(s). Examples: govc role.update MyRole $(govc role.ls Admin | grep VirtualMachine.) govc role.update -r MyRole $(govc role.ls Admin | grep VirtualMachine.GuestOperations.) govc role.update -a MyRole $(govc role.ls Admin | grep Datastore.) govc role.update -name RockNRole MyRole` } func (cmd *update) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() == 0 { return flag.ErrHelp } m, err := cmd.Manager(ctx) if err != nil { return err } role, err := cmd.Role(f.Arg(0)) if err != nil { return err } ids := role.Privilege args := f.Args()[1:] if cmd.add { ids = append(ids, args...) } else if cmd.remove { ids = nil rm := make(map[string]bool, len(args)) for _, arg := range args { rm[arg] = true } for _, id := range role.Privilege { if !rm[id] { ids = append(ids, id) } } } else if len(args) != 0 { ids = args } if cmd.name == "" { cmd.name = role.Name } return m.UpdateRole(ctx, role.RoleId, cmd.name, ids) } govmomi-0.15.0/govc/role/usage.go000066400000000000000000000034751312205533500166140ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package role import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/permissions" ) type usage struct { *permissions.PermissionFlag } func init() { cli.Register("role.usage", &usage{}) } func (cmd *usage) Register(ctx context.Context, f *flag.FlagSet) { cmd.PermissionFlag, ctx = permissions.NewPermissionFlag(ctx) cmd.PermissionFlag.Register(ctx, f) } func (cmd *usage) Process(ctx context.Context) error { if err := cmd.PermissionFlag.Process(ctx); err != nil { return err } return nil } func (cmd *usage) Usage() string { return "NAME..." } func (cmd *usage) Description() string { return `List usage for role NAME. Examples: govc role.usage govc role.usage Admin` } func (cmd *usage) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.Manager(ctx) if err != nil { return err } if f.NArg() == 0 { cmd.List.Permissions, err = m.RetrieveAllPermissions(ctx) if err != nil { return err } } else { for _, name := range f.Args() { role, err := cmd.Role(name) if err != nil { return err } perms, err := m.RetrieveRolePermissions(ctx, role.RoleId) if err != nil { return err } cmd.List.Add(perms) } } return cmd.WriteResult(&cmd.List) } govmomi-0.15.0/govc/session/000077500000000000000000000000001312205533500156725ustar00rootroot00000000000000govmomi-0.15.0/govc/session/ls.go000066400000000000000000000053341312205533500166440ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package session import ( "context" "flag" "fmt" "io" "text/tabwriter" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" ) type ls struct { *flags.ClientFlag *flags.OutputFlag } func init() { cli.Register("session.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *ls) Description() string { return `List active sessions. Examples: govc session.ls govc session.ls -json | jq -r .CurrentSession.Key` } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } type sessionInfo struct { cmd *ls mo.SessionManager } func (s *sessionInfo) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 4, 0, 2, ' ', 0) fmt.Fprintf(tw, "Key\t") fmt.Fprintf(tw, "Name\t") fmt.Fprintf(tw, "Time\t") fmt.Fprintf(tw, "Idle\t") fmt.Fprintf(tw, "Host\t") fmt.Fprintf(tw, "Agent\t") fmt.Fprintf(tw, "\t") fmt.Fprint(tw, "\n") for _, v := range s.SessionList { idle := " ." if v.Key != s.CurrentSession.Key { since := time.Since(v.LastActiveTime) if since > time.Hour { idle = "old" } else { idle = (time.Duration(since.Seconds()) * time.Second).String() } } fmt.Fprintf(tw, "%s\t", v.Key) fmt.Fprintf(tw, "%s\t", v.UserName) fmt.Fprintf(tw, "%s\t", v.LoginTime.Format("2006-01-02 15:04")) fmt.Fprintf(tw, "%s\t", idle) fmt.Fprintf(tw, "%s\t", v.IpAddress) fmt.Fprintf(tw, "%s\t", v.UserAgent) fmt.Fprint(tw, "\n") } return tw.Flush() } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } var m mo.SessionManager pc := property.DefaultCollector(c) err = pc.RetrieveOne(ctx, *c.ServiceContent.SessionManager, nil, &m) if err != nil { return nil } return cmd.WriteResult(&sessionInfo{cmd, m}) } govmomi-0.15.0/govc/session/rm.go000066400000000000000000000027761312205533500166530ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package session import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/session" ) type rm struct { *flags.ClientFlag } func init() { cli.Register("session.rm", &rm{}) } func (cmd *rm) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) } func (cmd *rm) Usage() string { return "KEY..." } func (cmd *rm) Description() string { return `Remove active sessions. Examples: govc session.ls | grep root govc session.rm 5279e245-e6f1-4533-4455-eb94353b213a` } func (cmd *rm) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } return nil } func (cmd *rm) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } return session.NewManager(c).TerminateSession(ctx, f.Args()) } govmomi-0.15.0/govc/test/000077500000000000000000000000001312205533500151665ustar00rootroot00000000000000govmomi-0.15.0/govc/test/.gitignore000066400000000000000000000000231312205533500171510ustar00rootroot00000000000000.vagrant govc_ca.* govmomi-0.15.0/govc/test/README.md000066400000000000000000000025431312205533500164510ustar00rootroot00000000000000# Functional tests for govc ## Bats Install [Bats](https://github.com/sstephenson/bats/) ## coreutils Install gxargs, greadlink and gmktemp on Darwin ``` brew install coreutils brew install findutils ``` ## Download test images Some tests depend on ttylinux images, these can be downloaded by running: ``` ./images/update.sh ``` These images are uploaded to the esxbox as needed by tests and can be removed with the following command: ``` ./clean.sh ``` ## GOVC_TEST_URL The govc tests need an ESX instance to run against. The default `GOVC_TEST_URL` is that of the vagrant box in the *esxbox* directory: ``` (cd esxbox && vagrant up) ``` Any other ESX box can be used by exporting the following variable: ``` export GOVC_TEST_URL=user:pass@hostname ``` ## vCenter Simulator Some tests require vCenter and depend on the Vagrant box in the *vcsim* directory. These tests are skipped if the vcsim box is not running. To enable these tests: ``` (cd vcsim && vagrant up) ``` ## Running tests The test helper prepends ../govc to `PATH`. The tests can be run from any directory, as *govc* is found related to `PATH` and *images* are found relative to `$BATS_TEST_DIRNAME`. The entire suite can be run with the following command: ``` cd $GOPATH/github.com/vmware/govmomi/govc go build -v . bats test ``` Or individually, for example: ``` ./test/cli.bats ``` govmomi-0.15.0/govc/test/boot_order_test.sh000077500000000000000000000030101312205533500207140ustar00rootroot00000000000000#!/bin/bash -e # This test is not run via bats. # A VNC session will be opened to observe the VM boot order: # 1) from floppy (followed by: eject floppy, reboot) # 2) from cdrom (followed by: eject cdrom, reboot) # 3) from network (will timeout) # 4) from disk . $(dirname $0)/test_helper.bash upload_img upload_iso id=$(new_ttylinux_vm) function cleanup() { quit_vnc $vnc govc vm.destroy $id pkill -TERM -g $$ ^nc } trap cleanup EXIT govc device.cdrom.add -vm $id > /dev/null govc device.cdrom.insert -vm $id $GOVC_TEST_ISO govc device.floppy.add -vm $id > /dev/null govc device.floppy.insert -vm $id $GOVC_TEST_IMG govc device.boot -vm $id -delay 1000 -order floppy,cdrom,ethernet,disk vnc=$(govc vm.vnc -port 21122 -password govmomi -enable "${id}" | awk '{print $2}') echo "booting from floppy..." govc vm.power -on $id open_vnc $vnc sleep 10 govc vm.power -off $id govc device.floppy.eject -vm $id # this is ttylinux-live, notice the 'boot:' prompt vs 'login:' prompt when booted from disk echo "booting from cdrom..." govc vm.power -on $id sleep 10 govc vm.power -off $id govc device.cdrom.eject -vm $id govc device.serial.add -vm $id > /dev/null govc device.serial.connect -vm $id - echo "booting from network, will timeout then boot from disk..." govc vm.power -on $id # serial console log device=$(govc device.ls -vm "$id" | grep serialport- | awk '{print $1}') govc datastore.tail -f "$id/$device.log" & ip=$(govc vm.ip $id) echo "VM booted from disk (ip=$ip)" sleep 5 govc vm.power -s $id sleep 5 govmomi-0.15.0/govc/test/clean.sh000077500000000000000000000010111312205533500166000ustar00rootroot00000000000000#!/bin/bash # # Cleanup any artifacts created by govc # . $(dirname $0)/test_helper.bash teardown datastore_rm() { name=$1 govc datastore.rm $name 2> /dev/null } datastore_rm $GOVC_TEST_IMG datastore_rm $GOVC_TEST_ISO datastore_rm $GOVC_TEST_VMDK datastore_rm $(echo $GOVC_TEST_VMDK | sed 's/.vmdk/-flat.vmdk/') datastore_rm $(dirname $GOVC_TEST_VMDK) # Recursively destroy all resource pools created by the test suite govc ls host/*/Resources/govc-test-* | \ xargs -rt govc pool.destroy -r govc datastore.ls govmomi-0.15.0/govc/test/cli.bats000077500000000000000000000054131312205533500166160ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "about" { run govc about assert_success assert_line "Vendor: VMware, Inc." run govc about -json assert_success run govc about -json -l assert_success } @test "about.cert" { run govc about.cert assert_success run govc about.cert -json assert_success run govc about.cert -show assert_success # with -k=true we get thumbprint output and exit 0 thumbprint=$(govc about.cert -k=true -thumbprint) # with -k=true we get thumbprint output and exit 60 run govc about.cert -k=false -thumbprint if [ "$status" -ne 60 ]; then flunk $(printf "expected failed exit status=60, got status=%d" $status) fi assert_output "$thumbprint" run govc about -k=false assert_failure run govc about -k=false -tls-known-hosts <(echo "$thumbprint") assert_success run govc about -k=false -tls-known-hosts <(echo "nope nope") assert_failure } @test "version" { run govc version assert_success v=$(govc version | awk '{print $NF}') run govc version -require "$v" assert_success run govc version -require "not-a-version-string" assert_failure run govc version -require 100.0.0 assert_failure } @test "login attempt without credentials" { host=$(govc env -x GOVC_URL_HOST) run govc about -u "enoent@$host" assert_failure "govc: ServerFaultCode: Cannot complete login due to an incorrect user name or password." } @test "login attempt with GOVC_URL, GOVC_USERNAME, and GOVC_PASSWORD" { govc_url_to_vars run govc about assert_success } @test "connect to an endpoint with a non-supported API version" { run env GOVC_MIN_API_VERSION=24.4 govc about assert grep -q "^govc: Require API version 24.4," <<<${output} } @test "connect to an endpoint with user provided Vim namespace and Vim version" { run govc about -vim-namespace urn:vim25 -vim-version 6.0 assert_success } @test "govc env" { output="$(govc env -x -u 'user:pass@enoent:99999?key=val#anchor')" assert grep -q GOVC_URL=enoent:99999 <<<${output} assert grep -q GOVC_USERNAME=user <<<${output} assert grep -q GOVC_PASSWORD=pass <<<${output} assert grep -q GOVC_URL_SCHEME=https <<<${output} assert grep -q GOVC_URL_HOST=enoent <<<${output} assert grep -q GOVC_URL_PORT=99999 <<<${output} assert grep -q GOVC_URL_PATH=/sdk <<<${output} assert grep -q GOVC_URL_QUERY=key=val <<<${output} assert grep -q GOVC_URL_FRAGMENT=anchor <<<${output} password="pa\$sword\!ok" run govc env -u "user:${password}@enoent:99999" GOVC_PASSWORD assert_output "$password" } @test "govc help" { run govc assert_failure run govc -h assert_success run govc -enoent assert_failure run govc vm.create assert_failure run govc vm.create -h assert_success run govc vm.create -enoent assert_failure } govmomi-0.15.0/govc/test/datacenter.bats000077500000000000000000000031161312205533500201570ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "datacenter.info" { dc=$(govc ls -t Datacenter / | head -n1) run govc datacenter.info "$dc" assert_success run govc datacenter.info -json "$dc" assert_success run govc datacenter.info /enoent assert_failure } @test "create and destroy datacenters" { vcsim_env dcs=($(new_id) $(new_id)) run govc datacenter.create "${dcs[@]}" assert_success for dc in ${dcs[*]}; do run govc ls "/$dc" assert_success # //{vm,network,host,datastore} [ ${#lines[@]} -eq 4 ] run govc datacenter.info "/$dc" assert_success done run govc object.destroy "${dcs[@]}" assert_success for dc in ${dcs[*]}; do run govc ls "/$dc" assert_success [ ${#lines[@]} -eq 0 ] done } @test "destroy datacenter using glob" { vcsim_env unset GOVC_DATACENTER GOVC_DATASTORE folder=$(new_id) dcs=($(new_id) $(new_id)) run govc folder.create "$folder" assert_success run govc datacenter.create -folder "$folder" "${dcs[@]}" assert_success run govc object.destroy "$folder/*" assert_success for dc in ${dcs[*]}; do run govc ls "/$dc" assert_success [ ${#lines[@]} -eq 0 ] done run govc folder.destroy "$folder" assert_success } @test "fails when datacenter name not specified" { run govc datacenter.create assert_failure } @test "datacenter commands fail against ESX" { run govc datacenter.create something assert_failure "govc: ServerFaultCode: The operation is not supported on the object." run govc object.destroy /ha-datacenter assert_failure } govmomi-0.15.0/govc/test/datastore.bats000077500000000000000000000136051312205533500200370ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper upload_file() { name=$(new_id) echo "Hello world" | govc datastore.upload - "$name" assert_success echo "$name" } @test "datastore.ls" { name=$(upload_file) # Single argument run govc datastore.ls "${name}" assert_success [ ${#lines[@]} -eq 1 ] # Multiple arguments run govc datastore.ls "${name}" "${name}" assert_success [ ${#lines[@]} -eq 2 ] # Pattern argument run govc datastore.ls "./govc-test-*" assert_success [ ${#lines[@]} -ge 1 ] # Long listing run govc datastore.ls -l "./govc-test-*" assert_success assert_equal "12B" $(awk '{ print $1 }' <<<${output}) } @test "datastore.ls-R" { dir=$(new_id) run govc datastore.mkdir "$dir" assert_success for name in one two three ; do echo "$name world" | govc datastore.upload - "$dir/file-$name" run govc datastore.mkdir -p "$dir/dir-$name/subdir-$name" run govc datastore.mkdir -p "$dir/dir-$name/.hidden" assert_success echo "$name world" | govc datastore.upload - "$dir/dir-$name/.hidden/other-$name" echo "$name world" | govc datastore.upload - "$dir/dir-$name/other-$name" echo "$name world" | govc datastore.upload - "$dir/dir-$name/subdir-$name/last-$name" done # without -R json=$(govc datastore.ls -json -l -p "$dir") result=$(jq -r .[].File[].Path <<<"$json" | wc -l) [ "$result" -eq 6 ] result=$(jq -r .[].FolderPath <<<"$json" | wc -l) [ "$result" -eq 1 ] # with -R json=$(govc datastore.ls -json -l -p -R "$dir") result=$(jq -r .[].File[].Path <<<"$json" | wc -l) [ "$result" -eq 15 ] result=$(jq -r .[].FolderPath <<<"$json" | wc -l) [ "$result" -eq 7 ] # with -R -a json=$(govc datastore.ls -json -l -p -R -a "$dir") result=$(jq -r .[].File[].Path <<<"$json" | wc -l) [ "$result" -eq 21 ] result=$(jq -r .[].FolderPath <<<"$json" | wc -l) [ "$result" -eq 10 ] } @test "datastore.rm" { name=$(upload_file) # Not found is a failure run govc datastore.rm "${name}.notfound" assert_failure assert_matches "govc: File .* was not found" "${output}" # Not found is NOT a failure with the force flag run govc datastore.rm -f "${name}.notfound" assert_success assert_empty "${output}" # Verify the file is present run govc datastore.ls "${name}" assert_success # Delete the file run govc datastore.rm "${name}" assert_success assert_empty "${output}" # Verify the file is gone run govc datastore.ls "${name}" assert_failure } @test "datastore.info" { run govc datastore.info enoent assert_failure run govc datastore.info assert_success [ ${#lines[@]} -gt 1 ] } @test "datastore.mkdir" { name=$(new_id) # Not supported datastore type is a failure run govc datastore.mkdir -namespace "notfound" assert_failure assert_matches "govc: ServerFaultCode: .*" "${output}" run govc datastore.mkdir "${name}" assert_success assert_empty "${output}" # Verify the dir is present run govc datastore.ls "${name}" assert_success # Delete the dir on an unsupported datastore type is a failure run govc datastore.rm -namespace "${name}" assert_failure assert_matches "govc: ServerFaultCode: .*" "${output}" # Delete the dir run govc datastore.rm "${name}" assert_success assert_empty "${output}" # Verify the dir is gone run govc datastore.ls "${name}" assert_failure } @test "datastore.download" { name=$(upload_file) run govc datastore.download "$name" - assert_success assert_output "Hello world" run govc datastore.download "$name" "$TMPDIR/$name" assert_success run cat "$TMPDIR/$name" assert_output "Hello world" rm "$TMPDIR/$name" } @test "datastore.upload" { name=$(new_id) echo -n "Hello world" | govc datastore.upload - "$name" run govc datastore.download "$name" - assert_success assert_output "Hello world" } @test "datastore.tail" { run govc datastore.tail "enoent/enoent.log" assert_failure id=$(new_id) govc vm.create "$id" govc vm.power -off "$id" # test with .log (> bufSize) and .vmx (< bufSize) for file in "$id/vmware.log" "$id/$id.vmx" ; do log=$(govc datastore.download "$file" -) for n in 0 1 5 10 123 456 7890 ; do expect=$(tail -n $n <<<"$log") run govc datastore.tail -n $n "$file" assert_output "$expect" expect=$(tail -c $n <<<"$log") run govc datastore.tail -c $n "$file" assert_output "$expect" done done } @test "datastore.disk" { id=$(new_id) vmdk="$id/$id.vmdk" run govc datastore.mkdir "$id" assert_success run govc datastore.disk.create "$vmdk" assert_success run govc datastore.disk.info "$vmdk" assert_success run govc datastore.rm "$vmdk" assert_success run govc datastore.mkdir -p "$id" assert_success run govc datastore.disk.create "$vmdk" assert_success id=$(new_id) run govc vm.create -on=false -link -disk "$vmdk" "$id" assert_success run govc datastore.disk.info -d "$vmdk" assert_success run govc datastore.disk.info -p=false "$vmdk" assert_success run govc datastore.disk.info -c "$vmdk" assert_success run govc datastore.disk.info -json "$vmdk" assert_success # should fail due to: ddb.deletable=false run govc datastore.rm "$vmdk" assert_failure run govc datastore.rm -f "$vmdk" assert_success # one more time, but rm the directory w/o -f run govc datastore.mkdir -p "$id" assert_success run govc datastore.disk.create "$vmdk" assert_success id=$(new_id) run govc vm.create -on=false -link -disk "$vmdk" "$id" assert_success run govc datastore.rm "$(dirname "$vmdk")" assert_success } @test "datastore.disk.info" { import_ttylinux_vmdk run govc datastore.disk.info assert_failure run govc datastore.disk.info enoent assert_failure run govc datastore.disk.info "$GOVC_TEST_VMDK" assert_success run govc datastore.disk.info -d "$GOVC_TEST_VMDK" assert_success run govc datastore.disk.info -c "$GOVC_TEST_VMDK" assert_success } govmomi-0.15.0/govc/test/datastore_file_manager_test.sh000077500000000000000000000051771312205533500232550ustar00rootroot00000000000000#!/bin/bash -e # This test is not run via bats # See also: datastore.bats@test "datastore.disk" export GOVC_TEST_URL=$GOVC_URL . "$(dirname "$0")"/test_helper.bash echo -n "checking datastore type..." type=$(govc object.collect -s "datastore/$GOVC_DATASTORE" summary.type) echo "$type" if [ "$type" = "vsan" ] ; then echo -n "checking for orphan objects..." objs=($(govc datastore.vsan.dom.ls -o)) echo "${#objs[@]}" if [ "${#objs[@]}" -ne "0" ] ; then govc datastore.vsan.dom.rm "${objs[@]}" fi fi dir=govc-test-dfm echo "uploading plain file..." cal | govc datastore.upload - $dir/cal.txt echo "removing plain file..." govc datastore.rm $dir/cal.txt scratch=$dir/govc-test-scratch/govc-test-scratch.vmdk govc datastore.mkdir -p "$(dirname $scratch)" echo "creating disk $scratch..." govc datastore.disk.create -size 1M $scratch id=$(new_id) echo "creating $id VM with disk linked to $scratch..." govc vm.create -on=false -link -disk $scratch "$id" info=$(govc device.info -vm "$id" disk-*) echo "$info" disk="$(grep Name: <<<"$info" | awk '{print $2}')" vmdk="$id/$id.vmdk" echo "removing $disk device but keeping the .vmdk backing file..." govc device.remove -vm "$id" -keep "$disk" echo -n "checking delta disk ddb.deletable..." govc datastore.download "$vmdk" - | grep -q -v ddb.deletable echo "yes" echo -n "checking scratch disk ddb.deletable..." govc datastore.download "$scratch" - | grep ddb.deletable | grep -q false echo "no" echo "removing $vmdk" govc datastore.rm "$vmdk" echo -n "checking that rm $scratch fails..." govc datastore.rm "$scratch" 2>/dev/null || echo "yes" echo -n "checking that rm -f $scratch deletes..." govc datastore.rm -f "$scratch" && echo "yes" echo "removing disk Directory via FileManager..." govc datastore.mkdir -p "$(dirname $scratch)" govc datastore.disk.create -size 1M $scratch govc datastore.rm "$(dirname $scratch)" echo -n "checking for remaining files..." govc datastore.ls -p -R $dir teardown status=0 if [ "$type" = "vsan" ] ; then echo -n "checking for leaked objects..." objs=($(govc datastore.vsan.dom.ls -l -o | awk '{print $3}')) echo "${#objs[@]}" if [ "${#objs[@]}" -ne "0" ] ; then printf "%s\n" "${objs[@]}" status=1 else # this is expected to leak on vSAN currently echo -n "checking if FileManager.Delete still leaks..." govc datastore.mkdir -p "$(dirname $scratch)" govc datastore.disk.create -size 1M $scratch # '-t=false' forces use of FileManager instead of VirtualDiskManager govc datastore.rm -t=false $scratch govc datastore.rm $dir govc datastore.vsan.dom.ls -o | xargs -r govc datastore.vsan.dom.rm -v fi fi exit $status govmomi-0.15.0/govc/test/datastore_tail_test.sh000077500000000000000000000010551312205533500215640ustar00rootroot00000000000000#!/bin/bash -xe # This test is not run via bats as the bats pipeline hangs when we background a process . "$(dirname "$0")"/test_helper.bash name=$(new_id) n=16 tmp=$(mktemp --tmpdir "${name}-XXXXX") echo -n | govc datastore.upload - "$name" govc datastore.tail -f "$name" > "$tmp" & pid=$! sleep 1 yes | dd bs=${n}K count=1 2>/dev/null | govc datastore.upload - "$name" sleep 2 # stops following when the file has gone away govc datastore.mv "$name" "${name}.old" wait $pid govc datastore.download "${name}.old" - | cmp "$tmp" - rm "$tmp" teardown govmomi-0.15.0/govc/test/device.bats000077500000000000000000000142441312205533500173100ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "device.ls" { vm=$(new_empty_vm) result=$(govc device.ls -vm $vm | grep ethernet-0 | wc -l) [ $result -eq 1 ] } @test "device.info" { vm=$(new_empty_vm) run govc device.info -vm $vm ide-200 assert_success run govc device.info -vm $vm ide-20000 assert_failure run govc device.info -vm $vm -net enoent assert_failure run govc device.info -vm $vm -net "VM Network" ide-200 assert_failure result=$(govc device.info -vm $vm -net "VM Network" | grep "MAC Address" | wc -l) [ $result -eq 1 ] } @test "device.boot" { vm=$(new_ttylinux_vm) result=$(govc device.ls -vm $vm -boot | wc -l) [ $result -eq 0 ] run govc device.boot -vm $vm -order floppy,cdrom,ethernet,disk assert_success result=$(govc device.ls -vm $vm -boot | wc -l) [ $result -eq 2 ] run govc device.cdrom.add -vm $vm assert_success run govc device.floppy.add -vm $vm assert_success run govc device.boot -vm $vm -order floppy,cdrom,ethernet,disk assert_success result=$(govc device.ls -vm $vm -boot | wc -l) [ $result -eq 4 ] } @test "device.cdrom" { vm=$(new_empty_vm) result=$(govc device.ls -vm $vm | grep cdrom- | wc -l) [ $result -eq 0 ] run govc device.cdrom.add -vm $vm assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] run govc device.info -vm $vm $id assert_success run govc device.cdrom.insert -vm $vm -device $id x.iso assert_success run govc device.info -vm $vm $id assert_line "Summary: ISO [${GOVC_DATASTORE}] x.iso" run govc device.disconnect -vm $vm $id assert_success run govc device.connect -vm $vm $id assert_success run govc device.remove -vm $vm $id assert_success run govc device.disconnect -vm $vm $id assert_failure "govc: device '$id' not found" run govc device.cdrom.insert -vm $vm -device $id x.iso assert_failure "govc: device '$id' not found" run govc device.remove -vm $vm $id assert_failure "govc: device '$id' not found" } @test "device.floppy" { vm=$(new_empty_vm) result=$(govc device.ls -vm $vm | grep floppy- | wc -l) [ $result -eq 0 ] run govc device.floppy.add -vm $vm assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] run govc device.info -vm $vm $id assert_success run govc device.floppy.insert -vm $vm -device $id x.img assert_success run govc device.info -vm $vm $id assert_line "Summary: Image [${GOVC_DATASTORE}] x.img" run govc device.disconnect -vm $vm $id assert_success run govc device.connect -vm $vm $id assert_success run govc device.remove -vm $vm $id assert_success run govc device.disconnect -vm $vm $id assert_failure "govc: device '$id' not found" run govc device.floppy.insert -vm $vm -device $id x.img assert_failure "govc: device '$id' not found" run govc device.remove -vm $vm $id assert_failure "govc: device '$id' not found" } @test "device.serial" { vm=$(new_empty_vm) result=$(govc device.ls -vm $vm | grep serial- | wc -l) [ $result -eq 0 ] run govc device.serial.add -vm $vm assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] run govc device.info -vm $vm $id assert_success run govc device.serial.connect -vm $vm - assert_success run govc device.info -vm $vm $id assert_line "Summary: File [$GOVC_DATASTORE] $vm/${id}.log" uri=telnet://:33233 run govc device.serial.connect -vm $vm -device $id $uri assert_success run govc device.info -vm $vm $id assert_line "Summary: Remote $uri" run govc device.serial.disconnect -vm $vm -device $id assert_success run govc device.info -vm $vm $id assert_line "Summary: Remote localhost:0" run govc device.disconnect -vm $vm $id assert_success run govc device.connect -vm $vm $id assert_success run govc device.remove -vm $vm $id assert_success run govc device.disconnect -vm $vm $id assert_failure "govc: device '$id' not found" run govc device.serial.connect -vm $vm -device $id $uri assert_failure "govc: device '$id' not found" run govc device.remove -vm $vm $id assert_failure "govc: device '$id' not found" } @test "device.scsi" { vm=$(new_empty_vm) result=$(govc device.ls -vm $vm | grep lsilogic- | wc -l) [ $result -eq 1 ] run govc device.scsi.add -vm $vm assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] result=$(govc device.ls -vm $vm | grep lsilogic- | wc -l) [ $result -eq 2 ] run govc device.scsi.add -vm $vm -type pvscsi assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] } @test "device.usb" { vm=$(new_empty_vm) result=$(govc device.ls -vm $vm | grep usb | wc -l) [ $result -eq 0 ] run govc device.usb.add -type enoent -vm $vm assert_failure run govc device.usb.add -vm $vm assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] run govc device.usb.add -vm $vm assert_failure # 1 per vm max run govc device.usb.add -type xhci -vm $vm assert_success id=$output result=$(govc device.ls -vm $vm | grep $id | wc -l) [ $result -eq 1 ] run govc device.usb.add -type xhci -vm $vm assert_failure # 1 per vm max } @test "device.scsi slots" { vm=$(new_empty_vm) for i in $(seq 1 15) ; do name="disk-${i}" run govc vm.disk.create -vm "$vm" -name "$name" -size 1K assert_success result=$(govc device.ls -vm "$vm" | grep disk- | wc -l) [ "$result" -eq "$i" ] done # We're at the max, so this will fail run govc vm.disk.create -vm "$vm" -name disk-16 -size 1K assert_failure # Remove disk #2 run govc device.remove -vm "$vm" disk-1000-2 assert_success # No longer at the max, this should use the UnitNumber released by the remove above run govc vm.disk.create -vm "$vm" -name disk-16 -size 1K assert_success } @test "device nil config" { vm=$(new_empty_vm) run govc device.ls -vm "$vm" assert_success run govc datastore.rm "$vm" assert_success run govc object.reload "vm/$vm" assert_success run govc device.ls -vm "$vm" assert_failure run govc vm.unregister "$vm" assert_success } govmomi-0.15.0/govc/test/esxbox/000077500000000000000000000000001312205533500164765ustar00rootroot00000000000000govmomi-0.15.0/govc/test/esxbox/Vagrantfile000066400000000000000000000013771312205533500206730ustar00rootroot00000000000000# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.ssh.insert_key = false config.ssh.default.username = "root" config.ssh.shell = "sh" config.vm.hostname = "esxbox" config.vm.box = "esxi55" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.network "forwarded_port", guest: 443, host: 18443 [:vmware_fusion, :vmware_workstation].each do |name| config.vm.provider name do |v,override| v.vmx["memsize"] = "4096" end end config.vm.provision "shell", privileged: false, :inline => </dev/null echo "Waiting for tools to initialize..." govc vm.ip $id 1>/dev/null echo "Formatting the data disk..." govc guest.mkdir /data script=$(govc guest.mktemp) govc guest.upload -f - "$script" <<'EOF' #!/bin/sh -xe opts=(n p 1 1 ' ' w) printf "%s\n" "${opts[@]}" | fdisk /dev/hdb mkfs.ext3 /dev/hdb1 mount /dev/hdb1 /data df -h cp /etc/motd /data EOF govc guest.chown 65534 "$script" govc guest.chown 65534:65534 "$script" govc guest.ls "$script" | grep 65534 govc guest.chmod 0755 "$script" pid=$(govc guest.start "$script" '>&' /tmp/disk.log) status=$(govc guest.ps -p "$pid" -json -X | jq .ProcessInfo[].ExitCode) govc guest.download /tmp/disk.log - if [ "$status" -ne "0" ] ; then exit 1 fi echo "Writing some data to the disks..." for d in /etc /data ; do govc guest.touch "$d/motd.bak" govc guest.touch -d "$(date -d '1 day ago')" "$d/motd" govc guest.ls "$d/motd" govc guest.download $d/motd - | grep Chop done govc version | govc guest.upload -f - /etc/motd govc guest.download /etc/motd - | grep -v Chop pid=$(govc guest.start /bin/sync) status=$(govc guest.ps -p "$pid" -json -X | jq .ProcessInfo[].ExitCode) if [ "$status" -ne "0" ] ; then exit 1 fi echo "Rebooting vm..." govc vm.power -off $id govc vm.power -on $id echo "Waiting for tools to initialize..." govc vm.ip $id 1>/dev/null echo "Verifying data persistence..." govc guest.download /etc/motd - | grep $grepf Chop pid=$(govc guest.start /bin/mount /dev/hdb1 /data) status=$(govc guest.ps -p "$pid" -json -X | jq .ProcessInfo[].ExitCode) if [ "$persist" = "true" ] ; then govc guest.ls /data govc guest.download /data/motd - | grep -v Chop govc guest.rm /data/motd govc guest.mkdir /data/foo/bar/baz 2>/dev/null && exit 1 # should fail govc guest.mkdir -p /data/foo/bar/baz govc guest.rmdir /data/foo 2>/dev/null && exit 1 # should fail govc guest.rmdir /data/foo/bar/baz dir=$(govc guest.mktemp -d -p /data/foo -s govc) file=$(govc guest.mktemp -p "$dir") govc guest.mv -n "$(govc guest.mktemp)" "$file" 2>/dev/null && exit 1 # should fail govc guest.mv "$file" "${file}-old" govc guest.mv "$dir" "${dir}-old" govc guest.rmdir -r /data/foo govc guest.ls /data | grep -v foo else if [ "$status" -eq "0" ] ; then echo "expected failure" exit 1 fi fi done govmomi-0.15.0/govc/test/host.bats000077500000000000000000000105561312205533500170300ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "host info esx" { run govc host.info assert_success grep -q Manufacturer: <<<$output run govc host.info -host enoent assert_failure "govc: host 'enoent' not found" for opt in dns ip ipath uuid do run govc host.info "-host.$opt" enoent assert_failure "govc: no such host" done # avoid hardcoding the esxbox hostname local name=$(govc ls '/*/host/*' | grep -v Resources) run govc host.info -host $name assert_success grep -q Manufacturer: <<<$output run govc host.info -host ${name##*/} assert_success grep -q Manufacturer: <<<$output run govc host.info -host.ipath $name assert_success run govc host.info -host.dns $(basename $(dirname $name)) assert_success uuid=$(govc host.info -json | jq -r .HostSystems[].Hardware.SystemInfo.Uuid) run govc host.info -host.uuid $uuid assert_success run govc host.info "*" assert_success } @test "host info vc" { vcsim_env run govc host.info assert_success grep -q Manufacturer: <<<$output run govc host.info -host enoent assert_failure "govc: host 'enoent' not found" for opt in dns ip ipath uuid do run govc host.info "-host.$opt" enoent assert_failure "govc: no such host" done local name=$GOVC_HOST unset GOVC_HOST run govc host.info assert_failure "govc: default host resolves to multiple instances, please specify" run govc host.info -host $name assert_success grep -q Manufacturer: <<<$output run govc host.info -host.ipath $name assert_success run govc host.info -host.dns $(basename $name) assert_success uuid=$(govc host.info -host $name -json | jq -r .HostSystems[].Hardware.SystemInfo.Uuid) run govc host.info -host.uuid $uuid assert_success } @test "host.vnic.info" { run govc host.vnic.info assert_success } @test "host.vswitch.info" { run govc host.vswitch.info assert_success run govc host.vswitch.info -json assert_success } @test "host.portgroup.info" { run govc host.portgroup.info assert_success run govc host.portgroup.info -json assert_success } @test "host.options" { run govc host.option.ls Config.HostAgent.plugins.solo.enableMob assert_success run govc host.option.ls Config.HostAgent.plugins. assert_success run govc host.option.ls -json Config.HostAgent.plugins. assert_success run govc host.option.ls Config.HostAgent.plugins.solo.ENOENT assert_failure } @test "host.service" { run govc host.service.ls assert_success run govc host.service.ls -json assert_success run govc host.service status TSM-SSH assert_success } @test "host.cert.info" { run govc host.cert.info assert_success run govc host.cert.info -json assert_success expires=$(govc host.cert.info -json | jq -r .NotAfter) about_expires=$(govc about.cert -json | jq -r .NotAfter) assert_equal "$expires" "$about_expires" } @test "host.cert.csr" { # Requested Extensions: # X509v3 Subject Alternative Name: # IP Address:... result=$(govc host.cert.csr -ip | openssl req -text -noout) assert_matches "IP Address:" "$result" ! assert_matches "DNS:" "$result" # Requested Extensions: # X509v3 Subject Alternative Name: # DNS:... result=$(govc host.cert.csr | openssl req -text -noout) ! assert_matches "IP Address:" "$result" assert_matches "DNS:" "$result" } @test "host.cert.import" { issuer=$(govc host.cert.info -json | jq -r .Issuer) expires=$(govc host.cert.info -json | jq -r .NotAfter) # only mess with the cert if its already been signed by our test CA if [[ "$issuer" != CN=govc-ca,* ]] ; then skip "host cert not signed by govc-ca" fi govc host.cert.csr -ip | ./host_cert_sign.sh | govc host.cert.import expires2=$(govc host.cert.info -json | jq -r .NotAfter) # cert expiration should have changed [ "$expires" != "$expires2" ] # verify hostd is using the new cert too expires=$(govc about.cert -json | jq -r .NotAfter) assert_equal "$expires" "$expires2" # our cert is not trusted against the system CA list status=$(govc about.cert | grep Status:) assert_matches ERROR "$status" # with our CA trusted, the cert should be too status=$(govc about.cert -tls-ca-certs ./govc_ca.pem | grep Status:) assert_matches good "$status" } @test "host.date.info" { run govc host.date.info assert_success run govc host.date.info -json assert_success } govmomi-0.15.0/govc/test/host_cert_sign.sh000077500000000000000000000017671312205533500205520ustar00rootroot00000000000000#!/bin/bash -e # Usage: govc host.cert.csr | ./host_cert_sign.sh | govc host.cert.import pushd "$(dirname "$0")" >/dev/null days=$((365 * 5)) if [ ! -e govc_ca.key ] ; then echo "Generating CA private key..." 1>&2 openssl genrsa -out govc_ca.key 2048 echo "Generating CA self signed certificate..." 1>&2 openssl req -x509 -new -nodes -key govc_ca.key -out govc_ca.pem -subj /C=US/ST=CA/L=SF/O=VMware/OU=Eng/CN=govc-ca -days $days fi echo "Signing CSR with the CA certificate..." 1>&2 # The hostd generated CSR includes: # Requested Extensions: # X509v3 Subject Alternative Name: # IP Address:$ip # But seems it doesn't get copied by default, so we end up with: # x509: cannot validate certificate for $ip because it doesn't contain any IP SANs (x509.HostnameError) # Using -extfile to add it to the signed cert. ip=$(govc env -x GOVC_URL_HOST) openssl x509 -req -CA govc_ca.pem -CAkey govc_ca.key -CAcreateserial -days $days -extfile <(echo "subjectAltName=IP:$ip") popd >/dev/null govmomi-0.15.0/govc/test/images/000077500000000000000000000000001312205533500164335ustar00rootroot00000000000000govmomi-0.15.0/govc/test/images/.gitignore000066400000000000000000000000331312205533500204170ustar00rootroot00000000000000ttylinux-* floppybird.img govmomi-0.15.0/govc/test/images/update.sh000077500000000000000000000010061312205533500202510ustar00rootroot00000000000000#!/bin/bash pushd $(dirname $0) # Sadly, the ttylinux project was abandoned in late 2015. # But this release still serves us well. base_url=http://dl.bintray.com/dougm/ttylinux ttylinux="ttylinux-pc_i486-16.1" files="${ttylinux}.iso ${ttylinux}-live.ova ${ttylinux}.ova" for name in $files ; do wget -qO $name $base_url/$name done wget -qN https://github.com/icebreaker/floppybird/raw/master/build/floppybird.img # extract ova so we can also use the .vmdk and .ovf files directly tar -xvf ${ttylinux}.ova popd govmomi-0.15.0/govc/test/import.bats000077500000000000000000000023271312205533500173620ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "import.ova" { run govc import.ova $GOVC_IMAGES/${TTYLINUX_NAME}.ova assert_success run govc vm.destroy ${TTYLINUX_NAME} assert_success } @test "import.ova with iso" { run govc import.ova $GOVC_IMAGES/${TTYLINUX_NAME}-live.ova assert_success run govc vm.destroy ${TTYLINUX_NAME}-live assert_success } @test "import.ovf" { run govc import.ovf $GOVC_IMAGES/${TTYLINUX_NAME}.ovf assert_success run govc vm.destroy ${TTYLINUX_NAME} assert_success # test w/ relative dir pushd $BATS_TEST_DIRNAME >/dev/null run govc import.ovf ./images/${TTYLINUX_NAME}.ovf assert_success popd >/dev/null run govc vm.destroy ${TTYLINUX_NAME} assert_success } @test "import.ovf with name in options" { name=$(new_id) file=$($mktemp --tmpdir govc-test-XXXXX) echo "{ \"Name\": \"${name}\"}" > ${file} run govc import.ovf -options="${file}" $GOVC_IMAGES/${TTYLINUX_NAME}.ovf assert_success run govc vm.destroy "${name}" assert_success rm -f ${file} } @test "import.ovf with name as argument" { name=$(new_id) run govc import.ova -name="${name}" $GOVC_IMAGES/${TTYLINUX_NAME}.ova assert_success run govc vm.destroy "${name}" assert_success } govmomi-0.15.0/govc/test/license.bats000077500000000000000000000026221312205533500174700ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper # These tests should only run against a server running an evaluation license. verify_evaluation() { if [ "$(govc license.ls -json | jq -r .[0].EditionKey)" != "eval" ]; then skip "requires evaluation license" fi } get_key() { jq ".[] | select(.LicenseKey == \"$1\")" } get_property() { jq -r ".Properties[] | select(.Key == \"$1\") | .Value" } @test "license.add" { verify_evaluation run govc license.add -json 00000-00000-00000-00000-00001 00000-00000-00000-00000-00002 assert_success # Expect to see an entry for both the first and the second key assert_equal "License is not valid for this product" $(get_key 00000-00000-00000-00000-00001 <<<${output} | get_property diagnostic) assert_equal "License is not valid for this product" $(get_key 00000-00000-00000-00000-00002 <<<${output} | get_property diagnostic) } @test "license.remove" { verify_evaluation run govc license.remove -json 00000-00000-00000-00000-00001 assert_success } @test "license.ls" { verify_evaluation run govc license.ls -json assert_success # Expect the test instance to run in evaluation mode assert_equal "Evaluation Mode" $(get_key 00000-00000-00000-00000-00000 <<<$output | jq -r ".Name") } @test "license.decode" { verify_evaluation key=00000-00000-00000-00000-00000 assert_equal "eval" $(govc license.decode $key | grep $key | awk '{print $2}') } govmomi-0.15.0/govc/test/logs.bats000077500000000000000000000014031312205533500170060ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "logs" { run govc logs assert_success nlogs=${#lines[@]} # there should be plenty more than 1 line of hostd logs [ $nlogs -ge 1 ] # test -n flag run govc logs -n $((nlogs - 10)) assert_success [ ${#lines[@]} -le $nlogs ] run govc logs -log vmkernel assert_success nlogs=${#lines[@]} # there should be plenty more than 1 line of vmkernel logs [ $nlogs -ge 1 ] # test > 1 call to BrowseLog() run govc logs -n 2002 assert_success # -host ignored against ESX run govc logs -host enoent assert_success run govc logs -log enoent assert_failure } @test "logs.ls" { run govc logs.ls assert_success # -host ignored against ESX run govc logs.ls -host enoent assert_success } govmomi-0.15.0/govc/test/ls.bats000077500000000000000000000062331312205533500164660ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "ls" { run govc ls assert_success # /dc/{vm,network,host,datastore} n=${#lines[@]} [ $n -ge 4 ] # list entire inventory run govc ls '/**' assert_success [ ${#lines[@]} -ge $n ] run govc ls ./... assert_success [ ${#lines[@]} -ge $n ] run govc ls -t HostSystem '*' assert_success [ ${#lines[@]} -eq 0 ] run govc ls host assert_success [ ${#lines[@]} -ge 1 ] run govc ls enoent assert_success [ ${#lines[@]} -eq 0 ] } @test "ls -R" { # search entire inventory run govc ls ./... assert_success # should have at least 1 dc + folders, 1 host, 1 network, 1 datastore [ ${#lines[@]} -ge 9 ] run govc ls -t HostSystem ./... assert_success [ ${#lines[@]} -eq 1 ] run govc ls -t Datacenter /... assert_success [ ${#lines[@]} -eq 1 ] run govc ls -t ResourcePool host/... assert_success [ ${#lines[@]} -ge 1 ] run govc ls -t ResourcePool vm/... assert_success [ ${#lines[@]} -eq 0 ] c=$(govc ls -t ComputeResource ./... | head -1) run govc ls -t ResourcePool "$c/..." assert_success [ ${#lines[@]} -ge 1 ] } @test "ls vm" { vm=$(new_empty_vm) run govc ls vm assert_success [ ${#lines[@]} -ge 1 ] run govc ls vm/$vm assert_success [ ${#lines[@]} -eq 1 ] run govc ls /*/vm/$vm assert_success [ ${#lines[@]} -eq 1 ] } @test "ls network" { run govc ls network assert_success [ ${#lines[@]} -ge 1 ] local path=${lines[0]} run govc ls "$path" assert_success [ ${#lines[@]} -eq 1 ] run govc ls "network/$(basename "$path")" assert_success [ ${#lines[@]} -eq 1 ] run govc ls "/*/network/$(basename "$path")" assert_success [ ${#lines[@]} -eq 1 ] } @test "ls multi ds" { vcsim_env run govc ls assert_success # /DC0/{vm,network,host,datastore} [ ${#lines[@]} -eq 4 ] run govc ls /DC* assert_success # /DC[0,1]/{vm,network,host,datastore} [ ${#lines[@]} -eq 8 ] # here 'vm' is relative to /DC0 run govc ls vm assert_success [ ${#lines[@]} -gt 0 ] unset GOVC_DATACENTER run govc ls assert_success # /DC[0,1] [ ${#lines[@]} -eq 2 ] run govc ls -dc enoent assert_failure [ ${#lines[@]} -gt 0 ] # here 'vm' is relative to '/' - so there are no matches run govc ls vm assert_success [ ${#lines[@]} -eq 0 ] # ls all vms in all datacenters run govc ls */vm assert_success [ ${#lines[@]} -gt 0 ] } @test "ls moref" { # ensure the vm folder isn't empty run govc vm.create -on=false "$(new_id)" assert_success # list dc folder paths folders1=$(govc ls) # list dc folder refs | govc ls -L ; should output the same paths folders2=$(govc ls -i | xargs govc ls -L) assert_equal "$folders1" "$folders2" for folder in $folders1 do # list paths in $folder items1=$(govc ls "$folder") # list refs in $folder | govc ls -L ; should output the same paths items2=$(govc ls -i "$folder" | xargs -d '\n' govc ls -L) assert_equal "$items1" "$items2" done ref=ViewManager:ViewManager path=$(govc ls -L $ref) assert_equal "$ref" "$path" path=$(govc ls -L Folder:ha-folder-root) assert_equal "/" "$path" } govmomi-0.15.0/govc/test/metric.bats000077500000000000000000000031721312205533500173320ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "metric.ls" { run govc metric.ls assert_failure run govc metric.ls enoent assert_failure host=$(govc ls -t HostSystem ./... | head -n 1) pool=$(govc ls -t ResourcePool ./... | head -n 1) run govc metric.ls "$host" assert_success run govc metric.ls -json "$host" assert_success run govc metric.ls "$pool" assert_success } @test "metric.sample" { host=$(govc ls -t HostSystem ./... | head -n 1) metrics=($(govc metric.ls "$host")) run govc metric.sample "$host" enoent assert_failure run govc metric.sample "$host" "${metrics[@]}" assert_success run govc metric.sample -instance - "$host" "${metrics[@]}" assert_success run govc metric.sample -json "$host" "${metrics[@]}" assert_success vm=$(new_ttylinux_vm) run govc metric.ls "$vm" assert_output "" run govc vm.power -on "$vm" assert_success run govc vm.ip "$vm" assert_success metrics=($(govc metric.ls "$vm")) run govc metric.sample "$vm" "${metrics[@]}" assert_success run govc metric.sample -json "$vm" "${metrics[@]}" assert_success run govc metric.sample "govc-test-*" "${metrics[@]}" assert_success } @test "metric.info" { host=$(govc ls -t HostSystem ./... | head -n 1) metrics=($(govc metric.ls "$host")) run govc metric.info "$host" enoent assert_failure run govc metric.info "$host" assert_success run govc metric.info -json "$host" assert_success run govc metric.sample "$host" "${metrics[@]}" assert_success run govc metric.info "$host" "${metrics[@]}" assert_success run govc metric.info - "${metrics[@]}" assert_success } govmomi-0.15.0/govc/test/metric_info_test.sh000077500000000000000000000007441312205533500210670ustar00rootroot00000000000000#!/bin/bash -e types="Datacenter HostSystem ClusterComputeResource ResourcePool VirtualMachine Datastore VirtualApp" for type in $types ; do echo "$type..." obj=$(govc ls -t "$type" ./... | head -n 1) if [ -z "$obj" ] ; then echo "...no instances found" continue fi if ! govc metric.info "$obj" 2>/dev/null ; then echo "...N/A" # Datacenter, Datastore on ESX for example continue fi govc metric.ls "$obj" | xargs govc metric.sample -n 5 "$obj" done govmomi-0.15.0/govc/test/network.bats000077500000000000000000000106641312205533500175440ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "network dvs backing" { vcsim_env # DVS backed network by default (from vcsim_env) vm=$(new_empty_vm) eth0=$(govc device.ls -vm $vm | grep ethernet- | awk '{print $1}') run govc device.info -vm $vm $eth0 assert_success summary=$(govc device.info -vm $vm $eth0 | grep Summary: | awk '{print $2}') assert_equal "DVSwitch:" $summary run govc device.remove -vm $vm $eth0 assert_success eth0=$(govc device.ls -vm $vm | grep ethernet- | awk '{print $1}') [ -z "$eth0" ] # Standard network backing run govc vm.network.add -vm $vm -net "VM Network" assert_success eth0=$(govc device.ls -vm $vm | grep ethernet- | awk '{print $1}') run govc device.info -vm $vm $eth0 assert_success summary=$(govc device.info -vm $vm $eth0 | grep Summary: | awk -F: '{print $2}') assert_equal "VM Network" $(collapse_ws $summary) run govc device.remove -vm $vm $eth0 assert_success run govc device.remove -vm $vm $eth0 assert_failure "govc: device '$eth0' not found" } @test "network change backing" { vcsim_env vm=$(new_empty_vm) eth0=$(govc device.ls -vm $vm | grep ethernet- | awk '{print $1}') run govc vm.network.change -vm $vm $eth0 enoent assert_failure "govc: network 'enoent' not found" run govc vm.network.change -vm $vm enoent "VM Network" assert_failure "govc: device 'enoent' not found" run govc vm.network.change -vm $vm $eth0 "VM Network" assert_success run govc vm.network.change -vm $vm $eth0 assert_success unset GOVC_NETWORK run govc vm.network.change -vm $vm $eth0 assert_failure "govc: default network resolves to multiple instances, please specify" run govc vm.power -on $vm assert_success run govc vm.power -off $vm mac=$(vm_mac $vm) run govc vm.network.change -vm $vm -net "VM Network" $eth0 assert_success # verify we didn't change the mac address run govc vm.power -on $vm assert_success assert_equal $mac $(vm_mac $vm) } @test "network standard backing" { vm=$(new_empty_vm) run govc device.info -vm $vm ethernet-0 assert_success run govc device.remove -vm $vm ethernet-0 assert_success run govc device.info -vm $vm ethernet-0 assert_failure run govc vm.network.add -vm $vm enoent assert_failure "govc: network 'enoent' not found" run govc vm.network.add -vm $vm "VM Network" assert_success run govc device.info -vm $vm ethernet-0 assert_success } @test "network adapter" { vm=$(new_id) run govc vm.create -on=false -net.adapter=enoent $vm assert_failure "govc: unknown ethernet card type 'enoent'" vm=$(new_id) run govc vm.create -on=false -net.adapter=vmxnet3 $vm assert_success eth0=$(govc device.ls -vm $vm | grep ethernet- | awk '{print $1}') type=$(govc device.info -vm $vm $eth0 | grep Type: | awk -F: '{print $2}') assert_equal "VirtualVmxnet3" $(collapse_ws $type) run govc vm.network.add -vm $vm -net.adapter e1000e "VM Network" assert_success eth1=$(govc device.ls -vm $vm | grep ethernet- | grep -v $eth0 | awk '{print $1}') type=$(govc device.info -vm $vm $eth1 | grep Type: | awk -F: '{print $2}') assert_equal "VirtualE1000e" $(collapse_ws $type) } @test "network flag required" { vcsim_env # -net flag is required when there are multiple networks unset GOVC_NETWORK run govc vm.create -on=false $(new_id) assert_failure "govc: default network resolves to multiple instances, please specify" } @test "network change hardware address" { mac="00:00:0f$(dd bs=1 count=3 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02x"')" vm=$(new_id) run govc vm.create -on=false $vm assert_success run govc vm.network.change -vm $vm -net.address $mac ethernet-0 assert_success run govc vm.power -on $vm assert_success assert_equal $mac $(vm_mac $vm) } @test "dvs.portgroup" { vcsim_env id=$(new_id) run govc dvs.create "$id" assert_success run govc dvs.portgroup.add -dvs "$id" -type earlyBinding -nports 16 "${id}-ExternalNetwork" assert_success run govc dvs.portgroup.add -dvs "$id" -type ephemeral -vlan 3122 "${id}-InternalNetwork" assert_success info=$(govc dvs.portgroup.info "$id" | grep VlanId: | uniq | grep 3122) [ -n "$info" ] run govc dvs.portgroup.change -vlan 3123 "${id}-InternalNetwork" assert_success info=$(govc dvs.portgroup.info "$id" | grep VlanId: | uniq | grep 3123) [ -n "$info" ] run govc object.destroy "network/${id}-ExternalNetwork" "network/${id}-InternalNetwork" "network/${id}" assert_success } govmomi-0.15.0/govc/test/object.bats000077500000000000000000000125151312205533500173160ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "object.destroy" { run govc object.destroy "/enoent" assert_failure run govc object.destroy assert_failure vm=$(new_id) run govc vm.create "$vm" assert_success # fails when powered on run govc object.destroy "vm/$vm" assert_failure run govc vm.power -off "$vm" assert_success run govc object.destroy "vm/$vm" assert_success } @test "object.rename" { run govc object.rename "/enoent" "nope" assert_failure vm=$(new_id) run govc vm.create -on=false "$vm" assert_success run govc object.rename "vm/$vm" "${vm}-renamed" assert_success run govc object.rename "vm/$vm" "${vm}-renamed" assert_failure run govc object.destroy "vm/${vm}-renamed" assert_success } @test "object.mv" { vcsim_env folder=$(new_id) run govc folder.create "vm/$folder" assert_success for _ in $(seq 1 3) ; do vm=$(new_id) run govc vm.create -folder "$folder" "$vm" assert_success done result=$(govc ls "vm/$folder" | wc -l) [ "$result" -eq "3" ] run govc folder.create "vm/${folder}-2" assert_success run govc object.mv "vm/$folder/*" "vm/${folder}-2" assert_success result=$(govc ls "vm/${folder}-2" | wc -l) [ "$result" -eq "3" ] result=$(govc ls "vm/$folder" | wc -l) [ "$result" -eq "0" ] } @test "object.collect" { run govc object.collect assert_success run govc object.collect -json assert_success run govc object.collect - assert_success run govc object.collect -json - assert_success run govc object.collect - content assert_success run govc object.collect -json - content assert_success root=$(govc object.collect - content | grep content.rootFolder | awk '{print $3}') dc=$(govc object.collect "$root" childEntity | awk '{print $3}' | cut -d, -f1) hostFolder=$(govc object.collect "$dc" hostFolder | awk '{print $3}') cr=$(govc object.collect "$hostFolder" childEntity | awk '{print $3}' | cut -d, -f1) host=$(govc object.collect "$cr" host | awk '{print $3}' | cut -d, -f1) run govc object.collect "$host" assert_success run govc object.collect "$host" hardware assert_success run govc object.collect "$host" hardware.systemInfo assert_success uuid=$(govc object.collect "$host" hardware.systemInfo.uuid | awk '{print $3}') uuid_s=$(govc object.collect -s "$host" hardware.systemInfo.uuid) assert_equal "$uuid" "$uuid_s" run govc object.collect "$(govc ls host | head -n1)" assert_success # test against slice of interface perfman=$(govc object.collect -s - content.perfManager) result=$(govc object.collect -s "$perfman" description.counterType) assert_equal "..." "$result" # test against an interface field run govc object.collect '/ha-datacenter/network/VM Network' summary assert_success } @test "object.find" { unset GOVC_DATACENTER run govc find "/enoent" assert_failure run govc find assert_success run govc find . assert_success run govc find / assert_success run govc find . -type HostSystem assert_success dc=$(govc find / -type Datacenter | head -1) run govc find "$dc" -maxdepth 0 assert_output "$dc" run govc find "$dc/vm" -maxdepth 0 assert_output "$dc/vm" run govc find "$dc" -maxdepth 1 -type Folder assert_success # //{vm,network,host,datastore} [ ${#lines[@]} -eq 4 ] folder=$(govc find -type Folder -name vm) vm=$(new_empty_vm) run govc find . -name "$vm" assert_output "$folder/$vm" run govc find "$folder" -name "$vm" assert_output "$folder/$vm" # moref for VM Network net=$(govc find -i network -name "$GOVC_NETWORK") # $vm.network.contains($net) == true run govc find . -type m -name "$vm" -network "$net" assert_output "$folder/$vm" # remove network reference run govc device.remove -vm "$vm" ethernet-0 assert_success # $vm.network.contains($net) == false run govc find . -type VirtualMachine -name "$vm" -network "$net" assert_output "" run govc find "$folder" -type VirtualMachine -name "govc-test-*" -runtime.powerState poweredOn assert_output "" run govc find "$folder" -type VirtualMachine -name "govc-test-*" -runtime.powerState poweredOff assert_output "$folder/$vm" run govc vm.power -on "$vm" assert_success run govc find "$folder" -type VirtualMachine -name "govc-test-*" -runtime.powerState poweredOff assert_output "" run govc find "$folder" -type VirtualMachine -name "govc-test-*" -runtime.powerState poweredOn assert_output "$folder/$vm" # output paths should be relative to "." in these cases export GOVC_DATACENTER=$dc folder="./vm" run govc find . -name "$vm" assert_output "$folder/$vm" run govc find "$folder" -name "$vm" } @test "object.method" { vcsim_env vm=$(govc find vm -type m | head -1) run govc object.method -enable=false -name NoSuchMethod "$vm" assert_failure run govc object.method -enable=false -name Destroy_Task enoent assert_failure run govc object.collect -s "$vm" disabledMethod ! assert_matches "Destroy_Task" "$output" run govc object.method -enable=false -name Destroy_Task "$vm" assert_success run govc object.collect -s "$vm" disabledMethod assert_matches "Destroy_Task" "$output" run govc object.method -enable -name Destroy_Task "$vm" assert_success run govc object.collect -s "$vm" disabledMethod ! assert_matches "Destroy_Task" "$output" } govmomi-0.15.0/govc/test/pool.bats000077500000000000000000000145361312205533500170260ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "pool.create" { path="*/Resources/$(new_id)/$(new_id)" run govc pool.create $path assert_failure assert_line "govc: cannot create resource pool '$(basename ${path})': parent not found" id=$(new_id) path="*/Resources/$id" run govc pool.create -cpu.shares low -mem.reservation 500 $path assert_success run govc pool.info $path assert_success assert_line "Name: $id" assert_line "CPU Shares: low" assert_line "Mem Reservation: 500MB (expandable=true)" run govc pool.destroy $path assert_success } @test "pool.create multiple" { id=$(new_id) path="*/Resources/$id" govc pool.create $path # Finder.List($path) run govc pool.info "$path" assert_success # Finder.Find($name) run govc pool.info "$id" assert_success # Create multiple parent pools with multiple arguments (without globbing) run govc pool.create $path/a $path/b assert_success result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 2 ] # Create multiple child pools with one argument (with globbing) run govc pool.create $path/*/{a,b} assert_success result=$(govc ls "host/$path/*/*" | wc -l) [ $result -eq 4 ] # Clean up run govc pool.destroy $path/*/* $path/* $path assert_success } @test "pool.change" { id=$(new_id) path="*/Resources/$id" govc pool.create $path run govc pool.change -mem.shares high $path assert_success run govc pool.info $path assert_success assert_line "Mem Shares: high" assert_line "CPU Shares: normal" nid=$(new_id) run govc pool.change -name $nid $path assert_success path="*/Resources/$nid" run govc pool.info $path assert_success assert_line "Name: $nid" run govc pool.destroy $path assert_success } @test "pool.change multiple" { id=$(new_id) path="*/Resources/$id" govc pool.create $path # Create some nested pools so that we can test changing multiple in one call govc pool.create $path/{a,b} $path/{a,b}/test # Test precondition run govc pool.info $path/a/test assert_success assert_line "Name: test" run govc pool.info $path/b/test assert_success assert_line "Name: test" # Change name of both test pools run govc pool.change -name hello $path/*/test assert_success # Test postcondition run govc pool.info $path/a/hello assert_success assert_line "Name: hello" run govc pool.info $path/b/hello assert_success assert_line "Name: hello" # Clean up govc pool.destroy $path/a/hello govc pool.destroy $path/a govc pool.destroy $path/b/hello govc pool.destroy $path/b govc pool.destroy $path } @test "pool.destroy" { id=$(new_id) # parent pool path="*/Resources/$id" run govc pool.create $path assert_success result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 0 ] # child pools id1=$(new_id) run govc pool.create $path/$id1 assert_success id2=$(new_id) run govc pool.create $path/$id2 assert_success # 2 child pools result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 2 ] # 1 parent pool result=$(govc ls "host/$path" | wc -l) [ $result -eq 1 ] run govc pool.destroy $path assert_success # no more parent pool result=$(govc ls "host/$path" | wc -l) [ $result -eq 0 ] # the child pools are not present anymore # the only place they could pop into is the parent pool # first child pool result=$(govc ls "host/*/Resources/$id1" | wc -l) [ $result -eq 0 ] # second child pool result=$(govc ls "host/*/Resources/$id2" | wc -l) [ $result -eq 0 ] } @test "pool.destroy children" { id=$(new_id) # parent pool path="*/Resources/$id" run govc pool.create $path assert_success result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 0 ] # child pools run govc pool.create $path/$(new_id) assert_success run govc pool.create $path/$(new_id) assert_success # 2 child pools result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 2 ] # 1 parent pool result=$(govc ls "host/*/Resources/govc-test-*" | wc -l) [ $result -eq 1 ] # delete childs run govc pool.destroy -children $path assert_success # no more child pools result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 0 ] # cleanup run govc pool.destroy $path assert_success # cleanup check result=$(govc ls "host/$path" | wc -l) [ $result -eq 0 ] } @test "pool.destroy multiple" { id=$(new_id) path="*/Resources/$id" govc pool.create $path # Create some nested pools so that we can test destroying multiple in one call govc pool.create $path/{a,b} # Test precondition result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 2 ] # Destroy both pools run govc pool.destroy $path/{a,b} assert_success # Test postcondition result=$(govc ls "host/$path/*" | wc -l) [ $result -eq 0 ] # Clean up govc pool.destroy $path } @test "vm.create -pool" { # test with full inventory path to pools parent_path=$(govc ls 'host/*/Resources') parent_name=$(basename $parent_path) [ "$parent_name" = "Resources" ] child_name=$(new_id) child_path="$parent_path/$child_name" grand_child_name=$(new_id) grand_child_path="$child_path/$grand_child_name" run govc pool.create $parent_path/$child_name{,/$grand_child_name} assert_success for path in $parent_path $child_path $grand_child_path do run govc vm.create -pool $path $(new_id) assert_success done run govc pool.change -mem.limit 100 -mem.expandable=false $child_path assert_failure run govc pool.change -mem.limit 100 $child_path assert_success run govc pool.change -mem.limit 120 -mem.expandable $child_path assert_success # test with glob inventory path to pools parent_path="*/$parent_name" child_path="$parent_path/$child_name" grand_child_path="$child_path/$grand_child_name" for path in $grand_child_path $child_path do run govc pool.destroy $path assert_success done } @test "vm.create -pool host" { id=$(new_id) path=$(govc ls host) run govc vm.create -on=false -pool enoent $id assert_failure "govc: resource pool 'enoent' not found" run govc vm.create -on=false -pool $path $id assert_success } @test "vm.create -pool cluster" { vcsim_env id=$(new_id) path=$(dirname $GOVC_HOST) unset GOVC_HOST unset GOVC_RESOURCE_POOL run govc vm.create -on=false -pool enoent $id assert_failure "govc: resource pool 'enoent' not found" run govc vm.create -on=false -pool $path $id assert_success } govmomi-0.15.0/govc/test/role.bats000077500000000000000000000032611312205533500170070ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "permissions.ls" { run govc permissions.ls assert_success run govc permissions.ls -json assert_success } @test "role.ls" { run govc role.ls assert_success run govc role.ls -json assert_success run govc role.ls Admin assert_success run govc role.ls -json Admin assert_success run govc role.ls enoent assert_failure } @test "role.usage" { run govc role.usage assert_success run govc role.usage -json assert_success run govc role.usage Admin assert_success run govc role.usage -json Admin assert_success run govc role.usage enoent assert_failure } @test "role.create" { id=$(new_id) run govc role.create "$id" assert_success run govc role.ls "$id" assert_success priv=$(govc role.ls "$id" | wc -l) vm_priv=($(govc role.ls Admin | grep VirtualMachine.)) # Test set run govc role.update "$id" "${vm_priv[@]}" assert_success npriv=$(govc role.ls "$id" | wc -l) [ "$npriv" -gt "$priv" ] priv=$npriv op_priv=($(govc role.ls "$id" | grep VirtualMachine.GuestOperations.)) # Test remove run govc role.update -r "$id" "${op_priv[@]}" assert_success npriv=$(govc role.ls "$id" | wc -l) [ "$npriv" -lt "$priv" ] priv=$npriv # Test add run govc role.update -a "$id" "${op_priv[@]}" assert_success npriv=$(govc role.ls "$id" | wc -l) [ "$npriv" -gt "$priv" ] priv=$npriv # Test rename run govc role.update -name "${id}-N" "$id" assert_success id="${id}-N" # Test we didn't drop any privileges during rename [ "$priv" -eq "$(govc role.ls "$id" | wc -l)" ] run govc role.remove "${id}" assert_success run govc role.ls "$id" assert_failure } govmomi-0.15.0/govc/test/session.bats000077500000000000000000000015661312205533500175370ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "session.ls" { run govc session.ls assert_success run govc session.ls -json assert_success # Test User-Agent govc session.ls | grep "$(govc version | tr ' ' /)" } @test "session.rm" { run govc session.rm enoent assert_failure assert_output "govc: ServerFaultCode: The object or item referred to could not be found." # Can't remove the current session id=$(govc session.ls -json | jq -r .CurrentSession.Key) run govc session.rm "$id" assert_failure thumbprint=$(govc about.cert -thumbprint) # persist session just to avoid the Logout() so we can session.rm below dir=$(mktemp -d govc-test-XXXXX) id=$(GOVMOMI_HOME="$dir" govc session.ls -json -k=false -persist-session -tls-known-hosts <(echo "$thumbprint") | jq -r .CurrentSession.Key) rm -rf "$dir" run govc session.rm "$id" assert_success } govmomi-0.15.0/govc/test/test_helper.bash000066400000000000000000000132211312205533500203420ustar00rootroot00000000000000# set the following variables only if they've not been set GOVC_TEST_URL=${GOVC_TEST_URL-"https://root:vagrant@localhost:18443/sdk"} export GOVC_URL=$GOVC_TEST_URL export GOVC_DATASTORE=${GOVC_DATASTORE-datastore1} export GOVC_NETWORK=${GOVC_NETWORK-"VM Network"} export GOVC_INSECURE=true export GOVC_PERSIST_SESSION=false unset GOVC_DEBUG unset GOVC_TLS_KNOWN_HOSTS unset GOVC_DATACENTER unset GOVC_HOST unset GOVC_USERNAME unset GOVC_PASSWORD if [ -z "$BATS_TEST_DIRNAME" ]; then BATS_TEST_DIRNAME=$(dirname ${BASH_SOURCE}) fi # gnu core utils readlink=$(type -p greadlink readlink | head -1) xargs=$(type -p gxargs xargs | head -1) mktemp=$(type -p gmktemp mktemp | head -1) BATS_TEST_DIRNAME=$($readlink -nf $BATS_TEST_DIRNAME) GOVC_IMAGES=$BATS_TEST_DIRNAME/images TTYLINUX_NAME=ttylinux-pc_i486-16.1 GOVC_TEST_VMDK_SRC=$GOVC_IMAGES/${TTYLINUX_NAME}-disk1.vmdk GOVC_TEST_VMDK=govc-images/$(basename $GOVC_TEST_VMDK_SRC) GOVC_TEST_ISO_SRC=$GOVC_IMAGES/${TTYLINUX_NAME}.iso GOVC_TEST_ISO=govc-images/$(basename $GOVC_TEST_ISO_SRC) GOVC_TEST_IMG_SRC=$GOVC_IMAGES/floppybird.img GOVC_TEST_IMG=govc-images/$(basename $GOVC_TEST_IMG_SRC) PATH="$(dirname $BATS_TEST_DIRNAME):$PATH" teardown() { govc ls vm | grep govc-test- | $xargs -r govc vm.destroy govc datastore.ls | grep govc-test- | awk '{print ($NF)}' | $xargs -n1 -r govc datastore.rm govc ls "host/*/Resources/govc-test-*" | $xargs -r govc pool.destroy } new_id() { echo "govc-test-$(uuidgen)" } import_ttylinux_vmdk() { govc datastore.mkdir -p govc-images govc datastore.ls "$GOVC_TEST_VMDK" >/dev/null 2>&1 || \ govc import.vmdk "$GOVC_TEST_VMDK_SRC" govc-images > /dev/null } datastore_upload() { src=$1 dst=govc-images/$(basename $src) govc datastore.mkdir -p govc-images govc datastore.ls "$dst" >/dev/null 2>&1 || \ govc datastore.upload "$src" "$dst" > /dev/null } upload_img() { datastore_upload $GOVC_TEST_IMG_SRC } upload_iso() { datastore_upload $GOVC_TEST_ISO_SRC } new_ttylinux_vm() { import_ttylinux_vmdk # TODO: make this part of vagrant provision id=$(new_id) govc vm.create -m 32 -disk $GOVC_TEST_VMDK -disk.controller ide -on=false $id echo $id } new_empty_vm() { id=$(new_id) govc vm.create -on=false $id echo $id } vm_power_state() { govc vm.info "$1" | grep "Power state:" | awk -F: '{print $2}' | collapse_ws } vm_mac() { govc device.info -vm "$1" ethernet-0 | grep "MAC Address" | awk '{print $NF}' } # exports an environment for using vcsim if running, otherwise skips the calling test. vcsim_env() { if [ "$(uname)" == "Darwin" ]; then PATH="/Applications/VMware Fusion.app/Contents/Library:$PATH" fi if [ "$(vmrun list | grep $BATS_TEST_DIRNAME/vcsim | wc -l)" -eq 1 ]; then export GOVC_URL=https://root:vmware@localhost:16443/sdk \ GOVC_DATACENTER=DC0 \ GOVC_DATASTORE=GlobalDS_0 \ GOVC_HOST=/DC0/host/DC0_C0/DC0_C0_H0 \ GOVC_RESOURCE_POOL=/DC0/host/DC0_C0/Resources \ GOVC_NETWORK=/DC0/network/DC0_DVPG0 else skip "requires vcsim" fi } # remove username/password from $GOVC_URL and set $GOVC_{USERNAME,PASSWORD} govc_url_to_vars() { GOVC_USERNAME="$(govc env GOVC_USERNAME)" GOVC_PASSWORD="$(govc env GOVC_PASSWORD)" GOVC_URL="$(govc env GOVC_URL)" export GOVC_URL GOVC_USERNAME GOVC_PASSWORD # double check that we removed user/pass grep -q -v @ <<<"$GOVC_URL" } quit_vnc() { if [ "$(uname)" = "Darwin" ]; then osascript <&2 return 1 } assert_success() { if [ "$status" -ne 0 ]; then flunk "command failed with exit status $status: $output" elif [ "$#" -gt 0 ]; then assert_output "$1" fi } assert_failure() { if [ "$status" -ne 1 ]; then flunk $(printf "expected failed exit status=1, got status=%d" $status) elif [ "$#" -gt 0 ]; then assert_output "$1" fi } assert_equal() { if [ "$1" != "$2" ]; then { echo "expected: $1" echo "actual: $2" } | flunk fi } assert_output() { local expected if [ $# -eq 0 ]; then expected="$(cat -)" else expected="$1" fi assert_equal "$expected" "$output" } assert_matches() { local pattern="${1}" local actual="${2}" if [ $# -eq 1 ]; then actual="$(cat -)" fi if ! grep -q "${pattern}" <<<"${actual}"; then { echo "pattern: ${pattern}" echo "actual: ${actual}" } | flunk fi } assert_empty() { local actual="${1}" if [ $# -eq 0 ]; then actual="$(cat -)" fi if [ -n "${actual}" ]; then { echo "actual: ${actual}" } | flunk fi } assert_line() { if [ "$1" -ge 0 ] 2>/dev/null; then assert_equal "$2" "$(collapse_ws ${lines[$1]})" else local line for line in "${lines[@]}"; do if [ "$(collapse_ws $line)" = "$1" ]; then return 0; fi done flunk "expected line \`$1'" fi } refute_line() { if [ "$1" -ge 0 ] 2>/dev/null; then local num_lines="${#lines[@]}" if [ "$1" -lt "$num_lines" ]; then flunk "output has $num_lines lines" fi else local line for line in "${lines[@]}"; do if [ "$line" = "$1" ]; then flunk "expected to not find line \`$line'" fi done fi } assert() { if ! "$@"; then flunk "failed: $@" fi } govmomi-0.15.0/govc/test/vcsim/000077500000000000000000000000001312205533500163075ustar00rootroot00000000000000govmomi-0.15.0/govc/test/vcsim/Vagrantfile000066400000000000000000000012231312205533500204720ustar00rootroot00000000000000# -*- mode: ruby -*- # vi: set ft=ruby : # VCSA with VC simulator enabled. # 'vagrant provision' will erase any existing inventory and # populate with the config in ./provision.sh Vagrant.configure("2") do |config| config.vm.hostname = "vcsim" config.vm.box = "vcsa" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.provision "shell", path: "provision.sh" config.vm.network "forwarded_port", guest: 443, host: 16443 config.vm.network "forwarded_port", guest: 80, host: 16080 [:vmware_fusion, :vmware_workstation].each do |name| config.vm.provider name do |v,override| v.vmx["memsize"] = "4096" end end end govmomi-0.15.0/govc/test/vcsim/provision.sh000066400000000000000000000014501312205533500206730ustar00rootroot00000000000000PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin echo "Creating vcsim model..." cat > /etc/vmware-vpx/vcsim/model/initInventory-govc.cfg < 2 3 3 2 2 3 3 4 3 2 EOF cat > /etc/vmware-vpx/vcsim/model/vcsim-default.cfg < true vcsim/model/initInventory-govc.cfg EOF echo "Starting VC simulator..." vmware-vcsim-stop vmware-vcsim-start default govmomi-0.15.0/govc/test/vm.bats000077500000000000000000000316741312205533500165010ustar00rootroot00000000000000#!/usr/bin/env bats load test_helper @test "vm.ip" { id=$(new_ttylinux_vm) run govc vm.power -on $id assert_success run govc vm.ip $id assert_success run govc vm.ip -a -v4 $id assert_success run govc vm.ip -n $(vm_mac $id) $id assert_success run govc vm.ip -n ethernet-0 $id assert_success ip=$(govc vm.ip $id) # add a second nic run govc vm.network.add -vm $id "VM Network" assert_success res=$(govc vm.ip -n ethernet-0 $id) assert_equal $ip $res } @test "vm.ip -esxcli" { ok=$(govc host.esxcli system settings advanced list -o /Net/GuestIPHack | grep ^IntValue: | awk '{print $2}') if [ "$ok" != "1" ] ; then skip "/Net/GuestIPHack=0" fi id=$(new_ttylinux_vm) run govc vm.power -on $id assert_success run govc vm.ip -esxcli $id assert_success ip_esxcli=$output run govc vm.ip $id assert_success ip_tools=$output assert_equal $ip_esxcli $ip_tools } @test "vm.create" { id=$(new_ttylinux_vm) run govc vm.power -on $id assert_success result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 0 ] result=$(govc device.ls -vm $vm | grep cdrom- | wc -l) [ $result -eq 0 ] } @test "vm.change" { id=$(new_ttylinux_vm) run govc vm.change -g ubuntu64Guest -m 1024 -c 2 -vm $id assert_success run govc vm.info $id assert_success assert_line "Guest name: Ubuntu Linux (64-bit)" assert_line "Memory: 1024MB" assert_line "CPU: 2 vCPU(s)" run govc vm.change -e "guestinfo.a=1" -e "guestinfo.b=2" -vm $id assert_success run govc vm.info -e $id assert_success assert_line "guestinfo.a: 1" assert_line "guestinfo.b: 2" run govc vm.change -sync-time-with-host=false -vm $id assert_success run govc vm.info -t $id assert_success assert_line "SyncTimeWithHost: false" run govc vm.change -sync-time-with-host=true -vm $id assert_success run govc vm.info -t $id assert_success assert_line "SyncTimeWithHost: true" nid=$(new_id) run govc vm.change -name $nid -vm $id assert_success run govc vm.info $id [ ${#lines[@]} -eq 0 ] run govc vm.info $nid [ ${#lines[@]} -gt 0 ] } @test "vm.power" { vm=$(new_ttylinux_vm) run vm_power_state $vm assert_success "poweredOff" run govc vm.power $vm assert_failure run govc vm.power -on -off $vm assert_failure run govc vm.power -on $vm assert_success run vm_power_state $vm assert_success "poweredOn" run govc vm.power -suspend $vm assert_success run vm_power_state $vm assert_success "suspended" run govc vm.power -on $vm assert_success run vm_power_state $vm assert_success "poweredOn" } @test "vm.power -force" { vm=$(new_id) govc vm.create $vm run govc vm.power -r $vm assert_failure run govc vm.power -r -force $vm assert_success run govc vm.power -s $vm assert_failure run govc vm.power -s -force $vm assert_success run govc vm.power -off $vm assert_failure run govc vm.power -off -force $vm assert_success run govc vm.destroy $vm assert_success run govc vm.power -off $vm assert_failure run govc vm.power -off -force $vm assert_failure } @test "vm.create pvscsi" { vm=$(new_id) govc vm.create -on=false -disk.controller pvscsi $vm result=$(govc device.ls -vm $vm | grep pvscsi- | wc -l) [ $result -eq 1 ] result=$(govc device.ls -vm $vm | grep lsilogic- | wc -l) [ $result -eq 0 ] vm=$(new_id) govc vm.create -on=false -disk.controller pvscsi -disk=1GB $vm } @test "vm.create in cluster" { vcsim_env # using GOVC_HOST and its resource pool run govc vm.create -on=false $(new_id) assert_success # using no -host and the default resource pool for DC0 unset GOVC_HOST run govc vm.create -on=false $(new_id) assert_success } @test "vm.info" { local num=3 local prefix=$(new_id) for x in $(seq $num) do local id="${prefix}-${x}" # If VM is not found: No output, exit code==0 run govc vm.info $id assert_success [ ${#lines[@]} -eq 0 ] # If VM is not found (using -json flag): Valid json output, exit code==0 run govc vm.info -json $id assert_success assert_line "{\"VirtualMachines\":null}" run govc vm.create -on=false $id assert_success local info=$(govc vm.info -r $id) local found=$(grep Name: <<<"$info" | wc -l) [ "$found" -eq 1 ] # test that mo names are printed found=$(grep Host: <<<"$info" | awk '{print $2}') [ -n "$found" ] found=$(grep Storage: <<<"$info" | awk '{print $2}') [ -n "$found" ] found=$(grep Network: <<<"$info" | awk '{print $2}') [ -n "$found" ] done # test find slice local slice=$(govc vm.info ${prefix}-*) local found=$(grep Name: <<<"$slice" | wc -l) [ "$found" -eq $num ] # test -r found=$(grep Storage: <<<"$slice" | wc -l) [ "$found" -eq 0 ] found=$(grep Network: <<<"$slice" | wc -l) [ "$found" -eq 0 ] slice=$(govc vm.info -r ${prefix}-*) found=$(grep Storage: <<<"$slice" | wc -l) [ "$found" -eq $num ] found=$(grep Network: <<<"$slice" | wc -l) [ "$found" -eq $num ] # test extraConfig run govc vm.change -e "guestinfo.a=2" -vm $id assert_success run govc vm.info -e $id assert_success assert_line "guestinfo.a: 2" run govc vm.change -e "guestinfo.a=" -vm $id assert_success refute_line "guestinfo.a: 2" } @test "vm.create linked ide disk" { import_ttylinux_vmdk vm=$(new_id) run govc vm.create -disk $GOVC_TEST_VMDK -disk.controller ide -on=false $vm assert_success run govc device.info -vm $vm disk-200-0 assert_success assert_line "Controller: ide-200" } @test "vm.create linked scsi disk" { import_ttylinux_vmdk vm=$(new_id) run govc vm.create -disk enoent -on=false $vm assert_failure "govc: cannot stat '[${GOVC_DATASTORE##*/}] enoent': No such file" run govc vm.create -disk $GOVC_TEST_VMDK -on=false $vm assert_success run govc device.info -vm $vm disk-1000-0 assert_success assert_line "Controller: lsilogic-1000" assert_line "Parent: [${GOVC_DATASTORE##*/}] $GOVC_TEST_VMDK" assert_line "File: [${GOVC_DATASTORE##*/}] $vm/${vm}.vmdk" } @test "vm.create scsi disk" { import_ttylinux_vmdk vm=$(new_id) run govc vm.create -disk enoent -on=false $vm assert_failure "govc: cannot stat '[${GOVC_DATASTORE##*/}] enoent': No such file" run govc vm.create -disk $GOVC_TEST_VMDK -on=false -link=false $vm assert_success run govc device.info -vm $vm disk-1000-0 assert_success assert_line "Controller: lsilogic-1000" refute_line "Parent: [${GOVC_DATASTORE##*/}] $GOVC_TEST_VMDK" assert_line "File: [${GOVC_DATASTORE##*/}] $GOVC_TEST_VMDK" } @test "vm.create scsi disk with datastore argument" { import_ttylinux_vmdk vm=$(new_id) run govc vm.create -disk="${GOVC_TEST_VMDK}" -disk-datastore="${GOVC_DATASTORE}" -on=false -link=false $vm assert_success run govc device.info -vm $vm disk-1000-0 assert_success assert_line "File: [${GOVC_DATASTORE##*/}] $GOVC_TEST_VMDK" } @test "vm.create iso" { upload_iso vm=$(new_id) run govc vm.create -iso enoent -on=false $vm assert_failure "govc: cannot stat '[${GOVC_DATASTORE##*/}] enoent': No such file" run govc vm.create -iso $GOVC_TEST_ISO -on=false $vm assert_success run govc device.info -vm $vm cdrom-3000 assert_success assert_line "Controller: ide-200" assert_line "Summary: ISO [${GOVC_DATASTORE##*/}] $GOVC_TEST_ISO" } @test "vm.create iso with datastore argument" { upload_iso vm=$(new_id) run govc vm.create -iso="${GOVC_TEST_ISO}" -iso-datastore="${GOVC_DATASTORE}" -on=false $vm assert_success run govc device.info -vm $vm cdrom-3000 assert_success assert_line "Summary: ISO [${GOVC_DATASTORE##*/}] $GOVC_TEST_ISO" } @test "vm.disk.create empty vm" { vm=$(new_empty_vm) local name=$(new_id) run govc vm.disk.create -vm $vm -name $name -size 1G assert_success result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 1 ] name=$(new_id) run govc vm.disk.create -vm $vm -name $name -controller lsilogic-1000 -size 2G assert_success result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 2 ] } @test "vm.disk.create" { import_ttylinux_vmdk vm=$(new_id) govc vm.create -disk $GOVC_TEST_VMDK -on=false $vm result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 1 ] local name=$(new_id) run govc vm.disk.create -vm $vm -name $name -size 1G assert_success result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 2 ] run govc vm.disk.create -vm $vm -name $name -size 1G assert_success # TODO: should fail? result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 2 ] } @test "vm.disk.attach" { import_ttylinux_vmdk vm=$(new_id) govc vm.create -disk $GOVC_TEST_VMDK -on=false $vm result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 1 ] run govc import.vmdk $GOVC_TEST_VMDK_SRC $vm assert_success run govc vm.disk.attach -vm $vm -link=false -disk enoent.vmdk assert_failure "govc: File [${GOVC_DATASTORE##*/}] enoent.vmdk was not found" run govc vm.disk.attach -vm $vm -disk enoent.vmdk assert_failure "govc: Invalid configuration for device '0'." run govc vm.disk.attach -vm $vm -disk $vm/$(basename $GOVC_TEST_VMDK) -controller lsilogic-1000 assert_success result=$(govc device.ls -vm $vm | grep disk- | wc -l) [ $result -eq 2 ] } @test "vm.create new disk with datastore argument" { vm=$(new_id) run govc vm.create -disk="1GiB" -ds="${GOVC_DATASTORE}" -on=false -link=false $vm assert_success run govc device.info -vm $vm disk-1000-0 assert_success assert_line "File: [${GOVC_DATASTORE##*/}] ${vm}/${vm}.vmdk" } @test "vm.create new disk with datastore cluster argument" { if [ -z "${GOVC_DATASTORE_CLUSTER}" ]; then skip "requires datastore cluster" fi vm=$(new_id) run govc vm.create -disk="1GiB" -datastore-cluster="${GOVC_DATASTORE_CLUSTER}" -on=false -link=false $vm assert_success run govc device.info -vm $vm disk-1000-0 assert_success } @test "vm.register" { run govc vm.unregister enoent assert_failure vm=$(new_empty_vm) run govc vm.change -vm "$vm" -e foo=bar assert_success run govc vm.unregister "$vm" assert_success run govc vm.change -vm "$vm" -e foo=bar assert_failure run govc vm.register "$vm/${vm}.vmx" assert_success run govc vm.change -vm "$vm" -e foo=bar assert_success } @test "vm.clone" { vcsim_env vm=$(new_empty_vm) clone=$(new_id) run govc vm.clone -vm $vm $clone assert_success result=$(govc device.ls -vm $clone | grep disk- | wc -l) [ $result -eq 0 ] result=$(govc device.ls -vm $clone | grep cdrom- | wc -l) [ $result -eq 0 ] } @test "vm.clone change resources" { vcsim_env vm=$(new_ttylinux_vm) clone=$(new_id) run govc vm.clone -m 1024 -c 2 -vm $vm $clone assert_success run govc vm.info $clone assert_success assert_line "Memory: 1024MB" assert_line "CPU: 2 vCPU(s)" } @test "vm.clone usage" { # validate we require -vm flag run govc vm.clone enoent assert_failure } @test "vm.migrate" { vcsim_env vm=$(new_empty_vm) # migrate from H0 to H1 run govc vm.migrate -host DC0_C0/DC0_C0_H1 "$vm" assert_success # migrate from C0 to C1 run govc vm.migrate -pool DC0_C1/Resources "$vm" assert_success } @test "vm.snapshot" { vm=$(new_ttylinux_vm) id=$(new_id) # No snapshots == no output run govc snapshot.tree -vm "$vm" assert_success "" run govc snapshot.remove -vm "$vm" '*' assert_success run govc snapshot.revert -vm "$vm" assert_failure run govc snapshot.create -vm "$vm" "$id" assert_success run govc snapshot.revert -vm "$vm" enoent assert_failure run govc snapshot.revert -vm "$vm" assert_success run govc snapshot.remove -vm "$vm" "$id" assert_success run govc snapshot.create -vm "$vm" root assert_success run govc snapshot.create -vm "$vm" child assert_success run govc snapshot.create -vm "$vm" grand assert_success run govc snapshot.create -vm "$vm" child assert_success result=$(govc snapshot.tree -vm "$vm" -f | grep -c root/child/grand/child) [ "$result" -eq 1 ] run govc snapshot.revert -vm "$vm" root assert_success run govc snapshot.create -vm "$vm" child assert_success # 3 snapshots named "child" result=$(govc snapshot.tree -vm "$vm" | grep -c child) [ "$result" -eq 3 ] run govc snapshot.remove -vm "$vm" child assert_failure # 2 snapshots with path "root/child" result=$(govc snapshot.tree -vm "$vm" -f | egrep -c 'root/child$') [ "$result" -eq 2 ] run govc snapshot.remove -vm "$vm" root/child assert_failure # path is unique run govc snapshot.remove -vm "$vm" root/child/grand/child assert_success # name is unique run govc snapshot.remove -vm "$vm" grand assert_success result=$(govc snapshot.tree -vm "$vm" -f | grep root/child/grand/child | wc -l) [ "$result" -eq 0 ] id=$(govc snapshot.tree -vm "$vm" -f -i | egrep 'root/child$' | head -n1 | awk '{print $1}' | tr -d '[]') # moid is unique run govc snapshot.remove -vm "$vm" "$id" assert_success # now root/child is unique run govc snapshot.remove -vm "$vm" root/child assert_success } govmomi-0.15.0/govc/usage.sh000077500000000000000000000036001312205533500156510ustar00rootroot00000000000000#!/bin/bash -e for var in $(env | grep GOVC_) ; do eval "unset ${var/=*}" done common_opts=$(cat <= this value") } func (cmd *version) Run(ctx context.Context, f *flag.FlagSet) error { if cmd.require != "" { v, err := flags.ParseVersion(flags.Version) if err != nil { panic(err) } rv, err := flags.ParseVersion(cmd.require) if err != nil { return fmt.Errorf("failed to parse required version '%s': %s", cmd.require, err) } if !rv.Lte(v) { return fmt.Errorf("version %s or higher is required, this is version %s", cmd.require, flags.Version) } } fmt.Printf("govc %s\n", flags.Version) return nil } govmomi-0.15.0/govc/vm/000077500000000000000000000000001312205533500146315ustar00rootroot00000000000000govmomi-0.15.0/govc/vm/change.go000066400000000000000000000056011312205533500164070ustar00rootroot00000000000000/* Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type extraConfig []types.BaseOptionValue func (e *extraConfig) String() string { return fmt.Sprintf("%v", *e) } func (e *extraConfig) Set(v string) error { r := strings.SplitN(v, "=", 2) if len(r) < 2 { return fmt.Errorf("failed to parse extraConfig: %s", v) } *e = append(*e, &types.OptionValue{Key: r[0], Value: r[1]}) return nil } type change struct { *flags.VirtualMachineFlag types.VirtualMachineConfigSpec extraConfig extraConfig } func init() { cli.Register("vm.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.Int64Var(&cmd.MemoryMB, "m", 0, "Size in MB of memory") f.Var(flags.NewInt32(&cmd.NumCPUs), "c", "Number of CPUs") f.StringVar(&cmd.GuestId, "g", "", "Guest OS") f.StringVar(&cmd.Name, "name", "", "Display name") f.Var(&cmd.extraConfig, "e", "ExtraConfig. =") f.Var(flags.NewOptionalBool(&cmd.NestedHVEnabled), "nested-hv-enabled", "Enable nested hardware-assisted virtualization") cmd.Tools = &types.ToolsConfigInfo{} f.Var(flags.NewOptionalBool(&cmd.Tools.SyncTimeWithHost), "sync-time-with-host", "Enable SyncTimeWithHost") } func (cmd *change) Description() string { return `Change VM configuration. To add ExtraConfig variables that can read within the guest, use the 'guestinfo.' prefix. Examples: govc vm.change -vm $vm -e smc.present=TRUE -e ich7m.present=TRUE govc vm.change -vm $vm -e guestinfo.vmname $vm # Read the variable set above inside the guest: vmware-rpctool "info-get guestinfo.vmname"` } func (cmd *change) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } if len(cmd.extraConfig) > 0 { cmd.VirtualMachineConfigSpec.ExtraConfig = cmd.extraConfig } task, err := vm.Reconfigure(ctx, cmd.VirtualMachineConfigSpec) if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/vm/clone.go000066400000000000000000000242261312205533500162660ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type clone struct { *flags.ClientFlag *flags.DatacenterFlag *flags.DatastoreFlag *flags.StoragePodFlag *flags.ResourcePoolFlag *flags.HostSystemFlag *flags.NetworkFlag *flags.FolderFlag *flags.VirtualMachineFlag name string memory int cpus int on bool force bool template bool customization string waitForIP bool annotation string Client *vim25.Client Datacenter *object.Datacenter Datastore *object.Datastore StoragePod *object.StoragePod ResourcePool *object.ResourcePool HostSystem *object.HostSystem Folder *object.Folder VirtualMachine *object.VirtualMachine } func init() { cli.Register("vm.clone", &clone{}) } func (cmd *clone) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.StoragePodFlag, ctx = flags.NewStoragePodFlag(ctx) cmd.StoragePodFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.IntVar(&cmd.memory, "m", 0, "Size in MB of memory") f.IntVar(&cmd.cpus, "c", 0, "Number of CPUs") f.BoolVar(&cmd.on, "on", true, "Power on VM") f.BoolVar(&cmd.force, "force", false, "Create VM if vmx already exists") f.BoolVar(&cmd.template, "template", false, "Create a Template") f.StringVar(&cmd.customization, "customization", "", "Customization Specification Name") f.BoolVar(&cmd.waitForIP, "waitip", false, "Wait for VM to acquire IP address") f.StringVar(&cmd.annotation, "annotation", "", "VM description") } func (cmd *clone) Usage() string { return "NAME" } func (cmd *clone) Description() string { return `Clone VM to NAME. Examples: govc vm.clone -vm template-vm new-vm` } func (cmd *clone) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.StoragePodFlag.Process(ctx); err != nil { return err } if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.NetworkFlag.Process(ctx); err != nil { return err } if err := cmd.FolderFlag.Process(ctx); err != nil { return err } if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *clone) Run(ctx context.Context, f *flag.FlagSet) error { var err error if len(f.Args()) != 1 { return flag.ErrHelp } cmd.name = f.Arg(0) if cmd.name == "" { return flag.ErrHelp } cmd.Client, err = cmd.ClientFlag.Client() if err != nil { return err } cmd.Datacenter, err = cmd.DatacenterFlag.Datacenter() if err != nil { return err } if cmd.StoragePodFlag.Isset() { cmd.StoragePod, err = cmd.StoragePodFlag.StoragePod() if err != nil { return err } } else { cmd.Datastore, err = cmd.DatastoreFlag.Datastore() if err != nil { return err } } cmd.HostSystem, err = cmd.HostSystemFlag.HostSystemIfSpecified() if err != nil { return err } if cmd.HostSystem != nil { if cmd.ResourcePool, err = cmd.HostSystem.ResourcePool(ctx); err != nil { return err } } else { // -host is optional if cmd.ResourcePool, err = cmd.ResourcePoolFlag.ResourcePool(); err != nil { return err } } if cmd.Folder, err = cmd.FolderFlag.Folder(); err != nil { return err } if cmd.VirtualMachine, err = cmd.VirtualMachineFlag.VirtualMachine(); err != nil { return err } if cmd.VirtualMachine == nil { return flag.ErrHelp } task, err := cmd.cloneVM(ctx) if err != nil { return err } info, err := task.WaitForResult(ctx, nil) if err != nil { return err } vm := object.NewVirtualMachine(cmd.Client, info.Result.(types.ManagedObjectReference)) if cmd.cpus > 0 || cmd.memory > 0 { vmConfigSpec := types.VirtualMachineConfigSpec{} if cmd.cpus > 0 { vmConfigSpec.NumCPUs = int32(cmd.cpus) } if cmd.memory > 0 { vmConfigSpec.MemoryMB = int64(cmd.memory) } vmConfigSpec.Annotation = cmd.annotation task, err := vm.Reconfigure(ctx, vmConfigSpec) if err != nil { return err } _, err = task.WaitForResult(ctx, nil) if err != nil { return err } } if cmd.on { task, err := vm.PowerOn(ctx) if err != nil { return err } _, err = task.WaitForResult(ctx, nil) if err != nil { return err } if cmd.waitForIP { _, err = vm.WaitForIP(ctx) if err != nil { return err } } } return nil } func (cmd *clone) cloneVM(ctx context.Context) (*object.Task, error) { // search for the first network card of the source devices, err := cmd.VirtualMachine.Device(ctx) if err != nil { return nil, err } var card *types.VirtualEthernetCard for _, device := range devices { if c, ok := device.(types.BaseVirtualEthernetCard); ok { card = c.GetVirtualEthernetCard() break } } if card == nil { return nil, fmt.Errorf("No network device found.") } // get the new backing information dev, err := cmd.NetworkFlag.Device() if err != nil { return nil, err } //set backing info card.Backing = dev.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard().Backing // prepare virtual device config spec for network card configSpecs := []types.BaseVirtualDeviceConfigSpec{ &types.VirtualDeviceConfigSpec{ Operation: types.VirtualDeviceConfigSpecOperationEdit, Device: card, }, } folderref := cmd.Folder.Reference() poolref := cmd.ResourcePool.Reference() relocateSpec := types.VirtualMachineRelocateSpec{ DeviceChange: configSpecs, Folder: &folderref, Pool: &poolref, } if cmd.HostSystem != nil { hostref := cmd.HostSystem.Reference() relocateSpec.Host = &hostref } cloneSpec := &types.VirtualMachineCloneSpec{ Location: relocateSpec, PowerOn: false, Template: cmd.template, } // clone to storage pod datastoreref := types.ManagedObjectReference{} if cmd.StoragePod != nil && cmd.Datastore == nil { storagePod := cmd.StoragePod.Reference() // Build pod selection spec from config spec podSelectionSpec := types.StorageDrsPodSelectionSpec{ StoragePod: &storagePod, } // Get the virtual machine reference vmref := cmd.VirtualMachine.Reference() // Build the placement spec storagePlacementSpec := types.StoragePlacementSpec{ Folder: &folderref, Vm: &vmref, CloneName: cmd.name, CloneSpec: cloneSpec, PodSelectionSpec: podSelectionSpec, Type: string(types.StoragePlacementSpecPlacementTypeClone), } // Get the storage placement result storageResourceManager := object.NewStorageResourceManager(cmd.Client) result, err := storageResourceManager.RecommendDatastores(ctx, storagePlacementSpec) if err != nil { return nil, err } // Get the recommendations recommendations := result.Recommendations if len(recommendations) == 0 { return nil, fmt.Errorf("no recommendations") } // Get the first recommendation datastoreref = recommendations[0].Action[0].(*types.StoragePlacementAction).Destination } else if cmd.StoragePod == nil && cmd.Datastore != nil { datastoreref = cmd.Datastore.Reference() } else { return nil, fmt.Errorf("Please provide either a datastore or a storagepod") } // Set the destination datastore cloneSpec.Location.Datastore = &datastoreref // Check if vmx already exists if !cmd.force { vmxPath := fmt.Sprintf("%s/%s.vmx", cmd.name, cmd.name) var mds mo.Datastore err = property.DefaultCollector(cmd.Client).RetrieveOne(ctx, datastoreref, []string{"name"}, &mds) if err != nil { return nil, err } datastore := object.NewDatastore(cmd.Client, datastoreref) datastore.InventoryPath = mds.Name _, err := datastore.Stat(ctx, vmxPath) if err == nil { dsPath := cmd.Datastore.Path(vmxPath) return nil, fmt.Errorf("File %s already exists", dsPath) } } // check if customization specification requested if len(cmd.customization) > 0 { // get the customization spec manager customizationSpecManager := object.NewCustomizationSpecManager(cmd.Client) // check if customization specification exists exists, err := customizationSpecManager.DoesCustomizationSpecExist(ctx, cmd.customization) if err != nil { return nil, err } if exists == false { return nil, fmt.Errorf("Customization specification %s does not exists.", cmd.customization) } // get the customization specification customSpecItem, err := customizationSpecManager.GetCustomizationSpec(ctx, cmd.customization) if err != nil { return nil, err } customSpec := customSpecItem.Spec // set the customization cloneSpec.Customization = &customSpec } // clone virtualmachine return cmd.VirtualMachine.Clone(ctx, cmd.Folder, cmd.name, *cloneSpec) } govmomi-0.15.0/govc/vm/create.go000066400000000000000000000300751312205533500164300ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.ClientFlag *flags.DatacenterFlag *flags.DatastoreFlag *flags.StoragePodFlag *flags.ResourcePoolFlag *flags.HostSystemFlag *flags.NetworkFlag *flags.FolderFlag name string memory int cpus int guestID string link bool on bool force bool controller string annotation string iso string isoDatastoreFlag *flags.DatastoreFlag isoDatastore *object.Datastore disk string diskDatastoreFlag *flags.DatastoreFlag diskDatastore *object.Datastore // Only set if the disk argument is a byte size, which means the disk // doesn't exist yet and should be created diskByteSize int64 Client *vim25.Client Datacenter *object.Datacenter Datastore *object.Datastore StoragePod *object.StoragePod ResourcePool *object.ResourcePool HostSystem *object.HostSystem Folder *object.Folder } func init() { cli.Register("vm.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.StoragePodFlag, ctx = flags.NewStoragePodFlag(ctx) cmd.StoragePodFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) f.IntVar(&cmd.memory, "m", 1024, "Size in MB of memory") f.IntVar(&cmd.cpus, "c", 1, "Number of CPUs") f.StringVar(&cmd.guestID, "g", "otherGuest", "Guest OS") f.BoolVar(&cmd.link, "link", true, "Link specified disk") f.BoolVar(&cmd.on, "on", true, "Power on VM. Default is true if -disk argument is given.") f.BoolVar(&cmd.force, "force", false, "Create VM if vmx already exists") f.StringVar(&cmd.controller, "disk.controller", "scsi", "Disk controller type") f.StringVar(&cmd.annotation, "annotation", "", "VM description") f.StringVar(&cmd.iso, "iso", "", "ISO path") cmd.isoDatastoreFlag, ctx = flags.NewCustomDatastoreFlag(ctx) f.StringVar(&cmd.isoDatastoreFlag.Name, "iso-datastore", "", "Datastore for ISO file") f.StringVar(&cmd.disk, "disk", "", "Disk path (to use existing) OR size (to create new, e.g. 20GB)") cmd.diskDatastoreFlag, _ = flags.NewCustomDatastoreFlag(ctx) f.StringVar(&cmd.diskDatastoreFlag.Name, "disk-datastore", "", "Datastore for disk file") } func (cmd *create) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.StoragePodFlag.Process(ctx); err != nil { return err } if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.NetworkFlag.Process(ctx); err != nil { return err } if err := cmd.FolderFlag.Process(ctx); err != nil { return err } // Default iso/disk datastores to the VM's datastore if cmd.isoDatastoreFlag.Name == "" { cmd.isoDatastoreFlag = cmd.DatastoreFlag } if cmd.diskDatastoreFlag.Name == "" { cmd.diskDatastoreFlag = cmd.DatastoreFlag } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { var err error if len(f.Args()) != 1 { return flag.ErrHelp } cmd.name = f.Arg(0) if cmd.name == "" { return flag.ErrHelp } cmd.Client, err = cmd.ClientFlag.Client() if err != nil { return err } cmd.Datacenter, err = cmd.DatacenterFlag.Datacenter() if err != nil { return err } if cmd.StoragePodFlag.Isset() { cmd.StoragePod, err = cmd.StoragePodFlag.StoragePod() if err != nil { return err } } else { cmd.Datastore, err = cmd.DatastoreFlag.Datastore() if err != nil { return err } } cmd.HostSystem, err = cmd.HostSystemFlag.HostSystemIfSpecified() if err != nil { return err } if cmd.HostSystem != nil { if cmd.ResourcePool, err = cmd.HostSystem.ResourcePool(ctx); err != nil { return err } } else { // -host is optional if cmd.ResourcePool, err = cmd.ResourcePoolFlag.ResourcePool(); err != nil { return err } } if cmd.Folder, err = cmd.FolderFlag.Folder(); err != nil { return err } // Verify ISO exists if cmd.iso != "" { _, err = cmd.isoDatastoreFlag.Stat(ctx, cmd.iso) if err != nil { return err } cmd.isoDatastore, err = cmd.isoDatastoreFlag.Datastore() if err != nil { return err } } // Verify disk exists if cmd.disk != "" { var b units.ByteSize // If disk can be parsed as byte units, don't stat err = b.Set(cmd.disk) if err == nil { cmd.diskByteSize = int64(b) } else { _, err = cmd.diskDatastoreFlag.Stat(ctx, cmd.disk) if err != nil { return err } cmd.diskDatastore, err = cmd.diskDatastoreFlag.Datastore() if err != nil { return err } } } task, err := cmd.createVM(ctx) if err != nil { return err } info, err := task.WaitForResult(ctx, nil) if err != nil { return err } vm := object.NewVirtualMachine(cmd.Client, info.Result.(types.ManagedObjectReference)) if cmd.on { task, err := vm.PowerOn(ctx) if err != nil { return err } _, err = task.WaitForResult(ctx, nil) if err != nil { return err } } return nil } func (cmd *create) createVM(ctx context.Context) (*object.Task, error) { var devices object.VirtualDeviceList var err error spec := &types.VirtualMachineConfigSpec{ Name: cmd.name, GuestId: cmd.guestID, NumCPUs: int32(cmd.cpus), MemoryMB: int64(cmd.memory), Annotation: cmd.annotation, } devices, err = cmd.addStorage(nil) if err != nil { return nil, err } devices, err = cmd.addNetwork(devices) if err != nil { return nil, err } deviceChange, err := devices.ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd) if err != nil { return nil, err } spec.DeviceChange = deviceChange var datastore *object.Datastore // If storage pod is specified, collect placement recommendations if cmd.StoragePod != nil { datastore, err = cmd.recommendDatastore(ctx, spec) if err != nil { return nil, err } } else { datastore = cmd.Datastore } if !cmd.force { vmxPath := fmt.Sprintf("%s/%s.vmx", cmd.name, cmd.name) _, err := datastore.Stat(ctx, vmxPath) if err == nil { dsPath := cmd.Datastore.Path(vmxPath) return nil, fmt.Errorf("File %s already exists", dsPath) } } folder := cmd.Folder spec.Files = &types.VirtualMachineFileInfo{ VmPathName: fmt.Sprintf("[%s]", datastore.Name()), } return folder.CreateVM(ctx, *spec, cmd.ResourcePool, cmd.HostSystem) } func (cmd *create) addStorage(devices object.VirtualDeviceList) (object.VirtualDeviceList, error) { if cmd.controller != "ide" { if cmd.controller == "nvme" { nvme, err := devices.CreateNVMEController() if err != nil { return nil, err } devices = append(devices, nvme) cmd.controller = devices.Name(nvme) } else { scsi, err := devices.CreateSCSIController(cmd.controller) if err != nil { return nil, err } devices = append(devices, scsi) cmd.controller = devices.Name(scsi) } } // If controller is specified to be IDE or if an ISO is specified, add IDE controller. if cmd.controller == "ide" || cmd.iso != "" { ide, err := devices.CreateIDEController() if err != nil { return nil, err } devices = append(devices, ide) } if cmd.diskByteSize != 0 { controller, err := devices.FindDiskController(cmd.controller) if err != nil { return nil, err } disk := &types.VirtualDisk{ VirtualDevice: types.VirtualDevice{ Key: devices.NewKey(), Backing: &types.VirtualDiskFlatVer2BackingInfo{ DiskMode: string(types.VirtualDiskModePersistent), ThinProvisioned: types.NewBool(true), }, }, CapacityInKB: cmd.diskByteSize / 1024, } devices.AssignController(disk, controller) devices = append(devices, disk) } else if cmd.disk != "" { controller, err := devices.FindDiskController(cmd.controller) if err != nil { return nil, err } ds := cmd.diskDatastore.Reference() path := cmd.diskDatastore.Path(cmd.disk) disk := devices.CreateDisk(controller, ds, path) if cmd.link { disk = devices.ChildDisk(disk) } devices = append(devices, disk) } if cmd.iso != "" { ide, err := devices.FindIDEController("") if err != nil { return nil, err } cdrom, err := devices.CreateCdrom(ide) if err != nil { return nil, err } cdrom = devices.InsertIso(cdrom, cmd.isoDatastore.Path(cmd.iso)) devices = append(devices, cdrom) } return devices, nil } func (cmd *create) addNetwork(devices object.VirtualDeviceList) (object.VirtualDeviceList, error) { netdev, err := cmd.NetworkFlag.Device() if err != nil { return nil, err } devices = append(devices, netdev) return devices, nil } func (cmd *create) recommendDatastore(ctx context.Context, spec *types.VirtualMachineConfigSpec) (*object.Datastore, error) { sp := cmd.StoragePod.Reference() // Build pod selection spec from config spec podSelectionSpec := types.StorageDrsPodSelectionSpec{ StoragePod: &sp, } // Keep list of disks that need to be placed var disks []*types.VirtualDisk // Collect disks eligible for placement for _, deviceConfigSpec := range spec.DeviceChange { s := deviceConfigSpec.GetVirtualDeviceConfigSpec() if s.Operation != types.VirtualDeviceConfigSpecOperationAdd { continue } if s.FileOperation != types.VirtualDeviceConfigSpecFileOperationCreate { continue } d, ok := s.Device.(*types.VirtualDisk) if !ok { continue } podConfigForPlacement := types.VmPodConfigForPlacement{ StoragePod: sp, Disk: []types.PodDiskLocator{ { DiskId: d.Key, DiskBackingInfo: d.Backing, }, }, } podSelectionSpec.InitialVmConfig = append(podSelectionSpec.InitialVmConfig, podConfigForPlacement) disks = append(disks, d) } sps := types.StoragePlacementSpec{ Type: string(types.StoragePlacementSpecPlacementTypeCreate), ResourcePool: types.NewReference(cmd.ResourcePool.Reference()), PodSelectionSpec: podSelectionSpec, ConfigSpec: spec, } srm := object.NewStorageResourceManager(cmd.Client) result, err := srm.RecommendDatastores(ctx, sps) if err != nil { return nil, err } // Use result to pin disks to recommended datastores recs := result.Recommendations if len(recs) == 0 { return nil, fmt.Errorf("no recommendations") } ds := recs[0].Action[0].(*types.StoragePlacementAction).Destination var mds mo.Datastore err = property.DefaultCollector(cmd.Client).RetrieveOne(ctx, ds, []string{"name"}, &mds) if err != nil { return nil, err } datastore := object.NewDatastore(cmd.Client, ds) datastore.InventoryPath = mds.Name // Apply recommendation to eligible disks for _, disk := range disks { backing := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) backing.Datastore = &ds } return datastore, nil } govmomi-0.15.0/govc/vm/destroy.go000066400000000000000000000034611312205533500166550ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type destroy struct { *flags.ClientFlag *flags.SearchFlag } func init() { cli.Register("vm.destroy", &destroy{}) } func (cmd *destroy) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) } func (cmd *destroy) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.SearchFlag.Process(ctx); err != nil { return err } return nil } func (cmd *destroy) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } for _, vm := range vms { task, err := vm.PowerOff(ctx) if err != nil { return err } // Ignore error since the VM may already been in powered off state. // vm.Destroy will fail if the VM is still powered on. _ = task.Wait(ctx) task, err = vm.Destroy(ctx) if err != nil { return err } err = task.Wait(ctx) if err != nil { return err } } return nil } govmomi-0.15.0/govc/vm/disk/000077500000000000000000000000001312205533500155635ustar00rootroot00000000000000govmomi-0.15.0/govc/vm/disk/attach.go000066400000000000000000000052151312205533500173610ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package disk import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type attach struct { *flags.DatastoreFlag *flags.VirtualMachineFlag persist bool link bool disk string controller string } func init() { cli.Register("vm.disk.attach", &attach{}) } func (cmd *attach) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.persist, "persist", true, "Persist attached disk") f.BoolVar(&cmd.link, "link", true, "Link specified disk") f.StringVar(&cmd.controller, "controller", "", "Disk controller") f.StringVar(&cmd.disk, "disk", "", "Disk path name") } func (cmd *attach) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *attach) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } ds, err := cmd.Datastore() if err != nil { return err } devices, err := vm.Device(ctx) if err != nil { return err } controller, err := devices.FindDiskController(cmd.controller) if err != nil { return err } disk := devices.CreateDisk(controller, ds.Reference(), ds.Path(cmd.disk)) backing := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) if cmd.link { if cmd.persist { backing.DiskMode = string(types.VirtualDiskModeIndependent_persistent) } else { backing.DiskMode = string(types.VirtualDiskModeIndependent_nonpersistent) } disk = devices.ChildDisk(disk) return vm.AddDevice(ctx, disk) } if cmd.persist { backing.DiskMode = string(types.VirtualDiskModePersistent) } else { backing.DiskMode = string(types.VirtualDiskModeNonpersistent) } return vm.AddDevice(ctx, disk) } govmomi-0.15.0/govc/vm/disk/change.go000066400000000000000000000104171312205533500173420ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package disk import ( "context" "errors" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/types" ) type change struct { *flags.VirtualMachineFlag name string key int label string filePath string bytes units.ByteSize mode string } func init() { cli.Register("vm.disk.change", &change{}) } func (cmd *change) Description() string { return `Change some properties of a VM's DISK In particular, you can change the DISK mode, and the size (as long as it is bigger) Examples: govc vm.disk.change -vm VM -disk.key 2001 -size 10G govc vm.disk.change -vm VM -disk.label "BDD disk" -size 10G govc vm.disk.change -vm VM -disk.name "hard-1000-0" -size 12G govc vm.disk.change -vm VM -disk.filePath "[DS] VM/VM-1.vmdk" -mode nonpersistent` } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) err := (&cmd.bytes).Set("0G") if err != nil { panic(err) } f.Var(&cmd.bytes, "size", "New disk size") f.StringVar(&cmd.name, "disk.name", "", "Disk name") f.StringVar(&cmd.label, "disk.label", "", "Disk label") f.StringVar(&cmd.filePath, "disk.filePath", "", "Disk file name") f.IntVar(&cmd.key, "disk.key", 0, "Disk unique key") f.StringVar(&cmd.mode, "mode", "", fmt.Sprintf("Disk mode (%s)", strings.Join(vdmTypes, "|"))) } func (cmd *change) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) FindDisk(ctx context.Context, list object.VirtualDeviceList) (*types.VirtualDisk, error) { var disks []*types.VirtualDisk for _, device := range list { switch md := device.(type) { case *types.VirtualDisk: if cmd.CheckDiskProperties(ctx, list.Name(device), md) { disks = append(disks, md) } default: continue } } switch len(disks) { case 0: return nil, errors.New("No disk found using the given values") case 1: return disks[0], nil } return nil, errors.New("The given disk values match multiple disks") } func (cmd *change) CheckDiskProperties(ctx context.Context, name string, disk *types.VirtualDisk) bool { switch { case cmd.key != 0 && disk.Key != int32(cmd.key): fallthrough case cmd.name != "" && name != cmd.name: fallthrough case cmd.label != "" && disk.DeviceInfo.GetDescription().Label != cmd.label: return false case cmd.filePath != "": if b, ok := disk.Backing.(types.BaseVirtualDeviceFileBackingInfo); ok { if b.GetVirtualDeviceFileBackingInfo().FileName != cmd.filePath { return false } } } return true } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } editdisk, err := cmd.FindDisk(ctx, devices) if err != nil { return err } if int64(cmd.bytes) != 0 { editdisk.CapacityInKB = int64(cmd.bytes) / 1024 } backing := editdisk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) if len(cmd.mode) != 0 { backing.DiskMode = cmd.mode } spec := types.VirtualMachineConfigSpec{} config := &types.VirtualDeviceConfigSpec{ Device: editdisk, Operation: types.VirtualDeviceConfigSpecOperationEdit, } config.FileOperation = "" spec.DeviceChange = append(spec.DeviceChange, config) task, err := vm.Reconfigure(ctx, spec) if err != nil { return err } err = task.Wait(ctx) if err != nil { return fmt.Errorf("Error resizing main disk\nLogged Item: %s", err) } return nil } govmomi-0.15.0/govc/vm/disk/create.go000066400000000000000000000074631312205533500173670ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package disk import ( "context" "errors" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/types" ) type create struct { *flags.DatastoreFlag *flags.OutputFlag *flags.VirtualMachineFlag controller string Name string Bytes units.ByteSize Thick bool Eager bool DiskMode string } var vdmTypes = []string{ string(types.VirtualDiskModePersistent), string(types.VirtualDiskModeNonpersistent), string(types.VirtualDiskModeUndoable), string(types.VirtualDiskModeIndependent_persistent), string(types.VirtualDiskModeIndependent_nonpersistent), string(types.VirtualDiskModeAppend), } func init() { cli.Register("vm.disk.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) err := (&cmd.Bytes).Set("10G") if err != nil { panic(err) } f.StringVar(&cmd.controller, "controller", "", "Disk controller") f.StringVar(&cmd.Name, "name", "", "Name for new disk") f.Var(&cmd.Bytes, "size", "Size of new disk") f.BoolVar(&cmd.Thick, "thick", false, "Thick provision new disk") f.BoolVar(&cmd.Eager, "eager", false, "Eagerly scrub new disk") f.StringVar(&cmd.DiskMode, "mode", "persistent", fmt.Sprintf("Disk mode (%s)", strings.Join(vdmTypes, "|"))) } func (cmd *create) Process(ctx context.Context) error { if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Description() string { return `Create disk and attach to VM. Examples: govc vm.disk.create -vm $name -name $name/disk1 -size 10G` } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if len(cmd.Name) == 0 { return errors.New("please specify a disk name") } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return errors.New("please specify a vm") } ds, err := cmd.Datastore() if err != nil { return err } devices, err := vm.Device(ctx) if err != nil { return err } controller, err := devices.FindDiskController(cmd.controller) if err != nil { return err } vdmMatch := false for _, vdm := range vdmTypes { if cmd.DiskMode == vdm { vdmMatch = true } } if vdmMatch == false { return errors.New("please specify a valid disk mode") } disk := devices.CreateDisk(controller, ds.Reference(), ds.Path(cmd.Name)) existing := devices.SelectByBackingInfo(disk.Backing) if len(existing) > 0 { cmd.Log("Disk already present\n") return nil } backing := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) if cmd.Thick { backing.ThinProvisioned = types.NewBool(false) backing.EagerlyScrub = types.NewBool(cmd.Eager) } backing.DiskMode = cmd.DiskMode cmd.Log("Creating disk\n") disk.CapacityInKB = int64(cmd.Bytes) / 1024 return vm.AddDevice(ctx, disk) } govmomi-0.15.0/govc/vm/guest/000077500000000000000000000000001312205533500157605ustar00rootroot00000000000000govmomi-0.15.0/govc/vm/guest/auth.go000066400000000000000000000030411312205533500172460ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "fmt" "os" "strings" "github.com/vmware/govmomi/vim25/types" ) type AuthFlag struct { auth types.NamePasswordAuthentication } func newAuthFlag(ctx context.Context) (*AuthFlag, context.Context) { return &AuthFlag{}, ctx } func (flag *AuthFlag) String() string { return fmt.Sprintf("%s:%s", flag.auth.Username, strings.Repeat("x", len(flag.auth.Password))) } func (flag *AuthFlag) Set(s string) error { c := strings.Split(s, ":") if len(c) > 0 { flag.auth.Username = c[0] if len(c) > 1 { flag.auth.Password = c[1] } } return nil } func (flag *AuthFlag) Register(ctx context.Context, f *flag.FlagSet) { env := "GOVC_GUEST_LOGIN" value := os.Getenv(env) flag.Set(value) usage := fmt.Sprintf("Guest VM credentials [%s]", env) f.Var(flag, "l", usage) } func (flag *AuthFlag) Process(ctx context.Context) error { return nil } func (flag *AuthFlag) Auth() types.BaseGuestAuthentication { return &flag.auth } govmomi-0.15.0/govc/vm/guest/chmod.go000066400000000000000000000032131312205533500174000ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "strconv" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type chmod struct { *GuestFlag } func init() { cli.Register("guest.chmod", &chmod{}) } func (cmd *chmod) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) } func (cmd *chmod) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *chmod) Usage() string { return "MODE FILE" } func (cmd *chmod) Description() string { return `Change FILE MODE on VM. Examples: govc guest.chmod -vm $name 0644 /var/log/foo.log` } func (cmd *chmod) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 2 { return flag.ErrHelp } m, err := cmd.FileManager() if err != nil { return err } var attr types.GuestPosixFileAttributes attr.Permissions, err = strconv.ParseInt(f.Arg(0), 0, 64) if err != nil { return err } return m.ChangeFileAttributes(ctx, cmd.Auth(), f.Arg(1), &attr) } govmomi-0.15.0/govc/vm/guest/chown.go000066400000000000000000000036541312205533500174350ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "strconv" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type chown struct { *GuestFlag } func init() { cli.Register("guest.chown", &chown{}) } func (cmd *chown) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) } func (cmd *chown) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *chown) Usage() string { return "UID[:GID] FILE" } func (cmd *chown) Description() string { return `Change FILE UID and GID on VM. Examples: govc guest.chown -vm $name UID[:GID] /var/log/foo.log` } func (cmd *chown) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 2 { return flag.ErrHelp } m, err := cmd.FileManager() if err != nil { return err } var attr types.GuestPosixFileAttributes ids := strings.SplitN(f.Arg(0), ":", 2) if len(ids) == 0 { return flag.ErrHelp } id, err := strconv.Atoi(ids[0]) if err != nil { return err } attr.OwnerId = new(int32) *attr.OwnerId = int32(id) if len(ids) == 2 { id, err = strconv.Atoi(ids[1]) if err != nil { return err } attr.GroupId = new(int32) *attr.GroupId = int32(id) } return m.ChangeFileAttributes(ctx, cmd.Auth(), f.Arg(1), &attr) } govmomi-0.15.0/govc/vm/guest/download.go000066400000000000000000000046311312205533500201220ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "flag" "io" "context" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/soap" ) type download struct { *GuestFlag overwrite bool } func init() { cli.Register("guest.download", &download{}) } func (cmd *download) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.overwrite, "f", false, "If set, the local destination file is clobbered") } func (cmd *download) Usage() string { return "SOURCE DEST" } func (cmd *download) Description() string { return `Copy SOURCE from the guest VM to DEST on the local system. If DEST name is "-", source is written to stdout. Examples: govc guest.download -l user:pass -vm=my-vm /var/log/my.log ./local.log govc guest.download -l user:pass -vm=my-vm /etc/motd -` } func (cmd *download) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *download) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 2 { return flag.ErrHelp } m, err := cmd.FileManager() if err != nil { return err } src := f.Arg(0) dst := f.Arg(1) _, err = os.Stat(dst) if err == nil && !cmd.overwrite { return os.ErrExist } info, err := m.InitiateFileTransferFromGuest(ctx, cmd.Auth(), src) if err != nil { return err } u, err := cmd.ParseURL(info.Url) if err != nil { return err } c, err := cmd.Client() if err != nil { return nil } p := soap.DefaultDownload if dst == "-" { f, _, err := c.Client.Download(u, &p) if err != nil { return err } _, err = io.Copy(os.Stdout, f) return err } if cmd.OutputFlag.TTY { logger := cmd.ProgressLogger("Downloading... ") p.Progress = logger defer logger.Wait() } return c.Client.DownloadFile(dst, u, &p) } govmomi-0.15.0/govc/vm/guest/file_attr.go000066400000000000000000000024761312205533500202710ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type FileAttrFlag struct { types.GuestPosixFileAttributes } func newFileAttrFlag(ctx context.Context) (*FileAttrFlag, context.Context) { return &FileAttrFlag{}, ctx } func (flag *FileAttrFlag) Register(ctx context.Context, f *flag.FlagSet) { f.Var(flags.NewOptionalInt32(&flag.OwnerId), "uid", "User ID") f.Var(flags.NewOptionalInt32(&flag.GroupId), "gid", "Group ID") f.Int64Var(&flag.Permissions, "perm", 0, "File permissions") } func (flag *FileAttrFlag) Process(ctx context.Context) error { return nil } func (flag *FileAttrFlag) Attr() types.BaseGuestFileAttributes { return &flag.GuestPosixFileAttributes } govmomi-0.15.0/govc/vm/guest/getenv.go000066400000000000000000000030711312205533500176000ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" ) type getenv struct { *GuestFlag } func init() { cli.Register("guest.getenv", &getenv{}) } func (cmd *getenv) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) } func (cmd *getenv) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *getenv) Usage() string { return "[NAME]..." } func (cmd *getenv) Description() string { return `Read NAME environment variables from VM. Examples: govc guest.getenv -vm $name govc guest.getenv -vm $name HOME` } func (cmd *getenv) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.ProcessManager() if err != nil { return err } vars, err := m.ReadEnvironmentVariable(ctx, cmd.Auth(), f.Args()) if err != nil { return err } for _, v := range vars { fmt.Printf("%s\n", v) } return nil } govmomi-0.15.0/govc/vm/guest/guest.go000066400000000000000000000050761312205533500174460ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "errors" "flag" "context" "net/url" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/guest" "github.com/vmware/govmomi/object" ) type GuestFlag struct { *flags.ClientFlag *flags.VirtualMachineFlag *AuthFlag } func newGuestFlag(ctx context.Context) (*GuestFlag, context.Context) { f := &GuestFlag{} f.ClientFlag, ctx = flags.NewClientFlag(ctx) f.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) f.AuthFlag, ctx = newAuthFlag(ctx) return f, ctx } func (flag *GuestFlag) Register(ctx context.Context, f *flag.FlagSet) { flag.ClientFlag.Register(ctx, f) flag.VirtualMachineFlag.Register(ctx, f) flag.AuthFlag.Register(ctx, f) } func (flag *GuestFlag) Process(ctx context.Context) error { if err := flag.ClientFlag.Process(ctx); err != nil { return err } if err := flag.VirtualMachineFlag.Process(ctx); err != nil { return err } if err := flag.AuthFlag.Process(ctx); err != nil { return err } return nil } func (flag *GuestFlag) FileManager() (*guest.FileManager, error) { ctx := context.TODO() c, err := flag.Client() if err != nil { return nil, err } vm, err := flag.VirtualMachine() if err != nil { return nil, err } o := guest.NewOperationsManager(c, vm.Reference()) return o.FileManager(ctx) } func (flag *GuestFlag) ProcessManager() (*guest.ProcessManager, error) { ctx := context.TODO() c, err := flag.Client() if err != nil { return nil, err } vm, err := flag.VirtualMachine() if err != nil { return nil, err } o := guest.NewOperationsManager(c, vm.Reference()) return o.ProcessManager(ctx) } func (flag *GuestFlag) ParseURL(urlStr string) (*url.URL, error) { c, err := flag.Client() if err != nil { return nil, err } return c.Client.ParseURL(urlStr) } func (flag *GuestFlag) VirtualMachine() (*object.VirtualMachine, error) { vm, err := flag.VirtualMachineFlag.VirtualMachine() if err != nil { return nil, err } if vm == nil { return nil, errors.New("no vm specified") } return vm, nil } govmomi-0.15.0/govc/vm/guest/kill.go000066400000000000000000000027221312205533500172450ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type kill struct { *GuestFlag pids pidSelector } func init() { cli.Register("guest.kill", &kill{}) } func (cmd *kill) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.Var(&cmd.pids, "p", "Process ID") } func (cmd *kill) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *kill) Description() string { return `Kill process ID on VM. Examples: govc guest.kill -vm $name -p 12345` } func (cmd *kill) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.ProcessManager() if err != nil { return err } for _, pid := range cmd.pids { if err := m.TerminateProcess(ctx, cmd.Auth(), pid); err != nil { return err } } return nil } govmomi-0.15.0/govc/vm/guest/ls.go000066400000000000000000000050541312205533500167310ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "fmt" "os" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *GuestFlag simple bool } func init() { cli.Register("guest.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.simple, "s", false, "Simple path only listing") // sadly we used '-l' for guest login } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Usage() string { return "PATH" } func (cmd *ls) Description() string { return `List PATH files in VM. Examples: govc guest.ls -vm $name /tmp` } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.FileManager() if err != nil { return err } var offset int32 tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for { info, err := m.ListFiles(ctx, cmd.Auth(), f.Arg(0), offset, 0, f.Arg(1)) if err != nil { return err } for _, f := range info.Files { if cmd.simple { fmt.Fprintln(tw, f.Path) continue } var kind byte switch types.GuestFileType(f.Type) { case types.GuestFileTypeDirectory: kind = 'd' if f.Size == 0 { f.Size = 4092 } case types.GuestFileTypeSymlink: kind = 'l' case types.GuestFileTypeFile: kind = '-' } switch x := f.Attributes.(type) { case *types.GuestPosixFileAttributes: perm := os.FileMode(x.Permissions).Perm().String()[1:] fmt.Fprintf(tw, "%c%s\t%d\t%d\t", kind, perm, *x.OwnerId, *x.GroupId) } attr := f.Attributes.GetGuestFileAttributes() fmt.Fprintf(tw, "%s\t%s\t%s\n", units.FileSize(f.Size), attr.ModificationTime.Format("Jan 2 15:04 2006"), f.Path) } _ = tw.Flush() if info.Remaining == 0 { break } offset += int32(len(info.Files)) } return nil } govmomi-0.15.0/govc/vm/guest/mkdir.go000066400000000000000000000036071312205533500174230ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type mkdir struct { *GuestFlag createParents bool } func init() { cli.Register("guest.mkdir", &mkdir{}) } func (cmd *mkdir) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.createParents, "p", false, "Create intermediate directories as needed") } func (cmd *mkdir) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mkdir) Usage() string { return "PATH" } func (cmd *mkdir) Description() string { return `Create directory PATH in VM. Examples: govc guest.mkdir -vm $name /tmp/logs govc guest.mkdir -vm $name -p /tmp/logs/foo/bar` } func (cmd *mkdir) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.FileManager() if err != nil { return err } err = m.MakeDirectory(ctx, cmd.Auth(), f.Arg(0), cmd.createParents) // ignore EEXIST if -p flag is given if err != nil && cmd.createParents { if soap.IsSoapFault(err) { soapFault := soap.ToSoapFault(err) if _, ok := soapFault.VimFault().(types.FileAlreadyExists); ok { return nil } } } return err } govmomi-0.15.0/govc/vm/guest/mktemp.go000066400000000000000000000036671312205533500176200ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" ) type mktemp struct { *GuestFlag dir bool path string prefix string suffix string } func init() { cli.Register("guest.mktemp", &mktemp{}) } func (cmd *mktemp) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.dir, "d", false, "Make a directory instead of a file") f.StringVar(&cmd.path, "p", "", "If specified, create relative to this directory") f.StringVar(&cmd.prefix, "t", "", "Prefix") f.StringVar(&cmd.suffix, "s", "", "Suffix") } func (cmd *mktemp) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mktemp) Description() string { return `Create a temporary file or directory in VM. Examples: govc guest.mktemp -vm $name govc guest.mktemp -vm $name -d govc guest.mktemp -vm $name -t myprefix govc guest.mktemp -vm $name -p /var/tmp/$USER` } func (cmd *mktemp) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.FileManager() if err != nil { return err } mk := m.CreateTemporaryFile if cmd.dir { mk = m.CreateTemporaryDirectory } name, err := mk(ctx, cmd.Auth(), cmd.prefix, cmd.suffix, cmd.path) if err != nil { return err } fmt.Println(name) return nil } govmomi-0.15.0/govc/vm/guest/mv.go000066400000000000000000000035521312205533500167360ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type mv struct { *GuestFlag noclobber bool } func init() { cli.Register("guest.mv", &mv{}) } func (cmd *mv) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.noclobber, "n", false, "Do not overwrite an existing file") } func (cmd *mv) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *mv) Usage() string { return "SOURCE DEST" } func (cmd *mv) Description() string { return `Move (rename) files in VM. Examples: govc guest.mv -vm $name /tmp/foo.sh /tmp/bar.sh govc guest.mv -vm $name -n /tmp/baz.sh /tmp/bar.sh` } func (cmd *mv) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.FileManager() if err != nil { return err } src := f.Arg(0) dst := f.Arg(1) err = m.MoveFile(ctx, cmd.Auth(), src, dst, !cmd.noclobber) if err != nil { if soap.IsSoapFault(err) { soapFault := soap.ToSoapFault(err) if _, ok := soapFault.VimFault().(types.NotAFile); ok { err = m.MoveDirectory(ctx, cmd.Auth(), src, dst) } } } return err } govmomi-0.15.0/govc/vm/guest/ps.go000066400000000000000000000102311312205533500167260ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "fmt" "io" "strconv" "strings" "text/tabwriter" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type ps struct { *flags.OutputFlag *GuestFlag every bool exit bool wait bool pids pidSelector uids uidSelector } type pidSelector []int64 func (s *pidSelector) String() string { return fmt.Sprint(*s) } func (s *pidSelector) Set(value string) error { v, err := strconv.ParseInt(value, 0, 64) if err != nil { return err } *s = append(*s, v) return nil } type uidSelector map[string]bool func (s uidSelector) String() string { return "" } func (s uidSelector) Set(value string) error { s[value] = true return nil } func init() { cli.Register("guest.ps", &ps{}) } func (cmd *ps) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) cmd.uids = make(map[string]bool) f.BoolVar(&cmd.every, "e", false, "Select all processes") f.BoolVar(&cmd.exit, "x", false, "Output exit time and code") f.BoolVar(&cmd.wait, "X", false, "Wait for process to exit") f.Var(&cmd.pids, "p", "Select by process ID") f.Var(&cmd.uids, "U", "Select by process UID") } func (cmd *ps) Process(ctx context.Context) error { if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ps) Description() string { return `List processes in VM. By default, unless the '-e', '-p' or '-U' flag is specified, only processes owned by the '-l' flag user are displayed. The '-x' and '-X' flags only apply to processes started by vmware-tools, such as those started with the govc guest.start command. Examples: govc guest.ps -vm $name govc guest.ps -vm $name -e govc guest.ps -vm $name -p 12345 govc guest.ps -vm $name -U root` } func running(procs []types.GuestProcessInfo) bool { for _, p := range procs { if p.EndTime == nil { return true } } return false } func (cmd *ps) list(ctx context.Context) ([]types.GuestProcessInfo, error) { m, err := cmd.ProcessManager() if err != nil { return nil, err } auth := cmd.Auth() for { procs, err := m.ListProcesses(ctx, auth, cmd.pids) if err != nil { return nil, err } if cmd.wait && running(procs) { <-time.After(time.Millisecond * 250) continue } return procs, nil } } func (cmd *ps) Run(ctx context.Context, f *flag.FlagSet) error { procs, err := cmd.list(ctx) if err != nil { return err } r := &psResult{cmd, procs} return cmd.WriteResult(r) } type psResult struct { cmd *ps ProcessInfo []types.GuestProcessInfo } func (r *psResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "%s\t%s\t%s", "UID", "PID", "STIME") if r.cmd.exit { fmt.Fprintf(tw, "\t%s\t%s", "XTIME", "XCODE") } fmt.Fprint(tw, "\tCMD\n") if len(r.cmd.pids) != 0 { r.cmd.every = true } if !r.cmd.every && len(r.cmd.uids) == 0 { r.cmd.uids[r.cmd.auth.Username] = true } for _, p := range r.ProcessInfo { if r.cmd.every || r.cmd.uids[p.Owner] { fmt.Fprintf(tw, "%s\t%d\t%s", p.Owner, p.Pid, p.StartTime.Format("15:04")) if r.cmd.exit { etime := "-" ecode := "-" if p.EndTime != nil { etime = p.EndTime.Format("15:04") ecode = strconv.Itoa(int(p.ExitCode)) } fmt.Fprintf(tw, "\t%s\t%s", etime, ecode) } fmt.Fprintf(tw, "\t%s\n", strings.TrimSpace(p.CmdLine)) } } return tw.Flush() } govmomi-0.15.0/govc/vm/guest/rm.go000066400000000000000000000025501312205533500167270ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type rm struct { *GuestFlag } func init() { cli.Register("guest.rm", &rm{}) } func (cmd *rm) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) } func (cmd *rm) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *rm) Usage() string { return "PATH" } func (cmd *rm) Description() string { return `Remove file PATH in VM. Examples: govc guest.rm -vm $name /tmp/foo.log` } func (cmd *rm) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.FileManager() if err != nil { return err } return m.DeleteFile(ctx, cmd.Auth(), f.Arg(0)) } govmomi-0.15.0/govc/vm/guest/rmdir.go000066400000000000000000000030371312205533500174270ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" ) type rmdir struct { *GuestFlag recursive bool } func init() { cli.Register("guest.rmdir", &rmdir{}) } func (cmd *rmdir) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.recursive, "r", false, "Recursive removal") } func (cmd *rmdir) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *rmdir) Usage() string { return "PATH" } func (cmd *rmdir) Description() string { return `Remove directory PATH in VM. Examples: govc guest.rmdir -vm $name /tmp/empty-dir govc guest.rmdir -vm $name -r /tmp/non-empty-dir` } func (cmd *rmdir) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.FileManager() if err != nil { return err } return m.DeleteDirectory(ctx, cmd.Auth(), f.Arg(0), cmd.recursive) } govmomi-0.15.0/govc/vm/guest/start.go000066400000000000000000000044641312205533500174540ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/types" ) type start struct { *GuestFlag dir string vars env } type env []string func (e *env) String() string { return fmt.Sprint(*e) } func (e *env) Set(value string) error { *e = append(*e, value) return nil } func init() { cli.Register("guest.start", &start{}) } func (cmd *start) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.StringVar(&cmd.dir, "C", "", "The absolute path of the working directory for the program to start") f.Var(&cmd.vars, "e", "Set environment variable (key=val)") } func (cmd *start) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *start) Usage() string { return "PATH [ARG]..." } func (cmd *start) Description() string { return `Start program in VM. The process can have its status queried with govc guest.ps. When the process completes, its exit code and end time will be available for 5 minutes after completion. Examples: govc guest.start -vm $name /bin/mount /dev/hdb1 /data pid=$(govc guest.start -vm $name /bin/long-running-thing) govc guest.ps -vm $name -p $pid -X` } func (cmd *start) Run(ctx context.Context, f *flag.FlagSet) error { m, err := cmd.ProcessManager() if err != nil { return err } spec := types.GuestProgramSpec{ ProgramPath: f.Arg(0), Arguments: strings.Join(f.Args()[1:], " "), WorkingDirectory: cmd.dir, EnvVariables: cmd.vars, } pid, err := m.StartProgram(ctx, cmd.Auth(), &spec) if err != nil { return err } fmt.Printf("%d\n", pid) return nil } govmomi-0.15.0/govc/vm/guest/tools.go000066400000000000000000000051611312205533500174520ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type tools struct { *flags.ClientFlag *flags.SearchFlag mount bool upgrade bool options string unmount bool } func init() { cli.Register("vm.guest.tools", &tools{}) } func (cmd *tools) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.mount, "mount", false, "Mount tools CD installer in the guest") f.BoolVar(&cmd.upgrade, "upgrade", false, "Upgrade tools in the guest") f.StringVar(&cmd.options, "options", "", "Installer options") f.BoolVar(&cmd.unmount, "unmount", false, "Unmount tools CD installer in the guest") } func (cmd *tools) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.SearchFlag.Process(ctx); err != nil { return err } return nil } func (cmd *tools) Usage() string { return "VM..." } func (cmd *tools) Description() string { return `Manage guest tools in VM. Examples: govc vm.guest.tools -mount VM govc vm.guest.tools -unmount VM govc vm.guest.tools -upgrade -options "opt1 opt2" VM` } func (cmd *tools) Upgrade(ctx context.Context, vm *object.VirtualMachine) error { task, err := vm.UpgradeTools(ctx, cmd.options) if err != nil { return err } return task.Wait(ctx) } func (cmd *tools) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } for _, vm := range vms { switch { case cmd.mount: err = vm.MountToolsInstaller(ctx) if err != nil { return err } case cmd.upgrade: err = cmd.Upgrade(ctx, vm) if err != nil { return err } case cmd.unmount: err = vm.UnmountToolsInstaller(ctx) if err != nil { return err } default: return flag.ErrHelp } } return nil } govmomi-0.15.0/govc/vm/guest/touch.go000066400000000000000000000053651312205533500174420ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "bytes" "context" "flag" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type touch struct { *GuestFlag nocreate bool atime bool date string } func init() { cli.Register("guest.touch", &touch{}) } func (cmd *touch) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) f.BoolVar(&cmd.atime, "a", false, "Change only the access time") f.BoolVar(&cmd.nocreate, "c", false, "Do not create any files") f.StringVar(&cmd.date, "d", "", "Use DATE instead of current time") } func (cmd *touch) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } return nil } func (cmd *touch) Usage() string { return "FILE" } func (cmd *touch) Description() string { return `Change FILE times on VM. Examples: govc guest.touch -vm $name /var/log/foo.log govc guest.touch -vm $name -d "$(date -d '1 day ago')" /var/log/foo.log` } func (cmd *touch) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } m, err := cmd.FileManager() if err != nil { return err } name := f.Arg(0) var attr types.GuestFileAttributes now := time.Now() if cmd.date != "" { now, err = time.Parse(time.UnixDate, cmd.date) if err != nil { return err } } if cmd.atime { attr.AccessTime = &now } else { attr.ModificationTime = &now } err = m.ChangeFileAttributes(ctx, cmd.Auth(), name, &attr) if err != nil && !cmd.nocreate && soap.IsSoapFault(err) { fault := soap.ToSoapFault(err) if _, ok := fault.VimFault().(types.FileNotFound); ok { // create a new empty file url, cerr := m.InitiateFileTransferToGuest(ctx, cmd.Auth(), name, &attr, 0, false) if cerr != nil { return cerr } u, cerr := cmd.ParseURL(url) if cerr != nil { return cerr } c, cerr := cmd.Client() if cerr != nil { return cerr } err = c.Client.Upload(new(bytes.Buffer), u, &soap.DefaultUpload) if err == nil && cmd.date != "" { err = m.ChangeFileAttributes(ctx, cmd.Auth(), name, &attr) } } } return err } govmomi-0.15.0/govc/vm/guest/upload.go000066400000000000000000000053421312205533500175770ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "bytes" "context" "flag" "io" "os" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/vim25/soap" ) type upload struct { *GuestFlag *FileAttrFlag overwrite bool } func init() { cli.Register("guest.upload", &upload{}) } func (cmd *upload) Register(ctx context.Context, f *flag.FlagSet) { cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) cmd.FileAttrFlag, ctx = newFileAttrFlag(ctx) cmd.FileAttrFlag.Register(ctx, f) f.BoolVar(&cmd.overwrite, "f", false, "If set, the guest destination file is clobbered") } func (cmd *upload) Usage() string { return "SOURCE DEST" } func (cmd *upload) Description() string { return `Copy SOURCE from the local system to DEST in the guest VM. If SOURCE name is "-", read source from stdin. Examples: govc guest.upload -l user:pass -vm=my-vm ~/.ssh/id_rsa.pub /home/$USER/.ssh/authorized_keys cowsay "have a great day" | govc guest.upload -l user:pass -vm=my-vm - /etc/motd` } func (cmd *upload) Process(ctx context.Context) error { if err := cmd.GuestFlag.Process(ctx); err != nil { return err } if err := cmd.FileAttrFlag.Process(ctx); err != nil { return err } return nil } func (cmd *upload) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 2 { return flag.ErrHelp } m, err := cmd.FileManager() if err != nil { return err } src := f.Arg(0) dst := f.Arg(1) var size int64 var buf *bytes.Buffer if src == "-" { buf = new(bytes.Buffer) size, err = io.Copy(buf, os.Stdin) if err != nil { return err } } else { s, err := os.Stat(src) if err != nil { return err } size = s.Size() } url, err := m.InitiateFileTransferToGuest(ctx, cmd.Auth(), dst, cmd.Attr(), size, cmd.overwrite) if err != nil { return err } u, err := cmd.ParseURL(url) if err != nil { return err } c, err := cmd.Client() if err != nil { return nil } p := soap.DefaultUpload if buf != nil { p.ContentLength = size return c.Client.Upload(buf, u, &p) } if cmd.OutputFlag.TTY { logger := cmd.ProgressLogger("Uploading... ") p.Progress = logger defer logger.Wait() } return c.Client.UploadFile(src, u, nil) } govmomi-0.15.0/govc/vm/info.go000066400000000000000000000226131312205533500161170ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "flag" "fmt" "io" "os" "strings" "text/tabwriter" "context" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/units" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type info struct { *flags.ClientFlag *flags.OutputFlag *flags.SearchFlag WaitForIP bool General bool ExtraConfig bool Resources bool ToolsConfigInfo bool } func init() { cli.Register("vm.info", &info{}) } func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.WaitForIP, "waitip", false, "Wait for VM to acquire IP address") f.BoolVar(&cmd.General, "g", true, "Show general summary") f.BoolVar(&cmd.ExtraConfig, "e", false, "Show ExtraConfig") f.BoolVar(&cmd.Resources, "r", false, "Show resource summary") f.BoolVar(&cmd.ToolsConfigInfo, "t", false, "Show ToolsConfigInfo") } func (cmd *info) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.SearchFlag.Process(ctx); err != nil { return err } return nil } func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } vms, err := cmd.VirtualMachines(f.Args()) if err != nil { if _, ok := err.(*find.NotFoundError); ok { // Continue with empty VM slice } else { return err } } refs := make([]types.ManagedObjectReference, 0, len(vms)) for _, vm := range vms { refs = append(refs, vm.Reference()) } var res infoResult var props []string if cmd.OutputFlag.JSON { props = nil // Load everything } else { props = []string{"summary"} // Load summary if cmd.General { props = append(props, "guest.ipAddress") } if cmd.ExtraConfig { props = append(props, "config.extraConfig") } if cmd.Resources { props = append(props, "datastore", "network") } if cmd.ToolsConfigInfo { props = append(props, "config.tools") } } pc := property.DefaultCollector(c) if len(refs) != 0 { err = pc.Retrieve(ctx, refs, props, &res.VirtualMachines) if err != nil { return err } } if cmd.WaitForIP { for i, vm := range res.VirtualMachines { if vm.Guest == nil || vm.Guest.IpAddress == "" { _, err = vms[i].WaitForIP(ctx) if err != nil { return err } // Reload virtual machine object err = pc.RetrieveOne(ctx, vms[i].Reference(), props, &res.VirtualMachines[i]) if err != nil { return err } } } } if !cmd.OutputFlag.JSON { res.objects = vms res.cmd = cmd if err = res.collectReferences(pc, ctx); err != nil { return err } } return cmd.WriteResult(&res) } type infoResult struct { VirtualMachines []mo.VirtualMachine objects []*object.VirtualMachine entities map[types.ManagedObjectReference]string cmd *info } // collectReferences builds a unique set of MORs to the set of VirtualMachines, // so we can collect properties in a single call for each reference type {host,datastore,network}. func (r *infoResult) collectReferences(pc *property.Collector, ctx context.Context) error { r.entities = make(map[types.ManagedObjectReference]string) // MOR -> Name map var host []mo.HostSystem var network []mo.Network var opaque []mo.OpaqueNetwork var dvp []mo.DistributedVirtualPortgroup var datastore []mo.Datastore // Table to drive inflating refs to their mo.* counterparts (dest) // and save() the Name to r.entities w/o using reflection here. // Note that we cannot use a []mo.ManagedEntity here, since mo.Network has its own 'Name' field, // the mo.Network.ManagedEntity.Name field will not be set. vrefs := map[string]*struct { dest interface{} refs []types.ManagedObjectReference save func() }{ "HostSystem": { &host, nil, func() { for _, e := range host { r.entities[e.Reference()] = e.Name } }, }, "Network": { &network, nil, func() { for _, e := range network { r.entities[e.Reference()] = e.Name } }, }, "OpaqueNetwork": { &opaque, nil, func() { for _, e := range opaque { r.entities[e.Reference()] = e.Name } }, }, "DistributedVirtualPortgroup": { &dvp, nil, func() { for _, e := range dvp { r.entities[e.Reference()] = e.Name } }, }, "Datastore": { &datastore, nil, func() { for _, e := range datastore { r.entities[e.Reference()] = e.Name } }, }, } xrefs := make(map[types.ManagedObjectReference]bool) // Add MOR to vrefs[kind].refs avoiding any duplicates. addRef := func(refs ...types.ManagedObjectReference) { for _, ref := range refs { if _, exists := xrefs[ref]; exists { return } xrefs[ref] = true vref := vrefs[ref.Type] vref.refs = append(vref.refs, ref) } } for _, vm := range r.VirtualMachines { if r.cmd.General { if ref := vm.Summary.Runtime.Host; ref != nil { addRef(*ref) } } if r.cmd.Resources { addRef(vm.Datastore...) addRef(vm.Network...) } } for _, vref := range vrefs { if vref.refs == nil { continue } err := pc.Retrieve(ctx, vref.refs, []string{"name"}, vref.dest) if err != nil { return err } vref.save() } return nil } func (r *infoResult) entityNames(refs []types.ManagedObjectReference) string { var names []string for _, ref := range refs { names = append(names, r.entities[ref]) } return strings.Join(names, ", ") } func (r *infoResult) Write(w io.Writer) error { // Maintain order via r.objects as Property collector does not always return results in order. objects := make(map[types.ManagedObjectReference]mo.VirtualMachine, len(r.VirtualMachines)) for _, o := range r.VirtualMachines { objects[o.Reference()] = o } tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, o := range r.objects { vm := objects[o.Reference()] s := vm.Summary fmt.Fprintf(tw, "Name:\t%s\n", s.Config.Name) if r.cmd.General { hostName := "" if href := vm.Summary.Runtime.Host; href != nil { if name, ok := r.entities[*href]; ok { hostName = name } } fmt.Fprintf(tw, " Path:\t%s\n", o.InventoryPath) fmt.Fprintf(tw, " UUID:\t%s\n", s.Config.Uuid) fmt.Fprintf(tw, " Guest name:\t%s\n", s.Config.GuestFullName) fmt.Fprintf(tw, " Memory:\t%dMB\n", s.Config.MemorySizeMB) fmt.Fprintf(tw, " CPU:\t%d vCPU(s)\n", s.Config.NumCpu) fmt.Fprintf(tw, " Power state:\t%s\n", s.Runtime.PowerState) fmt.Fprintf(tw, " Boot time:\t%s\n", s.Runtime.BootTime) fmt.Fprintf(tw, " IP address:\t%s\n", s.Guest.IpAddress) fmt.Fprintf(tw, " Host:\t%s\n", hostName) } if r.cmd.Resources { if s.Storage == nil { s.Storage = new(types.VirtualMachineStorageSummary) } fmt.Fprintf(tw, " CPU usage:\t%dMHz\n", s.QuickStats.OverallCpuUsage) fmt.Fprintf(tw, " Host memory usage:\t%dMB\n", s.QuickStats.HostMemoryUsage) fmt.Fprintf(tw, " Guest memory usage:\t%dMB\n", s.QuickStats.GuestMemoryUsage) fmt.Fprintf(tw, " Storage uncommitted:\t%s\n", units.ByteSize(s.Storage.Uncommitted)) fmt.Fprintf(tw, " Storage committed:\t%s\n", units.ByteSize(s.Storage.Committed)) fmt.Fprintf(tw, " Storage unshared:\t%s\n", units.ByteSize(s.Storage.Unshared)) fmt.Fprintf(tw, " Storage:\t%s\n", r.entityNames(vm.Datastore)) fmt.Fprintf(tw, " Network:\t%s\n", r.entityNames(vm.Network)) } if r.cmd.ExtraConfig { fmt.Fprintf(tw, " ExtraConfig:\n") for _, v := range vm.Config.ExtraConfig { fmt.Fprintf(tw, " %s:\t%s\n", v.GetOptionValue().Key, v.GetOptionValue().Value) } } if r.cmd.ToolsConfigInfo { t := vm.Config.Tools fmt.Fprintf(tw, " ToolsConfigInfo:\n") fmt.Fprintf(tw, " ToolsVersion:\t%d\n", t.ToolsVersion) fmt.Fprintf(tw, " AfterPowerOn:\t%s\n", flags.NewOptionalBool(&t.AfterPowerOn).String()) fmt.Fprintf(tw, " AfterResume:\t%s\n", flags.NewOptionalBool(&t.AfterResume).String()) fmt.Fprintf(tw, " BeforeGuestStandby:\t%s\n", flags.NewOptionalBool(&t.BeforeGuestStandby).String()) fmt.Fprintf(tw, " BeforeGuestShutdown:\t%s\n", flags.NewOptionalBool(&t.BeforeGuestShutdown).String()) fmt.Fprintf(tw, " BeforeGuestReboot:\t%s\n", flags.NewOptionalBool(&t.BeforeGuestReboot).String()) fmt.Fprintf(tw, " ToolsUpgradePolicy:\t%s\n", t.ToolsUpgradePolicy) fmt.Fprintf(tw, " PendingCustomization:\t%s\n", t.PendingCustomization) fmt.Fprintf(tw, " SyncTimeWithHost:\t%s\n", flags.NewOptionalBool(&t.SyncTimeWithHost).String()) } } return tw.Flush() } govmomi-0.15.0/govc/vm/ip.go000066400000000000000000000120301312205533500155640ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "fmt" "strings" "time" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/host/esxcli" "github.com/vmware/govmomi/object" ) type ip struct { *flags.OutputFlag *flags.SearchFlag esx bool all bool v4 bool wait time.Duration nic string } func init() { cli.Register("vm.ip", &ip{}) } func (cmd *ip) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools") f.BoolVar(&cmd.all, "a", false, "Wait for an IP address on all NICs") f.StringVar(&cmd.nic, "n", "", "Wait for IP address on NIC, specified by device name or MAC") f.BoolVar(&cmd.v4, "v4", false, "Only report IPv4 addresses") f.DurationVar(&cmd.wait, "wait", time.Hour, "Wait time for the VM obtain an IP address") } func (cmd *ip) Usage() string { return "VM..." } func (cmd *ip) Description() string { return `List IPs for VM. By default the vm.ip command depends on vmware-tools to report the 'guest.ipAddress' field and will wait until it has done so. This value can also be obtained using: govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.IpAddress When given the '-a' flag, only IP addresses for which there is a corresponding virtual nic are listed. If there are multiple nics, the listed addresses will be comma delimited. The '-a' flag depends on vmware-tools to report the 'guest.net' field and will wait until it has done so for all nics. Note that this list includes IPv6 addresses if any, use '-v4' to filter them out. IP addresses reported by tools for which there is no virtual nic are not included, for example that of the 'docker0' interface. These values can also be obtained using: govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.Net[].IpConfig.IpAddress[].IpAddress When given the '-n' flag, filters '-a' behavior to the nic specified by MAC address or device name. The 'esxcli' flag does not require vmware-tools to be installed, but does require the ESX host to have the /Net/GuestIPHack setting enabled. The 'wait' flag default to 1hr (original default was infinite). If a VM does not obtain an IP within the wait time, the command will still exit with status 0. Examples: govc vm.ip $vm govc vm.ip -wait 5m $vm govc vm.ip -a -v4 $vm govc vm.ip -n 00:0c:29:57:7b:c3 $vm govc vm.ip -n ethernet-0 $vm govc host.esxcli system settings advanced set -o /Net/GuestIPHack -i 1 govc vm.ip -esxcli $vm` } func (cmd *ip) Process(ctx context.Context) error { if err := cmd.OutputFlag.Process(ctx); err != nil { return err } if err := cmd.SearchFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ip) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } var get func(*object.VirtualMachine, context.Context) (string, error) if cmd.esx { get = func(vm *object.VirtualMachine, deadline context.Context) (string, error) { guest := esxcli.NewGuestInfo(c) ticker := time.NewTicker(time.Millisecond * 500) defer ticker.Stop() for { select { case <-ticker.C: ip, err := guest.IpAddress(vm) if err != nil { return "", err } if ip != "0.0.0.0" { return ip, nil } case <-deadline.Done(): return "", nil } } } } else { var hwaddr []string if cmd.nic != "" { hwaddr = strings.Split(cmd.nic, ",") } get = func(vm *object.VirtualMachine, deadline context.Context) (string, error) { if cmd.all || hwaddr != nil { macs, err := vm.WaitForNetIP(deadline, cmd.v4, hwaddr...) if err != nil { return "", err } var ips []string for _, addrs := range macs { for _, ip := range addrs { ips = append(ips, ip) } } return strings.Join(ips, ","), nil } return vm.WaitForIP(deadline) } } for _, vm := range vms { deadline, cancel := context.WithDeadline(ctx, time.Now().Add(cmd.wait)) ip, err := get(vm, deadline) if err != nil { if deadline.Err() != context.DeadlineExceeded { cancel() return err } } cancel() if ip == "" { continue } // TODO(PN): Display inventory path to VM fmt.Fprintf(cmd, "%s\n", ip) } return nil } govmomi-0.15.0/govc/vm/markastemplate.go000066400000000000000000000031541312205533500201750ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type markastemplate struct { *flags.SearchFlag } func init() { cli.Register("vm.markastemplate", &markastemplate{}) } func (cmd *markastemplate) Register(ctx context.Context, f *flag.FlagSet) { cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) } func (cmd *markastemplate) Process(ctx context.Context) error { if err := cmd.SearchFlag.Process(ctx); err != nil { return err } return nil } func (cmd *markastemplate) Usage() string { return "VM..." } func (cmd *markastemplate) Description() string { return `Mark VM as a virtual machine template. Examples: govc vm.markastemplate $name` } func (cmd *markastemplate) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } for _, vm := range vms { err := vm.MarkAsTemplate(ctx) if err != nil { return err } } return nil } govmomi-0.15.0/govc/vm/markasvm.go000066400000000000000000000045021312205533500170020ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type markasvm struct { *flags.SearchFlag *flags.ResourcePoolFlag *flags.HostSystemFlag } func init() { cli.Register("vm.markasvm", &markasvm{}) } func (cmd *markasvm) Register(ctx context.Context, f *flag.FlagSet) { cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) } func (cmd *markasvm) Process(ctx context.Context) error { if err := cmd.SearchFlag.Process(ctx); err != nil { return err } if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } return nil } func (cmd *markasvm) Usage() string { return "VM..." } func (cmd *markasvm) Description() string { return `Mark VM template as a virtual machine. Examples: govc vm.markasvm $name -host host1 govc vm.markasvm $name -pool cluster1/Resources` } func (cmd *markasvm) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } pool, err := cmd.ResourcePoolIfSpecified() if err != nil { return err } host, err := cmd.HostSystemFlag.HostSystemIfSpecified() if err != nil { return err } if pool == nil { if host == nil { return flag.ErrHelp } pool, err = host.ResourcePool(ctx) if err != nil { return err } } for _, vm := range vms { err := vm.MarkAsVirtualMachine(ctx, *pool, host) if err != nil { return err } } return nil } govmomi-0.15.0/govc/vm/migrate.go000066400000000000000000000064141312205533500166150ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" ) type migrate struct { *flags.ResourcePoolFlag *flags.HostSystemFlag *flags.DatastoreFlag *flags.SearchFlag priority types.VirtualMachineMovePriority spec types.VirtualMachineRelocateSpec } func init() { cli.Register("vm.migrate", &migrate{}) } func (cmd *migrate) Register(ctx context.Context, f *flag.FlagSet) { cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.StringVar((*string)(&cmd.priority), "priority", string(types.VirtualMachineMovePriorityDefaultPriority), "The task priority") } func (cmd *migrate) Process(ctx context.Context) error { if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } return nil } func (cmd *migrate) Usage() string { return "VM..." } func (cmd *migrate) Description() string { return `Migrates VM to a specific resource pool, host or datastore. Examples: govc vm.migrate -host another-host vm-1 vm-2 vm-3 govc vm.migrate -ds another-ds vm-1 vm-2 vm-3` } func (cmd *migrate) relocate(ctx context.Context, vm *object.VirtualMachine) error { task, err := vm.Relocate(ctx, cmd.spec, cmd.priority) if err != nil { return err } logger := cmd.DatastoreFlag.ProgressLogger(fmt.Sprintf("migrating %s... ", vm.Reference())) _, err = task.WaitForResult(ctx, logger) if err != nil { return err } logger.Wait() return nil } func (cmd *migrate) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } host, err := cmd.HostSystemFlag.HostSystemIfSpecified() if err != nil { return err } if host != nil { ref := host.Reference() cmd.spec.Host = &ref } pool, err := cmd.ResourcePoolFlag.ResourcePoolIfSpecified() if err != nil { return err } if pool != nil { ref := pool.Reference() cmd.spec.Pool = &ref } ds, err := cmd.DatastoreFlag.DatastoreIfSpecified() if err != nil { return err } if ds != nil { ref := ds.Reference() cmd.spec.Datastore = &ref } for _, vm := range vms { err = cmd.relocate(ctx, vm) if err != nil { return err } } return nil } govmomi-0.15.0/govc/vm/network/000077500000000000000000000000001312205533500163225ustar00rootroot00000000000000govmomi-0.15.0/govc/vm/network/add.go000066400000000000000000000036331312205533500174060ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package network import ( "context" "errors" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type add struct { *flags.VirtualMachineFlag *flags.NetworkFlag } func init() { cli.Register("vm.network.add", &add{}) } func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) } func (cmd *add) Description() string { return `Add network adapter to VM. Examples: govc vm.network.add -vm $vm -net "VM Network" -net.adapter e1000e govc device.info -vm $vm ethernet-*` } func (cmd *add) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } if err := cmd.NetworkFlag.Process(ctx); err != nil { return err } return nil } func (cmd *add) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachineFlag.VirtualMachine() if err != nil { return err } if vm == nil { return errors.New("please specify a vm") } // Set network if specified as extra argument. if f.NArg() > 0 { _ = cmd.NetworkFlag.Set(f.Arg(0)) } net, err := cmd.NetworkFlag.Device() if err != nil { return err } return vm.AddDevice(ctx, net) } govmomi-0.15.0/govc/vm/network/change.go000066400000000000000000000052651312205533500201060ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package network import ( "context" "errors" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type change struct { *flags.VirtualMachineFlag *flags.NetworkFlag } func init() { cli.Register("vm.network.change", &change{}) } func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) } func (cmd *change) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } if err := cmd.NetworkFlag.Process(ctx); err != nil { return err } return nil } func (cmd *change) Usage() string { return "DEVICE" } func (cmd *change) Description() string { return `Change network DEVICE configuration. Examples: govc vm.network.change -vm $vm -net PG2 ethernet-0 govc vm.network.change -vm $vm -net.address 00:00:0f:2e:5d:69 ethernet-0 govc device.info -vm $vm ethernet-*` } func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachineFlag.VirtualMachine() if err != nil { return err } if vm == nil { return errors.New("please specify a vm") } name := f.Arg(0) if name == "" { return errors.New("please specify a device name") } // Set network if specified as extra argument. if f.NArg() > 1 { _ = cmd.NetworkFlag.Set(f.Arg(1)) } devices, err := vm.Device(ctx) if err != nil { return err } net := devices.Find(name) if net == nil { return fmt.Errorf("device '%s' not found", name) } dev, err := cmd.NetworkFlag.Device() if err != nil { return err } current := net.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() changed := dev.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() current.Backing = changed.Backing if changed.MacAddress != "" { current.MacAddress = changed.MacAddress } if changed.AddressType != "" { current.AddressType = changed.AddressType } return vm.EditDevice(ctx, net) } govmomi-0.15.0/govc/vm/power.go000066400000000000000000000072041312205533500163170ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type power struct { *flags.ClientFlag *flags.SearchFlag On bool Off bool Reset bool Reboot bool Shutdown bool Suspend bool Force bool } func init() { cli.Register("vm.power", &power{}) } func (cmd *power) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.On, "on", false, "Power on") f.BoolVar(&cmd.Off, "off", false, "Power off") f.BoolVar(&cmd.Reset, "reset", false, "Power reset") f.BoolVar(&cmd.Suspend, "suspend", false, "Power suspend") f.BoolVar(&cmd.Reboot, "r", false, "Reboot guest") f.BoolVar(&cmd.Shutdown, "s", false, "Shutdown guest") f.BoolVar(&cmd.Force, "force", false, "Force (ignore state error and hard shutdown/reboot if tools unavailable)") } func (cmd *power) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.SearchFlag.Process(ctx); err != nil { return err } opts := []bool{cmd.On, cmd.Off, cmd.Reset, cmd.Suspend, cmd.Reboot, cmd.Shutdown} selected := false for _, opt := range opts { if opt { if selected { return flag.ErrHelp } selected = opt } } if !selected { return flag.ErrHelp } return nil } func isToolsUnavailable(err error) bool { if soap.IsSoapFault(err) { soapFault := soap.ToSoapFault(err) if _, ok := soapFault.VimFault().(types.ToolsUnavailable); ok { return ok } } return false } func (cmd *power) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } for _, vm := range vms { var task *object.Task switch { case cmd.On: fmt.Fprintf(cmd, "Powering on %s... ", vm.Reference()) task, err = vm.PowerOn(ctx) case cmd.Off: fmt.Fprintf(cmd, "Powering off %s... ", vm.Reference()) task, err = vm.PowerOff(ctx) case cmd.Reset: fmt.Fprintf(cmd, "Reset %s... ", vm.Reference()) task, err = vm.Reset(ctx) case cmd.Suspend: fmt.Fprintf(cmd, "Suspend %s... ", vm.Reference()) task, err = vm.Suspend(ctx) case cmd.Reboot: fmt.Fprintf(cmd, "Reboot guest %s... ", vm.Reference()) err = vm.RebootGuest(ctx) if err != nil && cmd.Force && isToolsUnavailable(err) { task, err = vm.Reset(ctx) } case cmd.Shutdown: fmt.Fprintf(cmd, "Shutdown guest %s... ", vm.Reference()) err = vm.ShutdownGuest(ctx) if err != nil && cmd.Force && isToolsUnavailable(err) { task, err = vm.PowerOff(ctx) } } if err != nil { return err } if task != nil { err = task.Wait(ctx) } if err == nil { fmt.Fprintf(cmd, "OK\n") continue } if cmd.Force { fmt.Fprintf(cmd, "Error: %s\n", err) continue } return err } return nil } govmomi-0.15.0/govc/vm/question.go000066400000000000000000000043251312205533500170330ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "errors" "flag" "fmt" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type question struct { *flags.VirtualMachineFlag answer string } func init() { cli.Register("vm.question", &question{}) } func (cmd *question) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.answer, "answer", "", "Answer to question") } func (cmd *question) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *question) Run(ctx context.Context, f *flag.FlagSet) error { c, err := cmd.Client() if err != nil { return err } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return errors.New("No VM specified") } var mvm mo.VirtualMachine pc := property.DefaultCollector(c) err = pc.RetrieveOne(ctx, vm.Reference(), []string{"runtime.question"}, &mvm) if err != nil { return err } q := mvm.Runtime.Question if q == nil { fmt.Printf("No pending question\n") return nil } // Print question if no answer is specified if cmd.answer == "" { fmt.Printf("Question:\n%s\n\n", q.Text) fmt.Printf("Possible answers:\n") for _, e := range q.Choice.ChoiceInfo { ed := e.(*types.ElementDescription) fmt.Printf("%s) %s\n", ed.Key, ed.Description.Label) } return nil } // Answer question return vm.Answer(ctx, q.Id, cmd.answer) } govmomi-0.15.0/govc/vm/rdm/000077500000000000000000000000001312205533500154135ustar00rootroot00000000000000govmomi-0.15.0/govc/vm/rdm/attach.go000066400000000000000000000072701312205533500172140ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package rdm import ( "context" "flag" "fmt" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type attach struct { *flags.VirtualMachineFlag device string } func init() { cli.Register("vm.rdm.attach", &attach{}) } func (cmd *attach) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.StringVar(&cmd.device, "device", "", "Device Name") } func (cmd *attach) Description() string { return `Attach DEVICE to VM with RDM. Examples: govc vm.rdm.attach -vm VM -device /vmfs/devices/disks/naa.000000000000000000000000000000000` } func (cmd *attach) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } //This piece of code was developped mainly thanks to the project govmax on github.com //This file in particular https://github.com/codedellemc/govmax/blob/master/api/v1/vmomi.go func (cmd *attach) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } devices, err := vm.Device(ctx) if err != nil { return err } controller, err := devices.FindSCSIController("") if err != nil { return err } vmConfigOptions, err := vm.QueryConfigTarget(ctx) if err != nil { return err } for _, scsiDisk := range vmConfigOptions.ScsiDisk { if !strings.Contains(scsiDisk.Disk.CanonicalName, cmd.device) { continue } var backing types.VirtualDiskRawDiskMappingVer1BackingInfo backing.CompatibilityMode = string(types.VirtualDiskCompatibilityModePhysicalMode) backing.DeviceName = scsiDisk.Disk.DeviceName for _, descriptor := range scsiDisk.Disk.Descriptor { if strings.HasPrefix(descriptor.Id, "vml.") { backing.LunUuid = descriptor.Id break } } var device types.VirtualDisk device.Backing = &backing device.ControllerKey = controller.VirtualController.Key var unitNumber *int32 scsiCtrlUnitNumber := controller.VirtualController.UnitNumber var u int32 for u = 0; u < 16; u++ { free := true for _, d := range devices { if d.GetVirtualDevice().ControllerKey == device.GetVirtualDevice().ControllerKey { if u == *(d.GetVirtualDevice().UnitNumber) || u == *scsiCtrlUnitNumber { free = false } } } if free { unitNumber = &u break } } device.UnitNumber = unitNumber spec := types.VirtualMachineConfigSpec{} config := &types.VirtualDeviceConfigSpec{ Device: &device, Operation: types.VirtualDeviceConfigSpecOperationAdd, } config.FileOperation = types.VirtualDeviceConfigSpecFileOperationCreate spec.DeviceChange = append(spec.DeviceChange, config) task, err := vm.Reconfigure(ctx, spec) if err != nil { return err } err = task.Wait(ctx) if err != nil { return fmt.Errorf("Error adding device %+v \n with backing %+v \nLogged Item: %s", device, backing, err) } return nil } return fmt.Errorf("Error: No LUN with device name containing %s found", cmd.device) } govmomi-0.15.0/govc/vm/rdm/ls.go000066400000000000000000000047441312205533500163710ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package rdm import ( "context" "flag" "fmt" "io" "os" "strings" "text/tabwriter" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/types" ) type ls struct { *flags.VirtualMachineFlag *flags.OutputFlag } func init() { cli.Register("vm.rdm.ls", &ls{}) } func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) } func (cmd *ls) Description() string { return `List available devices that could be attach to VM with RDM. Examples: govc vm.rdm.ls -vm VM` } func (cmd *ls) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } if err := cmd.OutputFlag.Process(ctx); err != nil { return err } return nil } func (cmd *ls) Run(ctx context.Context, f *flag.FlagSet) error { vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } vmConfigOptions, err := vm.QueryConfigTarget(ctx) if err != nil { return err } res := infoResult{ Disks: vmConfigOptions.ScsiDisk, } return cmd.WriteResult(&res) } type infoResult struct { Disks []types.VirtualMachineScsiDiskDeviceInfo } func (r *infoResult) Write(w io.Writer) error { tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0) for _, disk := range r.Disks { fmt.Fprintf(tw, "Name:\t%s\n", disk.Name) fmt.Fprintf(tw, " Device name:\t%s\n", disk.Disk.DeviceName) fmt.Fprintf(tw, " Device path:\t%s\n", disk.Disk.DevicePath) fmt.Fprintf(tw, " Canonical Name:\t%s\n", disk.Disk.CanonicalName) var uids []string for _, descriptor := range disk.Disk.Descriptor { uids = append(uids, descriptor.Id) } fmt.Fprintf(tw, " UIDS:\t%s\n", strings.Join(uids, " ,")) } return tw.Flush() } govmomi-0.15.0/govc/vm/register.go000066400000000000000000000072321312205533500170100ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" ) type register struct { *flags.ClientFlag *flags.DatacenterFlag *flags.DatastoreFlag *flags.ResourcePoolFlag *flags.HostSystemFlag *flags.FolderFlag name string template bool Client *vim25.Client Datacenter *object.Datacenter Datastore *object.Datastore ResourcePool *object.ResourcePool HostSystem *object.HostSystem Folder *object.Folder } func init() { cli.Register("vm.register", ®ister{}) } func (cmd *register) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Name of the VM") f.BoolVar(&cmd.template, "as-template", false, "Mark VM as template") } func (cmd *register) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.DatacenterFlag.Process(ctx); err != nil { return err } if err := cmd.DatastoreFlag.Process(ctx); err != nil { return err } if err := cmd.ResourcePoolFlag.Process(ctx); err != nil { return err } if err := cmd.HostSystemFlag.Process(ctx); err != nil { return err } if err := cmd.FolderFlag.Process(ctx); err != nil { return err } return nil } func (cmd *register) Usage() string { return "VMX" } func (cmd *register) Description() string { return `Add an existing VM to the inventory. VMX is a path to the vm config file, relative to DATASTORE. Examples: govc vm.register path/name.vmx` } func (cmd *register) Run(ctx context.Context, f *flag.FlagSet) error { var err error if len(f.Args()) != 1 { return flag.ErrHelp } cmd.Client, err = cmd.ClientFlag.Client() if err != nil { return err } cmd.Datacenter, err = cmd.DatacenterFlag.Datacenter() if err != nil { return err } cmd.Datastore, err = cmd.DatastoreFlag.Datastore() if err != nil { return err } cmd.HostSystem, err = cmd.HostSystemFlag.HostSystemIfSpecified() if err != nil { return err } if cmd.HostSystem != nil { if cmd.ResourcePool, err = cmd.HostSystem.ResourcePool(ctx); err != nil { return err } } else if !cmd.template { if cmd.ResourcePool, err = cmd.ResourcePoolFlag.ResourcePool(); err != nil { return err } } if cmd.Folder, err = cmd.FolderFlag.Folder(); err != nil { return err } path := cmd.Datastore.Path(f.Arg(0)) task, err := cmd.Folder.RegisterVM(ctx, path, cmd.name, cmd.template, cmd.ResourcePool, cmd.HostSystem) if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/vm/snapshot/000077500000000000000000000000001312205533500164705ustar00rootroot00000000000000govmomi-0.15.0/govc/vm/snapshot/create.go000066400000000000000000000036611312205533500202700ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package snapshot import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type create struct { *flags.VirtualMachineFlag description string memory bool quiesce bool } func init() { cli.Register("snapshot.create", &create{}) } func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.memory, "m", true, "Include memory state") f.BoolVar(&cmd.quiesce, "q", false, "Quiesce guest file system") f.StringVar(&cmd.description, "d", "", "Snapshot description") } func (cmd *create) Usage() string { return "NAME" } func (cmd *create) Description() string { return `Create snapshot of VM with NAME. Examples: govc snapshot.create -vm my-vm happy-vm-state` } func (cmd *create) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *create) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } task, err := vm.CreateSnapshot(ctx, f.Arg(0), cmd.description, cmd.memory, cmd.quiesce) if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/vm/snapshot/remove.go000066400000000000000000000041071312205533500203160ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package snapshot import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type remove struct { *flags.VirtualMachineFlag recursive bool consolidate bool } func init() { cli.Register("snapshot.remove", &remove{}) } func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.recursive, "r", false, "Remove snapshot children") f.BoolVar(&cmd.consolidate, "c", true, "Consolidate disks") } func (cmd *remove) Usage() string { return "NAME" } func (cmd *remove) Description() string { return `Remove snapshot of VM with given NAME. NAME can be the snapshot name, tree path, moid or '*' to remove all snapshots. Examples: govc snapshot.remove -vm my-vm happy-vm-state` } func (cmd *remove) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *remove) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 1 { return flag.ErrHelp } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } var task *object.Task if f.Arg(0) == "*" { task, err = vm.RemoveAllSnapshot(ctx, &cmd.consolidate) } else { task, err = vm.RemoveSnapshot(ctx, f.Arg(0), cmd.recursive, &cmd.consolidate) } if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/vm/snapshot/revert.go000066400000000000000000000040431312205533500203270ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package snapshot import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" ) type revert struct { *flags.VirtualMachineFlag suppressPowerOn bool } func init() { cli.Register("snapshot.revert", &revert{}) } func (cmd *revert) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.suppressPowerOn, "s", false, "Suppress power on") } func (cmd *revert) Usage() string { return "[NAME]" } func (cmd *revert) Description() string { return `Revert to snapshot of VM with given NAME. If NAME is not provided, revert to the current snapshot. Otherwise, NAME can be the snapshot name, tree path or moid. Examples: govc snapshot.revert -vm my-vm happy-vm-state` } func (cmd *revert) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *revert) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() > 1 { return flag.ErrHelp } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } var task *object.Task if f.NArg() == 1 { task, err = vm.RevertToSnapshot(ctx, f.Arg(0), cmd.suppressPowerOn) } else { task, err = vm.RevertToCurrentSnapshot(ctx, cmd.suppressPowerOn) } if err != nil { return err } return task.Wait(ctx) } govmomi-0.15.0/govc/vm/snapshot/tree.go000066400000000000000000000061701312205533500177620ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package snapshot import ( "context" "flag" "fmt" "path" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type tree struct { *flags.VirtualMachineFlag fullPath bool current bool date bool id bool info *types.VirtualMachineSnapshotInfo } func init() { cli.Register("snapshot.tree", &tree{}) } func (cmd *tree) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.BoolVar(&cmd.fullPath, "f", false, "Print the full path prefix for snapshot") f.BoolVar(&cmd.current, "c", true, "Print the current snapshot") f.BoolVar(&cmd.date, "D", false, "Print the snapshot creation date") f.BoolVar(&cmd.id, "i", false, "Print the snapshot id") } func (cmd *tree) Description() string { return `List VM snapshots in a tree-like format. The command will exit 0 with no output if VM does not have any snapshots. Examples: govc snapshot.tree -vm my-vm govc snapshot.tree -vm my-vm -D -i` } func (cmd *tree) Process(ctx context.Context) error { if err := cmd.VirtualMachineFlag.Process(ctx); err != nil { return err } return nil } func (cmd *tree) write(level int, parent string, st []types.VirtualMachineSnapshotTree) { for _, s := range st { sname := s.Name if cmd.fullPath && parent != "" { sname = path.Join(parent, sname) } names := []string{sname} if cmd.current && s.Snapshot == *cmd.info.CurrentSnapshot { names = append(names, ".") } for _, name := range names { var attr []string var meta string if cmd.id { attr = append(attr, s.Snapshot.Value) } if cmd.date { attr = append(attr, s.CreateTime.Format("Jan 2 15:04")) } if len(attr) > 0 { meta = fmt.Sprintf("[%s] ", strings.Join(attr, " ")) } fmt.Printf("%s%s%s\n", strings.Repeat(" ", level), meta, name) } cmd.write(level+2, sname, s.ChildSnapshotList) } } func (cmd *tree) Run(ctx context.Context, f *flag.FlagSet) error { if f.NArg() != 0 { return flag.ErrHelp } vm, err := cmd.VirtualMachine() if err != nil { return err } if vm == nil { return flag.ErrHelp } var o mo.VirtualMachine err = vm.Properties(ctx, vm.Reference(), []string{"snapshot"}, &o) if err != nil { return err } if o.Snapshot == nil { return nil } if cmd.current && o.Snapshot.CurrentSnapshot == nil { cmd.current = false } cmd.info = o.Snapshot cmd.write(0, "", o.Snapshot.RootSnapshotList) return nil } govmomi-0.15.0/govc/vm/unregister.go000066400000000000000000000033431312205533500173520ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "flag" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" ) type unregister struct { *flags.ClientFlag *flags.SearchFlag } func init() { cli.Register("vm.unregister", &unregister{}) } func (cmd *unregister) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) } func (cmd *unregister) Process(ctx context.Context) error { if err := cmd.ClientFlag.Process(ctx); err != nil { return err } if err := cmd.SearchFlag.Process(ctx); err != nil { return err } return nil } func (cmd *unregister) Usage() string { return "VM..." } func (cmd *unregister) Description() string { return `Remove VM from inventory without removing any of the VM files on disk.` } func (cmd *unregister) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.VirtualMachines(f.Args()) if err != nil { return err } for _, vm := range vms { err := vm.Unregister(ctx) if err != nil { return err } } return nil } govmomi-0.15.0/govc/vm/vnc.go000066400000000000000000000233321312205533500157510ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vm import ( "context" "encoding/json" "flag" "fmt" "io" "reflect" "regexp" "strconv" "strings" "github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type intRange struct { low, high int } var intRangeRegexp = regexp.MustCompile("^([0-9]+)-([0-9]+)$") func (i *intRange) Set(s string) error { m := intRangeRegexp.FindStringSubmatch(s) if m == nil { return fmt.Errorf("invalid range: %s", s) } low, _ := strconv.Atoi(m[1]) high, _ := strconv.Atoi(m[2]) if low > high { return fmt.Errorf("invalid range: low > high") } i.low = low i.high = high return nil } func (i *intRange) String() string { return fmt.Sprintf("%d-%d", i.low, i.high) } type vnc struct { *flags.SearchFlag Enable bool Disable bool Port int PortRange intRange Password string } func init() { cmd := &vnc{} cmd.PortRange.Set("5900-5999") cli.Register("vm.vnc", cmd) } func (cmd *vnc) Register(ctx context.Context, f *flag.FlagSet) { cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.Enable, "enable", false, "Enable VNC") f.BoolVar(&cmd.Disable, "disable", false, "Disable VNC") f.IntVar(&cmd.Port, "port", -1, "VNC port (-1 for auto-select)") f.Var(&cmd.PortRange, "port-range", "VNC port auto-select range") f.StringVar(&cmd.Password, "password", "", "VNC password") } func (cmd *vnc) Process(ctx context.Context) error { if err := cmd.SearchFlag.Process(ctx); err != nil { return err } // Either may be true or none may be true. if cmd.Enable && cmd.Disable { return flag.ErrHelp } return nil } func (cmd *vnc) Usage() string { return "VM..." } func (cmd *vnc) Description() string { return `Enable or disable VNC for VM. Port numbers are automatically chosen if not specified. If neither -enable or -disable is specified, the current state is returned. Examples: govc vm.vnc -enable -password 1234 $vm | awk '{print $2}' | xargs open` } func (cmd *vnc) Run(ctx context.Context, f *flag.FlagSet) error { vms, err := cmd.loadVMs(f.Args()) if err != nil { return err } // Actuate settings in VMs for _, vm := range vms { switch { case cmd.Enable: vm.enable(cmd.Port, cmd.Password) case cmd.Disable: vm.disable() } } // Reconfigure VMs to reflect updates for _, vm := range vms { err = vm.reconfigure() if err != nil { return err } } return cmd.WriteResult(vncResult(vms)) } func (cmd *vnc) loadVMs(args []string) ([]*vncVM, error) { c, err := cmd.Client() if err != nil { return nil, err } vms, err := cmd.VirtualMachines(args) if err != nil { return nil, err } var vncVMs []*vncVM for _, vm := range vms { v, err := newVNCVM(c, vm) if err != nil { return nil, err } vncVMs = append(vncVMs, v) } // Assign vncHosts to vncVMs hosts := make(map[string]*vncHost) for _, vm := range vncVMs { if h, ok := hosts[vm.hostReference().Value]; ok { vm.host = h continue } hs := object.NewHostSystem(c, vm.hostReference()) h, err := newVNCHost(c, hs, cmd.PortRange.low, cmd.PortRange.high) if err != nil { return nil, err } hosts[vm.hostReference().Value] = h vm.host = h } return vncVMs, nil } type vncVM struct { c *vim25.Client vm *object.VirtualMachine mvm mo.VirtualMachine host *vncHost curOptions vncOptions newOptions vncOptions } func newVNCVM(c *vim25.Client, vm *object.VirtualMachine) (*vncVM, error) { v := &vncVM{ c: c, vm: vm, } virtualMachineProperties := []string{ "name", "config.extraConfig", "runtime.host", } pc := property.DefaultCollector(c) ctx := context.TODO() err := pc.RetrieveOne(ctx, vm.Reference(), virtualMachineProperties, &v.mvm) if err != nil { return nil, err } v.curOptions = vncOptionsFromExtraConfig(v.mvm.Config.ExtraConfig) v.newOptions = vncOptionsFromExtraConfig(v.mvm.Config.ExtraConfig) return v, nil } func (v *vncVM) hostReference() types.ManagedObjectReference { return *v.mvm.Runtime.Host } func (v *vncVM) enable(port int, password string) error { v.newOptions["enabled"] = "true" v.newOptions["port"] = fmt.Sprintf("%d", port) v.newOptions["password"] = password // Find port if auto-select if port == -1 { // Reuse port if If VM already has a port, reuse it. // Otherwise, find unused VNC port on host. if p, ok := v.curOptions["port"]; ok && p != "" { v.newOptions["port"] = p } else { port, err := v.host.popUnusedPort() if err != nil { return err } v.newOptions["port"] = fmt.Sprintf("%d", port) } } return nil } func (v *vncVM) disable() error { v.newOptions["enabled"] = "false" v.newOptions["port"] = "" v.newOptions["password"] = "" return nil } func (v *vncVM) reconfigure() error { if reflect.DeepEqual(v.curOptions, v.newOptions) { // No changes to settings return nil } spec := types.VirtualMachineConfigSpec{ ExtraConfig: v.newOptions.ToExtraConfig(), } ctx := context.TODO() task, err := v.vm.Reconfigure(ctx, spec) if err != nil { return err } return task.Wait(ctx) } func (v *vncVM) uri() (string, error) { ip, err := v.host.managementIP() if err != nil { return "", err } uri := fmt.Sprintf("vnc://:%s@%s:%s", v.newOptions["password"], ip, v.newOptions["port"]) return uri, nil } func (v *vncVM) write(w io.Writer) error { if strings.EqualFold(v.newOptions["enabled"], "true") { uri, err := v.uri() if err != nil { return err } fmt.Printf("%s: %s\n", v.mvm.Name, uri) } else { fmt.Printf("%s: disabled\n", v.mvm.Name) } return nil } type vncHost struct { c *vim25.Client host *object.HostSystem ports map[int]struct{} ip string // This field is populated by `managementIP` } func newVNCHost(c *vim25.Client, host *object.HostSystem, low, high int) (*vncHost, error) { ports := make(map[int]struct{}) for i := low; i <= high; i++ { ports[i] = struct{}{} } used, err := loadUsedPorts(c, host.Reference()) if err != nil { return nil, err } // Remove used ports from range for _, u := range used { delete(ports, u) } h := &vncHost{ c: c, host: host, ports: ports, } return h, nil } func loadUsedPorts(c *vim25.Client, host types.ManagedObjectReference) ([]int, error) { ctx := context.TODO() ospec := types.ObjectSpec{ Obj: host, SelectSet: []types.BaseSelectionSpec{ &types.TraversalSpec{ Type: "HostSystem", Path: "vm", Skip: types.NewBool(false), }, }, Skip: types.NewBool(false), } pspec := types.PropertySpec{ Type: "VirtualMachine", PathSet: []string{"config.extraConfig"}, } req := types.RetrieveProperties{ This: c.ServiceContent.PropertyCollector, SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: []types.PropertySpec{pspec}, }, }, } var vms []mo.VirtualMachine err := mo.RetrievePropertiesForRequest(ctx, c, req, &vms) if err != nil { return nil, err } var ports []int for _, vm := range vms { if vm.Config == nil || vm.Config.ExtraConfig == nil { continue } options := vncOptionsFromExtraConfig(vm.Config.ExtraConfig) if ps, ok := options["port"]; ok && ps != "" { pi, err := strconv.Atoi(ps) if err == nil { ports = append(ports, pi) } } } return ports, nil } func (h *vncHost) popUnusedPort() (int, error) { if len(h.ports) == 0 { return 0, fmt.Errorf("no unused ports in range") } // Return first port we get when iterating var port int for port = range h.ports { break } delete(h.ports, port) return port, nil } func (h *vncHost) managementIP() (string, error) { ctx := context.TODO() if h.ip != "" { return h.ip, nil } ips, err := h.host.ManagementIPs(ctx) if err != nil { return "", err } if len(ips) > 0 { h.ip = ips[0].String() } else { h.ip = "" } return h.ip, nil } type vncResult []*vncVM func (vms vncResult) MarshalJSON() ([]byte, error) { out := make(map[string]string) for _, vm := range vms { uri, err := vm.uri() if err != nil { return nil, err } out[vm.mvm.Name] = uri } return json.Marshal(out) } func (vms vncResult) Write(w io.Writer) error { for _, vm := range vms { err := vm.write(w) if err != nil { return err } } return nil } type vncOptions map[string]string var vncPrefix = "RemoteDisplay.vnc." func vncOptionsFromExtraConfig(ov []types.BaseOptionValue) vncOptions { vo := make(vncOptions) for _, b := range ov { o := b.GetOptionValue() if strings.HasPrefix(o.Key, vncPrefix) { key := o.Key[len(vncPrefix):] if key != "key" { vo[key] = o.Value.(string) } } } return vo } func (vo vncOptions) ToExtraConfig() []types.BaseOptionValue { ov := make([]types.BaseOptionValue, 0, 0) for k, v := range vo { key := vncPrefix + k value := v o := types.OptionValue{ Key: key, Value: &value, // Pass pointer to avoid omitempty } ov = append(ov, &o) } // Don't know how to deal with the key option, set it to be empty... o := types.OptionValue{ Key: vncPrefix + "key", Value: new(string), // Pass pointer to avoid omitempty } ov = append(ov, &o) return ov } govmomi-0.15.0/guest/000077500000000000000000000000001312205533500144005ustar00rootroot00000000000000govmomi-0.15.0/guest/auth_manager.go000066400000000000000000000037211312205533500173650ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type AuthManager struct { types.ManagedObjectReference vm types.ManagedObjectReference c *vim25.Client } func (m AuthManager) Reference() types.ManagedObjectReference { return m.ManagedObjectReference } func (m AuthManager) AcquireCredentials(ctx context.Context, requestedAuth types.BaseGuestAuthentication, sessionID int64) (types.BaseGuestAuthentication, error) { req := types.AcquireCredentialsInGuest{ This: m.Reference(), Vm: m.vm, RequestedAuth: requestedAuth, SessionID: sessionID, } res, err := methods.AcquireCredentialsInGuest(ctx, m.c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (m AuthManager) ReleaseCredentials(ctx context.Context, auth types.BaseGuestAuthentication) error { req := types.ReleaseCredentialsInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, } _, err := methods.ReleaseCredentialsInGuest(ctx, m.c, &req) return err } func (m AuthManager) ValidateCredentials(ctx context.Context, auth types.BaseGuestAuthentication) error { req := types.ValidateCredentialsInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, } _, err := methods.ValidateCredentialsInGuest(ctx, m.c, &req) if err != nil { return err } return nil } govmomi-0.15.0/guest/file_manager.go000066400000000000000000000141641312205533500173460ustar00rootroot00000000000000/* Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "net/url" "strings" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type FileManager struct { types.ManagedObjectReference vm types.ManagedObjectReference c *vim25.Client } func (m FileManager) Reference() types.ManagedObjectReference { return m.ManagedObjectReference } func (m FileManager) ChangeFileAttributes(ctx context.Context, auth types.BaseGuestAuthentication, guestFilePath string, fileAttributes types.BaseGuestFileAttributes) error { req := types.ChangeFileAttributesInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, GuestFilePath: guestFilePath, FileAttributes: fileAttributes, } _, err := methods.ChangeFileAttributesInGuest(ctx, m.c, &req) return err } func (m FileManager) CreateTemporaryDirectory(ctx context.Context, auth types.BaseGuestAuthentication, prefix, suffix string, path string) (string, error) { req := types.CreateTemporaryDirectoryInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, Prefix: prefix, Suffix: suffix, DirectoryPath: path, } res, err := methods.CreateTemporaryDirectoryInGuest(ctx, m.c, &req) if err != nil { return "", err } return res.Returnval, nil } func (m FileManager) CreateTemporaryFile(ctx context.Context, auth types.BaseGuestAuthentication, prefix, suffix string, path string) (string, error) { req := types.CreateTemporaryFileInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, Prefix: prefix, Suffix: suffix, DirectoryPath: path, } res, err := methods.CreateTemporaryFileInGuest(ctx, m.c, &req) if err != nil { return "", err } return res.Returnval, nil } func (m FileManager) DeleteDirectory(ctx context.Context, auth types.BaseGuestAuthentication, directoryPath string, recursive bool) error { req := types.DeleteDirectoryInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, DirectoryPath: directoryPath, Recursive: recursive, } _, err := methods.DeleteDirectoryInGuest(ctx, m.c, &req) return err } func (m FileManager) DeleteFile(ctx context.Context, auth types.BaseGuestAuthentication, filePath string) error { req := types.DeleteFileInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, FilePath: filePath, } _, err := methods.DeleteFileInGuest(ctx, m.c, &req) return err } func (m FileManager) InitiateFileTransferFromGuest(ctx context.Context, auth types.BaseGuestAuthentication, guestFilePath string) (*types.FileTransferInformation, error) { req := types.InitiateFileTransferFromGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, GuestFilePath: guestFilePath, } res, err := methods.InitiateFileTransferFromGuest(ctx, m.c, &req) if err != nil { return nil, err } if strings.HasSuffix(guestFilePath, "/") { // Propagate the trailing '/' for directory download support, see soap.directoryReader u, err := url.Parse(res.Returnval.Url) if err == nil { u.Path += "/" res.Returnval.Url = u.String() } } return &res.Returnval, nil } func (m FileManager) InitiateFileTransferToGuest(ctx context.Context, auth types.BaseGuestAuthentication, guestFilePath string, fileAttributes types.BaseGuestFileAttributes, fileSize int64, overwrite bool) (string, error) { req := types.InitiateFileTransferToGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, GuestFilePath: guestFilePath, FileAttributes: fileAttributes, FileSize: fileSize, Overwrite: overwrite, } res, err := methods.InitiateFileTransferToGuest(ctx, m.c, &req) if err != nil { return "", err } return res.Returnval, nil } func (m FileManager) ListFiles(ctx context.Context, auth types.BaseGuestAuthentication, filePath string, index int32, maxResults int32, matchPattern string) (*types.GuestListFileInfo, error) { req := types.ListFilesInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, FilePath: filePath, Index: index, MaxResults: maxResults, MatchPattern: matchPattern, } res, err := methods.ListFilesInGuest(ctx, m.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (m FileManager) MakeDirectory(ctx context.Context, auth types.BaseGuestAuthentication, directoryPath string, createParentDirectories bool) error { req := types.MakeDirectoryInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, DirectoryPath: directoryPath, CreateParentDirectories: createParentDirectories, } _, err := methods.MakeDirectoryInGuest(ctx, m.c, &req) return err } func (m FileManager) MoveDirectory(ctx context.Context, auth types.BaseGuestAuthentication, srcDirectoryPath string, dstDirectoryPath string) error { req := types.MoveDirectoryInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, SrcDirectoryPath: srcDirectoryPath, DstDirectoryPath: dstDirectoryPath, } _, err := methods.MoveDirectoryInGuest(ctx, m.c, &req) return err } func (m FileManager) MoveFile(ctx context.Context, auth types.BaseGuestAuthentication, srcFilePath string, dstFilePath string, overwrite bool) error { req := types.MoveFileInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, SrcFilePath: srcFilePath, DstFilePath: dstFilePath, Overwrite: overwrite, } _, err := methods.MoveFileInGuest(ctx, m.c, &req) return err } govmomi-0.15.0/guest/operations_manager.go000066400000000000000000000037541312205533500206150ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type OperationsManager struct { c *vim25.Client vm types.ManagedObjectReference } func NewOperationsManager(c *vim25.Client, vm types.ManagedObjectReference) *OperationsManager { return &OperationsManager{c, vm} } func (m OperationsManager) retrieveOne(ctx context.Context, p string, dst *mo.GuestOperationsManager) error { pc := property.DefaultCollector(m.c) return pc.RetrieveOne(ctx, *m.c.ServiceContent.GuestOperationsManager, []string{p}, dst) } func (m OperationsManager) AuthManager(ctx context.Context) (*AuthManager, error) { var g mo.GuestOperationsManager err := m.retrieveOne(ctx, "authManager", &g) if err != nil { return nil, err } return &AuthManager{*g.AuthManager, m.vm, m.c}, nil } func (m OperationsManager) FileManager(ctx context.Context) (*FileManager, error) { var g mo.GuestOperationsManager err := m.retrieveOne(ctx, "fileManager", &g) if err != nil { return nil, err } return &FileManager{*g.FileManager, m.vm, m.c}, nil } func (m OperationsManager) ProcessManager(ctx context.Context) (*ProcessManager, error) { var g mo.GuestOperationsManager err := m.retrieveOne(ctx, "processManager", &g) if err != nil { return nil, err } return &ProcessManager{*g.ProcessManager, m.vm, m.c}, nil } govmomi-0.15.0/guest/process_manager.go000066400000000000000000000045441312205533500201060ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package guest import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type ProcessManager struct { types.ManagedObjectReference vm types.ManagedObjectReference c *vim25.Client } func (m ProcessManager) Reference() types.ManagedObjectReference { return m.ManagedObjectReference } func (m ProcessManager) ListProcesses(ctx context.Context, auth types.BaseGuestAuthentication, pids []int64) ([]types.GuestProcessInfo, error) { req := types.ListProcessesInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, Pids: pids, } res, err := methods.ListProcessesInGuest(ctx, m.c, &req) if err != nil { return nil, err } return res.Returnval, err } func (m ProcessManager) ReadEnvironmentVariable(ctx context.Context, auth types.BaseGuestAuthentication, names []string) ([]string, error) { req := types.ReadEnvironmentVariableInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, Names: names, } res, err := methods.ReadEnvironmentVariableInGuest(ctx, m.c, &req) if err != nil { return nil, err } return res.Returnval, err } func (m ProcessManager) StartProgram(ctx context.Context, auth types.BaseGuestAuthentication, spec types.BaseGuestProgramSpec) (int64, error) { req := types.StartProgramInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, Spec: spec, } res, err := methods.StartProgramInGuest(ctx, m.c, &req) if err != nil { return 0, err } return res.Returnval, err } func (m ProcessManager) TerminateProcess(ctx context.Context, auth types.BaseGuestAuthentication, pid int64) error { req := types.TerminateProcessInGuest{ This: m.Reference(), Vm: m.vm, Auth: auth, Pid: pid, } _, err := methods.TerminateProcessInGuest(ctx, m.c, &req) return err } govmomi-0.15.0/license/000077500000000000000000000000001312205533500146735ustar00rootroot00000000000000govmomi-0.15.0/license/assignment_manager.go000066400000000000000000000034241312205533500210670ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type AssignmentManager struct { object.Common } func (m AssignmentManager) QueryAssigned(ctx context.Context, id string) ([]types.LicenseAssignmentManagerLicenseAssignment, error) { req := types.QueryAssignedLicenses{ This: m.Reference(), EntityId: id, } res, err := methods.QueryAssignedLicenses(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m AssignmentManager) Remove(ctx context.Context, id string) error { req := types.RemoveAssignedLicense{ This: m.Reference(), EntityId: id, } _, err := methods.RemoveAssignedLicense(ctx, m.Client(), &req) return err } func (m AssignmentManager) Update(ctx context.Context, id string, key string, name string) (*types.LicenseManagerLicenseInfo, error) { req := types.UpdateAssignedLicense{ This: m.Reference(), Entity: id, LicenseKey: key, EntityDisplayName: name, } res, err := methods.UpdateAssignedLicense(ctx, m.Client(), &req) if err != nil { return nil, err } return &res.Returnval, nil } govmomi-0.15.0/license/manager.go000066400000000000000000000102721312205533500166360ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package license import ( "context" "strconv" "strings" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type Manager struct { object.Common } func NewManager(c *vim25.Client) *Manager { m := Manager{ object.NewCommon(c, *c.ServiceContent.LicenseManager), } return &m } func mapToKeyValueSlice(m map[string]string) []types.KeyValue { r := make([]types.KeyValue, len(m)) for k, v := range m { r = append(r, types.KeyValue{Key: k, Value: v}) } return r } func (m Manager) Add(ctx context.Context, key string, labels map[string]string) (types.LicenseManagerLicenseInfo, error) { req := types.AddLicense{ This: m.Reference(), LicenseKey: key, Labels: mapToKeyValueSlice(labels), } res, err := methods.AddLicense(ctx, m.Client(), &req) if err != nil { return types.LicenseManagerLicenseInfo{}, err } return res.Returnval, nil } func (m Manager) Decode(ctx context.Context, key string) (types.LicenseManagerLicenseInfo, error) { req := types.DecodeLicense{ This: m.Reference(), LicenseKey: key, } res, err := methods.DecodeLicense(ctx, m.Client(), &req) if err != nil { return types.LicenseManagerLicenseInfo{}, err } return res.Returnval, nil } func (m Manager) Remove(ctx context.Context, key string) error { req := types.RemoveLicense{ This: m.Reference(), LicenseKey: key, } _, err := methods.RemoveLicense(ctx, m.Client(), &req) return err } func (m Manager) Update(ctx context.Context, key string, labels map[string]string) (types.LicenseManagerLicenseInfo, error) { req := types.UpdateLicense{ This: m.Reference(), LicenseKey: key, Labels: mapToKeyValueSlice(labels), } res, err := methods.UpdateLicense(ctx, m.Client(), &req) if err != nil { return types.LicenseManagerLicenseInfo{}, err } return res.Returnval, nil } func (m Manager) List(ctx context.Context) (InfoList, error) { var mlm mo.LicenseManager err := m.Properties(ctx, m.Reference(), []string{"licenses"}, &mlm) if err != nil { return nil, err } return InfoList(mlm.Licenses), nil } func (m Manager) AssignmentManager(ctx context.Context) (*AssignmentManager, error) { var mlm mo.LicenseManager err := m.Properties(ctx, m.Reference(), []string{"licenseAssignmentManager"}, &mlm) if err != nil { return nil, err } if mlm.LicenseAssignmentManager == nil { return nil, object.ErrNotSupported } am := AssignmentManager{ object.NewCommon(m.Client(), *mlm.LicenseAssignmentManager), } return &am, nil } type licenseFeature struct { name string level int } func parseLicenseFeature(feature string) *licenseFeature { lf := new(licenseFeature) f := strings.Split(feature, ":") lf.name = f[0] if len(f) > 1 { var err error lf.level, err = strconv.Atoi(f[1]) if err != nil { lf.name = feature } } return lf } func HasFeature(license types.LicenseManagerLicenseInfo, key string) bool { feature := parseLicenseFeature(key) for _, p := range license.Properties { if p.Key != "feature" { continue } kv, ok := p.Value.(types.KeyValue) if !ok { continue } lf := parseLicenseFeature(kv.Key) if lf.name == feature.name && lf.level >= feature.level { return true } } return false } // InfoList provides helper methods for []types.LicenseManagerLicenseInfo type InfoList []types.LicenseManagerLicenseInfo func (l InfoList) WithFeature(key string) InfoList { var result InfoList for _, license := range l { if HasFeature(license, key) { result = append(result, license) } } return result } govmomi-0.15.0/list/000077500000000000000000000000001312205533500142245ustar00rootroot00000000000000govmomi-0.15.0/list/lister.go000066400000000000000000000274521312205533500160670ustar00rootroot00000000000000/* Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package list import ( "context" "fmt" "path" "reflect" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type Element struct { Path string Object mo.Reference } func (e Element) String() string { return fmt.Sprintf("%s @ %s", e.Object.Reference(), e.Path) } func ToElement(r mo.Reference, prefix string) Element { var name string // Comments about types to be expected in folders copied from the // documentation of the Folder managed object: // http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vim.Folder.html switch m := r.(type) { case mo.Folder: name = m.Name case mo.StoragePod: name = m.Name // { "vim.Datacenter" } - Identifies the root folder and its descendant // folders. Data center folders can contain child data center folders and // Datacenter managed objects. Datacenter objects contain virtual machine, // compute resource, network entity, and datastore folders. case mo.Datacenter: name = m.Name // { "vim.Virtualmachine", "vim.VirtualApp" } - Identifies a virtual machine // folder. A virtual machine folder may contain child virtual machine // folders. It also can contain VirtualMachine managed objects, templates, // and VirtualApp managed objects. case mo.VirtualMachine: name = m.Name case mo.VirtualApp: name = m.Name // { "vim.ComputeResource" } - Identifies a compute resource // folder, which contains child compute resource folders and ComputeResource // hierarchies. case mo.ComputeResource: name = m.Name case mo.ClusterComputeResource: name = m.Name case mo.HostSystem: name = m.Name case mo.ResourcePool: name = m.Name // { "vim.Network" } - Identifies a network entity folder. // Network entity folders on a vCenter Server can contain Network, // DistributedVirtualSwitch, and DistributedVirtualPortgroup managed objects. // Network entity folders on an ESXi host can contain only Network objects. case mo.Network: name = m.Name case mo.OpaqueNetwork: name = m.Name case mo.DistributedVirtualSwitch: name = m.Name case mo.DistributedVirtualPortgroup: name = m.Name case mo.VmwareDistributedVirtualSwitch: name = m.Name // { "vim.Datastore" } - Identifies a datastore folder. Datastore folders can // contain child datastore folders and Datastore managed objects. case mo.Datastore: name = m.Name default: panic("not implemented for type " + reflect.TypeOf(r).String()) } e := Element{ Path: path.Join(prefix, name), Object: r, } return e } type Lister struct { Collector *property.Collector Reference types.ManagedObjectReference Prefix string All bool } func (l Lister) retrieveProperties(ctx context.Context, req types.RetrieveProperties, dst *[]interface{}) error { res, err := l.Collector.RetrieveProperties(ctx, req) if err != nil { return err } // Instead of using mo.LoadRetrievePropertiesResponse, use a custom loop to // iterate over the results and ignore entries that have properties that // could not be retrieved (a non-empty `missingSet` property). Since the // returned objects are enumerated by vSphere in the first place, any object // that has a non-empty `missingSet` property is indicative of a race // condition in vSphere where the object was enumerated initially, but was // removed before its properties could be collected. for _, p := range res.Returnval { v, err := mo.ObjectContentToType(p) if err != nil { // Ignore fault if it is ManagedObjectNotFound if soap.IsVimFault(err) { switch soap.ToVimFault(err).(type) { case *types.ManagedObjectNotFound: continue } } return err } *dst = append(*dst, v) } return nil } func (l Lister) List(ctx context.Context) ([]Element, error) { switch l.Reference.Type { case "Folder", "StoragePod": return l.ListFolder(ctx) case "Datacenter": return l.ListDatacenter(ctx) case "ComputeResource", "ClusterComputeResource": // Treat ComputeResource and ClusterComputeResource as one and the same. // It doesn't matter from the perspective of the lister. return l.ListComputeResource(ctx) case "ResourcePool": return l.ListResourcePool(ctx) case "HostSystem": return l.ListHostSystem(ctx) case "VirtualApp": return l.ListVirtualApp(ctx) default: return nil, fmt.Errorf("cannot traverse type " + l.Reference.Type) } } func (l Lister) ListFolder(ctx context.Context) ([]Element, error) { spec := types.PropertyFilterSpec{ ObjectSet: []types.ObjectSpec{ { Obj: l.Reference, SelectSet: []types.BaseSelectionSpec{ &types.TraversalSpec{ Path: "childEntity", Skip: types.NewBool(false), Type: "Folder", }, }, Skip: types.NewBool(true), }, }, } // Retrieve all objects that we can deal with childTypes := []string{ "Folder", "Datacenter", "VirtualApp", "VirtualMachine", "Network", "ComputeResource", "ClusterComputeResource", "Datastore", "DistributedVirtualSwitch", } for _, t := range childTypes { pspec := types.PropertySpec{ Type: t, } if l.All { pspec.All = types.NewBool(true) } else { pspec.PathSet = []string{"name"} // Additional basic properties. switch t { case "Folder": pspec.PathSet = append(pspec.PathSet, "childType") case "ComputeResource", "ClusterComputeResource": // The ComputeResource and ClusterComputeResource are dereferenced in // the ResourcePoolFlag. Make sure they always have their resourcePool // field populated. pspec.PathSet = append(pspec.PathSet, "resourcePool") } } spec.PropSet = append(spec.PropSet, pspec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{spec}, } var dst []interface{} err := l.retrieveProperties(ctx, req, &dst) if err != nil { return nil, err } es := []Element{} for _, v := range dst { es = append(es, ToElement(v.(mo.Reference), l.Prefix)) } return es, nil } func (l Lister) ListDatacenter(ctx context.Context) ([]Element, error) { ospec := types.ObjectSpec{ Obj: l.Reference, Skip: types.NewBool(true), } // Include every datastore folder in the select set fields := []string{ "vmFolder", "hostFolder", "datastoreFolder", "networkFolder", } for _, f := range fields { tspec := types.TraversalSpec{ Path: f, Skip: types.NewBool(false), Type: "Datacenter", } ospec.SelectSet = append(ospec.SelectSet, &tspec) } pspec := types.PropertySpec{ Type: "Folder", } if l.All { pspec.All = types.NewBool(true) } else { pspec.PathSet = []string{"name", "childType"} } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: []types.PropertySpec{pspec}, }, }, } var dst []interface{} err := l.retrieveProperties(ctx, req, &dst) if err != nil { return nil, err } es := []Element{} for _, v := range dst { es = append(es, ToElement(v.(mo.Reference), l.Prefix)) } return es, nil } func (l Lister) ListComputeResource(ctx context.Context) ([]Element, error) { ospec := types.ObjectSpec{ Obj: l.Reference, Skip: types.NewBool(true), } fields := []string{ "host", "resourcePool", } for _, f := range fields { tspec := types.TraversalSpec{ Path: f, Skip: types.NewBool(false), Type: "ComputeResource", } ospec.SelectSet = append(ospec.SelectSet, &tspec) } childTypes := []string{ "HostSystem", "ResourcePool", } var pspecs []types.PropertySpec for _, t := range childTypes { pspec := types.PropertySpec{ Type: t, } if l.All { pspec.All = types.NewBool(true) } else { pspec.PathSet = []string{"name"} } pspecs = append(pspecs, pspec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: pspecs, }, }, } var dst []interface{} err := l.retrieveProperties(ctx, req, &dst) if err != nil { return nil, err } es := []Element{} for _, v := range dst { es = append(es, ToElement(v.(mo.Reference), l.Prefix)) } return es, nil } func (l Lister) ListResourcePool(ctx context.Context) ([]Element, error) { ospec := types.ObjectSpec{ Obj: l.Reference, Skip: types.NewBool(true), } fields := []string{ "resourcePool", } for _, f := range fields { tspec := types.TraversalSpec{ Path: f, Skip: types.NewBool(false), Type: "ResourcePool", } ospec.SelectSet = append(ospec.SelectSet, &tspec) } childTypes := []string{ "ResourcePool", } var pspecs []types.PropertySpec for _, t := range childTypes { pspec := types.PropertySpec{ Type: t, } if l.All { pspec.All = types.NewBool(true) } else { pspec.PathSet = []string{"name"} } pspecs = append(pspecs, pspec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: pspecs, }, }, } var dst []interface{} err := l.retrieveProperties(ctx, req, &dst) if err != nil { return nil, err } es := []Element{} for _, v := range dst { es = append(es, ToElement(v.(mo.Reference), l.Prefix)) } return es, nil } func (l Lister) ListHostSystem(ctx context.Context) ([]Element, error) { ospec := types.ObjectSpec{ Obj: l.Reference, Skip: types.NewBool(true), } fields := []string{ "datastore", "network", "vm", } for _, f := range fields { tspec := types.TraversalSpec{ Path: f, Skip: types.NewBool(false), Type: "HostSystem", } ospec.SelectSet = append(ospec.SelectSet, &tspec) } childTypes := []string{ "Datastore", "Network", "VirtualMachine", } var pspecs []types.PropertySpec for _, t := range childTypes { pspec := types.PropertySpec{ Type: t, } if l.All { pspec.All = types.NewBool(true) } else { pspec.PathSet = []string{"name"} } pspecs = append(pspecs, pspec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: pspecs, }, }, } var dst []interface{} err := l.retrieveProperties(ctx, req, &dst) if err != nil { return nil, err } es := []Element{} for _, v := range dst { es = append(es, ToElement(v.(mo.Reference), l.Prefix)) } return es, nil } func (l Lister) ListVirtualApp(ctx context.Context) ([]Element, error) { ospec := types.ObjectSpec{ Obj: l.Reference, Skip: types.NewBool(true), } fields := []string{ "resourcePool", "vm", } for _, f := range fields { tspec := types.TraversalSpec{ Path: f, Skip: types.NewBool(false), Type: "VirtualApp", } ospec.SelectSet = append(ospec.SelectSet, &tspec) } childTypes := []string{ "ResourcePool", "VirtualMachine", } var pspecs []types.PropertySpec for _, t := range childTypes { pspec := types.PropertySpec{ Type: t, } if l.All { pspec.All = types.NewBool(true) } else { pspec.PathSet = []string{"name"} } pspecs = append(pspecs, pspec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: pspecs, }, }, } var dst []interface{} err := l.retrieveProperties(ctx, req, &dst) if err != nil { return nil, err } es := []Element{} for _, v := range dst { es = append(es, ToElement(v.(mo.Reference), l.Prefix)) } return es, nil } govmomi-0.15.0/list/path.go000066400000000000000000000016311312205533500155100ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package list import ( "path" "strings" ) func ToParts(p string) []string { p = path.Clean(p) if p == "/" { return []string{} } if len(p) > 0 { // Prefix ./ if relative if p[0] != '/' && p[0] != '.' { p = "./" + p } } ps := strings.Split(p, "/") if ps[0] == "" { // Start at root ps = ps[1:] } return ps } govmomi-0.15.0/list/path_test.go000066400000000000000000000031721312205533500165510ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package list import ( "reflect" "testing" ) func TestToParts(t *testing.T) { tests := []struct { In string Out []string }{ { In: "/", Out: []string{}, }, { In: "/foo", Out: []string{"foo"}, }, { In: "/foo/..", Out: []string{}, }, { In: "/./foo", Out: []string{"foo"}, }, { In: "/../foo", Out: []string{"foo"}, }, { In: "/foo/bar", Out: []string{"foo", "bar"}, }, { In: "/foo/bar/..", Out: []string{"foo"}, }, { In: "", Out: []string{"."}, }, { In: ".", Out: []string{"."}, }, { In: "foo", Out: []string{".", "foo"}, }, { In: "foo/..", Out: []string{"."}, }, { In: "./foo", Out: []string{".", "foo"}, }, { In: "../foo", // Special case... Out: []string{"..", "foo"}, }, { In: "foo/bar/..", Out: []string{".", "foo"}, }, } for _, test := range tests { out := ToParts(test.In) if !reflect.DeepEqual(test.Out, out) { t.Errorf("Expected %s to return: %#v, actual: %#v", test.In, test.Out, out) } } } govmomi-0.15.0/object/000077500000000000000000000000001312205533500145175ustar00rootroot00000000000000govmomi-0.15.0/object/authorization_manager.go000066400000000000000000000104071312205533500214420ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type AuthorizationManager struct { Common } func NewAuthorizationManager(c *vim25.Client) *AuthorizationManager { m := AuthorizationManager{ Common: NewCommon(c, *c.ServiceContent.AuthorizationManager), } return &m } type AuthorizationRoleList []types.AuthorizationRole func (l AuthorizationRoleList) ById(id int32) *types.AuthorizationRole { for _, role := range l { if role.RoleId == id { return &role } } return nil } func (l AuthorizationRoleList) ByName(name string) *types.AuthorizationRole { for _, role := range l { if role.Name == name { return &role } } return nil } func (m AuthorizationManager) RoleList(ctx context.Context) (AuthorizationRoleList, error) { var am mo.AuthorizationManager err := m.Properties(ctx, m.Reference(), []string{"roleList"}, &am) if err != nil { return nil, err } return AuthorizationRoleList(am.RoleList), nil } func (m AuthorizationManager) RetrieveEntityPermissions(ctx context.Context, entity types.ManagedObjectReference, inherited bool) ([]types.Permission, error) { req := types.RetrieveEntityPermissions{ This: m.Reference(), Entity: entity, Inherited: inherited, } res, err := methods.RetrieveEntityPermissions(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m AuthorizationManager) RemoveEntityPermission(ctx context.Context, entity types.ManagedObjectReference, user string, isGroup bool) error { req := types.RemoveEntityPermission{ This: m.Reference(), Entity: entity, User: user, IsGroup: isGroup, } _, err := methods.RemoveEntityPermission(ctx, m.Client(), &req) return err } func (m AuthorizationManager) SetEntityPermissions(ctx context.Context, entity types.ManagedObjectReference, permission []types.Permission) error { req := types.SetEntityPermissions{ This: m.Reference(), Entity: entity, Permission: permission, } _, err := methods.SetEntityPermissions(ctx, m.Client(), &req) return err } func (m AuthorizationManager) RetrieveRolePermissions(ctx context.Context, id int32) ([]types.Permission, error) { req := types.RetrieveRolePermissions{ This: m.Reference(), RoleId: id, } res, err := methods.RetrieveRolePermissions(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m AuthorizationManager) RetrieveAllPermissions(ctx context.Context) ([]types.Permission, error) { req := types.RetrieveAllPermissions{ This: m.Reference(), } res, err := methods.RetrieveAllPermissions(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m AuthorizationManager) AddRole(ctx context.Context, name string, ids []string) (int32, error) { req := types.AddAuthorizationRole{ This: m.Reference(), Name: name, PrivIds: ids, } res, err := methods.AddAuthorizationRole(ctx, m.Client(), &req) if err != nil { return -1, err } return res.Returnval, nil } func (m AuthorizationManager) RemoveRole(ctx context.Context, id int32, failIfUsed bool) error { req := types.RemoveAuthorizationRole{ This: m.Reference(), RoleId: id, FailIfUsed: failIfUsed, } _, err := methods.RemoveAuthorizationRole(ctx, m.Client(), &req) return err } func (m AuthorizationManager) UpdateRole(ctx context.Context, id int32, name string, ids []string) error { req := types.UpdateAuthorizationRole{ This: m.Reference(), RoleId: id, NewName: name, PrivIds: ids, } _, err := methods.UpdateAuthorizationRole(ctx, m.Client(), &req) return err } govmomi-0.15.0/object/authorization_manager_internal.go000066400000000000000000000054221312205533500233370ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type DisabledMethodRequest struct { Method string `xml:"method"` Reason string `xml:"reasonId"` } type disableMethodsRequest struct { This types.ManagedObjectReference `xml:"_this"` Entity []types.ManagedObjectReference `xml:"entity"` Method []DisabledMethodRequest `xml:"method"` Source string `xml:"sourceId"` Scope bool `xml:"sessionScope,omitempty"` } type disableMethodsBody struct { Req *disableMethodsRequest `xml:"urn:internalvim25 DisableMethods,omitempty"` Res interface{} `xml:"urn:vim25 DisableMethodsResponse,omitempty"` Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *disableMethodsBody) Fault() *soap.Fault { return b.Err } func (m AuthorizationManager) DisableMethods(ctx context.Context, entity []types.ManagedObjectReference, method []DisabledMethodRequest, source string) error { var reqBody, resBody disableMethodsBody reqBody.Req = &disableMethodsRequest{ This: m.Reference(), Entity: entity, Method: method, Source: source, } return m.Client().RoundTrip(ctx, &reqBody, &resBody) } type enableMethodsRequest struct { This types.ManagedObjectReference `xml:"_this"` Entity []types.ManagedObjectReference `xml:"entity"` Method []string `xml:"method"` Source string `xml:"sourceId"` } type enableMethodsBody struct { Req *enableMethodsRequest `xml:"urn:internalvim25 EnableMethods,omitempty"` Res interface{} `xml:"urn:vim25 EnableMethodsResponse,omitempty"` Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *enableMethodsBody) Fault() *soap.Fault { return b.Err } func (m AuthorizationManager) EnableMethods(ctx context.Context, entity []types.ManagedObjectReference, method []string, source string) error { var reqBody, resBody enableMethodsBody reqBody.Req = &enableMethodsRequest{ This: m.Reference(), Entity: entity, Method: method, Source: source, } return m.Client().RoundTrip(ctx, &reqBody, &resBody) } govmomi-0.15.0/object/cluster_compute_resource.go000066400000000000000000000041671312205533500222020ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type ClusterComputeResource struct { ComputeResource } func NewClusterComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ClusterComputeResource { return &ClusterComputeResource{ ComputeResource: *NewComputeResource(c, ref), } } func (c ClusterComputeResource) ReconfigureCluster(ctx context.Context, spec types.ClusterConfigSpec) (*Task, error) { req := types.ReconfigureCluster_Task{ This: c.Reference(), Spec: spec, Modify: true, } res, err := methods.ReconfigureCluster_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } func (c ClusterComputeResource) AddHost(ctx context.Context, spec types.HostConnectSpec, asConnected bool, license *string, resourcePool *types.ManagedObjectReference) (*Task, error) { req := types.AddHost_Task{ This: c.Reference(), Spec: spec, AsConnected: asConnected, } if license != nil { req.License = *license } if resourcePool != nil { req.ResourcePool = resourcePool } res, err := methods.AddHost_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } func (c ClusterComputeResource) Destroy(ctx context.Context) (*Task, error) { req := types.Destroy_Task{ This: c.Reference(), } res, err := methods.Destroy_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } govmomi-0.15.0/object/cluster_compute_resource_test.go000066400000000000000000000013011312205533500232240ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // ComputeResource should implement the Reference interface. var _ Reference = ClusterComputeResource{} govmomi-0.15.0/object/common.go000066400000000000000000000055241312205533500163440ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "errors" "fmt" "path" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) var ( ErrNotSupported = errors.New("product/version specific feature not supported by target") ) // Common contains the fields and functions common to all objects. type Common struct { InventoryPath string c *vim25.Client r types.ManagedObjectReference } func (c Common) String() string { ref := fmt.Sprintf("%v", c.Reference()) if c.InventoryPath == "" { return ref } return fmt.Sprintf("%s @ %s", ref, c.InventoryPath) } func NewCommon(c *vim25.Client, r types.ManagedObjectReference) Common { return Common{c: c, r: r} } func (c Common) Reference() types.ManagedObjectReference { return c.r } func (c Common) Client() *vim25.Client { return c.c } // Name returns the base name of the InventoryPath field func (c Common) Name() string { if c.InventoryPath == "" { return "" } return path.Base(c.InventoryPath) } func (c *Common) SetInventoryPath(p string) { c.InventoryPath = p } // ObjectName returns the base name of the InventoryPath field if set, // otherwise fetches the mo.ManagedEntity.Name field via the property collector. func (c Common) ObjectName(ctx context.Context) (string, error) { var o mo.ManagedEntity name := c.Name() if name != "" { return name, nil } err := c.Properties(ctx, c.Reference(), []string{"name"}, &o) if err != nil { return "", err } return o.Name, nil } func (c Common) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, dst interface{}) error { return property.DefaultCollector(c.c).RetrieveOne(ctx, r, ps, dst) } func (c Common) Destroy(ctx context.Context) (*Task, error) { req := types.Destroy_Task{ This: c.Reference(), } res, err := methods.Destroy_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } func (c Common) Rename(ctx context.Context, name string) (*Task, error) { req := types.Rename_Task{ This: c.Reference(), NewName: name, } res, err := methods.Rename_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } govmomi-0.15.0/object/common_test.go000066400000000000000000000015071312205533500174000ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import "testing" func TestCommonName(t *testing.T) { c := &Common{} name := c.Name() if name != "" { t.Errorf("Name=%s", name) } c.InventoryPath = "/foo/bar" name = c.Name() if name != "bar" { t.Errorf("Name=%s", name) } } govmomi-0.15.0/object/compute_resource.go000066400000000000000000000055731312205533500204430ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "path" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type ComputeResource struct { Common } func NewComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ComputeResource { return &ComputeResource{ Common: NewCommon(c, ref), } } func (c ComputeResource) Hosts(ctx context.Context) ([]*HostSystem, error) { var cr mo.ComputeResource err := c.Properties(ctx, c.Reference(), []string{"host"}, &cr) if err != nil { return nil, err } if len(cr.Host) == 0 { return nil, nil } var hs []mo.HostSystem pc := property.DefaultCollector(c.Client()) err = pc.Retrieve(ctx, cr.Host, []string{"name"}, &hs) if err != nil { return nil, err } var hosts []*HostSystem for _, h := range hs { host := NewHostSystem(c.Client(), h.Reference()) host.InventoryPath = path.Join(c.InventoryPath, h.Name) hosts = append(hosts, host) } return hosts, nil } func (c ComputeResource) Datastores(ctx context.Context) ([]*Datastore, error) { var cr mo.ComputeResource err := c.Properties(ctx, c.Reference(), []string{"datastore"}, &cr) if err != nil { return nil, err } var dss []*Datastore for _, ref := range cr.Datastore { ds := NewDatastore(c.c, ref) dss = append(dss, ds) } return dss, nil } func (c ComputeResource) ResourcePool(ctx context.Context) (*ResourcePool, error) { var cr mo.ComputeResource err := c.Properties(ctx, c.Reference(), []string{"resourcePool"}, &cr) if err != nil { return nil, err } return NewResourcePool(c.c, *cr.ResourcePool), nil } func (c ComputeResource) Reconfigure(ctx context.Context, spec types.BaseComputeResourceConfigSpec, modify bool) (*Task, error) { req := types.ReconfigureComputeResource_Task{ This: c.Reference(), Spec: spec, Modify: modify, } res, err := methods.ReconfigureComputeResource_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } func (c ComputeResource) Destroy(ctx context.Context) (*Task, error) { req := types.Destroy_Task{ This: c.Reference(), } res, err := methods.Destroy_Task(ctx, c.c, &req) if err != nil { return nil, err } return NewTask(c.c, res.Returnval), nil } govmomi-0.15.0/object/compute_resource_test.go000066400000000000000000000012721312205533500214720ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // ComputeResource should implement the Reference interface. var _ Reference = ComputeResource{} govmomi-0.15.0/object/custom_fields_manager.go000066400000000000000000000063651312205533500214120ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "errors" "strconv" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) var ( ErrKeyNameNotFound = errors.New("key name not found") ) type CustomFieldsManager struct { Common } // GetCustomFieldsManager wraps NewCustomFieldsManager, returning ErrNotSupported // when the client is not connected to a vCenter instance. func GetCustomFieldsManager(c *vim25.Client) (*CustomFieldsManager, error) { if c.ServiceContent.CustomFieldsManager == nil { return nil, ErrNotSupported } return NewCustomFieldsManager(c), nil } func NewCustomFieldsManager(c *vim25.Client) *CustomFieldsManager { m := CustomFieldsManager{ Common: NewCommon(c, *c.ServiceContent.CustomFieldsManager), } return &m } func (m CustomFieldsManager) Add(ctx context.Context, name string, moType string, fieldDefPolicy *types.PrivilegePolicyDef, fieldPolicy *types.PrivilegePolicyDef) (*types.CustomFieldDef, error) { req := types.AddCustomFieldDef{ This: m.Reference(), Name: name, MoType: moType, FieldDefPolicy: fieldDefPolicy, FieldPolicy: fieldPolicy, } res, err := methods.AddCustomFieldDef(ctx, m.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (m CustomFieldsManager) Remove(ctx context.Context, key int32) error { req := types.RemoveCustomFieldDef{ This: m.Reference(), Key: key, } _, err := methods.RemoveCustomFieldDef(ctx, m.c, &req) return err } func (m CustomFieldsManager) Rename(ctx context.Context, key int32, name string) error { req := types.RenameCustomFieldDef{ This: m.Reference(), Key: key, Name: name, } _, err := methods.RenameCustomFieldDef(ctx, m.c, &req) return err } func (m CustomFieldsManager) Set(ctx context.Context, entity types.ManagedObjectReference, key int32, value string) error { req := types.SetField{ This: m.Reference(), Entity: entity, Key: key, Value: value, } _, err := methods.SetField(ctx, m.c, &req) return err } func (m CustomFieldsManager) Field(ctx context.Context) ([]types.CustomFieldDef, error) { var fm mo.CustomFieldsManager err := m.Properties(ctx, m.Reference(), []string{"field"}, &fm) if err != nil { return nil, err } return fm.Field, nil } func (m CustomFieldsManager) FindKey(ctx context.Context, key string) (int32, error) { field, err := m.Field(ctx) if err != nil { return -1, err } for _, def := range field { if def.Name == key { return def.Key, nil } } k, err := strconv.Atoi(key) if err == nil { // assume literal int key return int32(k), nil } return -1, ErrKeyNameNotFound } govmomi-0.15.0/object/customization_spec_manager.go000066400000000000000000000076131312205533500224710ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type CustomizationSpecManager struct { Common } func NewCustomizationSpecManager(c *vim25.Client) *CustomizationSpecManager { cs := CustomizationSpecManager{ Common: NewCommon(c, *c.ServiceContent.CustomizationSpecManager), } return &cs } func (cs CustomizationSpecManager) DoesCustomizationSpecExist(ctx context.Context, name string) (bool, error) { req := types.DoesCustomizationSpecExist{ This: cs.Reference(), Name: name, } res, err := methods.DoesCustomizationSpecExist(ctx, cs.c, &req) if err != nil { return false, err } return res.Returnval, nil } func (cs CustomizationSpecManager) GetCustomizationSpec(ctx context.Context, name string) (*types.CustomizationSpecItem, error) { req := types.GetCustomizationSpec{ This: cs.Reference(), Name: name, } res, err := methods.GetCustomizationSpec(ctx, cs.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (cs CustomizationSpecManager) CreateCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error { req := types.CreateCustomizationSpec{ This: cs.Reference(), Item: item, } _, err := methods.CreateCustomizationSpec(ctx, cs.c, &req) if err != nil { return err } return nil } func (cs CustomizationSpecManager) OverwriteCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error { req := types.OverwriteCustomizationSpec{ This: cs.Reference(), Item: item, } _, err := methods.OverwriteCustomizationSpec(ctx, cs.c, &req) if err != nil { return err } return nil } func (cs CustomizationSpecManager) DeleteCustomizationSpec(ctx context.Context, name string) error { req := types.DeleteCustomizationSpec{ This: cs.Reference(), Name: name, } _, err := methods.DeleteCustomizationSpec(ctx, cs.c, &req) if err != nil { return err } return nil } func (cs CustomizationSpecManager) DuplicateCustomizationSpec(ctx context.Context, name string, newName string) error { req := types.DuplicateCustomizationSpec{ This: cs.Reference(), Name: name, NewName: newName, } _, err := methods.DuplicateCustomizationSpec(ctx, cs.c, &req) if err != nil { return err } return nil } func (cs CustomizationSpecManager) RenameCustomizationSpec(ctx context.Context, name string, newName string) error { req := types.RenameCustomizationSpec{ This: cs.Reference(), Name: name, NewName: newName, } _, err := methods.RenameCustomizationSpec(ctx, cs.c, &req) if err != nil { return err } return nil } func (cs CustomizationSpecManager) CustomizationSpecItemToXml(ctx context.Context, item types.CustomizationSpecItem) (string, error) { req := types.CustomizationSpecItemToXml{ This: cs.Reference(), Item: item, } res, err := methods.CustomizationSpecItemToXml(ctx, cs.c, &req) if err != nil { return "", err } return res.Returnval, nil } func (cs CustomizationSpecManager) XmlToCustomizationSpecItem(ctx context.Context, xml string) (*types.CustomizationSpecItem, error) { req := types.XmlToCustomizationSpecItem{ This: cs.Reference(), SpecItemXml: xml, } res, err := methods.XmlToCustomizationSpecItem(ctx, cs.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } govmomi-0.15.0/object/datacenter.go000066400000000000000000000042371312205533500171660ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "fmt" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type DatacenterFolders struct { VmFolder *Folder HostFolder *Folder DatastoreFolder *Folder NetworkFolder *Folder } type Datacenter struct { Common } func NewDatacenter(c *vim25.Client, ref types.ManagedObjectReference) *Datacenter { return &Datacenter{ Common: NewCommon(c, ref), } } func (d *Datacenter) Folders(ctx context.Context) (*DatacenterFolders, error) { var md mo.Datacenter ps := []string{"name", "vmFolder", "hostFolder", "datastoreFolder", "networkFolder"} err := d.Properties(ctx, d.Reference(), ps, &md) if err != nil { return nil, err } df := &DatacenterFolders{ VmFolder: NewFolder(d.c, md.VmFolder), HostFolder: NewFolder(d.c, md.HostFolder), DatastoreFolder: NewFolder(d.c, md.DatastoreFolder), NetworkFolder: NewFolder(d.c, md.NetworkFolder), } paths := []struct { name string path *string }{ {"vm", &df.VmFolder.InventoryPath}, {"host", &df.HostFolder.InventoryPath}, {"datastore", &df.DatastoreFolder.InventoryPath}, {"network", &df.NetworkFolder.InventoryPath}, } for _, p := range paths { *p.path = fmt.Sprintf("/%s/%s", md.Name, p.name) } return df, nil } func (d Datacenter) Destroy(ctx context.Context) (*Task, error) { req := types.Destroy_Task{ This: d.Reference(), } res, err := methods.Destroy_Task(ctx, d.c, &req) if err != nil { return nil, err } return NewTask(d.c, res.Returnval), nil } govmomi-0.15.0/object/datacenter_test.go000066400000000000000000000012601312205533500202160ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // Datacenter should implement the Reference interface. var _ Reference = Datacenter{} govmomi-0.15.0/object/datastore.go000066400000000000000000000257301312205533500170430ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "fmt" "io" "math/rand" "os" "path" "strings" "context" "net/http" "net/url" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/session" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // DatastoreNoSuchDirectoryError is returned when a directory could not be found. type DatastoreNoSuchDirectoryError struct { verb string subject string } func (e DatastoreNoSuchDirectoryError) Error() string { return fmt.Sprintf("cannot %s '%s': No such directory", e.verb, e.subject) } // DatastoreNoSuchFileError is returned when a file could not be found. type DatastoreNoSuchFileError struct { verb string subject string } func (e DatastoreNoSuchFileError) Error() string { return fmt.Sprintf("cannot %s '%s': No such file", e.verb, e.subject) } type Datastore struct { Common DatacenterPath string } func NewDatastore(c *vim25.Client, ref types.ManagedObjectReference) *Datastore { return &Datastore{ Common: NewCommon(c, ref), } } func (d Datastore) Path(path string) string { return (&DatastorePath{ Datastore: d.Name(), Path: path, }).String() } // NewURL constructs a url.URL with the given file path for datastore access over HTTP. func (d Datastore) NewURL(path string) *url.URL { u := d.c.URL() return &url.URL{ Scheme: u.Scheme, Host: u.Host, Path: fmt.Sprintf("/folder/%s", path), RawQuery: url.Values{ "dcPath": []string{d.DatacenterPath}, "dsName": []string{d.Name()}, }.Encode(), } } // URL is deprecated, use NewURL instead. func (d Datastore) URL(ctx context.Context, dc *Datacenter, path string) (*url.URL, error) { return d.NewURL(path), nil } func (d Datastore) Browser(ctx context.Context) (*HostDatastoreBrowser, error) { var do mo.Datastore err := d.Properties(ctx, d.Reference(), []string{"browser"}, &do) if err != nil { return nil, err } return NewHostDatastoreBrowser(d.c, do.Browser), nil } func (d Datastore) useServiceTicket() bool { // If connected to workstation, service ticketing not supported // If connected to ESX, service ticketing not needed if !d.c.IsVC() { return false } key := "GOVMOMI_USE_SERVICE_TICKET" val := d.c.URL().Query().Get(key) if val == "" { val = os.Getenv(key) } if val == "1" || val == "true" { return true } return false } func (d Datastore) useServiceTicketHostName(name string) bool { // No need if talking directly to ESX. if !d.c.IsVC() { return false } // If version happens to be < 5.1 if name == "" { return false } // If the HostSystem is using DHCP on a network without dynamic DNS, // HostSystem.Config.Network.DnsConfig.HostName is set to "localhost" by default. // This resolves to "localhost.localdomain" by default via /etc/hosts on ESX. // In that case, we will stick with the HostSystem.Name which is the IP address that // was used to connect the host to VC. if name == "localhost.localdomain" { return false } // Still possible to have HostName that don't resolve via DNS, // so we default to false. key := "GOVMOMI_USE_SERVICE_TICKET_HOSTNAME" val := d.c.URL().Query().Get(key) if val == "" { val = os.Getenv(key) } if val == "1" || val == "true" { return true } return false } type datastoreServiceTicketHostKey struct{} // HostContext returns a Context where the given host will be used for datastore HTTP access // via the ServiceTicket method. func (d Datastore) HostContext(ctx context.Context, host *HostSystem) context.Context { return context.WithValue(ctx, datastoreServiceTicketHostKey{}, host) } // ServiceTicket obtains a ticket via AcquireGenericServiceTicket and returns it an http.Cookie with the url.URL // that can be used along with the ticket cookie to access the given path. An host is chosen at random unless the // the given Context was created with a specific host via the HostContext method. func (d Datastore) ServiceTicket(ctx context.Context, path string, method string) (*url.URL, *http.Cookie, error) { u := d.NewURL(path) host, ok := ctx.Value(datastoreServiceTicketHostKey{}).(*HostSystem) if !ok { if !d.useServiceTicket() { return u, nil, nil } hosts, err := d.AttachedHosts(ctx) if err != nil { return nil, nil, err } if len(hosts) == 0 { // Fallback to letting vCenter choose a host return u, nil, nil } // Pick a random attached host host = hosts[rand.Intn(len(hosts))] } ips, err := host.ManagementIPs(ctx) if err != nil { return nil, nil, err } if len(ips) > 0 { // prefer a ManagementIP u.Host = ips[0].String() } else { // fallback to inventory name u.Host, err = host.ObjectName(ctx) if err != nil { return nil, nil, err } } // VC datacenter path will not be valid against ESX q := u.Query() delete(q, "dcPath") u.RawQuery = q.Encode() spec := types.SessionManagerHttpServiceRequestSpec{ Url: u.String(), // See SessionManagerHttpServiceRequestSpecMethod enum Method: fmt.Sprintf("http%s%s", method[0:1], strings.ToLower(method[1:])), } sm := session.NewManager(d.Client()) ticket, err := sm.AcquireGenericServiceTicket(ctx, &spec) if err != nil { return nil, nil, err } cookie := &http.Cookie{ Name: "vmware_cgi_ticket", Value: ticket.Id, } if d.useServiceTicketHostName(ticket.HostName) { u.Host = ticket.HostName } d.Client().SetThumbprint(u.Host, ticket.SslThumbprint) return u, cookie, nil } func (d Datastore) uploadTicket(ctx context.Context, path string, param *soap.Upload) (*url.URL, *soap.Upload, error) { p := soap.DefaultUpload if param != nil { p = *param // copy } u, ticket, err := d.ServiceTicket(ctx, path, p.Method) if err != nil { return nil, nil, err } p.Ticket = ticket return u, &p, nil } func (d Datastore) downloadTicket(ctx context.Context, path string, param *soap.Download) (*url.URL, *soap.Download, error) { p := soap.DefaultDownload if param != nil { p = *param // copy } u, ticket, err := d.ServiceTicket(ctx, path, p.Method) if err != nil { return nil, nil, err } p.Ticket = ticket return u, &p, nil } // Upload via soap.Upload with an http service ticket func (d Datastore) Upload(ctx context.Context, f io.Reader, path string, param *soap.Upload) error { u, p, err := d.uploadTicket(ctx, path, param) if err != nil { return err } return d.Client().Upload(f, u, p) } // UploadFile via soap.Upload with an http service ticket func (d Datastore) UploadFile(ctx context.Context, file string, path string, param *soap.Upload) error { u, p, err := d.uploadTicket(ctx, path, param) if err != nil { return err } return d.Client().UploadFile(file, u, p) } // Download via soap.Download with an http service ticket func (d Datastore) Download(ctx context.Context, path string, param *soap.Download) (io.ReadCloser, int64, error) { u, p, err := d.downloadTicket(ctx, path, param) if err != nil { return nil, 0, err } return d.Client().Download(u, p) } // DownloadFile via soap.Download with an http service ticket func (d Datastore) DownloadFile(ctx context.Context, path string, file string, param *soap.Download) error { u, p, err := d.downloadTicket(ctx, path, param) if err != nil { return err } return d.Client().DownloadFile(file, u, p) } // AttachedHosts returns hosts that have this Datastore attached, accessible and writable. func (d Datastore) AttachedHosts(ctx context.Context) ([]*HostSystem, error) { var ds mo.Datastore var hosts []*HostSystem pc := property.DefaultCollector(d.Client()) err := pc.RetrieveOne(ctx, d.Reference(), []string{"host"}, &ds) if err != nil { return nil, err } mounts := make(map[types.ManagedObjectReference]types.DatastoreHostMount) var refs []types.ManagedObjectReference for _, host := range ds.Host { refs = append(refs, host.Key) mounts[host.Key] = host } var hs []mo.HostSystem err = pc.Retrieve(ctx, refs, []string{"runtime.connectionState", "runtime.powerState"}, &hs) if err != nil { return nil, err } for _, host := range hs { if host.Runtime.ConnectionState == types.HostSystemConnectionStateConnected && host.Runtime.PowerState == types.HostSystemPowerStatePoweredOn { mount := mounts[host.Reference()] info := mount.MountInfo if *info.Mounted && *info.Accessible && info.AccessMode == string(types.HostMountModeReadWrite) { hosts = append(hosts, NewHostSystem(d.Client(), mount.Key)) } } } return hosts, nil } // AttachedClusterHosts returns hosts that have this Datastore attached, accessible and writable and are members of the given cluster. func (d Datastore) AttachedClusterHosts(ctx context.Context, cluster *ComputeResource) ([]*HostSystem, error) { var hosts []*HostSystem clusterHosts, err := cluster.Hosts(ctx) if err != nil { return nil, err } attachedHosts, err := d.AttachedHosts(ctx) if err != nil { return nil, err } refs := make(map[types.ManagedObjectReference]bool) for _, host := range attachedHosts { refs[host.Reference()] = true } for _, host := range clusterHosts { if refs[host.Reference()] { hosts = append(hosts, host) } } return hosts, nil } func (d Datastore) Stat(ctx context.Context, file string) (types.BaseFileInfo, error) { b, err := d.Browser(ctx) if err != nil { return nil, err } spec := types.HostDatastoreBrowserSearchSpec{ Details: &types.FileQueryFlags{ FileType: true, FileSize: true, Modification: true, FileOwner: types.NewBool(true), }, MatchPattern: []string{path.Base(file)}, } dsPath := d.Path(path.Dir(file)) task, err := b.SearchDatastore(ctx, dsPath, &spec) if err != nil { return nil, err } info, err := task.WaitForResult(ctx, nil) if err != nil { if info == nil || info.Error != nil { _, ok := info.Error.Fault.(*types.FileNotFound) if ok { // FileNotFound means the base path doesn't exist. return nil, DatastoreNoSuchDirectoryError{"stat", dsPath} } } return nil, err } res := info.Result.(types.HostDatastoreBrowserSearchResults) if len(res.File) == 0 { // File doesn't exist return nil, DatastoreNoSuchFileError{"stat", d.Path(file)} } return res.File[0], nil } // Type returns the type of file system volume. func (d Datastore) Type(ctx context.Context) (types.HostFileSystemVolumeFileSystemType, error) { var mds mo.Datastore if err := d.Properties(ctx, d.Reference(), []string{"summary.type"}, &mds); err != nil { return types.HostFileSystemVolumeFileSystemType(""), err } return types.HostFileSystemVolumeFileSystemType(mds.Summary.Type), nil } govmomi-0.15.0/object/datastore_file.go000066400000000000000000000200741312205533500200360ustar00rootroot00000000000000/* Copyright (c) 2016-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "bytes" "context" "errors" "fmt" "io" "net/http" "os" "path" "time" "github.com/vmware/govmomi/vim25/soap" ) // DatastoreFile implements io.Reader, io.Seeker and io.Closer interfaces for datastore file access. type DatastoreFile struct { d Datastore ctx context.Context name string buf io.Reader body io.ReadCloser length int64 offset struct { read, seek int64 } } // Open opens the named file relative to the Datastore. func (d Datastore) Open(ctx context.Context, name string) (*DatastoreFile, error) { return &DatastoreFile{ d: d, name: name, length: -1, ctx: ctx, }, nil } // Read reads up to len(b) bytes from the DatastoreFile. func (f *DatastoreFile) Read(b []byte) (int, error) { if f.offset.read != f.offset.seek { // A Seek() call changed the offset, we need to issue a new GET _ = f.Close() f.offset.read = f.offset.seek } else if f.buf != nil { // f.buf + f behaves like an io.MultiReader n, err := f.buf.Read(b) if err == io.EOF { f.buf = nil // buffer has been drained } if n > 0 { return n, nil } } body, err := f.get() if err != nil { return 0, err } n, err := body.Read(b) f.offset.read += int64(n) f.offset.seek += int64(n) return n, err } // Close closes the DatastoreFile. func (f *DatastoreFile) Close() error { var err error if f.body != nil { err = f.body.Close() f.body = nil } f.buf = nil return err } // Seek sets the offset for the next Read on the DatastoreFile. func (f *DatastoreFile) Seek(offset int64, whence int) (int64, error) { switch whence { case io.SeekStart: case io.SeekCurrent: offset += f.offset.seek case io.SeekEnd: if f.length < 0 { _, err := f.Stat() if err != nil { return 0, err } } offset += f.length default: return 0, errors.New("Seek: invalid whence") } // allow negative SeekStart for initial Range request if offset < 0 { return 0, errors.New("Seek: invalid offset") } f.offset.seek = offset return offset, nil } type fileStat struct { file *DatastoreFile header http.Header } func (s *fileStat) Name() string { return path.Base(s.file.name) } func (s *fileStat) Size() int64 { return s.file.length } func (s *fileStat) Mode() os.FileMode { return 0 } func (s *fileStat) ModTime() time.Time { return time.Now() // no Last-Modified } func (s *fileStat) IsDir() bool { return false } func (s *fileStat) Sys() interface{} { return s.header } func statusError(res *http.Response) error { if res.StatusCode == http.StatusNotFound { return os.ErrNotExist } return errors.New(res.Status) } // Stat returns the os.FileInfo interface describing file. func (f *DatastoreFile) Stat() (os.FileInfo, error) { // TODO: consider using Datastore.Stat() instead u, p, err := f.d.downloadTicket(f.ctx, f.name, &soap.Download{Method: "HEAD"}) if err != nil { return nil, err } res, err := f.d.Client().DownloadRequest(u, p) if err != nil { return nil, err } if res.StatusCode != http.StatusOK { return nil, statusError(res) } f.length = res.ContentLength return &fileStat{f, res.Header}, nil } func (f *DatastoreFile) get() (io.Reader, error) { if f.body != nil { return f.body, nil } u, p, err := f.d.downloadTicket(f.ctx, f.name, nil) if err != nil { return nil, err } if f.offset.read != 0 { p.Headers = map[string]string{ "Range": fmt.Sprintf("bytes=%d-", f.offset.read), } } res, err := f.d.Client().DownloadRequest(u, p) if err != nil { return nil, err } switch res.StatusCode { case http.StatusOK: f.length = res.ContentLength case http.StatusPartialContent: var start, end int cr := res.Header.Get("Content-Range") _, err = fmt.Sscanf(cr, "bytes %d-%d/%d", &start, &end, &f.length) if err != nil { f.length = -1 } case http.StatusRequestedRangeNotSatisfiable: // ok: Read() will return io.EOF default: return nil, statusError(res) } if f.length < 0 { _ = res.Body.Close() return nil, errors.New("unable to determine file size") } f.body = res.Body return f.body, nil } func lastIndexLines(s []byte, line *int, include func(l int, m string) bool) (int64, bool) { i := len(s) - 1 done := false for i > 0 { o := bytes.LastIndexByte(s[:i], '\n') if o < 0 { break } msg := string(s[o+1 : i+1]) if !include(*line, msg) { done = true break } else { i = o *line++ } } return int64(i), done } // Tail seeks to the position of the last N lines of the file. func (f *DatastoreFile) Tail(n int) error { return f.TailFunc(n, func(line int, _ string) bool { return n > line }) } // TailFunc will seek backwards in the datastore file until it hits a line that does // not satisfy the supplied `include` function. func (f *DatastoreFile) TailFunc(lines int, include func(line int, message string) bool) error { // Read the file in reverse using bsize chunks const bsize = int64(1024 * 16) fsize, err := f.Seek(0, io.SeekEnd) if err != nil { return err } if lines == 0 { return nil } chunk := int64(-1) buf := bytes.NewBuffer(make([]byte, 0, bsize)) line := 0 for { var eof bool var pos int64 nread := bsize offset := chunk * bsize remain := fsize + offset if remain < 0 { if pos, err = f.Seek(0, io.SeekStart); err != nil { return err } nread = bsize + remain eof = true } else { if pos, err = f.Seek(offset, io.SeekEnd); err != nil { return err } } if _, err = io.CopyN(buf, f, nread); err != nil { if err != io.EOF { return err } } b := buf.Bytes() idx, done := lastIndexLines(b, &line, include) if done { if chunk == -1 { // We found all N lines in the last chunk of the file. // The seek offset is also now at the current end of file. // Save this buffer to avoid another GET request when Read() is called. buf.Next(int(idx + 1)) f.buf = buf return nil } if _, err = f.Seek(pos+idx+1, io.SeekStart); err != nil { return err } break } if eof { if remain < 0 { // We found < N lines in the entire file, so seek to the start. _, _ = f.Seek(0, io.SeekStart) } break } chunk-- buf.Reset() } return nil } type followDatastoreFile struct { r *DatastoreFile c chan struct{} i time.Duration } // Read reads up to len(b) bytes from the DatastoreFile being followed. // This method will block until data is read, an error other than io.EOF is returned or Close() is called. func (f *followDatastoreFile) Read(p []byte) (int, error) { offset := f.r.offset.seek stop := false for { n, err := f.r.Read(p) if err != nil && err == io.EOF { _ = f.r.Close() // GET request body has been drained. if stop { return n, err } err = nil } if n > 0 { return n, err } select { case <-f.c: // Wake up and stop polling once the body has been drained stop = true case <-time.After(f.i): } info, serr := f.r.Stat() if serr != nil { // Return EOF rather than 404 if the file goes away if serr == os.ErrNotExist { _ = f.r.Close() return 0, io.EOF } return 0, serr } if info.Size() < offset { // assume file has be truncated offset, err = f.r.Seek(0, io.SeekStart) if err != nil { return 0, err } } } } // Close will stop Follow polling and close the underlying DatastoreFile. func (f *followDatastoreFile) Close() error { close(f.c) return nil } // Follow returns an io.ReadCloser to stream the file contents as data is appended. func (f *DatastoreFile) Follow(interval time.Duration) io.ReadCloser { return &followDatastoreFile{f, make(chan struct{}), interval} } govmomi-0.15.0/object/datastore_file_manager.go000066400000000000000000000071341312205533500215320ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "bufio" "bytes" "context" "fmt" "io" "log" "path" "strings" "github.com/vmware/govmomi/vim25/soap" ) // DatastoreFileManager combines FileManager and VirtualDiskManager to manage files on a Datastore type DatastoreFileManager struct { Datacenter *Datacenter Datastore *Datastore FileManager *FileManager VirtualDiskManager *VirtualDiskManager Force bool } // NewFileManager creates a new instance of DatastoreFileManager func (d Datastore) NewFileManager(dc *Datacenter, force bool) *DatastoreFileManager { c := d.Client() m := &DatastoreFileManager{ Datacenter: dc, Datastore: &d, FileManager: NewFileManager(c), VirtualDiskManager: NewVirtualDiskManager(c), Force: force, } return m } // Delete dispatches to the appropriate Delete method based on file name extension func (m *DatastoreFileManager) Delete(ctx context.Context, name string) error { switch path.Ext(name) { case ".vmdk": return m.DeleteVirtualDisk(ctx, name) default: return m.DeleteFile(ctx, name) } } // DeleteFile calls FileManager.DeleteDatastoreFile func (m *DatastoreFileManager) DeleteFile(ctx context.Context, name string) error { p := m.Path(name) task, err := m.FileManager.DeleteDatastoreFile(ctx, p.String(), m.Datacenter) if err != nil { return err } return task.Wait(ctx) } // DeleteVirtualDisk calls VirtualDiskManager.DeleteVirtualDisk // Regardless of the Datastore type, DeleteVirtualDisk will fail if 'ddb.deletable=false', // so if Force=true this method attempts to set 'ddb.deletable=true' before starting the delete task. func (m *DatastoreFileManager) DeleteVirtualDisk(ctx context.Context, name string) error { p := m.Path(name) var merr error if m.Force { merr = m.markDiskAsDeletable(ctx, p) } task, err := m.VirtualDiskManager.DeleteVirtualDisk(ctx, p.String(), m.Datacenter) if err != nil { log.Printf("markDiskAsDeletable(%s): %s", p, merr) return err } return task.Wait(ctx) } // Path converts path name to a DatastorePath func (m *DatastoreFileManager) Path(name string) *DatastorePath { var p DatastorePath if !p.FromString(name) { p.Path = name p.Datastore = m.Datastore.Name() } return &p } func (m *DatastoreFileManager) markDiskAsDeletable(ctx context.Context, path *DatastorePath) error { r, _, err := m.Datastore.Download(ctx, path.Path, &soap.DefaultDownload) if err != nil { return err } defer r.Close() hasFlag := false buf := new(bytes.Buffer) s := bufio.NewScanner(&io.LimitedReader{R: r, N: 2048}) // should be only a few hundred bytes, limit to be sure for s.Scan() { line := s.Text() if strings.HasPrefix(line, "ddb.deletable") { hasFlag = true continue } fmt.Fprintln(buf, line) } if err := s.Err(); err != nil { return err // any error other than EOF } if !hasFlag { return nil // already deletable, so leave as-is } // rewrite the .vmdk with ddb.deletable flag removed (the default is true) return m.Datastore.Upload(ctx, buf, path.Path, &soap.DefaultUpload) } govmomi-0.15.0/object/datastore_path.go000066400000000000000000000025441312205533500200550ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "fmt" "strings" ) // DatastorePath contains the components of a datastore path. type DatastorePath struct { Datastore string Path string } // FromString parses a datastore path. // Returns true if the path could be parsed, false otherwise. func (p *DatastorePath) FromString(s string) bool { if len(s) == 0 { return false } s = strings.TrimSpace(s) if !strings.HasPrefix(s, "[") { return false } s = s[1:] ix := strings.Index(s, "]") if ix < 0 { return false } p.Datastore = s[:ix] p.Path = strings.TrimSpace(s[ix+1:]) return true } // String formats a datastore path. func (p *DatastorePath) String() string { s := fmt.Sprintf("[%s]", p.Datastore) if p.Path == "" { return s } return strings.Join([]string{s, p.Path}, " ") } govmomi-0.15.0/object/datastore_path_test.go000066400000000000000000000032411312205533500211070ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import "testing" func TestParseDatastorePath(t *testing.T) { tests := []struct { dsPath string dsFile string fail bool }{ {"", "", true}, {"x", "", true}, {"[", "", true}, {"[nope", "", true}, {"[te st]", "", false}, {"[te st] foo", "foo", false}, {"[te st] foo/foo.vmx", "foo/foo.vmx", false}, {"[te st]foo bar/foo bar.vmx", "foo bar/foo bar.vmx", false}, {" [te st] bar/bar.vmx ", "bar/bar.vmx", false}, } for _, test := range tests { p := new(DatastorePath) ok := p.FromString(test.dsPath) if test.fail { if ok { t.Errorf("expected error for: %s", test.dsPath) } } else { if !ok { t.Errorf("failed to parse: %q", test.dsPath) } else { if test.dsFile != p.Path { t.Errorf("dsFile=%s", p.Path) } if p.Datastore != "te st" { t.Errorf("ds=%s", p.Datastore) } } } } s := "[datastore1] foo/bar.vmdk" p := new(DatastorePath) ok := p.FromString(s) if !ok { t.Fatal(s) } if p.String() != s { t.Fatal(p.String()) } p.Path = "" if p.String() != "[datastore1]" { t.Fatal(p.String()) } } govmomi-0.15.0/object/datastore_test.go000066400000000000000000000012561312205533500200770ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // Datastore should implement the Reference interface. var _ Reference = Datastore{} govmomi-0.15.0/object/diagnostic_log.go000066400000000000000000000032141312205533500200330ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "fmt" "io" "math" ) // DiagnosticLog wraps DiagnosticManager.BrowseLog type DiagnosticLog struct { m DiagnosticManager Key string Host *HostSystem Start int32 } // Seek to log position starting at the last nlines of the log func (l *DiagnosticLog) Seek(ctx context.Context, nlines int32) error { h, err := l.m.BrowseLog(ctx, l.Host, l.Key, math.MaxInt32, 0) if err != nil { return err } l.Start = h.LineEnd - nlines return nil } // Copy log starting from l.Start to the given io.Writer // Returns on error or when end of log is reached. func (l *DiagnosticLog) Copy(ctx context.Context, w io.Writer) (int, error) { const max = 500 // VC max == 500, ESX max == 1000 written := 0 for { h, err := l.m.BrowseLog(ctx, l.Host, l.Key, l.Start, max) if err != nil { return 0, err } for _, line := range h.LineText { n, err := fmt.Fprintln(w, line) written += n if err != nil { return written, err } } l.Start += int32(len(h.LineText)) if l.Start >= h.LineEnd { break } } return written, nil } govmomi-0.15.0/object/diagnostic_manager.go000066400000000000000000000046241312205533500206720ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type DiagnosticManager struct { Common } func NewDiagnosticManager(c *vim25.Client) *DiagnosticManager { m := DiagnosticManager{ Common: NewCommon(c, *c.ServiceContent.DiagnosticManager), } return &m } func (m DiagnosticManager) Log(ctx context.Context, host *HostSystem, key string) *DiagnosticLog { return &DiagnosticLog{ m: m, Key: key, Host: host, } } func (m DiagnosticManager) BrowseLog(ctx context.Context, host *HostSystem, key string, start, lines int32) (*types.DiagnosticManagerLogHeader, error) { req := types.BrowseDiagnosticLog{ This: m.Reference(), Key: key, Start: start, Lines: lines, } if host != nil { ref := host.Reference() req.Host = &ref } res, err := methods.BrowseDiagnosticLog(ctx, m.Client(), &req) if err != nil { return nil, err } return &res.Returnval, nil } func (m DiagnosticManager) GenerateLogBundles(ctx context.Context, includeDefault bool, host []*HostSystem) (*Task, error) { req := types.GenerateLogBundles_Task{ This: m.Reference(), IncludeDefault: includeDefault, } if host != nil { for _, h := range host { req.Host = append(req.Host, h.Reference()) } } res, err := methods.GenerateLogBundles_Task(ctx, m.c, &req) if err != nil { return nil, err } return NewTask(m.c, res.Returnval), nil } func (m DiagnosticManager) QueryDescriptions(ctx context.Context, host *HostSystem) ([]types.DiagnosticManagerLogDescriptor, error) { req := types.QueryDescriptions{ This: m.Reference(), } if host != nil { ref := host.Reference() req.Host = &ref } res, err := methods.QueryDescriptions(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } govmomi-0.15.0/object/distributed_virtual_portgroup.go000066400000000000000000000042721312205533500232640ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type DistributedVirtualPortgroup struct { Common } func NewDistributedVirtualPortgroup(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualPortgroup { return &DistributedVirtualPortgroup{ Common: NewCommon(c, ref), } } // EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this DistributedVirtualPortgroup func (p DistributedVirtualPortgroup) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { var dvp mo.DistributedVirtualPortgroup var dvs mo.VmwareDistributedVirtualSwitch // TODO: should be mo.BaseDistributedVirtualSwitch if err := p.Properties(ctx, p.Reference(), []string{"key", "config.distributedVirtualSwitch"}, &dvp); err != nil { return nil, err } if err := p.Properties(ctx, *dvp.Config.DistributedVirtualSwitch, []string{"uuid"}, &dvs); err != nil { return nil, err } backing := &types.VirtualEthernetCardDistributedVirtualPortBackingInfo{ Port: types.DistributedVirtualSwitchPortConnection{ PortgroupKey: dvp.Key, SwitchUuid: dvs.Uuid, }, } return backing, nil } func (p DistributedVirtualPortgroup) Reconfigure(ctx context.Context, spec types.DVPortgroupConfigSpec) (*Task, error) { req := types.ReconfigureDVPortgroup_Task{ This: p.Reference(), Spec: spec, } res, err := methods.ReconfigureDVPortgroup_Task(ctx, p.Client(), &req) if err != nil { return nil, err } return NewTask(p.Client(), res.Returnval), nil } govmomi-0.15.0/object/distributed_virtual_portgroup_test.go000066400000000000000000000015321312205533500243170ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // DistributedVirtualPortgroup should implement the Reference interface. var _ Reference = DistributedVirtualPortgroup{} // DistributedVirtualPortgroup should implement the NetworkReference interface. var _ NetworkReference = DistributedVirtualPortgroup{} govmomi-0.15.0/object/distributed_virtual_switch.go000066400000000000000000000035461312205533500225270ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type DistributedVirtualSwitch struct { Common } func NewDistributedVirtualSwitch(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualSwitch { return &DistributedVirtualSwitch{ Common: NewCommon(c, ref), } } func (s DistributedVirtualSwitch) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { return nil, ErrNotSupported // TODO: just to satisfy NetworkReference interface for the finder } func (s DistributedVirtualSwitch) Reconfigure(ctx context.Context, spec types.BaseDVSConfigSpec) (*Task, error) { req := types.ReconfigureDvs_Task{ This: s.Reference(), Spec: spec, } res, err := methods.ReconfigureDvs_Task(ctx, s.Client(), &req) if err != nil { return nil, err } return NewTask(s.Client(), res.Returnval), nil } func (s DistributedVirtualSwitch) AddPortgroup(ctx context.Context, spec []types.DVPortgroupConfigSpec) (*Task, error) { req := types.AddDVPortgroup_Task{ This: s.Reference(), Spec: spec, } res, err := methods.AddDVPortgroup_Task(ctx, s.Client(), &req) if err != nil { return nil, err } return NewTask(s.Client(), res.Returnval), nil } govmomi-0.15.0/object/extension_manager.go000066400000000000000000000055311312205533500205600ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type ExtensionManager struct { Common } // GetExtensionManager wraps NewExtensionManager, returning ErrNotSupported // when the client is not connected to a vCenter instance. func GetExtensionManager(c *vim25.Client) (*ExtensionManager, error) { if c.ServiceContent.ExtensionManager == nil { return nil, ErrNotSupported } return NewExtensionManager(c), nil } func NewExtensionManager(c *vim25.Client) *ExtensionManager { o := ExtensionManager{ Common: NewCommon(c, *c.ServiceContent.ExtensionManager), } return &o } func (m ExtensionManager) List(ctx context.Context) ([]types.Extension, error) { var em mo.ExtensionManager err := m.Properties(ctx, m.Reference(), []string{"extensionList"}, &em) if err != nil { return nil, err } return em.ExtensionList, nil } func (m ExtensionManager) Find(ctx context.Context, key string) (*types.Extension, error) { req := types.FindExtension{ This: m.Reference(), ExtensionKey: key, } res, err := methods.FindExtension(ctx, m.c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (m ExtensionManager) Register(ctx context.Context, extension types.Extension) error { req := types.RegisterExtension{ This: m.Reference(), Extension: extension, } _, err := methods.RegisterExtension(ctx, m.c, &req) return err } func (m ExtensionManager) SetCertificate(ctx context.Context, key string, certificatePem string) error { req := types.SetExtensionCertificate{ This: m.Reference(), ExtensionKey: key, CertificatePem: certificatePem, } _, err := methods.SetExtensionCertificate(ctx, m.c, &req) return err } func (m ExtensionManager) Unregister(ctx context.Context, key string) error { req := types.UnregisterExtension{ This: m.Reference(), ExtensionKey: key, } _, err := methods.UnregisterExtension(ctx, m.c, &req) return err } func (m ExtensionManager) Update(ctx context.Context, extension types.Extension) error { req := types.UpdateExtension{ This: m.Reference(), Extension: extension, } _, err := methods.UpdateExtension(ctx, m.c, &req) return err } govmomi-0.15.0/object/file_manager.go000066400000000000000000000064201312205533500174610ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type FileManager struct { Common } func NewFileManager(c *vim25.Client) *FileManager { f := FileManager{ Common: NewCommon(c, *c.ServiceContent.FileManager), } return &f } func (f FileManager) CopyDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destinationName string, destinationDatacenter *Datacenter, force bool) (*Task, error) { req := types.CopyDatastoreFile_Task{ This: f.Reference(), SourceName: sourceName, DestinationName: destinationName, Force: types.NewBool(force), } if sourceDatacenter != nil { ref := sourceDatacenter.Reference() req.SourceDatacenter = &ref } if destinationDatacenter != nil { ref := destinationDatacenter.Reference() req.DestinationDatacenter = &ref } res, err := methods.CopyDatastoreFile_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } // DeleteDatastoreFile deletes the specified file or folder from the datastore. func (f FileManager) DeleteDatastoreFile(ctx context.Context, name string, dc *Datacenter) (*Task, error) { req := types.DeleteDatastoreFile_Task{ This: f.Reference(), Name: name, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := methods.DeleteDatastoreFile_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } // MakeDirectory creates a folder using the specified name. func (f FileManager) MakeDirectory(ctx context.Context, name string, dc *Datacenter, createParentDirectories bool) error { req := types.MakeDirectory{ This: f.Reference(), Name: name, CreateParentDirectories: types.NewBool(createParentDirectories), } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } _, err := methods.MakeDirectory(ctx, f.c, &req) return err } func (f FileManager) MoveDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destinationName string, destinationDatacenter *Datacenter, force bool) (*Task, error) { req := types.MoveDatastoreFile_Task{ This: f.Reference(), SourceName: sourceName, DestinationName: destinationName, Force: types.NewBool(force), } if sourceDatacenter != nil { ref := sourceDatacenter.Reference() req.SourceDatacenter = &ref } if destinationDatacenter != nil { ref := destinationDatacenter.Reference() req.DestinationDatacenter = &ref } res, err := methods.MoveDatastoreFile_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } govmomi-0.15.0/object/folder.go000066400000000000000000000120131312205533500163160ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type Folder struct { Common } func NewFolder(c *vim25.Client, ref types.ManagedObjectReference) *Folder { return &Folder{ Common: NewCommon(c, ref), } } func NewRootFolder(c *vim25.Client) *Folder { f := NewFolder(c, c.ServiceContent.RootFolder) f.InventoryPath = "/" return f } func (f Folder) Children(ctx context.Context) ([]Reference, error) { var mf mo.Folder err := f.Properties(ctx, f.Reference(), []string{"childEntity"}, &mf) if err != nil { return nil, err } var rs []Reference for _, e := range mf.ChildEntity { if r := NewReference(f.c, e); r != nil { rs = append(rs, r) } } return rs, nil } func (f Folder) CreateDatacenter(ctx context.Context, datacenter string) (*Datacenter, error) { req := types.CreateDatacenter{ This: f.Reference(), Name: datacenter, } res, err := methods.CreateDatacenter(ctx, f.c, &req) if err != nil { return nil, err } // Response will be nil if this is an ESX host that does not belong to a vCenter if res == nil { return nil, nil } return NewDatacenter(f.c, res.Returnval), nil } func (f Folder) CreateCluster(ctx context.Context, cluster string, spec types.ClusterConfigSpecEx) (*ClusterComputeResource, error) { req := types.CreateClusterEx{ This: f.Reference(), Name: cluster, Spec: spec, } res, err := methods.CreateClusterEx(ctx, f.c, &req) if err != nil { return nil, err } // Response will be nil if this is an ESX host that does not belong to a vCenter if res == nil { return nil, nil } return NewClusterComputeResource(f.c, res.Returnval), nil } func (f Folder) CreateFolder(ctx context.Context, name string) (*Folder, error) { req := types.CreateFolder{ This: f.Reference(), Name: name, } res, err := methods.CreateFolder(ctx, f.c, &req) if err != nil { return nil, err } return NewFolder(f.c, res.Returnval), err } func (f Folder) CreateStoragePod(ctx context.Context, name string) (*StoragePod, error) { req := types.CreateStoragePod{ This: f.Reference(), Name: name, } res, err := methods.CreateStoragePod(ctx, f.c, &req) if err != nil { return nil, err } return NewStoragePod(f.c, res.Returnval), err } func (f Folder) AddStandaloneHost(ctx context.Context, spec types.HostConnectSpec, addConnected bool, license *string, compResSpec *types.BaseComputeResourceConfigSpec) (*Task, error) { req := types.AddStandaloneHost_Task{ This: f.Reference(), Spec: spec, AddConnected: addConnected, } if license != nil { req.License = *license } if compResSpec != nil { req.CompResSpec = *compResSpec } res, err := methods.AddStandaloneHost_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } func (f Folder) CreateVM(ctx context.Context, config types.VirtualMachineConfigSpec, pool *ResourcePool, host *HostSystem) (*Task, error) { req := types.CreateVM_Task{ This: f.Reference(), Config: config, Pool: pool.Reference(), } if host != nil { ref := host.Reference() req.Host = &ref } res, err := methods.CreateVM_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } func (f Folder) RegisterVM(ctx context.Context, path string, name string, asTemplate bool, pool *ResourcePool, host *HostSystem) (*Task, error) { req := types.RegisterVM_Task{ This: f.Reference(), Path: path, AsTemplate: asTemplate, } if name != "" { req.Name = name } if host != nil { ref := host.Reference() req.Host = &ref } if pool != nil { ref := pool.Reference() req.Pool = &ref } res, err := methods.RegisterVM_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } func (f Folder) CreateDVS(ctx context.Context, spec types.DVSCreateSpec) (*Task, error) { req := types.CreateDVS_Task{ This: f.Reference(), Spec: spec, } res, err := methods.CreateDVS_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } func (f Folder) MoveInto(ctx context.Context, list []types.ManagedObjectReference) (*Task, error) { req := types.MoveIntoFolder_Task{ This: f.Reference(), List: list, } res, err := methods.MoveIntoFolder_Task(ctx, f.c, &req) if err != nil { return nil, err } return NewTask(f.c, res.Returnval), nil } govmomi-0.15.0/object/folder_test.go000066400000000000000000000012501312205533500173560ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // Folder should implement the Reference interface. var _ Reference = Folder{} govmomi-0.15.0/object/history_collector.go000066400000000000000000000033201312205533500206130ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HistoryCollector struct { Common } func NewHistoryCollector(c *vim25.Client, ref types.ManagedObjectReference) *HistoryCollector { return &HistoryCollector{ Common: NewCommon(c, ref), } } func (h HistoryCollector) Destroy(ctx context.Context) error { req := types.DestroyCollector{ This: h.Reference(), } _, err := methods.DestroyCollector(ctx, h.c, &req) return err } func (h HistoryCollector) Reset(ctx context.Context) error { req := types.ResetCollector{ This: h.Reference(), } _, err := methods.ResetCollector(ctx, h.c, &req) return err } func (h HistoryCollector) Rewind(ctx context.Context) error { req := types.RewindCollector{ This: h.Reference(), } _, err := methods.RewindCollector(ctx, h.c, &req) return err } func (h HistoryCollector) SetPageSize(ctx context.Context, maxCount int32) error { req := types.SetCollectorPageSize{ This: h.Reference(), MaxCount: maxCount, } _, err := methods.SetCollectorPageSize(ctx, h.c, &req) return err } govmomi-0.15.0/object/host_account_manager.go000066400000000000000000000031431312205533500212320ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostAccountManager struct { Common } func NewHostAccountManager(c *vim25.Client, ref types.ManagedObjectReference) *HostAccountManager { return &HostAccountManager{ Common: NewCommon(c, ref), } } func (m HostAccountManager) Create(ctx context.Context, user *types.HostAccountSpec) error { req := types.CreateUser{ This: m.Reference(), User: user, } _, err := methods.CreateUser(ctx, m.Client(), &req) return err } func (m HostAccountManager) Update(ctx context.Context, user *types.HostAccountSpec) error { req := types.UpdateUser{ This: m.Reference(), User: user, } _, err := methods.UpdateUser(ctx, m.Client(), &req) return err } func (m HostAccountManager) Remove(ctx context.Context, userName string) error { req := types.RemoveUser{ This: m.Reference(), UserName: userName, } _, err := methods.RemoveUser(ctx, m.Client(), &req) return err } govmomi-0.15.0/object/host_certificate_info.go000066400000000000000000000144331312205533500214050ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "crypto/sha256" "crypto/tls" "crypto/x509" "crypto/x509/pkix" "encoding/asn1" "fmt" "io" "net/url" "strings" "text/tabwriter" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // HostCertificateInfo provides helpers for types.HostCertificateManagerCertificateInfo type HostCertificateInfo struct { types.HostCertificateManagerCertificateInfo ThumbprintSHA1 string ThumbprintSHA256 string Err error Certificate *x509.Certificate `json:"-"` subjectName *pkix.Name issuerName *pkix.Name } // FromCertificate converts x509.Certificate to HostCertificateInfo func (info *HostCertificateInfo) FromCertificate(cert *x509.Certificate) *HostCertificateInfo { info.Certificate = cert info.subjectName = &cert.Subject info.issuerName = &cert.Issuer info.Issuer = info.fromName(info.issuerName) info.NotBefore = &cert.NotBefore info.NotAfter = &cert.NotAfter info.Subject = info.fromName(info.subjectName) info.ThumbprintSHA1 = soap.ThumbprintSHA1(cert) // SHA-256 for info purposes only, API fields all use SHA-1 sum := sha256.Sum256(cert.Raw) hex := make([]string, len(sum)) for i, b := range sum { hex[i] = fmt.Sprintf("%02X", b) } info.ThumbprintSHA256 = strings.Join(hex, ":") if info.Status == "" { info.Status = string(types.HostCertificateManagerCertificateInfoCertificateStatusUnknown) } return info } // FromURL connects to the given URL.Host via tls.Dial with the given tls.Config and populates the HostCertificateInfo // via tls.ConnectionState. If the certificate was verified with the given tls.Config, the Err field will be nil. // Otherwise, Err will be set to the x509.UnknownAuthorityError or x509.HostnameError. // If tls.Dial returns an error of any other type, that error is returned. func (info *HostCertificateInfo) FromURL(u *url.URL, config *tls.Config) error { addr := u.Host if !(strings.LastIndex(addr, ":") > strings.LastIndex(addr, "]")) { addr += ":443" } conn, err := tls.Dial("tcp", addr, config) if err != nil { switch err.(type) { case x509.UnknownAuthorityError: case x509.HostnameError: default: return err } info.Err = err conn, err = tls.Dial("tcp", addr, &tls.Config{InsecureSkipVerify: true}) if err != nil { return err } } else { info.Status = string(types.HostCertificateManagerCertificateInfoCertificateStatusGood) } state := conn.ConnectionState() _ = conn.Close() info.FromCertificate(state.PeerCertificates[0]) return nil } var emailAddressOID = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 1} func (info *HostCertificateInfo) fromName(name *pkix.Name) string { var attrs []string oids := map[string]string{ emailAddressOID.String(): "emailAddress", } for _, attr := range name.Names { if key, ok := oids[attr.Type.String()]; ok { attrs = append(attrs, fmt.Sprintf("%s=%s", key, attr.Value)) } } attrs = append(attrs, fmt.Sprintf("CN=%s", name.CommonName)) add := func(key string, vals []string) { for _, val := range vals { attrs = append(attrs, fmt.Sprintf("%s=%s", key, val)) } } elts := []struct { key string val []string }{ {"OU", name.OrganizationalUnit}, {"O", name.Organization}, {"L", name.Locality}, {"ST", name.Province}, {"C", name.Country}, } for _, elt := range elts { add(elt.key, elt.val) } return strings.Join(attrs, ",") } func (info *HostCertificateInfo) toName(s string) *pkix.Name { var name pkix.Name for _, pair := range strings.Split(s, ",") { attr := strings.SplitN(pair, "=", 2) if len(attr) != 2 { continue } v := attr[1] switch strings.ToLower(attr[0]) { case "cn": name.CommonName = v case "ou": name.OrganizationalUnit = append(name.OrganizationalUnit, v) case "o": name.Organization = append(name.Organization, v) case "l": name.Locality = append(name.Locality, v) case "st": name.Province = append(name.Province, v) case "c": name.Country = append(name.Country, v) case "emailaddress": name.Names = append(name.Names, pkix.AttributeTypeAndValue{Type: emailAddressOID, Value: v}) } } return &name } // SubjectName parses Subject into a pkix.Name func (info *HostCertificateInfo) SubjectName() *pkix.Name { if info.subjectName != nil { return info.subjectName } return info.toName(info.Subject) } // IssuerName parses Issuer into a pkix.Name func (info *HostCertificateInfo) IssuerName() *pkix.Name { if info.issuerName != nil { return info.issuerName } return info.toName(info.Issuer) } // Write outputs info similar to the Chrome Certificate Viewer. func (info *HostCertificateInfo) Write(w io.Writer) error { tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) s := func(val string) string { if val != "" { return val } return "" } ss := func(val []string) string { return s(strings.Join(val, ",")) } name := func(n *pkix.Name) { fmt.Fprintf(tw, " Common Name (CN):\t%s\n", s(n.CommonName)) fmt.Fprintf(tw, " Organization (O):\t%s\n", ss(n.Organization)) fmt.Fprintf(tw, " Organizational Unit (OU):\t%s\n", ss(n.OrganizationalUnit)) } status := info.Status if info.Err != nil { status = fmt.Sprintf("ERROR %s", info.Err) } fmt.Fprintf(tw, "Certificate Status:\t%s\n", status) fmt.Fprintln(tw, "Issued To:\t") name(info.SubjectName()) fmt.Fprintln(tw, "Issued By:\t") name(info.IssuerName()) fmt.Fprintln(tw, "Validity Period:\t") fmt.Fprintf(tw, " Issued On:\t%s\n", info.NotBefore) fmt.Fprintf(tw, " Expires On:\t%s\n", info.NotAfter) if info.ThumbprintSHA1 != "" { fmt.Fprintln(tw, "Thumbprints:\t") if info.ThumbprintSHA256 != "" { fmt.Fprintf(tw, " SHA-256 Thumbprint:\t%s\n", info.ThumbprintSHA256) } fmt.Fprintf(tw, " SHA-1 Thumbprint:\t%s\n", info.ThumbprintSHA1) } return tw.Flush() } govmomi-0.15.0/object/host_certificate_info_test.go000066400000000000000000000017171312205533500224450ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import "testing" func TestHostCertificateManagerCertificateInfo(t *testing.T) { subject := "emailAddress=vmca@vmware.com,CN=w2-xlr8-autoroot-esx004.eng.vmware.com,OU=VMware Engineering,O=VMware,L=Palo Alto,ST=California,C=US" var info HostCertificateInfo name := info.toName(subject) s := info.fromName(name) if subject != s { t.Errorf("%s != %s", s, subject) } } govmomi-0.15.0/object/host_certificate_manager.go000066400000000000000000000133321312205533500220610ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) // HostCertificateManager provides helper methods around the HostSystem.ConfigManager.CertificateManager type HostCertificateManager struct { Common Host *HostSystem } // NewHostCertificateManager creates a new HostCertificateManager helper func NewHostCertificateManager(c *vim25.Client, ref types.ManagedObjectReference, host types.ManagedObjectReference) *HostCertificateManager { return &HostCertificateManager{ Common: NewCommon(c, ref), Host: NewHostSystem(c, host), } } // CertificateInfo wraps the host CertificateManager certificateInfo property with the HostCertificateInfo helper. // The ThumbprintSHA1 field is set to HostSystem.Summary.Config.SslThumbprint if the host system is managed by a vCenter. func (m HostCertificateManager) CertificateInfo(ctx context.Context) (*HostCertificateInfo, error) { var hs mo.HostSystem var cm mo.HostCertificateManager pc := property.DefaultCollector(m.Client()) err := pc.RetrieveOne(ctx, m.Reference(), []string{"certificateInfo"}, &cm) if err != nil { return nil, err } _ = pc.RetrieveOne(ctx, m.Host.Reference(), []string{"summary.config.sslThumbprint"}, &hs) return &HostCertificateInfo{ HostCertificateManagerCertificateInfo: cm.CertificateInfo, ThumbprintSHA1: hs.Summary.Config.SslThumbprint, }, nil } // GenerateCertificateSigningRequest requests the host system to generate a certificate-signing request (CSR) for itself. // The CSR is then typically provided to a Certificate Authority to sign and issue the SSL certificate for the host system. // Use InstallServerCertificate to import this certificate. func (m HostCertificateManager) GenerateCertificateSigningRequest(ctx context.Context, useIPAddressAsCommonName bool) (string, error) { req := types.GenerateCertificateSigningRequest{ This: m.Reference(), UseIpAddressAsCommonName: useIPAddressAsCommonName, } res, err := methods.GenerateCertificateSigningRequest(ctx, m.Client(), &req) if err != nil { return "", err } return res.Returnval, nil } // GenerateCertificateSigningRequestByDn requests the host system to generate a certificate-signing request (CSR) for itself. // Alternative version similar to GenerateCertificateSigningRequest but takes a Distinguished Name (DN) as a parameter. func (m HostCertificateManager) GenerateCertificateSigningRequestByDn(ctx context.Context, distinguishedName string) (string, error) { req := types.GenerateCertificateSigningRequestByDn{ This: m.Reference(), DistinguishedName: distinguishedName, } res, err := methods.GenerateCertificateSigningRequestByDn(ctx, m.Client(), &req) if err != nil { return "", err } return res.Returnval, nil } // InstallServerCertificate imports the given SSL certificate to the host system. func (m HostCertificateManager) InstallServerCertificate(ctx context.Context, cert string) error { req := types.InstallServerCertificate{ This: m.Reference(), Cert: cert, } _, err := methods.InstallServerCertificate(ctx, m.Client(), &req) if err != nil { return err } // NotifyAffectedService is internal, not exposing as we don't have a use case other than with InstallServerCertificate // Without this call, hostd needs to be restarted to use the updated certificate // Note: using Refresh as it has the same struct/signature, we just need to use different xml name tags body := struct { Req *types.Refresh `xml:"urn:vim25 NotifyAffectedServices,omitempty"` Res *types.RefreshResponse `xml:"urn:vim25 NotifyAffectedServicesResponse,omitempty"` methods.RefreshBody }{ Req: &types.Refresh{This: m.Reference()}, } return m.Client().RoundTrip(ctx, &body, &body) } // ListCACertificateRevocationLists returns the SSL CRLs of Certificate Authorities that are trusted by the host system. func (m HostCertificateManager) ListCACertificateRevocationLists(ctx context.Context) ([]string, error) { req := types.ListCACertificateRevocationLists{ This: m.Reference(), } res, err := methods.ListCACertificateRevocationLists(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } // ListCACertificates returns the SSL certificates of Certificate Authorities that are trusted by the host system. func (m HostCertificateManager) ListCACertificates(ctx context.Context) ([]string, error) { req := types.ListCACertificates{ This: m.Reference(), } res, err := methods.ListCACertificates(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } // ReplaceCACertificatesAndCRLs replaces the trusted CA certificates and CRL used by the host system. // These determine whether the server can verify the identity of an external entity. func (m HostCertificateManager) ReplaceCACertificatesAndCRLs(ctx context.Context, caCert []string, caCrl []string) error { req := types.ReplaceCACertificatesAndCRLs{ This: m.Reference(), CaCert: caCert, CaCrl: caCrl, } _, err := methods.ReplaceCACertificatesAndCRLs(ctx, m.Client(), &req) return err } govmomi-0.15.0/object/host_config_manager.go000066400000000000000000000124121312205533500210420ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HostConfigManager struct { Common } func NewHostConfigManager(c *vim25.Client, ref types.ManagedObjectReference) *HostConfigManager { return &HostConfigManager{ Common: NewCommon(c, ref), } } func (m HostConfigManager) DatastoreSystem(ctx context.Context) (*HostDatastoreSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.datastoreSystem"}, &h) if err != nil { return nil, err } return NewHostDatastoreSystem(m.c, *h.ConfigManager.DatastoreSystem), nil } func (m HostConfigManager) NetworkSystem(ctx context.Context) (*HostNetworkSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.networkSystem"}, &h) if err != nil { return nil, err } return NewHostNetworkSystem(m.c, *h.ConfigManager.NetworkSystem), nil } func (m HostConfigManager) FirewallSystem(ctx context.Context) (*HostFirewallSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.firewallSystem"}, &h) if err != nil { return nil, err } return NewHostFirewallSystem(m.c, *h.ConfigManager.FirewallSystem), nil } func (m HostConfigManager) StorageSystem(ctx context.Context) (*HostStorageSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.storageSystem"}, &h) if err != nil { return nil, err } return NewHostStorageSystem(m.c, *h.ConfigManager.StorageSystem), nil } func (m HostConfigManager) VirtualNicManager(ctx context.Context) (*HostVirtualNicManager, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.virtualNicManager"}, &h) if err != nil { return nil, err } return NewHostVirtualNicManager(m.c, *h.ConfigManager.VirtualNicManager, m.Reference()), nil } func (m HostConfigManager) VsanSystem(ctx context.Context) (*HostVsanSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.vsanSystem"}, &h) if err != nil { return nil, err } // Added in 5.5 if h.ConfigManager.VsanSystem == nil { return nil, ErrNotSupported } return NewHostVsanSystem(m.c, *h.ConfigManager.VsanSystem), nil } func (m HostConfigManager) VsanInternalSystem(ctx context.Context) (*HostVsanInternalSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.vsanInternalSystem"}, &h) if err != nil { return nil, err } // Added in 5.5 if h.ConfigManager.VsanInternalSystem == nil { return nil, ErrNotSupported } return NewHostVsanInternalSystem(m.c, *h.ConfigManager.VsanInternalSystem), nil } func (m HostConfigManager) AccountManager(ctx context.Context) (*HostAccountManager, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.accountManager"}, &h) if err != nil { return nil, err } ref := h.ConfigManager.AccountManager // Added in 6.0 if ref == nil { // Versions < 5.5 can use the ServiceContent ref, // but we can only use it when connected directly to ESX. c := m.Client() if !c.IsVC() { ref = c.ServiceContent.AccountManager } if ref == nil { return nil, ErrNotSupported } } return NewHostAccountManager(m.c, *ref), nil } func (m HostConfigManager) OptionManager(ctx context.Context) (*OptionManager, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.advancedOption"}, &h) if err != nil { return nil, err } return NewOptionManager(m.c, *h.ConfigManager.AdvancedOption), nil } func (m HostConfigManager) ServiceSystem(ctx context.Context) (*HostServiceSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.serviceSystem"}, &h) if err != nil { return nil, err } return NewHostServiceSystem(m.c, *h.ConfigManager.ServiceSystem), nil } func (m HostConfigManager) CertificateManager(ctx context.Context) (*HostCertificateManager, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.certificateManager"}, &h) if err != nil { return nil, err } // Added in 6.0 if h.ConfigManager.CertificateManager == nil { return nil, ErrNotSupported } return NewHostCertificateManager(m.c, *h.ConfigManager.CertificateManager, m.Reference()), nil } func (m HostConfigManager) DateTimeSystem(ctx context.Context) (*HostDateTimeSystem, error) { var h mo.HostSystem err := m.Properties(ctx, m.Reference(), []string{"configManager.dateTimeSystem"}, &h) if err != nil { return nil, err } return NewHostDateTimeSystem(m.c, *h.ConfigManager.DateTimeSystem), nil } govmomi-0.15.0/object/host_datastore_browser.go000066400000000000000000000034711312205533500216410ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostDatastoreBrowser struct { Common } func NewHostDatastoreBrowser(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreBrowser { return &HostDatastoreBrowser{ Common: NewCommon(c, ref), } } func (b HostDatastoreBrowser) SearchDatastore(ctx context.Context, datastorePath string, searchSpec *types.HostDatastoreBrowserSearchSpec) (*Task, error) { req := types.SearchDatastore_Task{ This: b.Reference(), DatastorePath: datastorePath, SearchSpec: searchSpec, } res, err := methods.SearchDatastore_Task(ctx, b.c, &req) if err != nil { return nil, err } return NewTask(b.c, res.Returnval), nil } func (b HostDatastoreBrowser) SearchDatastoreSubFolders(ctx context.Context, datastorePath string, searchSpec *types.HostDatastoreBrowserSearchSpec) (*Task, error) { req := types.SearchDatastoreSubFolders_Task{ This: b.Reference(), DatastorePath: datastorePath, SearchSpec: searchSpec, } res, err := methods.SearchDatastoreSubFolders_Task(ctx, b.c, &req) if err != nil { return nil, err } return NewTask(b.c, res.Returnval), nil } govmomi-0.15.0/object/host_datastore_system.go000066400000000000000000000057261312205533500215070ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostDatastoreSystem struct { Common } func NewHostDatastoreSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreSystem { return &HostDatastoreSystem{ Common: NewCommon(c, ref), } } func (s HostDatastoreSystem) CreateLocalDatastore(ctx context.Context, name string, path string) (*Datastore, error) { req := types.CreateLocalDatastore{ This: s.Reference(), Name: name, Path: path, } res, err := methods.CreateLocalDatastore(ctx, s.Client(), &req) if err != nil { return nil, err } return NewDatastore(s.Client(), res.Returnval), nil } func (s HostDatastoreSystem) CreateNasDatastore(ctx context.Context, spec types.HostNasVolumeSpec) (*Datastore, error) { req := types.CreateNasDatastore{ This: s.Reference(), Spec: spec, } res, err := methods.CreateNasDatastore(ctx, s.Client(), &req) if err != nil { return nil, err } return NewDatastore(s.Client(), res.Returnval), nil } func (s HostDatastoreSystem) CreateVmfsDatastore(ctx context.Context, spec types.VmfsDatastoreCreateSpec) (*Datastore, error) { req := types.CreateVmfsDatastore{ This: s.Reference(), Spec: spec, } res, err := methods.CreateVmfsDatastore(ctx, s.Client(), &req) if err != nil { return nil, err } return NewDatastore(s.Client(), res.Returnval), nil } func (s HostDatastoreSystem) Remove(ctx context.Context, ds *Datastore) error { req := types.RemoveDatastore{ This: s.Reference(), Datastore: ds.Reference(), } _, err := methods.RemoveDatastore(ctx, s.Client(), &req) if err != nil { return err } return nil } func (s HostDatastoreSystem) QueryAvailableDisksForVmfs(ctx context.Context) ([]types.HostScsiDisk, error) { req := types.QueryAvailableDisksForVmfs{ This: s.Reference(), } res, err := methods.QueryAvailableDisksForVmfs(ctx, s.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (s HostDatastoreSystem) QueryVmfsDatastoreCreateOptions(ctx context.Context, devicePath string) ([]types.VmfsDatastoreOption, error) { req := types.QueryVmfsDatastoreCreateOptions{ This: s.Reference(), DevicePath: devicePath, } res, err := methods.QueryVmfsDatastoreCreateOptions(ctx, s.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } govmomi-0.15.0/object/host_date_time_system.go000066400000000000000000000032361312205533500214460ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "time" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostDateTimeSystem struct { Common } func NewHostDateTimeSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostDateTimeSystem { return &HostDateTimeSystem{ Common: NewCommon(c, ref), } } func (s HostDateTimeSystem) UpdateConfig(ctx context.Context, config types.HostDateTimeConfig) error { req := types.UpdateDateTimeConfig{ This: s.Reference(), Config: config, } _, err := methods.UpdateDateTimeConfig(ctx, s.c, &req) return err } func (s HostDateTimeSystem) Update(ctx context.Context, date time.Time) error { req := types.UpdateDateTime{ This: s.Reference(), DateTime: date, } _, err := methods.UpdateDateTime(ctx, s.c, &req) return err } func (s HostDateTimeSystem) Query(ctx context.Context) (*time.Time, error) { req := types.QueryDateTime{ This: s.Reference(), } res, err := methods.QueryDateTime(ctx, s.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } govmomi-0.15.0/object/host_firewall_system.go000066400000000000000000000106141312205533500213160ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "errors" "fmt" "strings" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HostFirewallSystem struct { Common } func NewHostFirewallSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostFirewallSystem { return &HostFirewallSystem{ Common: NewCommon(c, ref), } } func (s HostFirewallSystem) DisableRuleset(ctx context.Context, id string) error { req := types.DisableRuleset{ This: s.Reference(), Id: id, } _, err := methods.DisableRuleset(ctx, s.c, &req) return err } func (s HostFirewallSystem) EnableRuleset(ctx context.Context, id string) error { req := types.EnableRuleset{ This: s.Reference(), Id: id, } _, err := methods.EnableRuleset(ctx, s.c, &req) return err } func (s HostFirewallSystem) Refresh(ctx context.Context) error { req := types.RefreshFirewall{ This: s.Reference(), } _, err := methods.RefreshFirewall(ctx, s.c, &req) return err } func (s HostFirewallSystem) Info(ctx context.Context) (*types.HostFirewallInfo, error) { var fs mo.HostFirewallSystem err := s.Properties(ctx, s.Reference(), []string{"firewallInfo"}, &fs) if err != nil { return nil, err } return fs.FirewallInfo, nil } // HostFirewallRulesetList provides helpers for a slice of types.HostFirewallRuleset type HostFirewallRulesetList []types.HostFirewallRuleset // ByRule returns a HostFirewallRulesetList where Direction, PortType and Protocol are equal and Port is within range func (l HostFirewallRulesetList) ByRule(rule types.HostFirewallRule) HostFirewallRulesetList { var matches HostFirewallRulesetList for _, rs := range l { for _, r := range rs.Rule { if r.PortType != rule.PortType || r.Protocol != rule.Protocol || r.Direction != rule.Direction { continue } if r.EndPort == 0 && rule.Port == r.Port || rule.Port >= r.Port && rule.Port <= r.EndPort { matches = append(matches, rs) break } } } return matches } // EnabledByRule returns a HostFirewallRulesetList with Match(rule) applied and filtered via Enabled() // if enabled param is true, otherwise filtered via Disabled(). // An error is returned if the resulting list is empty. func (l HostFirewallRulesetList) EnabledByRule(rule types.HostFirewallRule, enabled bool) (HostFirewallRulesetList, error) { var matched, skipped HostFirewallRulesetList var matchedKind, skippedKind string l = l.ByRule(rule) if enabled { matched = l.Enabled() matchedKind = "enabled" skipped = l.Disabled() skippedKind = "disabled" } else { matched = l.Disabled() matchedKind = "disabled" skipped = l.Enabled() skippedKind = "enabled" } if len(matched) == 0 { msg := fmt.Sprintf("%d %s firewall rulesets match %s %s %s %d, %d %s rulesets match", len(matched), matchedKind, rule.Direction, rule.Protocol, rule.PortType, rule.Port, len(skipped), skippedKind) if len(skipped) != 0 { msg += fmt.Sprintf(": %s", strings.Join(skipped.Keys(), ", ")) } return nil, errors.New(msg) } return matched, nil } // Enabled returns a HostFirewallRulesetList with enabled rules func (l HostFirewallRulesetList) Enabled() HostFirewallRulesetList { var matches HostFirewallRulesetList for _, rs := range l { if rs.Enabled { matches = append(matches, rs) } } return matches } // Disabled returns a HostFirewallRulesetList with disabled rules func (l HostFirewallRulesetList) Disabled() HostFirewallRulesetList { var matches HostFirewallRulesetList for _, rs := range l { if !rs.Enabled { matches = append(matches, rs) } } return matches } // Keys returns the HostFirewallRuleset.Key for each ruleset in the list func (l HostFirewallRulesetList) Keys() []string { var keys []string for _, rs := range l { keys = append(keys, rs.Key) } return keys } govmomi-0.15.0/object/host_network_system.go000066400000000000000000000212201312205533500211750ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostNetworkSystem struct { Common } func NewHostNetworkSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostNetworkSystem { return &HostNetworkSystem{ Common: NewCommon(c, ref), } } // AddPortGroup wraps methods.AddPortGroup func (o HostNetworkSystem) AddPortGroup(ctx context.Context, portgrp types.HostPortGroupSpec) error { req := types.AddPortGroup{ This: o.Reference(), Portgrp: portgrp, } _, err := methods.AddPortGroup(ctx, o.c, &req) if err != nil { return err } return nil } // AddServiceConsoleVirtualNic wraps methods.AddServiceConsoleVirtualNic func (o HostNetworkSystem) AddServiceConsoleVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) { req := types.AddServiceConsoleVirtualNic{ This: o.Reference(), Portgroup: portgroup, Nic: nic, } res, err := methods.AddServiceConsoleVirtualNic(ctx, o.c, &req) if err != nil { return "", err } return res.Returnval, nil } // AddVirtualNic wraps methods.AddVirtualNic func (o HostNetworkSystem) AddVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) { req := types.AddVirtualNic{ This: o.Reference(), Portgroup: portgroup, Nic: nic, } res, err := methods.AddVirtualNic(ctx, o.c, &req) if err != nil { return "", err } return res.Returnval, nil } // AddVirtualSwitch wraps methods.AddVirtualSwitch func (o HostNetworkSystem) AddVirtualSwitch(ctx context.Context, vswitchName string, spec *types.HostVirtualSwitchSpec) error { req := types.AddVirtualSwitch{ This: o.Reference(), VswitchName: vswitchName, Spec: spec, } _, err := methods.AddVirtualSwitch(ctx, o.c, &req) if err != nil { return err } return nil } // QueryNetworkHint wraps methods.QueryNetworkHint func (o HostNetworkSystem) QueryNetworkHint(ctx context.Context, device []string) error { req := types.QueryNetworkHint{ This: o.Reference(), Device: device, } _, err := methods.QueryNetworkHint(ctx, o.c, &req) if err != nil { return err } return nil } // RefreshNetworkSystem wraps methods.RefreshNetworkSystem func (o HostNetworkSystem) RefreshNetworkSystem(ctx context.Context) error { req := types.RefreshNetworkSystem{ This: o.Reference(), } _, err := methods.RefreshNetworkSystem(ctx, o.c, &req) if err != nil { return err } return nil } // RemovePortGroup wraps methods.RemovePortGroup func (o HostNetworkSystem) RemovePortGroup(ctx context.Context, pgName string) error { req := types.RemovePortGroup{ This: o.Reference(), PgName: pgName, } _, err := methods.RemovePortGroup(ctx, o.c, &req) if err != nil { return err } return nil } // RemoveServiceConsoleVirtualNic wraps methods.RemoveServiceConsoleVirtualNic func (o HostNetworkSystem) RemoveServiceConsoleVirtualNic(ctx context.Context, device string) error { req := types.RemoveServiceConsoleVirtualNic{ This: o.Reference(), Device: device, } _, err := methods.RemoveServiceConsoleVirtualNic(ctx, o.c, &req) if err != nil { return err } return nil } // RemoveVirtualNic wraps methods.RemoveVirtualNic func (o HostNetworkSystem) RemoveVirtualNic(ctx context.Context, device string) error { req := types.RemoveVirtualNic{ This: o.Reference(), Device: device, } _, err := methods.RemoveVirtualNic(ctx, o.c, &req) if err != nil { return err } return nil } // RemoveVirtualSwitch wraps methods.RemoveVirtualSwitch func (o HostNetworkSystem) RemoveVirtualSwitch(ctx context.Context, vswitchName string) error { req := types.RemoveVirtualSwitch{ This: o.Reference(), VswitchName: vswitchName, } _, err := methods.RemoveVirtualSwitch(ctx, o.c, &req) if err != nil { return err } return nil } // RestartServiceConsoleVirtualNic wraps methods.RestartServiceConsoleVirtualNic func (o HostNetworkSystem) RestartServiceConsoleVirtualNic(ctx context.Context, device string) error { req := types.RestartServiceConsoleVirtualNic{ This: o.Reference(), Device: device, } _, err := methods.RestartServiceConsoleVirtualNic(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateConsoleIpRouteConfig wraps methods.UpdateConsoleIpRouteConfig func (o HostNetworkSystem) UpdateConsoleIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error { req := types.UpdateConsoleIpRouteConfig{ This: o.Reference(), Config: config, } _, err := methods.UpdateConsoleIpRouteConfig(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateDnsConfig wraps methods.UpdateDnsConfig func (o HostNetworkSystem) UpdateDnsConfig(ctx context.Context, config types.BaseHostDnsConfig) error { req := types.UpdateDnsConfig{ This: o.Reference(), Config: config, } _, err := methods.UpdateDnsConfig(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateIpRouteConfig wraps methods.UpdateIpRouteConfig func (o HostNetworkSystem) UpdateIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error { req := types.UpdateIpRouteConfig{ This: o.Reference(), Config: config, } _, err := methods.UpdateIpRouteConfig(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateIpRouteTableConfig wraps methods.UpdateIpRouteTableConfig func (o HostNetworkSystem) UpdateIpRouteTableConfig(ctx context.Context, config types.HostIpRouteTableConfig) error { req := types.UpdateIpRouteTableConfig{ This: o.Reference(), Config: config, } _, err := methods.UpdateIpRouteTableConfig(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateNetworkConfig wraps methods.UpdateNetworkConfig func (o HostNetworkSystem) UpdateNetworkConfig(ctx context.Context, config types.HostNetworkConfig, changeMode string) (*types.HostNetworkConfigResult, error) { req := types.UpdateNetworkConfig{ This: o.Reference(), Config: config, ChangeMode: changeMode, } res, err := methods.UpdateNetworkConfig(ctx, o.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } // UpdatePhysicalNicLinkSpeed wraps methods.UpdatePhysicalNicLinkSpeed func (o HostNetworkSystem) UpdatePhysicalNicLinkSpeed(ctx context.Context, device string, linkSpeed *types.PhysicalNicLinkInfo) error { req := types.UpdatePhysicalNicLinkSpeed{ This: o.Reference(), Device: device, LinkSpeed: linkSpeed, } _, err := methods.UpdatePhysicalNicLinkSpeed(ctx, o.c, &req) if err != nil { return err } return nil } // UpdatePortGroup wraps methods.UpdatePortGroup func (o HostNetworkSystem) UpdatePortGroup(ctx context.Context, pgName string, portgrp types.HostPortGroupSpec) error { req := types.UpdatePortGroup{ This: o.Reference(), PgName: pgName, Portgrp: portgrp, } _, err := methods.UpdatePortGroup(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateServiceConsoleVirtualNic wraps methods.UpdateServiceConsoleVirtualNic func (o HostNetworkSystem) UpdateServiceConsoleVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error { req := types.UpdateServiceConsoleVirtualNic{ This: o.Reference(), Device: device, Nic: nic, } _, err := methods.UpdateServiceConsoleVirtualNic(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateVirtualNic wraps methods.UpdateVirtualNic func (o HostNetworkSystem) UpdateVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error { req := types.UpdateVirtualNic{ This: o.Reference(), Device: device, Nic: nic, } _, err := methods.UpdateVirtualNic(ctx, o.c, &req) if err != nil { return err } return nil } // UpdateVirtualSwitch wraps methods.UpdateVirtualSwitch func (o HostNetworkSystem) UpdateVirtualSwitch(ctx context.Context, vswitchName string, spec types.HostVirtualSwitchSpec) error { req := types.UpdateVirtualSwitch{ This: o.Reference(), VswitchName: vswitchName, Spec: spec, } _, err := methods.UpdateVirtualSwitch(ctx, o.c, &req) if err != nil { return err } return nil } govmomi-0.15.0/object/host_service_system.go000066400000000000000000000041601312205533500211500ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HostServiceSystem struct { Common } func NewHostServiceSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostServiceSystem { return &HostServiceSystem{ Common: NewCommon(c, ref), } } func (s HostServiceSystem) Service(ctx context.Context) ([]types.HostService, error) { var ss mo.HostServiceSystem err := s.Properties(ctx, s.Reference(), []string{"serviceInfo.service"}, &ss) if err != nil { return nil, err } return ss.ServiceInfo.Service, nil } func (s HostServiceSystem) Start(ctx context.Context, id string) error { req := types.StartService{ This: s.Reference(), Id: id, } _, err := methods.StartService(ctx, s.Client(), &req) return err } func (s HostServiceSystem) Stop(ctx context.Context, id string) error { req := types.StopService{ This: s.Reference(), Id: id, } _, err := methods.StopService(ctx, s.Client(), &req) return err } func (s HostServiceSystem) Restart(ctx context.Context, id string) error { req := types.RestartService{ This: s.Reference(), Id: id, } _, err := methods.RestartService(ctx, s.Client(), &req) return err } func (s HostServiceSystem) UpdatePolicy(ctx context.Context, id string, policy string) error { req := types.UpdateServicePolicy{ This: s.Reference(), Id: id, Policy: policy, } _, err := methods.UpdateServicePolicy(ctx, s.Client(), &req) return err } govmomi-0.15.0/object/host_storage_system.go000066400000000000000000000070671312205533500211650ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "errors" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostStorageSystem struct { Common } func NewHostStorageSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostStorageSystem { return &HostStorageSystem{ Common: NewCommon(c, ref), } } func (s HostStorageSystem) RetrieveDiskPartitionInfo(ctx context.Context, devicePath string) (*types.HostDiskPartitionInfo, error) { req := types.RetrieveDiskPartitionInfo{ This: s.Reference(), DevicePath: []string{devicePath}, } res, err := methods.RetrieveDiskPartitionInfo(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil || len(res.Returnval) == 0 { return nil, errors.New("no partition info") } return &res.Returnval[0], nil } func (s HostStorageSystem) ComputeDiskPartitionInfo(ctx context.Context, devicePath string, layout types.HostDiskPartitionLayout) (*types.HostDiskPartitionInfo, error) { req := types.ComputeDiskPartitionInfo{ This: s.Reference(), DevicePath: devicePath, Layout: layout, } res, err := methods.ComputeDiskPartitionInfo(ctx, s.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (s HostStorageSystem) UpdateDiskPartitionInfo(ctx context.Context, devicePath string, spec types.HostDiskPartitionSpec) error { req := types.UpdateDiskPartitions{ This: s.Reference(), DevicePath: devicePath, Spec: spec, } _, err := methods.UpdateDiskPartitions(ctx, s.c, &req) return err } func (s HostStorageSystem) RescanAllHba(ctx context.Context) error { req := types.RescanAllHba{ This: s.Reference(), } _, err := methods.RescanAllHba(ctx, s.c, &req) return err } func (s HostStorageSystem) MarkAsSsd(ctx context.Context, uuid string) (*Task, error) { req := types.MarkAsSsd_Task{ This: s.Reference(), ScsiDiskUuid: uuid, } res, err := methods.MarkAsSsd_Task(ctx, s.c, &req) if err != nil { return nil, err } return NewTask(s.c, res.Returnval), nil } func (s HostStorageSystem) MarkAsNonSsd(ctx context.Context, uuid string) (*Task, error) { req := types.MarkAsNonSsd_Task{ This: s.Reference(), ScsiDiskUuid: uuid, } res, err := methods.MarkAsNonSsd_Task(ctx, s.c, &req) if err != nil { return nil, err } return NewTask(s.c, res.Returnval), nil } func (s HostStorageSystem) MarkAsLocal(ctx context.Context, uuid string) (*Task, error) { req := types.MarkAsLocal_Task{ This: s.Reference(), ScsiDiskUuid: uuid, } res, err := methods.MarkAsLocal_Task(ctx, s.c, &req) if err != nil { return nil, err } return NewTask(s.c, res.Returnval), nil } func (s HostStorageSystem) MarkAsNonLocal(ctx context.Context, uuid string) (*Task, error) { req := types.MarkAsNonLocal_Task{ This: s.Reference(), ScsiDiskUuid: uuid, } res, err := methods.MarkAsNonLocal_Task(ctx, s.c, &req) if err != nil { return nil, err } return NewTask(s.c, res.Returnval), nil } govmomi-0.15.0/object/host_system.go000066400000000000000000000073761312205533500174440ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "fmt" "net" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HostSystem struct { Common } func NewHostSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostSystem { return &HostSystem{ Common: NewCommon(c, ref), } } func (h HostSystem) ConfigManager() *HostConfigManager { return NewHostConfigManager(h.c, h.Reference()) } func (h HostSystem) ResourcePool(ctx context.Context) (*ResourcePool, error) { var mh mo.HostSystem err := h.Properties(ctx, h.Reference(), []string{"parent"}, &mh) if err != nil { return nil, err } var mcr *mo.ComputeResource var parent interface{} switch mh.Parent.Type { case "ComputeResource": mcr = new(mo.ComputeResource) parent = mcr case "ClusterComputeResource": mcc := new(mo.ClusterComputeResource) mcr = &mcc.ComputeResource parent = mcc default: return nil, fmt.Errorf("unknown host parent type: %s", mh.Parent.Type) } err = h.Properties(ctx, *mh.Parent, []string{"resourcePool"}, parent) if err != nil { return nil, err } pool := NewResourcePool(h.c, *mcr.ResourcePool) return pool, nil } func (h HostSystem) ManagementIPs(ctx context.Context) ([]net.IP, error) { var mh mo.HostSystem err := h.Properties(ctx, h.Reference(), []string{"config.virtualNicManagerInfo.netConfig"}, &mh) if err != nil { return nil, err } var ips []net.IP for _, nc := range mh.Config.VirtualNicManagerInfo.NetConfig { if nc.NicType == "management" && len(nc.CandidateVnic) > 0 { ip := net.ParseIP(nc.CandidateVnic[0].Spec.Ip.IpAddress) if ip != nil { ips = append(ips, ip) } } } return ips, nil } func (h HostSystem) Disconnect(ctx context.Context) (*Task, error) { req := types.DisconnectHost_Task{ This: h.Reference(), } res, err := methods.DisconnectHost_Task(ctx, h.c, &req) if err != nil { return nil, err } return NewTask(h.c, res.Returnval), nil } func (h HostSystem) Reconnect(ctx context.Context, cnxSpec *types.HostConnectSpec, reconnectSpec *types.HostSystemReconnectSpec) (*Task, error) { req := types.ReconnectHost_Task{ This: h.Reference(), CnxSpec: cnxSpec, ReconnectSpec: reconnectSpec, } res, err := methods.ReconnectHost_Task(ctx, h.c, &req) if err != nil { return nil, err } return NewTask(h.c, res.Returnval), nil } func (h HostSystem) EnterMaintenanceMode(ctx context.Context, timeout int32, evacuate bool, spec *types.HostMaintenanceSpec) (*Task, error) { req := types.EnterMaintenanceMode_Task{ This: h.Reference(), Timeout: timeout, EvacuatePoweredOffVms: types.NewBool(evacuate), MaintenanceSpec: spec, } res, err := methods.EnterMaintenanceMode_Task(ctx, h.c, &req) if err != nil { return nil, err } return NewTask(h.c, res.Returnval), nil } func (h HostSystem) ExitMaintenanceMode(ctx context.Context, timeout int32) (*Task, error) { req := types.ExitMaintenanceMode_Task{ This: h.Reference(), Timeout: timeout, } res, err := methods.ExitMaintenanceMode_Task(ctx, h.c, &req) if err != nil { return nil, err } return NewTask(h.c, res.Returnval), nil } govmomi-0.15.0/object/host_virtual_nic_manager.go000066400000000000000000000050371312205533500221210ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HostVirtualNicManager struct { Common Host *HostSystem } func NewHostVirtualNicManager(c *vim25.Client, ref types.ManagedObjectReference, host types.ManagedObjectReference) *HostVirtualNicManager { return &HostVirtualNicManager{ Common: NewCommon(c, ref), Host: NewHostSystem(c, host), } } func (m HostVirtualNicManager) Info(ctx context.Context) (*types.HostVirtualNicManagerInfo, error) { var vnm mo.HostVirtualNicManager err := m.Properties(ctx, m.Reference(), []string{"info"}, &vnm) if err != nil { return nil, err } return &vnm.Info, nil } func (m HostVirtualNicManager) DeselectVnic(ctx context.Context, nicType string, device string) error { if nicType == string(types.HostVirtualNicManagerNicTypeVsan) { // Avoid fault.NotSupported: // "Error deselecting device '$device': VSAN interfaces must be deselected using vim.host.VsanSystem" s, err := m.Host.ConfigManager().VsanSystem(ctx) if err != nil { return err } return s.updateVnic(ctx, device, false) } req := types.DeselectVnicForNicType{ This: m.Reference(), NicType: nicType, Device: device, } _, err := methods.DeselectVnicForNicType(ctx, m.Client(), &req) return err } func (m HostVirtualNicManager) SelectVnic(ctx context.Context, nicType string, device string) error { if nicType == string(types.HostVirtualNicManagerNicTypeVsan) { // Avoid fault.NotSupported: // "Error selecting device '$device': VSAN interfaces must be selected using vim.host.VsanSystem" s, err := m.Host.ConfigManager().VsanSystem(ctx) if err != nil { return err } return s.updateVnic(ctx, device, true) } req := types.SelectVnicForNicType{ This: m.Reference(), NicType: nicType, Device: device, } _, err := methods.SelectVnicForNicType(ctx, m.Client(), &req) return err } govmomi-0.15.0/object/host_vsan_internal_system.go000066400000000000000000000063411312205533500223560ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "encoding/json" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type HostVsanInternalSystem struct { Common } func NewHostVsanInternalSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostVsanInternalSystem { m := HostVsanInternalSystem{ Common: NewCommon(c, ref), } return &m } // QueryVsanObjectUuidsByFilter returns vSAN DOM object uuids by filter. func (m HostVsanInternalSystem) QueryVsanObjectUuidsByFilter(ctx context.Context, uuids []string, limit int32, version int32) ([]string, error) { req := types.QueryVsanObjectUuidsByFilter{ This: m.Reference(), Uuids: uuids, Limit: limit, Version: version, } res, err := methods.QueryVsanObjectUuidsByFilter(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } type VsanObjExtAttrs struct { Type string `json:"Object type"` Class string `json:"Object class"` Size string `json:"Object size"` Path string `json:"Object path"` Name string `json:"User friendly name"` } func (a *VsanObjExtAttrs) DatastorePath(dir string) string { l := len(dir) path := a.Path if len(path) >= l { path = a.Path[l:] } if path != "" { return path } return a.Name // vmnamespace } // GetVsanObjExtAttrs is internal and intended for troubleshooting/debugging situations in the field. // WARNING: This API can be slow because we do IOs (reads) to all the objects. func (m HostVsanInternalSystem) GetVsanObjExtAttrs(ctx context.Context, uuids []string) (map[string]VsanObjExtAttrs, error) { req := types.GetVsanObjExtAttrs{ This: m.Reference(), Uuids: uuids, } res, err := methods.GetVsanObjExtAttrs(ctx, m.Client(), &req) if err != nil { return nil, err } var attrs map[string]VsanObjExtAttrs err = json.Unmarshal([]byte(res.Returnval), &attrs) return attrs, err } // DeleteVsanObjects is internal and intended for troubleshooting/debugging only. // WARNING: This API can be slow because we do IOs to all the objects. // DOM won't allow access to objects which have lost quorum. Such objects can be deleted with the optional "force" flag. // These objects may however re-appear with quorum if the absent components come back (network partition gets resolved, etc.) func (m HostVsanInternalSystem) DeleteVsanObjects(ctx context.Context, uuids []string, force *bool) ([]types.HostVsanInternalSystemDeleteVsanObjectsResult, error) { req := types.DeleteVsanObjects{ This: m.Reference(), Uuids: uuids, Force: force, } res, err := methods.DeleteVsanObjects(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } govmomi-0.15.0/object/host_vsan_system.go000066400000000000000000000040521312205533500204570ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HostVsanSystem struct { Common } func NewHostVsanSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostVsanSystem { return &HostVsanSystem{ Common: NewCommon(c, ref), } } func (s HostVsanSystem) Update(ctx context.Context, config types.VsanHostConfigInfo) (*Task, error) { req := types.UpdateVsan_Task{ This: s.Reference(), Config: config, } res, err := methods.UpdateVsan_Task(ctx, s.Client(), &req) if err != nil { return nil, err } return NewTask(s.Client(), res.Returnval), nil } // updateVnic in support of the HostVirtualNicManager.{SelectVnic,DeselectVnic} methods func (s HostVsanSystem) updateVnic(ctx context.Context, device string, enable bool) error { var vsan mo.HostVsanSystem err := s.Properties(ctx, s.Reference(), []string{"config.networkInfo.port"}, &vsan) if err != nil { return err } info := vsan.Config var port []types.VsanHostConfigInfoNetworkInfoPortConfig for _, p := range info.NetworkInfo.Port { if p.Device == device { continue } port = append(port, p) } if enable { port = append(port, types.VsanHostConfigInfoNetworkInfoPortConfig{ Device: device, }) } info.NetworkInfo.Port = port task, err := s.Update(ctx, info) if err != nil { return err } _, err = task.WaitForResult(ctx, nil) return err } govmomi-0.15.0/object/http_nfc_lease.go000066400000000000000000000063621312205533500200330ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "errors" "fmt" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type HttpNfcLease struct { Common } func NewHttpNfcLease(c *vim25.Client, ref types.ManagedObjectReference) *HttpNfcLease { return &HttpNfcLease{ Common: NewCommon(c, ref), } } // HttpNfcLeaseAbort wraps methods.HttpNfcLeaseAbort func (o HttpNfcLease) HttpNfcLeaseAbort(ctx context.Context, fault *types.LocalizedMethodFault) error { req := types.HttpNfcLeaseAbort{ This: o.Reference(), Fault: fault, } _, err := methods.HttpNfcLeaseAbort(ctx, o.c, &req) if err != nil { return err } return nil } // HttpNfcLeaseComplete wraps methods.HttpNfcLeaseComplete func (o HttpNfcLease) HttpNfcLeaseComplete(ctx context.Context) error { req := types.HttpNfcLeaseComplete{ This: o.Reference(), } _, err := methods.HttpNfcLeaseComplete(ctx, o.c, &req) if err != nil { return err } return nil } // HttpNfcLeaseGetManifest wraps methods.HttpNfcLeaseGetManifest func (o HttpNfcLease) HttpNfcLeaseGetManifest(ctx context.Context) error { req := types.HttpNfcLeaseGetManifest{ This: o.Reference(), } _, err := methods.HttpNfcLeaseGetManifest(ctx, o.c, &req) if err != nil { return err } return nil } // HttpNfcLeaseProgress wraps methods.HttpNfcLeaseProgress func (o HttpNfcLease) HttpNfcLeaseProgress(ctx context.Context, percent int32) error { req := types.HttpNfcLeaseProgress{ This: o.Reference(), Percent: percent, } _, err := methods.HttpNfcLeaseProgress(ctx, o.c, &req) if err != nil { return err } return nil } func (o HttpNfcLease) Wait(ctx context.Context) (*types.HttpNfcLeaseInfo, error) { var lease mo.HttpNfcLease pc := property.DefaultCollector(o.c) err := property.Wait(ctx, pc, o.Reference(), []string{"state", "info", "error"}, func(pc []types.PropertyChange) bool { done := false for _, c := range pc { if c.Val == nil { continue } switch c.Name { case "error": val := c.Val.(types.LocalizedMethodFault) lease.Error = &val done = true case "info": val := c.Val.(types.HttpNfcLeaseInfo) lease.Info = &val case "state": lease.State = c.Val.(types.HttpNfcLeaseState) if lease.State != types.HttpNfcLeaseStateInitializing { done = true } } } return done }) if err != nil { return nil, err } if lease.State == types.HttpNfcLeaseStateReady { return lease.Info, nil } if lease.Error != nil { return nil, errors.New(lease.Error.LocalizedMessage) } return nil, fmt.Errorf("unexpected nfc lease state: %s", lease.State) } govmomi-0.15.0/object/namespace_manager.go000066400000000000000000000037501312205533500205010ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type DatastoreNamespaceManager struct { Common } func NewDatastoreNamespaceManager(c *vim25.Client) *DatastoreNamespaceManager { n := DatastoreNamespaceManager{ Common: NewCommon(c, *c.ServiceContent.DatastoreNamespaceManager), } return &n } // CreateDirectory creates a top-level directory on the given vsan datastore, using // the given user display name hint and opaque storage policy. func (nm DatastoreNamespaceManager) CreateDirectory(ctx context.Context, ds *Datastore, displayName string, policy string) (string, error) { req := &types.CreateDirectory{ This: nm.Reference(), Datastore: ds.Reference(), DisplayName: displayName, Policy: policy, } resp, err := methods.CreateDirectory(ctx, nm.c, req) if err != nil { return "", err } return resp.Returnval, nil } // DeleteDirectory deletes the given top-level directory from a vsan datastore. func (nm DatastoreNamespaceManager) DeleteDirectory(ctx context.Context, dc *Datacenter, datastorePath string) error { req := &types.DeleteDirectory{ This: nm.Reference(), DatastorePath: datastorePath, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } if _, err := methods.DeleteDirectory(ctx, nm.c, req); err != nil { return err } return nil } govmomi-0.15.0/object/network.go000066400000000000000000000023461312205533500165440ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/types" ) type Network struct { Common } func NewNetwork(c *vim25.Client, ref types.ManagedObjectReference) *Network { return &Network{ Common: NewCommon(c, ref), } } // EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network func (n Network) EthernetCardBackingInfo(_ context.Context) (types.BaseVirtualDeviceBackingInfo, error) { name := n.Name() backing := &types.VirtualEthernetCardNetworkBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ DeviceName: name, }, } return backing, nil } govmomi-0.15.0/object/network_reference.go000066400000000000000000000016471312205533500205650ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25/types" ) // The NetworkReference interface is implemented by managed objects // which can be used as the backing for a VirtualEthernetCard. type NetworkReference interface { Reference EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) } govmomi-0.15.0/object/network_test.go000066400000000000000000000014121312205533500175740ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object // Network should implement the Reference interface. var _ Reference = Network{} // Network should implement the NetworkReference interface. var _ NetworkReference = Network{} govmomi-0.15.0/object/opaque_network.go000066400000000000000000000030741312205533500201150ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "fmt" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type OpaqueNetwork struct { Common } func NewOpaqueNetwork(c *vim25.Client, ref types.ManagedObjectReference) *OpaqueNetwork { return &OpaqueNetwork{ Common: NewCommon(c, ref), } } // EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network func (n OpaqueNetwork) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { var net mo.OpaqueNetwork if err := n.Properties(ctx, n.Reference(), []string{"summary"}, &net); err != nil { return nil, err } summary, ok := net.Summary.(*types.OpaqueNetworkSummary) if !ok { return nil, fmt.Errorf("%s unsupported network type: %T", n, net.Summary) } backing := &types.VirtualEthernetCardOpaqueNetworkBackingInfo{ OpaqueNetworkId: summary.OpaqueNetworkId, OpaqueNetworkType: summary.OpaqueNetworkType, } return backing, nil } govmomi-0.15.0/object/option_manager.go000066400000000000000000000027001312205533500200470ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type OptionManager struct { Common } func NewOptionManager(c *vim25.Client, ref types.ManagedObjectReference) *OptionManager { return &OptionManager{ Common: NewCommon(c, ref), } } func (m OptionManager) Query(ctx context.Context, name string) ([]types.BaseOptionValue, error) { req := types.QueryOptions{ This: m.Reference(), Name: name, } res, err := methods.QueryOptions(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (m OptionManager) Update(ctx context.Context, value []types.BaseOptionValue) error { req := types.UpdateOptions{ This: m.Reference(), ChangedValue: value, } _, err := methods.UpdateOptions(ctx, m.Client(), &req) return err } govmomi-0.15.0/object/ovf_manager.go000066400000000000000000000054611312205533500173400ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type OvfManager struct { Common } func NewOvfManager(c *vim25.Client) *OvfManager { o := OvfManager{ Common: NewCommon(c, *c.ServiceContent.OvfManager), } return &o } // CreateDescriptor wraps methods.CreateDescriptor func (o OvfManager) CreateDescriptor(ctx context.Context, obj Reference, cdp types.OvfCreateDescriptorParams) (*types.OvfCreateDescriptorResult, error) { req := types.CreateDescriptor{ This: o.Reference(), Obj: obj.Reference(), Cdp: cdp, } res, err := methods.CreateDescriptor(ctx, o.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } // CreateImportSpec wraps methods.CreateImportSpec func (o OvfManager) CreateImportSpec(ctx context.Context, ovfDescriptor string, resourcePool Reference, datastore Reference, cisp types.OvfCreateImportSpecParams) (*types.OvfCreateImportSpecResult, error) { req := types.CreateImportSpec{ This: o.Reference(), OvfDescriptor: ovfDescriptor, ResourcePool: resourcePool.Reference(), Datastore: datastore.Reference(), Cisp: cisp, } res, err := methods.CreateImportSpec(ctx, o.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } // ParseDescriptor wraps methods.ParseDescriptor func (o OvfManager) ParseDescriptor(ctx context.Context, ovfDescriptor string, pdp types.OvfParseDescriptorParams) (*types.OvfParseDescriptorResult, error) { req := types.ParseDescriptor{ This: o.Reference(), OvfDescriptor: ovfDescriptor, Pdp: pdp, } res, err := methods.ParseDescriptor(ctx, o.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } // ValidateHost wraps methods.ValidateHost func (o OvfManager) ValidateHost(ctx context.Context, ovfDescriptor string, host Reference, vhp types.OvfValidateHostParams) (*types.OvfValidateHostResult, error) { req := types.ValidateHost{ This: o.Reference(), OvfDescriptor: ovfDescriptor, Host: host.Reference(), Vhp: vhp, } res, err := methods.ValidateHost(ctx, o.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } govmomi-0.15.0/object/resource_pool.go000066400000000000000000000062051312205533500177310ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type ResourcePool struct { Common } func NewResourcePool(c *vim25.Client, ref types.ManagedObjectReference) *ResourcePool { return &ResourcePool{ Common: NewCommon(c, ref), } } func (p ResourcePool) ImportVApp(ctx context.Context, spec types.BaseImportSpec, folder *Folder, host *HostSystem) (*HttpNfcLease, error) { req := types.ImportVApp{ This: p.Reference(), Spec: spec, } if folder != nil { ref := folder.Reference() req.Folder = &ref } if host != nil { ref := host.Reference() req.Host = &ref } res, err := methods.ImportVApp(ctx, p.c, &req) if err != nil { return nil, err } return NewHttpNfcLease(p.c, res.Returnval), nil } func (p ResourcePool) Create(ctx context.Context, name string, spec types.ResourceConfigSpec) (*ResourcePool, error) { req := types.CreateResourcePool{ This: p.Reference(), Name: name, Spec: spec, } res, err := methods.CreateResourcePool(ctx, p.c, &req) if err != nil { return nil, err } return NewResourcePool(p.c, res.Returnval), nil } func (p ResourcePool) CreateVApp(ctx context.Context, name string, resSpec types.ResourceConfigSpec, configSpec types.VAppConfigSpec, folder *Folder) (*VirtualApp, error) { req := types.CreateVApp{ This: p.Reference(), Name: name, ResSpec: resSpec, ConfigSpec: configSpec, } if folder != nil { ref := folder.Reference() req.VmFolder = &ref } res, err := methods.CreateVApp(ctx, p.c, &req) if err != nil { return nil, err } return NewVirtualApp(p.c, res.Returnval), nil } func (p ResourcePool) UpdateConfig(ctx context.Context, name string, config *types.ResourceConfigSpec) error { req := types.UpdateConfig{ This: p.Reference(), Name: name, Config: config, } if config != nil && config.Entity == nil { ref := p.Reference() // Create copy of config so changes won't leak back to the caller newConfig := *config newConfig.Entity = &ref req.Config = &newConfig } _, err := methods.UpdateConfig(ctx, p.c, &req) return err } func (p ResourcePool) DestroyChildren(ctx context.Context) error { req := types.DestroyChildren{ This: p.Reference(), } _, err := methods.DestroyChildren(ctx, p.c, &req) return err } func (p ResourcePool) Destroy(ctx context.Context) (*Task, error) { req := types.Destroy_Task{ This: p.Reference(), } res, err := methods.Destroy_Task(ctx, p.c, &req) if err != nil { return nil, err } return NewTask(p.c, res.Returnval), nil } govmomi-0.15.0/object/search_index.go000066400000000000000000000076371312205533500175170ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type SearchIndex struct { Common } func NewSearchIndex(c *vim25.Client) *SearchIndex { s := SearchIndex{ Common: NewCommon(c, *c.ServiceContent.SearchIndex), } return &s } // FindByDatastorePath finds a virtual machine by its location on a datastore. func (s SearchIndex) FindByDatastorePath(ctx context.Context, dc *Datacenter, path string) (Reference, error) { req := types.FindByDatastorePath{ This: s.Reference(), Datacenter: dc.Reference(), Path: path, } res, err := methods.FindByDatastorePath(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil { return nil, nil } return NewReference(s.c, *res.Returnval), nil } // FindByDnsName finds a virtual machine or host by DNS name. func (s SearchIndex) FindByDnsName(ctx context.Context, dc *Datacenter, dnsName string, vmSearch bool) (Reference, error) { req := types.FindByDnsName{ This: s.Reference(), DnsName: dnsName, VmSearch: vmSearch, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := methods.FindByDnsName(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil { return nil, nil } return NewReference(s.c, *res.Returnval), nil } // FindByInventoryPath finds a managed entity based on its location in the inventory. func (s SearchIndex) FindByInventoryPath(ctx context.Context, path string) (Reference, error) { req := types.FindByInventoryPath{ This: s.Reference(), InventoryPath: path, } res, err := methods.FindByInventoryPath(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil { return nil, nil } return NewReference(s.c, *res.Returnval), nil } // FindByIp finds a virtual machine or host by IP address. func (s SearchIndex) FindByIp(ctx context.Context, dc *Datacenter, ip string, vmSearch bool) (Reference, error) { req := types.FindByIp{ This: s.Reference(), Ip: ip, VmSearch: vmSearch, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := methods.FindByIp(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil { return nil, nil } return NewReference(s.c, *res.Returnval), nil } // FindByUuid finds a virtual machine or host by UUID. func (s SearchIndex) FindByUuid(ctx context.Context, dc *Datacenter, uuid string, vmSearch bool, instanceUuid *bool) (Reference, error) { req := types.FindByUuid{ This: s.Reference(), Uuid: uuid, VmSearch: vmSearch, InstanceUuid: instanceUuid, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := methods.FindByUuid(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil { return nil, nil } return NewReference(s.c, *res.Returnval), nil } // FindChild finds a particular child based on a managed entity name. func (s SearchIndex) FindChild(ctx context.Context, entity Reference, name string) (Reference, error) { req := types.FindChild{ This: s.Reference(), Entity: entity.Reference(), Name: name, } res, err := methods.FindChild(ctx, s.c, &req) if err != nil { return nil, err } if res.Returnval == nil { return nil, nil } return NewReference(s.c, *res.Returnval), nil } govmomi-0.15.0/object/search_index_test.go000066400000000000000000000072671312205533500205550ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "fmt" "reflect" "testing" "github.com/vmware/govmomi/test" "github.com/vmware/govmomi/vim25/mo" ) func TestSearch(t *testing.T) { c := test.NewAuthenticatedClient(t) s := NewSearchIndex(c) ref, err := s.FindChild(context.Background(), NewRootFolder(c), "ha-datacenter") if err != nil { t.Fatal(err) } dc, ok := ref.(*Datacenter) if !ok { t.Errorf("Expected Datacenter: %#v", ref) } folders, err := dc.Folders(context.Background()) if err != nil { t.Fatal(err) } ref, err = s.FindChild(context.Background(), folders.DatastoreFolder, "datastore1") if err != nil { t.Fatal(err) } _, ok = ref.(*Datastore) if !ok { t.Errorf("Expected Datastore: %#v", ref) } ref, err = s.FindByInventoryPath(context.Background(), "/ha-datacenter/network/VM Network") if err != nil { t.Fatal(err) } _, ok = ref.(*Network) if !ok { t.Errorf("Expected Network: %#v", ref) } crs, err := folders.HostFolder.Children(context.Background()) if err != nil { if err != nil { t.Fatal(err) } } if len(crs) != 0 { var cr mo.ComputeResource ref = crs[0] err = s.Properties(context.Background(), ref.Reference(), []string{"host"}, &cr) if err != nil { t.Fatal(err) } var host mo.HostSystem ref = NewHostSystem(c, cr.Host[0]) err = s.Properties(context.Background(), ref.Reference(), []string{"name", "hardware", "config"}, &host) if err != nil { t.Fatal(err) } dnsConfig := host.Config.Network.DnsConfig.GetHostDnsConfig() dnsName := fmt.Sprintf("%s.%s", dnsConfig.HostName, dnsConfig.DomainName) shost, err := s.FindByDnsName(context.Background(), dc, dnsName, false) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(ref, shost) { t.Errorf("%#v != %#v\n", ref, shost) } shost, err = s.FindByUuid(context.Background(), dc, host.Hardware.SystemInfo.Uuid, false, nil) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(ref, shost) { t.Errorf("%#v != %#v\n", ref, shost) } } vms, err := folders.VmFolder.Children(context.Background()) if err != nil { t.Fatal(err) } if len(vms) != 0 { var vm mo.VirtualMachine ref = vms[0] err = s.Properties(context.Background(), ref.Reference(), []string{"config", "guest"}, &vm) if err != nil { t.Fatal(err) } svm, err := s.FindByDatastorePath(context.Background(), dc, vm.Config.Files.VmPathName) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(ref, svm) { t.Errorf("%#v != %#v\n", ref, svm) } svm, err = s.FindByUuid(context.Background(), dc, vm.Config.Uuid, true, nil) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(ref, svm) { t.Errorf("%#v != %#v\n", ref, svm) } if vm.Guest.HostName != "" { svm, err := s.FindByDnsName(context.Background(), dc, vm.Guest.HostName, true) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(ref, svm) { t.Errorf("%#v != %#v\n", ref, svm) } } if vm.Guest.IpAddress != "" { svm, err := s.FindByIp(context.Background(), dc, vm.Guest.IpAddress, true) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(ref, svm) { t.Errorf("%#v != %#v\n", ref, svm) } } } } govmomi-0.15.0/object/storage_pod.go000066400000000000000000000015721312205533500173610ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/types" ) type StoragePod struct { *Folder } func NewStoragePod(c *vim25.Client, ref types.ManagedObjectReference) *StoragePod { return &StoragePod{ Folder: &Folder{ Common: NewCommon(c, ref), }, } } govmomi-0.15.0/object/storage_resource_manager.go000066400000000000000000000106471312205533500221230ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type StorageResourceManager struct { Common } func NewStorageResourceManager(c *vim25.Client) *StorageResourceManager { sr := StorageResourceManager{ Common: NewCommon(c, *c.ServiceContent.StorageResourceManager), } return &sr } func (sr StorageResourceManager) ApplyStorageDrsRecommendation(ctx context.Context, key []string) (*Task, error) { req := types.ApplyStorageDrsRecommendation_Task{ This: sr.Reference(), Key: key, } res, err := methods.ApplyStorageDrsRecommendation_Task(ctx, sr.c, &req) if err != nil { return nil, err } return NewTask(sr.c, res.Returnval), nil } func (sr StorageResourceManager) ApplyStorageDrsRecommendationToPod(ctx context.Context, pod *StoragePod, key string) (*Task, error) { req := types.ApplyStorageDrsRecommendationToPod_Task{ This: sr.Reference(), Key: key, } if pod != nil { req.Pod = pod.Reference() } res, err := methods.ApplyStorageDrsRecommendationToPod_Task(ctx, sr.c, &req) if err != nil { return nil, err } return NewTask(sr.c, res.Returnval), nil } func (sr StorageResourceManager) CancelStorageDrsRecommendation(ctx context.Context, key []string) error { req := types.CancelStorageDrsRecommendation{ This: sr.Reference(), Key: key, } _, err := methods.CancelStorageDrsRecommendation(ctx, sr.c, &req) return err } func (sr StorageResourceManager) ConfigureDatastoreIORM(ctx context.Context, datastore *Datastore, spec types.StorageIORMConfigSpec, key string) (*Task, error) { req := types.ConfigureDatastoreIORM_Task{ This: sr.Reference(), Spec: spec, } if datastore != nil { req.Datastore = datastore.Reference() } res, err := methods.ConfigureDatastoreIORM_Task(ctx, sr.c, &req) if err != nil { return nil, err } return NewTask(sr.c, res.Returnval), nil } func (sr StorageResourceManager) ConfigureStorageDrsForPod(ctx context.Context, pod *StoragePod, spec types.StorageDrsConfigSpec, modify bool) (*Task, error) { req := types.ConfigureStorageDrsForPod_Task{ This: sr.Reference(), Spec: spec, Modify: modify, } if pod != nil { req.Pod = pod.Reference() } res, err := methods.ConfigureStorageDrsForPod_Task(ctx, sr.c, &req) if err != nil { return nil, err } return NewTask(sr.c, res.Returnval), nil } func (sr StorageResourceManager) QueryDatastorePerformanceSummary(ctx context.Context, datastore *Datastore) ([]types.StoragePerformanceSummary, error) { req := types.QueryDatastorePerformanceSummary{ This: sr.Reference(), } if datastore != nil { req.Datastore = datastore.Reference() } res, err := methods.QueryDatastorePerformanceSummary(ctx, sr.c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (sr StorageResourceManager) QueryIORMConfigOption(ctx context.Context, host *HostSystem) (*types.StorageIORMConfigOption, error) { req := types.QueryIORMConfigOption{ This: sr.Reference(), } if host != nil { req.Host = host.Reference() } res, err := methods.QueryIORMConfigOption(ctx, sr.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (sr StorageResourceManager) RecommendDatastores(ctx context.Context, storageSpec types.StoragePlacementSpec) (*types.StoragePlacementResult, error) { req := types.RecommendDatastores{ This: sr.Reference(), StorageSpec: storageSpec, } res, err := methods.RecommendDatastores(ctx, sr.c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (sr StorageResourceManager) RefreshStorageDrsRecommendation(ctx context.Context, pod *StoragePod) error { req := types.RefreshStorageDrsRecommendation{ This: sr.Reference(), } if pod != nil { req.Pod = pod.Reference() } _, err := methods.RefreshStorageDrsRecommendation(ctx, sr.c, &req) return err } govmomi-0.15.0/object/task.go000066400000000000000000000030261312205533500160110ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/task" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/progress" "github.com/vmware/govmomi/vim25/types" ) // Task is a convenience wrapper around task.Task that keeps a reference to // the client that was used to create it. This allows users to call the Wait() // function with only a context parameter, instead of a context parameter, a // soap.RoundTripper, and reference to the root property collector. type Task struct { Common } func NewTask(c *vim25.Client, ref types.ManagedObjectReference) *Task { t := Task{ Common: NewCommon(c, ref), } return &t } func (t *Task) Wait(ctx context.Context) error { _, err := t.WaitForResult(ctx, nil) return err } func (t *Task) WaitForResult(ctx context.Context, s progress.Sinker) (*types.TaskInfo, error) { p := property.DefaultCollector(t.c) return task.Wait(ctx, t.Reference(), p, s) } govmomi-0.15.0/object/types.go000066400000000000000000000034341312205533500162160ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/types" ) type Reference interface { Reference() types.ManagedObjectReference } func NewReference(c *vim25.Client, e types.ManagedObjectReference) Reference { switch e.Type { case "Folder": return NewFolder(c, e) case "StoragePod": return &StoragePod{ NewFolder(c, e), } case "Datacenter": return NewDatacenter(c, e) case "VirtualMachine": return NewVirtualMachine(c, e) case "VirtualApp": return &VirtualApp{ NewResourcePool(c, e), } case "ComputeResource": return NewComputeResource(c, e) case "ClusterComputeResource": return NewClusterComputeResource(c, e) case "HostSystem": return NewHostSystem(c, e) case "Network", "OpaqueNetwork": return NewNetwork(c, e) case "ResourcePool": return NewResourcePool(c, e) case "DistributedVirtualSwitch": return NewDistributedVirtualSwitch(c, e) case "VmwareDistributedVirtualSwitch": return &VmwareDistributedVirtualSwitch{*NewDistributedVirtualSwitch(c, e)} case "DistributedVirtualPortgroup": return NewDistributedVirtualPortgroup(c, e) case "Datastore": return NewDatastore(c, e) default: panic("Unknown managed entity: " + e.Type) } } govmomi-0.15.0/object/virtual_app.go000066400000000000000000000045411312205533500174000ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type VirtualApp struct { *ResourcePool } func NewVirtualApp(c *vim25.Client, ref types.ManagedObjectReference) *VirtualApp { return &VirtualApp{ ResourcePool: NewResourcePool(c, ref), } } func (p VirtualApp) CreateChildVM(ctx context.Context, config types.VirtualMachineConfigSpec, host *HostSystem) (*Task, error) { req := types.CreateChildVM_Task{ This: p.Reference(), Config: config, } if host != nil { ref := host.Reference() req.Host = &ref } res, err := methods.CreateChildVM_Task(ctx, p.c, &req) if err != nil { return nil, err } return NewTask(p.c, res.Returnval), nil } func (p VirtualApp) UpdateConfig(ctx context.Context, spec types.VAppConfigSpec) error { req := types.UpdateVAppConfig{ This: p.Reference(), Spec: spec, } _, err := methods.UpdateVAppConfig(ctx, p.c, &req) return err } func (p VirtualApp) PowerOn(ctx context.Context) (*Task, error) { req := types.PowerOnVApp_Task{ This: p.Reference(), } res, err := methods.PowerOnVApp_Task(ctx, p.c, &req) if err != nil { return nil, err } return NewTask(p.c, res.Returnval), nil } func (p VirtualApp) PowerOff(ctx context.Context, force bool) (*Task, error) { req := types.PowerOffVApp_Task{ This: p.Reference(), Force: force, } res, err := methods.PowerOffVApp_Task(ctx, p.c, &req) if err != nil { return nil, err } return NewTask(p.c, res.Returnval), nil } func (p VirtualApp) Suspend(ctx context.Context) (*Task, error) { req := types.SuspendVApp_Task{ This: p.Reference(), } res, err := methods.SuspendVApp_Task(ctx, p.c, &req) if err != nil { return nil, err } return NewTask(p.c, res.Returnval), nil } govmomi-0.15.0/object/virtual_device_list.go000066400000000000000000000663771312205533500211310ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "errors" "fmt" "path/filepath" "reflect" "regexp" "sort" "strings" "github.com/vmware/govmomi/vim25/types" ) // Type values for use in BootOrder const ( DeviceTypeCdrom = "cdrom" DeviceTypeDisk = "disk" DeviceTypeEthernet = "ethernet" DeviceTypeFloppy = "floppy" ) // VirtualDeviceList provides helper methods for working with a list of virtual devices. type VirtualDeviceList []types.BaseVirtualDevice // SCSIControllerTypes are used for adding a new SCSI controller to a VM. func SCSIControllerTypes() VirtualDeviceList { // Return a mutable list of SCSI controller types, initialized with defaults. return VirtualDeviceList([]types.BaseVirtualDevice{ &types.VirtualLsiLogicController{}, &types.VirtualBusLogicController{}, &types.ParaVirtualSCSIController{}, &types.VirtualLsiLogicSASController{}, }).Select(func(device types.BaseVirtualDevice) bool { c := device.(types.BaseVirtualSCSIController).GetVirtualSCSIController() c.SharedBus = types.VirtualSCSISharingNoSharing c.BusNumber = -1 return true }) } // EthernetCardTypes are used for adding a new ethernet card to a VM. func EthernetCardTypes() VirtualDeviceList { return VirtualDeviceList([]types.BaseVirtualDevice{ &types.VirtualE1000{}, &types.VirtualE1000e{}, &types.VirtualVmxnet3{}, }).Select(func(device types.BaseVirtualDevice) bool { c := device.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() c.GetVirtualDevice().Key = -1 return true }) } // Select returns a new list containing all elements of the list for which the given func returns true. func (l VirtualDeviceList) Select(f func(device types.BaseVirtualDevice) bool) VirtualDeviceList { var found VirtualDeviceList for _, device := range l { if f(device) { found = append(found, device) } } return found } // SelectByType returns a new list with devices that are equal to or extend the given type. func (l VirtualDeviceList) SelectByType(deviceType types.BaseVirtualDevice) VirtualDeviceList { dtype := reflect.TypeOf(deviceType) if dtype == nil { return nil } dname := dtype.Elem().Name() return l.Select(func(device types.BaseVirtualDevice) bool { t := reflect.TypeOf(device) if t == dtype { return true } _, ok := t.Elem().FieldByName(dname) return ok }) } // SelectByBackingInfo returns a new list with devices matching the given backing info. // If the value of backing is nil, any device with a backing of the same type will be returned. func (l VirtualDeviceList) SelectByBackingInfo(backing types.BaseVirtualDeviceBackingInfo) VirtualDeviceList { t := reflect.TypeOf(backing) return l.Select(func(device types.BaseVirtualDevice) bool { db := device.GetVirtualDevice().Backing if db == nil { return false } if reflect.TypeOf(db) != t { return false } if reflect.ValueOf(backing).IsNil() { // selecting by backing type return true } switch a := db.(type) { case *types.VirtualEthernetCardNetworkBackingInfo: b := backing.(*types.VirtualEthernetCardNetworkBackingInfo) return a.DeviceName == b.DeviceName case *types.VirtualEthernetCardDistributedVirtualPortBackingInfo: b := backing.(*types.VirtualEthernetCardDistributedVirtualPortBackingInfo) return a.Port.SwitchUuid == b.Port.SwitchUuid && a.Port.PortgroupKey == b.Port.PortgroupKey case *types.VirtualDiskFlatVer2BackingInfo: b := backing.(*types.VirtualDiskFlatVer2BackingInfo) if a.Parent != nil && b.Parent != nil { return a.Parent.FileName == b.Parent.FileName } return a.FileName == b.FileName case *types.VirtualSerialPortURIBackingInfo: b := backing.(*types.VirtualSerialPortURIBackingInfo) return a.ServiceURI == b.ServiceURI case types.BaseVirtualDeviceFileBackingInfo: b := backing.(types.BaseVirtualDeviceFileBackingInfo) return a.GetVirtualDeviceFileBackingInfo().FileName == b.GetVirtualDeviceFileBackingInfo().FileName default: return false } }) } // Find returns the device matching the given name. func (l VirtualDeviceList) Find(name string) types.BaseVirtualDevice { for _, device := range l { if l.Name(device) == name { return device } } return nil } // FindByKey returns the device matching the given key. func (l VirtualDeviceList) FindByKey(key int32) types.BaseVirtualDevice { for _, device := range l { if device.GetVirtualDevice().Key == key { return device } } return nil } // FindIDEController will find the named IDE controller if given, otherwise will pick an available controller. // An error is returned if the named controller is not found or not an IDE controller. Or, if name is not // given and no available controller can be found. func (l VirtualDeviceList) FindIDEController(name string) (*types.VirtualIDEController, error) { if name != "" { d := l.Find(name) if d == nil { return nil, fmt.Errorf("device '%s' not found", name) } if c, ok := d.(*types.VirtualIDEController); ok { return c, nil } return nil, fmt.Errorf("%s is not an IDE controller", name) } c := l.PickController((*types.VirtualIDEController)(nil)) if c == nil { return nil, errors.New("no available IDE controller") } return c.(*types.VirtualIDEController), nil } // CreateIDEController creates a new IDE controller. func (l VirtualDeviceList) CreateIDEController() (types.BaseVirtualDevice, error) { ide := &types.VirtualIDEController{} ide.Key = l.NewKey() return ide, nil } // FindSCSIController will find the named SCSI controller if given, otherwise will pick an available controller. // An error is returned if the named controller is not found or not an SCSI controller. Or, if name is not // given and no available controller can be found. func (l VirtualDeviceList) FindSCSIController(name string) (*types.VirtualSCSIController, error) { if name != "" { d := l.Find(name) if d == nil { return nil, fmt.Errorf("device '%s' not found", name) } if c, ok := d.(types.BaseVirtualSCSIController); ok { return c.GetVirtualSCSIController(), nil } return nil, fmt.Errorf("%s is not an SCSI controller", name) } c := l.PickController((*types.VirtualSCSIController)(nil)) if c == nil { return nil, errors.New("no available SCSI controller") } return c.(types.BaseVirtualSCSIController).GetVirtualSCSIController(), nil } // CreateSCSIController creates a new SCSI controller of type name if given, otherwise defaults to lsilogic. func (l VirtualDeviceList) CreateSCSIController(name string) (types.BaseVirtualDevice, error) { ctypes := SCSIControllerTypes() if name == "scsi" || name == "" { name = ctypes.Type(ctypes[0]) } found := ctypes.Select(func(device types.BaseVirtualDevice) bool { return l.Type(device) == name }) if len(found) == 0 { return nil, fmt.Errorf("unknown SCSI controller type '%s'", name) } c, ok := found[0].(types.BaseVirtualSCSIController) if !ok { return nil, fmt.Errorf("invalid SCSI controller type '%s'", name) } scsi := c.GetVirtualSCSIController() scsi.BusNumber = l.newSCSIBusNumber() scsi.Key = l.NewKey() scsi.ScsiCtlrUnitNumber = 7 return c.(types.BaseVirtualDevice), nil } var scsiBusNumbers = []int{0, 1, 2, 3} // newSCSIBusNumber returns the bus number to use for adding a new SCSI bus device. // -1 is returned if there are no bus numbers available. func (l VirtualDeviceList) newSCSIBusNumber() int32 { var used []int for _, d := range l.SelectByType((*types.VirtualSCSIController)(nil)) { num := d.(types.BaseVirtualSCSIController).GetVirtualSCSIController().BusNumber if num >= 0 { used = append(used, int(num)) } // else caller is creating a new vm using SCSIControllerTypes } sort.Ints(used) for i, n := range scsiBusNumbers { if i == len(used) || n != used[i] { return int32(n) } } return -1 } // FindNVMEController will find the named NVME controller if given, otherwise will pick an available controller. // An error is returned if the named controller is not found or not an NVME controller. Or, if name is not // given and no available controller can be found. func (l VirtualDeviceList) FindNVMEController(name string) (*types.VirtualNVMEController, error) { if name != "" { d := l.Find(name) if d == nil { return nil, fmt.Errorf("device '%s' not found", name) } if c, ok := d.(*types.VirtualNVMEController); ok { return c, nil } return nil, fmt.Errorf("%s is not an NVME controller", name) } c := l.PickController((*types.VirtualNVMEController)(nil)) if c == nil { return nil, errors.New("no available NVME controller") } return c.(*types.VirtualNVMEController), nil } // CreateNVMEController creates a new NVMWE controller. func (l VirtualDeviceList) CreateNVMEController() (types.BaseVirtualDevice, error) { nvme := &types.VirtualNVMEController{} nvme.BusNumber = l.newNVMEBusNumber() nvme.Key = l.NewKey() return nvme, nil } var nvmeBusNumbers = []int{0, 1, 2, 3} // newNVMEBusNumber returns the bus number to use for adding a new NVME bus device. // -1 is returned if there are no bus numbers available. func (l VirtualDeviceList) newNVMEBusNumber() int32 { var used []int for _, d := range l.SelectByType((*types.VirtualNVMEController)(nil)) { num := d.(types.BaseVirtualController).GetVirtualController().BusNumber if num >= 0 { used = append(used, int(num)) } // else caller is creating a new vm using NVMEControllerTypes } sort.Ints(used) for i, n := range nvmeBusNumbers { if i == len(used) || n != used[i] { return int32(n) } } return -1 } // FindDiskController will find an existing ide or scsi disk controller. func (l VirtualDeviceList) FindDiskController(name string) (types.BaseVirtualController, error) { switch { case name == "ide": return l.FindIDEController("") case name == "scsi" || name == "": return l.FindSCSIController("") case name == "nvme": return l.FindNVMEController("") default: if c, ok := l.Find(name).(types.BaseVirtualController); ok { return c, nil } return nil, fmt.Errorf("%s is not a valid controller", name) } } // PickController returns a controller of the given type(s). // If no controllers are found or have no available slots, then nil is returned. func (l VirtualDeviceList) PickController(kind types.BaseVirtualController) types.BaseVirtualController { l = l.SelectByType(kind.(types.BaseVirtualDevice)).Select(func(device types.BaseVirtualDevice) bool { num := len(device.(types.BaseVirtualController).GetVirtualController().Device) switch device.(type) { case types.BaseVirtualSCSIController: return num < 15 case *types.VirtualIDEController: return num < 2 case *types.VirtualNVMEController: return num < 8 default: return true } }) if len(l) == 0 { return nil } return l[0].(types.BaseVirtualController) } // newUnitNumber returns the unit number to use for attaching a new device to the given controller. func (l VirtualDeviceList) newUnitNumber(c types.BaseVirtualController) int32 { units := make([]bool, 30) switch sc := c.(type) { case types.BaseVirtualSCSIController: // The SCSI controller sits on its own bus units[sc.GetVirtualSCSIController().ScsiCtlrUnitNumber] = true } key := c.GetVirtualController().Key for _, device := range l { d := device.GetVirtualDevice() if d.ControllerKey == key && d.UnitNumber != nil { units[int(*d.UnitNumber)] = true } } for unit, used := range units { if !used { return int32(unit) } } return -1 } // NewKey returns the key to use for adding a new device to the device list. // The device list we're working with here may not be complete (e.g. when // we're only adding new devices), so any positive keys could conflict with device keys // that are already in use. To avoid this type of conflict, we can use negative keys // here, which will be resolved to positive keys by vSphere as the reconfiguration is done. func (l VirtualDeviceList) NewKey() int32 { var key int32 = -200 for _, device := range l { d := device.GetVirtualDevice() if d.Key < key { key = d.Key } } return key - 1 } // AssignController assigns a device to a controller. func (l VirtualDeviceList) AssignController(device types.BaseVirtualDevice, c types.BaseVirtualController) { d := device.GetVirtualDevice() d.ControllerKey = c.GetVirtualController().Key d.UnitNumber = new(int32) *d.UnitNumber = l.newUnitNumber(c) if d.Key == 0 { d.Key = -1 } } // CreateDisk creates a new VirtualDisk device which can be added to a VM. func (l VirtualDeviceList) CreateDisk(c types.BaseVirtualController, ds types.ManagedObjectReference, name string) *types.VirtualDisk { // If name is not specified, one will be chosen for you. // But if when given, make sure it ends in .vmdk, otherwise it will be treated as a directory. if len(name) > 0 && filepath.Ext(name) != ".vmdk" { name += ".vmdk" } device := &types.VirtualDisk{ VirtualDevice: types.VirtualDevice{ Backing: &types.VirtualDiskFlatVer2BackingInfo{ DiskMode: string(types.VirtualDiskModePersistent), ThinProvisioned: types.NewBool(true), VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: name, Datastore: &ds, }, }, }, } l.AssignController(device, c) return device } // ChildDisk creates a new VirtualDisk device, linked to the given parent disk, which can be added to a VM. func (l VirtualDeviceList) ChildDisk(parent *types.VirtualDisk) *types.VirtualDisk { disk := *parent backing := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) p := new(DatastorePath) p.FromString(backing.FileName) p.Path = "" // Use specified disk as parent backing to a new disk. disk.Backing = &types.VirtualDiskFlatVer2BackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: p.String(), Datastore: backing.Datastore, }, Parent: backing, DiskMode: backing.DiskMode, ThinProvisioned: backing.ThinProvisioned, } return &disk } func (l VirtualDeviceList) connectivity(device types.BaseVirtualDevice, v bool) error { c := device.GetVirtualDevice().Connectable if c == nil { return fmt.Errorf("%s is not connectable", l.Name(device)) } c.Connected = v c.StartConnected = v return nil } // Connect changes the device to connected, returns an error if the device is not connectable. func (l VirtualDeviceList) Connect(device types.BaseVirtualDevice) error { return l.connectivity(device, true) } // Disconnect changes the device to disconnected, returns an error if the device is not connectable. func (l VirtualDeviceList) Disconnect(device types.BaseVirtualDevice) error { return l.connectivity(device, false) } // FindCdrom finds a cdrom device with the given name, defaulting to the first cdrom device if any. func (l VirtualDeviceList) FindCdrom(name string) (*types.VirtualCdrom, error) { if name != "" { d := l.Find(name) if d == nil { return nil, fmt.Errorf("device '%s' not found", name) } if c, ok := d.(*types.VirtualCdrom); ok { return c, nil } return nil, fmt.Errorf("%s is not a cdrom device", name) } c := l.SelectByType((*types.VirtualCdrom)(nil)) if len(c) == 0 { return nil, errors.New("no cdrom device found") } return c[0].(*types.VirtualCdrom), nil } // CreateCdrom creates a new VirtualCdrom device which can be added to a VM. func (l VirtualDeviceList) CreateCdrom(c *types.VirtualIDEController) (*types.VirtualCdrom, error) { device := &types.VirtualCdrom{} l.AssignController(device, c) l.setDefaultCdromBacking(device) device.Connectable = &types.VirtualDeviceConnectInfo{ AllowGuestControl: true, Connected: true, StartConnected: true, } return device, nil } // InsertIso changes the cdrom device backing to use the given iso file. func (l VirtualDeviceList) InsertIso(device *types.VirtualCdrom, iso string) *types.VirtualCdrom { device.Backing = &types.VirtualCdromIsoBackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: iso, }, } return device } // EjectIso removes the iso file based backing and replaces with the default cdrom backing. func (l VirtualDeviceList) EjectIso(device *types.VirtualCdrom) *types.VirtualCdrom { l.setDefaultCdromBacking(device) return device } func (l VirtualDeviceList) setDefaultCdromBacking(device *types.VirtualCdrom) { device.Backing = &types.VirtualCdromAtapiBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ DeviceName: fmt.Sprintf("%s-%d-%d", DeviceTypeCdrom, device.ControllerKey, device.UnitNumber), UseAutoDetect: types.NewBool(false), }, } } // FindFloppy finds a floppy device with the given name, defaulting to the first floppy device if any. func (l VirtualDeviceList) FindFloppy(name string) (*types.VirtualFloppy, error) { if name != "" { d := l.Find(name) if d == nil { return nil, fmt.Errorf("device '%s' not found", name) } if c, ok := d.(*types.VirtualFloppy); ok { return c, nil } return nil, fmt.Errorf("%s is not a floppy device", name) } c := l.SelectByType((*types.VirtualFloppy)(nil)) if len(c) == 0 { return nil, errors.New("no floppy device found") } return c[0].(*types.VirtualFloppy), nil } // CreateFloppy creates a new VirtualFloppy device which can be added to a VM. func (l VirtualDeviceList) CreateFloppy() (*types.VirtualFloppy, error) { device := &types.VirtualFloppy{} c := l.PickController((*types.VirtualSIOController)(nil)) if c == nil { return nil, errors.New("no available SIO controller") } l.AssignController(device, c) l.setDefaultFloppyBacking(device) device.Connectable = &types.VirtualDeviceConnectInfo{ AllowGuestControl: true, Connected: true, StartConnected: true, } return device, nil } // InsertImg changes the floppy device backing to use the given img file. func (l VirtualDeviceList) InsertImg(device *types.VirtualFloppy, img string) *types.VirtualFloppy { device.Backing = &types.VirtualFloppyImageBackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: img, }, } return device } // EjectImg removes the img file based backing and replaces with the default floppy backing. func (l VirtualDeviceList) EjectImg(device *types.VirtualFloppy) *types.VirtualFloppy { l.setDefaultFloppyBacking(device) return device } func (l VirtualDeviceList) setDefaultFloppyBacking(device *types.VirtualFloppy) { device.Backing = &types.VirtualFloppyDeviceBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ DeviceName: fmt.Sprintf("%s-%d", DeviceTypeFloppy, device.UnitNumber), UseAutoDetect: types.NewBool(false), }, } } // FindSerialPort finds a serial port device with the given name, defaulting to the first serial port device if any. func (l VirtualDeviceList) FindSerialPort(name string) (*types.VirtualSerialPort, error) { if name != "" { d := l.Find(name) if d == nil { return nil, fmt.Errorf("device '%s' not found", name) } if c, ok := d.(*types.VirtualSerialPort); ok { return c, nil } return nil, fmt.Errorf("%s is not a serial port device", name) } c := l.SelectByType((*types.VirtualSerialPort)(nil)) if len(c) == 0 { return nil, errors.New("no serial port device found") } return c[0].(*types.VirtualSerialPort), nil } // CreateSerialPort creates a new VirtualSerialPort device which can be added to a VM. func (l VirtualDeviceList) CreateSerialPort() (*types.VirtualSerialPort, error) { device := &types.VirtualSerialPort{ YieldOnPoll: true, } c := l.PickController((*types.VirtualSIOController)(nil)) if c == nil { return nil, errors.New("no available SIO controller") } l.AssignController(device, c) l.setDefaultSerialPortBacking(device) return device, nil } // ConnectSerialPort connects a serial port to a server or client uri. func (l VirtualDeviceList) ConnectSerialPort(device *types.VirtualSerialPort, uri string, client bool, proxyuri string) *types.VirtualSerialPort { if strings.HasPrefix(uri, "[") { device.Backing = &types.VirtualSerialPortFileBackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: uri, }, } return device } direction := types.VirtualDeviceURIBackingOptionDirectionServer if client { direction = types.VirtualDeviceURIBackingOptionDirectionClient } device.Backing = &types.VirtualSerialPortURIBackingInfo{ VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{ Direction: string(direction), ServiceURI: uri, ProxyURI: proxyuri, }, } return device } // DisconnectSerialPort disconnects the serial port backing. func (l VirtualDeviceList) DisconnectSerialPort(device *types.VirtualSerialPort) *types.VirtualSerialPort { l.setDefaultSerialPortBacking(device) return device } func (l VirtualDeviceList) setDefaultSerialPortBacking(device *types.VirtualSerialPort) { device.Backing = &types.VirtualSerialPortURIBackingInfo{ VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{ Direction: "client", ServiceURI: "localhost:0", }, } } // CreateEthernetCard creates a new VirtualEthernetCard of the given name name and initialized with the given backing. func (l VirtualDeviceList) CreateEthernetCard(name string, backing types.BaseVirtualDeviceBackingInfo) (types.BaseVirtualDevice, error) { ctypes := EthernetCardTypes() if name == "" { name = ctypes.deviceName(ctypes[0]) } found := ctypes.Select(func(device types.BaseVirtualDevice) bool { return l.deviceName(device) == name }) if len(found) == 0 { return nil, fmt.Errorf("unknown ethernet card type '%s'", name) } c, ok := found[0].(types.BaseVirtualEthernetCard) if !ok { return nil, fmt.Errorf("invalid ethernet card type '%s'", name) } c.GetVirtualEthernetCard().Backing = backing return c.(types.BaseVirtualDevice), nil } // PrimaryMacAddress returns the MacAddress field of the primary VirtualEthernetCard func (l VirtualDeviceList) PrimaryMacAddress() string { eth0 := l.Find("ethernet-0") if eth0 == nil { return "" } return eth0.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard().MacAddress } // convert a BaseVirtualDevice to a BaseVirtualMachineBootOptionsBootableDevice var bootableDevices = map[string]func(device types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice{ DeviceTypeCdrom: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { return &types.VirtualMachineBootOptionsBootableCdromDevice{} }, DeviceTypeDisk: func(d types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { return &types.VirtualMachineBootOptionsBootableDiskDevice{ DeviceKey: d.GetVirtualDevice().Key, } }, DeviceTypeEthernet: func(d types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { return &types.VirtualMachineBootOptionsBootableEthernetDevice{ DeviceKey: d.GetVirtualDevice().Key, } }, DeviceTypeFloppy: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { return &types.VirtualMachineBootOptionsBootableFloppyDevice{} }, } // BootOrder returns a list of devices which can be used to set boot order via VirtualMachine.SetBootOptions. // The order can any of "ethernet", "cdrom", "floppy" or "disk" or by specific device name. func (l VirtualDeviceList) BootOrder(order []string) []types.BaseVirtualMachineBootOptionsBootableDevice { var devices []types.BaseVirtualMachineBootOptionsBootableDevice for _, name := range order { if kind, ok := bootableDevices[name]; ok { for _, device := range l { if l.Type(device) == name { devices = append(devices, kind(device)) } } continue } if d := l.Find(name); d != nil { if kind, ok := bootableDevices[l.Type(d)]; ok { devices = append(devices, kind(d)) } } } return devices } // SelectBootOrder returns an ordered list of devices matching the given bootable device order func (l VirtualDeviceList) SelectBootOrder(order []types.BaseVirtualMachineBootOptionsBootableDevice) VirtualDeviceList { var devices VirtualDeviceList for _, bd := range order { for _, device := range l { if kind, ok := bootableDevices[l.Type(device)]; ok { if reflect.DeepEqual(kind(device), bd) { devices = append(devices, device) } } } } return devices } // TypeName returns the vmodl type name of the device func (l VirtualDeviceList) TypeName(device types.BaseVirtualDevice) string { dtype := reflect.TypeOf(device) if dtype == nil { return "" } return dtype.Elem().Name() } var deviceNameRegexp = regexp.MustCompile(`(?:Virtual)?(?:Machine)?(\w+?)(?:Card|Device|Controller)?$`) func (l VirtualDeviceList) deviceName(device types.BaseVirtualDevice) string { name := "device" typeName := l.TypeName(device) m := deviceNameRegexp.FindStringSubmatch(typeName) if len(m) == 2 { name = strings.ToLower(m[1]) } return name } // Type returns a human-readable name for the given device func (l VirtualDeviceList) Type(device types.BaseVirtualDevice) string { switch device.(type) { case types.BaseVirtualEthernetCard: return DeviceTypeEthernet case *types.ParaVirtualSCSIController: return "pvscsi" case *types.VirtualLsiLogicSASController: return "lsilogic-sas" case *types.VirtualNVMEController: return "nvme" default: return l.deviceName(device) } } // Name returns a stable, human-readable name for the given device func (l VirtualDeviceList) Name(device types.BaseVirtualDevice) string { var key string var UnitNumber int32 d := device.GetVirtualDevice() if d.UnitNumber != nil { UnitNumber = *d.UnitNumber } dtype := l.Type(device) switch dtype { case DeviceTypeEthernet: key = fmt.Sprintf("%d", UnitNumber-7) case DeviceTypeDisk: key = fmt.Sprintf("%d-%d", d.ControllerKey, UnitNumber) default: key = fmt.Sprintf("%d", d.Key) } return fmt.Sprintf("%s-%s", dtype, key) } // ConfigSpec creates a virtual machine configuration spec for // the specified operation, for the list of devices in the device list. func (l VirtualDeviceList) ConfigSpec(op types.VirtualDeviceConfigSpecOperation) ([]types.BaseVirtualDeviceConfigSpec, error) { var fop types.VirtualDeviceConfigSpecFileOperation switch op { case types.VirtualDeviceConfigSpecOperationAdd: fop = types.VirtualDeviceConfigSpecFileOperationCreate case types.VirtualDeviceConfigSpecOperationEdit: fop = types.VirtualDeviceConfigSpecFileOperationReplace case types.VirtualDeviceConfigSpecOperationRemove: fop = types.VirtualDeviceConfigSpecFileOperationDestroy default: panic("unknown op") } var res []types.BaseVirtualDeviceConfigSpec for _, device := range l { config := &types.VirtualDeviceConfigSpec{ Device: device, Operation: op, } if disk, ok := device.(*types.VirtualDisk); ok { config.FileOperation = fop // Special case to attach an existing disk if op == types.VirtualDeviceConfigSpecOperationAdd && disk.CapacityInKB == 0 { childDisk := false if b, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok { childDisk = b.Parent != nil } if !childDisk { // Existing disk, clear file operation config.FileOperation = "" } } } res = append(res, config) } return res, nil } govmomi-0.15.0/object/virtual_device_list_test.go000066400000000000000000000556311312205533500221570ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "math/rand" "reflect" "testing" "github.com/vmware/govmomi/vim25/types" ) func intPtrValue(val int32) *int32 { return &val } var devices = VirtualDeviceList([]types.BaseVirtualDevice{ &types.VirtualIDEController{ VirtualController: types.VirtualController{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 200, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "IDE 0", Summary: "IDE 0", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 0, UnitNumber: intPtrValue(0), }, BusNumber: 0, Device: []int32{3001, 3000}, }, }, &types.VirtualIDEController{ VirtualController: types.VirtualController{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 201, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "IDE 1", Summary: "IDE 1", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 0, UnitNumber: intPtrValue(0), }, BusNumber: 1, Device: []int32{3002}, }, }, &types.VirtualPS2Controller{ VirtualController: types.VirtualController{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 300, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "PS2 controller 0", Summary: "PS2 controller 0", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 0, UnitNumber: intPtrValue(0), }, BusNumber: 0, Device: []int32{600, 700}, }, }, &types.VirtualPCIController{ VirtualController: types.VirtualController{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 100, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "PCI controller 0", Summary: "PCI controller 0", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 0, UnitNumber: intPtrValue(0), }, BusNumber: 0, Device: []int32{500, 12000, 1000, 4000}, }, }, &types.VirtualSIOController{ VirtualController: types.VirtualController{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 400, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "SIO controller 0", Summary: "SIO controller 0", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 0, UnitNumber: intPtrValue(0), }, BusNumber: 0, Device: []int32{9000}, }, }, &types.VirtualKeyboard{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 600, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Keyboard ", Summary: "Keyboard", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 300, UnitNumber: intPtrValue(0), }, }, &types.VirtualPointingDevice{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 700, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Pointing device", Summary: "Pointing device; Device", }, Backing: &types.VirtualPointingDeviceDeviceBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{}, HostPointingDevice: "autodetect", }, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 300, UnitNumber: intPtrValue(1), }, }, &types.VirtualMachineVideoCard{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 500, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Video card ", Summary: "Video card", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 100, UnitNumber: intPtrValue(0), }, VideoRamSizeInKB: 4096, NumDisplays: 1, UseAutoDetect: types.NewBool(false), Enable3DSupport: types.NewBool(false), Use3dRenderer: "automatic", }, &types.VirtualMachineVMCIDevice{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 12000, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "VMCI device", Summary: "Device on the virtual machine PCI bus that provides support for the virtual machine communication interface", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: &types.VirtualDevicePciBusSlotInfo{ VirtualDeviceBusSlotInfo: types.VirtualDeviceBusSlotInfo{}, PciSlotNumber: 33, }, ControllerKey: 100, UnitNumber: intPtrValue(17), }, Id: 1754519335, AllowUnrestrictedCommunication: types.NewBool(false), }, &types.VirtualLsiLogicController{ VirtualSCSIController: types.VirtualSCSIController{ VirtualController: types.VirtualController{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 1000, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "SCSI controller 0", Summary: "LSI Logic", }, Backing: nil, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 100, UnitNumber: intPtrValue(3), }, BusNumber: 0, Device: nil, }, HotAddRemove: types.NewBool(true), SharedBus: "noSharing", ScsiCtlrUnitNumber: 7, }, }, &types.VirtualCdrom{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 3001, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "CD/DVD drive 1", Summary: "ISO [datastore1] ttylinux-pc_i486-16.1.iso", }, Backing: &types.VirtualCdromIsoBackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, FileName: "[datastore1] foo.iso", Datastore: &types.ManagedObjectReference{Type: "Datastore", Value: "53fe43cc-75dc5110-3643-000c2918dc41"}, BackingObjectId: "", }, }, Connectable: &types.VirtualDeviceConnectInfo{ DynamicData: types.DynamicData{}, StartConnected: true, AllowGuestControl: true, Connected: false, Status: "untried", }, SlotInfo: nil, ControllerKey: 200, UnitNumber: intPtrValue(1), }, }, &types.VirtualDisk{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 3000, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Hard disk 1", Summary: "30,720 KB", }, Backing: &types.VirtualDiskFlatVer2BackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, FileName: "[datastore1] bar/bar.vmdk", Datastore: &types.ManagedObjectReference{Type: "Datastore", Value: "53fe43cc-75dc5110-3643-000c2918dc41"}, BackingObjectId: "3-3000-0", }, DiskMode: "persistent", Split: types.NewBool(false), WriteThrough: types.NewBool(false), ThinProvisioned: types.NewBool(false), EagerlyScrub: types.NewBool(true), Uuid: "6000C296-d0af-1209-1975-10c98eae10e4", ContentId: "d46395062e2d1b1790985bdec573b211", ChangeId: "", Parent: &types.VirtualDiskFlatVer2BackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, FileName: "[datastore1] ttylinux.vmdk", Datastore: &types.ManagedObjectReference{Type: "Datastore", Value: "53fe43cc-75dc5110-3643-000c2918dc41"}, BackingObjectId: "3-3000-1", }, DiskMode: "persistent", Split: types.NewBool(false), WriteThrough: types.NewBool(false), ThinProvisioned: types.NewBool(false), EagerlyScrub: types.NewBool(true), Uuid: "6000C296-d0af-1209-1975-10c98eae10e4", ContentId: "1c2dad9e1662219e962a620c6d238a7c", ChangeId: "", Parent: (*types.VirtualDiskFlatVer2BackingInfo)(nil), DeltaDiskFormat: "", DigestEnabled: types.NewBool(false), DeltaGrainSize: 0, }, DeltaDiskFormat: "redoLogFormat", DigestEnabled: types.NewBool(false), DeltaGrainSize: 0, }, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 200, UnitNumber: intPtrValue(0), }, CapacityInKB: 30720, CapacityInBytes: 31457280, Shares: &types.SharesInfo{ DynamicData: types.DynamicData{}, Shares: 1000, Level: "normal", }, StorageIOAllocation: &types.StorageIOAllocationInfo{ DynamicData: types.DynamicData{}, Limit: -1, Shares: &types.SharesInfo{ DynamicData: types.DynamicData{}, Shares: 1000, Level: "normal", }, Reservation: 0, }, DiskObjectId: "3-3000", VFlashCacheConfigInfo: (*types.VirtualDiskVFlashCacheConfigInfo)(nil), }, &types.VirtualDisk{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 3002, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Hard disk 2", Summary: "10,000,000 KB", }, Backing: &types.VirtualDiskFlatVer2BackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, FileName: "[datastore1] bar/disk-201-0.vmdk", Datastore: &types.ManagedObjectReference{Type: "Datastore", Value: "53fe43cc-75dc5110-3643-000c2918dc41"}, BackingObjectId: "3-3002-0", }, DiskMode: "persistent", Split: types.NewBool(false), WriteThrough: types.NewBool(false), ThinProvisioned: types.NewBool(true), EagerlyScrub: types.NewBool(false), Uuid: "6000C293-fde5-4457-5118-dd267ea992a7", ContentId: "90399989b9d520eed6793ab0fffffffe", ChangeId: "", Parent: (*types.VirtualDiskFlatVer2BackingInfo)(nil), DeltaDiskFormat: "", DigestEnabled: types.NewBool(false), DeltaGrainSize: 0, }, Connectable: (*types.VirtualDeviceConnectInfo)(nil), SlotInfo: nil, ControllerKey: 201, UnitNumber: intPtrValue(0), }, CapacityInKB: 10000000, CapacityInBytes: 10240000000, Shares: &types.SharesInfo{ DynamicData: types.DynamicData{}, Shares: 1000, Level: "normal", }, StorageIOAllocation: &types.StorageIOAllocationInfo{ DynamicData: types.DynamicData{}, Limit: -1, Shares: &types.SharesInfo{ DynamicData: types.DynamicData{}, Shares: 1000, Level: "normal", }, Reservation: 0, }, DiskObjectId: "3-3002", VFlashCacheConfigInfo: (*types.VirtualDiskVFlashCacheConfigInfo)(nil), }, &types.VirtualE1000{ VirtualEthernetCard: types.VirtualEthernetCard{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 4000, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Network adapter 1", Summary: "VM Network", }, Backing: &types.VirtualEthernetCardNetworkBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, DeviceName: "VM Network", UseAutoDetect: types.NewBool(false), }, Network: &types.ManagedObjectReference{Type: "Network", Value: "HaNetwork-VM Network"}, InPassthroughMode: types.NewBool(false), }, Connectable: &types.VirtualDeviceConnectInfo{ DynamicData: types.DynamicData{}, StartConnected: true, AllowGuestControl: true, Connected: false, Status: "untried", }, SlotInfo: &types.VirtualDevicePciBusSlotInfo{ VirtualDeviceBusSlotInfo: types.VirtualDeviceBusSlotInfo{}, PciSlotNumber: 32, }, ControllerKey: 100, UnitNumber: intPtrValue(7), }, AddressType: "generated", MacAddress: "00:0c:29:93:d7:27", WakeOnLanEnabled: types.NewBool(true), }, }, &types.VirtualSerialPort{ VirtualDevice: types.VirtualDevice{ DynamicData: types.DynamicData{}, Key: 9000, DeviceInfo: &types.Description{ DynamicData: types.DynamicData{}, Label: "Serial port 1", Summary: "Remote localhost:0", }, Backing: &types.VirtualSerialPortURIBackingInfo{ VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, ServiceURI: "localhost:0", Direction: "client", ProxyURI: "", }, }, Connectable: &types.VirtualDeviceConnectInfo{ DynamicData: types.DynamicData{}, StartConnected: true, AllowGuestControl: true, Connected: false, Status: "untried", }, SlotInfo: nil, ControllerKey: 400, UnitNumber: intPtrValue(0), }, YieldOnPoll: true, }, }) func TestSelectByType(t *testing.T) { tests := []struct { dtype types.BaseVirtualDevice expect int }{ { (*types.VirtualCdrom)(nil), 1, }, { (*types.VirtualEthernetCard)(nil), 1, }, { (*types.VirtualDisk)(nil), 2, }, { (*types.VirtualController)(nil), 6, }, { (*types.VirtualIDEController)(nil), 2, }, { (*types.VirtualSCSIController)(nil), 1, }, { (*types.VirtualLsiLogicController)(nil), 1, }, { (*types.ParaVirtualSCSIController)(nil), 0, }, } for _, test := range tests { d := devices.SelectByType(test.dtype) if len(d) != test.expect { t.Errorf("%#v has %d", test.dtype, len(devices)) } } } func TestSelectByBackingInfo(t *testing.T) { tests := []types.BaseVirtualDeviceBackingInfo{ &types.VirtualEthernetCardNetworkBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ DeviceName: "VM Network", }, }, &types.VirtualDiskFlatVer2BackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: "[datastore1] bar/bar.vmdk", }, }, &types.VirtualDiskFlatVer2BackingInfo{ Parent: &types.VirtualDiskFlatVer2BackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ FileName: "[datastore1] ttylinux.vmdk", }, }, }, &types.VirtualCdromIsoBackingInfo{ VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, FileName: "[datastore1] foo.iso", }, }, (*types.VirtualCdromIsoBackingInfo)(nil), &types.VirtualSerialPortURIBackingInfo{ VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{ VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, ServiceURI: "localhost:0", Direction: "client", ProxyURI: "", }, }, (*types.VirtualSerialPortURIBackingInfo)(nil), } for _, test := range tests { l := devices.SelectByBackingInfo(test) if len(l) != 1 { t.Errorf("Expected 1, got %d: %#v", len(l), test) } } // test selecting by backing type tests = []types.BaseVirtualDeviceBackingInfo{ (*types.VirtualDiskFlatVer2BackingInfo)(nil), } for _, test := range tests { l := devices.SelectByBackingInfo(test) if len(l) != 2 { t.Errorf("Expected 2, got %d: %#v", len(l), test) } } } func TestFind(t *testing.T) { for _, device := range devices { name := devices.Name(device) d := devices.Find(name) if name != devices.Name(d) { t.Errorf("expected name: %s, got: %s", name, devices.Name(d)) } } d := devices.Find("enoent") if d != nil { t.Errorf("unexpected: %#v", d) } } func TestFindController(t *testing.T) { for _, name := range []string{"", "ide-200"} { _, err := devices.FindIDEController(name) if err != nil { t.Error(err) } } for _, name := range []string{"", "lsilogic-1000"} { _, err := devices.FindSCSIController(name) if err != nil { t.Error(err) } } fns := []func() error{ func() error { _, err := devices.FindIDEController("lsilogic-1000") return err }, func() error { _, err := devices.FindSCSIController("ide-200") return err }, } for _, f := range fns { err := f() if err == nil { t.Error("should fail") } } } func TestPickController(t *testing.T) { list := devices tests := []struct { ctype types.BaseVirtualController key int32 unit int32 }{ { (*types.VirtualIDEController)(nil), 201, 1, }, { (*types.VirtualSCSIController)(nil), 1000, 0, }, { (*types.VirtualSCSIController)(nil), 1000, 1, }, } for _, test := range tests { c := list.PickController(test.ctype).GetVirtualController() key := c.Key if key != test.key { t.Errorf("expected controller key: %d, got: %d\n", test.key, key) } unit := list.newUnitNumber(c) if unit != test.unit { t.Errorf("expected unit number: %d, got: %d\n", test.unit, unit) } dev := &types.VirtualDevice{ Key: int32(rand.Int()), UnitNumber: new(int32), ControllerKey: key, } *dev.UnitNumber = unit list = append(list, dev) c.Device = append(c.Device, dev.Key) } if list.PickController((*types.VirtualIDEController)(nil)) != nil { t.Error("should be nil") } if list.PickController((*types.VirtualSCSIController)(nil)) == nil { t.Errorf("should not be nil") } } func TestCreateSCSIController(t *testing.T) { for _, l := range []VirtualDeviceList{SCSIControllerTypes(), devices} { _, err := l.CreateSCSIController("enoent") if err == nil { t.Error("should fail") } for _, name := range []string{"", "scsi", "pvscsi", "buslogic", "lsilogic", "lsilogic-sas"} { _, err = l.CreateSCSIController(name) if err != nil { t.Error(err) } } } } func TestCreateEthernetCard(t *testing.T) { _, err := EthernetCardTypes().CreateEthernetCard("enoent", nil) if err == nil { t.Error("should fail") } for _, name := range []string{"", "e1000", "e1000e", "vmxnet3"} { _, err := EthernetCardTypes().CreateEthernetCard(name, nil) if err != nil { t.Error(err) } } } func TestCdrom(t *testing.T) { c, err := devices.FindCdrom("") if err != nil { t.Error(err) } d := devices.Find(devices.Name(c)) if c.Key != d.GetVirtualDevice().Key { t.Error("device key mismatch") } for _, name := range []string{"enoent", "ide-200"} { c, err = devices.FindCdrom(name) if err == nil { t.Errorf("FindCdrom(%s) should fail", name) } } c, err = devices.Select(func(device types.BaseVirtualDevice) bool { if _, ok := device.(*types.VirtualCdrom); ok { return false } return true }).FindCdrom("") if err == nil { t.Error("FindCdrom('') should fail") } } func TestSerialPort(t *testing.T) { device, err := devices.CreateSerialPort() if err != nil { t.Error(err) } devices.ConnectSerialPort(device, "telnet://:33233", false, "") } func TestPrimaryMacAddress(t *testing.T) { expect := "00:0c:29:93:d7:27" mac := devices.PrimaryMacAddress() if expect != mac { t.Errorf("expected: %s, got: %s", expect, mac) } } func TestBootOrder(t *testing.T) { o := []string{DeviceTypeEthernet, DeviceTypeCdrom, DeviceTypeFloppy, DeviceTypeDisk} list := devices n := 4 // 1 ethernet, 1 cdrom, 2 disk order := list.BootOrder(o) if len(order) != n { t.Errorf("expected %d boot devices, got: %d", n, len(order)) } list = list.SelectBootOrder(order) if len(list) != n { t.Errorf("expected %d boot devices, got: %d", n, len(list)) } // test lookup by name var names []string for _, x := range list { names = append(names, list.Name(x)) } order = list.BootOrder(names) if len(order) != n { t.Errorf("expected %d boot devices, got: %d", n, len(order)) } if !reflect.DeepEqual(list, list.SelectBootOrder(order)) { t.Error("boot order mismatch") } // remove disks list = list.Select(func(device types.BaseVirtualDevice) bool { if _, ok := device.(*types.VirtualDisk); ok { return false } return true }) n = 2 // 1 ethernet, 1 cdrom order = list.BootOrder(o) if len(order) != n { t.Errorf("expected %d boot devices, got: %d", n, len(order)) } if !reflect.DeepEqual(list, list.SelectBootOrder(order)) { t.Error("boot order mismatch") } if len(list.BootOrder([]string{DeviceTypeDisk})) != 0 { t.Error("expected 0 disks") } } func TestName(t *testing.T) { tests := []struct { device types.BaseVirtualDevice expect string }{ { &types.VirtualCdrom{}, "cdrom-0", }, { &types.VirtualDisk{}, "disk-0-0", }, { &types.VirtualFloppy{}, "floppy-0", }, { &types.VirtualIDEController{}, "ide-0", }, { &types.VirtualMachineVideoCard{}, "video-0", }, { &types.VirtualPointingDevice{}, "pointing-0", }, { &types.ParaVirtualSCSIController{}, "pvscsi-0", }, { &types.VirtualSerialPort{}, "serialport-0", }, { &types.VirtualE1000{ VirtualEthernetCard: types.VirtualEthernetCard{ VirtualDevice: types.VirtualDevice{ UnitNumber: intPtrValue(7), }, }, }, "ethernet-0", }, } for _, test := range tests { name := devices.Name(test.device) if name != test.expect { t.Errorf("expected: %s, got: %s", test.expect, name) } } } func TestChildDisk(t *testing.T) { disks := devices.SelectByType((*types.VirtualDisk)(nil)) for _, disk := range disks { child := disks.ChildDisk(disk.(*types.VirtualDisk)) name := child.Backing.(*types.VirtualDiskFlatVer2BackingInfo).VirtualDeviceFileBackingInfo.FileName p := new(DatastorePath) p.FromString(name) if p.Datastore != "datastore1" { t.Fatal(p.Datastore) } if p.Path != "" { t.Fatal(p.Path) } } } govmomi-0.15.0/object/virtual_disk_manager.go000066400000000000000000000075611312205533500212510ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type VirtualDiskManager struct { Common } func NewVirtualDiskManager(c *vim25.Client) *VirtualDiskManager { m := VirtualDiskManager{ Common: NewCommon(c, *c.ServiceContent.VirtualDiskManager), } return &m } // CopyVirtualDisk copies a virtual disk, performing conversions as specified in the spec. func (m VirtualDiskManager) CopyVirtualDisk( ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destName string, destDatacenter *Datacenter, destSpec *types.VirtualDiskSpec, force bool) (*Task, error) { req := types.CopyVirtualDisk_Task{ This: m.Reference(), SourceName: sourceName, DestName: destName, DestSpec: destSpec, Force: types.NewBool(force), } if sourceDatacenter != nil { ref := sourceDatacenter.Reference() req.SourceDatacenter = &ref } if destDatacenter != nil { ref := destDatacenter.Reference() req.DestDatacenter = &ref } res, err := methods.CopyVirtualDisk_Task(ctx, m.c, &req) if err != nil { return nil, err } return NewTask(m.c, res.Returnval), nil } // CreateVirtualDisk creates a new virtual disk. func (m VirtualDiskManager) CreateVirtualDisk( ctx context.Context, name string, datacenter *Datacenter, spec types.BaseVirtualDiskSpec) (*Task, error) { req := types.CreateVirtualDisk_Task{ This: m.Reference(), Name: name, Spec: spec, } if datacenter != nil { ref := datacenter.Reference() req.Datacenter = &ref } res, err := methods.CreateVirtualDisk_Task(ctx, m.c, &req) if err != nil { return nil, err } return NewTask(m.c, res.Returnval), nil } // MoveVirtualDisk moves a virtual disk. func (m VirtualDiskManager) MoveVirtualDisk( ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destName string, destDatacenter *Datacenter, force bool) (*Task, error) { req := types.MoveVirtualDisk_Task{ This: m.Reference(), SourceName: sourceName, DestName: destName, Force: types.NewBool(force), } if sourceDatacenter != nil { ref := sourceDatacenter.Reference() req.SourceDatacenter = &ref } if destDatacenter != nil { ref := destDatacenter.Reference() req.DestDatacenter = &ref } res, err := methods.MoveVirtualDisk_Task(ctx, m.c, &req) if err != nil { return nil, err } return NewTask(m.c, res.Returnval), nil } // DeleteVirtualDisk deletes a virtual disk. func (m VirtualDiskManager) DeleteVirtualDisk(ctx context.Context, name string, dc *Datacenter) (*Task, error) { req := types.DeleteVirtualDisk_Task{ This: m.Reference(), Name: name, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := methods.DeleteVirtualDisk_Task(ctx, m.c, &req) if err != nil { return nil, err } return NewTask(m.c, res.Returnval), nil } // Queries virtual disk uuid func (m VirtualDiskManager) QueryVirtualDiskUuid(ctx context.Context, name string, dc *Datacenter) (string, error) { req := types.QueryVirtualDiskUuid{ This: m.Reference(), Name: name, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := methods.QueryVirtualDiskUuid(ctx, m.c, &req) if err != nil { return "", err } if res == nil { return "", nil } return res.Returnval, nil } govmomi-0.15.0/object/virtual_disk_manager_internal.go000066400000000000000000000056441312205533500231450ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "reflect" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) func init() { types.Add("ArrayOfVirtualDiskInfo", reflect.TypeOf((*arrayOfVirtualDiskInfo)(nil)).Elem()) types.Add("VirtualDiskInfo", reflect.TypeOf((*VirtualDiskInfo)(nil)).Elem()) } type arrayOfVirtualDiskInfo struct { VirtualDiskInfo []VirtualDiskInfo `xml:"VirtualDiskInfo,omitempty"` } type queryVirtualDiskInfoTaskRequest struct { This types.ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *types.ManagedObjectReference `xml:"datacenter,omitempty"` IncludeParents bool `xml:"includeParents"` } type queryVirtualDiskInfoTaskResponse struct { Returnval types.ManagedObjectReference `xml:"returnval"` } type queryVirtualDiskInfoTaskBody struct { Req *queryVirtualDiskInfoTaskRequest `xml:"urn:internalvim25 QueryVirtualDiskInfo_Task,omitempty"` Res *queryVirtualDiskInfoTaskResponse `xml:"urn:vim25 QueryVirtualDiskInfo_TaskResponse,omitempty"` Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *queryVirtualDiskInfoTaskBody) Fault() *soap.Fault { return b.Err } func queryVirtualDiskInfoTask(ctx context.Context, r soap.RoundTripper, req *queryVirtualDiskInfoTaskRequest) (*queryVirtualDiskInfoTaskResponse, error) { var reqBody, resBody queryVirtualDiskInfoTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type VirtualDiskInfo struct { Name string `xml:"unit>name"` DiskType string `xml:"diskType"` Parent string `xml:"parent,omitempty"` } func (m VirtualDiskManager) QueryVirtualDiskInfo(ctx context.Context, name string, dc *Datacenter, includeParents bool) ([]VirtualDiskInfo, error) { req := queryVirtualDiskInfoTaskRequest{ This: m.Reference(), Name: name, IncludeParents: includeParents, } if dc != nil { ref := dc.Reference() req.Datacenter = &ref } res, err := queryVirtualDiskInfoTask(ctx, m.Client(), &req) if err != nil { return nil, err } info, err := NewTask(m.Client(), res.Returnval).WaitForResult(ctx, nil) if err != nil { return nil, err } return info.Result.(arrayOfVirtualDiskInfo).VirtualDiskInfo, nil } govmomi-0.15.0/object/virtual_machine.go000066400000000000000000000456301312205533500202300ustar00rootroot00000000000000/* Copyright (c) 2015-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "context" "errors" "fmt" "net" "path" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) const ( PropRuntimePowerState = "summary.runtime.powerState" ) type VirtualMachine struct { Common } func NewVirtualMachine(c *vim25.Client, ref types.ManagedObjectReference) *VirtualMachine { return &VirtualMachine{ Common: NewCommon(c, ref), } } func (v VirtualMachine) PowerState(ctx context.Context) (types.VirtualMachinePowerState, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{PropRuntimePowerState}, &o) if err != nil { return "", err } return o.Summary.Runtime.PowerState, nil } func (v VirtualMachine) PowerOn(ctx context.Context) (*Task, error) { req := types.PowerOnVM_Task{ This: v.Reference(), } res, err := methods.PowerOnVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) PowerOff(ctx context.Context) (*Task, error) { req := types.PowerOffVM_Task{ This: v.Reference(), } res, err := methods.PowerOffVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Reset(ctx context.Context) (*Task, error) { req := types.ResetVM_Task{ This: v.Reference(), } res, err := methods.ResetVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Suspend(ctx context.Context) (*Task, error) { req := types.SuspendVM_Task{ This: v.Reference(), } res, err := methods.SuspendVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) ShutdownGuest(ctx context.Context) error { req := types.ShutdownGuest{ This: v.Reference(), } _, err := methods.ShutdownGuest(ctx, v.c, &req) return err } func (v VirtualMachine) RebootGuest(ctx context.Context) error { req := types.RebootGuest{ This: v.Reference(), } _, err := methods.RebootGuest(ctx, v.c, &req) return err } func (v VirtualMachine) Destroy(ctx context.Context) (*Task, error) { req := types.Destroy_Task{ This: v.Reference(), } res, err := methods.Destroy_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Clone(ctx context.Context, folder *Folder, name string, config types.VirtualMachineCloneSpec) (*Task, error) { req := types.CloneVM_Task{ This: v.Reference(), Folder: folder.Reference(), Name: name, Spec: config, } res, err := methods.CloneVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Customize(ctx context.Context, spec types.CustomizationSpec) (*Task, error) { req := types.CustomizeVM_Task{ This: v.Reference(), Spec: spec, } res, err := methods.CustomizeVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Relocate(ctx context.Context, config types.VirtualMachineRelocateSpec, priority types.VirtualMachineMovePriority) (*Task, error) { req := types.RelocateVM_Task{ This: v.Reference(), Spec: config, Priority: priority, } res, err := methods.RelocateVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Reconfigure(ctx context.Context, config types.VirtualMachineConfigSpec) (*Task, error) { req := types.ReconfigVM_Task{ This: v.Reference(), Spec: config, } res, err := methods.ReconfigVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) WaitForIP(ctx context.Context) (string, error) { var ip string p := property.DefaultCollector(v.c) err := property.Wait(ctx, p, v.Reference(), []string{"guest.ipAddress"}, func(pc []types.PropertyChange) bool { for _, c := range pc { if c.Name != "guest.ipAddress" { continue } if c.Op != types.PropertyChangeOpAssign { continue } if c.Val == nil { continue } ip = c.Val.(string) return true } return false }) if err != nil { return "", err } return ip, nil } // WaitForNetIP waits for the VM guest.net property to report an IP address for all VM NICs. // Only consider IPv4 addresses if the v4 param is true. // By default, wait for all NICs to get an IP address, unless 1 or more device is given. // A device can be specified by the MAC address or the device name, e.g. "ethernet-0". // Returns a map with MAC address as the key and IP address list as the value. func (v VirtualMachine) WaitForNetIP(ctx context.Context, v4 bool, device ...string) (map[string][]string, error) { macs := make(map[string][]string) eths := make(map[string]string) p := property.DefaultCollector(v.c) // Wait for all NICs to have a MacAddress, which may not be generated yet. err := property.Wait(ctx, p, v.Reference(), []string{"config.hardware.device"}, func(pc []types.PropertyChange) bool { for _, c := range pc { if c.Op != types.PropertyChangeOpAssign { continue } devices := VirtualDeviceList(c.Val.(types.ArrayOfVirtualDevice).VirtualDevice) for _, d := range devices { if nic, ok := d.(types.BaseVirtualEthernetCard); ok { mac := nic.GetVirtualEthernetCard().MacAddress if mac == "" { return false } macs[mac] = nil eths[devices.Name(d)] = mac } } } return true }) if len(device) != 0 { // Only wait for specific NIC(s) macs = make(map[string][]string) for _, mac := range device { if eth, ok := eths[mac]; ok { mac = eth // device name, e.g. "ethernet-0" } macs[mac] = nil } } err = property.Wait(ctx, p, v.Reference(), []string{"guest.net"}, func(pc []types.PropertyChange) bool { for _, c := range pc { if c.Op != types.PropertyChangeOpAssign { continue } nics := c.Val.(types.ArrayOfGuestNicInfo).GuestNicInfo for _, nic := range nics { mac := nic.MacAddress if mac == "" || nic.IpConfig == nil { continue } for _, ip := range nic.IpConfig.IpAddress { if _, ok := macs[mac]; !ok { continue // Ignore any that don't correspond to a VM device } if v4 && net.ParseIP(ip.IpAddress).To4() == nil { continue // Ignore non IPv4 address } macs[mac] = append(macs[mac], ip.IpAddress) } } } for _, ips := range macs { if len(ips) == 0 { return false } } return true }) if err != nil { return nil, err } return macs, nil } // Device returns the VirtualMachine's config.hardware.device property. func (v VirtualMachine) Device(ctx context.Context) (VirtualDeviceList, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"config.hardware.device", "summary.runtime.connectionState"}, &o) if err != nil { return nil, err } // Quoting the SDK doc: // The virtual machine configuration is not guaranteed to be available. // For example, the configuration information would be unavailable if the server // is unable to access the virtual machine files on disk, and is often also unavailable // during the initial phases of virtual machine creation. if o.Config == nil { return nil, fmt.Errorf("%s Config is not available, connectionState=%s", v.Reference(), o.Summary.Runtime.ConnectionState) } return VirtualDeviceList(o.Config.Hardware.Device), nil } func (v VirtualMachine) HostSystem(ctx context.Context) (*HostSystem, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"summary.runtime.host"}, &o) if err != nil { return nil, err } host := o.Summary.Runtime.Host if host == nil { return nil, errors.New("VM doesn't have a HostSystem") } return NewHostSystem(v.c, *host), nil } func (v VirtualMachine) ResourcePool(ctx context.Context) (*ResourcePool, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"resourcePool"}, &o) if err != nil { return nil, err } rp := o.ResourcePool if rp == nil { return nil, errors.New("VM doesn't have a resourcePool") } return NewResourcePool(v.c, *rp), nil } func (v VirtualMachine) configureDevice(ctx context.Context, op types.VirtualDeviceConfigSpecOperation, fop types.VirtualDeviceConfigSpecFileOperation, devices ...types.BaseVirtualDevice) error { spec := types.VirtualMachineConfigSpec{} for _, device := range devices { config := &types.VirtualDeviceConfigSpec{ Device: device, Operation: op, } if disk, ok := device.(*types.VirtualDisk); ok { config.FileOperation = fop // Special case to attach an existing disk if op == types.VirtualDeviceConfigSpecOperationAdd && disk.CapacityInKB == 0 { childDisk := false if b, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok { childDisk = b.Parent != nil } if !childDisk { config.FileOperation = "" // existing disk } } } spec.DeviceChange = append(spec.DeviceChange, config) } task, err := v.Reconfigure(ctx, spec) if err != nil { return err } return task.Wait(ctx) } // AddDevice adds the given devices to the VirtualMachine func (v VirtualMachine) AddDevice(ctx context.Context, device ...types.BaseVirtualDevice) error { return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationAdd, types.VirtualDeviceConfigSpecFileOperationCreate, device...) } // EditDevice edits the given (existing) devices on the VirtualMachine func (v VirtualMachine) EditDevice(ctx context.Context, device ...types.BaseVirtualDevice) error { return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationEdit, types.VirtualDeviceConfigSpecFileOperationReplace, device...) } // RemoveDevice removes the given devices on the VirtualMachine func (v VirtualMachine) RemoveDevice(ctx context.Context, keepFiles bool, device ...types.BaseVirtualDevice) error { fop := types.VirtualDeviceConfigSpecFileOperationDestroy if keepFiles { fop = "" } return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationRemove, fop, device...) } // BootOptions returns the VirtualMachine's config.bootOptions property. func (v VirtualMachine) BootOptions(ctx context.Context) (*types.VirtualMachineBootOptions, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"config.bootOptions"}, &o) if err != nil { return nil, err } return o.Config.BootOptions, nil } // SetBootOptions reconfigures the VirtualMachine with the given options. func (v VirtualMachine) SetBootOptions(ctx context.Context, options *types.VirtualMachineBootOptions) error { spec := types.VirtualMachineConfigSpec{} spec.BootOptions = options task, err := v.Reconfigure(ctx, spec) if err != nil { return err } return task.Wait(ctx) } // Answer answers a pending question. func (v VirtualMachine) Answer(ctx context.Context, id, answer string) error { req := types.AnswerVM{ This: v.Reference(), QuestionId: id, AnswerChoice: answer, } _, err := methods.AnswerVM(ctx, v.c, &req) if err != nil { return err } return nil } // CreateSnapshot creates a new snapshot of a virtual machine. func (v VirtualMachine) CreateSnapshot(ctx context.Context, name string, description string, memory bool, quiesce bool) (*Task, error) { req := types.CreateSnapshot_Task{ This: v.Reference(), Name: name, Description: description, Memory: memory, Quiesce: quiesce, } res, err := methods.CreateSnapshot_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } // RemoveAllSnapshot removes all snapshots of a virtual machine func (v VirtualMachine) RemoveAllSnapshot(ctx context.Context, consolidate *bool) (*Task, error) { req := types.RemoveAllSnapshots_Task{ This: v.Reference(), Consolidate: consolidate, } res, err := methods.RemoveAllSnapshots_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } type snapshotMap map[string][]Reference func (m snapshotMap) add(parent string, tree []types.VirtualMachineSnapshotTree) { for i, st := range tree { sname := st.Name names := []string{sname, st.Snapshot.Value} if parent != "" { sname = path.Join(parent, sname) // Add full path as an option to resolve duplicate names names = append(names, sname) } for _, name := range names { m[name] = append(m[name], &tree[i].Snapshot) } m.add(sname, st.ChildSnapshotList) } } // FindSnapshot supports snapshot lookup by name, where name can be: // 1) snapshot ManagedObjectReference.Value (unique) // 2) snapshot name (may not be unique) // 3) snapshot tree path (may not be unique) func (v VirtualMachine) FindSnapshot(ctx context.Context, name string) (Reference, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"snapshot"}, &o) if err != nil { return nil, err } if o.Snapshot == nil || len(o.Snapshot.RootSnapshotList) == 0 { return nil, errors.New("No snapshots for this VM") } m := make(snapshotMap) m.add("", o.Snapshot.RootSnapshotList) s := m[name] switch len(s) { case 0: return nil, fmt.Errorf("snapshot %q not found", name) case 1: return s[0], nil default: return nil, fmt.Errorf("%q resolves to %d snapshots", name, len(s)) } } // RemoveSnapshot removes a named snapshot func (v VirtualMachine) RemoveSnapshot(ctx context.Context, name string, removeChildren bool, consolidate *bool) (*Task, error) { snapshot, err := v.FindSnapshot(ctx, name) if err != nil { return nil, err } req := types.RemoveSnapshot_Task{ This: snapshot.Reference(), RemoveChildren: removeChildren, Consolidate: consolidate, } res, err := methods.RemoveSnapshot_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } // RevertToCurrentSnapshot reverts to the current snapshot func (v VirtualMachine) RevertToCurrentSnapshot(ctx context.Context, suppressPowerOn bool) (*Task, error) { req := types.RevertToCurrentSnapshot_Task{ This: v.Reference(), SuppressPowerOn: types.NewBool(suppressPowerOn), } res, err := methods.RevertToCurrentSnapshot_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } // RevertToSnapshot reverts to a named snapshot func (v VirtualMachine) RevertToSnapshot(ctx context.Context, name string, suppressPowerOn bool) (*Task, error) { snapshot, err := v.FindSnapshot(ctx, name) if err != nil { return nil, err } req := types.RevertToSnapshot_Task{ This: snapshot.Reference(), SuppressPowerOn: types.NewBool(suppressPowerOn), } res, err := methods.RevertToSnapshot_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } // IsToolsRunning returns true if VMware Tools is currently running in the guest OS, and false otherwise. func (v VirtualMachine) IsToolsRunning(ctx context.Context) (bool, error) { var o mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"guest.toolsRunningStatus"}, &o) if err != nil { return false, err } return o.Guest.ToolsRunningStatus == string(types.VirtualMachineToolsRunningStatusGuestToolsRunning), nil } // Wait for the VirtualMachine to change to the desired power state. func (v VirtualMachine) WaitForPowerState(ctx context.Context, state types.VirtualMachinePowerState) error { p := property.DefaultCollector(v.c) err := property.Wait(ctx, p, v.Reference(), []string{PropRuntimePowerState}, func(pc []types.PropertyChange) bool { for _, c := range pc { if c.Name != PropRuntimePowerState { continue } if c.Val == nil { continue } ps := c.Val.(types.VirtualMachinePowerState) if ps == state { return true } } return false }) return err } func (v VirtualMachine) MarkAsTemplate(ctx context.Context) error { req := types.MarkAsTemplate{ This: v.Reference(), } _, err := methods.MarkAsTemplate(ctx, v.c, &req) if err != nil { return err } return nil } func (v VirtualMachine) MarkAsVirtualMachine(ctx context.Context, pool ResourcePool, host *HostSystem) error { req := types.MarkAsVirtualMachine{ This: v.Reference(), Pool: pool.Reference(), } if host != nil { ref := host.Reference() req.Host = &ref } _, err := methods.MarkAsVirtualMachine(ctx, v.c, &req) if err != nil { return err } return nil } func (v VirtualMachine) Migrate(ctx context.Context, pool *ResourcePool, host *HostSystem, priority types.VirtualMachineMovePriority, state types.VirtualMachinePowerState) (*Task, error) { req := types.MigrateVM_Task{ This: v.Reference(), Priority: priority, State: state, } if pool != nil { ref := pool.Reference() req.Pool = &ref } if host != nil { ref := host.Reference() req.Host = &ref } res, err := methods.MigrateVM_Task(ctx, v.c, &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } func (v VirtualMachine) Unregister(ctx context.Context) error { req := types.UnregisterVM{ This: v.Reference(), } _, err := methods.UnregisterVM(ctx, v.Client(), &req) return err } // QueryEnvironmentBrowser is a helper to get the environmentBrowser property. func (v VirtualMachine) QueryConfigTarget(ctx context.Context) (*types.ConfigTarget, error) { var vm mo.VirtualMachine err := v.Properties(ctx, v.Reference(), []string{"environmentBrowser"}, &vm) if err != nil { return nil, err } req := types.QueryConfigTarget{ This: vm.EnvironmentBrowser, } res, err := methods.QueryConfigTarget(ctx, v.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } func (v VirtualMachine) MountToolsInstaller(ctx context.Context) error { req := types.MountToolsInstaller{ This: v.Reference(), } _, err := methods.MountToolsInstaller(ctx, v.Client(), &req) return err } func (v VirtualMachine) UnmountToolsInstaller(ctx context.Context) error { req := types.UnmountToolsInstaller{ This: v.Reference(), } _, err := methods.UnmountToolsInstaller(ctx, v.Client(), &req) return err } func (v VirtualMachine) UpgradeTools(ctx context.Context, options string) (*Task, error) { req := types.UpgradeTools_Task{ This: v.Reference(), InstallerOptions: options, } res, err := methods.UpgradeTools_Task(ctx, v.Client(), &req) if err != nil { return nil, err } return NewTask(v.c, res.Returnval), nil } govmomi-0.15.0/object/virtual_machine_test.go000066400000000000000000000161041312205533500212610ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object import ( "testing" "time" "github.com/vmware/govmomi/vim25/types" ) // VirtualMachine should implement the Reference interface. var _ Reference = VirtualMachine{} // pretty.Printf generated var snapshot = &types.VirtualMachineSnapshotInfo{ DynamicData: types.DynamicData{}, CurrentSnapshot: &types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-11"}, RootSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-1"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "root", Description: "", Id: 1, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-2"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "child", Description: "", Id: 2, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: nil, ReplaySupported: types.NewBool(false), }, { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-3"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "child", Description: "", Id: 3, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-9"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "grandkid", Description: "", Id: 9, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-10"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "great", Description: "", Id: 10, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: nil, ReplaySupported: types.NewBool(false), }, }, ReplaySupported: types.NewBool(false), }, }, ReplaySupported: types.NewBool(false), }, { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-5"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "voodoo", Description: "", Id: 5, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-11"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "child", Description: "", Id: 11, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: nil, ReplaySupported: types.NewBool(false), }, }, ReplaySupported: types.NewBool(false), }, { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-6"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "better", Description: "", Id: 6, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-7"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "best", Description: "", Id: 7, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: []types.VirtualMachineSnapshotTree{ { DynamicData: types.DynamicData{}, Snapshot: types.ManagedObjectReference{Type: "VirtualMachineSnapshot", Value: "2-snapshot-8"}, Vm: types.ManagedObjectReference{Type: "VirtualMachine", Value: "2"}, Name: "betterer", Description: "", Id: 8, CreateTime: time.Now(), State: "poweredOn", Quiesced: false, BackupManifest: "", ChildSnapshotList: nil, ReplaySupported: types.NewBool(false), }, }, ReplaySupported: types.NewBool(false), }, }, ReplaySupported: types.NewBool(false), }, }, ReplaySupported: types.NewBool(false), }, }, } func TestVirtualMachineSnapshotMap(t *testing.T) { m := make(snapshotMap) m.add("", snapshot.RootSnapshotList) tests := []struct { name string expect int }{ {"enoent", 0}, {"root", 1}, {"child", 3}, {"root/child", 2}, {"root/voodoo/child", 1}, {"2-snapshot-6", 1}, } for _, test := range tests { s := m[test.name] if len(s) != test.expect { t.Errorf("%s: %d != %d", test.name, len(s), test.expect) } } } govmomi-0.15.0/object/vmware_distributed_virtual_switch.go000066400000000000000000000012421312205533500240770ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package object type VmwareDistributedVirtualSwitch struct { DistributedVirtualSwitch } govmomi-0.15.0/ovf/000077500000000000000000000000001312205533500140435ustar00rootroot00000000000000govmomi-0.15.0/ovf/cim.go000066400000000000000000000067671312205533500151620ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ovf /* Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_VirtualSystemSettingData.xsd */ type CIMVirtualSystemSettingData struct { ElementName string `xml:"ElementName"` InstanceID string `xml:"InstanceID"` AutomaticRecoveryAction *uint8 `xml:"AutomaticRecoveryAction"` AutomaticShutdownAction *uint8 `xml:"AutomaticShutdownAction"` AutomaticStartupAction *uint8 `xml:"AutomaticStartupAction"` AutomaticStartupActionDelay *string `xml:"AutomaticStartupActionDelay>Interval"` AutomaticStartupActionSequenceNumber *uint16 `xml:"AutomaticStartupActionSequenceNumber"` Caption *string `xml:"Caption"` ConfigurationDataRoot *string `xml:"ConfigurationDataRoot"` ConfigurationFile *string `xml:"ConfigurationFile"` ConfigurationID *string `xml:"ConfigurationID"` CreationTime *string `xml:"CreationTime"` Description *string `xml:"Description"` LogDataRoot *string `xml:"LogDataRoot"` Notes []string `xml:"Notes"` RecoveryFile *string `xml:"RecoveryFile"` SnapshotDataRoot *string `xml:"SnapshotDataRoot"` SuspendDataRoot *string `xml:"SuspendDataRoot"` SwapFileDataRoot *string `xml:"SwapFileDataRoot"` VirtualSystemIdentifier *string `xml:"VirtualSystemIdentifier"` VirtualSystemType *string `xml:"VirtualSystemType"` } /* Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_ResourceAllocationSettingData.xsd */ type CIMResourceAllocationSettingData struct { ElementName string `xml:"ElementName"` InstanceID string `xml:"InstanceID"` ResourceType *uint16 `xml:"ResourceType"` OtherResourceType *string `xml:"OtherResourceType"` ResourceSubType *string `xml:"ResourceSubType"` AddressOnParent *string `xml:"AddressOnParent"` Address *string `xml:"Address"` AllocationUnits *string `xml:"AllocationUnits"` AutomaticAllocation *bool `xml:"AutomaticAllocation"` AutomaticDeallocation *bool `xml:"AutomaticDeallocation"` Caption *string `xml:"Caption"` Connection []string `xml:"Connection"` ConsumerVisibility *uint16 `xml:"ConsumerVisibility"` Description *string `xml:"Description"` HostResource []string `xml:"HostResource"` Limit *uint64 `xml:"Limit"` MappingBehavior *uint `xml:"MappingBehavior"` Parent *string `xml:"Parent"` PoolID *string `xml:"PoolID"` Reservation *uint64 `xml:"Reservation"` VirtualQuantity *uint `xml:"VirtualQuantity"` VirtualQuantityUnits *string `xml:"VirtualQuantityUnits"` Weight *uint `xml:"Weight"` } govmomi-0.15.0/ovf/doc.go000066400000000000000000000017041312205533500151410ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Package ovf provides functionality to unmarshal and inspect the structure of an OVF file. It is not a complete implementation of the specification and is intended to be used to import virtual infrastructure into vSphere. For a complete specification of the OVF standard, refer to: https://www.dmtf.org/sites/default/files/standards/documents/DSP0243_2.1.0.pdf */ package ovf govmomi-0.15.0/ovf/env.go000066400000000000000000000054421312205533500151670ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ovf import ( "bytes" "encoding/xml" "fmt" ) const ( ovfEnvHeader = `` ovfEnvPlatformSection = ` %s %s %s %s ` ovfEnvPropertyHeader = `` ovfEnvPropertyEntry = `` ovfEnvPropertyFooter = `` ovfEnvFooter = `` ) type Env struct { XMLName xml.Name `xml:"http://schemas.dmtf.org/ovf/environment/1 Environment"` ID string `xml:"id,attr"` EsxID string `xml:"http://www.vmware.com/schema/ovfenv esxId,attr"` Platform *PlatformSection `xml:"PlatformSection"` Property *PropertySection `xml:"PropertySection"` } type PlatformSection struct { Kind string `xml:"Kind"` Version string `xml:"Version"` Vendor string `xml:"Vendor"` Locale string `xml:"Locale"` } type PropertySection struct { Properties []EnvProperty `xml:"Property"` } type EnvProperty struct { Key string `xml:"key,attr"` Value string `xml:"value,attr"` } // Marshal marshals Env to xml by using xml.Marshal. func (e Env) Marshal() (string, error) { x, err := xml.Marshal(e) if err != nil { return "", err } return fmt.Sprintf("%s%s", xml.Header, x), nil } // MarshalManual manually marshals Env to xml suitable for a vApp guest. // It exists to overcome the lack of expressiveness in Go's XML namespaces. func (e Env) MarshalManual() string { var buffer bytes.Buffer buffer.WriteString(xml.Header) buffer.WriteString(fmt.Sprintf(ovfEnvHeader, e.EsxID)) buffer.WriteString(fmt.Sprintf(ovfEnvPlatformSection, e.Platform.Kind, e.Platform.Version, e.Platform.Vendor, e.Platform.Locale)) buffer.WriteString(fmt.Sprintf(ovfEnvPropertyHeader)) for _, p := range e.Property.Properties { buffer.WriteString(fmt.Sprintf(ovfEnvPropertyEntry, p.Key, p.Value)) } buffer.WriteString(fmt.Sprintf(ovfEnvPropertyFooter)) buffer.WriteString(fmt.Sprintf(ovfEnvFooter)) return buffer.String() } govmomi-0.15.0/ovf/env_test.go000066400000000000000000000024431312205533500162240ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ovf import "testing" func testEnv() Env { return Env{ EsxID: "vm moref", Platform: &PlatformSection{ Kind: "VMware vCenter Server", Version: "5.5.0", Vendor: "VMware, Inc.", Locale: "US", }, Property: &PropertySection{ Properties: []EnvProperty{ {"foo", "bar"}, {"ham", "eggs"}}}, } } func TestMarshalEnv(t *testing.T) { env := testEnv() xenv, err := env.Marshal() if err != nil { t.Fatal("Error marshalling environment") } if len(xenv) < 1 { t.Fatal("Marshalled document is empty") } t.Log(xenv) } func TestMarshalManualEnv(t *testing.T) { env := testEnv() xenv := env.MarshalManual() if len(xenv) < 1 { t.Fatal("Marshalled document is empty") } t.Log(xenv) } govmomi-0.15.0/ovf/envelope.go000066400000000000000000000122471312205533500162150ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ovf type Envelope struct { References []File `xml:"References>File"` // Package level meta-data Annotation *AnnotationSection `xml:"AnnotationSection"` Product *ProductSection `xml:"ProductSection"` Network *NetworkSection `xml:"NetworkSection"` Disk *DiskSection `xml:"DiskSection"` OperatingSystem *OperatingSystemSection `xml:"OperatingSystemSection"` Eula *EulaSection `xml:"EulaSection"` VirtualHardware *VirtualHardwareSection `xml:"VirtualHardwareSection"` ResourceAllocation *ResourceAllocationSection `xml:"ResourceAllocationSection"` DeploymentOption *DeploymentOptionSection `xml:"DeploymentOptionSection"` // Content: A VirtualSystem or a VirtualSystemCollection VirtualSystem *VirtualSystem `xml:"VirtualSystem"` } type VirtualSystem struct { Content Annotation []AnnotationSection `xml:"AnnotationSection"` Product []ProductSection `xml:"ProductSection"` OperatingSystem []OperatingSystemSection `xml:"OperatingSystemSection"` Eula []EulaSection `xml:"EulaSection"` VirtualHardware []VirtualHardwareSection `xml:"VirtualHardwareSection"` } type File struct { ID string `xml:"id,attr"` Href string `xml:"href,attr"` Size uint `xml:"size,attr"` Compression *string `xml:"compression,attr"` ChunkSize *int `xml:"chunkSize,attr"` } type Content struct { ID string `xml:"id,attr"` Info string `xml:"Info"` Name *string `xml:"Name"` } type Section struct { Required *bool `xml:"required,attr"` Info string `xml:"Info"` } type AnnotationSection struct { Section Annotation string `xml:"Annotation"` } type ProductSection struct { Section Class *string `xml:"class,attr"` Instance *string `xml:"instance,attr"` Product string `xml:"Product"` Vendor string `xml:"Vendor"` Version string `xml:"Version"` FullVersion string `xml:"FullVersion"` ProductURL string `xml:"ProductUrl"` VendorURL string `xml:"VendorUrl"` AppURL string `xml:"AppUrl"` Property []Property `xml:"Property"` } type Property struct { Key string `xml:"key,attr"` Type string `xml:"type,attr"` Qualifiers *string `xml:"qualifiers,attr"` UserConfigurable *bool `xml:"userConfigurable,attr"` Default *string `xml:"value,attr"` Password *bool `xml:"password,attr"` Label *string `xml:"Label"` Description *string `xml:"Description"` Values []PropertyConfigurationValue `xml:"Value"` } type PropertyConfigurationValue struct { Value string `xml:"value,attr"` Configuration *string `xml:"configuration,attr"` } type NetworkSection struct { Section Networks []Network `xml:"Network"` } type Network struct { Name string `xml:"name,attr"` Description string `xml:"Description"` } type DiskSection struct { Section Disks []VirtualDiskDesc `xml:"Disk"` } type VirtualDiskDesc struct { DiskID string `xml:"diskId,attr"` FileRef *string `xml:"fileRef,attr"` Capacity string `xml:"capacity,attr"` CapacityAllocationUnits *string `xml:"capacityAllocationUnits,attr"` Format *string `xml:"format,attr"` PopulatedSize *int `xml:"populatedSize,attr"` ParentRef *string `xml:"parentRef,attr"` } type OperatingSystemSection struct { Section ID uint16 `xml:"id,attr"` Version *string `xml:"version,attr"` OSType *string `xml:"osType,attr"` Description *string `xml:"Description"` } type EulaSection struct { Section License string `xml:"License"` } type VirtualHardwareSection struct { Section ID *string `xml:"id,attr"` Transport *string `xml:"transport,attr"` System *VirtualSystemSettingData `xml:"System"` Item []ResourceAllocationSettingData `xml:"Item"` } type VirtualSystemSettingData struct { CIMVirtualSystemSettingData } type ResourceAllocationSettingData struct { CIMResourceAllocationSettingData Required *bool `xml:"required,attr"` Configuration *string `xml:"configuration,attr"` Bound *string `xml:"bound,attr"` } type ResourceAllocationSection struct { Section Item []ResourceAllocationSettingData `xml:"Item"` } type DeploymentOptionSection struct { Section Configuration []DeploymentOptionConfiguration `xml:"Configuration"` } type DeploymentOptionConfiguration struct { ID string `xml:"id,attr"` Default *bool `xml:"default,attr"` Label string `xml:"Label"` Description string `xml:"Description"` } govmomi-0.15.0/ovf/ovf.go000066400000000000000000000014441312205533500151670ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ovf import ( "encoding/xml" "io" ) func Unmarshal(r io.Reader) (*Envelope, error) { var e Envelope dec := xml.NewDecoder(r) err := dec.Decode(&e) if err != nil { return nil, err } return &e, nil } govmomi-0.15.0/ovf/ovf_test.go000066400000000000000000000031521312205533500162240ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package ovf import ( "bytes" "fmt" "os" "testing" "text/tabwriter" ) func testFile(t *testing.T) *os.File { n := os.Getenv("OVF_TEST_FILE") if n == "" { t.Skip("Please specify OVF_TEST_FILE") } f, err := os.Open(n) if err != nil { t.Fatal(err) } return f } func testEnvelope(t *testing.T) *Envelope { f := testFile(t) defer f.Close() e, err := Unmarshal(f) if err != nil { t.Fatal(f) } if e == nil { t.Fatal("Empty envelope") } return e } func TestUnmarshal(t *testing.T) { testEnvelope(t) } func TestDeploymentOptions(t *testing.T) { e := testEnvelope(t) if e.DeploymentOption == nil { t.Fatal("Missing DeploymentOptionSection") } var b bytes.Buffer tw := tabwriter.NewWriter(&b, 2, 0, 2, ' ', 0) fmt.Fprintf(tw, "\n") for _, c := range e.DeploymentOption.Configuration { fmt.Fprintf(tw, "id=%s\t", c.ID) fmt.Fprintf(tw, "label=%s\t", c.Label) d := false if c.Default != nil { d = *c.Default } fmt.Fprintf(tw, "default=%t\t", d) fmt.Fprintf(tw, "\n") } tw.Flush() t.Log(b.String()) } govmomi-0.15.0/pbm/000077500000000000000000000000001312205533500140275ustar00rootroot00000000000000govmomi-0.15.0/pbm/client.go000066400000000000000000000132421312205533500156360ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pbm import ( "context" "fmt" "github.com/vmware/govmomi/pbm/methods" "github.com/vmware/govmomi/pbm/types" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/soap" vim "github.com/vmware/govmomi/vim25/types" ) type Client struct { *soap.Client ServiceContent types.PbmServiceInstanceContent } func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) { sc := c.Client.NewServiceClient("/pbm/sdk", "urn:pbm") req := types.PbmRetrieveServiceContent{ This: vim.ManagedObjectReference{ Type: "PbmServiceInstance", Value: "ServiceInstance", }, } res, err := methods.PbmRetrieveServiceContent(ctx, sc, &req) if err != nil { return nil, err } return &Client{sc, res.Returnval}, nil } func (c *Client) QueryProfile(ctx context.Context, rtype types.PbmProfileResourceType, category string) ([]types.PbmProfileId, error) { req := types.PbmQueryProfile{ This: c.ServiceContent.ProfileManager, ResourceType: rtype, ProfileCategory: category, } res, err := methods.PbmQueryProfile(ctx, c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (c *Client) RetrieveContent(ctx context.Context, ids []types.PbmProfileId) ([]types.BasePbmProfile, error) { req := types.PbmRetrieveContent{ This: c.ServiceContent.ProfileManager, ProfileIds: ids, } res, err := methods.PbmRetrieveContent(ctx, c, &req) if err != nil { return nil, err } return res.Returnval, nil } type PlacementCompatibilityResult []types.PbmPlacementCompatibilityResult func (c *Client) CheckRequirements(ctx context.Context, hubs []types.PbmPlacementHub, ref *types.PbmServerObjectRef, preq []types.BasePbmPlacementRequirement) (PlacementCompatibilityResult, error) { req := types.PbmCheckRequirements{ This: c.ServiceContent.PlacementSolver, HubsToSearch: hubs, PlacementSubjectRef: ref, PlacementSubjectRequirement: preq, } res, err := methods.PbmCheckRequirements(ctx, c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (l PlacementCompatibilityResult) CompatibleDatastores() []types.PbmPlacementHub { var compatibleDatastores []types.PbmPlacementHub for _, res := range l { if len(res.Error) == 0 { compatibleDatastores = append(compatibleDatastores, res.Hub) } } return compatibleDatastores } func (l PlacementCompatibilityResult) NonCompatibleDatastores() []types.PbmPlacementHub { var nonCompatibleDatastores []types.PbmPlacementHub for _, res := range l { if len(res.Error) > 0 { nonCompatibleDatastores = append(nonCompatibleDatastores, res.Hub) } } return nonCompatibleDatastores } func (c *Client) CreateProfile(ctx context.Context, capabilityProfileCreateSpec types.PbmCapabilityProfileCreateSpec) (*types.PbmProfileId, error) { req := types.PbmCreate{ This: c.ServiceContent.ProfileManager, CreateSpec: capabilityProfileCreateSpec, } res, err := methods.PbmCreate(ctx, c, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (c *Client) UpdateProfile(ctx context.Context, id types.PbmProfileId, updateSpec types.PbmCapabilityProfileUpdateSpec) error { req := types.PbmUpdate{ This: c.ServiceContent.ProfileManager, ProfileId: id, UpdateSpec: updateSpec, } _, err := methods.PbmUpdate(ctx, c, &req) if err != nil { return err } return nil } func (c *Client) DeleteProfile(ctx context.Context, ids []types.PbmProfileId) ([]types.PbmProfileOperationOutcome, error) { req := types.PbmDelete{ This: c.ServiceContent.ProfileManager, ProfileId: ids, } res, err := methods.PbmDelete(ctx, c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (c *Client) QueryAssociatedEntity(ctx context.Context, id types.PbmProfileId, entityType string) ([]types.PbmServerObjectRef, error) { req := types.PbmQueryAssociatedEntity{ This: c.ServiceContent.ProfileManager, Profile: id, EntityType: entityType, } res, err := methods.PbmQueryAssociatedEntity(ctx, c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (c *Client) QueryAssociatedEntities(ctx context.Context, ids []types.PbmProfileId) ([]types.PbmQueryProfileResult, error) { req := types.PbmQueryAssociatedEntities{ This: c.ServiceContent.ProfileManager, Profiles: ids, } res, err := methods.PbmQueryAssociatedEntities(ctx, c, &req) if err != nil { return nil, err } return res.Returnval, nil } func (c *Client) ProfileIDByName(ctx context.Context, profileName string) (string, error) { resourceType := types.PbmProfileResourceType{ ResourceType: string(types.PbmProfileResourceTypeEnumSTORAGE), } category := types.PbmProfileCategoryEnumREQUIREMENT ids, err := c.QueryProfile(ctx, resourceType, string(category)) if err != nil { return "", err } profiles, err := c.RetrieveContent(ctx, ids) if err != nil { return "", err } for i := range profiles { profile := profiles[i].GetPbmProfile() if profile.Name == profileName { return profile.ProfileId.UniqueId, nil } } return "", fmt.Errorf("no pbm profile found with name: %q", profileName) } govmomi-0.15.0/pbm/client_test.go000066400000000000000000000173061312205533500167020ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pbm import ( "context" "os" "reflect" "sort" "testing" "github.com/vmware/govmomi" "github.com/vmware/govmomi/pbm/types" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" vim "github.com/vmware/govmomi/vim25/types" ) func TestClient(t *testing.T) { url := os.Getenv("GOVMOMI_PBM_URL") if url == "" { t.SkipNow() } clusterName := os.Getenv("GOVMOMI_PBM_CLUSTER") u, err := soap.ParseURL(url) if err != nil { t.Fatal(err) } ctx := context.Background() c, err := govmomi.NewClient(ctx, u, true) if err != nil { t.Fatal(err) } pc, err := NewClient(ctx, c.Client) if err != nil { t.Fatal(err) } t.Logf("PBM version=%s", pc.ServiceContent.AboutInfo.Version) rtype := types.PbmProfileResourceType{ ResourceType: string(types.PbmProfileResourceTypeEnumSTORAGE), } category := types.PbmProfileCategoryEnumREQUIREMENT // 1. Query all the profiles on the vCenter. ids, err := pc.QueryProfile(ctx, rtype, string(category)) if err != nil { t.Fatal(err) } var qids []string for _, id := range ids { qids = append(qids, id.UniqueId) } var cids []string // 2. Retrieve the content of all profiles. policies, err := pc.RetrieveContent(ctx, ids) if err != nil { t.Fatal(err) } for i := range policies { profile := policies[i].GetPbmProfile() cids = append(cids, profile.ProfileId.UniqueId) } sort.Strings(qids) sort.Strings(cids) // Check whether ids retreived from QueryProfile and RetrieveContent are identical. if !reflect.DeepEqual(qids, cids) { t.Error("ids mismatch") } // 3. Get list of datastores in a cluster if cluster name is specified. root := c.ServiceContent.RootFolder var datastores []vim.ManagedObjectReference var kind []string if clusterName == "" { kind = []string{"Datastore"} } else { kind = []string{"ClusterComputeResource"} } m := view.NewManager(c.Client) v, err := m.CreateContainerView(ctx, root, kind, true) if err != nil { t.Fatal(err) } if clusterName == "" { datastores, err = v.Find(ctx, kind, nil) if err != nil { t.Fatal(err) } } else { var cluster mo.ClusterComputeResource err = v.RetrieveWithFilter(ctx, kind, []string{"datastore"}, &cluster, property.Filter{"name": clusterName}) if err != nil { t.Fatal(err) } datastores = cluster.Datastore } _ = v.Destroy(ctx) t.Logf("checking %d datatores for compatibility results", len(datastores)) var hubs []types.PbmPlacementHub for _, ds := range datastores { hubs = append(hubs, types.PbmPlacementHub{ HubType: ds.Type, HubId: ds.Value, }) } var req []types.BasePbmPlacementRequirement for _, id := range ids { req = append(req, &types.PbmPlacementCapabilityProfileRequirement{ ProfileId: id, }) } // 4. Get the compatibility results for all the profiles on the vCenter. res, err := pc.CheckRequirements(ctx, hubs, nil, req) if err != nil { t.Fatal(err) } t.Logf("CheckRequirements results: %d", len(res)) // user spec for the profile. // VSAN profile with 2 capability instances - hostFailuresToTolerate = 2, stripeWidth = 1 pbmCreateSpecForVSAN := CapabilityProfileCreateSpec{ Name: "Kubernetes-VSAN-TestPolicy", Description: "VSAN Test policy create", Category: string(types.PbmProfileCategoryEnumREQUIREMENT), CapabilityList: []Capability{ Capability{ ID: "hostFailuresToTolerate", Namespace: "VSAN", PropertyList: []Property{ Property{ ID: "hostFailuresToTolerate", Value: "2", DataType: "int", }, }, }, Capability{ ID: "stripeWidth", Namespace: "VSAN", PropertyList: []Property{ Property{ ID: "stripeWidth", Value: "1", DataType: "int", }, }, }, }, } // Create PBM capability spec for the above defined user spec. createSpecVSAN, err := CreateCapabilityProfileSpec(pbmCreateSpecForVSAN) if err != nil { t.Fatal(err) } // 5. Create SPBM VSAN profile. vsanProfileID, err := pc.CreateProfile(ctx, *createSpecVSAN) if err != nil { t.Fatal(err) } t.Logf("VSAN Profile: %q successfully created", vsanProfileID.UniqueId) // 6. Verify if profile created exists by issuing a RetrieveContent request. _, err = pc.RetrieveContent(ctx, []types.PbmProfileId{*vsanProfileID}) if err != nil { t.Fatal(err) } t.Logf("Profile: %q exists on vCenter", vsanProfileID.UniqueId) // 7. Get compatible datastores for the VSAN profile. compatibleDatastores := res.CompatibleDatastores() t.Logf("Found %d compatible-datastores for profile: %q", len(compatibleDatastores), vsanProfileID.UniqueId) // 8. Get non-compatible datastores for the VSAN profile. nonCompatibleDatastores := res.NonCompatibleDatastores() t.Logf("Found %d non-compatible datastores for profile: %q", len(nonCompatibleDatastores), vsanProfileID.UniqueId) // Check whether count of compatible and non-compatible datastores match the total number of datastores. if (len(nonCompatibleDatastores) + len(compatibleDatastores)) != len(datastores) { t.Error("datastore count mismatch") } // user spec for the profile. // VSAN profile with 2 capability instances - stripeWidth = 1 and an SIOC profile. pbmCreateSpecVSANandSIOC := CapabilityProfileCreateSpec{ Name: "Kubernetes-VSAN-SIOC-TestPolicy", Description: "VSAN-SIOC-Test policy create", Category: string(types.PbmProfileCategoryEnumREQUIREMENT), CapabilityList: []Capability{ Capability{ ID: "stripeWidth", Namespace: "VSAN", PropertyList: []Property{ Property{ ID: "stripeWidth", Value: "1", DataType: "int", }, }, }, Capability{ ID: "spm@DATASTOREIOCONTROL", Namespace: "spm", PropertyList: []Property{ Property{ ID: "limit", Value: "200", DataType: "int", }, Property{ ID: "reservation", Value: "1000", DataType: "int", }, Property{ ID: "shares", Value: "2000", DataType: "int", }, }, }, }, } // Create PBM capability spec for the above defined user spec. createSpecVSANandSIOC, err := CreateCapabilityProfileSpec(pbmCreateSpecVSANandSIOC) if err != nil { t.Fatal(err) } // 9. Create SPBM VSAN profile. vsansiocProfileID, err := pc.CreateProfile(ctx, *createSpecVSANandSIOC) if err != nil { t.Fatal(err) } t.Logf("VSAN-SIOC Profile: %q successfully created", vsansiocProfileID.UniqueId) // 9. Get ProfileID by Name profileID, err := pc.ProfileIDByName(ctx, "Kubernetes-VSAN-SIOC-TestPolicy") if err != nil { t.Fatal(err) } if vsansiocProfileID.UniqueId != profileID { t.Errorf("vsan-sioc profile: %q and retrieved profileID: %q successfully matched", vsansiocProfileID.UniqueId, profileID) } t.Logf("VSAN-SIOC profile: %q and retrieved profileID: %q successfully matched", vsansiocProfileID.UniqueId, profileID) // 10. Delete VSAN and VSAN-SIOC profile. _, err = pc.DeleteProfile(ctx, []types.PbmProfileId{*vsanProfileID, *vsansiocProfileID}) if err != nil { t.Fatal(err) } t.Logf("Profile: %+v successfully deleted", []types.PbmProfileId{*vsanProfileID, *vsansiocProfileID}) } govmomi-0.15.0/pbm/methods/000077500000000000000000000000001312205533500154725ustar00rootroot00000000000000govmomi-0.15.0/pbm/methods/methods.go000066400000000000000000000626461312205533500175020ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package methods import ( "context" "github.com/vmware/govmomi/pbm/types" "github.com/vmware/govmomi/vim25/soap" ) type PbmAssignDefaultRequirementProfileBody struct { Req *types.PbmAssignDefaultRequirementProfile `xml:"urn:pbm PbmAssignDefaultRequirementProfile,omitempty"` Res *types.PbmAssignDefaultRequirementProfileResponse `xml:"urn:pbm PbmAssignDefaultRequirementProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmAssignDefaultRequirementProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmAssignDefaultRequirementProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmAssignDefaultRequirementProfile) (*types.PbmAssignDefaultRequirementProfileResponse, error) { var reqBody, resBody PbmAssignDefaultRequirementProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmCheckCompatibilityBody struct { Req *types.PbmCheckCompatibility `xml:"urn:pbm PbmCheckCompatibility,omitempty"` Res *types.PbmCheckCompatibilityResponse `xml:"urn:pbm PbmCheckCompatibilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmCheckCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } func PbmCheckCompatibility(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckCompatibility) (*types.PbmCheckCompatibilityResponse, error) { var reqBody, resBody PbmCheckCompatibilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmCheckCompatibilityWithSpecBody struct { Req *types.PbmCheckCompatibilityWithSpec `xml:"urn:pbm PbmCheckCompatibilityWithSpec,omitempty"` Res *types.PbmCheckCompatibilityWithSpecResponse `xml:"urn:pbm PbmCheckCompatibilityWithSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmCheckCompatibilityWithSpecBody) Fault() *soap.Fault { return b.Fault_ } func PbmCheckCompatibilityWithSpec(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckCompatibilityWithSpec) (*types.PbmCheckCompatibilityWithSpecResponse, error) { var reqBody, resBody PbmCheckCompatibilityWithSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmCheckComplianceBody struct { Req *types.PbmCheckCompliance `xml:"urn:pbm PbmCheckCompliance,omitempty"` Res *types.PbmCheckComplianceResponse `xml:"urn:pbm PbmCheckComplianceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmCheckComplianceBody) Fault() *soap.Fault { return b.Fault_ } func PbmCheckCompliance(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckCompliance) (*types.PbmCheckComplianceResponse, error) { var reqBody, resBody PbmCheckComplianceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmCheckRequirementsBody struct { Req *types.PbmCheckRequirements `xml:"urn:pbm PbmCheckRequirements,omitempty"` Res *types.PbmCheckRequirementsResponse `xml:"urn:pbm PbmCheckRequirementsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmCheckRequirementsBody) Fault() *soap.Fault { return b.Fault_ } func PbmCheckRequirements(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckRequirements) (*types.PbmCheckRequirementsResponse, error) { var reqBody, resBody PbmCheckRequirementsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmCheckRollupComplianceBody struct { Req *types.PbmCheckRollupCompliance `xml:"urn:pbm PbmCheckRollupCompliance,omitempty"` Res *types.PbmCheckRollupComplianceResponse `xml:"urn:pbm PbmCheckRollupComplianceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmCheckRollupComplianceBody) Fault() *soap.Fault { return b.Fault_ } func PbmCheckRollupCompliance(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckRollupCompliance) (*types.PbmCheckRollupComplianceResponse, error) { var reqBody, resBody PbmCheckRollupComplianceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmCreateBody struct { Req *types.PbmCreate `xml:"urn:pbm PbmCreate,omitempty"` Res *types.PbmCreateResponse `xml:"urn:pbm PbmCreateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmCreateBody) Fault() *soap.Fault { return b.Fault_ } func PbmCreate(ctx context.Context, r soap.RoundTripper, req *types.PbmCreate) (*types.PbmCreateResponse, error) { var reqBody, resBody PbmCreateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmDeleteBody struct { Req *types.PbmDelete `xml:"urn:pbm PbmDelete,omitempty"` Res *types.PbmDeleteResponse `xml:"urn:pbm PbmDeleteResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmDeleteBody) Fault() *soap.Fault { return b.Fault_ } func PbmDelete(ctx context.Context, r soap.RoundTripper, req *types.PbmDelete) (*types.PbmDeleteResponse, error) { var reqBody, resBody PbmDeleteBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFetchCapabilityMetadataBody struct { Req *types.PbmFetchCapabilityMetadata `xml:"urn:pbm PbmFetchCapabilityMetadata,omitempty"` Res *types.PbmFetchCapabilityMetadataResponse `xml:"urn:pbm PbmFetchCapabilityMetadataResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFetchCapabilityMetadataBody) Fault() *soap.Fault { return b.Fault_ } func PbmFetchCapabilityMetadata(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchCapabilityMetadata) (*types.PbmFetchCapabilityMetadataResponse, error) { var reqBody, resBody PbmFetchCapabilityMetadataBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFetchCapabilitySchemaBody struct { Req *types.PbmFetchCapabilitySchema `xml:"urn:pbm PbmFetchCapabilitySchema,omitempty"` Res *types.PbmFetchCapabilitySchemaResponse `xml:"urn:pbm PbmFetchCapabilitySchemaResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFetchCapabilitySchemaBody) Fault() *soap.Fault { return b.Fault_ } func PbmFetchCapabilitySchema(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchCapabilitySchema) (*types.PbmFetchCapabilitySchemaResponse, error) { var reqBody, resBody PbmFetchCapabilitySchemaBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFetchComplianceResultBody struct { Req *types.PbmFetchComplianceResult `xml:"urn:pbm PbmFetchComplianceResult,omitempty"` Res *types.PbmFetchComplianceResultResponse `xml:"urn:pbm PbmFetchComplianceResultResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFetchComplianceResultBody) Fault() *soap.Fault { return b.Fault_ } func PbmFetchComplianceResult(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchComplianceResult) (*types.PbmFetchComplianceResultResponse, error) { var reqBody, resBody PbmFetchComplianceResultBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFetchResourceTypeBody struct { Req *types.PbmFetchResourceType `xml:"urn:pbm PbmFetchResourceType,omitempty"` Res *types.PbmFetchResourceTypeResponse `xml:"urn:pbm PbmFetchResourceTypeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFetchResourceTypeBody) Fault() *soap.Fault { return b.Fault_ } func PbmFetchResourceType(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchResourceType) (*types.PbmFetchResourceTypeResponse, error) { var reqBody, resBody PbmFetchResourceTypeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFetchRollupComplianceResultBody struct { Req *types.PbmFetchRollupComplianceResult `xml:"urn:pbm PbmFetchRollupComplianceResult,omitempty"` Res *types.PbmFetchRollupComplianceResultResponse `xml:"urn:pbm PbmFetchRollupComplianceResultResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFetchRollupComplianceResultBody) Fault() *soap.Fault { return b.Fault_ } func PbmFetchRollupComplianceResult(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchRollupComplianceResult) (*types.PbmFetchRollupComplianceResultResponse, error) { var reqBody, resBody PbmFetchRollupComplianceResultBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFetchVendorInfoBody struct { Req *types.PbmFetchVendorInfo `xml:"urn:pbm PbmFetchVendorInfo,omitempty"` Res *types.PbmFetchVendorInfoResponse `xml:"urn:pbm PbmFetchVendorInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFetchVendorInfoBody) Fault() *soap.Fault { return b.Fault_ } func PbmFetchVendorInfo(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchVendorInfo) (*types.PbmFetchVendorInfoResponse, error) { var reqBody, resBody PbmFetchVendorInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmFindApplicableDefaultProfileBody struct { Req *types.PbmFindApplicableDefaultProfile `xml:"urn:pbm PbmFindApplicableDefaultProfile,omitempty"` Res *types.PbmFindApplicableDefaultProfileResponse `xml:"urn:pbm PbmFindApplicableDefaultProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmFindApplicableDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmFindApplicableDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmFindApplicableDefaultProfile) (*types.PbmFindApplicableDefaultProfileResponse, error) { var reqBody, resBody PbmFindApplicableDefaultProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryAssociatedEntitiesBody struct { Req *types.PbmQueryAssociatedEntities `xml:"urn:pbm PbmQueryAssociatedEntities,omitempty"` Res *types.PbmQueryAssociatedEntitiesResponse `xml:"urn:pbm PbmQueryAssociatedEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryAssociatedEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryAssociatedEntities(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedEntities) (*types.PbmQueryAssociatedEntitiesResponse, error) { var reqBody, resBody PbmQueryAssociatedEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryAssociatedEntityBody struct { Req *types.PbmQueryAssociatedEntity `xml:"urn:pbm PbmQueryAssociatedEntity,omitempty"` Res *types.PbmQueryAssociatedEntityResponse `xml:"urn:pbm PbmQueryAssociatedEntityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryAssociatedEntityBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryAssociatedEntity(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedEntity) (*types.PbmQueryAssociatedEntityResponse, error) { var reqBody, resBody PbmQueryAssociatedEntityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryAssociatedProfileBody struct { Req *types.PbmQueryAssociatedProfile `xml:"urn:pbm PbmQueryAssociatedProfile,omitempty"` Res *types.PbmQueryAssociatedProfileResponse `xml:"urn:pbm PbmQueryAssociatedProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryAssociatedProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryAssociatedProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedProfile) (*types.PbmQueryAssociatedProfileResponse, error) { var reqBody, resBody PbmQueryAssociatedProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryAssociatedProfilesBody struct { Req *types.PbmQueryAssociatedProfiles `xml:"urn:pbm PbmQueryAssociatedProfiles,omitempty"` Res *types.PbmQueryAssociatedProfilesResponse `xml:"urn:pbm PbmQueryAssociatedProfilesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryAssociatedProfilesBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryAssociatedProfiles(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedProfiles) (*types.PbmQueryAssociatedProfilesResponse, error) { var reqBody, resBody PbmQueryAssociatedProfilesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryByRollupComplianceStatusBody struct { Req *types.PbmQueryByRollupComplianceStatus `xml:"urn:pbm PbmQueryByRollupComplianceStatus,omitempty"` Res *types.PbmQueryByRollupComplianceStatusResponse `xml:"urn:pbm PbmQueryByRollupComplianceStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryByRollupComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryByRollupComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryByRollupComplianceStatus) (*types.PbmQueryByRollupComplianceStatusResponse, error) { var reqBody, resBody PbmQueryByRollupComplianceStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryDefaultRequirementProfileBody struct { Req *types.PbmQueryDefaultRequirementProfile `xml:"urn:pbm PbmQueryDefaultRequirementProfile,omitempty"` Res *types.PbmQueryDefaultRequirementProfileResponse `xml:"urn:pbm PbmQueryDefaultRequirementProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryDefaultRequirementProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryDefaultRequirementProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryDefaultRequirementProfile) (*types.PbmQueryDefaultRequirementProfileResponse, error) { var reqBody, resBody PbmQueryDefaultRequirementProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryDefaultRequirementProfilesBody struct { Req *types.PbmQueryDefaultRequirementProfiles `xml:"urn:pbm PbmQueryDefaultRequirementProfiles,omitempty"` Res *types.PbmQueryDefaultRequirementProfilesResponse `xml:"urn:pbm PbmQueryDefaultRequirementProfilesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryDefaultRequirementProfilesBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryDefaultRequirementProfiles(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryDefaultRequirementProfiles) (*types.PbmQueryDefaultRequirementProfilesResponse, error) { var reqBody, resBody PbmQueryDefaultRequirementProfilesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryMatchingHubBody struct { Req *types.PbmQueryMatchingHub `xml:"urn:pbm PbmQueryMatchingHub,omitempty"` Res *types.PbmQueryMatchingHubResponse `xml:"urn:pbm PbmQueryMatchingHubResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryMatchingHubBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryMatchingHub(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryMatchingHub) (*types.PbmQueryMatchingHubResponse, error) { var reqBody, resBody PbmQueryMatchingHubBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryMatchingHubWithSpecBody struct { Req *types.PbmQueryMatchingHubWithSpec `xml:"urn:pbm PbmQueryMatchingHubWithSpec,omitempty"` Res *types.PbmQueryMatchingHubWithSpecResponse `xml:"urn:pbm PbmQueryMatchingHubWithSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryMatchingHubWithSpecBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryMatchingHubWithSpec(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryMatchingHubWithSpec) (*types.PbmQueryMatchingHubWithSpecResponse, error) { var reqBody, resBody PbmQueryMatchingHubWithSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryProfileBody struct { Req *types.PbmQueryProfile `xml:"urn:pbm PbmQueryProfile,omitempty"` Res *types.PbmQueryProfileResponse `xml:"urn:pbm PbmQueryProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryProfile) (*types.PbmQueryProfileResponse, error) { var reqBody, resBody PbmQueryProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQueryReplicationGroupsBody struct { Req *types.PbmQueryReplicationGroups `xml:"urn:pbm PbmQueryReplicationGroups,omitempty"` Res *types.PbmQueryReplicationGroupsResponse `xml:"urn:pbm PbmQueryReplicationGroupsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQueryReplicationGroupsBody) Fault() *soap.Fault { return b.Fault_ } func PbmQueryReplicationGroups(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryReplicationGroups) (*types.PbmQueryReplicationGroupsResponse, error) { var reqBody, resBody PbmQueryReplicationGroupsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmQuerySpaceStatsForStorageContainerBody struct { Req *types.PbmQuerySpaceStatsForStorageContainer `xml:"urn:pbm PbmQuerySpaceStatsForStorageContainer,omitempty"` Res *types.PbmQuerySpaceStatsForStorageContainerResponse `xml:"urn:pbm PbmQuerySpaceStatsForStorageContainerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmQuerySpaceStatsForStorageContainerBody) Fault() *soap.Fault { return b.Fault_ } func PbmQuerySpaceStatsForStorageContainer(ctx context.Context, r soap.RoundTripper, req *types.PbmQuerySpaceStatsForStorageContainer) (*types.PbmQuerySpaceStatsForStorageContainerResponse, error) { var reqBody, resBody PbmQuerySpaceStatsForStorageContainerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmResetDefaultRequirementProfileBody struct { Req *types.PbmResetDefaultRequirementProfile `xml:"urn:pbm PbmResetDefaultRequirementProfile,omitempty"` Res *types.PbmResetDefaultRequirementProfileResponse `xml:"urn:pbm PbmResetDefaultRequirementProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmResetDefaultRequirementProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmResetDefaultRequirementProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmResetDefaultRequirementProfile) (*types.PbmResetDefaultRequirementProfileResponse, error) { var reqBody, resBody PbmResetDefaultRequirementProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmResetVSanDefaultProfileBody struct { Req *types.PbmResetVSanDefaultProfile `xml:"urn:pbm PbmResetVSanDefaultProfile,omitempty"` Res *types.PbmResetVSanDefaultProfileResponse `xml:"urn:pbm PbmResetVSanDefaultProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmResetVSanDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ } func PbmResetVSanDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmResetVSanDefaultProfile) (*types.PbmResetVSanDefaultProfileResponse, error) { var reqBody, resBody PbmResetVSanDefaultProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmRetrieveContentBody struct { Req *types.PbmRetrieveContent `xml:"urn:pbm PbmRetrieveContent,omitempty"` Res *types.PbmRetrieveContentResponse `xml:"urn:pbm PbmRetrieveContentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmRetrieveContentBody) Fault() *soap.Fault { return b.Fault_ } func PbmRetrieveContent(ctx context.Context, r soap.RoundTripper, req *types.PbmRetrieveContent) (*types.PbmRetrieveContentResponse, error) { var reqBody, resBody PbmRetrieveContentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmRetrieveServiceContentBody struct { Req *types.PbmRetrieveServiceContent `xml:"urn:pbm PbmRetrieveServiceContent,omitempty"` Res *types.PbmRetrieveServiceContentResponse `xml:"urn:pbm PbmRetrieveServiceContentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmRetrieveServiceContentBody) Fault() *soap.Fault { return b.Fault_ } func PbmRetrieveServiceContent(ctx context.Context, r soap.RoundTripper, req *types.PbmRetrieveServiceContent) (*types.PbmRetrieveServiceContentResponse, error) { var reqBody, resBody PbmRetrieveServiceContentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PbmUpdateBody struct { Req *types.PbmUpdate `xml:"urn:pbm PbmUpdate,omitempty"` Res *types.PbmUpdateResponse `xml:"urn:pbm PbmUpdateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PbmUpdateBody) Fault() *soap.Fault { return b.Fault_ } func PbmUpdate(ctx context.Context, r soap.RoundTripper, req *types.PbmUpdate) (*types.PbmUpdateResponse, error) { var reqBody, resBody PbmUpdateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } govmomi-0.15.0/pbm/pbm_util.go000066400000000000000000000105411312205533500161720ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package pbm import ( "fmt" "strconv" "strings" "github.com/vmware/govmomi/pbm/types" ) // A struct to capture pbm create spec details. type CapabilityProfileCreateSpec struct { Name string Description string Category string CapabilityList []Capability } // A struct to capture pbm capability instance details. type Capability struct { ID string Namespace string PropertyList []Property } // A struct to capture pbm property instance details. type Property struct { ID string Operator string Value string DataType string } func CreateCapabilityProfileSpec(pbmCreateSpec CapabilityProfileCreateSpec) (*types.PbmCapabilityProfileCreateSpec, error) { capabilities, err := createCapabilityInstances(pbmCreateSpec.CapabilityList) if err != nil { return nil, err } pbmCapabilityProfileSpec := types.PbmCapabilityProfileCreateSpec{ Name: pbmCreateSpec.Name, Description: pbmCreateSpec.Description, Category: pbmCreateSpec.Category, ResourceType: types.PbmProfileResourceType{ ResourceType: string(types.PbmProfileResourceTypeEnumSTORAGE), }, Constraints: &types.PbmCapabilitySubProfileConstraints{ SubProfiles: []types.PbmCapabilitySubProfile{ types.PbmCapabilitySubProfile{ Capability: capabilities, }, }, }, } return &pbmCapabilityProfileSpec, nil } func createCapabilityInstances(rules []Capability) ([]types.PbmCapabilityInstance, error) { var capabilityInstances []types.PbmCapabilityInstance for _, capabilityRule := range rules { capability := types.PbmCapabilityInstance{ Id: types.PbmCapabilityMetadataUniqueId{ Namespace: capabilityRule.Namespace, Id: capabilityRule.ID, }, } var propertyInstances []types.PbmCapabilityPropertyInstance for _, propertyRule := range capabilityRule.PropertyList { property := types.PbmCapabilityPropertyInstance{ Id: propertyRule.ID, } if propertyRule.Operator != "" { property.Operator = propertyRule.Operator } var err error switch strings.ToLower(propertyRule.DataType) { case "int": // Go int32 is marshalled to xsi:int whereas Go int is marshalled to xsi:long when sending down the wire. var val int32 val, err = verifyPropertyValueIsInt(propertyRule.Value, propertyRule.DataType) property.Value = val case "bool": var val bool val, err = verifyPropertyValueIsBoolean(propertyRule.Value, propertyRule.DataType) property.Value = val case "string": property.Value = propertyRule.Value case "set": set := types.PbmCapabilityDiscreteSet{} for _, val := range strings.Split(propertyRule.Value, ",") { set.Values = append(set.Values, val) } property.Value = set default: return nil, fmt.Errorf("invalid value: %q with datatype: %q", propertyRule.Value, propertyRule.Value) } if err != nil { return nil, fmt.Errorf("invalid value: %q with datatype: %q", propertyRule.Value, propertyRule.Value) } propertyInstances = append(propertyInstances, property) } constraintInstances := []types.PbmCapabilityConstraintInstance{ types.PbmCapabilityConstraintInstance{ PropertyInstance: propertyInstances, }, } capability.Constraint = constraintInstances capabilityInstances = append(capabilityInstances, capability) } return capabilityInstances, nil } // Verify if the capability value is of type integer. func verifyPropertyValueIsInt(propertyValue string, dataType string) (int32, error) { val, err := strconv.ParseInt(propertyValue, 10, 32) if err != nil { return -1, err } return int32(val), nil } // Verify if the capability value is of type integer. func verifyPropertyValueIsBoolean(propertyValue string, dataType string) (bool, error) { val, err := strconv.ParseBool(propertyValue) if err != nil { return false, err } return val, nil } govmomi-0.15.0/pbm/types/000077500000000000000000000000001312205533500151735ustar00rootroot00000000000000govmomi-0.15.0/pbm/types/enum.go000066400000000000000000000170271312205533500164750ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "reflect" "github.com/vmware/govmomi/vim25/types" ) type PbmBuiltinGenericType string const ( PbmBuiltinGenericTypeVMW_RANGE = PbmBuiltinGenericType("VMW_RANGE") PbmBuiltinGenericTypeVMW_SET = PbmBuiltinGenericType("VMW_SET") ) func init() { types.Add("pbm:PbmBuiltinGenericType", reflect.TypeOf((*PbmBuiltinGenericType)(nil)).Elem()) } type PbmBuiltinType string const ( PbmBuiltinTypeXSD_LONG = PbmBuiltinType("XSD_LONG") PbmBuiltinTypeXSD_SHORT = PbmBuiltinType("XSD_SHORT") PbmBuiltinTypeXSD_INTEGER = PbmBuiltinType("XSD_INTEGER") PbmBuiltinTypeXSD_INT = PbmBuiltinType("XSD_INT") PbmBuiltinTypeXSD_STRING = PbmBuiltinType("XSD_STRING") PbmBuiltinTypeXSD_BOOLEAN = PbmBuiltinType("XSD_BOOLEAN") PbmBuiltinTypeXSD_DOUBLE = PbmBuiltinType("XSD_DOUBLE") PbmBuiltinTypeXSD_DATETIME = PbmBuiltinType("XSD_DATETIME") PbmBuiltinTypeVMW_TIMESPAN = PbmBuiltinType("VMW_TIMESPAN") PbmBuiltinTypeVMW_POLICY = PbmBuiltinType("VMW_POLICY") ) func init() { types.Add("pbm:PbmBuiltinType", reflect.TypeOf((*PbmBuiltinType)(nil)).Elem()) } type PbmCapabilityOperator string const ( PbmCapabilityOperatorNOT = PbmCapabilityOperator("NOT") ) func init() { types.Add("pbm:PbmCapabilityOperator", reflect.TypeOf((*PbmCapabilityOperator)(nil)).Elem()) } type PbmCapabilityTimeUnitType string const ( PbmCapabilityTimeUnitTypeSECONDS = PbmCapabilityTimeUnitType("SECONDS") PbmCapabilityTimeUnitTypeMINUTES = PbmCapabilityTimeUnitType("MINUTES") PbmCapabilityTimeUnitTypeHOURS = PbmCapabilityTimeUnitType("HOURS") PbmCapabilityTimeUnitTypeDAYS = PbmCapabilityTimeUnitType("DAYS") PbmCapabilityTimeUnitTypeWEEKS = PbmCapabilityTimeUnitType("WEEKS") PbmCapabilityTimeUnitTypeMONTHS = PbmCapabilityTimeUnitType("MONTHS") PbmCapabilityTimeUnitTypeYEARS = PbmCapabilityTimeUnitType("YEARS") ) func init() { types.Add("pbm:PbmCapabilityTimeUnitType", reflect.TypeOf((*PbmCapabilityTimeUnitType)(nil)).Elem()) } type PbmComplianceResultComplianceTaskStatus string const ( PbmComplianceResultComplianceTaskStatusInProgress = PbmComplianceResultComplianceTaskStatus("inProgress") PbmComplianceResultComplianceTaskStatusSuccess = PbmComplianceResultComplianceTaskStatus("success") PbmComplianceResultComplianceTaskStatusFailed = PbmComplianceResultComplianceTaskStatus("failed") ) func init() { types.Add("pbm:PbmComplianceResultComplianceTaskStatus", reflect.TypeOf((*PbmComplianceResultComplianceTaskStatus)(nil)).Elem()) } type PbmComplianceStatus string const ( PbmComplianceStatusCompliant = PbmComplianceStatus("compliant") PbmComplianceStatusNonCompliant = PbmComplianceStatus("nonCompliant") PbmComplianceStatusUnknown = PbmComplianceStatus("unknown") PbmComplianceStatusNotApplicable = PbmComplianceStatus("notApplicable") PbmComplianceStatusOutOfDate = PbmComplianceStatus("outOfDate") ) func init() { types.Add("pbm:PbmComplianceStatus", reflect.TypeOf((*PbmComplianceStatus)(nil)).Elem()) } type PbmIofilterInfoFilterType string const ( PbmIofilterInfoFilterTypeINSPECTION = PbmIofilterInfoFilterType("INSPECTION") PbmIofilterInfoFilterTypeCOMPRESSION = PbmIofilterInfoFilterType("COMPRESSION") PbmIofilterInfoFilterTypeENCRYPTION = PbmIofilterInfoFilterType("ENCRYPTION") PbmIofilterInfoFilterTypeREPLICATION = PbmIofilterInfoFilterType("REPLICATION") PbmIofilterInfoFilterTypeCACHE = PbmIofilterInfoFilterType("CACHE") PbmIofilterInfoFilterTypeDATAPROVIDER = PbmIofilterInfoFilterType("DATAPROVIDER") PbmIofilterInfoFilterTypeDATASTOREIOCONTROL = PbmIofilterInfoFilterType("DATASTOREIOCONTROL") ) func init() { types.Add("pbm:PbmIofilterInfoFilterType", reflect.TypeOf((*PbmIofilterInfoFilterType)(nil)).Elem()) } type PbmLineOfServiceInfoLineOfServiceEnum string const ( PbmLineOfServiceInfoLineOfServiceEnumINSPECTION = PbmLineOfServiceInfoLineOfServiceEnum("INSPECTION") PbmLineOfServiceInfoLineOfServiceEnumCOMPRESSION = PbmLineOfServiceInfoLineOfServiceEnum("COMPRESSION") PbmLineOfServiceInfoLineOfServiceEnumENCRYPTION = PbmLineOfServiceInfoLineOfServiceEnum("ENCRYPTION") PbmLineOfServiceInfoLineOfServiceEnumREPLICATION = PbmLineOfServiceInfoLineOfServiceEnum("REPLICATION") PbmLineOfServiceInfoLineOfServiceEnumCACHING = PbmLineOfServiceInfoLineOfServiceEnum("CACHING") PbmLineOfServiceInfoLineOfServiceEnumPERSISTENCE = PbmLineOfServiceInfoLineOfServiceEnum("PERSISTENCE") PbmLineOfServiceInfoLineOfServiceEnumDATA_PROVIDER = PbmLineOfServiceInfoLineOfServiceEnum("DATA_PROVIDER") PbmLineOfServiceInfoLineOfServiceEnumDATASTORE_IO_CONTROL = PbmLineOfServiceInfoLineOfServiceEnum("DATASTORE_IO_CONTROL") ) func init() { types.Add("pbm:PbmLineOfServiceInfoLineOfServiceEnum", reflect.TypeOf((*PbmLineOfServiceInfoLineOfServiceEnum)(nil)).Elem()) } type PbmObjectType string const ( PbmObjectTypeVirtualMachine = PbmObjectType("virtualMachine") PbmObjectTypeVirtualMachineAndDisks = PbmObjectType("virtualMachineAndDisks") PbmObjectTypeVirtualDiskId = PbmObjectType("virtualDiskId") PbmObjectTypeVirtualDiskUUID = PbmObjectType("virtualDiskUUID") PbmObjectTypeDatastore = PbmObjectType("datastore") PbmObjectTypeUnknown = PbmObjectType("unknown") ) func init() { types.Add("pbm:PbmObjectType", reflect.TypeOf((*PbmObjectType)(nil)).Elem()) } type PbmProfileCategoryEnum string const ( PbmProfileCategoryEnumREQUIREMENT = PbmProfileCategoryEnum("REQUIREMENT") PbmProfileCategoryEnumRESOURCE = PbmProfileCategoryEnum("RESOURCE") PbmProfileCategoryEnumDATA_SERVICE_POLICY = PbmProfileCategoryEnum("DATA_SERVICE_POLICY") ) func init() { types.Add("pbm:PbmProfileCategoryEnum", reflect.TypeOf((*PbmProfileCategoryEnum)(nil)).Elem()) } type PbmProfileResourceTypeEnum string const ( PbmProfileResourceTypeEnumSTORAGE = PbmProfileResourceTypeEnum("STORAGE") ) func init() { types.Add("pbm:PbmProfileResourceTypeEnum", reflect.TypeOf((*PbmProfileResourceTypeEnum)(nil)).Elem()) } type PbmSystemCreatedProfileType string const ( PbmSystemCreatedProfileTypeVsanDefaultProfile = PbmSystemCreatedProfileType("VsanDefaultProfile") PbmSystemCreatedProfileTypeVVolDefaultProfile = PbmSystemCreatedProfileType("VVolDefaultProfile") ) func init() { types.Add("pbm:PbmSystemCreatedProfileType", reflect.TypeOf((*PbmSystemCreatedProfileType)(nil)).Elem()) } type PbmVmOperation string const ( PbmVmOperationCREATE = PbmVmOperation("CREATE") PbmVmOperationRECONFIGURE = PbmVmOperation("RECONFIGURE") PbmVmOperationMIGRATE = PbmVmOperation("MIGRATE") PbmVmOperationCLONE = PbmVmOperation("CLONE") ) func init() { types.Add("pbm:PbmVmOperation", reflect.TypeOf((*PbmVmOperation)(nil)).Elem()) } type PbmVvolType string const ( PbmVvolTypeConfig = PbmVvolType("Config") PbmVvolTypeData = PbmVvolType("Data") PbmVvolTypeSwap = PbmVvolType("Swap") ) func init() { types.Add("pbm:PbmVvolType", reflect.TypeOf((*PbmVvolType)(nil)).Elem()) } govmomi-0.15.0/pbm/types/if.go000066400000000000000000000100501312205533500161140ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "reflect" "github.com/vmware/govmomi/vim25/types" ) func (b *PbmCapabilityConstraints) GetPbmCapabilityConstraints() *PbmCapabilityConstraints { return b } type BasePbmCapabilityConstraints interface { GetPbmCapabilityConstraints() *PbmCapabilityConstraints } func init() { types.Add("BasePbmCapabilityConstraints", reflect.TypeOf((*PbmCapabilityConstraints)(nil)).Elem()) } func (b *PbmCapabilityProfile) GetPbmCapabilityProfile() *PbmCapabilityProfile { return b } type BasePbmCapabilityProfile interface { GetPbmCapabilityProfile() *PbmCapabilityProfile } func init() { types.Add("BasePbmCapabilityProfile", reflect.TypeOf((*PbmCapabilityProfile)(nil)).Elem()) } func (b *PbmCapabilityProfilePropertyMismatchFault) GetPbmCapabilityProfilePropertyMismatchFault() *PbmCapabilityProfilePropertyMismatchFault { return b } type BasePbmCapabilityProfilePropertyMismatchFault interface { GetPbmCapabilityProfilePropertyMismatchFault() *PbmCapabilityProfilePropertyMismatchFault } func init() { types.Add("BasePbmCapabilityProfilePropertyMismatchFault", reflect.TypeOf((*PbmCapabilityProfilePropertyMismatchFault)(nil)).Elem()) } func (b *PbmCapabilityTypeInfo) GetPbmCapabilityTypeInfo() *PbmCapabilityTypeInfo { return b } type BasePbmCapabilityTypeInfo interface { GetPbmCapabilityTypeInfo() *PbmCapabilityTypeInfo } func init() { types.Add("BasePbmCapabilityTypeInfo", reflect.TypeOf((*PbmCapabilityTypeInfo)(nil)).Elem()) } func (b *PbmCompatibilityCheckFault) GetPbmCompatibilityCheckFault() *PbmCompatibilityCheckFault { return b } type BasePbmCompatibilityCheckFault interface { GetPbmCompatibilityCheckFault() *PbmCompatibilityCheckFault } func init() { types.Add("BasePbmCompatibilityCheckFault", reflect.TypeOf((*PbmCompatibilityCheckFault)(nil)).Elem()) } func (b *PbmFault) GetPbmFault() *PbmFault { return b } type BasePbmFault interface { GetPbmFault() *PbmFault } func init() { types.Add("BasePbmFault", reflect.TypeOf((*PbmFault)(nil)).Elem()) } func (b *PbmLineOfServiceInfo) GetPbmLineOfServiceInfo() *PbmLineOfServiceInfo { return b } type BasePbmLineOfServiceInfo interface { GetPbmLineOfServiceInfo() *PbmLineOfServiceInfo } func init() { types.Add("BasePbmLineOfServiceInfo", reflect.TypeOf((*PbmLineOfServiceInfo)(nil)).Elem()) } func (b *PbmPlacementMatchingResources) GetPbmPlacementMatchingResources() *PbmPlacementMatchingResources { return b } type BasePbmPlacementMatchingResources interface { GetPbmPlacementMatchingResources() *PbmPlacementMatchingResources } func init() { types.Add("BasePbmPlacementMatchingResources", reflect.TypeOf((*PbmPlacementMatchingResources)(nil)).Elem()) } func (b *PbmPlacementRequirement) GetPbmPlacementRequirement() *PbmPlacementRequirement { return b } type BasePbmPlacementRequirement interface { GetPbmPlacementRequirement() *PbmPlacementRequirement } func init() { types.Add("BasePbmPlacementRequirement", reflect.TypeOf((*PbmPlacementRequirement)(nil)).Elem()) } func (b *PbmProfile) GetPbmProfile() *PbmProfile { return b } type BasePbmProfile interface { GetPbmProfile() *PbmProfile } func init() { types.Add("BasePbmProfile", reflect.TypeOf((*PbmProfile)(nil)).Elem()) } func (b *PbmPropertyMismatchFault) GetPbmPropertyMismatchFault() *PbmPropertyMismatchFault { return b } type BasePbmPropertyMismatchFault interface { GetPbmPropertyMismatchFault() *PbmPropertyMismatchFault } func init() { types.Add("BasePbmPropertyMismatchFault", reflect.TypeOf((*PbmPropertyMismatchFault)(nil)).Elem()) } govmomi-0.15.0/pbm/types/types.go000066400000000000000000001520651312205533500166770ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "reflect" "time" "github.com/vmware/govmomi/vim25/types" ) type ArrayOfPbmCapabilityConstraintInstance struct { PbmCapabilityConstraintInstance []PbmCapabilityConstraintInstance `xml:"PbmCapabilityConstraintInstance,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityConstraintInstance", reflect.TypeOf((*ArrayOfPbmCapabilityConstraintInstance)(nil)).Elem()) } type ArrayOfPbmCapabilityInstance struct { PbmCapabilityInstance []PbmCapabilityInstance `xml:"PbmCapabilityInstance,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityInstance", reflect.TypeOf((*ArrayOfPbmCapabilityInstance)(nil)).Elem()) } type ArrayOfPbmCapabilityMetadata struct { PbmCapabilityMetadata []PbmCapabilityMetadata `xml:"PbmCapabilityMetadata,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityMetadata", reflect.TypeOf((*ArrayOfPbmCapabilityMetadata)(nil)).Elem()) } type ArrayOfPbmCapabilityMetadataPerCategory struct { PbmCapabilityMetadataPerCategory []PbmCapabilityMetadataPerCategory `xml:"PbmCapabilityMetadataPerCategory,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityMetadataPerCategory", reflect.TypeOf((*ArrayOfPbmCapabilityMetadataPerCategory)(nil)).Elem()) } type ArrayOfPbmCapabilityPropertyInstance struct { PbmCapabilityPropertyInstance []PbmCapabilityPropertyInstance `xml:"PbmCapabilityPropertyInstance,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityPropertyInstance", reflect.TypeOf((*ArrayOfPbmCapabilityPropertyInstance)(nil)).Elem()) } type ArrayOfPbmCapabilityPropertyMetadata struct { PbmCapabilityPropertyMetadata []PbmCapabilityPropertyMetadata `xml:"PbmCapabilityPropertyMetadata,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityPropertyMetadata", reflect.TypeOf((*ArrayOfPbmCapabilityPropertyMetadata)(nil)).Elem()) } type ArrayOfPbmCapabilitySchema struct { PbmCapabilitySchema []PbmCapabilitySchema `xml:"PbmCapabilitySchema,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilitySchema", reflect.TypeOf((*ArrayOfPbmCapabilitySchema)(nil)).Elem()) } type ArrayOfPbmCapabilitySubProfile struct { PbmCapabilitySubProfile []PbmCapabilitySubProfile `xml:"PbmCapabilitySubProfile,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilitySubProfile", reflect.TypeOf((*ArrayOfPbmCapabilitySubProfile)(nil)).Elem()) } type ArrayOfPbmCapabilityVendorNamespaceInfo struct { PbmCapabilityVendorNamespaceInfo []PbmCapabilityVendorNamespaceInfo `xml:"PbmCapabilityVendorNamespaceInfo,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityVendorNamespaceInfo", reflect.TypeOf((*ArrayOfPbmCapabilityVendorNamespaceInfo)(nil)).Elem()) } type ArrayOfPbmCapabilityVendorResourceTypeInfo struct { PbmCapabilityVendorResourceTypeInfo []PbmCapabilityVendorResourceTypeInfo `xml:"PbmCapabilityVendorResourceTypeInfo,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCapabilityVendorResourceTypeInfo", reflect.TypeOf((*ArrayOfPbmCapabilityVendorResourceTypeInfo)(nil)).Elem()) } type ArrayOfPbmCompliancePolicyStatus struct { PbmCompliancePolicyStatus []PbmCompliancePolicyStatus `xml:"PbmCompliancePolicyStatus,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmCompliancePolicyStatus", reflect.TypeOf((*ArrayOfPbmCompliancePolicyStatus)(nil)).Elem()) } type ArrayOfPbmComplianceResult struct { PbmComplianceResult []PbmComplianceResult `xml:"PbmComplianceResult,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmComplianceResult", reflect.TypeOf((*ArrayOfPbmComplianceResult)(nil)).Elem()) } type ArrayOfPbmDatastoreSpaceStatistics struct { PbmDatastoreSpaceStatistics []PbmDatastoreSpaceStatistics `xml:"PbmDatastoreSpaceStatistics,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmDatastoreSpaceStatistics", reflect.TypeOf((*ArrayOfPbmDatastoreSpaceStatistics)(nil)).Elem()) } type ArrayOfPbmDefaultProfileInfo struct { PbmDefaultProfileInfo []PbmDefaultProfileInfo `xml:"PbmDefaultProfileInfo,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmDefaultProfileInfo", reflect.TypeOf((*ArrayOfPbmDefaultProfileInfo)(nil)).Elem()) } type ArrayOfPbmPlacementCompatibilityResult struct { PbmPlacementCompatibilityResult []PbmPlacementCompatibilityResult `xml:"PbmPlacementCompatibilityResult,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmPlacementCompatibilityResult", reflect.TypeOf((*ArrayOfPbmPlacementCompatibilityResult)(nil)).Elem()) } type ArrayOfPbmPlacementHub struct { PbmPlacementHub []PbmPlacementHub `xml:"PbmPlacementHub,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmPlacementHub", reflect.TypeOf((*ArrayOfPbmPlacementHub)(nil)).Elem()) } type ArrayOfPbmPlacementMatchingResources struct { PbmPlacementMatchingResources []BasePbmPlacementMatchingResources `xml:"PbmPlacementMatchingResources,omitempty,typeattr"` } func init() { types.Add("pbm:ArrayOfPbmPlacementMatchingResources", reflect.TypeOf((*ArrayOfPbmPlacementMatchingResources)(nil)).Elem()) } type ArrayOfPbmPlacementRequirement struct { PbmPlacementRequirement []BasePbmPlacementRequirement `xml:"PbmPlacementRequirement,omitempty,typeattr"` } func init() { types.Add("pbm:ArrayOfPbmPlacementRequirement", reflect.TypeOf((*ArrayOfPbmPlacementRequirement)(nil)).Elem()) } type ArrayOfPbmPlacementResourceUtilization struct { PbmPlacementResourceUtilization []PbmPlacementResourceUtilization `xml:"PbmPlacementResourceUtilization,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmPlacementResourceUtilization", reflect.TypeOf((*ArrayOfPbmPlacementResourceUtilization)(nil)).Elem()) } type ArrayOfPbmProfile struct { PbmProfile []BasePbmProfile `xml:"PbmProfile,omitempty,typeattr"` } func init() { types.Add("pbm:ArrayOfPbmProfile", reflect.TypeOf((*ArrayOfPbmProfile)(nil)).Elem()) } type ArrayOfPbmProfileId struct { PbmProfileId []PbmProfileId `xml:"PbmProfileId,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmProfileId", reflect.TypeOf((*ArrayOfPbmProfileId)(nil)).Elem()) } type ArrayOfPbmProfileOperationOutcome struct { PbmProfileOperationOutcome []PbmProfileOperationOutcome `xml:"PbmProfileOperationOutcome,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmProfileOperationOutcome", reflect.TypeOf((*ArrayOfPbmProfileOperationOutcome)(nil)).Elem()) } type ArrayOfPbmProfileResourceType struct { PbmProfileResourceType []PbmProfileResourceType `xml:"PbmProfileResourceType,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmProfileResourceType", reflect.TypeOf((*ArrayOfPbmProfileResourceType)(nil)).Elem()) } type ArrayOfPbmProfileType struct { PbmProfileType []PbmProfileType `xml:"PbmProfileType,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmProfileType", reflect.TypeOf((*ArrayOfPbmProfileType)(nil)).Elem()) } type ArrayOfPbmQueryProfileResult struct { PbmQueryProfileResult []PbmQueryProfileResult `xml:"PbmQueryProfileResult,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmQueryProfileResult", reflect.TypeOf((*ArrayOfPbmQueryProfileResult)(nil)).Elem()) } type ArrayOfPbmQueryReplicationGroupResult struct { PbmQueryReplicationGroupResult []PbmQueryReplicationGroupResult `xml:"PbmQueryReplicationGroupResult,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmQueryReplicationGroupResult", reflect.TypeOf((*ArrayOfPbmQueryReplicationGroupResult)(nil)).Elem()) } type ArrayOfPbmRollupComplianceResult struct { PbmRollupComplianceResult []PbmRollupComplianceResult `xml:"PbmRollupComplianceResult,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmRollupComplianceResult", reflect.TypeOf((*ArrayOfPbmRollupComplianceResult)(nil)).Elem()) } type ArrayOfPbmServerObjectRef struct { PbmServerObjectRef []PbmServerObjectRef `xml:"PbmServerObjectRef,omitempty"` } func init() { types.Add("pbm:ArrayOfPbmServerObjectRef", reflect.TypeOf((*ArrayOfPbmServerObjectRef)(nil)).Elem()) } type PbmAboutInfo struct { types.DynamicData Name string `xml:"name"` Version string `xml:"version"` InstanceUuid string `xml:"instanceUuid"` } func init() { types.Add("pbm:PbmAboutInfo", reflect.TypeOf((*PbmAboutInfo)(nil)).Elem()) } type PbmAlreadyExists struct { PbmFault Name string `xml:"name,omitempty"` } func init() { types.Add("pbm:PbmAlreadyExists", reflect.TypeOf((*PbmAlreadyExists)(nil)).Elem()) } type PbmAssignDefaultRequirementProfile PbmAssignDefaultRequirementProfileRequestType func init() { types.Add("pbm:PbmAssignDefaultRequirementProfile", reflect.TypeOf((*PbmAssignDefaultRequirementProfile)(nil)).Elem()) } type PbmAssignDefaultRequirementProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` Profile PbmProfileId `xml:"profile"` Datastores []PbmPlacementHub `xml:"datastores"` } func init() { types.Add("pbm:PbmAssignDefaultRequirementProfileRequestType", reflect.TypeOf((*PbmAssignDefaultRequirementProfileRequestType)(nil)).Elem()) } type PbmAssignDefaultRequirementProfileResponse struct { } type PbmCapabilityConstraintInstance struct { types.DynamicData PropertyInstance []PbmCapabilityPropertyInstance `xml:"propertyInstance"` } func init() { types.Add("pbm:PbmCapabilityConstraintInstance", reflect.TypeOf((*PbmCapabilityConstraintInstance)(nil)).Elem()) } type PbmCapabilityConstraints struct { types.DynamicData } func init() { types.Add("pbm:PbmCapabilityConstraints", reflect.TypeOf((*PbmCapabilityConstraints)(nil)).Elem()) } type PbmCapabilityDescription struct { types.DynamicData Description PbmExtendedElementDescription `xml:"description"` Value types.AnyType `xml:"value,typeattr"` } func init() { types.Add("pbm:PbmCapabilityDescription", reflect.TypeOf((*PbmCapabilityDescription)(nil)).Elem()) } type PbmCapabilityDiscreteSet struct { types.DynamicData Values []types.AnyType `xml:"values,typeattr"` } func init() { types.Add("pbm:PbmCapabilityDiscreteSet", reflect.TypeOf((*PbmCapabilityDiscreteSet)(nil)).Elem()) } type PbmCapabilityGenericTypeInfo struct { PbmCapabilityTypeInfo GenericTypeName string `xml:"genericTypeName"` } func init() { types.Add("pbm:PbmCapabilityGenericTypeInfo", reflect.TypeOf((*PbmCapabilityGenericTypeInfo)(nil)).Elem()) } type PbmCapabilityInstance struct { types.DynamicData Id PbmCapabilityMetadataUniqueId `xml:"id"` Constraint []PbmCapabilityConstraintInstance `xml:"constraint"` } func init() { types.Add("pbm:PbmCapabilityInstance", reflect.TypeOf((*PbmCapabilityInstance)(nil)).Elem()) } type PbmCapabilityMetadata struct { types.DynamicData Id PbmCapabilityMetadataUniqueId `xml:"id"` Summary PbmExtendedElementDescription `xml:"summary"` Mandatory *bool `xml:"mandatory"` Hint *bool `xml:"hint"` KeyId string `xml:"keyId,omitempty"` AllowMultipleConstraints *bool `xml:"allowMultipleConstraints"` PropertyMetadata []PbmCapabilityPropertyMetadata `xml:"propertyMetadata"` } func init() { types.Add("pbm:PbmCapabilityMetadata", reflect.TypeOf((*PbmCapabilityMetadata)(nil)).Elem()) } type PbmCapabilityMetadataPerCategory struct { types.DynamicData SubCategory string `xml:"subCategory"` CapabilityMetadata []PbmCapabilityMetadata `xml:"capabilityMetadata"` } func init() { types.Add("pbm:PbmCapabilityMetadataPerCategory", reflect.TypeOf((*PbmCapabilityMetadataPerCategory)(nil)).Elem()) } type PbmCapabilityMetadataUniqueId struct { types.DynamicData Namespace string `xml:"namespace"` Id string `xml:"id"` } func init() { types.Add("pbm:PbmCapabilityMetadataUniqueId", reflect.TypeOf((*PbmCapabilityMetadataUniqueId)(nil)).Elem()) } type PbmCapabilityNamespaceInfo struct { types.DynamicData Version string `xml:"version"` Namespace string `xml:"namespace"` Info *PbmExtendedElementDescription `xml:"info,omitempty"` } func init() { types.Add("pbm:PbmCapabilityNamespaceInfo", reflect.TypeOf((*PbmCapabilityNamespaceInfo)(nil)).Elem()) } type PbmCapabilityProfile struct { PbmProfile ProfileCategory string `xml:"profileCategory"` ResourceType PbmProfileResourceType `xml:"resourceType"` Constraints BasePbmCapabilityConstraints `xml:"constraints,typeattr"` GenerationId int64 `xml:"generationId,omitempty"` IsDefault bool `xml:"isDefault"` SystemCreatedProfileType string `xml:"systemCreatedProfileType,omitempty"` LineOfService string `xml:"lineOfService,omitempty"` } func init() { types.Add("pbm:PbmCapabilityProfile", reflect.TypeOf((*PbmCapabilityProfile)(nil)).Elem()) } type PbmCapabilityProfileCreateSpec struct { types.DynamicData Name string `xml:"name"` Description string `xml:"description,omitempty"` Category string `xml:"category,omitempty"` ResourceType PbmProfileResourceType `xml:"resourceType"` Constraints BasePbmCapabilityConstraints `xml:"constraints,typeattr"` } func init() { types.Add("pbm:PbmCapabilityProfileCreateSpec", reflect.TypeOf((*PbmCapabilityProfileCreateSpec)(nil)).Elem()) } type PbmCapabilityProfilePropertyMismatchFault struct { PbmPropertyMismatchFault ResourcePropertyInstance PbmCapabilityPropertyInstance `xml:"resourcePropertyInstance"` } func init() { types.Add("pbm:PbmCapabilityProfilePropertyMismatchFault", reflect.TypeOf((*PbmCapabilityProfilePropertyMismatchFault)(nil)).Elem()) } type PbmCapabilityProfilePropertyMismatchFaultFault BasePbmCapabilityProfilePropertyMismatchFault func init() { types.Add("pbm:PbmCapabilityProfilePropertyMismatchFaultFault", reflect.TypeOf((*PbmCapabilityProfilePropertyMismatchFaultFault)(nil)).Elem()) } type PbmCapabilityProfileUpdateSpec struct { types.DynamicData Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` Constraints BasePbmCapabilityConstraints `xml:"constraints,omitempty,typeattr"` } func init() { types.Add("pbm:PbmCapabilityProfileUpdateSpec", reflect.TypeOf((*PbmCapabilityProfileUpdateSpec)(nil)).Elem()) } type PbmCapabilityPropertyInstance struct { types.DynamicData Id string `xml:"id"` Operator string `xml:"operator,omitempty"` Value types.AnyType `xml:"value,typeattr"` } func init() { types.Add("pbm:PbmCapabilityPropertyInstance", reflect.TypeOf((*PbmCapabilityPropertyInstance)(nil)).Elem()) } type PbmCapabilityPropertyMetadata struct { types.DynamicData Id string `xml:"id"` Summary PbmExtendedElementDescription `xml:"summary"` Mandatory bool `xml:"mandatory"` Type BasePbmCapabilityTypeInfo `xml:"type,omitempty,typeattr"` DefaultValue types.AnyType `xml:"defaultValue,omitempty,typeattr"` AllowedValue types.AnyType `xml:"allowedValue,omitempty,typeattr"` RequirementsTypeHint string `xml:"requirementsTypeHint,omitempty"` } func init() { types.Add("pbm:PbmCapabilityPropertyMetadata", reflect.TypeOf((*PbmCapabilityPropertyMetadata)(nil)).Elem()) } type PbmCapabilityRange struct { types.DynamicData Min types.AnyType `xml:"min,typeattr"` Max types.AnyType `xml:"max,typeattr"` } func init() { types.Add("pbm:PbmCapabilityRange", reflect.TypeOf((*PbmCapabilityRange)(nil)).Elem()) } type PbmCapabilitySchema struct { types.DynamicData VendorInfo PbmCapabilitySchemaVendorInfo `xml:"vendorInfo"` NamespaceInfo PbmCapabilityNamespaceInfo `xml:"namespaceInfo"` LineOfService BasePbmLineOfServiceInfo `xml:"lineOfService,omitempty,typeattr"` CapabilityMetadataPerCategory []PbmCapabilityMetadataPerCategory `xml:"capabilityMetadataPerCategory"` } func init() { types.Add("pbm:PbmCapabilitySchema", reflect.TypeOf((*PbmCapabilitySchema)(nil)).Elem()) } type PbmCapabilitySchemaVendorInfo struct { types.DynamicData VendorUuid string `xml:"vendorUuid"` Info PbmExtendedElementDescription `xml:"info"` } func init() { types.Add("pbm:PbmCapabilitySchemaVendorInfo", reflect.TypeOf((*PbmCapabilitySchemaVendorInfo)(nil)).Elem()) } type PbmCapabilitySubProfile struct { types.DynamicData Name string `xml:"name"` Capability []PbmCapabilityInstance `xml:"capability"` ForceProvision *bool `xml:"forceProvision"` } func init() { types.Add("pbm:PbmCapabilitySubProfile", reflect.TypeOf((*PbmCapabilitySubProfile)(nil)).Elem()) } type PbmCapabilitySubProfileConstraints struct { PbmCapabilityConstraints SubProfiles []PbmCapabilitySubProfile `xml:"subProfiles"` } func init() { types.Add("pbm:PbmCapabilitySubProfileConstraints", reflect.TypeOf((*PbmCapabilitySubProfileConstraints)(nil)).Elem()) } type PbmCapabilityTimeSpan struct { types.DynamicData Value int32 `xml:"value"` Unit string `xml:"unit"` } func init() { types.Add("pbm:PbmCapabilityTimeSpan", reflect.TypeOf((*PbmCapabilityTimeSpan)(nil)).Elem()) } type PbmCapabilityTypeInfo struct { types.DynamicData TypeName string `xml:"typeName"` } func init() { types.Add("pbm:PbmCapabilityTypeInfo", reflect.TypeOf((*PbmCapabilityTypeInfo)(nil)).Elem()) } type PbmCapabilityVendorNamespaceInfo struct { types.DynamicData VendorInfo PbmCapabilitySchemaVendorInfo `xml:"vendorInfo"` NamespaceInfo PbmCapabilityNamespaceInfo `xml:"namespaceInfo"` } func init() { types.Add("pbm:PbmCapabilityVendorNamespaceInfo", reflect.TypeOf((*PbmCapabilityVendorNamespaceInfo)(nil)).Elem()) } type PbmCapabilityVendorResourceTypeInfo struct { types.DynamicData ResourceType string `xml:"resourceType"` VendorNamespaceInfo []PbmCapabilityVendorNamespaceInfo `xml:"vendorNamespaceInfo"` } func init() { types.Add("pbm:PbmCapabilityVendorResourceTypeInfo", reflect.TypeOf((*PbmCapabilityVendorResourceTypeInfo)(nil)).Elem()) } type PbmCheckCompatibility PbmCheckCompatibilityRequestType func init() { types.Add("pbm:PbmCheckCompatibility", reflect.TypeOf((*PbmCheckCompatibility)(nil)).Elem()) } type PbmCheckCompatibilityRequestType struct { This types.ManagedObjectReference `xml:"_this"` HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` Profile PbmProfileId `xml:"profile"` } func init() { types.Add("pbm:PbmCheckCompatibilityRequestType", reflect.TypeOf((*PbmCheckCompatibilityRequestType)(nil)).Elem()) } type PbmCheckCompatibilityResponse struct { Returnval []PbmPlacementCompatibilityResult `xml:"returnval,omitempty"` } type PbmCheckCompatibilityWithSpec PbmCheckCompatibilityWithSpecRequestType func init() { types.Add("pbm:PbmCheckCompatibilityWithSpec", reflect.TypeOf((*PbmCheckCompatibilityWithSpec)(nil)).Elem()) } type PbmCheckCompatibilityWithSpecRequestType struct { This types.ManagedObjectReference `xml:"_this"` HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` ProfileSpec PbmCapabilityProfileCreateSpec `xml:"profileSpec"` } func init() { types.Add("pbm:PbmCheckCompatibilityWithSpecRequestType", reflect.TypeOf((*PbmCheckCompatibilityWithSpecRequestType)(nil)).Elem()) } type PbmCheckCompatibilityWithSpecResponse struct { Returnval []PbmPlacementCompatibilityResult `xml:"returnval,omitempty"` } type PbmCheckCompliance PbmCheckComplianceRequestType func init() { types.Add("pbm:PbmCheckCompliance", reflect.TypeOf((*PbmCheckCompliance)(nil)).Elem()) } type PbmCheckComplianceRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entities []PbmServerObjectRef `xml:"entities"` Profile *PbmProfileId `xml:"profile,omitempty"` } func init() { types.Add("pbm:PbmCheckComplianceRequestType", reflect.TypeOf((*PbmCheckComplianceRequestType)(nil)).Elem()) } type PbmCheckComplianceResponse struct { Returnval []PbmComplianceResult `xml:"returnval,omitempty"` } type PbmCheckRequirements PbmCheckRequirementsRequestType func init() { types.Add("pbm:PbmCheckRequirements", reflect.TypeOf((*PbmCheckRequirements)(nil)).Elem()) } type PbmCheckRequirementsRequestType struct { This types.ManagedObjectReference `xml:"_this"` HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` PlacementSubjectRef *PbmServerObjectRef `xml:"placementSubjectRef,omitempty"` PlacementSubjectRequirement []BasePbmPlacementRequirement `xml:"placementSubjectRequirement,omitempty,typeattr"` } func init() { types.Add("pbm:PbmCheckRequirementsRequestType", reflect.TypeOf((*PbmCheckRequirementsRequestType)(nil)).Elem()) } type PbmCheckRequirementsResponse struct { Returnval []PbmPlacementCompatibilityResult `xml:"returnval,omitempty"` } type PbmCheckRollupCompliance PbmCheckRollupComplianceRequestType func init() { types.Add("pbm:PbmCheckRollupCompliance", reflect.TypeOf((*PbmCheckRollupCompliance)(nil)).Elem()) } type PbmCheckRollupComplianceRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entity []PbmServerObjectRef `xml:"entity"` } func init() { types.Add("pbm:PbmCheckRollupComplianceRequestType", reflect.TypeOf((*PbmCheckRollupComplianceRequestType)(nil)).Elem()) } type PbmCheckRollupComplianceResponse struct { Returnval []PbmRollupComplianceResult `xml:"returnval,omitempty"` } type PbmCompatibilityCheckFault struct { PbmFault Hub PbmPlacementHub `xml:"hub"` } func init() { types.Add("pbm:PbmCompatibilityCheckFault", reflect.TypeOf((*PbmCompatibilityCheckFault)(nil)).Elem()) } type PbmCompatibilityCheckFaultFault BasePbmCompatibilityCheckFault func init() { types.Add("pbm:PbmCompatibilityCheckFaultFault", reflect.TypeOf((*PbmCompatibilityCheckFaultFault)(nil)).Elem()) } type PbmComplianceOperationalStatus struct { types.DynamicData Healthy *bool `xml:"healthy"` OperationETA *time.Time `xml:"operationETA"` OperationProgress int64 `xml:"operationProgress,omitempty"` Transitional *bool `xml:"transitional"` } func init() { types.Add("pbm:PbmComplianceOperationalStatus", reflect.TypeOf((*PbmComplianceOperationalStatus)(nil)).Elem()) } type PbmCompliancePolicyStatus struct { types.DynamicData ExpectedValue PbmCapabilityInstance `xml:"expectedValue"` CurrentValue *PbmCapabilityInstance `xml:"currentValue,omitempty"` } func init() { types.Add("pbm:PbmCompliancePolicyStatus", reflect.TypeOf((*PbmCompliancePolicyStatus)(nil)).Elem()) } type PbmComplianceResult struct { types.DynamicData CheckTime time.Time `xml:"checkTime"` Entity PbmServerObjectRef `xml:"entity"` Profile *PbmProfileId `xml:"profile,omitempty"` ComplianceTaskStatus string `xml:"complianceTaskStatus,omitempty"` ComplianceStatus string `xml:"complianceStatus"` Mismatch bool `xml:"mismatch"` ViolatedPolicies []PbmCompliancePolicyStatus `xml:"violatedPolicies,omitempty"` ErrorCause []types.LocalizedMethodFault `xml:"errorCause,omitempty"` OperationalStatus *PbmComplianceOperationalStatus `xml:"operationalStatus,omitempty"` Info *PbmExtendedElementDescription `xml:"info,omitempty"` } func init() { types.Add("pbm:PbmComplianceResult", reflect.TypeOf((*PbmComplianceResult)(nil)).Elem()) } type PbmCreate PbmCreateRequestType func init() { types.Add("pbm:PbmCreate", reflect.TypeOf((*PbmCreate)(nil)).Elem()) } type PbmCreateRequestType struct { This types.ManagedObjectReference `xml:"_this"` CreateSpec PbmCapabilityProfileCreateSpec `xml:"createSpec"` } func init() { types.Add("pbm:PbmCreateRequestType", reflect.TypeOf((*PbmCreateRequestType)(nil)).Elem()) } type PbmCreateResponse struct { Returnval PbmProfileId `xml:"returnval"` } type PbmDataServiceToPoliciesMap struct { types.DynamicData DataServicePolicy PbmProfileId `xml:"dataServicePolicy"` ParentStoragePolicies []PbmProfileId `xml:"parentStoragePolicies,omitempty"` Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` } func init() { types.Add("pbm:PbmDataServiceToPoliciesMap", reflect.TypeOf((*PbmDataServiceToPoliciesMap)(nil)).Elem()) } type PbmDatastoreSpaceStatistics struct { types.DynamicData ProfileId string `xml:"profileId,omitempty"` PhysicalTotalInMB int64 `xml:"physicalTotalInMB"` PhysicalFreeInMB int64 `xml:"physicalFreeInMB"` PhysicalUsedInMB int64 `xml:"physicalUsedInMB"` LogicalLimitInMB int64 `xml:"logicalLimitInMB,omitempty"` LogicalFreeInMB int64 `xml:"logicalFreeInMB"` LogicalUsedInMB int64 `xml:"logicalUsedInMB"` } func init() { types.Add("pbm:PbmDatastoreSpaceStatistics", reflect.TypeOf((*PbmDatastoreSpaceStatistics)(nil)).Elem()) } type PbmDefaultCapabilityProfile struct { PbmCapabilityProfile VvolType []string `xml:"vvolType"` ContainerId string `xml:"containerId"` } func init() { types.Add("pbm:PbmDefaultCapabilityProfile", reflect.TypeOf((*PbmDefaultCapabilityProfile)(nil)).Elem()) } type PbmDefaultProfileAppliesFault struct { PbmCompatibilityCheckFault } func init() { types.Add("pbm:PbmDefaultProfileAppliesFault", reflect.TypeOf((*PbmDefaultProfileAppliesFault)(nil)).Elem()) } type PbmDefaultProfileAppliesFaultFault PbmDefaultProfileAppliesFault func init() { types.Add("pbm:PbmDefaultProfileAppliesFaultFault", reflect.TypeOf((*PbmDefaultProfileAppliesFaultFault)(nil)).Elem()) } type PbmDefaultProfileInfo struct { types.DynamicData Datastores []PbmPlacementHub `xml:"datastores"` DefaultProfile BasePbmProfile `xml:"defaultProfile,omitempty,typeattr"` } func init() { types.Add("pbm:PbmDefaultProfileInfo", reflect.TypeOf((*PbmDefaultProfileInfo)(nil)).Elem()) } type PbmDelete PbmDeleteRequestType func init() { types.Add("pbm:PbmDelete", reflect.TypeOf((*PbmDelete)(nil)).Elem()) } type PbmDeleteRequestType struct { This types.ManagedObjectReference `xml:"_this"` ProfileId []PbmProfileId `xml:"profileId"` } func init() { types.Add("pbm:PbmDeleteRequestType", reflect.TypeOf((*PbmDeleteRequestType)(nil)).Elem()) } type PbmDeleteResponse struct { Returnval []PbmProfileOperationOutcome `xml:"returnval,omitempty"` } type PbmDuplicateName struct { PbmFault Name string `xml:"name"` } func init() { types.Add("pbm:PbmDuplicateName", reflect.TypeOf((*PbmDuplicateName)(nil)).Elem()) } type PbmDuplicateNameFault PbmDuplicateName func init() { types.Add("pbm:PbmDuplicateNameFault", reflect.TypeOf((*PbmDuplicateNameFault)(nil)).Elem()) } type PbmExtendedElementDescription struct { types.DynamicData Label string `xml:"label"` Summary string `xml:"summary"` Key string `xml:"key"` MessageCatalogKeyPrefix string `xml:"messageCatalogKeyPrefix"` MessageArg []types.KeyAnyValue `xml:"messageArg,omitempty"` } func init() { types.Add("pbm:PbmExtendedElementDescription", reflect.TypeOf((*PbmExtendedElementDescription)(nil)).Elem()) } type PbmFault struct { types.MethodFault } func init() { types.Add("pbm:PbmFault", reflect.TypeOf((*PbmFault)(nil)).Elem()) } type PbmFaultFault BasePbmFault func init() { types.Add("pbm:PbmFaultFault", reflect.TypeOf((*PbmFaultFault)(nil)).Elem()) } type PbmFaultInvalidLogin struct { PbmFault } func init() { types.Add("pbm:PbmFaultInvalidLogin", reflect.TypeOf((*PbmFaultInvalidLogin)(nil)).Elem()) } type PbmFaultInvalidLoginFault PbmFaultInvalidLogin func init() { types.Add("pbm:PbmFaultInvalidLoginFault", reflect.TypeOf((*PbmFaultInvalidLoginFault)(nil)).Elem()) } type PbmFaultNotFound struct { PbmFault } func init() { types.Add("pbm:PbmFaultNotFound", reflect.TypeOf((*PbmFaultNotFound)(nil)).Elem()) } type PbmFaultNotFoundFault PbmFaultNotFound func init() { types.Add("pbm:PbmFaultNotFoundFault", reflect.TypeOf((*PbmFaultNotFoundFault)(nil)).Elem()) } type PbmFaultProfileStorageFault struct { PbmFault } func init() { types.Add("pbm:PbmFaultProfileStorageFault", reflect.TypeOf((*PbmFaultProfileStorageFault)(nil)).Elem()) } type PbmFaultProfileStorageFaultFault PbmFaultProfileStorageFault func init() { types.Add("pbm:PbmFaultProfileStorageFaultFault", reflect.TypeOf((*PbmFaultProfileStorageFaultFault)(nil)).Elem()) } type PbmFetchCapabilityMetadata PbmFetchCapabilityMetadataRequestType func init() { types.Add("pbm:PbmFetchCapabilityMetadata", reflect.TypeOf((*PbmFetchCapabilityMetadata)(nil)).Elem()) } type PbmFetchCapabilityMetadataRequestType struct { This types.ManagedObjectReference `xml:"_this"` ResourceType *PbmProfileResourceType `xml:"resourceType,omitempty"` VendorUuid string `xml:"vendorUuid,omitempty"` } func init() { types.Add("pbm:PbmFetchCapabilityMetadataRequestType", reflect.TypeOf((*PbmFetchCapabilityMetadataRequestType)(nil)).Elem()) } type PbmFetchCapabilityMetadataResponse struct { Returnval []PbmCapabilityMetadataPerCategory `xml:"returnval,omitempty"` } type PbmFetchCapabilitySchema PbmFetchCapabilitySchemaRequestType func init() { types.Add("pbm:PbmFetchCapabilitySchema", reflect.TypeOf((*PbmFetchCapabilitySchema)(nil)).Elem()) } type PbmFetchCapabilitySchemaRequestType struct { This types.ManagedObjectReference `xml:"_this"` VendorUuid string `xml:"vendorUuid,omitempty"` LineOfService []string `xml:"lineOfService,omitempty"` } func init() { types.Add("pbm:PbmFetchCapabilitySchemaRequestType", reflect.TypeOf((*PbmFetchCapabilitySchemaRequestType)(nil)).Elem()) } type PbmFetchCapabilitySchemaResponse struct { Returnval []PbmCapabilitySchema `xml:"returnval,omitempty"` } type PbmFetchComplianceResult PbmFetchComplianceResultRequestType func init() { types.Add("pbm:PbmFetchComplianceResult", reflect.TypeOf((*PbmFetchComplianceResult)(nil)).Elem()) } type PbmFetchComplianceResultRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entities []PbmServerObjectRef `xml:"entities"` Profile *PbmProfileId `xml:"profile,omitempty"` } func init() { types.Add("pbm:PbmFetchComplianceResultRequestType", reflect.TypeOf((*PbmFetchComplianceResultRequestType)(nil)).Elem()) } type PbmFetchComplianceResultResponse struct { Returnval []PbmComplianceResult `xml:"returnval,omitempty"` } type PbmFetchResourceType PbmFetchResourceTypeRequestType func init() { types.Add("pbm:PbmFetchResourceType", reflect.TypeOf((*PbmFetchResourceType)(nil)).Elem()) } type PbmFetchResourceTypeRequestType struct { This types.ManagedObjectReference `xml:"_this"` } func init() { types.Add("pbm:PbmFetchResourceTypeRequestType", reflect.TypeOf((*PbmFetchResourceTypeRequestType)(nil)).Elem()) } type PbmFetchResourceTypeResponse struct { Returnval []PbmProfileResourceType `xml:"returnval,omitempty"` } type PbmFetchRollupComplianceResult PbmFetchRollupComplianceResultRequestType func init() { types.Add("pbm:PbmFetchRollupComplianceResult", reflect.TypeOf((*PbmFetchRollupComplianceResult)(nil)).Elem()) } type PbmFetchRollupComplianceResultRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entity []PbmServerObjectRef `xml:"entity"` } func init() { types.Add("pbm:PbmFetchRollupComplianceResultRequestType", reflect.TypeOf((*PbmFetchRollupComplianceResultRequestType)(nil)).Elem()) } type PbmFetchRollupComplianceResultResponse struct { Returnval []PbmRollupComplianceResult `xml:"returnval,omitempty"` } type PbmFetchVendorInfo PbmFetchVendorInfoRequestType func init() { types.Add("pbm:PbmFetchVendorInfo", reflect.TypeOf((*PbmFetchVendorInfo)(nil)).Elem()) } type PbmFetchVendorInfoRequestType struct { This types.ManagedObjectReference `xml:"_this"` ResourceType *PbmProfileResourceType `xml:"resourceType,omitempty"` } func init() { types.Add("pbm:PbmFetchVendorInfoRequestType", reflect.TypeOf((*PbmFetchVendorInfoRequestType)(nil)).Elem()) } type PbmFetchVendorInfoResponse struct { Returnval []PbmCapabilityVendorResourceTypeInfo `xml:"returnval,omitempty"` } type PbmFindApplicableDefaultProfile PbmFindApplicableDefaultProfileRequestType func init() { types.Add("pbm:PbmFindApplicableDefaultProfile", reflect.TypeOf((*PbmFindApplicableDefaultProfile)(nil)).Elem()) } type PbmFindApplicableDefaultProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` Datastores []PbmPlacementHub `xml:"datastores"` } func init() { types.Add("pbm:PbmFindApplicableDefaultProfileRequestType", reflect.TypeOf((*PbmFindApplicableDefaultProfileRequestType)(nil)).Elem()) } type PbmFindApplicableDefaultProfileResponse struct { Returnval []BasePbmProfile `xml:"returnval,omitempty,typeattr"` } type PbmIncompatibleVendorSpecificRuleSet struct { PbmCapabilityProfilePropertyMismatchFault } func init() { types.Add("pbm:PbmIncompatibleVendorSpecificRuleSet", reflect.TypeOf((*PbmIncompatibleVendorSpecificRuleSet)(nil)).Elem()) } type PbmIncompatibleVendorSpecificRuleSetFault PbmIncompatibleVendorSpecificRuleSet func init() { types.Add("pbm:PbmIncompatibleVendorSpecificRuleSetFault", reflect.TypeOf((*PbmIncompatibleVendorSpecificRuleSetFault)(nil)).Elem()) } type PbmLegacyHubsNotSupported struct { PbmFault Hubs []PbmPlacementHub `xml:"hubs"` } func init() { types.Add("pbm:PbmLegacyHubsNotSupported", reflect.TypeOf((*PbmLegacyHubsNotSupported)(nil)).Elem()) } type PbmLegacyHubsNotSupportedFault PbmLegacyHubsNotSupported func init() { types.Add("pbm:PbmLegacyHubsNotSupportedFault", reflect.TypeOf((*PbmLegacyHubsNotSupportedFault)(nil)).Elem()) } type PbmLineOfServiceInfo struct { types.DynamicData LineOfService string `xml:"lineOfService"` Name PbmExtendedElementDescription `xml:"name"` Description *PbmExtendedElementDescription `xml:"description,omitempty"` } func init() { types.Add("pbm:PbmLineOfServiceInfo", reflect.TypeOf((*PbmLineOfServiceInfo)(nil)).Elem()) } type PbmNonExistentHubs struct { PbmFault Hubs []PbmPlacementHub `xml:"hubs"` } func init() { types.Add("pbm:PbmNonExistentHubs", reflect.TypeOf((*PbmNonExistentHubs)(nil)).Elem()) } type PbmNonExistentHubsFault PbmNonExistentHubs func init() { types.Add("pbm:PbmNonExistentHubsFault", reflect.TypeOf((*PbmNonExistentHubsFault)(nil)).Elem()) } type PbmPersistenceBasedDataServiceInfo struct { PbmLineOfServiceInfo CompatiblePersistenceSchemaNamespace []string `xml:"compatiblePersistenceSchemaNamespace,omitempty"` } func init() { types.Add("pbm:PbmPersistenceBasedDataServiceInfo", reflect.TypeOf((*PbmPersistenceBasedDataServiceInfo)(nil)).Elem()) } type PbmPlacementCapabilityConstraintsRequirement struct { PbmPlacementRequirement Constraints BasePbmCapabilityConstraints `xml:"constraints,typeattr"` } func init() { types.Add("pbm:PbmPlacementCapabilityConstraintsRequirement", reflect.TypeOf((*PbmPlacementCapabilityConstraintsRequirement)(nil)).Elem()) } type PbmPlacementCapabilityProfileRequirement struct { PbmPlacementRequirement ProfileId PbmProfileId `xml:"profileId"` } func init() { types.Add("pbm:PbmPlacementCapabilityProfileRequirement", reflect.TypeOf((*PbmPlacementCapabilityProfileRequirement)(nil)).Elem()) } type PbmPlacementCompatibilityResult struct { types.DynamicData Hub PbmPlacementHub `xml:"hub"` MatchingResources []BasePbmPlacementMatchingResources `xml:"matchingResources,omitempty,typeattr"` HowMany int64 `xml:"howMany,omitempty"` Utilization []PbmPlacementResourceUtilization `xml:"utilization,omitempty"` Warning []types.LocalizedMethodFault `xml:"warning,omitempty"` Error []types.LocalizedMethodFault `xml:"error,omitempty"` } func init() { types.Add("pbm:PbmPlacementCompatibilityResult", reflect.TypeOf((*PbmPlacementCompatibilityResult)(nil)).Elem()) } type PbmPlacementHub struct { types.DynamicData HubType string `xml:"hubType"` HubId string `xml:"hubId"` } func init() { types.Add("pbm:PbmPlacementHub", reflect.TypeOf((*PbmPlacementHub)(nil)).Elem()) } type PbmPlacementMatchingReplicationResources struct { PbmPlacementMatchingResources ReplicationGroup []types.ReplicationGroupId `xml:"replicationGroup,omitempty"` } func init() { types.Add("pbm:PbmPlacementMatchingReplicationResources", reflect.TypeOf((*PbmPlacementMatchingReplicationResources)(nil)).Elem()) } type PbmPlacementMatchingResources struct { types.DynamicData } func init() { types.Add("pbm:PbmPlacementMatchingResources", reflect.TypeOf((*PbmPlacementMatchingResources)(nil)).Elem()) } type PbmPlacementRequirement struct { types.DynamicData } func init() { types.Add("pbm:PbmPlacementRequirement", reflect.TypeOf((*PbmPlacementRequirement)(nil)).Elem()) } type PbmPlacementResourceUtilization struct { types.DynamicData Name PbmExtendedElementDescription `xml:"name"` Description PbmExtendedElementDescription `xml:"description"` AvailableBefore int64 `xml:"availableBefore,omitempty"` AvailableAfter int64 `xml:"availableAfter,omitempty"` Total int64 `xml:"total,omitempty"` } func init() { types.Add("pbm:PbmPlacementResourceUtilization", reflect.TypeOf((*PbmPlacementResourceUtilization)(nil)).Elem()) } type PbmProfile struct { types.DynamicData ProfileId PbmProfileId `xml:"profileId"` Name string `xml:"name"` Description string `xml:"description,omitempty"` CreationTime time.Time `xml:"creationTime"` CreatedBy string `xml:"createdBy"` LastUpdatedTime time.Time `xml:"lastUpdatedTime"` LastUpdatedBy string `xml:"lastUpdatedBy"` } func init() { types.Add("pbm:PbmProfile", reflect.TypeOf((*PbmProfile)(nil)).Elem()) } type PbmProfileId struct { types.DynamicData UniqueId string `xml:"uniqueId"` } func init() { types.Add("pbm:PbmProfileId", reflect.TypeOf((*PbmProfileId)(nil)).Elem()) } type PbmProfileOperationOutcome struct { types.DynamicData ProfileId PbmProfileId `xml:"profileId"` Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` } func init() { types.Add("pbm:PbmProfileOperationOutcome", reflect.TypeOf((*PbmProfileOperationOutcome)(nil)).Elem()) } type PbmProfileResourceType struct { types.DynamicData ResourceType string `xml:"resourceType"` } func init() { types.Add("pbm:PbmProfileResourceType", reflect.TypeOf((*PbmProfileResourceType)(nil)).Elem()) } type PbmProfileType struct { types.DynamicData UniqueId string `xml:"uniqueId"` } func init() { types.Add("pbm:PbmProfileType", reflect.TypeOf((*PbmProfileType)(nil)).Elem()) } type PbmPropertyMismatchFault struct { PbmCompatibilityCheckFault CapabilityInstanceId PbmCapabilityMetadataUniqueId `xml:"capabilityInstanceId"` RequirementPropertyInstance PbmCapabilityPropertyInstance `xml:"requirementPropertyInstance"` } func init() { types.Add("pbm:PbmPropertyMismatchFault", reflect.TypeOf((*PbmPropertyMismatchFault)(nil)).Elem()) } type PbmPropertyMismatchFaultFault BasePbmPropertyMismatchFault func init() { types.Add("pbm:PbmPropertyMismatchFaultFault", reflect.TypeOf((*PbmPropertyMismatchFaultFault)(nil)).Elem()) } type PbmQueryAssociatedEntities PbmQueryAssociatedEntitiesRequestType func init() { types.Add("pbm:PbmQueryAssociatedEntities", reflect.TypeOf((*PbmQueryAssociatedEntities)(nil)).Elem()) } type PbmQueryAssociatedEntitiesRequestType struct { This types.ManagedObjectReference `xml:"_this"` Profiles []PbmProfileId `xml:"profiles,omitempty"` } func init() { types.Add("pbm:PbmQueryAssociatedEntitiesRequestType", reflect.TypeOf((*PbmQueryAssociatedEntitiesRequestType)(nil)).Elem()) } type PbmQueryAssociatedEntitiesResponse struct { Returnval []PbmQueryProfileResult `xml:"returnval,omitempty"` } type PbmQueryAssociatedEntity PbmQueryAssociatedEntityRequestType func init() { types.Add("pbm:PbmQueryAssociatedEntity", reflect.TypeOf((*PbmQueryAssociatedEntity)(nil)).Elem()) } type PbmQueryAssociatedEntityRequestType struct { This types.ManagedObjectReference `xml:"_this"` Profile PbmProfileId `xml:"profile"` EntityType string `xml:"entityType,omitempty"` } func init() { types.Add("pbm:PbmQueryAssociatedEntityRequestType", reflect.TypeOf((*PbmQueryAssociatedEntityRequestType)(nil)).Elem()) } type PbmQueryAssociatedEntityResponse struct { Returnval []PbmServerObjectRef `xml:"returnval,omitempty"` } type PbmQueryAssociatedProfile PbmQueryAssociatedProfileRequestType func init() { types.Add("pbm:PbmQueryAssociatedProfile", reflect.TypeOf((*PbmQueryAssociatedProfile)(nil)).Elem()) } type PbmQueryAssociatedProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entity PbmServerObjectRef `xml:"entity"` } func init() { types.Add("pbm:PbmQueryAssociatedProfileRequestType", reflect.TypeOf((*PbmQueryAssociatedProfileRequestType)(nil)).Elem()) } type PbmQueryAssociatedProfileResponse struct { Returnval []PbmProfileId `xml:"returnval,omitempty"` } type PbmQueryAssociatedProfiles PbmQueryAssociatedProfilesRequestType func init() { types.Add("pbm:PbmQueryAssociatedProfiles", reflect.TypeOf((*PbmQueryAssociatedProfiles)(nil)).Elem()) } type PbmQueryAssociatedProfilesRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entities []PbmServerObjectRef `xml:"entities"` } func init() { types.Add("pbm:PbmQueryAssociatedProfilesRequestType", reflect.TypeOf((*PbmQueryAssociatedProfilesRequestType)(nil)).Elem()) } type PbmQueryAssociatedProfilesResponse struct { Returnval []PbmQueryProfileResult `xml:"returnval,omitempty"` } type PbmQueryByRollupComplianceStatus PbmQueryByRollupComplianceStatusRequestType func init() { types.Add("pbm:PbmQueryByRollupComplianceStatus", reflect.TypeOf((*PbmQueryByRollupComplianceStatus)(nil)).Elem()) } type PbmQueryByRollupComplianceStatusRequestType struct { This types.ManagedObjectReference `xml:"_this"` Status string `xml:"status"` } func init() { types.Add("pbm:PbmQueryByRollupComplianceStatusRequestType", reflect.TypeOf((*PbmQueryByRollupComplianceStatusRequestType)(nil)).Elem()) } type PbmQueryByRollupComplianceStatusResponse struct { Returnval []PbmServerObjectRef `xml:"returnval,omitempty"` } type PbmQueryDefaultRequirementProfile PbmQueryDefaultRequirementProfileRequestType func init() { types.Add("pbm:PbmQueryDefaultRequirementProfile", reflect.TypeOf((*PbmQueryDefaultRequirementProfile)(nil)).Elem()) } type PbmQueryDefaultRequirementProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` Hub PbmPlacementHub `xml:"hub"` } func init() { types.Add("pbm:PbmQueryDefaultRequirementProfileRequestType", reflect.TypeOf((*PbmQueryDefaultRequirementProfileRequestType)(nil)).Elem()) } type PbmQueryDefaultRequirementProfileResponse struct { Returnval *PbmProfileId `xml:"returnval,omitempty"` } type PbmQueryDefaultRequirementProfiles PbmQueryDefaultRequirementProfilesRequestType func init() { types.Add("pbm:PbmQueryDefaultRequirementProfiles", reflect.TypeOf((*PbmQueryDefaultRequirementProfiles)(nil)).Elem()) } type PbmQueryDefaultRequirementProfilesRequestType struct { This types.ManagedObjectReference `xml:"_this"` Datastores []PbmPlacementHub `xml:"datastores"` } func init() { types.Add("pbm:PbmQueryDefaultRequirementProfilesRequestType", reflect.TypeOf((*PbmQueryDefaultRequirementProfilesRequestType)(nil)).Elem()) } type PbmQueryDefaultRequirementProfilesResponse struct { Returnval []PbmDefaultProfileInfo `xml:"returnval"` } type PbmQueryMatchingHub PbmQueryMatchingHubRequestType func init() { types.Add("pbm:PbmQueryMatchingHub", reflect.TypeOf((*PbmQueryMatchingHub)(nil)).Elem()) } type PbmQueryMatchingHubRequestType struct { This types.ManagedObjectReference `xml:"_this"` HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` Profile PbmProfileId `xml:"profile"` } func init() { types.Add("pbm:PbmQueryMatchingHubRequestType", reflect.TypeOf((*PbmQueryMatchingHubRequestType)(nil)).Elem()) } type PbmQueryMatchingHubResponse struct { Returnval []PbmPlacementHub `xml:"returnval,omitempty"` } type PbmQueryMatchingHubWithSpec PbmQueryMatchingHubWithSpecRequestType func init() { types.Add("pbm:PbmQueryMatchingHubWithSpec", reflect.TypeOf((*PbmQueryMatchingHubWithSpec)(nil)).Elem()) } type PbmQueryMatchingHubWithSpecRequestType struct { This types.ManagedObjectReference `xml:"_this"` HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` CreateSpec PbmCapabilityProfileCreateSpec `xml:"createSpec"` } func init() { types.Add("pbm:PbmQueryMatchingHubWithSpecRequestType", reflect.TypeOf((*PbmQueryMatchingHubWithSpecRequestType)(nil)).Elem()) } type PbmQueryMatchingHubWithSpecResponse struct { Returnval []PbmPlacementHub `xml:"returnval,omitempty"` } type PbmQueryProfile PbmQueryProfileRequestType func init() { types.Add("pbm:PbmQueryProfile", reflect.TypeOf((*PbmQueryProfile)(nil)).Elem()) } type PbmQueryProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` ResourceType PbmProfileResourceType `xml:"resourceType"` ProfileCategory string `xml:"profileCategory,omitempty"` } func init() { types.Add("pbm:PbmQueryProfileRequestType", reflect.TypeOf((*PbmQueryProfileRequestType)(nil)).Elem()) } type PbmQueryProfileResponse struct { Returnval []PbmProfileId `xml:"returnval,omitempty"` } type PbmQueryProfileResult struct { types.DynamicData Object PbmServerObjectRef `xml:"object"` ProfileId []PbmProfileId `xml:"profileId,omitempty"` Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` } func init() { types.Add("pbm:PbmQueryProfileResult", reflect.TypeOf((*PbmQueryProfileResult)(nil)).Elem()) } type PbmQueryReplicationGroupResult struct { types.DynamicData Object PbmServerObjectRef `xml:"object"` ReplicationGroupId *types.ReplicationGroupId `xml:"replicationGroupId,omitempty"` Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` } func init() { types.Add("pbm:PbmQueryReplicationGroupResult", reflect.TypeOf((*PbmQueryReplicationGroupResult)(nil)).Elem()) } type PbmQueryReplicationGroups PbmQueryReplicationGroupsRequestType func init() { types.Add("pbm:PbmQueryReplicationGroups", reflect.TypeOf((*PbmQueryReplicationGroups)(nil)).Elem()) } type PbmQueryReplicationGroupsRequestType struct { This types.ManagedObjectReference `xml:"_this"` Entities []PbmServerObjectRef `xml:"entities,omitempty"` } func init() { types.Add("pbm:PbmQueryReplicationGroupsRequestType", reflect.TypeOf((*PbmQueryReplicationGroupsRequestType)(nil)).Elem()) } type PbmQueryReplicationGroupsResponse struct { Returnval []PbmQueryReplicationGroupResult `xml:"returnval,omitempty"` } type PbmQuerySpaceStatsForStorageContainer PbmQuerySpaceStatsForStorageContainerRequestType func init() { types.Add("pbm:PbmQuerySpaceStatsForStorageContainer", reflect.TypeOf((*PbmQuerySpaceStatsForStorageContainer)(nil)).Elem()) } type PbmQuerySpaceStatsForStorageContainerRequestType struct { This types.ManagedObjectReference `xml:"_this"` Datastore PbmServerObjectRef `xml:"datastore"` CapabilityProfileId []PbmProfileId `xml:"capabilityProfileId,omitempty"` } func init() { types.Add("pbm:PbmQuerySpaceStatsForStorageContainerRequestType", reflect.TypeOf((*PbmQuerySpaceStatsForStorageContainerRequestType)(nil)).Elem()) } type PbmQuerySpaceStatsForStorageContainerResponse struct { Returnval []PbmDatastoreSpaceStatistics `xml:"returnval,omitempty"` } type PbmResetDefaultRequirementProfile PbmResetDefaultRequirementProfileRequestType func init() { types.Add("pbm:PbmResetDefaultRequirementProfile", reflect.TypeOf((*PbmResetDefaultRequirementProfile)(nil)).Elem()) } type PbmResetDefaultRequirementProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` Profile *PbmProfileId `xml:"profile,omitempty"` } func init() { types.Add("pbm:PbmResetDefaultRequirementProfileRequestType", reflect.TypeOf((*PbmResetDefaultRequirementProfileRequestType)(nil)).Elem()) } type PbmResetDefaultRequirementProfileResponse struct { } type PbmResetVSanDefaultProfile PbmResetVSanDefaultProfileRequestType func init() { types.Add("pbm:PbmResetVSanDefaultProfile", reflect.TypeOf((*PbmResetVSanDefaultProfile)(nil)).Elem()) } type PbmResetVSanDefaultProfileRequestType struct { This types.ManagedObjectReference `xml:"_this"` } func init() { types.Add("pbm:PbmResetVSanDefaultProfileRequestType", reflect.TypeOf((*PbmResetVSanDefaultProfileRequestType)(nil)).Elem()) } type PbmResetVSanDefaultProfileResponse struct { } type PbmResourceInUse struct { PbmFault Type string `xml:"type,omitempty"` Name string `xml:"name,omitempty"` } func init() { types.Add("pbm:PbmResourceInUse", reflect.TypeOf((*PbmResourceInUse)(nil)).Elem()) } type PbmResourceInUseFault PbmResourceInUse func init() { types.Add("pbm:PbmResourceInUseFault", reflect.TypeOf((*PbmResourceInUseFault)(nil)).Elem()) } type PbmRetrieveContent PbmRetrieveContentRequestType func init() { types.Add("pbm:PbmRetrieveContent", reflect.TypeOf((*PbmRetrieveContent)(nil)).Elem()) } type PbmRetrieveContentRequestType struct { This types.ManagedObjectReference `xml:"_this"` ProfileIds []PbmProfileId `xml:"profileIds"` } func init() { types.Add("pbm:PbmRetrieveContentRequestType", reflect.TypeOf((*PbmRetrieveContentRequestType)(nil)).Elem()) } type PbmRetrieveContentResponse struct { Returnval []BasePbmProfile `xml:"returnval,typeattr"` } type PbmRetrieveServiceContent PbmRetrieveServiceContentRequestType func init() { types.Add("pbm:PbmRetrieveServiceContent", reflect.TypeOf((*PbmRetrieveServiceContent)(nil)).Elem()) } type PbmRetrieveServiceContentRequestType struct { This types.ManagedObjectReference `xml:"_this"` } func init() { types.Add("pbm:PbmRetrieveServiceContentRequestType", reflect.TypeOf((*PbmRetrieveServiceContentRequestType)(nil)).Elem()) } type PbmRetrieveServiceContentResponse struct { Returnval PbmServiceInstanceContent `xml:"returnval"` } type PbmRollupComplianceResult struct { types.DynamicData OldestCheckTime time.Time `xml:"oldestCheckTime"` Entity PbmServerObjectRef `xml:"entity"` OverallComplianceStatus string `xml:"overallComplianceStatus"` OverallComplianceTaskStatus string `xml:"overallComplianceTaskStatus,omitempty"` Result []PbmComplianceResult `xml:"result,omitempty"` ErrorCause []types.LocalizedMethodFault `xml:"errorCause,omitempty"` ProfileMismatch bool `xml:"profileMismatch"` } func init() { types.Add("pbm:PbmRollupComplianceResult", reflect.TypeOf((*PbmRollupComplianceResult)(nil)).Elem()) } type PbmServerObjectRef struct { types.DynamicData ObjectType string `xml:"objectType"` Key string `xml:"key"` ServerUuid string `xml:"serverUuid,omitempty"` } func init() { types.Add("pbm:PbmServerObjectRef", reflect.TypeOf((*PbmServerObjectRef)(nil)).Elem()) } type PbmServiceInstanceContent struct { types.DynamicData AboutInfo PbmAboutInfo `xml:"aboutInfo"` SessionManager types.ManagedObjectReference `xml:"sessionManager"` CapabilityMetadataManager types.ManagedObjectReference `xml:"capabilityMetadataManager"` ProfileManager types.ManagedObjectReference `xml:"profileManager"` ComplianceManager types.ManagedObjectReference `xml:"complianceManager"` PlacementSolver types.ManagedObjectReference `xml:"placementSolver"` ReplicationManager *types.ManagedObjectReference `xml:"replicationManager,omitempty"` } func init() { types.Add("pbm:PbmServiceInstanceContent", reflect.TypeOf((*PbmServiceInstanceContent)(nil)).Elem()) } type PbmUpdate PbmUpdateRequestType func init() { types.Add("pbm:PbmUpdate", reflect.TypeOf((*PbmUpdate)(nil)).Elem()) } type PbmUpdateRequestType struct { This types.ManagedObjectReference `xml:"_this"` ProfileId PbmProfileId `xml:"profileId"` UpdateSpec PbmCapabilityProfileUpdateSpec `xml:"updateSpec"` } func init() { types.Add("pbm:PbmUpdateRequestType", reflect.TypeOf((*PbmUpdateRequestType)(nil)).Elem()) } type PbmUpdateResponse struct { } type PbmVaioDataServiceInfo struct { PbmLineOfServiceInfo } func init() { types.Add("pbm:PbmVaioDataServiceInfo", reflect.TypeOf((*PbmVaioDataServiceInfo)(nil)).Elem()) } govmomi-0.15.0/performance/000077500000000000000000000000001312205533500155525ustar00rootroot00000000000000govmomi-0.15.0/performance/manager.go000066400000000000000000000247161312205533500175250ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package performance import ( "context" "fmt" "sort" "strconv" "strings" "sync" "time" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) // Manager wraps mo.PerformanceManager. type Manager struct { object.Common Sort bool pm struct { sync.Mutex *mo.PerformanceManager } providerSummary struct { sync.Mutex m map[string]*types.PerfProviderSummary } infoByName struct { sync.Mutex m map[string]*types.PerfCounterInfo } infoByKey struct { sync.Mutex m map[int32]*types.PerfCounterInfo } } // NewManager creates a new Manager instance. func NewManager(client *vim25.Client) *Manager { m := Manager{ Common: object.NewCommon(client, *client.ServiceContent.PerfManager), } m.pm.PerformanceManager = new(mo.PerformanceManager) return &m } // IntervalList wraps []types.PerfInterval. type IntervalList []types.PerfInterval // Enabled returns a map with Level as the key and enabled PerfInterval.Name(s) as the value. func (l IntervalList) Enabled() map[int32][]string { enabled := make(map[int32][]string) for level := int32(0); level <= 4; level++ { var names []string for _, interval := range l { if interval.Enabled && interval.Level >= level { names = append(names, interval.Name) } } enabled[level] = names } return enabled } // HistoricalInterval gets the PerformanceManager.HistoricalInterval property and wraps as an IntervalList. func (m *Manager) HistoricalInterval(ctx context.Context) (IntervalList, error) { var pm mo.PerformanceManager err := m.Properties(ctx, m.Reference(), []string{"historicalInterval"}, &pm) if err != nil { return nil, err } return IntervalList(pm.HistoricalInterval), nil } // CounterInfo gets the PerformanceManager.PerfCounter property. // The property value is only collected once, subsequent calls return the cached value. func (m *Manager) CounterInfo(ctx context.Context) ([]types.PerfCounterInfo, error) { m.pm.Lock() defer m.pm.Unlock() if len(m.pm.PerfCounter) == 0 { err := m.Properties(ctx, m.Reference(), []string{"perfCounter"}, m.pm.PerformanceManager) if err != nil { return nil, err } } return m.pm.PerfCounter, nil } // CounterInfoByName converts the PerformanceManager.PerfCounter property to a map, // where key is types.PerfCounterInfo.Name(). func (m *Manager) CounterInfoByName(ctx context.Context) (map[string]*types.PerfCounterInfo, error) { m.infoByName.Lock() defer m.infoByName.Unlock() if m.infoByName.m != nil { return m.infoByName.m, nil } info, err := m.CounterInfo(ctx) if err != nil { return nil, err } m.infoByName.m = make(map[string]*types.PerfCounterInfo) for i := range info { c := &info[i] m.infoByName.m[c.Name()] = c } return m.infoByName.m, nil } // CounterInfoByKey converts the PerformanceManager.PerfCounter property to a map, // where key is types.PerfCounterInfo.Key. func (m *Manager) CounterInfoByKey(ctx context.Context) (map[int32]*types.PerfCounterInfo, error) { m.infoByKey.Lock() defer m.infoByKey.Unlock() if m.infoByKey.m != nil { return m.infoByKey.m, nil } info, err := m.CounterInfo(ctx) if err != nil { return nil, err } m.infoByKey.m = make(map[int32]*types.PerfCounterInfo) for i := range info { c := &info[i] m.infoByKey.m[c.Key] = c } return m.infoByKey.m, nil } // ProviderSummary wraps the QueryPerfProviderSummary method, caching the value based on entity.Type. func (m *Manager) ProviderSummary(ctx context.Context, entity types.ManagedObjectReference) (*types.PerfProviderSummary, error) { m.providerSummary.Lock() defer m.providerSummary.Unlock() if m.providerSummary.m == nil { m.providerSummary.m = make(map[string]*types.PerfProviderSummary) } s, ok := m.providerSummary.m[entity.Type] if ok { return s, nil } req := types.QueryPerfProviderSummary{ This: m.Reference(), Entity: entity, } res, err := methods.QueryPerfProviderSummary(ctx, m.Client(), &req) if err != nil { return nil, err } s = &res.Returnval m.providerSummary.m[entity.Type] = s return s, nil } type groupPerfCounterInfo struct { info map[int32]*types.PerfCounterInfo ids []types.PerfMetricId } func (d groupPerfCounterInfo) Len() int { return len(d.ids) } func (d groupPerfCounterInfo) Less(i, j int) bool { ci := d.ids[i].CounterId cj := d.ids[j].CounterId gi := d.info[ci].GroupInfo.GetElementDescription() gj := d.info[cj].GroupInfo.GetElementDescription() return gi.Key < gj.Key } func (d groupPerfCounterInfo) Swap(i, j int) { d.ids[i], d.ids[j] = d.ids[j], d.ids[i] } // MetricList wraps []types.PerfMetricId type MetricList []types.PerfMetricId // ByKey converts MetricList to map, where key is types.PerfMetricId.CounterId / types.PerfCounterInfo.Key func (l MetricList) ByKey() map[int32][]*types.PerfMetricId { ids := make(map[int32][]*types.PerfMetricId, len(l)) for i := range l { id := &l[i] ids[id.CounterId] = append(ids[id.CounterId], id) } return ids } // AvailableMetric wraps the QueryAvailablePerfMetric method. // The MetricList is sorted by PerfCounterInfo.GroupInfo.Key if Manager.Sort == true. func (m *Manager) AvailableMetric(ctx context.Context, entity types.ManagedObjectReference, interval int32) (MetricList, error) { req := types.QueryAvailablePerfMetric{ This: m.Reference(), Entity: entity.Reference(), IntervalId: interval, } res, err := methods.QueryAvailablePerfMetric(ctx, m.Client(), &req) if err != nil { return nil, err } if m.Sort { info, err := m.CounterInfoByKey(ctx) if err != nil { return nil, err } sort.Sort(groupPerfCounterInfo{info, res.Returnval}) } return MetricList(res.Returnval), nil } // Query wraps the QueryPerf method. func (m *Manager) Query(ctx context.Context, spec []types.PerfQuerySpec) ([]types.BasePerfEntityMetricBase, error) { req := types.QueryPerf{ This: m.Reference(), QuerySpec: spec, } res, err := methods.QueryPerf(ctx, m.Client(), &req) if err != nil { return nil, err } return res.Returnval, nil } // SampleByName uses the spec param as a template, constructing a []types.PerfQuerySpec for the given metrics and entities // and invoking the Query method. // The spec template can specify instances using the MetricId.Instance field, by default all instances are collected. // The spec template MaxSample defaults to 1. // If the spec template IntervalId is a historical interval and StartTime is not specified, // the StartTime is set to the current time - (IntervalId * MaxSample). func (m *Manager) SampleByName(ctx context.Context, spec types.PerfQuerySpec, metrics []string, entity []types.ManagedObjectReference) ([]types.BasePerfEntityMetricBase, error) { info, err := m.CounterInfoByName(ctx) if err != nil { return nil, err } var ids []types.PerfMetricId instances := spec.MetricId if len(instances) == 0 { // Default to all instances instances = []types.PerfMetricId{{Instance: "*"}} } for _, name := range metrics { counter, ok := info[name] if !ok { return nil, fmt.Errorf("counter %q not found", name) } for _, i := range instances { ids = append(ids, types.PerfMetricId{CounterId: counter.Key, Instance: i.Instance}) } } spec.MetricId = ids if spec.MaxSample == 0 { spec.MaxSample = 1 } if spec.IntervalId >= 60 && spec.StartTime == nil { // Need a StartTime to make use of history now, err := methods.GetCurrentTime(ctx, m.Client()) if err != nil { return nil, err } // Go back in time x := spec.IntervalId * -1 * spec.MaxSample t := now.Add(time.Duration(x) * time.Second) spec.StartTime = &t } var query []types.PerfQuerySpec for _, e := range entity { spec.Entity = e.Reference() query = append(query, spec) } return m.Query(ctx, query) } // MetricSeries contains the same data as types.PerfMetricIntSeries, but with the CounterId converted to Name. type MetricSeries struct { Name string unit string Instance string Value []int64 } func (s *MetricSeries) Format(val int64) string { switch types.PerformanceManagerUnit(s.unit) { case types.PerformanceManagerUnitPercent: return strconv.FormatFloat(float64(val)/100.0, 'f', 2, 64) default: return strconv.FormatInt(val, 10) } } // ValueCSV converts the Value field to a CSV string func (s *MetricSeries) ValueCSV() string { vals := make([]string, len(s.Value)) for i := range s.Value { vals[i] = s.Format(s.Value[i]) } return strings.Join(vals, ",") } // EntityMetric contains the same data as types.PerfEntityMetric, but with MetricSeries type for the Value field. type EntityMetric struct { Entity types.ManagedObjectReference SampleInfo []types.PerfSampleInfo Value []MetricSeries } // SampleInfoCSV converts the SampleInfo field to a CSV string func (m *EntityMetric) SampleInfoCSV() string { vals := make([]string, len(m.SampleInfo)*2) i := 0 for _, s := range m.SampleInfo { vals[i] = s.Timestamp.Format(time.RFC3339) i++ vals[i] = strconv.Itoa(int(s.Interval)) i++ } return strings.Join(vals, ",") } // ToMetricSeries converts []BasePerfEntityMetricBase to []EntityMetric func (m *Manager) ToMetricSeries(ctx context.Context, series []types.BasePerfEntityMetricBase) ([]EntityMetric, error) { counters, err := m.CounterInfoByKey(ctx) if err != nil { return nil, err } var result []EntityMetric for i := range series { var values []MetricSeries s, ok := series[i].(*types.PerfEntityMetric) if !ok { panic(fmt.Errorf("expected type %T, got: %T", s, series[i])) } for j := range s.Value { v := s.Value[j].(*types.PerfMetricIntSeries) values = append(values, MetricSeries{ Name: counters[v.Id.CounterId].Name(), unit: counters[v.Id.CounterId].UnitInfo.GetElementDescription().Key, Instance: v.Id.Instance, Value: v.Value, }) } result = append(result, EntityMetric{ Entity: s.Entity, SampleInfo: s.SampleInfo, Value: values, }) } return result, nil } govmomi-0.15.0/property/000077500000000000000000000000001312205533500151355ustar00rootroot00000000000000govmomi-0.15.0/property/collector.go000066400000000000000000000122321312205533500174520ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package property import ( "context" "errors" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // Collector models the PropertyCollector managed object. // // For more information, see: // http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.html // type Collector struct { roundTripper soap.RoundTripper reference types.ManagedObjectReference } // DefaultCollector returns the session's default property collector. func DefaultCollector(c *vim25.Client) *Collector { p := Collector{ roundTripper: c, reference: c.ServiceContent.PropertyCollector, } return &p } func (p Collector) Reference() types.ManagedObjectReference { return p.reference } // Create creates a new session-specific Collector that can be used to // retrieve property updates independent of any other Collector. func (p *Collector) Create(ctx context.Context) (*Collector, error) { req := types.CreatePropertyCollector{ This: p.Reference(), } res, err := methods.CreatePropertyCollector(ctx, p.roundTripper, &req) if err != nil { return nil, err } newp := Collector{ roundTripper: p.roundTripper, reference: res.Returnval, } return &newp, nil } // Destroy destroys this Collector. func (p *Collector) Destroy(ctx context.Context) error { req := types.DestroyPropertyCollector{ This: p.Reference(), } _, err := methods.DestroyPropertyCollector(ctx, p.roundTripper, &req) if err != nil { return err } p.reference = types.ManagedObjectReference{} return nil } func (p *Collector) CreateFilter(ctx context.Context, req types.CreateFilter) error { req.This = p.Reference() _, err := methods.CreateFilter(ctx, p.roundTripper, &req) if err != nil { return err } return nil } func (p *Collector) WaitForUpdates(ctx context.Context, v string) (*types.UpdateSet, error) { req := types.WaitForUpdatesEx{ This: p.Reference(), Version: v, } res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req) if err != nil { return nil, err } return res.Returnval, nil } func (p *Collector) RetrieveProperties(ctx context.Context, req types.RetrieveProperties) (*types.RetrievePropertiesResponse, error) { req.This = p.Reference() return methods.RetrieveProperties(ctx, p.roundTripper, &req) } // Retrieve loads properties for a slice of managed objects. The dst argument // must be a pointer to a []interface{}, which is populated with the instances // of the specified managed objects, with the relevant properties filled in. If // the properties slice is nil, all properties are loaded. func (p *Collector) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}) error { var propSpec *types.PropertySpec var objectSet []types.ObjectSpec for _, obj := range objs { // Ensure that all object reference types are the same if propSpec == nil { propSpec = &types.PropertySpec{ Type: obj.Type, } if ps == nil { propSpec.All = types.NewBool(true) } else { propSpec.PathSet = ps } } else { if obj.Type != propSpec.Type { return errors.New("object references must have the same type") } } objectSpec := types.ObjectSpec{ Obj: obj, Skip: types.NewBool(false), } objectSet = append(objectSet, objectSpec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: objectSet, PropSet: []types.PropertySpec{*propSpec}, }, }, } res, err := p.RetrieveProperties(ctx, req) if err != nil { return err } if d, ok := dst.(*[]types.ObjectContent); ok { *d = res.Returnval return nil } return mo.LoadRetrievePropertiesResponse(res, dst) } // RetrieveWithFilter populates dst as Retrieve does, but only for entities matching the given filter. func (p *Collector) RetrieveWithFilter(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}, filter Filter) error { if len(filter) == 0 { return p.Retrieve(ctx, objs, ps, dst) } var content []types.ObjectContent err := p.Retrieve(ctx, objs, filter.Keys(), &content) if err != nil { return err } objs = filter.MatchObjectContent(content) if len(objs) == 0 { return nil } return p.Retrieve(ctx, objs, ps, dst) } // RetrieveOne calls Retrieve with a single managed object reference. func (p *Collector) RetrieveOne(ctx context.Context, obj types.ManagedObjectReference, ps []string, dst interface{}) error { var objs = []types.ManagedObjectReference{obj} return p.Retrieve(ctx, objs, ps, dst) } govmomi-0.15.0/property/filter.go000066400000000000000000000060011312205533500167460ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package property import ( "fmt" "path/filepath" "reflect" "strconv" "strings" "github.com/vmware/govmomi/vim25/types" ) // Filter provides methods for matching against types.DynamicProperty type Filter map[string]types.AnyType // Keys returns the Filter map keys as a []string func (f Filter) Keys() []string { keys := make([]string, 0, len(f)) for key := range f { keys = append(keys, key) } return keys } // MatchProperty returns true if a Filter entry matches the given prop. func (f Filter) MatchProperty(prop types.DynamicProperty) bool { match, ok := f[prop.Name] if !ok { return false } if match == prop.Val { return true } ptype := reflect.TypeOf(prop.Val) if strings.HasPrefix(ptype.Name(), "ArrayOf") { pval := reflect.ValueOf(prop.Val).Field(0) for i := 0; i < pval.Len(); i++ { prop.Val = pval.Index(i).Interface() if f.MatchProperty(prop) { return true } } return false } if reflect.TypeOf(match) != ptype { s, ok := match.(string) if !ok { return false } // convert if we can switch prop.Val.(type) { case bool: match, _ = strconv.ParseBool(s) case int16: x, _ := strconv.ParseInt(s, 10, 16) match = int16(x) case int32: x, _ := strconv.ParseInt(s, 10, 32) match = int32(x) case int64: match, _ = strconv.ParseInt(s, 10, 64) case float32: x, _ := strconv.ParseFloat(s, 32) match = float32(x) case float64: match, _ = strconv.ParseFloat(s, 64) case fmt.Stringer: prop.Val = prop.Val.(fmt.Stringer).String() default: if ptype.Kind() != reflect.String { return false } // An enum type we can convert to a string type prop.Val = reflect.ValueOf(prop.Val).String() } } switch pval := prop.Val.(type) { case string: m, _ := filepath.Match(match.(string), pval) return m default: return reflect.DeepEqual(match, pval) } } // MatchPropertyList returns true if all given props match the Filter. func (f Filter) MatchPropertyList(props []types.DynamicProperty) bool { for _, p := range props { if !f.MatchProperty(p) { return false } } return true } // MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches the Filter. func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference { var refs []types.ManagedObjectReference for _, o := range objects { if f.MatchPropertyList(o.PropSet) { refs = append(refs, o.Obj) } } return refs } govmomi-0.15.0/property/filter_test.go000066400000000000000000000040651312205533500200150ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package property import ( "testing" "github.com/vmware/govmomi/vim25/types" ) func TestMatchProperty(t *testing.T) { tests := []struct { key string val types.AnyType pass types.AnyType fail types.AnyType }{ {"string", "bar", "bar", "foo"}, {"match", "foo.bar", "foo.*", "foobarbaz"}, {"moref", types.ManagedObjectReference{Type: "HostSystem", Value: "foo"}, "HostSystem:foo", "bar"}, // implements fmt.Stringer {"morefm", types.ManagedObjectReference{Type: "HostSystem", Value: "foo"}, "*foo", "bar"}, {"morefs", types.ArrayOfManagedObjectReference{ManagedObjectReference: []types.ManagedObjectReference{{Type: "HostSystem", Value: "foo"}}}, "*foo", "bar"}, {"enum", types.VirtualMachinePowerStatePoweredOn, "poweredOn", "poweredOff"}, {"int16", int32(16), int32(16), int32(42)}, {"int32", int32(32), int32(32), int32(42)}, {"int32s", int32(32), "32", "42"}, {"int64", int64(64), int64(64), int64(42)}, {"int64s", int64(64), "64", "42"}, {"float32", float32(32.32), float32(32.32), float32(42.0)}, {"float32s", float32(32.32), "32.32", "42.0"}, {"float64", float64(64.64), float64(64.64), float64(42.0)}, {"float64s", float64(64.64), "64.64", "42.0"}, } for _, test := range tests { p := types.DynamicProperty{Name: test.key, Val: test.val} for match, value := range map[bool]types.AnyType{true: test.pass, false: test.fail} { result := Filter{test.key: value}.MatchProperty(p) if result != match { t.Errorf("%s: %t", test.key, result) } } } } govmomi-0.15.0/property/wait.go000066400000000000000000000104171312205533500164330ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package property import ( "context" "github.com/vmware/govmomi/vim25/types" ) // Wait waits for any of the specified properties of the specified managed // object to change. It calls the specified function for every update it // receives. If this function returns false, it continues waiting for // subsequent updates. If this function returns true, it stops waiting and // returns. // // To only receive updates for the specified managed object, the function // creates a new property collector and calls CreateFilter. A new property // collector is required because filters can only be added, not removed. // // The newly created collector is destroyed before this function returns (both // in case of success or error). // func Wait(ctx context.Context, c *Collector, obj types.ManagedObjectReference, ps []string, f func([]types.PropertyChange) bool) error { p, err := c.Create(ctx) if err != nil { return err } // Attempt to destroy the collector using the background context, as the // specified context may have timed out or have been cancelled. defer p.Destroy(context.Background()) req := types.CreateFilter{ Spec: types.PropertyFilterSpec{ ObjectSet: []types.ObjectSpec{ { Obj: obj, }, }, PropSet: []types.PropertySpec{ { PathSet: ps, Type: obj.Type, }, }, }, } if len(ps) == 0 { req.Spec.PropSet[0].All = types.NewBool(true) } err = p.CreateFilter(ctx, req) if err != nil { return err } return waitLoop(ctx, p, func(_ types.ManagedObjectReference, pc []types.PropertyChange) bool { return f(pc) }) } // WaitForView waits for any of the specified properties of the managed // objects in the View to change. It calls the specified function for every update it // receives. If this function returns false, it continues waiting for // subsequent updates. If this function returns true, it stops waiting and // returns. // // To only receive updates for the View's specified managed objects, the function // creates a new property collector and calls CreateFilter. A new property // collector is required because filters can only be added, not removed. // // The newly created collector is destroyed before this function returns (both // in case of success or error). // // The code assumes that all objects in the View are the same type func WaitForView(ctx context.Context, c *Collector, view types.ManagedObjectReference, obj types.ManagedObjectReference, ps []string, f func(types.ManagedObjectReference, []types.PropertyChange) bool) error { p, err := c.Create(ctx) if err != nil { return err } // Attempt to destroy the collector using the background context, as the // specified context may have timed out or have been cancelled. defer p.Destroy(context.Background()) req := types.CreateFilter{ Spec: types.PropertyFilterSpec{ ObjectSet: []types.ObjectSpec{ { Obj: view, SelectSet: []types.BaseSelectionSpec{ &types.TraversalSpec{ SelectionSpec: types.SelectionSpec{ Name: "traverseEntities", }, Path: "view", Type: view.Type}}, }, }, PropSet: []types.PropertySpec{ { Type: obj.Type, PathSet: ps, }, }, }} err = p.CreateFilter(ctx, req) if err != nil { return err } return waitLoop(ctx, p, f) } func waitLoop(ctx context.Context, c *Collector, f func(types.ManagedObjectReference, []types.PropertyChange) bool) error { for version := ""; ; { res, err := c.WaitForUpdates(ctx, version) if err != nil { return err } // Retry if the result came back empty if res == nil { continue } version = res.Version for _, fs := range res.FilterSet { for _, os := range fs.ObjectSet { if f(os.Obj, os.ChangeSet) { return nil } } } } } govmomi-0.15.0/scripts/000077500000000000000000000000001312205533500147405ustar00rootroot00000000000000govmomi-0.15.0/scripts/.gitignore000066400000000000000000000000151312205533500167240ustar00rootroot00000000000000.wireshark-* govmomi-0.15.0/scripts/contributors.sh000077500000000000000000000004141312205533500200330ustar00rootroot00000000000000#!/bin/bash -e file="$(git rev-parse --show-toplevel)/CONTRIBUTORS" cat < "$file" # People who can (and typically have) contributed to this repository. # # This script is generated by $(basename "$0") # EOF git log --format='%aN <%aE>' | sort -uf >> "$file" govmomi-0.15.0/scripts/debug-ls.sh000077500000000000000000000025061312205533500170040ustar00rootroot00000000000000#!/bin/bash # Copyright (c) 2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e # This script shows for every request in a debug trace how long it took # and the name of the request body. function body-name { ( xmllint --shell $1 <\n" "$1" "$PWD" "$2" "$(tr -d '\r' < "$3")" } for file in *.req.xml; do base=$(basename "$file" .req.xml) header Request "$file" "${base}.req.headers" xmlformat < "$file" file="${base}.res.xml" header Response "$file" "${base}.res.headers" xmlformat < "$file" done govmomi-0.15.0/scripts/govc-env.bash000066400000000000000000000035701312205533500173300ustar00rootroot00000000000000# Copyright (c) 2015 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Provide a simple shell extension to save and load govc # environments to disk. No more running `export GOVC_ABC=xyz` # in different shells over and over again. Loading the right # govc environment variables is now only one short and # autocompleted command away! # # Usage: # * Source this file from your `~/.bashrc` or running shell. # * Execute `govc-env` to print GOVC_* variables. # * Execute `govc-env --save ` to save GOVC_* variables. # * Execute `govc-env ` to load GOVC_* variables. # _govc_env_dir=$HOME/.govmomi/env mkdir -p "${_govc_env_dir}" _govc-env-complete() { local w="${COMP_WORDS[COMP_CWORD]}" local c="$(find ${_govc_env_dir} -mindepth 1 -maxdepth 1 -type f | sort | xargs -r -L1 basename | xargs echo)" # Only allow completion if preceding argument if the function itself if [ "$3" == "govc-env" ]; then COMPREPLY=( $(compgen -W "${c}" -- "${w}") ) fi } govc-env() { # Print current environment if [ -z "$1" ]; then for VAR in $(env | grep ^GOVC_ | cut -d= -f1); do echo "export ${VAR}='${!VAR}'" done return fi # Save current environment if [ "$1" == "--save" ]; then govc-env > ${_govc_env_dir}/$2 return fi # Load specified environment source ${_govc_env_dir}/$1 } complete -F _govc-env-complete govc-env govmomi-0.15.0/scripts/govc_bash_completion000066400000000000000000000024461312205533500210550ustar00rootroot00000000000000#!/bin/bash # govc Bash completion script # place in etc/bash_completion.d/ or source on command line with "." _govc_complete() { local cur prev subcmd prev=${COMP_WORDS[COMP_CWORD-1]} cur=${COMP_WORDS[COMP_CWORD]} subcmd=${COMP_WORDS[1]} COMPREPLY=() if [[ ${prev} == "govc" ]] ; then # show subcommands, no options COMPREPLY=( $(compgen -W "$(govc -h | grep -v Usage | tr -s '\n' ' ')" -- ${cur}) ) return 0 elif [[ ${cur} == "-"* ]] ; then : # drop out and show options elif [[ ${subcmd} == "ls" ]] ; then # not completing an option, try for appropriate values if [[ ${prev} == "-t" ]] ; then COMPREPLY=( $(compgen -W "$(govc ls -l "/**" | awk '{print $2}' | \ sort -u | tr -d '()' | tr '\n' ' ' )" -- ${cur}) ) else COMPREPLY=( $(compgen -W "$(govc ls "${cur:-/*}*" | tr -s '\n' ' ' )" -- ${cur}) ) fi elif [[ ${subcmd} == "vm."* || ${prev} == "-vm" ]] ; then COMPREPLY=( $(compgen -W "$(govc ls -t VirtualMachine -l "${cur}*" | \ awk '{print $1}' | tr -s '\n' ' ' )" -- ${cur}) ) fi # did not hit any specifcs so show all options from help if [[ -z ${COMPREPLY} ]]; then COMPREPLY=( $(compgen -W "-h $(govc ${subcmd} -h | awk '{print $1}' | \ grep "^-" | sed -e 's/=.*//g' | tr -s '\n' ' ' )" -- ${cur}) ) fi return 0 } complete -F _govc_complete govc govmomi-0.15.0/scripts/headers/000077500000000000000000000000001312205533500163535ustar00rootroot00000000000000govmomi-0.15.0/scripts/headers/go.txt000066400000000000000000000011141312205533500175160ustar00rootroot00000000000000/* Copyright (c) ${YEARS} VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ govmomi-0.15.0/scripts/headers/rb.txt000066400000000000000000000011351312205533500175170ustar00rootroot00000000000000# Copyright (c) ${YEARS} VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. govmomi-0.15.0/scripts/license.sh000077500000000000000000000021471312205533500167250ustar00rootroot00000000000000#!/bin/bash set -e header_dir=$(dirname $0)/headers tmpfile=$(mktemp) trap "rm -f ${tmpfile}" EXIT git ls-files | while read file; do years=( $(git log --format='%ai' $file | cut -d- -f1 | sort -u) ) num_years=${#years[@]} if [ "${num_years}" == 0 ]; then export YEARS="$(date +%Y)" else yearA=${years[0]} yearB=${years[$((${num_years}-1))]} if [ ${yearA} == ${yearB} ]; then export YEARS="${yearA}" else export YEARS="${yearA}-${yearB}" fi fi case "$file" in vim25/xml/*) # Ignore ;; *.go) sed -e "s/\${YEARS}/${YEARS}/" ${header_dir}/go.txt > ${tmpfile} last_header_line=$(grep -n '\*/' ${file} | head -1 | cut -d: -f1) tail -n +$((${last_header_line} + 1)) ${file} >> ${tmpfile} mv ${tmpfile} ${file} ;; *.rb) sed -e "s/\${YEARS}/${YEARS}/" ${header_dir}/rb.txt > ${tmpfile} last_header_line=$(grep -n '^$' ${file} | head -1 | cut -d: -f1) tail -n +$((${last_header_line})) ${file} >> ${tmpfile} mv ${tmpfile} ${file} ;; *) echo "Unhandled file: $file" ;; esac done govmomi-0.15.0/scripts/vagrant/000077500000000000000000000000001312205533500164025ustar00rootroot00000000000000govmomi-0.15.0/scripts/vagrant/vcsa/000077500000000000000000000000001312205533500173365ustar00rootroot00000000000000govmomi-0.15.0/scripts/vagrant/vcsa/.gitignore000066400000000000000000000000251312205533500213230ustar00rootroot00000000000000*.box *.ova .vagrant govmomi-0.15.0/scripts/vagrant/vcsa/Vagrantfile000066400000000000000000000005101312205533500215170ustar00rootroot00000000000000# -*- mode: ruby -*- # vi: set ft=ruby : # Using the VCSA base box, no provisioning, inventory will be empty. Vagrant.configure("2") do |config| config.vm.hostname = "vcsa" config.vm.box = "vcsa" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.network "forwarded_port", guest: 443, host: 16443 end govmomi-0.15.0/scripts/vagrant/vcsa/create-box.sh000077500000000000000000000034431312205533500217320ustar00rootroot00000000000000#!/bin/sh set -e if [ "$(uname -s)" == "Darwin" ]; then PATH="/Applications/VMware Fusion.app/Contents/Library:$PATH" PATH="/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool:$PATH" fi ovf="$1" if [ -z "$ovf" ]; then ovf="./VMware-vCenter-Server-Appliance-5.5.0.10300-2000350_OVA10.ova" fi # check for greadlink and gmktemp readlink=$(type -p greadlink readlink | head -1) mktemp=$(type -p gmktemp mktemp | head -1) dir=$($readlink -nf $(dirname $0)) tmp=$($mktemp -d) trap "rm -rf $tmp" EXIT cd $tmp echo "Converting ovf..." ovftool \ --noSSLVerify \ --acceptAllEulas \ --overwrite \ --powerOffTarget \ $ovf vcsa.vmx echo "Starting vm..." vmrun start vcsa.vmx nogui echo "Waiting for vm ip..." ip=$(vmrun getGuestIPAddress vcsa.vmx -wait) echo "Configuring vm for use with vagrant..." vmrun -gu root -gp vmware CopyFileFromHostToGuest vcsa.vmx \ $dir/vagrant.sh /tmp/vagrant.sh vmrun -gu root -gp vmware runProgramInGuest vcsa.vmx \ /bin/sh -e /tmp/vagrant.sh vmrun -gu root -gp vmware deleteFileInGuest vcsa.vmx \ /tmp/vagrant.sh echo "Configuring vCenter Server Appliance..." ssh_opts="-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -T" ssh ${ssh_opts} -i ~/.vagrant.d/insecure_private_key vagrant@$ip < ./metadata.json cd $dir tar -C $tmp -cvzf vcsa.box . vagrant box add --name vcsa vcsa.box govmomi-0.15.0/scripts/vagrant/vcsa/vagrant.sh000077500000000000000000000012551312205533500213420ustar00rootroot00000000000000#!/bin/sh useradd vagrant -m -s /bin/bash groupmod -A vagrant wheel echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers mkdir ~vagrant/.ssh wget --no-check-certificate \ https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub \ -O ~vagrant/.ssh/authorized_keys chown -R vagrant ~vagrant/.ssh chmod -R go-rwsx ~vagrant/.ssh sed -i -e 's/^#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config sed -i -e 's/^AllowTcpForwarding no//' /etc/ssh/sshd_config sed -i -e 's/^PermitTunnel no//' /etc/ssh/sshd_config sed -i -e 's/^MaxSessions 1//' /etc/ssh/sshd_config # disable password expiration for uid in root vagrant; do chage -I -1 -E -1 -m 0 -M -1 $uid done govmomi-0.15.0/scripts/wireshark-esx.sh000077500000000000000000000033341312205533500200760ustar00rootroot00000000000000#!/bin/bash -e # # Capture ESXi traffic and decrypt SOAP traffic on port 443 via wireshark # Device to capture dev="${1-vmk0}" # Device to get the ip for wireshark ssl_keys config if [ "$dev" = "lo0" ] ; then ip_dev="vmk0" else ip_dev="$dev" fi ip=$(govc host.info -k -json | \ jq -r ".HostSystems[].Config.Network.Vnic[] | select(.Device == \"${ip_dev}\") | .Spec.Ip.IpAddress") scp=(scp) ssh=(ssh) # Check if vagrant ssh-config applies to $ip if [ -d ".vagrant" ] ; then vssh_opts=($(vagrant ssh-config | awk NF | awk -v ORS=' ' '{print "-o " $1 "=" $2}')) if grep "HostName=${ip}" >/dev/null <<<"${vssh_opts[*]}" ; then ssh_opts=("${vssh_opts[@]}") fi fi # Otherwise, use default ssh opts + sshpass if available if [ ${#ssh_opts[@]} -eq 0 ] ; then user="$(govc env GOVC_USERNAME)" ssh_opts=(-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=FATAL -o User=$user) if [ -x "$(which sshpass)" ] ; then password="$(govc env GOVC_PASSWORD)" scp=(sshpass -p $password scp) ssh=(sshpass -p $password ssh) fi fi if [ "$dev" != "lo0" ] ; then # If you change this filter, be sure to exclude the ssh port (not tcp port 22) filter="host $ip and \(port 80 or port 443\)" dst="$HOME/.wireshark/rui-${ip}.key" if [ ! -f "$dst" ] ; then # Copy key from ESX "${scp[@]}" "${ssh_opts[@]}" "${ip}:/etc/vmware/ssl/rui.key" "$dst" fi if ! grep "$ip" ~/.wireshark/ssl_keys 2>/dev/null ; then # Add key to wireshark ssl_keys config echo "adding rui.key for $ip" cat <> ~/.wireshark/ssl_keys "$ip","443","http","$dst","" EOF fi fi echo "Capturing $dev on $ip..." "${ssh[@]}" "${ssh_opts[@]}" "$ip" tcpdump-uw -i "$dev" -s0 -v -w - "$filter" | wireshark -k -i - govmomi-0.15.0/scripts/wireshark-vcsa.sh000077500000000000000000000031111312205533500202240ustar00rootroot00000000000000#!/bin/bash -e # # Capture SOAP traffic between web client and vpxd on 127.0.0.1:8085. # # Caveats: tested with VCSA 6.0, unlikely to work for other versions. # set -e cache_deb() { wget $1 ar x *.deb data.tar.gz tar zxf data.tar.gz rm -f data.tar.gz rm -f *.deb } dirname="$(dirname $0)" basename="$(basename $0)" bindir="${dirname}/.${basename}" mkdir -p "${bindir}" # Cache binaries required to run tcpdump on vcsa if [ ! -f "${bindir}/.done" ]; then pushd ${bindir} cache_deb https://launchpadlibrarian.net/200649143/libssl0.9.8_0.9.8k-7ubuntu8.27_amd64.deb cache_deb https://launchpadlibrarian.net/37430984/libpcap0.8_1.0.0-6_amd64.deb cache_deb https://launchpadlibrarian.net/41774869/tcpdump_4.0.0-6ubuntu3_amd64.deb touch .done popd fi scp=(scp) ssh=(ssh) # Extract host from GOVC_URL host="$(govc env -x GOVC_HOST)" username=root password="$(govc env GOVC_PASSWORD)" if [ -x "$(which sshpass)" ] ; then scp=(sshpass -p "$password" scp) ssh=(sshpass -p "$password" ssh) fi ssh_opts=(-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=FATAL -o User=${username} -o ControlMaster=no) dev="lo" filter="port 8085" tcpdump="env LD_LIBRARY_PATH=/tmp /tmp/tcpdump" echo "Capturing $dev on $host..." "${scp[@]}" "${ssh_opts[@]}" \ "${bindir}/lib/libcrypto.so.0.9.8" \ "${bindir}/usr/lib/libpcap.so.0.8" \ "${bindir}/usr/sbin/tcpdump" \ "${host}:/tmp" "${ssh[@]}" "${ssh_opts[@]}" "$host" ${tcpdump} -i "$dev" -s0 -v -w - "$filter" | wireshark -k -i - 2>/dev/null govmomi-0.15.0/session/000077500000000000000000000000001312205533500147345ustar00rootroot00000000000000govmomi-0.15.0/session/keep_alive.go000066400000000000000000000065211312205533500173730ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package session import ( "context" "sync" "time" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/soap" ) type keepAlive struct { sync.Mutex roundTripper soap.RoundTripper idleTime time.Duration notifyRequest chan struct{} notifyStop chan struct{} notifyWaitGroup sync.WaitGroup // keepAlive executes a request in the background with the purpose of // keeping the session active. The response for this request is discarded. keepAlive func(soap.RoundTripper) error } func defaultKeepAlive(roundTripper soap.RoundTripper) error { _, _ = methods.GetCurrentTime(context.Background(), roundTripper) return nil } // KeepAlive wraps the specified soap.RoundTripper and executes a meaningless // API request in the background after the RoundTripper has been idle for the // specified amount of idle time. The keep alive process only starts once a // user logs in and runs until the user logs out again. func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper { return KeepAliveHandler(roundTripper, idleTime, defaultKeepAlive) } // KeepAliveHandler works as KeepAlive() does, but the handler param can decide how to handle errors. // For example, if connectivity to ESX/VC is down long enough for a session to expire, a handler can choose to // Login() on a types.NotAuthenticated error. If handler returns non-nil, the keep alive go routine will be stopped. func KeepAliveHandler(roundTripper soap.RoundTripper, idleTime time.Duration, handler func(soap.RoundTripper) error) soap.RoundTripper { k := &keepAlive{ roundTripper: roundTripper, idleTime: idleTime, notifyRequest: make(chan struct{}), } k.keepAlive = handler return k } func (k *keepAlive) start() { k.Lock() defer k.Unlock() if k.notifyStop != nil { return } // This channel must be closed to terminate idle timer. k.notifyStop = make(chan struct{}) k.notifyWaitGroup.Add(1) go func() { defer k.notifyWaitGroup.Done() for t := time.NewTimer(k.idleTime); ; { select { case <-k.notifyStop: return case <-k.notifyRequest: t.Reset(k.idleTime) case <-t.C: if err := k.keepAlive(k.roundTripper); err != nil { k.stop() } t = time.NewTimer(k.idleTime) } } }() } func (k *keepAlive) stop() { k.Lock() defer k.Unlock() if k.notifyStop != nil { close(k.notifyStop) k.notifyWaitGroup.Wait() k.notifyStop = nil } } func (k *keepAlive) RoundTrip(ctx context.Context, req, res soap.HasFault) error { err := k.roundTripper.RoundTrip(ctx, req, res) if err != nil { return err } // Start ticker on login, stop ticker on logout. switch req.(type) { case *methods.LoginBody, *methods.LoginExtensionByCertificateBody: k.start() case *methods.LogoutBody: k.stop() } return nil } govmomi-0.15.0/session/keep_alive_test.go000066400000000000000000000142101312205533500204240ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package session import ( "context" "fmt" "net/url" "os" "runtime" "testing" "time" "github.com/vmware/govmomi/test" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type testKeepAlive int func (t *testKeepAlive) Func(soap.RoundTripper) error { *t++ return nil } func newManager(t *testing.T) (*Manager, *url.URL) { u := test.URL() if u == nil { t.SkipNow() } soapClient := soap.NewClient(u, true) vimClient, err := vim25.NewClient(context.Background(), soapClient) if err != nil { t.Fatal(err) } return NewManager(vimClient), u } func TestKeepAlive(t *testing.T) { var i testKeepAlive var j int m, u := newManager(t) k := KeepAlive(m.client.RoundTripper, time.Millisecond) k.(*keepAlive).keepAlive = i.Func m.client.RoundTripper = k // Expect keep alive to not have triggered yet if i != 0 { t.Errorf("Expected i == 0, got i: %d", i) } // Logging in starts keep alive err := m.Login(context.Background(), u.User) if err != nil { t.Error(err) } time.Sleep(2 * time.Millisecond) // Expect keep alive to triggered at least once if i == 0 { t.Errorf("Expected i != 0, got i: %d", i) } j = int(i) time.Sleep(2 * time.Millisecond) // Expect keep alive to triggered at least once more if int(i) <= j { t.Errorf("Expected i > j, got i: %d, j: %d", i, j) } // Logging out stops keep alive err = m.Logout(context.Background()) if err != nil { t.Error(err) } j = int(i) time.Sleep(2 * time.Millisecond) // Expect keep alive to have stopped if int(i) != j { t.Errorf("Expected i == j, got i: %d, j: %d", i, j) } } func testSessionOK(t *testing.T, m *Manager, ok bool) { s, err := m.UserSession(context.Background()) if err != nil { t.Fatal(err) } _, file, line, _ := runtime.Caller(1) prefix := fmt.Sprintf("%s:%d", file, line) if ok && s == nil { t.Fatalf("%s: Expected session to be OK, but is invalid", prefix) } if !ok && s != nil { t.Fatalf("%s: Expected session to be invalid, but is OK", prefix) } } // Run with: // // env GOVMOMI_KEEPALIVE_TEST=1 go test -timeout=60m -run TestRealKeepAlive // func TestRealKeepAlive(t *testing.T) { if os.Getenv("GOVMOMI_KEEPALIVE_TEST") != "1" { t.SkipNow() } m1, u1 := newManager(t) m2, u2 := newManager(t) // Enable keepalive on m2 k := KeepAlive(m2.client.RoundTripper, 10*time.Minute) m2.client.RoundTripper = k // Expect both sessions to be invalid testSessionOK(t, m1, false) testSessionOK(t, m2, false) // Logging in starts keep alive if err := m1.Login(context.Background(), u1.User); err != nil { t.Error(err) } if err := m2.Login(context.Background(), u2.User); err != nil { t.Error(err) } // Expect both sessions to be valid testSessionOK(t, m1, true) testSessionOK(t, m2, true) // Wait for m1 to time out delay := 31 * time.Minute fmt.Printf("%s: Waiting %d minutes for session to time out...\n", time.Now(), int(delay.Minutes())) time.Sleep(delay) // Expect m1's session to be invalid, m2's session to be valid testSessionOK(t, m1, false) testSessionOK(t, m2, true) } func isNotAuthenticated(err error) bool { if soap.IsSoapFault(err) { switch soap.ToSoapFault(err).VimFault().(type) { case types.NotAuthenticated: return true } } return false } func isInvalidLogin(err error) bool { if soap.IsSoapFault(err) { switch soap.ToSoapFault(err).VimFault().(type) { case types.InvalidLogin: return true } } return false } func TestKeepAliveHandler(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } m1, u1 := newManager(t) m2, u2 := newManager(t) reauth := make(chan bool) // Keep alive handler that will re-login. // Real-world case: connectivity to ESX/VC is down long enough for the session to expire // Test-world case: we call TerminateSession below k := KeepAliveHandler(m2.client.RoundTripper, 2*time.Second, func(roundTripper soap.RoundTripper) error { _, err := methods.GetCurrentTime(context.Background(), roundTripper) if err != nil { if isNotAuthenticated(err) { err = m2.Login(context.Background(), u2.User) if err != nil { if isInvalidLogin(err) { reauth <- false t.Log("failed to re-authenticate, quitting keep alive handler") return err } } else { reauth <- true } } } return nil }) m2.client.RoundTripper = k // Logging in starts keep alive if err := m1.Login(context.Background(), u1.User); err != nil { t.Error(err) } if err := m2.Login(context.Background(), u2.User); err != nil { t.Error(err) } // Terminate session for m2. Note that self terminate fails, so we need 2 sessions for this test. s, err := m2.UserSession(context.Background()) if err != nil { t.Fatal(err) } err = m1.TerminateSession(context.Background(), []string{s.Key}) if err != nil { t.Fatal(err) } _, err = methods.GetCurrentTime(context.Background(), m2.client) if err == nil { t.Error("expected to fail") } // Wait for keepalive to re-authenticate <-reauth _, err = methods.GetCurrentTime(context.Background(), m2.client) if err != nil { t.Fatal(err) } // Clear credentials to test re-authentication failure u2.User = nil s, err = m2.UserSession(context.Background()) if err != nil { t.Fatal(err) } err = m1.TerminateSession(context.Background(), []string{s.Key}) if err != nil { t.Fatal(err) } // Wait for keepalive re-authenticate attempt result := <-reauth _, err = methods.GetCurrentTime(context.Background(), m2.client) if err == nil { t.Error("expected to fail") } if result { t.Errorf("expected reauth to fail") } } govmomi-0.15.0/session/manager.go000066400000000000000000000112631312205533500167000ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package session import ( "context" "net/url" "os" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) // Locale defaults to "en_US" and can be overridden via this var or the GOVMOMI_LOCALE env var. // A value of "_" uses the server locale setting. var Locale = os.Getenv("GOVMOMI_LOCALE") func init() { if Locale == "_" { Locale = "" } else if Locale == "" { Locale = "en_US" } } type Manager struct { client *vim25.Client userSession *types.UserSession } func NewManager(client *vim25.Client) *Manager { m := Manager{ client: client, } return &m } func (sm Manager) Reference() types.ManagedObjectReference { return *sm.client.ServiceContent.SessionManager } func (sm *Manager) SetLocale(ctx context.Context, locale string) error { req := types.SetLocale{ This: sm.Reference(), Locale: locale, } _, err := methods.SetLocale(ctx, sm.client, &req) return err } func (sm *Manager) Login(ctx context.Context, u *url.Userinfo) error { req := types.Login{ This: sm.Reference(), Locale: Locale, } if u != nil { req.UserName = u.Username() if pw, ok := u.Password(); ok { req.Password = pw } } login, err := methods.Login(ctx, sm.client, &req) if err != nil { return err } sm.userSession = &login.Returnval return nil } func (sm *Manager) LoginExtensionByCertificate(ctx context.Context, key string, locale string) error { req := types.LoginExtensionByCertificate{ This: sm.Reference(), ExtensionKey: key, Locale: locale, } login, err := methods.LoginExtensionByCertificate(ctx, sm.client, &req) if err != nil { return err } sm.userSession = &login.Returnval return nil } func (sm *Manager) Logout(ctx context.Context) error { req := types.Logout{ This: sm.Reference(), } _, err := methods.Logout(ctx, sm.client, &req) if err != nil { return err } sm.userSession = nil return nil } // UserSession retrieves and returns the SessionManager's CurrentSession field. // Nil is returned if the session is not authenticated. func (sm *Manager) UserSession(ctx context.Context) (*types.UserSession, error) { var mgr mo.SessionManager pc := property.DefaultCollector(sm.client) err := pc.RetrieveOne(ctx, sm.Reference(), []string{"currentSession"}, &mgr) if err != nil { // It's OK if we can't retrieve properties because we're not authenticated if f, ok := err.(types.HasFault); ok { switch f.Fault().(type) { case *types.NotAuthenticated: return nil, nil } } return nil, err } return mgr.CurrentSession, nil } func (sm *Manager) TerminateSession(ctx context.Context, sessionId []string) error { req := types.TerminateSession{ This: sm.Reference(), SessionId: sessionId, } _, err := methods.TerminateSession(ctx, sm.client, &req) return err } // SessionIsActive checks whether the session that was created at login is // still valid. This function only works against vCenter. func (sm *Manager) SessionIsActive(ctx context.Context) (bool, error) { if sm.userSession == nil { return false, nil } req := types.SessionIsActive{ This: sm.Reference(), SessionID: sm.userSession.Key, UserName: sm.userSession.UserName, } active, err := methods.SessionIsActive(ctx, sm.client, &req) if err != nil { return false, err } return active.Returnval, err } func (sm *Manager) AcquireGenericServiceTicket(ctx context.Context, spec types.BaseSessionManagerServiceRequestSpec) (*types.SessionManagerGenericServiceTicket, error) { req := types.AcquireGenericServiceTicket{ This: sm.Reference(), Spec: spec, } res, err := methods.AcquireGenericServiceTicket(ctx, sm.client, &req) if err != nil { return nil, err } return &res.Returnval, nil } func (sm *Manager) AcquireLocalTicket(ctx context.Context, userName string) (*types.SessionManagerLocalTicket, error) { req := types.AcquireLocalTicket{ This: sm.Reference(), UserName: userName, } res, err := methods.AcquireLocalTicket(ctx, sm.client, &req) if err != nil { return nil, err } return &res.Returnval, nil } govmomi-0.15.0/session/manager_test.go000066400000000000000000000047651312205533500177500ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package session import ( "context" "net/url" "testing" "github.com/vmware/govmomi/test" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/soap" ) func sessionClient(u *url.URL, t *testing.T) *Manager { soapClient := soap.NewClient(u, true) vimClient, err := vim25.NewClient(context.Background(), soapClient) if err != nil { t.Fatal(err) } return NewManager(vimClient) } func TestLogin(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } session := sessionClient(u, t) err := session.Login(context.Background(), u.User) if err != nil { t.Errorf("Expected no error, got %v", err) } } func TestLogout(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } session := sessionClient(u, t) err := session.Login(context.Background(), u.User) if err != nil { t.Error("Login Error: ", err) } err = session.Logout(context.Background()) if err != nil { t.Errorf("Expected nil, got %v", err) } err = session.Logout(context.Background()) if err == nil { t.Errorf("Expected NotAuthenticated, got nil") } } func TestSessionIsActive(t *testing.T) { u := test.URL() if u == nil { t.SkipNow() } session := sessionClient(u, t) // Skip test against ESXi -- SessionIsActive is not implemented if session.client.ServiceContent.About.ApiType != "VirtualCenter" { t.Skipf("Talking to %s instead of %s", session.client.ServiceContent.About.ApiType, "VirtualCenter") } err := session.Login(context.Background(), u.User) if err != nil { t.Error("Login Error: ", err) } active, err := session.SessionIsActive(context.Background()) if err != nil || !active { t.Errorf("Expected %t, got %t", true, active) t.Errorf("Expected nil, got %v", err) } session.Logout(context.Background()) active, err = session.SessionIsActive(context.Background()) if err == nil || active { t.Errorf("Expected %t, got %t", false, active) t.Errorf("Expected NotAuthenticated, got %v", err) } } govmomi-0.15.0/task/000077500000000000000000000000001312205533500142135ustar00rootroot00000000000000govmomi-0.15.0/task/error.go000066400000000000000000000016311312205533500156740ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package task import "github.com/vmware/govmomi/vim25/types" type Error struct { *types.LocalizedMethodFault } // Error returns the task's localized fault message. func (e Error) Error() string { return e.LocalizedMethodFault.LocalizedMessage } func (e Error) Fault() types.BaseMethodFault { return e.LocalizedMethodFault.Fault } govmomi-0.15.0/task/wait.go000066400000000000000000000063511312205533500155130ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package task import ( "context" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/progress" "github.com/vmware/govmomi/vim25/types" ) type taskProgress struct { info *types.TaskInfo } func (t taskProgress) Percentage() float32 { return float32(t.info.Progress) } func (t taskProgress) Detail() string { return "" } func (t taskProgress) Error() error { if t.info.Error != nil { return Error{t.info.Error} } return nil } type taskCallback struct { ch chan<- progress.Report info *types.TaskInfo err error } func (t *taskCallback) fn(pc []types.PropertyChange) bool { for _, c := range pc { if c.Name != "info" { continue } if c.Op != types.PropertyChangeOpAssign { continue } if c.Val == nil { continue } ti := c.Val.(types.TaskInfo) t.info = &ti } // t.info could be nil if pc can't satify the rules above if t.info == nil { return false } pr := taskProgress{t.info} // Store copy of error, so Wait() can return it as well. t.err = pr.Error() switch t.info.State { case types.TaskInfoStateQueued, types.TaskInfoStateRunning: if t.ch != nil { // Don't care if this is dropped select { case t.ch <- pr: default: } } return false case types.TaskInfoStateSuccess, types.TaskInfoStateError: if t.ch != nil { // Last one must always be delivered t.ch <- pr } return true default: panic("unknown state: " + t.info.State) } } // Wait waits for a task to finish with either success or failure. It does so // by waiting for the "info" property of task managed object to change. The // function returns when it finds the task in the "success" or "error" state. // In the former case, the return value is nil. In the latter case the return // value is an instance of this package's Error struct. // // Any error returned while waiting for property changes causes the function to // return immediately and propagate the error. // // If the progress.Sinker argument is specified, any progress updates for the // task are sent here. The completion percentage is passed through directly. // The detail for the progress update is set to an empty string. If the task // finishes in the error state, the error instance is passed through as well. // Note that this error is the same error that is returned by this function. // func Wait(ctx context.Context, ref types.ManagedObjectReference, pc *property.Collector, s progress.Sinker) (*types.TaskInfo, error) { cb := &taskCallback{} // Include progress sink if specified if s != nil { cb.ch = s.Sink() defer close(cb.ch) } err := property.Wait(ctx, pc, ref, []string{"info"}, cb.fn) if err != nil { return nil, err } return cb.info, cb.err } govmomi-0.15.0/task/wait_test.go000066400000000000000000000023321312205533500165450ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package task import ( "testing" "github.com/vmware/govmomi/vim25/types" ) func TestCallbackFn(t *testing.T) { cb := &taskCallback{} for _, o := range []types.PropertyChangeOp{types.PropertyChangeOpAdd, types.PropertyChangeOpRemove, types.PropertyChangeOpAssign, types.PropertyChangeOpIndirectRemove} { for _, s := range []types.TaskInfoState{types.TaskInfoStateQueued, types.TaskInfoStateRunning, types.TaskInfoStateSuccess, types.TaskInfoStateError} { c := types.PropertyChange{ Name: "info", Op: o, Val: types.TaskInfo{ State: s, }, } t.Logf("Op: %s State: %s", o, s) cb.fn([]types.PropertyChange{c}) } } } govmomi-0.15.0/test/000077500000000000000000000000001312205533500142305ustar00rootroot00000000000000govmomi-0.15.0/test/doc.go000066400000000000000000000014301312205533500153220ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Package test contains functions that implement common functionality between tests. The code (non-test) in this package intentionally does not take any dependendies outside the vim25 tree. */ package test govmomi-0.15.0/test/functional/000077500000000000000000000000001312205533500163725ustar00rootroot00000000000000govmomi-0.15.0/test/functional/helper.go000066400000000000000000000052541312205533500202060ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package functional import ( "context" "testing" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/test" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type Helper struct { *testing.T c *vim25.Client f *find.Finder fns []func() } func NewHelper(t *testing.T) *Helper { h := &Helper{ T: t, c: test.NewAuthenticatedClient(t), fns: make([]func(), 0), } h.f = find.NewFinder(h.c, true) return h } func (h *Helper) Defer(fn func()) { h.fns = append(h.fns, fn) } func (h *Helper) Teardown() { for _, fn := range h.fns { fn() } } func (h *Helper) RequireVirtualCenter() { var expect = "VirtualCenter" var actual = h.c.ServiceContent.About.ApiType if actual != expect { h.Skipf("Requires %s, running against %s", expect, actual) } } func (h *Helper) Datacenter() *object.Datacenter { dc, err := h.f.DefaultDatacenter(context.Background()) if err != nil { h.Fatal(err) } h.f.SetDatacenter(dc) return dc } func (h *Helper) DatacenterFolders() *object.DatacenterFolders { df, err := h.Datacenter().Folders(context.Background()) if err != nil { h.Fatal(err) } return df } func (h *Helper) ComputeResource() *object.ComputeResource { cr, err := h.f.DefaultComputeResource(context.Background()) if err != nil { h.Fatal(err) } return cr } func (h *Helper) LocalDatastores(ctx context.Context, cr *object.ComputeResource) ([]*object.Datastore, error) { // List datastores for compute resource dss, err := cr.Datastores(ctx) if err != nil { return nil, err } // Filter local datastores var ldss []*object.Datastore for _, ds := range dss { var mds mo.Datastore err = property.DefaultCollector(h.c).RetrieveOne(ctx, ds.Reference(), nil, &mds) if err != nil { return nil, err } switch i := mds.Info.(type) { case *types.VmfsDatastoreInfo: if i.Vmfs.Local != nil && *i.Vmfs.Local == true { break } default: continue } ds.InventoryPath = mds.Name ldss = append(ldss, ds) } return ldss, nil } govmomi-0.15.0/test/functional/issue_242_test.go000066400000000000000000000046161312205533500215060ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package functional import ( "context" "fmt" "testing" "time" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) func TestIssue242(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() h := NewHelper(t) defer h.Teardown() h.RequireVirtualCenter() df, err := h.Datacenter().Folders(ctx) if err != nil { t.Fatal(err) } cr := h.ComputeResource() // Get local datastores for compute resource dss, err := h.LocalDatastores(ctx, cr) if err != nil { t.Fatal(err) } if len(dss) == 0 { t.Fatalf("No local datastores") } // Get root resource pool for compute resource rp, err := cr.ResourcePool(ctx) if err != nil { t.Fatal(err) } spec := types.VirtualMachineConfigSpec{ Name: fmt.Sprintf("govmomi-test-%s", time.Now().Format(time.RFC3339)), Files: &types.VirtualMachineFileInfo{VmPathName: fmt.Sprintf("[%s]", dss[0].Name())}, NumCPUs: 1, MemoryMB: 32, } // Create new VM task, err := df.VmFolder.CreateVM(context.Background(), spec, rp, nil) if err != nil { t.Fatal(err) } info, err := task.WaitForResult(context.Background(), nil) if err != nil { t.Fatal(err) } vm := object.NewVirtualMachine(h.c, info.Result.(types.ManagedObjectReference)) defer func() { task, err := vm.Destroy(context.Background()) if err != nil { panic(err) } err = task.Wait(context.Background()) if err != nil { panic(err) } }() // Mark VM as template err = vm.MarkAsTemplate(context.Background()) if err != nil { t.Fatal(err) } // Get "environmentBrowser" property for VM template var mvm mo.VirtualMachine err = property.DefaultCollector(h.c).RetrieveOne(ctx, vm.Reference(), []string{"environmentBrowser"}, &mvm) if err != nil { t.Fatal(err) } } govmomi-0.15.0/test/helper.go000066400000000000000000000032451312205533500160420ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package test import ( "context" "net/url" "os" "testing" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // URL parses the GOVMOMI_TEST_URL environment variable if set. func URL() *url.URL { s := os.Getenv("GOVMOMI_TEST_URL") if s == "" { return nil } u, err := soap.ParseURL(s) if err != nil { panic(err) } return u } // NewAuthenticatedClient creates a new vim25.Client, authenticates the user // specified in the test URL, and returns it. func NewAuthenticatedClient(t *testing.T) *vim25.Client { u := URL() if u == nil { t.SkipNow() } soapClient := soap.NewClient(u, true) vimClient, err := vim25.NewClient(context.Background(), soapClient) if err != nil { t.Fatal(err) } req := types.Login{ This: *vimClient.ServiceContent.SessionManager, } req.UserName = u.User.Username() if pw, ok := u.User.Password(); ok { req.Password = pw } _, err = methods.Login(context.Background(), vimClient, &req) if err != nil { t.Fatal(err) } return vimClient } govmomi-0.15.0/units/000077500000000000000000000000001312205533500144135ustar00rootroot00000000000000govmomi-0.15.0/units/size.go000066400000000000000000000043551312205533500157230ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package units import ( "errors" "fmt" "regexp" "strconv" ) type ByteSize int64 const ( _ = iota KB = 1 << (10 * iota) MB GB TB PB EB ) func (b ByteSize) String() string { switch { case b >= EB: return fmt.Sprintf("%.1fEB", float32(b)/EB) case b >= PB: return fmt.Sprintf("%.1fPB", float32(b)/PB) case b >= TB: return fmt.Sprintf("%.1fTB", float32(b)/TB) case b >= GB: return fmt.Sprintf("%.1fGB", float32(b)/GB) case b >= MB: return fmt.Sprintf("%.1fMB", float32(b)/MB) case b >= KB: return fmt.Sprintf("%.1fKB", float32(b)/KB) } return fmt.Sprintf("%dB", b) } type FileSize int64 func (b FileSize) String() string { switch { case b >= EB: return fmt.Sprintf("%.1fE", float32(b)/EB) case b >= PB: return fmt.Sprintf("%.1fP", float32(b)/PB) case b >= TB: return fmt.Sprintf("%.1fT", float32(b)/TB) case b >= GB: return fmt.Sprintf("%.1fG", float32(b)/GB) case b >= MB: return fmt.Sprintf("%.1fM", float32(b)/MB) case b >= KB: return fmt.Sprintf("%.1fK", float32(b)/KB) } return fmt.Sprintf("%d", b) } var bytesRegexp = regexp.MustCompile(`^(?i)(\d+)([BKMGTPE]?)(ib|b)?$`) func (b *ByteSize) Set(s string) error { m := bytesRegexp.FindStringSubmatch(s) if len(m) == 0 { return errors.New("invalid byte value") } i, err := strconv.ParseInt(m[1], 10, 64) if err != nil { return err } *b = ByteSize(i) switch m[2] { case "B", "b", "": case "K", "k": *b *= ByteSize(KB) case "M", "m": *b *= ByteSize(MB) case "G", "g": *b *= ByteSize(GB) case "T", "t": *b *= ByteSize(TB) case "P", "p": *b *= ByteSize(PB) case "E", "e": *b *= ByteSize(EB) default: return errors.New("invalid byte suffix") } return nil } govmomi-0.15.0/units/size_test.go000066400000000000000000000061431312205533500167570ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package units import ( "fmt" "math" "testing" ) func TestMB(t *testing.T) { b := ByteSize(1024 * 1024) expected := "1.0MB" if b.String() != expected { t.Errorf("Expected '%v' but got '%v'", expected, b) } } func TestTenMB(t *testing.T) { b := ByteSize(10 * 1024 * 1024) actual := fmt.Sprintf("%s", b) expected := "10.0MB" if actual != expected { t.Errorf("Expected '%v' but got '%v'", expected, actual) } } func assertEquals(t *testing.T, expected string, actual ByteSize) { if expected != actual.String() { t.Errorf("Expected '%v' but got '%v'", expected, actual.String()) } } func TestByteSize(t *testing.T) { assertEquals(t, "1B", ByteSize(1)) assertEquals(t, "10B", ByteSize(10)) assertEquals(t, "100B", ByteSize(100)) assertEquals(t, "1000B", ByteSize(1000)) assertEquals(t, "1.0KB", ByteSize(1024)) assertEquals(t, "1.0MB", ByteSize(1024*1024)) assertEquals(t, "1.0MB", ByteSize(1048576)) assertEquals(t, "10.0MB", ByteSize(10*math.Pow(1024, 2))) assertEquals(t, "1.0GB", ByteSize(1024*1024*1024)) assertEquals(t, "1.0TB", ByteSize(1024*1024*1024*1024)) assertEquals(t, "1.0TB", ByteSize(1048576*1048576)) assertEquals(t, "1.0PB", ByteSize(1024*1024*1024*1024*1024)) assertEquals(t, "1.0EB", ByteSize(1024*1024*1024*1024*1024*1024)) assertEquals(t, "1.0EB", ByteSize(1048576*1048576*1048576)) } func TestByteSizeSet(t *testing.T) { var tests = []struct { In string OutStr string Out ByteSize }{ { In: "345", OutStr: "345B", Out: 345.0, }, { In: "345b", OutStr: "345B", Out: 345.0, }, { In: "345K", OutStr: "345.0KB", Out: 345 * KB, }, { In: "345kb", OutStr: "345.0KB", Out: 345 * KB, }, { In: "345kib", OutStr: "345.0KB", Out: 345 * KB, }, { In: "345KiB", OutStr: "345.0KB", Out: 345 * KB, }, { In: "345M", OutStr: "345.0MB", Out: 345 * MB, }, { In: "345G", OutStr: "345.0GB", Out: 345 * GB, }, { In: "345T", OutStr: "345.0TB", Out: 345 * TB, }, { In: "345P", OutStr: "345.0PB", Out: 345 * PB, }, { In: "3E", OutStr: "3.0EB", Out: 3 * EB, }, } for _, test := range tests { var v ByteSize err := v.Set(test.In) if err != nil { t.Errorf("Error: %s [%v]", err, test.In) continue } if v != test.Out { t.Errorf("Out: expect '%v' actual '%v'", test.Out, v) continue } if v.String() != test.OutStr { t.Errorf("String: expect '%v' actual '%v'", test.OutStr, v.String()) } } } govmomi-0.15.0/vendor/000077500000000000000000000000001312205533500145465ustar00rootroot00000000000000govmomi-0.15.0/vendor/github.com/000077500000000000000000000000001312205533500166055ustar00rootroot00000000000000govmomi-0.15.0/vendor/github.com/davecgh/000077500000000000000000000000001312205533500202065ustar00rootroot00000000000000govmomi-0.15.0/vendor/github.com/davecgh/go-spew/000077500000000000000000000000001312205533500215675ustar00rootroot00000000000000govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/000077500000000000000000000000001312205533500225455ustar00rootroot00000000000000govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/LICENSE000066400000000000000000000013731312205533500235560ustar00rootroot00000000000000ISC License Copyright (c) 2012-2013 Dave Collins Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/bypass.go000066400000000000000000000132301312205533500243740ustar00rootroot00000000000000// Copyright (c) 2015 Dave Collins // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // NOTE: Due to the following build constraints, this file will only be compiled // when the code is not running on Google App Engine, compiled by GopherJS, and // "-tags safe" is not added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. // +build !js,!appengine,!safe,!disableunsafe package spew import ( "reflect" "unsafe" ) const ( // UnsafeDisabled is a build-time constant which specifies whether or // not access to the unsafe package is available. UnsafeDisabled = false // ptrSize is the size of a pointer on the current arch. ptrSize = unsafe.Sizeof((*byte)(nil)) ) var ( // offsetPtr, offsetScalar, and offsetFlag are the offsets for the // internal reflect.Value fields. These values are valid before golang // commit ecccf07e7f9d which changed the format. The are also valid // after commit 82f48826c6c7 which changed the format again to mirror // the original format. Code in the init function updates these offsets // as necessary. offsetPtr = uintptr(ptrSize) offsetScalar = uintptr(0) offsetFlag = uintptr(ptrSize * 2) // flagKindWidth and flagKindShift indicate various bits that the // reflect package uses internally to track kind information. // // flagRO indicates whether or not the value field of a reflect.Value is // read-only. // // flagIndir indicates whether the value field of a reflect.Value is // the actual data or a pointer to the data. // // These values are valid before golang commit 90a7c3c86944 which // changed their positions. Code in the init function updates these // flags as necessary. flagKindWidth = uintptr(5) flagKindShift = uintptr(flagKindWidth - 1) flagRO = uintptr(1 << 0) flagIndir = uintptr(1 << 1) ) func init() { // Older versions of reflect.Value stored small integers directly in the // ptr field (which is named val in the older versions). Versions // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named // scalar for this purpose which unfortunately came before the flag // field, so the offset of the flag field is different for those // versions. // // This code constructs a new reflect.Value from a known small integer // and checks if the size of the reflect.Value struct indicates it has // the scalar field. When it does, the offsets are updated accordingly. vv := reflect.ValueOf(0xf00) if unsafe.Sizeof(vv) == (ptrSize * 4) { offsetScalar = ptrSize * 2 offsetFlag = ptrSize * 3 } // Commit 90a7c3c86944 changed the flag positions such that the low // order bits are the kind. This code extracts the kind from the flags // field and ensures it's the correct type. When it's not, the flag // order has been changed to the newer format, so the flags are updated // accordingly. upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) upfv := *(*uintptr)(upf) flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { flagKindShift = 0 flagRO = 1 << 5 flagIndir = 1 << 6 // Commit adf9b30e5594 modified the flags to separate the // flagRO flag into two bits which specifies whether or not the // field is embedded. This causes flagIndir to move over a bit // and means that flagRO is the combination of either of the // original flagRO bit and the new bit. // // This code detects the change by extracting what used to be // the indirect bit to ensure it's set. When it's not, the flag // order has been changed to the newer format, so the flags are // updated accordingly. if upfv&flagIndir == 0 { flagRO = 3 << 5 flagIndir = 1 << 7 } } } // unsafeReflectValue converts the passed reflect.Value into a one that bypasses // the typical safety restrictions preventing access to unaddressable and // unexported data. It works by digging the raw pointer to the underlying // value out of the protected value and generating a new unprotected (unsafe) // reflect.Value to it. // // This allows us to check for implementations of the Stringer and error // interfaces to be used for pretty printing ordinarily unaddressable and // inaccessible values such as unexported struct fields. func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { indirects := 1 vt := v.Type() upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) if rvf&flagIndir != 0 { vt = reflect.PtrTo(v.Type()) indirects++ } else if offsetScalar != 0 { // The value is in the scalar field when it's not one of the // reference types. switch vt.Kind() { case reflect.Uintptr: case reflect.Chan: case reflect.Func: case reflect.Map: case reflect.Ptr: case reflect.UnsafePointer: default: upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetScalar) } } pv := reflect.NewAt(vt, upv) rv = pv for i := 0; i < indirects; i++ { rv = rv.Elem() } return rv } govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go000066400000000000000000000033011312205533500252310ustar00rootroot00000000000000// Copyright (c) 2015 Dave Collins // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // NOTE: Due to the following build constraints, this file will only be compiled // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. // +build js appengine safe disableunsafe package spew import "reflect" const ( // UnsafeDisabled is a build-time constant which specifies whether or // not access to the unsafe package is available. UnsafeDisabled = true ) // unsafeReflectValue typically converts the passed reflect.Value into a one // that bypasses the typical safety restrictions preventing access to // unaddressable and unexported data. However, doing this relies on access to // the unsafe package. This is a stub version which simply returns the passed // reflect.Value when the unsafe package is not available. func unsafeReflectValue(v reflect.Value) reflect.Value { return v } govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/common.go000066400000000000000000000241671312205533500243760ustar00rootroot00000000000000/* * Copyright (c) 2013 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "fmt" "io" "reflect" "sort" "strconv" ) // Some constants in the form of bytes to avoid string overhead. This mirrors // the technique used in the fmt package. var ( panicBytes = []byte("(PANIC=") plusBytes = []byte("+") iBytes = []byte("i") trueBytes = []byte("true") falseBytes = []byte("false") interfaceBytes = []byte("(interface {})") commaNewlineBytes = []byte(",\n") newlineBytes = []byte("\n") openBraceBytes = []byte("{") openBraceNewlineBytes = []byte("{\n") closeBraceBytes = []byte("}") asteriskBytes = []byte("*") colonBytes = []byte(":") colonSpaceBytes = []byte(": ") openParenBytes = []byte("(") closeParenBytes = []byte(")") spaceBytes = []byte(" ") pointerChainBytes = []byte("->") nilAngleBytes = []byte("") maxNewlineBytes = []byte("\n") maxShortBytes = []byte("") circularBytes = []byte("") circularShortBytes = []byte("") invalidAngleBytes = []byte("") openBracketBytes = []byte("[") closeBracketBytes = []byte("]") percentBytes = []byte("%") precisionBytes = []byte(".") openAngleBytes = []byte("<") closeAngleBytes = []byte(">") openMapBytes = []byte("map[") closeMapBytes = []byte("]") lenEqualsBytes = []byte("len=") capEqualsBytes = []byte("cap=") ) // hexDigits is used to map a decimal value to a hex digit. var hexDigits = "0123456789abcdef" // catchPanic handles any panics that might occur during the handleMethods // calls. func catchPanic(w io.Writer, v reflect.Value) { if err := recover(); err != nil { w.Write(panicBytes) fmt.Fprintf(w, "%v", err) w.Write(closeParenBytes) } } // handleMethods attempts to call the Error and String methods on the underlying // type the passed reflect.Value represents and outputes the result to Writer w. // // It handles panics in any called methods by catching and displaying the error // as the formatted value. func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) { // We need an interface to check if the type implements the error or // Stringer interface. However, the reflect package won't give us an // interface on certain things like unexported struct fields in order // to enforce visibility rules. We use unsafe, when it's available, // to bypass these restrictions since this package does not mutate the // values. if !v.CanInterface() { if UnsafeDisabled { return false } v = unsafeReflectValue(v) } // Choose whether or not to do error and Stringer interface lookups against // the base type or a pointer to the base type depending on settings. // Technically calling one of these methods with a pointer receiver can // mutate the value, however, types which choose to satisify an error or // Stringer interface with a pointer receiver should not be mutating their // state inside these interface methods. if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() { v = unsafeReflectValue(v) } if v.CanAddr() { v = v.Addr() } // Is it an error or Stringer? switch iface := v.Interface().(type) { case error: defer catchPanic(w, v) if cs.ContinueOnMethod { w.Write(openParenBytes) w.Write([]byte(iface.Error())) w.Write(closeParenBytes) w.Write(spaceBytes) return false } w.Write([]byte(iface.Error())) return true case fmt.Stringer: defer catchPanic(w, v) if cs.ContinueOnMethod { w.Write(openParenBytes) w.Write([]byte(iface.String())) w.Write(closeParenBytes) w.Write(spaceBytes) return false } w.Write([]byte(iface.String())) return true } return false } // printBool outputs a boolean value as true or false to Writer w. func printBool(w io.Writer, val bool) { if val { w.Write(trueBytes) } else { w.Write(falseBytes) } } // printInt outputs a signed integer value to Writer w. func printInt(w io.Writer, val int64, base int) { w.Write([]byte(strconv.FormatInt(val, base))) } // printUint outputs an unsigned integer value to Writer w. func printUint(w io.Writer, val uint64, base int) { w.Write([]byte(strconv.FormatUint(val, base))) } // printFloat outputs a floating point value using the specified precision, // which is expected to be 32 or 64bit, to Writer w. func printFloat(w io.Writer, val float64, precision int) { w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision))) } // printComplex outputs a complex value using the specified float precision // for the real and imaginary parts to Writer w. func printComplex(w io.Writer, c complex128, floatPrecision int) { r := real(c) w.Write(openParenBytes) w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision))) i := imag(c) if i >= 0 { w.Write(plusBytes) } w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision))) w.Write(iBytes) w.Write(closeParenBytes) } // printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. num := uint64(p) if num == 0 { w.Write(nilAngleBytes) return } // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix buf := make([]byte, 18) // It's simpler to construct the hex string right to left. base := uint64(16) i := len(buf) - 1 for num >= base { buf[i] = hexDigits[num%base] num /= base i-- } buf[i] = hexDigits[num] // Add '0x' prefix. i-- buf[i] = 'x' i-- buf[i] = '0' // Strip unused leading bytes. buf = buf[i:] w.Write(buf) } // valuesSorter implements sort.Interface to allow a slice of reflect.Value // elements to be sorted. type valuesSorter struct { values []reflect.Value strings []string // either nil or same len and values cs *ConfigState } // newValuesSorter initializes a valuesSorter instance, which holds a set of // surrogate keys on which the data should be sorted. It uses flags in // ConfigState to decide if and how to populate those surrogate keys. func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface { vs := &valuesSorter{values: values, cs: cs} if canSortSimply(vs.values[0].Kind()) { return vs } if !cs.DisableMethods { vs.strings = make([]string, len(values)) for i := range vs.values { b := bytes.Buffer{} if !handleMethods(cs, &b, vs.values[i]) { vs.strings = nil break } vs.strings[i] = b.String() } } if vs.strings == nil && cs.SpewKeys { vs.strings = make([]string, len(values)) for i := range vs.values { vs.strings[i] = Sprintf("%#v", vs.values[i].Interface()) } } return vs } // canSortSimply tests whether a reflect.Kind is a primitive that can be sorted // directly, or whether it should be considered for sorting by surrogate keys // (if the ConfigState allows it). func canSortSimply(kind reflect.Kind) bool { // This switch parallels valueSortLess, except for the default case. switch kind { case reflect.Bool: return true case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: return true case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: return true case reflect.Float32, reflect.Float64: return true case reflect.String: return true case reflect.Uintptr: return true case reflect.Array: return true } return false } // Len returns the number of values in the slice. It is part of the // sort.Interface implementation. func (s *valuesSorter) Len() int { return len(s.values) } // Swap swaps the values at the passed indices. It is part of the // sort.Interface implementation. func (s *valuesSorter) Swap(i, j int) { s.values[i], s.values[j] = s.values[j], s.values[i] if s.strings != nil { s.strings[i], s.strings[j] = s.strings[j], s.strings[i] } } // valueSortLess returns whether the first value should sort before the second // value. It is used by valueSorter.Less as part of the sort.Interface // implementation. func valueSortLess(a, b reflect.Value) bool { switch a.Kind() { case reflect.Bool: return !a.Bool() && b.Bool() case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: return a.Int() < b.Int() case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: return a.Uint() < b.Uint() case reflect.Float32, reflect.Float64: return a.Float() < b.Float() case reflect.String: return a.String() < b.String() case reflect.Uintptr: return a.Uint() < b.Uint() case reflect.Array: // Compare the contents of both arrays. l := a.Len() for i := 0; i < l; i++ { av := a.Index(i) bv := b.Index(i) if av.Interface() == bv.Interface() { continue } return valueSortLess(av, bv) } } return a.String() < b.String() } // Less returns whether the value at index i should sort before the // value at index j. It is part of the sort.Interface implementation. func (s *valuesSorter) Less(i, j int) bool { if s.strings == nil { return valueSortLess(s.values[i], s.values[j]) } return s.strings[i] < s.strings[j] } // sortValues is a sort function that handles both native types and any type that // can be converted to error or Stringer. Other inputs are sorted according to // their Value.String() value to ensure display stability. func sortValues(values []reflect.Value, cs *ConfigState) { if len(values) == 0 { return } sort.Sort(newValuesSorter(values, cs)) } govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/config.go000066400000000000000000000310451312205533500243440ustar00rootroot00000000000000/* * Copyright (c) 2013 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "fmt" "io" "os" ) // ConfigState houses the configuration options used by spew to format and // display values. There is a global instance, Config, that is used to control // all top-level Formatter and Dump functionality. Each ConfigState instance // provides methods equivalent to the top-level functions. // // The zero value for ConfigState provides no indentation. You would typically // want to set it to a space or a tab. // // Alternatively, you can use NewDefaultConfig to get a ConfigState instance // with default settings. See the documentation of NewDefaultConfig for default // values. type ConfigState struct { // Indent specifies the string to use for each indentation level. The // global config instance that all top-level functions use set this to a // single space by default. If you would like more indentation, you might // set this to a tab with "\t" or perhaps two spaces with " ". Indent string // MaxDepth controls the maximum number of levels to descend into nested // data structures. The default, 0, means there is no limit. // // NOTE: Circular data structures are properly detected, so it is not // necessary to set this value unless you specifically want to limit deeply // nested data structures. MaxDepth int // DisableMethods specifies whether or not error and Stringer interfaces are // invoked for types that implement them. DisableMethods bool // DisablePointerMethods specifies whether or not to check for and invoke // error and Stringer interfaces on types which only accept a pointer // receiver when the current type is not a pointer. // // NOTE: This might be an unsafe action since calling one of these methods // with a pointer receiver could technically mutate the value, however, // in practice, types which choose to satisify an error or Stringer // interface with a pointer receiver should not be mutating their state // inside these interface methods. As a result, this option relies on // access to the unsafe package, so it will not have any effect when // running in environments without access to the unsafe package such as // Google App Engine or with the "safe" build tag specified. DisablePointerMethods bool // DisablePointerAddresses specifies whether to disable the printing of // pointer addresses. This is useful when diffing data structures in tests. DisablePointerAddresses bool // DisableCapacities specifies whether to disable the printing of capacities // for arrays, slices, maps and channels. This is useful when diffing // data structures in tests. DisableCapacities bool // ContinueOnMethod specifies whether or not recursion should continue once // a custom error or Stringer interface is invoked. The default, false, // means it will print the results of invoking the custom error or Stringer // interface and return immediately instead of continuing to recurse into // the internals of the data type. // // NOTE: This flag does not have any effect if method invocation is disabled // via the DisableMethods or DisablePointerMethods options. ContinueOnMethod bool // SortKeys specifies map keys should be sorted before being printed. Use // this to have a more deterministic, diffable output. Note that only // native types (bool, int, uint, floats, uintptr and string) and types // that support the error or Stringer interfaces (if methods are // enabled) are supported, with other types sorted according to the // reflect.Value.String() output which guarantees display stability. SortKeys bool // SpewKeys specifies that, as a last resort attempt, map keys should // be spewed to strings and sorted by those strings. This is only // considered if SortKeys is true. SpewKeys bool } // Config is the active configuration of the top-level functions. // The configuration can be changed by modifying the contents of spew.Config. var Config = ConfigState{Indent: " "} // Errorf is a wrapper for fmt.Errorf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the formatted string as a value that satisfies error. See NewFormatter // for formatting details. // // This function is shorthand for the following syntax: // // fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) { return fmt.Errorf(format, c.convertArgs(a)...) } // Fprint is a wrapper for fmt.Fprint that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprint(w, c.convertArgs(a)...) } // Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { return fmt.Fprintf(w, format, c.convertArgs(a)...) } // Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it // passed with a Formatter interface returned by c.NewFormatter. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprintln(w, c.convertArgs(a)...) } // Print is a wrapper for fmt.Print that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Print(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Print(a ...interface{}) (n int, err error) { return fmt.Print(c.convertArgs(a)...) } // Printf is a wrapper for fmt.Printf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) { return fmt.Printf(format, c.convertArgs(a)...) } // Println is a wrapper for fmt.Println that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Println(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Println(a ...interface{}) (n int, err error) { return fmt.Println(c.convertArgs(a)...) } // Sprint is a wrapper for fmt.Sprint that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Sprint(a ...interface{}) string { return fmt.Sprint(c.convertArgs(a)...) } // Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Sprintf(format string, a ...interface{}) string { return fmt.Sprintf(format, c.convertArgs(a)...) } // Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it // were passed with a Formatter interface returned by c.NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Sprintln(a ...interface{}) string { return fmt.Sprintln(c.convertArgs(a)...) } /* NewFormatter returns a custom formatter that satisfies the fmt.Formatter interface. As a result, it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatter only responds to the %v (most compact), %+v (adds pointer addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb combinations. Any other verbs such as %x and %q will be sent to the the standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). Typically this function shouldn't be called directly. It is much easier to make use of the custom formatter by calling one of the convenience functions such as c.Printf, c.Println, or c.Printf. */ func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter { return newFormatter(c, v) } // Fdump formats and displays the passed arguments to io.Writer w. It formats // exactly the same as Dump. func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) { fdump(c, w, a...) } /* Dump displays the passed parameters to standard out with newlines, customizable indentation, and additional debug information such as complete types and all pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly * Custom Stringer/error interfaces are optionally invoked, including on unexported types * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables * Byte arrays and slices are dumped like the hexdump -C command which includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to get the formatted result as a string. */ func (c *ConfigState) Dump(a ...interface{}) { fdump(c, os.Stdout, a...) } // Sdump returns a string with the passed arguments formatted exactly the same // as Dump. func (c *ConfigState) Sdump(a ...interface{}) string { var buf bytes.Buffer fdump(c, &buf, a...) return buf.String() } // convertArgs accepts a slice of arguments and returns a slice of the same // length with each argument converted to a spew Formatter interface using // the ConfigState associated with s. func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) { formatters = make([]interface{}, len(args)) for index, arg := range args { formatters[index] = newFormatter(c, arg) } return formatters } // NewDefaultConfig returns a ConfigState with the following default settings. // // Indent: " " // MaxDepth: 0 // DisableMethods: false // DisablePointerMethods: false // ContinueOnMethod: false // SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/doc.go000066400000000000000000000177311312205533500236520ustar00rootroot00000000000000/* * Copyright (c) 2013 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Package spew implements a deep pretty printer for Go data structures to aid in debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly * Custom Stringer/error interfaces are optionally invoked, including on unexported types * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables * Byte arrays and slices are dumped like the hexdump -C command which includes offsets, byte values in hex, and ASCII output (only when using Dump style) There are two different approaches spew allows for dumping Go data structures: * Dump style which prints with newlines, customizable indentation, and additional debug information such as types and all pointer addresses used to indirect to the final value * A custom Formatter interface that integrates cleanly with the standard fmt package and replaces %v, %+v, %#v, and %#+v to provide inline printing similar to the default %v while providing the additional functionality outlined above and passing unsupported format verbs such as %x and %q along to fmt Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available via the spew.Config global. It is also possible to create a ConfigState instance that provides methods equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: * Indent String to use for each indentation level for Dump functions. It is a single space by default. A popular alternative is "\t". * MaxDepth Maximum number of levels to descend into nested data structures. There is no limit by default. * DisableMethods Disables invocation of error and Stringer interface methods. Method invocation is enabled by default. * DisablePointerMethods Disables invocation of error and Stringer interface methods on types which only accept pointer receivers from non-pointer variables. Pointer method invocation is enabled by default. * ContinueOnMethod Enables recursion into types after invoking error and Stringer interface methods. Recursion after method invocation is disabled by default. * SortKeys Specifies map keys should be sorted before being printed. Use this to have a more deterministic, diffable output. Note that only native types (bool, int, uint, floats, uintptr and string) and types which implement error or Stringer interfaces are supported with other types sorted according to the reflect.Value.String() output which guarantees display stability. Natural map order is used by default. * SpewKeys Specifies that, as a last resort attempt, map keys should be spewed to strings and sorted by those strings. This is only considered if SortKeys is true. Dump Usage Simply call spew.Dump with a list of variables you want to dump: spew.Dump(myVar1, myVar2, ...) You may also call spew.Fdump if you would prefer to output to an arbitrary io.Writer. For example, to dump to standard error: spew.Fdump(os.Stderr, myVar1, myVar2, ...) A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. (main.Foo) { unexportedField: (*main.Bar)(0xf84002e210)({ flag: (main.Flag) flagTwo, data: (uintptr) }), ExportedField: (map[interface {}]interface {}) (len=1) { (string) (len=3) "one": (bool) true } } Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatter only responds to the %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb combinations. Any other verbs such as %x and %q will be sent to the the standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The functions have syntax you are most likely already familiar with: spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Println(myVar, myVar2) spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) See the Index for the full list convenience functions. Sample Formatter Output Double pointer to a uint8: %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} See the Printf example for details on the setup of variables being shown here. Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information inline with the output. Since spew is intended to provide deep pretty printing capabilities on structures, it intentionally does not return any errors. */ package spew govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/dump.go000066400000000000000000000327601312205533500240510ustar00rootroot00000000000000/* * Copyright (c) 2013 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "encoding/hex" "fmt" "io" "os" "reflect" "regexp" "strconv" "strings" ) var ( // uint8Type is a reflect.Type representing a uint8. It is used to // convert cgo types to uint8 slices for hexdumping. uint8Type = reflect.TypeOf(uint8(0)) // cCharRE is a regular expression that matches a cgo char. // It is used to detect character arrays to hexdump them. cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") // cUnsignedCharRE is a regular expression that matches a cgo unsigned // char. It is used to detect unsigned character arrays to hexdump // them. cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") // cUint8tCharRE is a regular expression that matches a cgo uint8_t. // It is used to detect uint8_t arrays to hexdump them. cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") ) // dumpState contains information about the state of a dump operation. type dumpState struct { w io.Writer depth int pointers map[uintptr]int ignoreNextType bool ignoreNextIndent bool cs *ConfigState } // indent performs indentation according to the depth level and cs.Indent // option. func (d *dumpState) indent() { if d.ignoreNextIndent { d.ignoreNextIndent = false return } d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth)) } // unpackValue returns values inside of non-nil interfaces when possible. // This is useful for data types like structs, arrays, slices, and maps which // can contain varying types packed inside an interface. func (d *dumpState) unpackValue(v reflect.Value) reflect.Value { if v.Kind() == reflect.Interface && !v.IsNil() { v = v.Elem() } return v } // dumpPtr handles formatting of pointers by indirecting them as necessary. func (d *dumpState) dumpPtr(v reflect.Value) { // Remove pointers at or below the current depth from map used to detect // circular refs. for k, depth := range d.pointers { if depth >= d.depth { delete(d.pointers, k) } } // Keep list of all dereferenced pointers to show later. pointerChain := make([]uintptr, 0) // Figure out how many levels of indirection there are by dereferencing // pointers and unpacking interfaces down the chain while detecting circular // references. nilFound := false cycleFound := false indirects := 0 ve := v for ve.Kind() == reflect.Ptr { if ve.IsNil() { nilFound = true break } indirects++ addr := ve.Pointer() pointerChain = append(pointerChain, addr) if pd, ok := d.pointers[addr]; ok && pd < d.depth { cycleFound = true indirects-- break } d.pointers[addr] = d.depth ve = ve.Elem() if ve.Kind() == reflect.Interface { if ve.IsNil() { nilFound = true break } ve = ve.Elem() } } // Display type information. d.w.Write(openParenBytes) d.w.Write(bytes.Repeat(asteriskBytes, indirects)) d.w.Write([]byte(ve.Type().String())) d.w.Write(closeParenBytes) // Display pointer information. if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 { d.w.Write(openParenBytes) for i, addr := range pointerChain { if i > 0 { d.w.Write(pointerChainBytes) } printHexPtr(d.w, addr) } d.w.Write(closeParenBytes) } // Display dereferenced value. d.w.Write(openParenBytes) switch { case nilFound == true: d.w.Write(nilAngleBytes) case cycleFound == true: d.w.Write(circularBytes) default: d.ignoreNextType = true d.dump(ve) } d.w.Write(closeParenBytes) } // dumpSlice handles formatting of arrays and slices. Byte (uint8 under // reflection) arrays and slices are dumped in hexdump -C fashion. func (d *dumpState) dumpSlice(v reflect.Value) { // Determine whether this type should be hex dumped or not. Also, // for types which should be hexdumped, try to use the underlying data // first, then fall back to trying to convert them to a uint8 slice. var buf []uint8 doConvert := false doHexDump := false numEntries := v.Len() if numEntries > 0 { vt := v.Index(0).Type() vts := vt.String() switch { // C types that need to be converted. case cCharRE.MatchString(vts): fallthrough case cUnsignedCharRE.MatchString(vts): fallthrough case cUint8tCharRE.MatchString(vts): doConvert = true // Try to use existing uint8 slices and fall back to converting // and copying if that fails. case vt.Kind() == reflect.Uint8: // We need an addressable interface to convert the type // to a byte slice. However, the reflect package won't // give us an interface on certain things like // unexported struct fields in order to enforce // visibility rules. We use unsafe, when available, to // bypass these restrictions since this package does not // mutate the values. vs := v if !vs.CanInterface() || !vs.CanAddr() { vs = unsafeReflectValue(vs) } if !UnsafeDisabled { vs = vs.Slice(0, numEntries) // Use the existing uint8 slice if it can be // type asserted. iface := vs.Interface() if slice, ok := iface.([]uint8); ok { buf = slice doHexDump = true break } } // The underlying data needs to be converted if it can't // be type asserted to a uint8 slice. doConvert = true } // Copy and convert the underlying type if needed. if doConvert && vt.ConvertibleTo(uint8Type) { // Convert and copy each element into a uint8 byte // slice. buf = make([]uint8, numEntries) for i := 0; i < numEntries; i++ { vv := v.Index(i) buf[i] = uint8(vv.Convert(uint8Type).Uint()) } doHexDump = true } } // Hexdump the entire slice as needed. if doHexDump { indent := strings.Repeat(d.cs.Indent, d.depth) str := indent + hex.Dump(buf) str = strings.Replace(str, "\n", "\n"+indent, -1) str = strings.TrimRight(str, d.cs.Indent) d.w.Write([]byte(str)) return } // Recursively call dump for each item. for i := 0; i < numEntries; i++ { d.dump(d.unpackValue(v.Index(i))) if i < (numEntries - 1) { d.w.Write(commaNewlineBytes) } else { d.w.Write(newlineBytes) } } } // dump is the main workhorse for dumping a value. It uses the passed reflect // value to figure out what kind of object we are dealing with and formats it // appropriately. It is a recursive function, however circular data structures // are detected and handled properly. func (d *dumpState) dump(v reflect.Value) { // Handle invalid reflect values immediately. kind := v.Kind() if kind == reflect.Invalid { d.w.Write(invalidAngleBytes) return } // Handle pointers specially. if kind == reflect.Ptr { d.indent() d.dumpPtr(v) return } // Print type information unless already handled elsewhere. if !d.ignoreNextType { d.indent() d.w.Write(openParenBytes) d.w.Write([]byte(v.Type().String())) d.w.Write(closeParenBytes) d.w.Write(spaceBytes) } d.ignoreNextType = false // Display length and capacity if the built-in len and cap functions // work with the value's kind and the len/cap itself is non-zero. valueLen, valueCap := 0, 0 switch v.Kind() { case reflect.Array, reflect.Slice, reflect.Chan: valueLen, valueCap = v.Len(), v.Cap() case reflect.Map, reflect.String: valueLen = v.Len() } if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 { d.w.Write(openParenBytes) if valueLen != 0 { d.w.Write(lenEqualsBytes) printInt(d.w, int64(valueLen), 10) } if !d.cs.DisableCapacities && valueCap != 0 { if valueLen != 0 { d.w.Write(spaceBytes) } d.w.Write(capEqualsBytes) printInt(d.w, int64(valueCap), 10) } d.w.Write(closeParenBytes) d.w.Write(spaceBytes) } // Call Stringer/error interfaces if they exist and the handle methods flag // is enabled if !d.cs.DisableMethods { if (kind != reflect.Invalid) && (kind != reflect.Interface) { if handled := handleMethods(d.cs, d.w, v); handled { return } } } switch kind { case reflect.Invalid: // Do nothing. We should never get here since invalid has already // been handled above. case reflect.Bool: printBool(d.w, v.Bool()) case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: printInt(d.w, v.Int(), 10) case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: printUint(d.w, v.Uint(), 10) case reflect.Float32: printFloat(d.w, v.Float(), 32) case reflect.Float64: printFloat(d.w, v.Float(), 64) case reflect.Complex64: printComplex(d.w, v.Complex(), 32) case reflect.Complex128: printComplex(d.w, v.Complex(), 64) case reflect.Slice: if v.IsNil() { d.w.Write(nilAngleBytes) break } fallthrough case reflect.Array: d.w.Write(openBraceNewlineBytes) d.depth++ if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { d.indent() d.w.Write(maxNewlineBytes) } else { d.dumpSlice(v) } d.depth-- d.indent() d.w.Write(closeBraceBytes) case reflect.String: d.w.Write([]byte(strconv.Quote(v.String()))) case reflect.Interface: // The only time we should get here is for nil interfaces due to // unpackValue calls. if v.IsNil() { d.w.Write(nilAngleBytes) } case reflect.Ptr: // Do nothing. We should never get here since pointers have already // been handled above. case reflect.Map: // nil maps should be indicated as different than empty maps if v.IsNil() { d.w.Write(nilAngleBytes) break } d.w.Write(openBraceNewlineBytes) d.depth++ if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { d.indent() d.w.Write(maxNewlineBytes) } else { numEntries := v.Len() keys := v.MapKeys() if d.cs.SortKeys { sortValues(keys, d.cs) } for i, key := range keys { d.dump(d.unpackValue(key)) d.w.Write(colonSpaceBytes) d.ignoreNextIndent = true d.dump(d.unpackValue(v.MapIndex(key))) if i < (numEntries - 1) { d.w.Write(commaNewlineBytes) } else { d.w.Write(newlineBytes) } } } d.depth-- d.indent() d.w.Write(closeBraceBytes) case reflect.Struct: d.w.Write(openBraceNewlineBytes) d.depth++ if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { d.indent() d.w.Write(maxNewlineBytes) } else { vt := v.Type() numFields := v.NumField() for i := 0; i < numFields; i++ { d.indent() vtf := vt.Field(i) d.w.Write([]byte(vtf.Name)) d.w.Write(colonSpaceBytes) d.ignoreNextIndent = true d.dump(d.unpackValue(v.Field(i))) if i < (numFields - 1) { d.w.Write(commaNewlineBytes) } else { d.w.Write(newlineBytes) } } } d.depth-- d.indent() d.w.Write(closeBraceBytes) case reflect.Uintptr: printHexPtr(d.w, uintptr(v.Uint())) case reflect.UnsafePointer, reflect.Chan, reflect.Func: printHexPtr(d.w, v.Pointer()) // There were not any other types at the time this code was written, but // fall back to letting the default fmt package handle it in case any new // types are added. default: if v.CanInterface() { fmt.Fprintf(d.w, "%v", v.Interface()) } else { fmt.Fprintf(d.w, "%v", v.String()) } } } // fdump is a helper function to consolidate the logic from the various public // methods which take varying writers and config states. func fdump(cs *ConfigState, w io.Writer, a ...interface{}) { for _, arg := range a { if arg == nil { w.Write(interfaceBytes) w.Write(spaceBytes) w.Write(nilAngleBytes) w.Write(newlineBytes) continue } d := dumpState{w: w, cs: cs} d.pointers = make(map[uintptr]int) d.dump(reflect.ValueOf(arg)) d.w.Write(newlineBytes) } } // Fdump formats and displays the passed arguments to io.Writer w. It formats // exactly the same as Dump. func Fdump(w io.Writer, a ...interface{}) { fdump(&Config, w, a...) } // Sdump returns a string with the passed arguments formatted exactly the same // as Dump. func Sdump(a ...interface{}) string { var buf bytes.Buffer fdump(&Config, &buf, a...) return buf.String() } /* Dump displays the passed parameters to standard out with newlines, customizable indentation, and additional debug information such as complete types and all pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly * Custom Stringer/error interfaces are optionally invoked, including on unexported types * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables * Byte arrays and slices are dumped like the hexdump -C command which includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to get the formatted result as a string. */ func Dump(a ...interface{}) { fdump(&Config, os.Stdout, a...) } govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/format.go000066400000000000000000000260751312205533500243760ustar00rootroot00000000000000/* * Copyright (c) 2013 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "fmt" "reflect" "strconv" "strings" ) // supportedFlags is a list of all the character flags supported by fmt package. const supportedFlags = "0-+# " // formatState implements the fmt.Formatter interface and contains information // about the state of a formatting operation. The NewFormatter function can // be used to get a new Formatter which can be used directly as arguments // in standard fmt package printing calls. type formatState struct { value interface{} fs fmt.State depth int pointers map[uintptr]int ignoreNextType bool cs *ConfigState } // buildDefaultFormat recreates the original format string without precision // and width information to pass in to fmt.Sprintf in the case of an // unrecognized type. Unless new types are added to the language, this // function won't ever be called. func (f *formatState) buildDefaultFormat() (format string) { buf := bytes.NewBuffer(percentBytes) for _, flag := range supportedFlags { if f.fs.Flag(int(flag)) { buf.WriteRune(flag) } } buf.WriteRune('v') format = buf.String() return format } // constructOrigFormat recreates the original format string including precision // and width information to pass along to the standard fmt package. This allows // automatic deferral of all format strings this package doesn't support. func (f *formatState) constructOrigFormat(verb rune) (format string) { buf := bytes.NewBuffer(percentBytes) for _, flag := range supportedFlags { if f.fs.Flag(int(flag)) { buf.WriteRune(flag) } } if width, ok := f.fs.Width(); ok { buf.WriteString(strconv.Itoa(width)) } if precision, ok := f.fs.Precision(); ok { buf.Write(precisionBytes) buf.WriteString(strconv.Itoa(precision)) } buf.WriteRune(verb) format = buf.String() return format } // unpackValue returns values inside of non-nil interfaces when possible and // ensures that types for values which have been unpacked from an interface // are displayed when the show types flag is also set. // This is useful for data types like structs, arrays, slices, and maps which // can contain varying types packed inside an interface. func (f *formatState) unpackValue(v reflect.Value) reflect.Value { if v.Kind() == reflect.Interface { f.ignoreNextType = false if !v.IsNil() { v = v.Elem() } } return v } // formatPtr handles formatting of pointers by indirecting them as necessary. func (f *formatState) formatPtr(v reflect.Value) { // Display nil if top level pointer is nil. showTypes := f.fs.Flag('#') if v.IsNil() && (!showTypes || f.ignoreNextType) { f.fs.Write(nilAngleBytes) return } // Remove pointers at or below the current depth from map used to detect // circular refs. for k, depth := range f.pointers { if depth >= f.depth { delete(f.pointers, k) } } // Keep list of all dereferenced pointers to possibly show later. pointerChain := make([]uintptr, 0) // Figure out how many levels of indirection there are by derferencing // pointers and unpacking interfaces down the chain while detecting circular // references. nilFound := false cycleFound := false indirects := 0 ve := v for ve.Kind() == reflect.Ptr { if ve.IsNil() { nilFound = true break } indirects++ addr := ve.Pointer() pointerChain = append(pointerChain, addr) if pd, ok := f.pointers[addr]; ok && pd < f.depth { cycleFound = true indirects-- break } f.pointers[addr] = f.depth ve = ve.Elem() if ve.Kind() == reflect.Interface { if ve.IsNil() { nilFound = true break } ve = ve.Elem() } } // Display type or indirection level depending on flags. if showTypes && !f.ignoreNextType { f.fs.Write(openParenBytes) f.fs.Write(bytes.Repeat(asteriskBytes, indirects)) f.fs.Write([]byte(ve.Type().String())) f.fs.Write(closeParenBytes) } else { if nilFound || cycleFound { indirects += strings.Count(ve.Type().String(), "*") } f.fs.Write(openAngleBytes) f.fs.Write([]byte(strings.Repeat("*", indirects))) f.fs.Write(closeAngleBytes) } // Display pointer information depending on flags. if f.fs.Flag('+') && (len(pointerChain) > 0) { f.fs.Write(openParenBytes) for i, addr := range pointerChain { if i > 0 { f.fs.Write(pointerChainBytes) } printHexPtr(f.fs, addr) } f.fs.Write(closeParenBytes) } // Display dereferenced value. switch { case nilFound == true: f.fs.Write(nilAngleBytes) case cycleFound == true: f.fs.Write(circularShortBytes) default: f.ignoreNextType = true f.format(ve) } } // format is the main workhorse for providing the Formatter interface. It // uses the passed reflect value to figure out what kind of object we are // dealing with and formats it appropriately. It is a recursive function, // however circular data structures are detected and handled properly. func (f *formatState) format(v reflect.Value) { // Handle invalid reflect values immediately. kind := v.Kind() if kind == reflect.Invalid { f.fs.Write(invalidAngleBytes) return } // Handle pointers specially. if kind == reflect.Ptr { f.formatPtr(v) return } // Print type information unless already handled elsewhere. if !f.ignoreNextType && f.fs.Flag('#') { f.fs.Write(openParenBytes) f.fs.Write([]byte(v.Type().String())) f.fs.Write(closeParenBytes) } f.ignoreNextType = false // Call Stringer/error interfaces if they exist and the handle methods // flag is enabled. if !f.cs.DisableMethods { if (kind != reflect.Invalid) && (kind != reflect.Interface) { if handled := handleMethods(f.cs, f.fs, v); handled { return } } } switch kind { case reflect.Invalid: // Do nothing. We should never get here since invalid has already // been handled above. case reflect.Bool: printBool(f.fs, v.Bool()) case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: printInt(f.fs, v.Int(), 10) case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: printUint(f.fs, v.Uint(), 10) case reflect.Float32: printFloat(f.fs, v.Float(), 32) case reflect.Float64: printFloat(f.fs, v.Float(), 64) case reflect.Complex64: printComplex(f.fs, v.Complex(), 32) case reflect.Complex128: printComplex(f.fs, v.Complex(), 64) case reflect.Slice: if v.IsNil() { f.fs.Write(nilAngleBytes) break } fallthrough case reflect.Array: f.fs.Write(openBracketBytes) f.depth++ if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { f.fs.Write(maxShortBytes) } else { numEntries := v.Len() for i := 0; i < numEntries; i++ { if i > 0 { f.fs.Write(spaceBytes) } f.ignoreNextType = true f.format(f.unpackValue(v.Index(i))) } } f.depth-- f.fs.Write(closeBracketBytes) case reflect.String: f.fs.Write([]byte(v.String())) case reflect.Interface: // The only time we should get here is for nil interfaces due to // unpackValue calls. if v.IsNil() { f.fs.Write(nilAngleBytes) } case reflect.Ptr: // Do nothing. We should never get here since pointers have already // been handled above. case reflect.Map: // nil maps should be indicated as different than empty maps if v.IsNil() { f.fs.Write(nilAngleBytes) break } f.fs.Write(openMapBytes) f.depth++ if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { f.fs.Write(maxShortBytes) } else { keys := v.MapKeys() if f.cs.SortKeys { sortValues(keys, f.cs) } for i, key := range keys { if i > 0 { f.fs.Write(spaceBytes) } f.ignoreNextType = true f.format(f.unpackValue(key)) f.fs.Write(colonBytes) f.ignoreNextType = true f.format(f.unpackValue(v.MapIndex(key))) } } f.depth-- f.fs.Write(closeMapBytes) case reflect.Struct: numFields := v.NumField() f.fs.Write(openBraceBytes) f.depth++ if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { f.fs.Write(maxShortBytes) } else { vt := v.Type() for i := 0; i < numFields; i++ { if i > 0 { f.fs.Write(spaceBytes) } vtf := vt.Field(i) if f.fs.Flag('+') || f.fs.Flag('#') { f.fs.Write([]byte(vtf.Name)) f.fs.Write(colonBytes) } f.format(f.unpackValue(v.Field(i))) } } f.depth-- f.fs.Write(closeBraceBytes) case reflect.Uintptr: printHexPtr(f.fs, uintptr(v.Uint())) case reflect.UnsafePointer, reflect.Chan, reflect.Func: printHexPtr(f.fs, v.Pointer()) // There were not any other types at the time this code was written, but // fall back to letting the default fmt package handle it if any get added. default: format := f.buildDefaultFormat() if v.CanInterface() { fmt.Fprintf(f.fs, format, v.Interface()) } else { fmt.Fprintf(f.fs, format, v.String()) } } } // Format satisfies the fmt.Formatter interface. See NewFormatter for usage // details. func (f *formatState) Format(fs fmt.State, verb rune) { f.fs = fs // Use standard formatting for verbs that are not v. if verb != 'v' { format := f.constructOrigFormat(verb) fmt.Fprintf(fs, format, f.value) return } if f.value == nil { if fs.Flag('#') { fs.Write(interfaceBytes) } fs.Write(nilAngleBytes) return } f.format(reflect.ValueOf(f.value)) } // newFormatter is a helper function to consolidate the logic from the various // public methods which take varying config states. func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter { fs := &formatState{value: v, cs: cs} fs.pointers = make(map[uintptr]int) return fs } /* NewFormatter returns a custom formatter that satisfies the fmt.Formatter interface. As a result, it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatter only responds to the %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb combinations. Any other verbs such as %x and %q will be sent to the the standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). Typically this function shouldn't be called directly. It is much easier to make use of the custom formatter by calling one of the convenience functions such as Printf, Println, or Fprintf. */ func NewFormatter(v interface{}) fmt.Formatter { return newFormatter(&Config, v) } govmomi-0.15.0/vendor/github.com/davecgh/go-spew/spew/spew.go000066400000000000000000000135141312205533500240560ustar00rootroot00000000000000/* * Copyright (c) 2013 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "fmt" "io" ) // Errorf is a wrapper for fmt.Errorf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the formatted string as a value that satisfies error. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b)) func Errorf(format string, a ...interface{}) (err error) { return fmt.Errorf(format, convertArgs(a)...) } // Fprint is a wrapper for fmt.Fprint that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b)) func Fprint(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprint(w, convertArgs(a)...) } // Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b)) func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { return fmt.Fprintf(w, format, convertArgs(a)...) } // Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it // passed with a default Formatter interface returned by NewFormatter. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b)) func Fprintln(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprintln(w, convertArgs(a)...) } // Print is a wrapper for fmt.Print that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b)) func Print(a ...interface{}) (n int, err error) { return fmt.Print(convertArgs(a)...) } // Printf is a wrapper for fmt.Printf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b)) func Printf(format string, a ...interface{}) (n int, err error) { return fmt.Printf(format, convertArgs(a)...) } // Println is a wrapper for fmt.Println that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b)) func Println(a ...interface{}) (n int, err error) { return fmt.Println(convertArgs(a)...) } // Sprint is a wrapper for fmt.Sprint that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b)) func Sprint(a ...interface{}) string { return fmt.Sprint(convertArgs(a)...) } // Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b)) func Sprintf(format string, a ...interface{}) string { return fmt.Sprintf(format, convertArgs(a)...) } // Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it // were passed with a default Formatter interface returned by NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b)) func Sprintln(a ...interface{}) string { return fmt.Sprintln(convertArgs(a)...) } // convertArgs accepts a slice of arguments and returns a slice of the same // length with each argument converted to a default spew Formatter interface. func convertArgs(args []interface{}) (formatters []interface{}) { formatters = make([]interface{}, len(args)) for index, arg := range args { formatters[index] = NewFormatter(arg) } return formatters } govmomi-0.15.0/vendor/manifest000066400000000000000000000004431312205533500163000ustar00rootroot00000000000000{ "version": 0, "dependencies": [ { "importpath": "github.com/davecgh/go-spew/spew", "repository": "https://github.com/davecgh/go-spew", "vcs": "git", "revision": "04cdfd42973bb9c8589fd6a731800cf222fde1a9", "branch": "HEAD", "path": "/spew", "notests": true } ] }govmomi-0.15.0/view/000077500000000000000000000000001312205533500142235ustar00rootroot00000000000000govmomi-0.15.0/view/container_view.go000066400000000000000000000066461312205533500176020ustar00rootroot00000000000000/* Copyright (c) 2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package view import ( "context" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" ) type ContainerView struct { object.Common } func NewContainerView(c *vim25.Client, ref types.ManagedObjectReference) *ContainerView { return &ContainerView{ Common: object.NewCommon(c, ref), } } func (v ContainerView) Destroy(ctx context.Context) error { req := types.DestroyView{ This: v.Reference(), } _, err := methods.DestroyView(ctx, v.Client(), &req) return err } // Retrieve populates dst as property.Collector.Retrieve does, for all entities in the view of types specified by kind. func (v ContainerView) Retrieve(ctx context.Context, kind []string, ps []string, dst interface{}) error { pc := property.DefaultCollector(v.Client()) ospec := types.ObjectSpec{ Obj: v.Reference(), Skip: types.NewBool(true), SelectSet: []types.BaseSelectionSpec{ &types.TraversalSpec{ Type: v.Reference().Type, Path: "view", }, }, } var pspec []types.PropertySpec if len(kind) == 0 { kind = []string{"ManagedEntity"} } for _, t := range kind { spec := types.PropertySpec{ Type: t, } if len(ps) == 0 { spec.All = types.NewBool(true) } else { spec.PathSet = ps } pspec = append(pspec, spec) } req := types.RetrieveProperties{ SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: pspec, }, }, } res, err := pc.RetrieveProperties(ctx, req) if err != nil { return err } if d, ok := dst.(*[]types.ObjectContent); ok { *d = res.Returnval return nil } return mo.LoadRetrievePropertiesResponse(res, dst) } // RetrieveWithFilter populates dst as Retrieve does, but only for entities matching the given filter. func (v ContainerView) RetrieveWithFilter(ctx context.Context, kind []string, ps []string, dst interface{}, filter property.Filter) error { if len(filter) == 0 { return v.Retrieve(ctx, kind, ps, dst) } var content []types.ObjectContent err := v.Retrieve(ctx, kind, filter.Keys(), &content) if err != nil { return err } objs := filter.MatchObjectContent(content) pc := property.DefaultCollector(v.Client()) return pc.Retrieve(ctx, objs, ps, dst) } // Find returns object references for entities of type kind, matching the given filter. func (v ContainerView) Find(ctx context.Context, kind []string, filter property.Filter) ([]types.ManagedObjectReference, error) { if len(filter) == 0 { // Ensure we have at least 1 filter to avoid retrieving all properties. filter = property.Filter{"name": "*"} } var content []types.ObjectContent err := v.Retrieve(ctx, kind, filter.Keys(), &content) if err != nil { return nil, err } return filter.MatchObjectContent(content), nil } govmomi-0.15.0/view/list_view.go000066400000000000000000000034511312205533500165620ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package view import ( "context" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type ListView struct { object.Common } func NewListView(c *vim25.Client, ref types.ManagedObjectReference) *ListView { return &ListView{ Common: object.NewCommon(c, ref), } } func (v ListView) Destroy(ctx context.Context) error { req := types.DestroyView{ This: v.Reference(), } _, err := methods.DestroyView(ctx, v.Client(), &req) return err } func (v ListView) Add(ctx context.Context, refs []types.ManagedObjectReference) error { req := types.ModifyListView{ This: v.Reference(), Add: refs, } _, err := methods.ModifyListView(ctx, v.Client(), &req) return err } func (v ListView) Remove(ctx context.Context, refs []types.ManagedObjectReference) error { req := types.ModifyListView{ This: v.Reference(), Remove: refs, } _, err := methods.ModifyListView(ctx, v.Client(), &req) return err } func (v ListView) Reset(ctx context.Context, refs []types.ManagedObjectReference) error { req := types.ResetListView{ This: v.Reference(), Obj: refs, } _, err := methods.ResetListView(ctx, v.Client(), &req) return err } govmomi-0.15.0/view/manager.go000066400000000000000000000033701312205533500161670ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package view import ( "context" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/types" ) type Manager struct { object.Common } func NewManager(c *vim25.Client) *Manager { m := Manager{ object.NewCommon(c, *c.ServiceContent.ViewManager), } return &m } func (m Manager) CreateListView(ctx context.Context, objects []types.ManagedObjectReference) (*ListView, error) { req := types.CreateListView{ This: m.Common.Reference(), Obj: objects, } res, err := methods.CreateListView(ctx, m.Client(), &req) if err != nil { return nil, err } return NewListView(m.Client(), res.Returnval), nil } func (m Manager) CreateContainerView(ctx context.Context, container types.ManagedObjectReference, managedObjectTypes []string, recursive bool) (*ContainerView, error) { req := types.CreateContainerView{ This: m.Common.Reference(), Container: container, Recursive: recursive, Type: managedObjectTypes, } res, err := methods.CreateContainerView(ctx, m.Client(), &req) if err != nil { return nil, err } return NewContainerView(m.Client(), res.Returnval), nil } govmomi-0.15.0/vim25/000077500000000000000000000000001312205533500142135ustar00rootroot00000000000000govmomi-0.15.0/vim25/client.go000066400000000000000000000061541312205533500160260ustar00rootroot00000000000000/* Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vim25 import ( "context" "encoding/json" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // Client is a tiny wrapper around the vim25/soap Client that stores session // specific state (i.e. state that only needs to be retrieved once after the // client has been created). This means the client can be reused after // serialization without performing additional requests for initialization. type Client struct { *soap.Client ServiceContent types.ServiceContent // RoundTripper is a separate field such that the client's implementation of // the RoundTripper interface can be wrapped by separate implementations for // extra functionality (for example, reauthentication on session timeout). RoundTripper soap.RoundTripper } // NewClient creates and returns a new client wirh the ServiceContent field // filled in. func NewClient(ctx context.Context, rt soap.RoundTripper) (*Client, error) { serviceContent, err := methods.GetServiceContent(ctx, rt) if err != nil { return nil, err } c := Client{ ServiceContent: serviceContent, RoundTripper: rt, } // Set client if it happens to be a soap.Client if sc, ok := rt.(*soap.Client); ok { c.Client = sc } return &c, nil } // RoundTrip dispatches to the RoundTripper field. func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error { return c.RoundTripper.RoundTrip(ctx, req, res) } type marshaledClient struct { SoapClient *soap.Client ServiceContent types.ServiceContent } func (c *Client) MarshalJSON() ([]byte, error) { m := marshaledClient{ SoapClient: c.Client, ServiceContent: c.ServiceContent, } return json.Marshal(m) } func (c *Client) UnmarshalJSON(b []byte) error { var m marshaledClient err := json.Unmarshal(b, &m) if err != nil { return err } *c = Client{ Client: m.SoapClient, ServiceContent: m.ServiceContent, RoundTripper: m.SoapClient, } return nil } // Valid returns whether or not the client is valid and ready for use. // This should be called after unmarshalling the client. func (c *Client) Valid() bool { if c == nil { return false } if c.Client == nil { return false } // Use arbitrary pointer field in the service content. // Doesn't matter which one, as long as it is populated by default. if c.ServiceContent.SessionManager == nil { return false } return true } // IsVC returns true if we are connected to a vCenter func (c *Client) IsVC() bool { return c.ServiceContent.About.ApiType == "VirtualCenter" } govmomi-0.15.0/vim25/client_test.go000066400000000000000000000040651312205533500170640ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vim25 import ( "context" "encoding/json" "net/url" "os" "testing" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // Duplicated to prevent cyclic dependency... func testURL(t *testing.T) *url.URL { s := os.Getenv("GOVMOMI_TEST_URL") if s == "" { t.SkipNow() } u, err := soap.ParseURL(s) if err != nil { panic(err) } return u } func sessionLogin(t *testing.T, c *Client) { req := types.Login{ This: *c.ServiceContent.SessionManager, } u := testURL(t).User req.UserName = u.Username() if pw, ok := u.Password(); ok { req.Password = pw } _, err := methods.Login(context.Background(), c, &req) if err != nil { t.Fatal(err) } } func sessionCheck(t *testing.T, c *Client) { var mgr mo.SessionManager err := mo.RetrieveProperties(context.Background(), c, c.ServiceContent.PropertyCollector, *c.ServiceContent.SessionManager, &mgr) if err != nil { t.Fatal(err) } } func TestClientSerialization(t *testing.T) { var c1, c2 *Client soapClient := soap.NewClient(testURL(t), true) c1, err := NewClient(context.Background(), soapClient) if err != nil { t.Fatal(err) } // Login sessionLogin(t, c1) sessionCheck(t, c1) // Serialize/deserialize b, err := json.Marshal(c1) if err != nil { t.Fatal(err) } c2 = &Client{} err = json.Unmarshal(b, c2) if err != nil { t.Fatal(err) } // Check the session is still valid sessionCheck(t, c2) } govmomi-0.15.0/vim25/debug/000077500000000000000000000000001312205533500153015ustar00rootroot00000000000000govmomi-0.15.0/vim25/debug/debug.go000066400000000000000000000036551312205533500167270ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package debug import ( "io" "os" "path" ) // Provider specified the interface types must implement to be used as a // debugging sink. Having multiple such sink implementations allows it to be // changed externally (for example when running tests). type Provider interface { NewFile(s string) io.WriteCloser Flush() } var currentProvider Provider = nil func SetProvider(p Provider) { if currentProvider != nil { currentProvider.Flush() } currentProvider = p } // Enabled returns whether debugging is enabled or not. func Enabled() bool { return currentProvider != nil } // NewFile dispatches to the current provider's NewFile function. func NewFile(s string) io.WriteCloser { return currentProvider.NewFile(s) } // Flush dispatches to the current provider's Flush function. func Flush() { currentProvider.Flush() } // FileProvider implements a debugging provider that creates a real file for // every call to NewFile. It maintains a list of all files that it creates, // such that it can close them when its Flush function is called. type FileProvider struct { Path string files []*os.File } func (fp *FileProvider) NewFile(p string) io.WriteCloser { f, err := os.Create(path.Join(fp.Path, p)) if err != nil { panic(err) } fp.files = append(fp.files, f) return f } func (fp *FileProvider) Flush() { for _, f := range fp.files { f.Close() } } govmomi-0.15.0/vim25/doc.go000066400000000000000000000023061312205533500153100ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Package vim25 provides a minimal client implementation to use with other packages in the vim25 tree. The code in this package intentionally does not take any dependendies outside the vim25 tree. The client implementation in this package embeds the soap.Client structure. Additionally, it stores the value of the session's ServiceContent object. This object stores references to a variety of subsystems, such as the root property collector, the session manager, and the search index. The client is fully functional after serialization and deserialization, without the need for additional requests for initialization. */ package vim25 govmomi-0.15.0/vim25/methods/000077500000000000000000000000001312205533500156565ustar00rootroot00000000000000govmomi-0.15.0/vim25/methods/fault_test.go000066400000000000000000000036331312205533500203640ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package methods import ( "bytes" "testing" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/xml" ) var invalidLoginFault = ` ServerFaultCodeCannot complete login due to an incorrect user name or password. ` type TestBody struct { Fault *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func TestFaultDetail(t *testing.T) { body := TestBody{} env := soap.Envelope{Body: &body} dec := xml.NewDecoder(bytes.NewReader([]byte(invalidLoginFault))) dec.TypeFunc = types.TypeFunc() err := dec.Decode(&env) if err != nil { t.Fatalf("Decode: %s", err) } if body.Fault == nil { t.Fatal("Expected fault") } if _, ok := body.Fault.Detail.Fault.(types.InvalidLogin); !ok { t.Fatalf("Expected InvalidLogin, got: %#v", body.Fault.Detail.Fault) } } govmomi-0.15.0/vim25/methods/internal.go000066400000000000000000000100551312205533500200220ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package methods import ( "context" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type RetrieveDynamicTypeManagerBody struct { Req *types.RetrieveDynamicTypeManager `xml:"urn:vim25 RetrieveDynamicTypeManager"` Res *types.RetrieveDynamicTypeManagerResponse `xml:"urn:vim25 RetrieveDynamicTypeManagerResponse"` Fault_ *soap.Fault } func (b *RetrieveDynamicTypeManagerBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveDynamicTypeManager(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDynamicTypeManager) (*types.RetrieveDynamicTypeManagerResponse, error) { var reqBody, resBody RetrieveDynamicTypeManagerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveManagedMethodExecuterBody struct { Req *types.RetrieveManagedMethodExecuter `xml:"urn:vim25 RetrieveManagedMethodExecuter"` Res *types.RetrieveManagedMethodExecuterResponse `xml:"urn:vim25 RetrieveManagedMethodExecuterResponse"` Fault_ *soap.Fault } func (b *RetrieveManagedMethodExecuterBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveManagedMethodExecuter(ctx context.Context, r soap.RoundTripper, req *types.RetrieveManagedMethodExecuter) (*types.RetrieveManagedMethodExecuterResponse, error) { var reqBody, resBody RetrieveManagedMethodExecuterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DynamicTypeMgrQueryMoInstancesBody struct { Req *types.DynamicTypeMgrQueryMoInstances `xml:"urn:vim25 DynamicTypeMgrQueryMoInstances"` Res *types.DynamicTypeMgrQueryMoInstancesResponse `xml:"urn:vim25 DynamicTypeMgrQueryMoInstancesResponse"` Fault_ *soap.Fault } func (b *DynamicTypeMgrQueryMoInstancesBody) Fault() *soap.Fault { return b.Fault_ } func DynamicTypeMgrQueryMoInstances(ctx context.Context, r soap.RoundTripper, req *types.DynamicTypeMgrQueryMoInstances) (*types.DynamicTypeMgrQueryMoInstancesResponse, error) { var reqBody, resBody DynamicTypeMgrQueryMoInstancesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DynamicTypeMgrQueryTypeInfoBody struct { Req *types.DynamicTypeMgrQueryTypeInfo `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfo"` Res *types.DynamicTypeMgrQueryTypeInfoResponse `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfoResponse"` Fault_ *soap.Fault } func (b *DynamicTypeMgrQueryTypeInfoBody) Fault() *soap.Fault { return b.Fault_ } func DynamicTypeMgrQueryTypeInfo(ctx context.Context, r soap.RoundTripper, req *types.DynamicTypeMgrQueryTypeInfo) (*types.DynamicTypeMgrQueryTypeInfoResponse, error) { var reqBody, resBody DynamicTypeMgrQueryTypeInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExecuteSoapBody struct { Req *types.ExecuteSoap `xml:"urn:vim25 ExecuteSoap"` Res *types.ExecuteSoapResponse `xml:"urn:vim25 ExecuteSoapResponse"` Fault_ *soap.Fault } func (b *ExecuteSoapBody) Fault() *soap.Fault { return b.Fault_ } func ExecuteSoap(ctx context.Context, r soap.RoundTripper, req *types.ExecuteSoap) (*types.ExecuteSoapResponse, error) { var reqBody, resBody ExecuteSoapBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } govmomi-0.15.0/vim25/methods/methods.go000066400000000000000000022433031312205533500176570ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package methods import ( "context" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) type AbdicateDomOwnershipBody struct { Req *types.AbdicateDomOwnership `xml:"urn:vim25 AbdicateDomOwnership,omitempty"` Res *types.AbdicateDomOwnershipResponse `xml:"urn:vim25 AbdicateDomOwnershipResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AbdicateDomOwnershipBody) Fault() *soap.Fault { return b.Fault_ } func AbdicateDomOwnership(ctx context.Context, r soap.RoundTripper, req *types.AbdicateDomOwnership) (*types.AbdicateDomOwnershipResponse, error) { var reqBody, resBody AbdicateDomOwnershipBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcknowledgeAlarmBody struct { Req *types.AcknowledgeAlarm `xml:"urn:vim25 AcknowledgeAlarm,omitempty"` Res *types.AcknowledgeAlarmResponse `xml:"urn:vim25 AcknowledgeAlarmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcknowledgeAlarmBody) Fault() *soap.Fault { return b.Fault_ } func AcknowledgeAlarm(ctx context.Context, r soap.RoundTripper, req *types.AcknowledgeAlarm) (*types.AcknowledgeAlarmResponse, error) { var reqBody, resBody AcknowledgeAlarmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireCimServicesTicketBody struct { Req *types.AcquireCimServicesTicket `xml:"urn:vim25 AcquireCimServicesTicket,omitempty"` Res *types.AcquireCimServicesTicketResponse `xml:"urn:vim25 AcquireCimServicesTicketResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireCimServicesTicketBody) Fault() *soap.Fault { return b.Fault_ } func AcquireCimServicesTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireCimServicesTicket) (*types.AcquireCimServicesTicketResponse, error) { var reqBody, resBody AcquireCimServicesTicketBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireCloneTicketBody struct { Req *types.AcquireCloneTicket `xml:"urn:vim25 AcquireCloneTicket,omitempty"` Res *types.AcquireCloneTicketResponse `xml:"urn:vim25 AcquireCloneTicketResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireCloneTicketBody) Fault() *soap.Fault { return b.Fault_ } func AcquireCloneTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireCloneTicket) (*types.AcquireCloneTicketResponse, error) { var reqBody, resBody AcquireCloneTicketBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireCredentialsInGuestBody struct { Req *types.AcquireCredentialsInGuest `xml:"urn:vim25 AcquireCredentialsInGuest,omitempty"` Res *types.AcquireCredentialsInGuestResponse `xml:"urn:vim25 AcquireCredentialsInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ } func AcquireCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.AcquireCredentialsInGuest) (*types.AcquireCredentialsInGuestResponse, error) { var reqBody, resBody AcquireCredentialsInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireGenericServiceTicketBody struct { Req *types.AcquireGenericServiceTicket `xml:"urn:vim25 AcquireGenericServiceTicket,omitempty"` Res *types.AcquireGenericServiceTicketResponse `xml:"urn:vim25 AcquireGenericServiceTicketResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireGenericServiceTicketBody) Fault() *soap.Fault { return b.Fault_ } func AcquireGenericServiceTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireGenericServiceTicket) (*types.AcquireGenericServiceTicketResponse, error) { var reqBody, resBody AcquireGenericServiceTicketBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireLocalTicketBody struct { Req *types.AcquireLocalTicket `xml:"urn:vim25 AcquireLocalTicket,omitempty"` Res *types.AcquireLocalTicketResponse `xml:"urn:vim25 AcquireLocalTicketResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireLocalTicketBody) Fault() *soap.Fault { return b.Fault_ } func AcquireLocalTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireLocalTicket) (*types.AcquireLocalTicketResponse, error) { var reqBody, resBody AcquireLocalTicketBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireMksTicketBody struct { Req *types.AcquireMksTicket `xml:"urn:vim25 AcquireMksTicket,omitempty"` Res *types.AcquireMksTicketResponse `xml:"urn:vim25 AcquireMksTicketResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireMksTicketBody) Fault() *soap.Fault { return b.Fault_ } func AcquireMksTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireMksTicket) (*types.AcquireMksTicketResponse, error) { var reqBody, resBody AcquireMksTicketBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AcquireTicketBody struct { Req *types.AcquireTicket `xml:"urn:vim25 AcquireTicket,omitempty"` Res *types.AcquireTicketResponse `xml:"urn:vim25 AcquireTicketResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AcquireTicketBody) Fault() *soap.Fault { return b.Fault_ } func AcquireTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireTicket) (*types.AcquireTicketResponse, error) { var reqBody, resBody AcquireTicketBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddAuthorizationRoleBody struct { Req *types.AddAuthorizationRole `xml:"urn:vim25 AddAuthorizationRole,omitempty"` Res *types.AddAuthorizationRoleResponse `xml:"urn:vim25 AddAuthorizationRoleResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ } func AddAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.AddAuthorizationRole) (*types.AddAuthorizationRoleResponse, error) { var reqBody, resBody AddAuthorizationRoleBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddCustomFieldDefBody struct { Req *types.AddCustomFieldDef `xml:"urn:vim25 AddCustomFieldDef,omitempty"` Res *types.AddCustomFieldDefResponse `xml:"urn:vim25 AddCustomFieldDefResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ } func AddCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.AddCustomFieldDef) (*types.AddCustomFieldDefResponse, error) { var reqBody, resBody AddCustomFieldDefBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddDVPortgroup_TaskBody struct { Req *types.AddDVPortgroup_Task `xml:"urn:vim25 AddDVPortgroup_Task,omitempty"` Res *types.AddDVPortgroup_TaskResponse `xml:"urn:vim25 AddDVPortgroup_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ } func AddDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.AddDVPortgroup_Task) (*types.AddDVPortgroup_TaskResponse, error) { var reqBody, resBody AddDVPortgroup_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddDisks_TaskBody struct { Req *types.AddDisks_Task `xml:"urn:vim25 AddDisks_Task,omitempty"` Res *types.AddDisks_TaskResponse `xml:"urn:vim25 AddDisks_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } func AddDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.AddDisks_Task) (*types.AddDisks_TaskResponse, error) { var reqBody, resBody AddDisks_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddFilterBody struct { Req *types.AddFilter `xml:"urn:vim25 AddFilter,omitempty"` Res *types.AddFilterResponse `xml:"urn:vim25 AddFilterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddFilterBody) Fault() *soap.Fault { return b.Fault_ } func AddFilter(ctx context.Context, r soap.RoundTripper, req *types.AddFilter) (*types.AddFilterResponse, error) { var reqBody, resBody AddFilterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddFilterEntitiesBody struct { Req *types.AddFilterEntities `xml:"urn:vim25 AddFilterEntities,omitempty"` Res *types.AddFilterEntitiesResponse `xml:"urn:vim25 AddFilterEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func AddFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.AddFilterEntities) (*types.AddFilterEntitiesResponse, error) { var reqBody, resBody AddFilterEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddGuestAliasBody struct { Req *types.AddGuestAlias `xml:"urn:vim25 AddGuestAlias,omitempty"` Res *types.AddGuestAliasResponse `xml:"urn:vim25 AddGuestAliasResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddGuestAliasBody) Fault() *soap.Fault { return b.Fault_ } func AddGuestAlias(ctx context.Context, r soap.RoundTripper, req *types.AddGuestAlias) (*types.AddGuestAliasResponse, error) { var reqBody, resBody AddGuestAliasBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddHost_TaskBody struct { Req *types.AddHost_Task `xml:"urn:vim25 AddHost_Task,omitempty"` Res *types.AddHost_TaskResponse `xml:"urn:vim25 AddHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func AddHost_Task(ctx context.Context, r soap.RoundTripper, req *types.AddHost_Task) (*types.AddHost_TaskResponse, error) { var reqBody, resBody AddHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddInternetScsiSendTargetsBody struct { Req *types.AddInternetScsiSendTargets `xml:"urn:vim25 AddInternetScsiSendTargets,omitempty"` Res *types.AddInternetScsiSendTargetsResponse `xml:"urn:vim25 AddInternetScsiSendTargetsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddInternetScsiSendTargetsBody) Fault() *soap.Fault { return b.Fault_ } func AddInternetScsiSendTargets(ctx context.Context, r soap.RoundTripper, req *types.AddInternetScsiSendTargets) (*types.AddInternetScsiSendTargetsResponse, error) { var reqBody, resBody AddInternetScsiSendTargetsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddInternetScsiStaticTargetsBody struct { Req *types.AddInternetScsiStaticTargets `xml:"urn:vim25 AddInternetScsiStaticTargets,omitempty"` Res *types.AddInternetScsiStaticTargetsResponse `xml:"urn:vim25 AddInternetScsiStaticTargetsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddInternetScsiStaticTargetsBody) Fault() *soap.Fault { return b.Fault_ } func AddInternetScsiStaticTargets(ctx context.Context, r soap.RoundTripper, req *types.AddInternetScsiStaticTargets) (*types.AddInternetScsiStaticTargetsResponse, error) { var reqBody, resBody AddInternetScsiStaticTargetsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddKeyBody struct { Req *types.AddKey `xml:"urn:vim25 AddKey,omitempty"` Res *types.AddKeyResponse `xml:"urn:vim25 AddKeyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddKeyBody) Fault() *soap.Fault { return b.Fault_ } func AddKey(ctx context.Context, r soap.RoundTripper, req *types.AddKey) (*types.AddKeyResponse, error) { var reqBody, resBody AddKeyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddKeysBody struct { Req *types.AddKeys `xml:"urn:vim25 AddKeys,omitempty"` Res *types.AddKeysResponse `xml:"urn:vim25 AddKeysResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddKeysBody) Fault() *soap.Fault { return b.Fault_ } func AddKeys(ctx context.Context, r soap.RoundTripper, req *types.AddKeys) (*types.AddKeysResponse, error) { var reqBody, resBody AddKeysBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddLicenseBody struct { Req *types.AddLicense `xml:"urn:vim25 AddLicense,omitempty"` Res *types.AddLicenseResponse `xml:"urn:vim25 AddLicenseResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddLicenseBody) Fault() *soap.Fault { return b.Fault_ } func AddLicense(ctx context.Context, r soap.RoundTripper, req *types.AddLicense) (*types.AddLicenseResponse, error) { var reqBody, resBody AddLicenseBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddMonitoredEntitiesBody struct { Req *types.AddMonitoredEntities `xml:"urn:vim25 AddMonitoredEntities,omitempty"` Res *types.AddMonitoredEntitiesResponse `xml:"urn:vim25 AddMonitoredEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func AddMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.AddMonitoredEntities) (*types.AddMonitoredEntitiesResponse, error) { var reqBody, resBody AddMonitoredEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddNetworkResourcePoolBody struct { Req *types.AddNetworkResourcePool `xml:"urn:vim25 AddNetworkResourcePool,omitempty"` Res *types.AddNetworkResourcePoolResponse `xml:"urn:vim25 AddNetworkResourcePoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } func AddNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.AddNetworkResourcePool) (*types.AddNetworkResourcePoolResponse, error) { var reqBody, resBody AddNetworkResourcePoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddPortGroupBody struct { Req *types.AddPortGroup `xml:"urn:vim25 AddPortGroup,omitempty"` Res *types.AddPortGroupResponse `xml:"urn:vim25 AddPortGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddPortGroupBody) Fault() *soap.Fault { return b.Fault_ } func AddPortGroup(ctx context.Context, r soap.RoundTripper, req *types.AddPortGroup) (*types.AddPortGroupResponse, error) { var reqBody, resBody AddPortGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddServiceConsoleVirtualNicBody struct { Req *types.AddServiceConsoleVirtualNic `xml:"urn:vim25 AddServiceConsoleVirtualNic,omitempty"` Res *types.AddServiceConsoleVirtualNicResponse `xml:"urn:vim25 AddServiceConsoleVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func AddServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.AddServiceConsoleVirtualNic) (*types.AddServiceConsoleVirtualNicResponse, error) { var reqBody, resBody AddServiceConsoleVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddStandaloneHost_TaskBody struct { Req *types.AddStandaloneHost_Task `xml:"urn:vim25 AddStandaloneHost_Task,omitempty"` Res *types.AddStandaloneHost_TaskResponse `xml:"urn:vim25 AddStandaloneHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddStandaloneHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func AddStandaloneHost_Task(ctx context.Context, r soap.RoundTripper, req *types.AddStandaloneHost_Task) (*types.AddStandaloneHost_TaskResponse, error) { var reqBody, resBody AddStandaloneHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddVirtualNicBody struct { Req *types.AddVirtualNic `xml:"urn:vim25 AddVirtualNic,omitempty"` Res *types.AddVirtualNicResponse `xml:"urn:vim25 AddVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func AddVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.AddVirtualNic) (*types.AddVirtualNicResponse, error) { var reqBody, resBody AddVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AddVirtualSwitchBody struct { Req *types.AddVirtualSwitch `xml:"urn:vim25 AddVirtualSwitch,omitempty"` Res *types.AddVirtualSwitchResponse `xml:"urn:vim25 AddVirtualSwitchResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AddVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ } func AddVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.AddVirtualSwitch) (*types.AddVirtualSwitchResponse, error) { var reqBody, resBody AddVirtualSwitchBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AllocateIpv4AddressBody struct { Req *types.AllocateIpv4Address `xml:"urn:vim25 AllocateIpv4Address,omitempty"` Res *types.AllocateIpv4AddressResponse `xml:"urn:vim25 AllocateIpv4AddressResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AllocateIpv4AddressBody) Fault() *soap.Fault { return b.Fault_ } func AllocateIpv4Address(ctx context.Context, r soap.RoundTripper, req *types.AllocateIpv4Address) (*types.AllocateIpv4AddressResponse, error) { var reqBody, resBody AllocateIpv4AddressBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AllocateIpv6AddressBody struct { Req *types.AllocateIpv6Address `xml:"urn:vim25 AllocateIpv6Address,omitempty"` Res *types.AllocateIpv6AddressResponse `xml:"urn:vim25 AllocateIpv6AddressResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AllocateIpv6AddressBody) Fault() *soap.Fault { return b.Fault_ } func AllocateIpv6Address(ctx context.Context, r soap.RoundTripper, req *types.AllocateIpv6Address) (*types.AllocateIpv6AddressResponse, error) { var reqBody, resBody AllocateIpv6AddressBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AnswerVMBody struct { Req *types.AnswerVM `xml:"urn:vim25 AnswerVM,omitempty"` Res *types.AnswerVMResponse `xml:"urn:vim25 AnswerVMResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AnswerVMBody) Fault() *soap.Fault { return b.Fault_ } func AnswerVM(ctx context.Context, r soap.RoundTripper, req *types.AnswerVM) (*types.AnswerVMResponse, error) { var reqBody, resBody AnswerVMBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ApplyEntitiesConfig_TaskBody struct { Req *types.ApplyEntitiesConfig_Task `xml:"urn:vim25 ApplyEntitiesConfig_Task,omitempty"` Res *types.ApplyEntitiesConfig_TaskResponse `xml:"urn:vim25 ApplyEntitiesConfig_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ApplyEntitiesConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ApplyEntitiesConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyEntitiesConfig_Task) (*types.ApplyEntitiesConfig_TaskResponse, error) { var reqBody, resBody ApplyEntitiesConfig_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ApplyHostConfig_TaskBody struct { Req *types.ApplyHostConfig_Task `xml:"urn:vim25 ApplyHostConfig_Task,omitempty"` Res *types.ApplyHostConfig_TaskResponse `xml:"urn:vim25 ApplyHostConfig_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ApplyHostConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ApplyHostConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyHostConfig_Task) (*types.ApplyHostConfig_TaskResponse, error) { var reqBody, resBody ApplyHostConfig_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ApplyRecommendationBody struct { Req *types.ApplyRecommendation `xml:"urn:vim25 ApplyRecommendation,omitempty"` Res *types.ApplyRecommendationResponse `xml:"urn:vim25 ApplyRecommendationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ApplyRecommendationBody) Fault() *soap.Fault { return b.Fault_ } func ApplyRecommendation(ctx context.Context, r soap.RoundTripper, req *types.ApplyRecommendation) (*types.ApplyRecommendationResponse, error) { var reqBody, resBody ApplyRecommendationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ApplyStorageDrsRecommendationToPod_TaskBody struct { Req *types.ApplyStorageDrsRecommendationToPod_Task `xml:"urn:vim25 ApplyStorageDrsRecommendationToPod_Task,omitempty"` Res *types.ApplyStorageDrsRecommendationToPod_TaskResponse `xml:"urn:vim25 ApplyStorageDrsRecommendationToPod_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ApplyStorageDrsRecommendationToPod_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ApplyStorageDrsRecommendationToPod_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyStorageDrsRecommendationToPod_Task) (*types.ApplyStorageDrsRecommendationToPod_TaskResponse, error) { var reqBody, resBody ApplyStorageDrsRecommendationToPod_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ApplyStorageDrsRecommendation_TaskBody struct { Req *types.ApplyStorageDrsRecommendation_Task `xml:"urn:vim25 ApplyStorageDrsRecommendation_Task,omitempty"` Res *types.ApplyStorageDrsRecommendation_TaskResponse `xml:"urn:vim25 ApplyStorageDrsRecommendation_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ApplyStorageDrsRecommendation_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ApplyStorageDrsRecommendation_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyStorageDrsRecommendation_Task) (*types.ApplyStorageDrsRecommendation_TaskResponse, error) { var reqBody, resBody ApplyStorageDrsRecommendation_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AreAlarmActionsEnabledBody struct { Req *types.AreAlarmActionsEnabled `xml:"urn:vim25 AreAlarmActionsEnabled,omitempty"` Res *types.AreAlarmActionsEnabledResponse `xml:"urn:vim25 AreAlarmActionsEnabledResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AreAlarmActionsEnabledBody) Fault() *soap.Fault { return b.Fault_ } func AreAlarmActionsEnabled(ctx context.Context, r soap.RoundTripper, req *types.AreAlarmActionsEnabled) (*types.AreAlarmActionsEnabledResponse, error) { var reqBody, resBody AreAlarmActionsEnabledBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AssignUserToGroupBody struct { Req *types.AssignUserToGroup `xml:"urn:vim25 AssignUserToGroup,omitempty"` Res *types.AssignUserToGroupResponse `xml:"urn:vim25 AssignUserToGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AssignUserToGroupBody) Fault() *soap.Fault { return b.Fault_ } func AssignUserToGroup(ctx context.Context, r soap.RoundTripper, req *types.AssignUserToGroup) (*types.AssignUserToGroupResponse, error) { var reqBody, resBody AssignUserToGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AssociateProfileBody struct { Req *types.AssociateProfile `xml:"urn:vim25 AssociateProfile,omitempty"` Res *types.AssociateProfileResponse `xml:"urn:vim25 AssociateProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AssociateProfileBody) Fault() *soap.Fault { return b.Fault_ } func AssociateProfile(ctx context.Context, r soap.RoundTripper, req *types.AssociateProfile) (*types.AssociateProfileResponse, error) { var reqBody, resBody AssociateProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AttachDisk_TaskBody struct { Req *types.AttachDisk_Task `xml:"urn:vim25 AttachDisk_Task,omitempty"` Res *types.AttachDisk_TaskResponse `xml:"urn:vim25 AttachDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AttachDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func AttachDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.AttachDisk_Task) (*types.AttachDisk_TaskResponse, error) { var reqBody, resBody AttachDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AttachScsiLunBody struct { Req *types.AttachScsiLun `xml:"urn:vim25 AttachScsiLun,omitempty"` Res *types.AttachScsiLunResponse `xml:"urn:vim25 AttachScsiLunResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AttachScsiLunBody) Fault() *soap.Fault { return b.Fault_ } func AttachScsiLun(ctx context.Context, r soap.RoundTripper, req *types.AttachScsiLun) (*types.AttachScsiLunResponse, error) { var reqBody, resBody AttachScsiLunBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AttachScsiLunEx_TaskBody struct { Req *types.AttachScsiLunEx_Task `xml:"urn:vim25 AttachScsiLunEx_Task,omitempty"` Res *types.AttachScsiLunEx_TaskResponse `xml:"urn:vim25 AttachScsiLunEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AttachScsiLunEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func AttachScsiLunEx_Task(ctx context.Context, r soap.RoundTripper, req *types.AttachScsiLunEx_Task) (*types.AttachScsiLunEx_TaskResponse, error) { var reqBody, resBody AttachScsiLunEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AttachTagToVStorageObjectBody struct { Req *types.AttachTagToVStorageObject `xml:"urn:vim25 AttachTagToVStorageObject,omitempty"` Res *types.AttachTagToVStorageObjectResponse `xml:"urn:vim25 AttachTagToVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AttachTagToVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func AttachTagToVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.AttachTagToVStorageObject) (*types.AttachTagToVStorageObjectResponse, error) { var reqBody, resBody AttachTagToVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AttachVmfsExtentBody struct { Req *types.AttachVmfsExtent `xml:"urn:vim25 AttachVmfsExtent,omitempty"` Res *types.AttachVmfsExtentResponse `xml:"urn:vim25 AttachVmfsExtentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AttachVmfsExtentBody) Fault() *soap.Fault { return b.Fault_ } func AttachVmfsExtent(ctx context.Context, r soap.RoundTripper, req *types.AttachVmfsExtent) (*types.AttachVmfsExtentResponse, error) { var reqBody, resBody AttachVmfsExtentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AutoStartPowerOffBody struct { Req *types.AutoStartPowerOff `xml:"urn:vim25 AutoStartPowerOff,omitempty"` Res *types.AutoStartPowerOffResponse `xml:"urn:vim25 AutoStartPowerOffResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AutoStartPowerOffBody) Fault() *soap.Fault { return b.Fault_ } func AutoStartPowerOff(ctx context.Context, r soap.RoundTripper, req *types.AutoStartPowerOff) (*types.AutoStartPowerOffResponse, error) { var reqBody, resBody AutoStartPowerOffBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type AutoStartPowerOnBody struct { Req *types.AutoStartPowerOn `xml:"urn:vim25 AutoStartPowerOn,omitempty"` Res *types.AutoStartPowerOnResponse `xml:"urn:vim25 AutoStartPowerOnResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *AutoStartPowerOnBody) Fault() *soap.Fault { return b.Fault_ } func AutoStartPowerOn(ctx context.Context, r soap.RoundTripper, req *types.AutoStartPowerOn) (*types.AutoStartPowerOnResponse, error) { var reqBody, resBody AutoStartPowerOnBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type BackupFirmwareConfigurationBody struct { Req *types.BackupFirmwareConfiguration `xml:"urn:vim25 BackupFirmwareConfiguration,omitempty"` Res *types.BackupFirmwareConfigurationResponse `xml:"urn:vim25 BackupFirmwareConfigurationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *BackupFirmwareConfigurationBody) Fault() *soap.Fault { return b.Fault_ } func BackupFirmwareConfiguration(ctx context.Context, r soap.RoundTripper, req *types.BackupFirmwareConfiguration) (*types.BackupFirmwareConfigurationResponse, error) { var reqBody, resBody BackupFirmwareConfigurationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type BindVnicBody struct { Req *types.BindVnic `xml:"urn:vim25 BindVnic,omitempty"` Res *types.BindVnicResponse `xml:"urn:vim25 BindVnicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *BindVnicBody) Fault() *soap.Fault { return b.Fault_ } func BindVnic(ctx context.Context, r soap.RoundTripper, req *types.BindVnic) (*types.BindVnicResponse, error) { var reqBody, resBody BindVnicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type BrowseDiagnosticLogBody struct { Req *types.BrowseDiagnosticLog `xml:"urn:vim25 BrowseDiagnosticLog,omitempty"` Res *types.BrowseDiagnosticLogResponse `xml:"urn:vim25 BrowseDiagnosticLogResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *BrowseDiagnosticLogBody) Fault() *soap.Fault { return b.Fault_ } func BrowseDiagnosticLog(ctx context.Context, r soap.RoundTripper, req *types.BrowseDiagnosticLog) (*types.BrowseDiagnosticLogResponse, error) { var reqBody, resBody BrowseDiagnosticLogBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CanProvisionObjectsBody struct { Req *types.CanProvisionObjects `xml:"urn:vim25 CanProvisionObjects,omitempty"` Res *types.CanProvisionObjectsResponse `xml:"urn:vim25 CanProvisionObjectsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CanProvisionObjectsBody) Fault() *soap.Fault { return b.Fault_ } func CanProvisionObjects(ctx context.Context, r soap.RoundTripper, req *types.CanProvisionObjects) (*types.CanProvisionObjectsResponse, error) { var reqBody, resBody CanProvisionObjectsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CancelRecommendationBody struct { Req *types.CancelRecommendation `xml:"urn:vim25 CancelRecommendation,omitempty"` Res *types.CancelRecommendationResponse `xml:"urn:vim25 CancelRecommendationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CancelRecommendationBody) Fault() *soap.Fault { return b.Fault_ } func CancelRecommendation(ctx context.Context, r soap.RoundTripper, req *types.CancelRecommendation) (*types.CancelRecommendationResponse, error) { var reqBody, resBody CancelRecommendationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CancelRetrievePropertiesExBody struct { Req *types.CancelRetrievePropertiesEx `xml:"urn:vim25 CancelRetrievePropertiesEx,omitempty"` Res *types.CancelRetrievePropertiesExResponse `xml:"urn:vim25 CancelRetrievePropertiesExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CancelRetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ } func CancelRetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.CancelRetrievePropertiesEx) (*types.CancelRetrievePropertiesExResponse, error) { var reqBody, resBody CancelRetrievePropertiesExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CancelStorageDrsRecommendationBody struct { Req *types.CancelStorageDrsRecommendation `xml:"urn:vim25 CancelStorageDrsRecommendation,omitempty"` Res *types.CancelStorageDrsRecommendationResponse `xml:"urn:vim25 CancelStorageDrsRecommendationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CancelStorageDrsRecommendationBody) Fault() *soap.Fault { return b.Fault_ } func CancelStorageDrsRecommendation(ctx context.Context, r soap.RoundTripper, req *types.CancelStorageDrsRecommendation) (*types.CancelStorageDrsRecommendationResponse, error) { var reqBody, resBody CancelStorageDrsRecommendationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CancelTaskBody struct { Req *types.CancelTask `xml:"urn:vim25 CancelTask,omitempty"` Res *types.CancelTaskResponse `xml:"urn:vim25 CancelTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CancelTaskBody) Fault() *soap.Fault { return b.Fault_ } func CancelTask(ctx context.Context, r soap.RoundTripper, req *types.CancelTask) (*types.CancelTaskResponse, error) { var reqBody, resBody CancelTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CancelWaitForUpdatesBody struct { Req *types.CancelWaitForUpdates `xml:"urn:vim25 CancelWaitForUpdates,omitempty"` Res *types.CancelWaitForUpdatesResponse `xml:"urn:vim25 CancelWaitForUpdatesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CancelWaitForUpdatesBody) Fault() *soap.Fault { return b.Fault_ } func CancelWaitForUpdates(ctx context.Context, r soap.RoundTripper, req *types.CancelWaitForUpdates) (*types.CancelWaitForUpdatesResponse, error) { var reqBody, resBody CancelWaitForUpdatesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CertMgrRefreshCACertificatesAndCRLs_TaskBody struct { Req *types.CertMgrRefreshCACertificatesAndCRLs_Task `xml:"urn:vim25 CertMgrRefreshCACertificatesAndCRLs_Task,omitempty"` Res *types.CertMgrRefreshCACertificatesAndCRLs_TaskResponse `xml:"urn:vim25 CertMgrRefreshCACertificatesAndCRLs_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CertMgrRefreshCACertificatesAndCRLs_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CertMgrRefreshCACertificatesAndCRLs_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRefreshCACertificatesAndCRLs_Task) (*types.CertMgrRefreshCACertificatesAndCRLs_TaskResponse, error) { var reqBody, resBody CertMgrRefreshCACertificatesAndCRLs_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CertMgrRefreshCertificates_TaskBody struct { Req *types.CertMgrRefreshCertificates_Task `xml:"urn:vim25 CertMgrRefreshCertificates_Task,omitempty"` Res *types.CertMgrRefreshCertificates_TaskResponse `xml:"urn:vim25 CertMgrRefreshCertificates_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CertMgrRefreshCertificates_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CertMgrRefreshCertificates_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRefreshCertificates_Task) (*types.CertMgrRefreshCertificates_TaskResponse, error) { var reqBody, resBody CertMgrRefreshCertificates_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CertMgrRevokeCertificates_TaskBody struct { Req *types.CertMgrRevokeCertificates_Task `xml:"urn:vim25 CertMgrRevokeCertificates_Task,omitempty"` Res *types.CertMgrRevokeCertificates_TaskResponse `xml:"urn:vim25 CertMgrRevokeCertificates_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CertMgrRevokeCertificates_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CertMgrRevokeCertificates_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRevokeCertificates_Task) (*types.CertMgrRevokeCertificates_TaskResponse, error) { var reqBody, resBody CertMgrRevokeCertificates_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ChangeAccessModeBody struct { Req *types.ChangeAccessMode `xml:"urn:vim25 ChangeAccessMode,omitempty"` Res *types.ChangeAccessModeResponse `xml:"urn:vim25 ChangeAccessModeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ChangeAccessModeBody) Fault() *soap.Fault { return b.Fault_ } func ChangeAccessMode(ctx context.Context, r soap.RoundTripper, req *types.ChangeAccessMode) (*types.ChangeAccessModeResponse, error) { var reqBody, resBody ChangeAccessModeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ChangeFileAttributesInGuestBody struct { Req *types.ChangeFileAttributesInGuest `xml:"urn:vim25 ChangeFileAttributesInGuest,omitempty"` Res *types.ChangeFileAttributesInGuestResponse `xml:"urn:vim25 ChangeFileAttributesInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ChangeFileAttributesInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ChangeFileAttributesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ChangeFileAttributesInGuest) (*types.ChangeFileAttributesInGuestResponse, error) { var reqBody, resBody ChangeFileAttributesInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ChangeLockdownModeBody struct { Req *types.ChangeLockdownMode `xml:"urn:vim25 ChangeLockdownMode,omitempty"` Res *types.ChangeLockdownModeResponse `xml:"urn:vim25 ChangeLockdownModeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ChangeLockdownModeBody) Fault() *soap.Fault { return b.Fault_ } func ChangeLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.ChangeLockdownMode) (*types.ChangeLockdownModeResponse, error) { var reqBody, resBody ChangeLockdownModeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ChangeNFSUserPasswordBody struct { Req *types.ChangeNFSUserPassword `xml:"urn:vim25 ChangeNFSUserPassword,omitempty"` Res *types.ChangeNFSUserPasswordResponse `xml:"urn:vim25 ChangeNFSUserPasswordResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ChangeNFSUserPasswordBody) Fault() *soap.Fault { return b.Fault_ } func ChangeNFSUserPassword(ctx context.Context, r soap.RoundTripper, req *types.ChangeNFSUserPassword) (*types.ChangeNFSUserPasswordResponse, error) { var reqBody, resBody ChangeNFSUserPasswordBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ChangeOwnerBody struct { Req *types.ChangeOwner `xml:"urn:vim25 ChangeOwner,omitempty"` Res *types.ChangeOwnerResponse `xml:"urn:vim25 ChangeOwnerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ChangeOwnerBody) Fault() *soap.Fault { return b.Fault_ } func ChangeOwner(ctx context.Context, r soap.RoundTripper, req *types.ChangeOwner) (*types.ChangeOwnerResponse, error) { var reqBody, resBody ChangeOwnerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckAddHostEvc_TaskBody struct { Req *types.CheckAddHostEvc_Task `xml:"urn:vim25 CheckAddHostEvc_Task,omitempty"` Res *types.CheckAddHostEvc_TaskResponse `xml:"urn:vim25 CheckAddHostEvc_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckAddHostEvc_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckAddHostEvc_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckAddHostEvc_Task) (*types.CheckAddHostEvc_TaskResponse, error) { var reqBody, resBody CheckAddHostEvc_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckAnswerFileStatus_TaskBody struct { Req *types.CheckAnswerFileStatus_Task `xml:"urn:vim25 CheckAnswerFileStatus_Task,omitempty"` Res *types.CheckAnswerFileStatus_TaskResponse `xml:"urn:vim25 CheckAnswerFileStatus_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckAnswerFileStatus_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckAnswerFileStatus_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckAnswerFileStatus_Task) (*types.CheckAnswerFileStatus_TaskResponse, error) { var reqBody, resBody CheckAnswerFileStatus_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckCompatibility_TaskBody struct { Req *types.CheckCompatibility_Task `xml:"urn:vim25 CheckCompatibility_Task,omitempty"` Res *types.CheckCompatibility_TaskResponse `xml:"urn:vim25 CheckCompatibility_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckCompatibility_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckCompatibility_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckCompatibility_Task) (*types.CheckCompatibility_TaskResponse, error) { var reqBody, resBody CheckCompatibility_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckCompliance_TaskBody struct { Req *types.CheckCompliance_Task `xml:"urn:vim25 CheckCompliance_Task,omitempty"` Res *types.CheckCompliance_TaskResponse `xml:"urn:vim25 CheckCompliance_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckCompliance_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckCompliance_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckCompliance_Task) (*types.CheckCompliance_TaskResponse, error) { var reqBody, resBody CheckCompliance_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckConfigureEvcMode_TaskBody struct { Req *types.CheckConfigureEvcMode_Task `xml:"urn:vim25 CheckConfigureEvcMode_Task,omitempty"` Res *types.CheckConfigureEvcMode_TaskResponse `xml:"urn:vim25 CheckConfigureEvcMode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckConfigureEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckConfigureEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckConfigureEvcMode_Task) (*types.CheckConfigureEvcMode_TaskResponse, error) { var reqBody, resBody CheckConfigureEvcMode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckCustomizationResourcesBody struct { Req *types.CheckCustomizationResources `xml:"urn:vim25 CheckCustomizationResources,omitempty"` Res *types.CheckCustomizationResourcesResponse `xml:"urn:vim25 CheckCustomizationResourcesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckCustomizationResourcesBody) Fault() *soap.Fault { return b.Fault_ } func CheckCustomizationResources(ctx context.Context, r soap.RoundTripper, req *types.CheckCustomizationResources) (*types.CheckCustomizationResourcesResponse, error) { var reqBody, resBody CheckCustomizationResourcesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckCustomizationSpecBody struct { Req *types.CheckCustomizationSpec `xml:"urn:vim25 CheckCustomizationSpec,omitempty"` Res *types.CheckCustomizationSpecResponse `xml:"urn:vim25 CheckCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func CheckCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.CheckCustomizationSpec) (*types.CheckCustomizationSpecResponse, error) { var reqBody, resBody CheckCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckForUpdatesBody struct { Req *types.CheckForUpdates `xml:"urn:vim25 CheckForUpdates,omitempty"` Res *types.CheckForUpdatesResponse `xml:"urn:vim25 CheckForUpdatesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckForUpdatesBody) Fault() *soap.Fault { return b.Fault_ } func CheckForUpdates(ctx context.Context, r soap.RoundTripper, req *types.CheckForUpdates) (*types.CheckForUpdatesResponse, error) { var reqBody, resBody CheckForUpdatesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckHostPatch_TaskBody struct { Req *types.CheckHostPatch_Task `xml:"urn:vim25 CheckHostPatch_Task,omitempty"` Res *types.CheckHostPatch_TaskResponse `xml:"urn:vim25 CheckHostPatch_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckHostPatch_Task) (*types.CheckHostPatch_TaskResponse, error) { var reqBody, resBody CheckHostPatch_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckLicenseFeatureBody struct { Req *types.CheckLicenseFeature `xml:"urn:vim25 CheckLicenseFeature,omitempty"` Res *types.CheckLicenseFeatureResponse `xml:"urn:vim25 CheckLicenseFeatureResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckLicenseFeatureBody) Fault() *soap.Fault { return b.Fault_ } func CheckLicenseFeature(ctx context.Context, r soap.RoundTripper, req *types.CheckLicenseFeature) (*types.CheckLicenseFeatureResponse, error) { var reqBody, resBody CheckLicenseFeatureBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckMigrate_TaskBody struct { Req *types.CheckMigrate_Task `xml:"urn:vim25 CheckMigrate_Task,omitempty"` Res *types.CheckMigrate_TaskResponse `xml:"urn:vim25 CheckMigrate_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckMigrate_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckMigrate_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckMigrate_Task) (*types.CheckMigrate_TaskResponse, error) { var reqBody, resBody CheckMigrate_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckProfileCompliance_TaskBody struct { Req *types.CheckProfileCompliance_Task `xml:"urn:vim25 CheckProfileCompliance_Task,omitempty"` Res *types.CheckProfileCompliance_TaskResponse `xml:"urn:vim25 CheckProfileCompliance_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckProfileCompliance_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckProfileCompliance_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckProfileCompliance_Task) (*types.CheckProfileCompliance_TaskResponse, error) { var reqBody, resBody CheckProfileCompliance_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CheckRelocate_TaskBody struct { Req *types.CheckRelocate_Task `xml:"urn:vim25 CheckRelocate_Task,omitempty"` Res *types.CheckRelocate_TaskResponse `xml:"urn:vim25 CheckRelocate_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CheckRelocate_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CheckRelocate_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckRelocate_Task) (*types.CheckRelocate_TaskResponse, error) { var reqBody, resBody CheckRelocate_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ClearComplianceStatusBody struct { Req *types.ClearComplianceStatus `xml:"urn:vim25 ClearComplianceStatus,omitempty"` Res *types.ClearComplianceStatusResponse `xml:"urn:vim25 ClearComplianceStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ClearComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ } func ClearComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.ClearComplianceStatus) (*types.ClearComplianceStatusResponse, error) { var reqBody, resBody ClearComplianceStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ClearNFSUserBody struct { Req *types.ClearNFSUser `xml:"urn:vim25 ClearNFSUser,omitempty"` Res *types.ClearNFSUserResponse `xml:"urn:vim25 ClearNFSUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ClearNFSUserBody) Fault() *soap.Fault { return b.Fault_ } func ClearNFSUser(ctx context.Context, r soap.RoundTripper, req *types.ClearNFSUser) (*types.ClearNFSUserResponse, error) { var reqBody, resBody ClearNFSUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ClearSystemEventLogBody struct { Req *types.ClearSystemEventLog `xml:"urn:vim25 ClearSystemEventLog,omitempty"` Res *types.ClearSystemEventLogResponse `xml:"urn:vim25 ClearSystemEventLogResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ClearSystemEventLogBody) Fault() *soap.Fault { return b.Fault_ } func ClearSystemEventLog(ctx context.Context, r soap.RoundTripper, req *types.ClearSystemEventLog) (*types.ClearSystemEventLogResponse, error) { var reqBody, resBody ClearSystemEventLogBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CloneSessionBody struct { Req *types.CloneSession `xml:"urn:vim25 CloneSession,omitempty"` Res *types.CloneSessionResponse `xml:"urn:vim25 CloneSessionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CloneSessionBody) Fault() *soap.Fault { return b.Fault_ } func CloneSession(ctx context.Context, r soap.RoundTripper, req *types.CloneSession) (*types.CloneSessionResponse, error) { var reqBody, resBody CloneSessionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CloneVApp_TaskBody struct { Req *types.CloneVApp_Task `xml:"urn:vim25 CloneVApp_Task,omitempty"` Res *types.CloneVApp_TaskResponse `xml:"urn:vim25 CloneVApp_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CloneVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CloneVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVApp_Task) (*types.CloneVApp_TaskResponse, error) { var reqBody, resBody CloneVApp_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CloneVM_TaskBody struct { Req *types.CloneVM_Task `xml:"urn:vim25 CloneVM_Task,omitempty"` Res *types.CloneVM_TaskResponse `xml:"urn:vim25 CloneVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CloneVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CloneVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVM_Task) (*types.CloneVM_TaskResponse, error) { var reqBody, resBody CloneVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CloneVStorageObject_TaskBody struct { Req *types.CloneVStorageObject_Task `xml:"urn:vim25 CloneVStorageObject_Task,omitempty"` Res *types.CloneVStorageObject_TaskResponse `xml:"urn:vim25 CloneVStorageObject_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CloneVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CloneVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVStorageObject_Task) (*types.CloneVStorageObject_TaskResponse, error) { var reqBody, resBody CloneVStorageObject_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CloseInventoryViewFolderBody struct { Req *types.CloseInventoryViewFolder `xml:"urn:vim25 CloseInventoryViewFolder,omitempty"` Res *types.CloseInventoryViewFolderResponse `xml:"urn:vim25 CloseInventoryViewFolderResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CloseInventoryViewFolderBody) Fault() *soap.Fault { return b.Fault_ } func CloseInventoryViewFolder(ctx context.Context, r soap.RoundTripper, req *types.CloseInventoryViewFolder) (*types.CloseInventoryViewFolderResponse, error) { var reqBody, resBody CloseInventoryViewFolderBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ClusterEnterMaintenanceModeBody struct { Req *types.ClusterEnterMaintenanceMode `xml:"urn:vim25 ClusterEnterMaintenanceMode,omitempty"` Res *types.ClusterEnterMaintenanceModeResponse `xml:"urn:vim25 ClusterEnterMaintenanceModeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ClusterEnterMaintenanceModeBody) Fault() *soap.Fault { return b.Fault_ } func ClusterEnterMaintenanceMode(ctx context.Context, r soap.RoundTripper, req *types.ClusterEnterMaintenanceMode) (*types.ClusterEnterMaintenanceModeResponse, error) { var reqBody, resBody ClusterEnterMaintenanceModeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ComputeDiskPartitionInfoBody struct { Req *types.ComputeDiskPartitionInfo `xml:"urn:vim25 ComputeDiskPartitionInfo,omitempty"` Res *types.ComputeDiskPartitionInfoResponse `xml:"urn:vim25 ComputeDiskPartitionInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ComputeDiskPartitionInfoBody) Fault() *soap.Fault { return b.Fault_ } func ComputeDiskPartitionInfo(ctx context.Context, r soap.RoundTripper, req *types.ComputeDiskPartitionInfo) (*types.ComputeDiskPartitionInfoResponse, error) { var reqBody, resBody ComputeDiskPartitionInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ComputeDiskPartitionInfoForResizeBody struct { Req *types.ComputeDiskPartitionInfoForResize `xml:"urn:vim25 ComputeDiskPartitionInfoForResize,omitempty"` Res *types.ComputeDiskPartitionInfoForResizeResponse `xml:"urn:vim25 ComputeDiskPartitionInfoForResizeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ComputeDiskPartitionInfoForResizeBody) Fault() *soap.Fault { return b.Fault_ } func ComputeDiskPartitionInfoForResize(ctx context.Context, r soap.RoundTripper, req *types.ComputeDiskPartitionInfoForResize) (*types.ComputeDiskPartitionInfoForResizeResponse, error) { var reqBody, resBody ComputeDiskPartitionInfoForResizeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureCryptoKeyBody struct { Req *types.ConfigureCryptoKey `xml:"urn:vim25 ConfigureCryptoKey,omitempty"` Res *types.ConfigureCryptoKeyResponse `xml:"urn:vim25 ConfigureCryptoKeyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureCryptoKeyBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureCryptoKey(ctx context.Context, r soap.RoundTripper, req *types.ConfigureCryptoKey) (*types.ConfigureCryptoKeyResponse, error) { var reqBody, resBody ConfigureCryptoKeyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureDatastoreIORM_TaskBody struct { Req *types.ConfigureDatastoreIORM_Task `xml:"urn:vim25 ConfigureDatastoreIORM_Task,omitempty"` Res *types.ConfigureDatastoreIORM_TaskResponse `xml:"urn:vim25 ConfigureDatastoreIORM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureDatastoreIORM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureDatastoreIORM_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureDatastoreIORM_Task) (*types.ConfigureDatastoreIORM_TaskResponse, error) { var reqBody, resBody ConfigureDatastoreIORM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureDatastorePrincipalBody struct { Req *types.ConfigureDatastorePrincipal `xml:"urn:vim25 ConfigureDatastorePrincipal,omitempty"` Res *types.ConfigureDatastorePrincipalResponse `xml:"urn:vim25 ConfigureDatastorePrincipalResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureDatastorePrincipalBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureDatastorePrincipal(ctx context.Context, r soap.RoundTripper, req *types.ConfigureDatastorePrincipal) (*types.ConfigureDatastorePrincipalResponse, error) { var reqBody, resBody ConfigureDatastorePrincipalBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureEvcMode_TaskBody struct { Req *types.ConfigureEvcMode_Task `xml:"urn:vim25 ConfigureEvcMode_Task,omitempty"` Res *types.ConfigureEvcMode_TaskResponse `xml:"urn:vim25 ConfigureEvcMode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureEvcMode_Task) (*types.ConfigureEvcMode_TaskResponse, error) { var reqBody, resBody ConfigureEvcMode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureHostCache_TaskBody struct { Req *types.ConfigureHostCache_Task `xml:"urn:vim25 ConfigureHostCache_Task,omitempty"` Res *types.ConfigureHostCache_TaskResponse `xml:"urn:vim25 ConfigureHostCache_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureHostCache_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureHostCache_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureHostCache_Task) (*types.ConfigureHostCache_TaskResponse, error) { var reqBody, resBody ConfigureHostCache_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureLicenseSourceBody struct { Req *types.ConfigureLicenseSource `xml:"urn:vim25 ConfigureLicenseSource,omitempty"` Res *types.ConfigureLicenseSourceResponse `xml:"urn:vim25 ConfigureLicenseSourceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureLicenseSourceBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureLicenseSource(ctx context.Context, r soap.RoundTripper, req *types.ConfigureLicenseSource) (*types.ConfigureLicenseSourceResponse, error) { var reqBody, resBody ConfigureLicenseSourceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigurePowerPolicyBody struct { Req *types.ConfigurePowerPolicy `xml:"urn:vim25 ConfigurePowerPolicy,omitempty"` Res *types.ConfigurePowerPolicyResponse `xml:"urn:vim25 ConfigurePowerPolicyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigurePowerPolicyBody) Fault() *soap.Fault { return b.Fault_ } func ConfigurePowerPolicy(ctx context.Context, r soap.RoundTripper, req *types.ConfigurePowerPolicy) (*types.ConfigurePowerPolicyResponse, error) { var reqBody, resBody ConfigurePowerPolicyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureStorageDrsForPod_TaskBody struct { Req *types.ConfigureStorageDrsForPod_Task `xml:"urn:vim25 ConfigureStorageDrsForPod_Task,omitempty"` Res *types.ConfigureStorageDrsForPod_TaskResponse `xml:"urn:vim25 ConfigureStorageDrsForPod_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureStorageDrsForPod_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureStorageDrsForPod_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureStorageDrsForPod_Task) (*types.ConfigureStorageDrsForPod_TaskResponse, error) { var reqBody, resBody ConfigureStorageDrsForPod_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConfigureVFlashResourceEx_TaskBody struct { Req *types.ConfigureVFlashResourceEx_Task `xml:"urn:vim25 ConfigureVFlashResourceEx_Task,omitempty"` Res *types.ConfigureVFlashResourceEx_TaskResponse `xml:"urn:vim25 ConfigureVFlashResourceEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConfigureVFlashResourceEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ConfigureVFlashResourceEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureVFlashResourceEx_Task) (*types.ConfigureVFlashResourceEx_TaskResponse, error) { var reqBody, resBody ConfigureVFlashResourceEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConsolidateVMDisks_TaskBody struct { Req *types.ConsolidateVMDisks_Task `xml:"urn:vim25 ConsolidateVMDisks_Task,omitempty"` Res *types.ConsolidateVMDisks_TaskResponse `xml:"urn:vim25 ConsolidateVMDisks_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConsolidateVMDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ConsolidateVMDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.ConsolidateVMDisks_Task) (*types.ConsolidateVMDisks_TaskResponse, error) { var reqBody, resBody ConsolidateVMDisks_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ContinueRetrievePropertiesExBody struct { Req *types.ContinueRetrievePropertiesEx `xml:"urn:vim25 ContinueRetrievePropertiesEx,omitempty"` Res *types.ContinueRetrievePropertiesExResponse `xml:"urn:vim25 ContinueRetrievePropertiesExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ContinueRetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ } func ContinueRetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.ContinueRetrievePropertiesEx) (*types.ContinueRetrievePropertiesExResponse, error) { var reqBody, resBody ContinueRetrievePropertiesExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ConvertNamespacePathToUuidPathBody struct { Req *types.ConvertNamespacePathToUuidPath `xml:"urn:vim25 ConvertNamespacePathToUuidPath,omitempty"` Res *types.ConvertNamespacePathToUuidPathResponse `xml:"urn:vim25 ConvertNamespacePathToUuidPathResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ConvertNamespacePathToUuidPathBody) Fault() *soap.Fault { return b.Fault_ } func ConvertNamespacePathToUuidPath(ctx context.Context, r soap.RoundTripper, req *types.ConvertNamespacePathToUuidPath) (*types.ConvertNamespacePathToUuidPathResponse, error) { var reqBody, resBody ConvertNamespacePathToUuidPathBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CopyDatastoreFile_TaskBody struct { Req *types.CopyDatastoreFile_Task `xml:"urn:vim25 CopyDatastoreFile_Task,omitempty"` Res *types.CopyDatastoreFile_TaskResponse `xml:"urn:vim25 CopyDatastoreFile_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CopyDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CopyDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.CopyDatastoreFile_Task) (*types.CopyDatastoreFile_TaskResponse, error) { var reqBody, resBody CopyDatastoreFile_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CopyVirtualDisk_TaskBody struct { Req *types.CopyVirtualDisk_Task `xml:"urn:vim25 CopyVirtualDisk_Task,omitempty"` Res *types.CopyVirtualDisk_TaskResponse `xml:"urn:vim25 CopyVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CopyVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CopyVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CopyVirtualDisk_Task) (*types.CopyVirtualDisk_TaskResponse, error) { var reqBody, resBody CopyVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateAlarmBody struct { Req *types.CreateAlarm `xml:"urn:vim25 CreateAlarm,omitempty"` Res *types.CreateAlarmResponse `xml:"urn:vim25 CreateAlarmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateAlarmBody) Fault() *soap.Fault { return b.Fault_ } func CreateAlarm(ctx context.Context, r soap.RoundTripper, req *types.CreateAlarm) (*types.CreateAlarmResponse, error) { var reqBody, resBody CreateAlarmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateChildVM_TaskBody struct { Req *types.CreateChildVM_Task `xml:"urn:vim25 CreateChildVM_Task,omitempty"` Res *types.CreateChildVM_TaskResponse `xml:"urn:vim25 CreateChildVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateChildVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateChildVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateChildVM_Task) (*types.CreateChildVM_TaskResponse, error) { var reqBody, resBody CreateChildVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateClusterBody struct { Req *types.CreateCluster `xml:"urn:vim25 CreateCluster,omitempty"` Res *types.CreateClusterResponse `xml:"urn:vim25 CreateClusterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateClusterBody) Fault() *soap.Fault { return b.Fault_ } func CreateCluster(ctx context.Context, r soap.RoundTripper, req *types.CreateCluster) (*types.CreateClusterResponse, error) { var reqBody, resBody CreateClusterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateClusterExBody struct { Req *types.CreateClusterEx `xml:"urn:vim25 CreateClusterEx,omitempty"` Res *types.CreateClusterExResponse `xml:"urn:vim25 CreateClusterExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateClusterExBody) Fault() *soap.Fault { return b.Fault_ } func CreateClusterEx(ctx context.Context, r soap.RoundTripper, req *types.CreateClusterEx) (*types.CreateClusterExResponse, error) { var reqBody, resBody CreateClusterExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateCollectorForEventsBody struct { Req *types.CreateCollectorForEvents `xml:"urn:vim25 CreateCollectorForEvents,omitempty"` Res *types.CreateCollectorForEventsResponse `xml:"urn:vim25 CreateCollectorForEventsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateCollectorForEventsBody) Fault() *soap.Fault { return b.Fault_ } func CreateCollectorForEvents(ctx context.Context, r soap.RoundTripper, req *types.CreateCollectorForEvents) (*types.CreateCollectorForEventsResponse, error) { var reqBody, resBody CreateCollectorForEventsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateCollectorForTasksBody struct { Req *types.CreateCollectorForTasks `xml:"urn:vim25 CreateCollectorForTasks,omitempty"` Res *types.CreateCollectorForTasksResponse `xml:"urn:vim25 CreateCollectorForTasksResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateCollectorForTasksBody) Fault() *soap.Fault { return b.Fault_ } func CreateCollectorForTasks(ctx context.Context, r soap.RoundTripper, req *types.CreateCollectorForTasks) (*types.CreateCollectorForTasksResponse, error) { var reqBody, resBody CreateCollectorForTasksBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateContainerViewBody struct { Req *types.CreateContainerView `xml:"urn:vim25 CreateContainerView,omitempty"` Res *types.CreateContainerViewResponse `xml:"urn:vim25 CreateContainerViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateContainerViewBody) Fault() *soap.Fault { return b.Fault_ } func CreateContainerView(ctx context.Context, r soap.RoundTripper, req *types.CreateContainerView) (*types.CreateContainerViewResponse, error) { var reqBody, resBody CreateContainerViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateCustomizationSpecBody struct { Req *types.CreateCustomizationSpec `xml:"urn:vim25 CreateCustomizationSpec,omitempty"` Res *types.CreateCustomizationSpecResponse `xml:"urn:vim25 CreateCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func CreateCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.CreateCustomizationSpec) (*types.CreateCustomizationSpecResponse, error) { var reqBody, resBody CreateCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDVPortgroup_TaskBody struct { Req *types.CreateDVPortgroup_Task `xml:"urn:vim25 CreateDVPortgroup_Task,omitempty"` Res *types.CreateDVPortgroup_TaskResponse `xml:"urn:vim25 CreateDVPortgroup_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDVPortgroup_Task) (*types.CreateDVPortgroup_TaskResponse, error) { var reqBody, resBody CreateDVPortgroup_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDVS_TaskBody struct { Req *types.CreateDVS_Task `xml:"urn:vim25 CreateDVS_Task,omitempty"` Res *types.CreateDVS_TaskResponse `xml:"urn:vim25 CreateDVS_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDVS_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateDVS_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDVS_Task) (*types.CreateDVS_TaskResponse, error) { var reqBody, resBody CreateDVS_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDatacenterBody struct { Req *types.CreateDatacenter `xml:"urn:vim25 CreateDatacenter,omitempty"` Res *types.CreateDatacenterResponse `xml:"urn:vim25 CreateDatacenterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDatacenterBody) Fault() *soap.Fault { return b.Fault_ } func CreateDatacenter(ctx context.Context, r soap.RoundTripper, req *types.CreateDatacenter) (*types.CreateDatacenterResponse, error) { var reqBody, resBody CreateDatacenterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDefaultProfileBody struct { Req *types.CreateDefaultProfile `xml:"urn:vim25 CreateDefaultProfile,omitempty"` Res *types.CreateDefaultProfileResponse `xml:"urn:vim25 CreateDefaultProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ } func CreateDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.CreateDefaultProfile) (*types.CreateDefaultProfileResponse, error) { var reqBody, resBody CreateDefaultProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDescriptorBody struct { Req *types.CreateDescriptor `xml:"urn:vim25 CreateDescriptor,omitempty"` Res *types.CreateDescriptorResponse `xml:"urn:vim25 CreateDescriptorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDescriptorBody) Fault() *soap.Fault { return b.Fault_ } func CreateDescriptor(ctx context.Context, r soap.RoundTripper, req *types.CreateDescriptor) (*types.CreateDescriptorResponse, error) { var reqBody, resBody CreateDescriptorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDiagnosticPartitionBody struct { Req *types.CreateDiagnosticPartition `xml:"urn:vim25 CreateDiagnosticPartition,omitempty"` Res *types.CreateDiagnosticPartitionResponse `xml:"urn:vim25 CreateDiagnosticPartitionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDiagnosticPartitionBody) Fault() *soap.Fault { return b.Fault_ } func CreateDiagnosticPartition(ctx context.Context, r soap.RoundTripper, req *types.CreateDiagnosticPartition) (*types.CreateDiagnosticPartitionResponse, error) { var reqBody, resBody CreateDiagnosticPartitionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDirectoryBody struct { Req *types.CreateDirectory `xml:"urn:vim25 CreateDirectory,omitempty"` Res *types.CreateDirectoryResponse `xml:"urn:vim25 CreateDirectoryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDirectoryBody) Fault() *soap.Fault { return b.Fault_ } func CreateDirectory(ctx context.Context, r soap.RoundTripper, req *types.CreateDirectory) (*types.CreateDirectoryResponse, error) { var reqBody, resBody CreateDirectoryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateDisk_TaskBody struct { Req *types.CreateDisk_Task `xml:"urn:vim25 CreateDisk_Task,omitempty"` Res *types.CreateDisk_TaskResponse `xml:"urn:vim25 CreateDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDisk_Task) (*types.CreateDisk_TaskResponse, error) { var reqBody, resBody CreateDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateFilterBody struct { Req *types.CreateFilter `xml:"urn:vim25 CreateFilter,omitempty"` Res *types.CreateFilterResponse `xml:"urn:vim25 CreateFilterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateFilterBody) Fault() *soap.Fault { return b.Fault_ } func CreateFilter(ctx context.Context, r soap.RoundTripper, req *types.CreateFilter) (*types.CreateFilterResponse, error) { var reqBody, resBody CreateFilterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateFolderBody struct { Req *types.CreateFolder `xml:"urn:vim25 CreateFolder,omitempty"` Res *types.CreateFolderResponse `xml:"urn:vim25 CreateFolderResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateFolderBody) Fault() *soap.Fault { return b.Fault_ } func CreateFolder(ctx context.Context, r soap.RoundTripper, req *types.CreateFolder) (*types.CreateFolderResponse, error) { var reqBody, resBody CreateFolderBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateGroupBody struct { Req *types.CreateGroup `xml:"urn:vim25 CreateGroup,omitempty"` Res *types.CreateGroupResponse `xml:"urn:vim25 CreateGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateGroupBody) Fault() *soap.Fault { return b.Fault_ } func CreateGroup(ctx context.Context, r soap.RoundTripper, req *types.CreateGroup) (*types.CreateGroupResponse, error) { var reqBody, resBody CreateGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateImportSpecBody struct { Req *types.CreateImportSpec `xml:"urn:vim25 CreateImportSpec,omitempty"` Res *types.CreateImportSpecResponse `xml:"urn:vim25 CreateImportSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateImportSpecBody) Fault() *soap.Fault { return b.Fault_ } func CreateImportSpec(ctx context.Context, r soap.RoundTripper, req *types.CreateImportSpec) (*types.CreateImportSpecResponse, error) { var reqBody, resBody CreateImportSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateInventoryViewBody struct { Req *types.CreateInventoryView `xml:"urn:vim25 CreateInventoryView,omitempty"` Res *types.CreateInventoryViewResponse `xml:"urn:vim25 CreateInventoryViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateInventoryViewBody) Fault() *soap.Fault { return b.Fault_ } func CreateInventoryView(ctx context.Context, r soap.RoundTripper, req *types.CreateInventoryView) (*types.CreateInventoryViewResponse, error) { var reqBody, resBody CreateInventoryViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateIpPoolBody struct { Req *types.CreateIpPool `xml:"urn:vim25 CreateIpPool,omitempty"` Res *types.CreateIpPoolResponse `xml:"urn:vim25 CreateIpPoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateIpPoolBody) Fault() *soap.Fault { return b.Fault_ } func CreateIpPool(ctx context.Context, r soap.RoundTripper, req *types.CreateIpPool) (*types.CreateIpPoolResponse, error) { var reqBody, resBody CreateIpPoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateListViewBody struct { Req *types.CreateListView `xml:"urn:vim25 CreateListView,omitempty"` Res *types.CreateListViewResponse `xml:"urn:vim25 CreateListViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateListViewBody) Fault() *soap.Fault { return b.Fault_ } func CreateListView(ctx context.Context, r soap.RoundTripper, req *types.CreateListView) (*types.CreateListViewResponse, error) { var reqBody, resBody CreateListViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateListViewFromViewBody struct { Req *types.CreateListViewFromView `xml:"urn:vim25 CreateListViewFromView,omitempty"` Res *types.CreateListViewFromViewResponse `xml:"urn:vim25 CreateListViewFromViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateListViewFromViewBody) Fault() *soap.Fault { return b.Fault_ } func CreateListViewFromView(ctx context.Context, r soap.RoundTripper, req *types.CreateListViewFromView) (*types.CreateListViewFromViewResponse, error) { var reqBody, resBody CreateListViewFromViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateLocalDatastoreBody struct { Req *types.CreateLocalDatastore `xml:"urn:vim25 CreateLocalDatastore,omitempty"` Res *types.CreateLocalDatastoreResponse `xml:"urn:vim25 CreateLocalDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateLocalDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func CreateLocalDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateLocalDatastore) (*types.CreateLocalDatastoreResponse, error) { var reqBody, resBody CreateLocalDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateNasDatastoreBody struct { Req *types.CreateNasDatastore `xml:"urn:vim25 CreateNasDatastore,omitempty"` Res *types.CreateNasDatastoreResponse `xml:"urn:vim25 CreateNasDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateNasDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func CreateNasDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateNasDatastore) (*types.CreateNasDatastoreResponse, error) { var reqBody, resBody CreateNasDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateObjectScheduledTaskBody struct { Req *types.CreateObjectScheduledTask `xml:"urn:vim25 CreateObjectScheduledTask,omitempty"` Res *types.CreateObjectScheduledTaskResponse `xml:"urn:vim25 CreateObjectScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateObjectScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateObjectScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.CreateObjectScheduledTask) (*types.CreateObjectScheduledTaskResponse, error) { var reqBody, resBody CreateObjectScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreatePerfIntervalBody struct { Req *types.CreatePerfInterval `xml:"urn:vim25 CreatePerfInterval,omitempty"` Res *types.CreatePerfIntervalResponse `xml:"urn:vim25 CreatePerfIntervalResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreatePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ } func CreatePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.CreatePerfInterval) (*types.CreatePerfIntervalResponse, error) { var reqBody, resBody CreatePerfIntervalBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateProfileBody struct { Req *types.CreateProfile `xml:"urn:vim25 CreateProfile,omitempty"` Res *types.CreateProfileResponse `xml:"urn:vim25 CreateProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateProfileBody) Fault() *soap.Fault { return b.Fault_ } func CreateProfile(ctx context.Context, r soap.RoundTripper, req *types.CreateProfile) (*types.CreateProfileResponse, error) { var reqBody, resBody CreateProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreatePropertyCollectorBody struct { Req *types.CreatePropertyCollector `xml:"urn:vim25 CreatePropertyCollector,omitempty"` Res *types.CreatePropertyCollectorResponse `xml:"urn:vim25 CreatePropertyCollectorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreatePropertyCollectorBody) Fault() *soap.Fault { return b.Fault_ } func CreatePropertyCollector(ctx context.Context, r soap.RoundTripper, req *types.CreatePropertyCollector) (*types.CreatePropertyCollectorResponse, error) { var reqBody, resBody CreatePropertyCollectorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateRegistryKeyInGuestBody struct { Req *types.CreateRegistryKeyInGuest `xml:"urn:vim25 CreateRegistryKeyInGuest,omitempty"` Res *types.CreateRegistryKeyInGuestResponse `xml:"urn:vim25 CreateRegistryKeyInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateRegistryKeyInGuestBody) Fault() *soap.Fault { return b.Fault_ } func CreateRegistryKeyInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateRegistryKeyInGuest) (*types.CreateRegistryKeyInGuestResponse, error) { var reqBody, resBody CreateRegistryKeyInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateResourcePoolBody struct { Req *types.CreateResourcePool `xml:"urn:vim25 CreateResourcePool,omitempty"` Res *types.CreateResourcePoolResponse `xml:"urn:vim25 CreateResourcePoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } func CreateResourcePool(ctx context.Context, r soap.RoundTripper, req *types.CreateResourcePool) (*types.CreateResourcePoolResponse, error) { var reqBody, resBody CreateResourcePoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateScheduledTaskBody struct { Req *types.CreateScheduledTask `xml:"urn:vim25 CreateScheduledTask,omitempty"` Res *types.CreateScheduledTaskResponse `xml:"urn:vim25 CreateScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.CreateScheduledTask) (*types.CreateScheduledTaskResponse, error) { var reqBody, resBody CreateScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateScreenshot_TaskBody struct { Req *types.CreateScreenshot_Task `xml:"urn:vim25 CreateScreenshot_Task,omitempty"` Res *types.CreateScreenshot_TaskResponse `xml:"urn:vim25 CreateScreenshot_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateScreenshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateScreenshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateScreenshot_Task) (*types.CreateScreenshot_TaskResponse, error) { var reqBody, resBody CreateScreenshot_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateSecondaryVMEx_TaskBody struct { Req *types.CreateSecondaryVMEx_Task `xml:"urn:vim25 CreateSecondaryVMEx_Task,omitempty"` Res *types.CreateSecondaryVMEx_TaskResponse `xml:"urn:vim25 CreateSecondaryVMEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateSecondaryVMEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateSecondaryVMEx_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSecondaryVMEx_Task) (*types.CreateSecondaryVMEx_TaskResponse, error) { var reqBody, resBody CreateSecondaryVMEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateSecondaryVM_TaskBody struct { Req *types.CreateSecondaryVM_Task `xml:"urn:vim25 CreateSecondaryVM_Task,omitempty"` Res *types.CreateSecondaryVM_TaskResponse `xml:"urn:vim25 CreateSecondaryVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSecondaryVM_Task) (*types.CreateSecondaryVM_TaskResponse, error) { var reqBody, resBody CreateSecondaryVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateSnapshotEx_TaskBody struct { Req *types.CreateSnapshotEx_Task `xml:"urn:vim25 CreateSnapshotEx_Task,omitempty"` Res *types.CreateSnapshotEx_TaskResponse `xml:"urn:vim25 CreateSnapshotEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateSnapshotEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateSnapshotEx_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSnapshotEx_Task) (*types.CreateSnapshotEx_TaskResponse, error) { var reqBody, resBody CreateSnapshotEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateSnapshot_TaskBody struct { Req *types.CreateSnapshot_Task `xml:"urn:vim25 CreateSnapshot_Task,omitempty"` Res *types.CreateSnapshot_TaskResponse `xml:"urn:vim25 CreateSnapshot_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSnapshot_Task) (*types.CreateSnapshot_TaskResponse, error) { var reqBody, resBody CreateSnapshot_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateStoragePodBody struct { Req *types.CreateStoragePod `xml:"urn:vim25 CreateStoragePod,omitempty"` Res *types.CreateStoragePodResponse `xml:"urn:vim25 CreateStoragePodResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateStoragePodBody) Fault() *soap.Fault { return b.Fault_ } func CreateStoragePod(ctx context.Context, r soap.RoundTripper, req *types.CreateStoragePod) (*types.CreateStoragePodResponse, error) { var reqBody, resBody CreateStoragePodBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateTaskBody struct { Req *types.CreateTask `xml:"urn:vim25 CreateTask,omitempty"` Res *types.CreateTaskResponse `xml:"urn:vim25 CreateTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateTaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateTask(ctx context.Context, r soap.RoundTripper, req *types.CreateTask) (*types.CreateTaskResponse, error) { var reqBody, resBody CreateTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateTemporaryDirectoryInGuestBody struct { Req *types.CreateTemporaryDirectoryInGuest `xml:"urn:vim25 CreateTemporaryDirectoryInGuest,omitempty"` Res *types.CreateTemporaryDirectoryInGuestResponse `xml:"urn:vim25 CreateTemporaryDirectoryInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateTemporaryDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } func CreateTemporaryDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateTemporaryDirectoryInGuest) (*types.CreateTemporaryDirectoryInGuestResponse, error) { var reqBody, resBody CreateTemporaryDirectoryInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateTemporaryFileInGuestBody struct { Req *types.CreateTemporaryFileInGuest `xml:"urn:vim25 CreateTemporaryFileInGuest,omitempty"` Res *types.CreateTemporaryFileInGuestResponse `xml:"urn:vim25 CreateTemporaryFileInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateTemporaryFileInGuestBody) Fault() *soap.Fault { return b.Fault_ } func CreateTemporaryFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateTemporaryFileInGuest) (*types.CreateTemporaryFileInGuestResponse, error) { var reqBody, resBody CreateTemporaryFileInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateUserBody struct { Req *types.CreateUser `xml:"urn:vim25 CreateUser,omitempty"` Res *types.CreateUserResponse `xml:"urn:vim25 CreateUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateUserBody) Fault() *soap.Fault { return b.Fault_ } func CreateUser(ctx context.Context, r soap.RoundTripper, req *types.CreateUser) (*types.CreateUserResponse, error) { var reqBody, resBody CreateUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateVAppBody struct { Req *types.CreateVApp `xml:"urn:vim25 CreateVApp,omitempty"` Res *types.CreateVAppResponse `xml:"urn:vim25 CreateVAppResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateVAppBody) Fault() *soap.Fault { return b.Fault_ } func CreateVApp(ctx context.Context, r soap.RoundTripper, req *types.CreateVApp) (*types.CreateVAppResponse, error) { var reqBody, resBody CreateVAppBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateVM_TaskBody struct { Req *types.CreateVM_Task `xml:"urn:vim25 CreateVM_Task,omitempty"` Res *types.CreateVM_TaskResponse `xml:"urn:vim25 CreateVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateVM_Task) (*types.CreateVM_TaskResponse, error) { var reqBody, resBody CreateVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateVirtualDisk_TaskBody struct { Req *types.CreateVirtualDisk_Task `xml:"urn:vim25 CreateVirtualDisk_Task,omitempty"` Res *types.CreateVirtualDisk_TaskResponse `xml:"urn:vim25 CreateVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CreateVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateVirtualDisk_Task) (*types.CreateVirtualDisk_TaskResponse, error) { var reqBody, resBody CreateVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateVmfsDatastoreBody struct { Req *types.CreateVmfsDatastore `xml:"urn:vim25 CreateVmfsDatastore,omitempty"` Res *types.CreateVmfsDatastoreResponse `xml:"urn:vim25 CreateVmfsDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func CreateVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateVmfsDatastore) (*types.CreateVmfsDatastoreResponse, error) { var reqBody, resBody CreateVmfsDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CreateVvolDatastoreBody struct { Req *types.CreateVvolDatastore `xml:"urn:vim25 CreateVvolDatastore,omitempty"` Res *types.CreateVvolDatastoreResponse `xml:"urn:vim25 CreateVvolDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CreateVvolDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func CreateVvolDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateVvolDatastore) (*types.CreateVvolDatastoreResponse, error) { var reqBody, resBody CreateVvolDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CurrentTimeBody struct { Req *types.CurrentTime `xml:"urn:vim25 CurrentTime,omitempty"` Res *types.CurrentTimeResponse `xml:"urn:vim25 CurrentTimeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CurrentTimeBody) Fault() *soap.Fault { return b.Fault_ } func CurrentTime(ctx context.Context, r soap.RoundTripper, req *types.CurrentTime) (*types.CurrentTimeResponse, error) { var reqBody, resBody CurrentTimeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CustomizationSpecItemToXmlBody struct { Req *types.CustomizationSpecItemToXml `xml:"urn:vim25 CustomizationSpecItemToXml,omitempty"` Res *types.CustomizationSpecItemToXmlResponse `xml:"urn:vim25 CustomizationSpecItemToXmlResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CustomizationSpecItemToXmlBody) Fault() *soap.Fault { return b.Fault_ } func CustomizationSpecItemToXml(ctx context.Context, r soap.RoundTripper, req *types.CustomizationSpecItemToXml) (*types.CustomizationSpecItemToXmlResponse, error) { var reqBody, resBody CustomizationSpecItemToXmlBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type CustomizeVM_TaskBody struct { Req *types.CustomizeVM_Task `xml:"urn:vim25 CustomizeVM_Task,omitempty"` Res *types.CustomizeVM_TaskResponse `xml:"urn:vim25 CustomizeVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *CustomizeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func CustomizeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CustomizeVM_Task) (*types.CustomizeVM_TaskResponse, error) { var reqBody, resBody CustomizeVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DVPortgroupRollback_TaskBody struct { Req *types.DVPortgroupRollback_Task `xml:"urn:vim25 DVPortgroupRollback_Task,omitempty"` Res *types.DVPortgroupRollback_TaskResponse `xml:"urn:vim25 DVPortgroupRollback_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DVPortgroupRollback_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DVPortgroupRollback_Task(ctx context.Context, r soap.RoundTripper, req *types.DVPortgroupRollback_Task) (*types.DVPortgroupRollback_TaskResponse, error) { var reqBody, resBody DVPortgroupRollback_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DVSManagerExportEntity_TaskBody struct { Req *types.DVSManagerExportEntity_Task `xml:"urn:vim25 DVSManagerExportEntity_Task,omitempty"` Res *types.DVSManagerExportEntity_TaskResponse `xml:"urn:vim25 DVSManagerExportEntity_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DVSManagerExportEntity_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DVSManagerExportEntity_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerExportEntity_Task) (*types.DVSManagerExportEntity_TaskResponse, error) { var reqBody, resBody DVSManagerExportEntity_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DVSManagerImportEntity_TaskBody struct { Req *types.DVSManagerImportEntity_Task `xml:"urn:vim25 DVSManagerImportEntity_Task,omitempty"` Res *types.DVSManagerImportEntity_TaskResponse `xml:"urn:vim25 DVSManagerImportEntity_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DVSManagerImportEntity_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DVSManagerImportEntity_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerImportEntity_Task) (*types.DVSManagerImportEntity_TaskResponse, error) { var reqBody, resBody DVSManagerImportEntity_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DVSManagerLookupDvPortGroupBody struct { Req *types.DVSManagerLookupDvPortGroup `xml:"urn:vim25 DVSManagerLookupDvPortGroup,omitempty"` Res *types.DVSManagerLookupDvPortGroupResponse `xml:"urn:vim25 DVSManagerLookupDvPortGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DVSManagerLookupDvPortGroupBody) Fault() *soap.Fault { return b.Fault_ } func DVSManagerLookupDvPortGroup(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerLookupDvPortGroup) (*types.DVSManagerLookupDvPortGroupResponse, error) { var reqBody, resBody DVSManagerLookupDvPortGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DVSRollback_TaskBody struct { Req *types.DVSRollback_Task `xml:"urn:vim25 DVSRollback_Task,omitempty"` Res *types.DVSRollback_TaskResponse `xml:"urn:vim25 DVSRollback_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DVSRollback_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DVSRollback_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSRollback_Task) (*types.DVSRollback_TaskResponse, error) { var reqBody, resBody DVSRollback_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DatastoreEnterMaintenanceModeBody struct { Req *types.DatastoreEnterMaintenanceMode `xml:"urn:vim25 DatastoreEnterMaintenanceMode,omitempty"` Res *types.DatastoreEnterMaintenanceModeResponse `xml:"urn:vim25 DatastoreEnterMaintenanceModeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DatastoreEnterMaintenanceModeBody) Fault() *soap.Fault { return b.Fault_ } func DatastoreEnterMaintenanceMode(ctx context.Context, r soap.RoundTripper, req *types.DatastoreEnterMaintenanceMode) (*types.DatastoreEnterMaintenanceModeResponse, error) { var reqBody, resBody DatastoreEnterMaintenanceModeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DatastoreExitMaintenanceMode_TaskBody struct { Req *types.DatastoreExitMaintenanceMode_Task `xml:"urn:vim25 DatastoreExitMaintenanceMode_Task,omitempty"` Res *types.DatastoreExitMaintenanceMode_TaskResponse `xml:"urn:vim25 DatastoreExitMaintenanceMode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DatastoreExitMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DatastoreExitMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.DatastoreExitMaintenanceMode_Task) (*types.DatastoreExitMaintenanceMode_TaskResponse, error) { var reqBody, resBody DatastoreExitMaintenanceMode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DecodeLicenseBody struct { Req *types.DecodeLicense `xml:"urn:vim25 DecodeLicense,omitempty"` Res *types.DecodeLicenseResponse `xml:"urn:vim25 DecodeLicenseResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DecodeLicenseBody) Fault() *soap.Fault { return b.Fault_ } func DecodeLicense(ctx context.Context, r soap.RoundTripper, req *types.DecodeLicense) (*types.DecodeLicenseResponse, error) { var reqBody, resBody DecodeLicenseBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DefragmentAllDisksBody struct { Req *types.DefragmentAllDisks `xml:"urn:vim25 DefragmentAllDisks,omitempty"` Res *types.DefragmentAllDisksResponse `xml:"urn:vim25 DefragmentAllDisksResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DefragmentAllDisksBody) Fault() *soap.Fault { return b.Fault_ } func DefragmentAllDisks(ctx context.Context, r soap.RoundTripper, req *types.DefragmentAllDisks) (*types.DefragmentAllDisksResponse, error) { var reqBody, resBody DefragmentAllDisksBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DefragmentVirtualDisk_TaskBody struct { Req *types.DefragmentVirtualDisk_Task `xml:"urn:vim25 DefragmentVirtualDisk_Task,omitempty"` Res *types.DefragmentVirtualDisk_TaskResponse `xml:"urn:vim25 DefragmentVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DefragmentVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DefragmentVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DefragmentVirtualDisk_Task) (*types.DefragmentVirtualDisk_TaskResponse, error) { var reqBody, resBody DefragmentVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteCustomizationSpecBody struct { Req *types.DeleteCustomizationSpec `xml:"urn:vim25 DeleteCustomizationSpec,omitempty"` Res *types.DeleteCustomizationSpecResponse `xml:"urn:vim25 DeleteCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func DeleteCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.DeleteCustomizationSpec) (*types.DeleteCustomizationSpecResponse, error) { var reqBody, resBody DeleteCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteDatastoreFile_TaskBody struct { Req *types.DeleteDatastoreFile_Task `xml:"urn:vim25 DeleteDatastoreFile_Task,omitempty"` Res *types.DeleteDatastoreFile_TaskResponse `xml:"urn:vim25 DeleteDatastoreFile_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DeleteDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteDatastoreFile_Task) (*types.DeleteDatastoreFile_TaskResponse, error) { var reqBody, resBody DeleteDatastoreFile_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteDirectoryBody struct { Req *types.DeleteDirectory `xml:"urn:vim25 DeleteDirectory,omitempty"` Res *types.DeleteDirectoryResponse `xml:"urn:vim25 DeleteDirectoryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteDirectoryBody) Fault() *soap.Fault { return b.Fault_ } func DeleteDirectory(ctx context.Context, r soap.RoundTripper, req *types.DeleteDirectory) (*types.DeleteDirectoryResponse, error) { var reqBody, resBody DeleteDirectoryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteDirectoryInGuestBody struct { Req *types.DeleteDirectoryInGuest `xml:"urn:vim25 DeleteDirectoryInGuest,omitempty"` Res *types.DeleteDirectoryInGuestResponse `xml:"urn:vim25 DeleteDirectoryInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } func DeleteDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteDirectoryInGuest) (*types.DeleteDirectoryInGuestResponse, error) { var reqBody, resBody DeleteDirectoryInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteFileBody struct { Req *types.DeleteFile `xml:"urn:vim25 DeleteFile,omitempty"` Res *types.DeleteFileResponse `xml:"urn:vim25 DeleteFileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteFileBody) Fault() *soap.Fault { return b.Fault_ } func DeleteFile(ctx context.Context, r soap.RoundTripper, req *types.DeleteFile) (*types.DeleteFileResponse, error) { var reqBody, resBody DeleteFileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteFileInGuestBody struct { Req *types.DeleteFileInGuest `xml:"urn:vim25 DeleteFileInGuest,omitempty"` Res *types.DeleteFileInGuestResponse `xml:"urn:vim25 DeleteFileInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteFileInGuestBody) Fault() *soap.Fault { return b.Fault_ } func DeleteFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteFileInGuest) (*types.DeleteFileInGuestResponse, error) { var reqBody, resBody DeleteFileInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteHostSpecificationBody struct { Req *types.DeleteHostSpecification `xml:"urn:vim25 DeleteHostSpecification,omitempty"` Res *types.DeleteHostSpecificationResponse `xml:"urn:vim25 DeleteHostSpecificationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ } func DeleteHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.DeleteHostSpecification) (*types.DeleteHostSpecificationResponse, error) { var reqBody, resBody DeleteHostSpecificationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteHostSubSpecificationBody struct { Req *types.DeleteHostSubSpecification `xml:"urn:vim25 DeleteHostSubSpecification,omitempty"` Res *types.DeleteHostSubSpecificationResponse `xml:"urn:vim25 DeleteHostSubSpecificationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteHostSubSpecificationBody) Fault() *soap.Fault { return b.Fault_ } func DeleteHostSubSpecification(ctx context.Context, r soap.RoundTripper, req *types.DeleteHostSubSpecification) (*types.DeleteHostSubSpecificationResponse, error) { var reqBody, resBody DeleteHostSubSpecificationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteRegistryKeyInGuestBody struct { Req *types.DeleteRegistryKeyInGuest `xml:"urn:vim25 DeleteRegistryKeyInGuest,omitempty"` Res *types.DeleteRegistryKeyInGuestResponse `xml:"urn:vim25 DeleteRegistryKeyInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteRegistryKeyInGuestBody) Fault() *soap.Fault { return b.Fault_ } func DeleteRegistryKeyInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteRegistryKeyInGuest) (*types.DeleteRegistryKeyInGuestResponse, error) { var reqBody, resBody DeleteRegistryKeyInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteRegistryValueInGuestBody struct { Req *types.DeleteRegistryValueInGuest `xml:"urn:vim25 DeleteRegistryValueInGuest,omitempty"` Res *types.DeleteRegistryValueInGuestResponse `xml:"urn:vim25 DeleteRegistryValueInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteRegistryValueInGuestBody) Fault() *soap.Fault { return b.Fault_ } func DeleteRegistryValueInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteRegistryValueInGuest) (*types.DeleteRegistryValueInGuestResponse, error) { var reqBody, resBody DeleteRegistryValueInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteScsiLunStateBody struct { Req *types.DeleteScsiLunState `xml:"urn:vim25 DeleteScsiLunState,omitempty"` Res *types.DeleteScsiLunStateResponse `xml:"urn:vim25 DeleteScsiLunStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteScsiLunStateBody) Fault() *soap.Fault { return b.Fault_ } func DeleteScsiLunState(ctx context.Context, r soap.RoundTripper, req *types.DeleteScsiLunState) (*types.DeleteScsiLunStateResponse, error) { var reqBody, resBody DeleteScsiLunStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteVStorageObject_TaskBody struct { Req *types.DeleteVStorageObject_Task `xml:"urn:vim25 DeleteVStorageObject_Task,omitempty"` Res *types.DeleteVStorageObject_TaskResponse `xml:"urn:vim25 DeleteVStorageObject_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DeleteVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVStorageObject_Task) (*types.DeleteVStorageObject_TaskResponse, error) { var reqBody, resBody DeleteVStorageObject_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteVffsVolumeStateBody struct { Req *types.DeleteVffsVolumeState `xml:"urn:vim25 DeleteVffsVolumeState,omitempty"` Res *types.DeleteVffsVolumeStateResponse `xml:"urn:vim25 DeleteVffsVolumeStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteVffsVolumeStateBody) Fault() *soap.Fault { return b.Fault_ } func DeleteVffsVolumeState(ctx context.Context, r soap.RoundTripper, req *types.DeleteVffsVolumeState) (*types.DeleteVffsVolumeStateResponse, error) { var reqBody, resBody DeleteVffsVolumeStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteVirtualDisk_TaskBody struct { Req *types.DeleteVirtualDisk_Task `xml:"urn:vim25 DeleteVirtualDisk_Task,omitempty"` Res *types.DeleteVirtualDisk_TaskResponse `xml:"urn:vim25 DeleteVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DeleteVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVirtualDisk_Task) (*types.DeleteVirtualDisk_TaskResponse, error) { var reqBody, resBody DeleteVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteVmfsVolumeStateBody struct { Req *types.DeleteVmfsVolumeState `xml:"urn:vim25 DeleteVmfsVolumeState,omitempty"` Res *types.DeleteVmfsVolumeStateResponse `xml:"urn:vim25 DeleteVmfsVolumeStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteVmfsVolumeStateBody) Fault() *soap.Fault { return b.Fault_ } func DeleteVmfsVolumeState(ctx context.Context, r soap.RoundTripper, req *types.DeleteVmfsVolumeState) (*types.DeleteVmfsVolumeStateResponse, error) { var reqBody, resBody DeleteVmfsVolumeStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeleteVsanObjectsBody struct { Req *types.DeleteVsanObjects `xml:"urn:vim25 DeleteVsanObjects,omitempty"` Res *types.DeleteVsanObjectsResponse `xml:"urn:vim25 DeleteVsanObjectsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeleteVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } func DeleteVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.DeleteVsanObjects) (*types.DeleteVsanObjectsResponse, error) { var reqBody, resBody DeleteVsanObjectsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeselectVnicBody struct { Req *types.DeselectVnic `xml:"urn:vim25 DeselectVnic,omitempty"` Res *types.DeselectVnicResponse `xml:"urn:vim25 DeselectVnicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeselectVnicBody) Fault() *soap.Fault { return b.Fault_ } func DeselectVnic(ctx context.Context, r soap.RoundTripper, req *types.DeselectVnic) (*types.DeselectVnicResponse, error) { var reqBody, resBody DeselectVnicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DeselectVnicForNicTypeBody struct { Req *types.DeselectVnicForNicType `xml:"urn:vim25 DeselectVnicForNicType,omitempty"` Res *types.DeselectVnicForNicTypeResponse `xml:"urn:vim25 DeselectVnicForNicTypeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DeselectVnicForNicTypeBody) Fault() *soap.Fault { return b.Fault_ } func DeselectVnicForNicType(ctx context.Context, r soap.RoundTripper, req *types.DeselectVnicForNicType) (*types.DeselectVnicForNicTypeResponse, error) { var reqBody, resBody DeselectVnicForNicTypeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyChildrenBody struct { Req *types.DestroyChildren `xml:"urn:vim25 DestroyChildren,omitempty"` Res *types.DestroyChildrenResponse `xml:"urn:vim25 DestroyChildrenResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyChildrenBody) Fault() *soap.Fault { return b.Fault_ } func DestroyChildren(ctx context.Context, r soap.RoundTripper, req *types.DestroyChildren) (*types.DestroyChildrenResponse, error) { var reqBody, resBody DestroyChildrenBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyCollectorBody struct { Req *types.DestroyCollector `xml:"urn:vim25 DestroyCollector,omitempty"` Res *types.DestroyCollectorResponse `xml:"urn:vim25 DestroyCollectorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyCollectorBody) Fault() *soap.Fault { return b.Fault_ } func DestroyCollector(ctx context.Context, r soap.RoundTripper, req *types.DestroyCollector) (*types.DestroyCollectorResponse, error) { var reqBody, resBody DestroyCollectorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyDatastoreBody struct { Req *types.DestroyDatastore `xml:"urn:vim25 DestroyDatastore,omitempty"` Res *types.DestroyDatastoreResponse `xml:"urn:vim25 DestroyDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func DestroyDatastore(ctx context.Context, r soap.RoundTripper, req *types.DestroyDatastore) (*types.DestroyDatastoreResponse, error) { var reqBody, resBody DestroyDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyIpPoolBody struct { Req *types.DestroyIpPool `xml:"urn:vim25 DestroyIpPool,omitempty"` Res *types.DestroyIpPoolResponse `xml:"urn:vim25 DestroyIpPoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyIpPoolBody) Fault() *soap.Fault { return b.Fault_ } func DestroyIpPool(ctx context.Context, r soap.RoundTripper, req *types.DestroyIpPool) (*types.DestroyIpPoolResponse, error) { var reqBody, resBody DestroyIpPoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyNetworkBody struct { Req *types.DestroyNetwork `xml:"urn:vim25 DestroyNetwork,omitempty"` Res *types.DestroyNetworkResponse `xml:"urn:vim25 DestroyNetworkResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyNetworkBody) Fault() *soap.Fault { return b.Fault_ } func DestroyNetwork(ctx context.Context, r soap.RoundTripper, req *types.DestroyNetwork) (*types.DestroyNetworkResponse, error) { var reqBody, resBody DestroyNetworkBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyProfileBody struct { Req *types.DestroyProfile `xml:"urn:vim25 DestroyProfile,omitempty"` Res *types.DestroyProfileResponse `xml:"urn:vim25 DestroyProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyProfileBody) Fault() *soap.Fault { return b.Fault_ } func DestroyProfile(ctx context.Context, r soap.RoundTripper, req *types.DestroyProfile) (*types.DestroyProfileResponse, error) { var reqBody, resBody DestroyProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyPropertyCollectorBody struct { Req *types.DestroyPropertyCollector `xml:"urn:vim25 DestroyPropertyCollector,omitempty"` Res *types.DestroyPropertyCollectorResponse `xml:"urn:vim25 DestroyPropertyCollectorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyPropertyCollectorBody) Fault() *soap.Fault { return b.Fault_ } func DestroyPropertyCollector(ctx context.Context, r soap.RoundTripper, req *types.DestroyPropertyCollector) (*types.DestroyPropertyCollectorResponse, error) { var reqBody, resBody DestroyPropertyCollectorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyPropertyFilterBody struct { Req *types.DestroyPropertyFilter `xml:"urn:vim25 DestroyPropertyFilter,omitempty"` Res *types.DestroyPropertyFilterResponse `xml:"urn:vim25 DestroyPropertyFilterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyPropertyFilterBody) Fault() *soap.Fault { return b.Fault_ } func DestroyPropertyFilter(ctx context.Context, r soap.RoundTripper, req *types.DestroyPropertyFilter) (*types.DestroyPropertyFilterResponse, error) { var reqBody, resBody DestroyPropertyFilterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyVffsBody struct { Req *types.DestroyVffs `xml:"urn:vim25 DestroyVffs,omitempty"` Res *types.DestroyVffsResponse `xml:"urn:vim25 DestroyVffsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyVffsBody) Fault() *soap.Fault { return b.Fault_ } func DestroyVffs(ctx context.Context, r soap.RoundTripper, req *types.DestroyVffs) (*types.DestroyVffsResponse, error) { var reqBody, resBody DestroyVffsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DestroyViewBody struct { Req *types.DestroyView `xml:"urn:vim25 DestroyView,omitempty"` Res *types.DestroyViewResponse `xml:"urn:vim25 DestroyViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DestroyViewBody) Fault() *soap.Fault { return b.Fault_ } func DestroyView(ctx context.Context, r soap.RoundTripper, req *types.DestroyView) (*types.DestroyViewResponse, error) { var reqBody, resBody DestroyViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type Destroy_TaskBody struct { Req *types.Destroy_Task `xml:"urn:vim25 Destroy_Task,omitempty"` Res *types.Destroy_TaskResponse `xml:"urn:vim25 Destroy_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *Destroy_TaskBody) Fault() *soap.Fault { return b.Fault_ } func Destroy_Task(ctx context.Context, r soap.RoundTripper, req *types.Destroy_Task) (*types.Destroy_TaskResponse, error) { var reqBody, resBody Destroy_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DetachDisk_TaskBody struct { Req *types.DetachDisk_Task `xml:"urn:vim25 DetachDisk_Task,omitempty"` Res *types.DetachDisk_TaskResponse `xml:"urn:vim25 DetachDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DetachDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DetachDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DetachDisk_Task) (*types.DetachDisk_TaskResponse, error) { var reqBody, resBody DetachDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DetachScsiLunBody struct { Req *types.DetachScsiLun `xml:"urn:vim25 DetachScsiLun,omitempty"` Res *types.DetachScsiLunResponse `xml:"urn:vim25 DetachScsiLunResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DetachScsiLunBody) Fault() *soap.Fault { return b.Fault_ } func DetachScsiLun(ctx context.Context, r soap.RoundTripper, req *types.DetachScsiLun) (*types.DetachScsiLunResponse, error) { var reqBody, resBody DetachScsiLunBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DetachScsiLunEx_TaskBody struct { Req *types.DetachScsiLunEx_Task `xml:"urn:vim25 DetachScsiLunEx_Task,omitempty"` Res *types.DetachScsiLunEx_TaskResponse `xml:"urn:vim25 DetachScsiLunEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DetachScsiLunEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DetachScsiLunEx_Task(ctx context.Context, r soap.RoundTripper, req *types.DetachScsiLunEx_Task) (*types.DetachScsiLunEx_TaskResponse, error) { var reqBody, resBody DetachScsiLunEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DetachTagFromVStorageObjectBody struct { Req *types.DetachTagFromVStorageObject `xml:"urn:vim25 DetachTagFromVStorageObject,omitempty"` Res *types.DetachTagFromVStorageObjectResponse `xml:"urn:vim25 DetachTagFromVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DetachTagFromVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func DetachTagFromVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.DetachTagFromVStorageObject) (*types.DetachTagFromVStorageObjectResponse, error) { var reqBody, resBody DetachTagFromVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableEvcMode_TaskBody struct { Req *types.DisableEvcMode_Task `xml:"urn:vim25 DisableEvcMode_Task,omitempty"` Res *types.DisableEvcMode_TaskResponse `xml:"urn:vim25 DisableEvcMode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DisableEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.DisableEvcMode_Task) (*types.DisableEvcMode_TaskResponse, error) { var reqBody, resBody DisableEvcMode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableFeatureBody struct { Req *types.DisableFeature `xml:"urn:vim25 DisableFeature,omitempty"` Res *types.DisableFeatureResponse `xml:"urn:vim25 DisableFeatureResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableFeatureBody) Fault() *soap.Fault { return b.Fault_ } func DisableFeature(ctx context.Context, r soap.RoundTripper, req *types.DisableFeature) (*types.DisableFeatureResponse, error) { var reqBody, resBody DisableFeatureBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableHyperThreadingBody struct { Req *types.DisableHyperThreading `xml:"urn:vim25 DisableHyperThreading,omitempty"` Res *types.DisableHyperThreadingResponse `xml:"urn:vim25 DisableHyperThreadingResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableHyperThreadingBody) Fault() *soap.Fault { return b.Fault_ } func DisableHyperThreading(ctx context.Context, r soap.RoundTripper, req *types.DisableHyperThreading) (*types.DisableHyperThreadingResponse, error) { var reqBody, resBody DisableHyperThreadingBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableMultipathPathBody struct { Req *types.DisableMultipathPath `xml:"urn:vim25 DisableMultipathPath,omitempty"` Res *types.DisableMultipathPathResponse `xml:"urn:vim25 DisableMultipathPathResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableMultipathPathBody) Fault() *soap.Fault { return b.Fault_ } func DisableMultipathPath(ctx context.Context, r soap.RoundTripper, req *types.DisableMultipathPath) (*types.DisableMultipathPathResponse, error) { var reqBody, resBody DisableMultipathPathBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableRulesetBody struct { Req *types.DisableRuleset `xml:"urn:vim25 DisableRuleset,omitempty"` Res *types.DisableRulesetResponse `xml:"urn:vim25 DisableRulesetResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableRulesetBody) Fault() *soap.Fault { return b.Fault_ } func DisableRuleset(ctx context.Context, r soap.RoundTripper, req *types.DisableRuleset) (*types.DisableRulesetResponse, error) { var reqBody, resBody DisableRulesetBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableSecondaryVM_TaskBody struct { Req *types.DisableSecondaryVM_Task `xml:"urn:vim25 DisableSecondaryVM_Task,omitempty"` Res *types.DisableSecondaryVM_TaskResponse `xml:"urn:vim25 DisableSecondaryVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DisableSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.DisableSecondaryVM_Task) (*types.DisableSecondaryVM_TaskResponse, error) { var reqBody, resBody DisableSecondaryVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisableSmartCardAuthenticationBody struct { Req *types.DisableSmartCardAuthentication `xml:"urn:vim25 DisableSmartCardAuthentication,omitempty"` Res *types.DisableSmartCardAuthenticationResponse `xml:"urn:vim25 DisableSmartCardAuthenticationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisableSmartCardAuthenticationBody) Fault() *soap.Fault { return b.Fault_ } func DisableSmartCardAuthentication(ctx context.Context, r soap.RoundTripper, req *types.DisableSmartCardAuthentication) (*types.DisableSmartCardAuthenticationResponse, error) { var reqBody, resBody DisableSmartCardAuthenticationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DisconnectHost_TaskBody struct { Req *types.DisconnectHost_Task `xml:"urn:vim25 DisconnectHost_Task,omitempty"` Res *types.DisconnectHost_TaskResponse `xml:"urn:vim25 DisconnectHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DisconnectHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DisconnectHost_Task(ctx context.Context, r soap.RoundTripper, req *types.DisconnectHost_Task) (*types.DisconnectHost_TaskResponse, error) { var reqBody, resBody DisconnectHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DiscoverFcoeHbasBody struct { Req *types.DiscoverFcoeHbas `xml:"urn:vim25 DiscoverFcoeHbas,omitempty"` Res *types.DiscoverFcoeHbasResponse `xml:"urn:vim25 DiscoverFcoeHbasResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DiscoverFcoeHbasBody) Fault() *soap.Fault { return b.Fault_ } func DiscoverFcoeHbas(ctx context.Context, r soap.RoundTripper, req *types.DiscoverFcoeHbas) (*types.DiscoverFcoeHbasResponse, error) { var reqBody, resBody DiscoverFcoeHbasBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DissociateProfileBody struct { Req *types.DissociateProfile `xml:"urn:vim25 DissociateProfile,omitempty"` Res *types.DissociateProfileResponse `xml:"urn:vim25 DissociateProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DissociateProfileBody) Fault() *soap.Fault { return b.Fault_ } func DissociateProfile(ctx context.Context, r soap.RoundTripper, req *types.DissociateProfile) (*types.DissociateProfileResponse, error) { var reqBody, resBody DissociateProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DoesCustomizationSpecExistBody struct { Req *types.DoesCustomizationSpecExist `xml:"urn:vim25 DoesCustomizationSpecExist,omitempty"` Res *types.DoesCustomizationSpecExistResponse `xml:"urn:vim25 DoesCustomizationSpecExistResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DoesCustomizationSpecExistBody) Fault() *soap.Fault { return b.Fault_ } func DoesCustomizationSpecExist(ctx context.Context, r soap.RoundTripper, req *types.DoesCustomizationSpecExist) (*types.DoesCustomizationSpecExistResponse, error) { var reqBody, resBody DoesCustomizationSpecExistBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DuplicateCustomizationSpecBody struct { Req *types.DuplicateCustomizationSpec `xml:"urn:vim25 DuplicateCustomizationSpec,omitempty"` Res *types.DuplicateCustomizationSpecResponse `xml:"urn:vim25 DuplicateCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DuplicateCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func DuplicateCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.DuplicateCustomizationSpec) (*types.DuplicateCustomizationSpecResponse, error) { var reqBody, resBody DuplicateCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type DvsReconfigureVmVnicNetworkResourcePool_TaskBody struct { Req *types.DvsReconfigureVmVnicNetworkResourcePool_Task `xml:"urn:vim25 DvsReconfigureVmVnicNetworkResourcePool_Task,omitempty"` Res *types.DvsReconfigureVmVnicNetworkResourcePool_TaskResponse `xml:"urn:vim25 DvsReconfigureVmVnicNetworkResourcePool_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *DvsReconfigureVmVnicNetworkResourcePool_TaskBody) Fault() *soap.Fault { return b.Fault_ } func DvsReconfigureVmVnicNetworkResourcePool_Task(ctx context.Context, r soap.RoundTripper, req *types.DvsReconfigureVmVnicNetworkResourcePool_Task) (*types.DvsReconfigureVmVnicNetworkResourcePool_TaskResponse, error) { var reqBody, resBody DvsReconfigureVmVnicNetworkResourcePool_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EagerZeroVirtualDisk_TaskBody struct { Req *types.EagerZeroVirtualDisk_Task `xml:"urn:vim25 EagerZeroVirtualDisk_Task,omitempty"` Res *types.EagerZeroVirtualDisk_TaskResponse `xml:"urn:vim25 EagerZeroVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EagerZeroVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func EagerZeroVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.EagerZeroVirtualDisk_Task) (*types.EagerZeroVirtualDisk_TaskResponse, error) { var reqBody, resBody EagerZeroVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableAlarmActionsBody struct { Req *types.EnableAlarmActions `xml:"urn:vim25 EnableAlarmActions,omitempty"` Res *types.EnableAlarmActionsResponse `xml:"urn:vim25 EnableAlarmActionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableAlarmActionsBody) Fault() *soap.Fault { return b.Fault_ } func EnableAlarmActions(ctx context.Context, r soap.RoundTripper, req *types.EnableAlarmActions) (*types.EnableAlarmActionsResponse, error) { var reqBody, resBody EnableAlarmActionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableCryptoBody struct { Req *types.EnableCrypto `xml:"urn:vim25 EnableCrypto,omitempty"` Res *types.EnableCryptoResponse `xml:"urn:vim25 EnableCryptoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableCryptoBody) Fault() *soap.Fault { return b.Fault_ } func EnableCrypto(ctx context.Context, r soap.RoundTripper, req *types.EnableCrypto) (*types.EnableCryptoResponse, error) { var reqBody, resBody EnableCryptoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableFeatureBody struct { Req *types.EnableFeature `xml:"urn:vim25 EnableFeature,omitempty"` Res *types.EnableFeatureResponse `xml:"urn:vim25 EnableFeatureResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableFeatureBody) Fault() *soap.Fault { return b.Fault_ } func EnableFeature(ctx context.Context, r soap.RoundTripper, req *types.EnableFeature) (*types.EnableFeatureResponse, error) { var reqBody, resBody EnableFeatureBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableHyperThreadingBody struct { Req *types.EnableHyperThreading `xml:"urn:vim25 EnableHyperThreading,omitempty"` Res *types.EnableHyperThreadingResponse `xml:"urn:vim25 EnableHyperThreadingResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableHyperThreadingBody) Fault() *soap.Fault { return b.Fault_ } func EnableHyperThreading(ctx context.Context, r soap.RoundTripper, req *types.EnableHyperThreading) (*types.EnableHyperThreadingResponse, error) { var reqBody, resBody EnableHyperThreadingBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableMultipathPathBody struct { Req *types.EnableMultipathPath `xml:"urn:vim25 EnableMultipathPath,omitempty"` Res *types.EnableMultipathPathResponse `xml:"urn:vim25 EnableMultipathPathResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableMultipathPathBody) Fault() *soap.Fault { return b.Fault_ } func EnableMultipathPath(ctx context.Context, r soap.RoundTripper, req *types.EnableMultipathPath) (*types.EnableMultipathPathResponse, error) { var reqBody, resBody EnableMultipathPathBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableNetworkResourceManagementBody struct { Req *types.EnableNetworkResourceManagement `xml:"urn:vim25 EnableNetworkResourceManagement,omitempty"` Res *types.EnableNetworkResourceManagementResponse `xml:"urn:vim25 EnableNetworkResourceManagementResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableNetworkResourceManagementBody) Fault() *soap.Fault { return b.Fault_ } func EnableNetworkResourceManagement(ctx context.Context, r soap.RoundTripper, req *types.EnableNetworkResourceManagement) (*types.EnableNetworkResourceManagementResponse, error) { var reqBody, resBody EnableNetworkResourceManagementBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableRulesetBody struct { Req *types.EnableRuleset `xml:"urn:vim25 EnableRuleset,omitempty"` Res *types.EnableRulesetResponse `xml:"urn:vim25 EnableRulesetResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableRulesetBody) Fault() *soap.Fault { return b.Fault_ } func EnableRuleset(ctx context.Context, r soap.RoundTripper, req *types.EnableRuleset) (*types.EnableRulesetResponse, error) { var reqBody, resBody EnableRulesetBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableSecondaryVM_TaskBody struct { Req *types.EnableSecondaryVM_Task `xml:"urn:vim25 EnableSecondaryVM_Task,omitempty"` Res *types.EnableSecondaryVM_TaskResponse `xml:"urn:vim25 EnableSecondaryVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func EnableSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.EnableSecondaryVM_Task) (*types.EnableSecondaryVM_TaskResponse, error) { var reqBody, resBody EnableSecondaryVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnableSmartCardAuthenticationBody struct { Req *types.EnableSmartCardAuthentication `xml:"urn:vim25 EnableSmartCardAuthentication,omitempty"` Res *types.EnableSmartCardAuthenticationResponse `xml:"urn:vim25 EnableSmartCardAuthenticationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnableSmartCardAuthenticationBody) Fault() *soap.Fault { return b.Fault_ } func EnableSmartCardAuthentication(ctx context.Context, r soap.RoundTripper, req *types.EnableSmartCardAuthentication) (*types.EnableSmartCardAuthenticationResponse, error) { var reqBody, resBody EnableSmartCardAuthenticationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnterLockdownModeBody struct { Req *types.EnterLockdownMode `xml:"urn:vim25 EnterLockdownMode,omitempty"` Res *types.EnterLockdownModeResponse `xml:"urn:vim25 EnterLockdownModeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnterLockdownModeBody) Fault() *soap.Fault { return b.Fault_ } func EnterLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.EnterLockdownMode) (*types.EnterLockdownModeResponse, error) { var reqBody, resBody EnterLockdownModeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EnterMaintenanceMode_TaskBody struct { Req *types.EnterMaintenanceMode_Task `xml:"urn:vim25 EnterMaintenanceMode_Task,omitempty"` Res *types.EnterMaintenanceMode_TaskResponse `xml:"urn:vim25 EnterMaintenanceMode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EnterMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func EnterMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.EnterMaintenanceMode_Task) (*types.EnterMaintenanceMode_TaskResponse, error) { var reqBody, resBody EnterMaintenanceMode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EstimateDatabaseSizeBody struct { Req *types.EstimateDatabaseSize `xml:"urn:vim25 EstimateDatabaseSize,omitempty"` Res *types.EstimateDatabaseSizeResponse `xml:"urn:vim25 EstimateDatabaseSizeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EstimateDatabaseSizeBody) Fault() *soap.Fault { return b.Fault_ } func EstimateDatabaseSize(ctx context.Context, r soap.RoundTripper, req *types.EstimateDatabaseSize) (*types.EstimateDatabaseSizeResponse, error) { var reqBody, resBody EstimateDatabaseSizeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EstimateStorageForConsolidateSnapshots_TaskBody struct { Req *types.EstimateStorageForConsolidateSnapshots_Task `xml:"urn:vim25 EstimateStorageForConsolidateSnapshots_Task,omitempty"` Res *types.EstimateStorageForConsolidateSnapshots_TaskResponse `xml:"urn:vim25 EstimateStorageForConsolidateSnapshots_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EstimateStorageForConsolidateSnapshots_TaskBody) Fault() *soap.Fault { return b.Fault_ } func EstimateStorageForConsolidateSnapshots_Task(ctx context.Context, r soap.RoundTripper, req *types.EstimateStorageForConsolidateSnapshots_Task) (*types.EstimateStorageForConsolidateSnapshots_TaskResponse, error) { var reqBody, resBody EstimateStorageForConsolidateSnapshots_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EsxAgentHostManagerUpdateConfigBody struct { Req *types.EsxAgentHostManagerUpdateConfig `xml:"urn:vim25 EsxAgentHostManagerUpdateConfig,omitempty"` Res *types.EsxAgentHostManagerUpdateConfigResponse `xml:"urn:vim25 EsxAgentHostManagerUpdateConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EsxAgentHostManagerUpdateConfigBody) Fault() *soap.Fault { return b.Fault_ } func EsxAgentHostManagerUpdateConfig(ctx context.Context, r soap.RoundTripper, req *types.EsxAgentHostManagerUpdateConfig) (*types.EsxAgentHostManagerUpdateConfigResponse, error) { var reqBody, resBody EsxAgentHostManagerUpdateConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EvacuateVsanNode_TaskBody struct { Req *types.EvacuateVsanNode_Task `xml:"urn:vim25 EvacuateVsanNode_Task,omitempty"` Res *types.EvacuateVsanNode_TaskResponse `xml:"urn:vim25 EvacuateVsanNode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EvacuateVsanNode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func EvacuateVsanNode_Task(ctx context.Context, r soap.RoundTripper, req *types.EvacuateVsanNode_Task) (*types.EvacuateVsanNode_TaskResponse, error) { var reqBody, resBody EvacuateVsanNode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type EvcManagerBody struct { Req *types.EvcManager `xml:"urn:vim25 EvcManager,omitempty"` Res *types.EvcManagerResponse `xml:"urn:vim25 EvcManagerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *EvcManagerBody) Fault() *soap.Fault { return b.Fault_ } func EvcManager(ctx context.Context, r soap.RoundTripper, req *types.EvcManager) (*types.EvcManagerResponse, error) { var reqBody, resBody EvcManagerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExecuteHostProfileBody struct { Req *types.ExecuteHostProfile `xml:"urn:vim25 ExecuteHostProfile,omitempty"` Res *types.ExecuteHostProfileResponse `xml:"urn:vim25 ExecuteHostProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExecuteHostProfileBody) Fault() *soap.Fault { return b.Fault_ } func ExecuteHostProfile(ctx context.Context, r soap.RoundTripper, req *types.ExecuteHostProfile) (*types.ExecuteHostProfileResponse, error) { var reqBody, resBody ExecuteHostProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExecuteSimpleCommandBody struct { Req *types.ExecuteSimpleCommand `xml:"urn:vim25 ExecuteSimpleCommand,omitempty"` Res *types.ExecuteSimpleCommandResponse `xml:"urn:vim25 ExecuteSimpleCommandResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExecuteSimpleCommandBody) Fault() *soap.Fault { return b.Fault_ } func ExecuteSimpleCommand(ctx context.Context, r soap.RoundTripper, req *types.ExecuteSimpleCommand) (*types.ExecuteSimpleCommandResponse, error) { var reqBody, resBody ExecuteSimpleCommandBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExitLockdownModeBody struct { Req *types.ExitLockdownMode `xml:"urn:vim25 ExitLockdownMode,omitempty"` Res *types.ExitLockdownModeResponse `xml:"urn:vim25 ExitLockdownModeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExitLockdownModeBody) Fault() *soap.Fault { return b.Fault_ } func ExitLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.ExitLockdownMode) (*types.ExitLockdownModeResponse, error) { var reqBody, resBody ExitLockdownModeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExitMaintenanceMode_TaskBody struct { Req *types.ExitMaintenanceMode_Task `xml:"urn:vim25 ExitMaintenanceMode_Task,omitempty"` Res *types.ExitMaintenanceMode_TaskResponse `xml:"urn:vim25 ExitMaintenanceMode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExitMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ExitMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.ExitMaintenanceMode_Task) (*types.ExitMaintenanceMode_TaskResponse, error) { var reqBody, resBody ExitMaintenanceMode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExpandVmfsDatastoreBody struct { Req *types.ExpandVmfsDatastore `xml:"urn:vim25 ExpandVmfsDatastore,omitempty"` Res *types.ExpandVmfsDatastoreResponse `xml:"urn:vim25 ExpandVmfsDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExpandVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func ExpandVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.ExpandVmfsDatastore) (*types.ExpandVmfsDatastoreResponse, error) { var reqBody, resBody ExpandVmfsDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExpandVmfsExtentBody struct { Req *types.ExpandVmfsExtent `xml:"urn:vim25 ExpandVmfsExtent,omitempty"` Res *types.ExpandVmfsExtentResponse `xml:"urn:vim25 ExpandVmfsExtentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExpandVmfsExtentBody) Fault() *soap.Fault { return b.Fault_ } func ExpandVmfsExtent(ctx context.Context, r soap.RoundTripper, req *types.ExpandVmfsExtent) (*types.ExpandVmfsExtentResponse, error) { var reqBody, resBody ExpandVmfsExtentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExportAnswerFile_TaskBody struct { Req *types.ExportAnswerFile_Task `xml:"urn:vim25 ExportAnswerFile_Task,omitempty"` Res *types.ExportAnswerFile_TaskResponse `xml:"urn:vim25 ExportAnswerFile_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExportAnswerFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ExportAnswerFile_Task(ctx context.Context, r soap.RoundTripper, req *types.ExportAnswerFile_Task) (*types.ExportAnswerFile_TaskResponse, error) { var reqBody, resBody ExportAnswerFile_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExportProfileBody struct { Req *types.ExportProfile `xml:"urn:vim25 ExportProfile,omitempty"` Res *types.ExportProfileResponse `xml:"urn:vim25 ExportProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExportProfileBody) Fault() *soap.Fault { return b.Fault_ } func ExportProfile(ctx context.Context, r soap.RoundTripper, req *types.ExportProfile) (*types.ExportProfileResponse, error) { var reqBody, resBody ExportProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExportSnapshotBody struct { Req *types.ExportSnapshot `xml:"urn:vim25 ExportSnapshot,omitempty"` Res *types.ExportSnapshotResponse `xml:"urn:vim25 ExportSnapshotResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExportSnapshotBody) Fault() *soap.Fault { return b.Fault_ } func ExportSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ExportSnapshot) (*types.ExportSnapshotResponse, error) { var reqBody, resBody ExportSnapshotBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExportVAppBody struct { Req *types.ExportVApp `xml:"urn:vim25 ExportVApp,omitempty"` Res *types.ExportVAppResponse `xml:"urn:vim25 ExportVAppResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExportVAppBody) Fault() *soap.Fault { return b.Fault_ } func ExportVApp(ctx context.Context, r soap.RoundTripper, req *types.ExportVApp) (*types.ExportVAppResponse, error) { var reqBody, resBody ExportVAppBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExportVmBody struct { Req *types.ExportVm `xml:"urn:vim25 ExportVm,omitempty"` Res *types.ExportVmResponse `xml:"urn:vim25 ExportVmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExportVmBody) Fault() *soap.Fault { return b.Fault_ } func ExportVm(ctx context.Context, r soap.RoundTripper, req *types.ExportVm) (*types.ExportVmResponse, error) { var reqBody, resBody ExportVmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExtendDisk_TaskBody struct { Req *types.ExtendDisk_Task `xml:"urn:vim25 ExtendDisk_Task,omitempty"` Res *types.ExtendDisk_TaskResponse `xml:"urn:vim25 ExtendDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExtendDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ExtendDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendDisk_Task) (*types.ExtendDisk_TaskResponse, error) { var reqBody, resBody ExtendDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExtendVffsBody struct { Req *types.ExtendVffs `xml:"urn:vim25 ExtendVffs,omitempty"` Res *types.ExtendVffsResponse `xml:"urn:vim25 ExtendVffsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExtendVffsBody) Fault() *soap.Fault { return b.Fault_ } func ExtendVffs(ctx context.Context, r soap.RoundTripper, req *types.ExtendVffs) (*types.ExtendVffsResponse, error) { var reqBody, resBody ExtendVffsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExtendVirtualDisk_TaskBody struct { Req *types.ExtendVirtualDisk_Task `xml:"urn:vim25 ExtendVirtualDisk_Task,omitempty"` Res *types.ExtendVirtualDisk_TaskResponse `xml:"urn:vim25 ExtendVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExtendVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ExtendVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendVirtualDisk_Task) (*types.ExtendVirtualDisk_TaskResponse, error) { var reqBody, resBody ExtendVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExtendVmfsDatastoreBody struct { Req *types.ExtendVmfsDatastore `xml:"urn:vim25 ExtendVmfsDatastore,omitempty"` Res *types.ExtendVmfsDatastoreResponse `xml:"urn:vim25 ExtendVmfsDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExtendVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func ExtendVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.ExtendVmfsDatastore) (*types.ExtendVmfsDatastoreResponse, error) { var reqBody, resBody ExtendVmfsDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ExtractOvfEnvironmentBody struct { Req *types.ExtractOvfEnvironment `xml:"urn:vim25 ExtractOvfEnvironment,omitempty"` Res *types.ExtractOvfEnvironmentResponse `xml:"urn:vim25 ExtractOvfEnvironmentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ExtractOvfEnvironmentBody) Fault() *soap.Fault { return b.Fault_ } func ExtractOvfEnvironment(ctx context.Context, r soap.RoundTripper, req *types.ExtractOvfEnvironment) (*types.ExtractOvfEnvironmentResponse, error) { var reqBody, resBody ExtractOvfEnvironmentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FetchDVPortKeysBody struct { Req *types.FetchDVPortKeys `xml:"urn:vim25 FetchDVPortKeys,omitempty"` Res *types.FetchDVPortKeysResponse `xml:"urn:vim25 FetchDVPortKeysResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FetchDVPortKeysBody) Fault() *soap.Fault { return b.Fault_ } func FetchDVPortKeys(ctx context.Context, r soap.RoundTripper, req *types.FetchDVPortKeys) (*types.FetchDVPortKeysResponse, error) { var reqBody, resBody FetchDVPortKeysBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FetchDVPortsBody struct { Req *types.FetchDVPorts `xml:"urn:vim25 FetchDVPorts,omitempty"` Res *types.FetchDVPortsResponse `xml:"urn:vim25 FetchDVPortsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FetchDVPortsBody) Fault() *soap.Fault { return b.Fault_ } func FetchDVPorts(ctx context.Context, r soap.RoundTripper, req *types.FetchDVPorts) (*types.FetchDVPortsResponse, error) { var reqBody, resBody FetchDVPortsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FetchSystemEventLogBody struct { Req *types.FetchSystemEventLog `xml:"urn:vim25 FetchSystemEventLog,omitempty"` Res *types.FetchSystemEventLogResponse `xml:"urn:vim25 FetchSystemEventLogResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FetchSystemEventLogBody) Fault() *soap.Fault { return b.Fault_ } func FetchSystemEventLog(ctx context.Context, r soap.RoundTripper, req *types.FetchSystemEventLog) (*types.FetchSystemEventLogResponse, error) { var reqBody, resBody FetchSystemEventLogBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FetchUserPrivilegeOnEntitiesBody struct { Req *types.FetchUserPrivilegeOnEntities `xml:"urn:vim25 FetchUserPrivilegeOnEntities,omitempty"` Res *types.FetchUserPrivilegeOnEntitiesResponse `xml:"urn:vim25 FetchUserPrivilegeOnEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FetchUserPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func FetchUserPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.FetchUserPrivilegeOnEntities) (*types.FetchUserPrivilegeOnEntitiesResponse, error) { var reqBody, resBody FetchUserPrivilegeOnEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindAllByDnsNameBody struct { Req *types.FindAllByDnsName `xml:"urn:vim25 FindAllByDnsName,omitempty"` Res *types.FindAllByDnsNameResponse `xml:"urn:vim25 FindAllByDnsNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindAllByDnsNameBody) Fault() *soap.Fault { return b.Fault_ } func FindAllByDnsName(ctx context.Context, r soap.RoundTripper, req *types.FindAllByDnsName) (*types.FindAllByDnsNameResponse, error) { var reqBody, resBody FindAllByDnsNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindAllByIpBody struct { Req *types.FindAllByIp `xml:"urn:vim25 FindAllByIp,omitempty"` Res *types.FindAllByIpResponse `xml:"urn:vim25 FindAllByIpResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindAllByIpBody) Fault() *soap.Fault { return b.Fault_ } func FindAllByIp(ctx context.Context, r soap.RoundTripper, req *types.FindAllByIp) (*types.FindAllByIpResponse, error) { var reqBody, resBody FindAllByIpBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindAllByUuidBody struct { Req *types.FindAllByUuid `xml:"urn:vim25 FindAllByUuid,omitempty"` Res *types.FindAllByUuidResponse `xml:"urn:vim25 FindAllByUuidResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindAllByUuidBody) Fault() *soap.Fault { return b.Fault_ } func FindAllByUuid(ctx context.Context, r soap.RoundTripper, req *types.FindAllByUuid) (*types.FindAllByUuidResponse, error) { var reqBody, resBody FindAllByUuidBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindAssociatedProfileBody struct { Req *types.FindAssociatedProfile `xml:"urn:vim25 FindAssociatedProfile,omitempty"` Res *types.FindAssociatedProfileResponse `xml:"urn:vim25 FindAssociatedProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindAssociatedProfileBody) Fault() *soap.Fault { return b.Fault_ } func FindAssociatedProfile(ctx context.Context, r soap.RoundTripper, req *types.FindAssociatedProfile) (*types.FindAssociatedProfileResponse, error) { var reqBody, resBody FindAssociatedProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindByDatastorePathBody struct { Req *types.FindByDatastorePath `xml:"urn:vim25 FindByDatastorePath,omitempty"` Res *types.FindByDatastorePathResponse `xml:"urn:vim25 FindByDatastorePathResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindByDatastorePathBody) Fault() *soap.Fault { return b.Fault_ } func FindByDatastorePath(ctx context.Context, r soap.RoundTripper, req *types.FindByDatastorePath) (*types.FindByDatastorePathResponse, error) { var reqBody, resBody FindByDatastorePathBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindByDnsNameBody struct { Req *types.FindByDnsName `xml:"urn:vim25 FindByDnsName,omitempty"` Res *types.FindByDnsNameResponse `xml:"urn:vim25 FindByDnsNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindByDnsNameBody) Fault() *soap.Fault { return b.Fault_ } func FindByDnsName(ctx context.Context, r soap.RoundTripper, req *types.FindByDnsName) (*types.FindByDnsNameResponse, error) { var reqBody, resBody FindByDnsNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindByInventoryPathBody struct { Req *types.FindByInventoryPath `xml:"urn:vim25 FindByInventoryPath,omitempty"` Res *types.FindByInventoryPathResponse `xml:"urn:vim25 FindByInventoryPathResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindByInventoryPathBody) Fault() *soap.Fault { return b.Fault_ } func FindByInventoryPath(ctx context.Context, r soap.RoundTripper, req *types.FindByInventoryPath) (*types.FindByInventoryPathResponse, error) { var reqBody, resBody FindByInventoryPathBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindByIpBody struct { Req *types.FindByIp `xml:"urn:vim25 FindByIp,omitempty"` Res *types.FindByIpResponse `xml:"urn:vim25 FindByIpResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindByIpBody) Fault() *soap.Fault { return b.Fault_ } func FindByIp(ctx context.Context, r soap.RoundTripper, req *types.FindByIp) (*types.FindByIpResponse, error) { var reqBody, resBody FindByIpBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindByUuidBody struct { Req *types.FindByUuid `xml:"urn:vim25 FindByUuid,omitempty"` Res *types.FindByUuidResponse `xml:"urn:vim25 FindByUuidResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindByUuidBody) Fault() *soap.Fault { return b.Fault_ } func FindByUuid(ctx context.Context, r soap.RoundTripper, req *types.FindByUuid) (*types.FindByUuidResponse, error) { var reqBody, resBody FindByUuidBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindChildBody struct { Req *types.FindChild `xml:"urn:vim25 FindChild,omitempty"` Res *types.FindChildResponse `xml:"urn:vim25 FindChildResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindChildBody) Fault() *soap.Fault { return b.Fault_ } func FindChild(ctx context.Context, r soap.RoundTripper, req *types.FindChild) (*types.FindChildResponse, error) { var reqBody, resBody FindChildBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindExtensionBody struct { Req *types.FindExtension `xml:"urn:vim25 FindExtension,omitempty"` Res *types.FindExtensionResponse `xml:"urn:vim25 FindExtensionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindExtensionBody) Fault() *soap.Fault { return b.Fault_ } func FindExtension(ctx context.Context, r soap.RoundTripper, req *types.FindExtension) (*types.FindExtensionResponse, error) { var reqBody, resBody FindExtensionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FindRulesForVmBody struct { Req *types.FindRulesForVm `xml:"urn:vim25 FindRulesForVm,omitempty"` Res *types.FindRulesForVmResponse `xml:"urn:vim25 FindRulesForVmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FindRulesForVmBody) Fault() *soap.Fault { return b.Fault_ } func FindRulesForVm(ctx context.Context, r soap.RoundTripper, req *types.FindRulesForVm) (*types.FindRulesForVmResponse, error) { var reqBody, resBody FindRulesForVmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FormatVffsBody struct { Req *types.FormatVffs `xml:"urn:vim25 FormatVffs,omitempty"` Res *types.FormatVffsResponse `xml:"urn:vim25 FormatVffsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FormatVffsBody) Fault() *soap.Fault { return b.Fault_ } func FormatVffs(ctx context.Context, r soap.RoundTripper, req *types.FormatVffs) (*types.FormatVffsResponse, error) { var reqBody, resBody FormatVffsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type FormatVmfsBody struct { Req *types.FormatVmfs `xml:"urn:vim25 FormatVmfs,omitempty"` Res *types.FormatVmfsResponse `xml:"urn:vim25 FormatVmfsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *FormatVmfsBody) Fault() *soap.Fault { return b.Fault_ } func FormatVmfs(ctx context.Context, r soap.RoundTripper, req *types.FormatVmfs) (*types.FormatVmfsResponse, error) { var reqBody, resBody FormatVmfsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateCertificateSigningRequestBody struct { Req *types.GenerateCertificateSigningRequest `xml:"urn:vim25 GenerateCertificateSigningRequest,omitempty"` Res *types.GenerateCertificateSigningRequestResponse `xml:"urn:vim25 GenerateCertificateSigningRequestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateCertificateSigningRequestBody) Fault() *soap.Fault { return b.Fault_ } func GenerateCertificateSigningRequest(ctx context.Context, r soap.RoundTripper, req *types.GenerateCertificateSigningRequest) (*types.GenerateCertificateSigningRequestResponse, error) { var reqBody, resBody GenerateCertificateSigningRequestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateCertificateSigningRequestByDnBody struct { Req *types.GenerateCertificateSigningRequestByDn `xml:"urn:vim25 GenerateCertificateSigningRequestByDn,omitempty"` Res *types.GenerateCertificateSigningRequestByDnResponse `xml:"urn:vim25 GenerateCertificateSigningRequestByDnResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateCertificateSigningRequestByDnBody) Fault() *soap.Fault { return b.Fault_ } func GenerateCertificateSigningRequestByDn(ctx context.Context, r soap.RoundTripper, req *types.GenerateCertificateSigningRequestByDn) (*types.GenerateCertificateSigningRequestByDnResponse, error) { var reqBody, resBody GenerateCertificateSigningRequestByDnBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateClientCsrBody struct { Req *types.GenerateClientCsr `xml:"urn:vim25 GenerateClientCsr,omitempty"` Res *types.GenerateClientCsrResponse `xml:"urn:vim25 GenerateClientCsrResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateClientCsrBody) Fault() *soap.Fault { return b.Fault_ } func GenerateClientCsr(ctx context.Context, r soap.RoundTripper, req *types.GenerateClientCsr) (*types.GenerateClientCsrResponse, error) { var reqBody, resBody GenerateClientCsrBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateConfigTaskListBody struct { Req *types.GenerateConfigTaskList `xml:"urn:vim25 GenerateConfigTaskList,omitempty"` Res *types.GenerateConfigTaskListResponse `xml:"urn:vim25 GenerateConfigTaskListResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateConfigTaskListBody) Fault() *soap.Fault { return b.Fault_ } func GenerateConfigTaskList(ctx context.Context, r soap.RoundTripper, req *types.GenerateConfigTaskList) (*types.GenerateConfigTaskListResponse, error) { var reqBody, resBody GenerateConfigTaskListBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateHostConfigTaskSpec_TaskBody struct { Req *types.GenerateHostConfigTaskSpec_Task `xml:"urn:vim25 GenerateHostConfigTaskSpec_Task,omitempty"` Res *types.GenerateHostConfigTaskSpec_TaskResponse `xml:"urn:vim25 GenerateHostConfigTaskSpec_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateHostConfigTaskSpec_TaskBody) Fault() *soap.Fault { return b.Fault_ } func GenerateHostConfigTaskSpec_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateHostConfigTaskSpec_Task) (*types.GenerateHostConfigTaskSpec_TaskResponse, error) { var reqBody, resBody GenerateHostConfigTaskSpec_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateHostProfileTaskList_TaskBody struct { Req *types.GenerateHostProfileTaskList_Task `xml:"urn:vim25 GenerateHostProfileTaskList_Task,omitempty"` Res *types.GenerateHostProfileTaskList_TaskResponse `xml:"urn:vim25 GenerateHostProfileTaskList_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateHostProfileTaskList_TaskBody) Fault() *soap.Fault { return b.Fault_ } func GenerateHostProfileTaskList_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateHostProfileTaskList_Task) (*types.GenerateHostProfileTaskList_TaskResponse, error) { var reqBody, resBody GenerateHostProfileTaskList_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateKeyBody struct { Req *types.GenerateKey `xml:"urn:vim25 GenerateKey,omitempty"` Res *types.GenerateKeyResponse `xml:"urn:vim25 GenerateKeyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateKeyBody) Fault() *soap.Fault { return b.Fault_ } func GenerateKey(ctx context.Context, r soap.RoundTripper, req *types.GenerateKey) (*types.GenerateKeyResponse, error) { var reqBody, resBody GenerateKeyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateLogBundles_TaskBody struct { Req *types.GenerateLogBundles_Task `xml:"urn:vim25 GenerateLogBundles_Task,omitempty"` Res *types.GenerateLogBundles_TaskResponse `xml:"urn:vim25 GenerateLogBundles_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateLogBundles_TaskBody) Fault() *soap.Fault { return b.Fault_ } func GenerateLogBundles_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateLogBundles_Task) (*types.GenerateLogBundles_TaskResponse, error) { var reqBody, resBody GenerateLogBundles_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GenerateSelfSignedClientCertBody struct { Req *types.GenerateSelfSignedClientCert `xml:"urn:vim25 GenerateSelfSignedClientCert,omitempty"` Res *types.GenerateSelfSignedClientCertResponse `xml:"urn:vim25 GenerateSelfSignedClientCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GenerateSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ } func GenerateSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.GenerateSelfSignedClientCert) (*types.GenerateSelfSignedClientCertResponse, error) { var reqBody, resBody GenerateSelfSignedClientCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetAlarmBody struct { Req *types.GetAlarm `xml:"urn:vim25 GetAlarm,omitempty"` Res *types.GetAlarmResponse `xml:"urn:vim25 GetAlarmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetAlarmBody) Fault() *soap.Fault { return b.Fault_ } func GetAlarm(ctx context.Context, r soap.RoundTripper, req *types.GetAlarm) (*types.GetAlarmResponse, error) { var reqBody, resBody GetAlarmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetAlarmStateBody struct { Req *types.GetAlarmState `xml:"urn:vim25 GetAlarmState,omitempty"` Res *types.GetAlarmStateResponse `xml:"urn:vim25 GetAlarmStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetAlarmStateBody) Fault() *soap.Fault { return b.Fault_ } func GetAlarmState(ctx context.Context, r soap.RoundTripper, req *types.GetAlarmState) (*types.GetAlarmStateResponse, error) { var reqBody, resBody GetAlarmStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetCustomizationSpecBody struct { Req *types.GetCustomizationSpec `xml:"urn:vim25 GetCustomizationSpec,omitempty"` Res *types.GetCustomizationSpecResponse `xml:"urn:vim25 GetCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func GetCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.GetCustomizationSpec) (*types.GetCustomizationSpecResponse, error) { var reqBody, resBody GetCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetPublicKeyBody struct { Req *types.GetPublicKey `xml:"urn:vim25 GetPublicKey,omitempty"` Res *types.GetPublicKeyResponse `xml:"urn:vim25 GetPublicKeyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetPublicKeyBody) Fault() *soap.Fault { return b.Fault_ } func GetPublicKey(ctx context.Context, r soap.RoundTripper, req *types.GetPublicKey) (*types.GetPublicKeyResponse, error) { var reqBody, resBody GetPublicKeyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetResourceUsageBody struct { Req *types.GetResourceUsage `xml:"urn:vim25 GetResourceUsage,omitempty"` Res *types.GetResourceUsageResponse `xml:"urn:vim25 GetResourceUsageResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetResourceUsageBody) Fault() *soap.Fault { return b.Fault_ } func GetResourceUsage(ctx context.Context, r soap.RoundTripper, req *types.GetResourceUsage) (*types.GetResourceUsageResponse, error) { var reqBody, resBody GetResourceUsageBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetVchaClusterHealthBody struct { Req *types.GetVchaClusterHealth `xml:"urn:vim25 GetVchaClusterHealth,omitempty"` Res *types.GetVchaClusterHealthResponse `xml:"urn:vim25 GetVchaClusterHealthResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetVchaClusterHealthBody) Fault() *soap.Fault { return b.Fault_ } func GetVchaClusterHealth(ctx context.Context, r soap.RoundTripper, req *types.GetVchaClusterHealth) (*types.GetVchaClusterHealthResponse, error) { var reqBody, resBody GetVchaClusterHealthBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type GetVsanObjExtAttrsBody struct { Req *types.GetVsanObjExtAttrs `xml:"urn:vim25 GetVsanObjExtAttrs,omitempty"` Res *types.GetVsanObjExtAttrsResponse `xml:"urn:vim25 GetVsanObjExtAttrsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *GetVsanObjExtAttrsBody) Fault() *soap.Fault { return b.Fault_ } func GetVsanObjExtAttrs(ctx context.Context, r soap.RoundTripper, req *types.GetVsanObjExtAttrs) (*types.GetVsanObjExtAttrsResponse, error) { var reqBody, resBody GetVsanObjExtAttrsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HasMonitoredEntityBody struct { Req *types.HasMonitoredEntity `xml:"urn:vim25 HasMonitoredEntity,omitempty"` Res *types.HasMonitoredEntityResponse `xml:"urn:vim25 HasMonitoredEntityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HasMonitoredEntityBody) Fault() *soap.Fault { return b.Fault_ } func HasMonitoredEntity(ctx context.Context, r soap.RoundTripper, req *types.HasMonitoredEntity) (*types.HasMonitoredEntityResponse, error) { var reqBody, resBody HasMonitoredEntityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HasPrivilegeOnEntitiesBody struct { Req *types.HasPrivilegeOnEntities `xml:"urn:vim25 HasPrivilegeOnEntities,omitempty"` Res *types.HasPrivilegeOnEntitiesResponse `xml:"urn:vim25 HasPrivilegeOnEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HasPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func HasPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.HasPrivilegeOnEntities) (*types.HasPrivilegeOnEntitiesResponse, error) { var reqBody, resBody HasPrivilegeOnEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HasPrivilegeOnEntityBody struct { Req *types.HasPrivilegeOnEntity `xml:"urn:vim25 HasPrivilegeOnEntity,omitempty"` Res *types.HasPrivilegeOnEntityResponse `xml:"urn:vim25 HasPrivilegeOnEntityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HasPrivilegeOnEntityBody) Fault() *soap.Fault { return b.Fault_ } func HasPrivilegeOnEntity(ctx context.Context, r soap.RoundTripper, req *types.HasPrivilegeOnEntity) (*types.HasPrivilegeOnEntityResponse, error) { var reqBody, resBody HasPrivilegeOnEntityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HasProviderBody struct { Req *types.HasProvider `xml:"urn:vim25 HasProvider,omitempty"` Res *types.HasProviderResponse `xml:"urn:vim25 HasProviderResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HasProviderBody) Fault() *soap.Fault { return b.Fault_ } func HasProvider(ctx context.Context, r soap.RoundTripper, req *types.HasProvider) (*types.HasProviderResponse, error) { var reqBody, resBody HasProviderBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HasUserPrivilegeOnEntitiesBody struct { Req *types.HasUserPrivilegeOnEntities `xml:"urn:vim25 HasUserPrivilegeOnEntities,omitempty"` Res *types.HasUserPrivilegeOnEntitiesResponse `xml:"urn:vim25 HasUserPrivilegeOnEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HasUserPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func HasUserPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.HasUserPrivilegeOnEntities) (*types.HasUserPrivilegeOnEntitiesResponse, error) { var reqBody, resBody HasUserPrivilegeOnEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostCloneVStorageObject_TaskBody struct { Req *types.HostCloneVStorageObject_Task `xml:"urn:vim25 HostCloneVStorageObject_Task,omitempty"` Res *types.HostCloneVStorageObject_TaskResponse `xml:"urn:vim25 HostCloneVStorageObject_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostCloneVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostCloneVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostCloneVStorageObject_Task) (*types.HostCloneVStorageObject_TaskResponse, error) { var reqBody, resBody HostCloneVStorageObject_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostConfigVFlashCacheBody struct { Req *types.HostConfigVFlashCache `xml:"urn:vim25 HostConfigVFlashCache,omitempty"` Res *types.HostConfigVFlashCacheResponse `xml:"urn:vim25 HostConfigVFlashCacheResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostConfigVFlashCacheBody) Fault() *soap.Fault { return b.Fault_ } func HostConfigVFlashCache(ctx context.Context, r soap.RoundTripper, req *types.HostConfigVFlashCache) (*types.HostConfigVFlashCacheResponse, error) { var reqBody, resBody HostConfigVFlashCacheBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostConfigureVFlashResourceBody struct { Req *types.HostConfigureVFlashResource `xml:"urn:vim25 HostConfigureVFlashResource,omitempty"` Res *types.HostConfigureVFlashResourceResponse `xml:"urn:vim25 HostConfigureVFlashResourceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostConfigureVFlashResourceBody) Fault() *soap.Fault { return b.Fault_ } func HostConfigureVFlashResource(ctx context.Context, r soap.RoundTripper, req *types.HostConfigureVFlashResource) (*types.HostConfigureVFlashResourceResponse, error) { var reqBody, resBody HostConfigureVFlashResourceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostCreateDisk_TaskBody struct { Req *types.HostCreateDisk_Task `xml:"urn:vim25 HostCreateDisk_Task,omitempty"` Res *types.HostCreateDisk_TaskResponse `xml:"urn:vim25 HostCreateDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostCreateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostCreateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostCreateDisk_Task) (*types.HostCreateDisk_TaskResponse, error) { var reqBody, resBody HostCreateDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostDeleteVStorageObject_TaskBody struct { Req *types.HostDeleteVStorageObject_Task `xml:"urn:vim25 HostDeleteVStorageObject_Task,omitempty"` Res *types.HostDeleteVStorageObject_TaskResponse `xml:"urn:vim25 HostDeleteVStorageObject_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostDeleteVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostDeleteVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostDeleteVStorageObject_Task) (*types.HostDeleteVStorageObject_TaskResponse, error) { var reqBody, resBody HostDeleteVStorageObject_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostExtendDisk_TaskBody struct { Req *types.HostExtendDisk_Task `xml:"urn:vim25 HostExtendDisk_Task,omitempty"` Res *types.HostExtendDisk_TaskResponse `xml:"urn:vim25 HostExtendDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostExtendDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostExtendDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostExtendDisk_Task) (*types.HostExtendDisk_TaskResponse, error) { var reqBody, resBody HostExtendDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostGetVFlashModuleDefaultConfigBody struct { Req *types.HostGetVFlashModuleDefaultConfig `xml:"urn:vim25 HostGetVFlashModuleDefaultConfig,omitempty"` Res *types.HostGetVFlashModuleDefaultConfigResponse `xml:"urn:vim25 HostGetVFlashModuleDefaultConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostGetVFlashModuleDefaultConfigBody) Fault() *soap.Fault { return b.Fault_ } func HostGetVFlashModuleDefaultConfig(ctx context.Context, r soap.RoundTripper, req *types.HostGetVFlashModuleDefaultConfig) (*types.HostGetVFlashModuleDefaultConfigResponse, error) { var reqBody, resBody HostGetVFlashModuleDefaultConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostImageConfigGetAcceptanceBody struct { Req *types.HostImageConfigGetAcceptance `xml:"urn:vim25 HostImageConfigGetAcceptance,omitempty"` Res *types.HostImageConfigGetAcceptanceResponse `xml:"urn:vim25 HostImageConfigGetAcceptanceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostImageConfigGetAcceptanceBody) Fault() *soap.Fault { return b.Fault_ } func HostImageConfigGetAcceptance(ctx context.Context, r soap.RoundTripper, req *types.HostImageConfigGetAcceptance) (*types.HostImageConfigGetAcceptanceResponse, error) { var reqBody, resBody HostImageConfigGetAcceptanceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostImageConfigGetProfileBody struct { Req *types.HostImageConfigGetProfile `xml:"urn:vim25 HostImageConfigGetProfile,omitempty"` Res *types.HostImageConfigGetProfileResponse `xml:"urn:vim25 HostImageConfigGetProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostImageConfigGetProfileBody) Fault() *soap.Fault { return b.Fault_ } func HostImageConfigGetProfile(ctx context.Context, r soap.RoundTripper, req *types.HostImageConfigGetProfile) (*types.HostImageConfigGetProfileResponse, error) { var reqBody, resBody HostImageConfigGetProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostInflateDisk_TaskBody struct { Req *types.HostInflateDisk_Task `xml:"urn:vim25 HostInflateDisk_Task,omitempty"` Res *types.HostInflateDisk_TaskResponse `xml:"urn:vim25 HostInflateDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostInflateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostInflateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostInflateDisk_Task) (*types.HostInflateDisk_TaskResponse, error) { var reqBody, resBody HostInflateDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostListVStorageObjectBody struct { Req *types.HostListVStorageObject `xml:"urn:vim25 HostListVStorageObject,omitempty"` Res *types.HostListVStorageObjectResponse `xml:"urn:vim25 HostListVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostListVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func HostListVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostListVStorageObject) (*types.HostListVStorageObjectResponse, error) { var reqBody, resBody HostListVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostReconcileDatastoreInventory_TaskBody struct { Req *types.HostReconcileDatastoreInventory_Task `xml:"urn:vim25 HostReconcileDatastoreInventory_Task,omitempty"` Res *types.HostReconcileDatastoreInventory_TaskResponse `xml:"urn:vim25 HostReconcileDatastoreInventory_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostReconcileDatastoreInventory_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostReconcileDatastoreInventory_Task(ctx context.Context, r soap.RoundTripper, req *types.HostReconcileDatastoreInventory_Task) (*types.HostReconcileDatastoreInventory_TaskResponse, error) { var reqBody, resBody HostReconcileDatastoreInventory_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostRegisterDiskBody struct { Req *types.HostRegisterDisk `xml:"urn:vim25 HostRegisterDisk,omitempty"` Res *types.HostRegisterDiskResponse `xml:"urn:vim25 HostRegisterDiskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostRegisterDiskBody) Fault() *soap.Fault { return b.Fault_ } func HostRegisterDisk(ctx context.Context, r soap.RoundTripper, req *types.HostRegisterDisk) (*types.HostRegisterDiskResponse, error) { var reqBody, resBody HostRegisterDiskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostRelocateVStorageObject_TaskBody struct { Req *types.HostRelocateVStorageObject_Task `xml:"urn:vim25 HostRelocateVStorageObject_Task,omitempty"` Res *types.HostRelocateVStorageObject_TaskResponse `xml:"urn:vim25 HostRelocateVStorageObject_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostRelocateVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } func HostRelocateVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostRelocateVStorageObject_Task) (*types.HostRelocateVStorageObject_TaskResponse, error) { var reqBody, resBody HostRelocateVStorageObject_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostRemoveVFlashResourceBody struct { Req *types.HostRemoveVFlashResource `xml:"urn:vim25 HostRemoveVFlashResource,omitempty"` Res *types.HostRemoveVFlashResourceResponse `xml:"urn:vim25 HostRemoveVFlashResourceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostRemoveVFlashResourceBody) Fault() *soap.Fault { return b.Fault_ } func HostRemoveVFlashResource(ctx context.Context, r soap.RoundTripper, req *types.HostRemoveVFlashResource) (*types.HostRemoveVFlashResourceResponse, error) { var reqBody, resBody HostRemoveVFlashResourceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostRenameVStorageObjectBody struct { Req *types.HostRenameVStorageObject `xml:"urn:vim25 HostRenameVStorageObject,omitempty"` Res *types.HostRenameVStorageObjectResponse `xml:"urn:vim25 HostRenameVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostRenameVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func HostRenameVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostRenameVStorageObject) (*types.HostRenameVStorageObjectResponse, error) { var reqBody, resBody HostRenameVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostRetrieveVStorageObjectBody struct { Req *types.HostRetrieveVStorageObject `xml:"urn:vim25 HostRetrieveVStorageObject,omitempty"` Res *types.HostRetrieveVStorageObjectResponse `xml:"urn:vim25 HostRetrieveVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostRetrieveVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func HostRetrieveVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObject) (*types.HostRetrieveVStorageObjectResponse, error) { var reqBody, resBody HostRetrieveVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostRetrieveVStorageObjectStateBody struct { Req *types.HostRetrieveVStorageObjectState `xml:"urn:vim25 HostRetrieveVStorageObjectState,omitempty"` Res *types.HostRetrieveVStorageObjectStateResponse `xml:"urn:vim25 HostRetrieveVStorageObjectStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostRetrieveVStorageObjectStateBody) Fault() *soap.Fault { return b.Fault_ } func HostRetrieveVStorageObjectState(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObjectState) (*types.HostRetrieveVStorageObjectStateResponse, error) { var reqBody, resBody HostRetrieveVStorageObjectStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostScheduleReconcileDatastoreInventoryBody struct { Req *types.HostScheduleReconcileDatastoreInventory `xml:"urn:vim25 HostScheduleReconcileDatastoreInventory,omitempty"` Res *types.HostScheduleReconcileDatastoreInventoryResponse `xml:"urn:vim25 HostScheduleReconcileDatastoreInventoryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostScheduleReconcileDatastoreInventoryBody) Fault() *soap.Fault { return b.Fault_ } func HostScheduleReconcileDatastoreInventory(ctx context.Context, r soap.RoundTripper, req *types.HostScheduleReconcileDatastoreInventory) (*types.HostScheduleReconcileDatastoreInventoryResponse, error) { var reqBody, resBody HostScheduleReconcileDatastoreInventoryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HostSpecGetUpdatedHostsBody struct { Req *types.HostSpecGetUpdatedHosts `xml:"urn:vim25 HostSpecGetUpdatedHosts,omitempty"` Res *types.HostSpecGetUpdatedHostsResponse `xml:"urn:vim25 HostSpecGetUpdatedHostsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HostSpecGetUpdatedHostsBody) Fault() *soap.Fault { return b.Fault_ } func HostSpecGetUpdatedHosts(ctx context.Context, r soap.RoundTripper, req *types.HostSpecGetUpdatedHosts) (*types.HostSpecGetUpdatedHostsResponse, error) { var reqBody, resBody HostSpecGetUpdatedHostsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HttpNfcLeaseAbortBody struct { Req *types.HttpNfcLeaseAbort `xml:"urn:vim25 HttpNfcLeaseAbort,omitempty"` Res *types.HttpNfcLeaseAbortResponse `xml:"urn:vim25 HttpNfcLeaseAbortResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HttpNfcLeaseAbortBody) Fault() *soap.Fault { return b.Fault_ } func HttpNfcLeaseAbort(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseAbort) (*types.HttpNfcLeaseAbortResponse, error) { var reqBody, resBody HttpNfcLeaseAbortBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HttpNfcLeaseCompleteBody struct { Req *types.HttpNfcLeaseComplete `xml:"urn:vim25 HttpNfcLeaseComplete,omitempty"` Res *types.HttpNfcLeaseCompleteResponse `xml:"urn:vim25 HttpNfcLeaseCompleteResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HttpNfcLeaseCompleteBody) Fault() *soap.Fault { return b.Fault_ } func HttpNfcLeaseComplete(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseComplete) (*types.HttpNfcLeaseCompleteResponse, error) { var reqBody, resBody HttpNfcLeaseCompleteBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HttpNfcLeaseGetManifestBody struct { Req *types.HttpNfcLeaseGetManifest `xml:"urn:vim25 HttpNfcLeaseGetManifest,omitempty"` Res *types.HttpNfcLeaseGetManifestResponse `xml:"urn:vim25 HttpNfcLeaseGetManifestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HttpNfcLeaseGetManifestBody) Fault() *soap.Fault { return b.Fault_ } func HttpNfcLeaseGetManifest(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseGetManifest) (*types.HttpNfcLeaseGetManifestResponse, error) { var reqBody, resBody HttpNfcLeaseGetManifestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type HttpNfcLeaseProgressBody struct { Req *types.HttpNfcLeaseProgress `xml:"urn:vim25 HttpNfcLeaseProgress,omitempty"` Res *types.HttpNfcLeaseProgressResponse `xml:"urn:vim25 HttpNfcLeaseProgressResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *HttpNfcLeaseProgressBody) Fault() *soap.Fault { return b.Fault_ } func HttpNfcLeaseProgress(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseProgress) (*types.HttpNfcLeaseProgressResponse, error) { var reqBody, resBody HttpNfcLeaseProgressBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ImpersonateUserBody struct { Req *types.ImpersonateUser `xml:"urn:vim25 ImpersonateUser,omitempty"` Res *types.ImpersonateUserResponse `xml:"urn:vim25 ImpersonateUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ImpersonateUserBody) Fault() *soap.Fault { return b.Fault_ } func ImpersonateUser(ctx context.Context, r soap.RoundTripper, req *types.ImpersonateUser) (*types.ImpersonateUserResponse, error) { var reqBody, resBody ImpersonateUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ImportCertificateForCAM_TaskBody struct { Req *types.ImportCertificateForCAM_Task `xml:"urn:vim25 ImportCertificateForCAM_Task,omitempty"` Res *types.ImportCertificateForCAM_TaskResponse `xml:"urn:vim25 ImportCertificateForCAM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ImportCertificateForCAM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ImportCertificateForCAM_Task(ctx context.Context, r soap.RoundTripper, req *types.ImportCertificateForCAM_Task) (*types.ImportCertificateForCAM_TaskResponse, error) { var reqBody, resBody ImportCertificateForCAM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ImportUnmanagedSnapshotBody struct { Req *types.ImportUnmanagedSnapshot `xml:"urn:vim25 ImportUnmanagedSnapshot,omitempty"` Res *types.ImportUnmanagedSnapshotResponse `xml:"urn:vim25 ImportUnmanagedSnapshotResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ImportUnmanagedSnapshotBody) Fault() *soap.Fault { return b.Fault_ } func ImportUnmanagedSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ImportUnmanagedSnapshot) (*types.ImportUnmanagedSnapshotResponse, error) { var reqBody, resBody ImportUnmanagedSnapshotBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ImportVAppBody struct { Req *types.ImportVApp `xml:"urn:vim25 ImportVApp,omitempty"` Res *types.ImportVAppResponse `xml:"urn:vim25 ImportVAppResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ImportVAppBody) Fault() *soap.Fault { return b.Fault_ } func ImportVApp(ctx context.Context, r soap.RoundTripper, req *types.ImportVApp) (*types.ImportVAppResponse, error) { var reqBody, resBody ImportVAppBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InflateDisk_TaskBody struct { Req *types.InflateDisk_Task `xml:"urn:vim25 InflateDisk_Task,omitempty"` Res *types.InflateDisk_TaskResponse `xml:"urn:vim25 InflateDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InflateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func InflateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.InflateDisk_Task) (*types.InflateDisk_TaskResponse, error) { var reqBody, resBody InflateDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InflateVirtualDisk_TaskBody struct { Req *types.InflateVirtualDisk_Task `xml:"urn:vim25 InflateVirtualDisk_Task,omitempty"` Res *types.InflateVirtualDisk_TaskResponse `xml:"urn:vim25 InflateVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InflateVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func InflateVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.InflateVirtualDisk_Task) (*types.InflateVirtualDisk_TaskResponse, error) { var reqBody, resBody InflateVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InitializeDisks_TaskBody struct { Req *types.InitializeDisks_Task `xml:"urn:vim25 InitializeDisks_Task,omitempty"` Res *types.InitializeDisks_TaskResponse `xml:"urn:vim25 InitializeDisks_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InitializeDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } func InitializeDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.InitializeDisks_Task) (*types.InitializeDisks_TaskResponse, error) { var reqBody, resBody InitializeDisks_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InitiateFileTransferFromGuestBody struct { Req *types.InitiateFileTransferFromGuest `xml:"urn:vim25 InitiateFileTransferFromGuest,omitempty"` Res *types.InitiateFileTransferFromGuestResponse `xml:"urn:vim25 InitiateFileTransferFromGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InitiateFileTransferFromGuestBody) Fault() *soap.Fault { return b.Fault_ } func InitiateFileTransferFromGuest(ctx context.Context, r soap.RoundTripper, req *types.InitiateFileTransferFromGuest) (*types.InitiateFileTransferFromGuestResponse, error) { var reqBody, resBody InitiateFileTransferFromGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InitiateFileTransferToGuestBody struct { Req *types.InitiateFileTransferToGuest `xml:"urn:vim25 InitiateFileTransferToGuest,omitempty"` Res *types.InitiateFileTransferToGuestResponse `xml:"urn:vim25 InitiateFileTransferToGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InitiateFileTransferToGuestBody) Fault() *soap.Fault { return b.Fault_ } func InitiateFileTransferToGuest(ctx context.Context, r soap.RoundTripper, req *types.InitiateFileTransferToGuest) (*types.InitiateFileTransferToGuestResponse, error) { var reqBody, resBody InitiateFileTransferToGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InstallHostPatchV2_TaskBody struct { Req *types.InstallHostPatchV2_Task `xml:"urn:vim25 InstallHostPatchV2_Task,omitempty"` Res *types.InstallHostPatchV2_TaskResponse `xml:"urn:vim25 InstallHostPatchV2_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InstallHostPatchV2_TaskBody) Fault() *soap.Fault { return b.Fault_ } func InstallHostPatchV2_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallHostPatchV2_Task) (*types.InstallHostPatchV2_TaskResponse, error) { var reqBody, resBody InstallHostPatchV2_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InstallHostPatch_TaskBody struct { Req *types.InstallHostPatch_Task `xml:"urn:vim25 InstallHostPatch_Task,omitempty"` Res *types.InstallHostPatch_TaskResponse `xml:"urn:vim25 InstallHostPatch_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InstallHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } func InstallHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallHostPatch_Task) (*types.InstallHostPatch_TaskResponse, error) { var reqBody, resBody InstallHostPatch_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InstallIoFilter_TaskBody struct { Req *types.InstallIoFilter_Task `xml:"urn:vim25 InstallIoFilter_Task,omitempty"` Res *types.InstallIoFilter_TaskResponse `xml:"urn:vim25 InstallIoFilter_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InstallIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ } func InstallIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallIoFilter_Task) (*types.InstallIoFilter_TaskResponse, error) { var reqBody, resBody InstallIoFilter_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InstallServerCertificateBody struct { Req *types.InstallServerCertificate `xml:"urn:vim25 InstallServerCertificate,omitempty"` Res *types.InstallServerCertificateResponse `xml:"urn:vim25 InstallServerCertificateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InstallServerCertificateBody) Fault() *soap.Fault { return b.Fault_ } func InstallServerCertificate(ctx context.Context, r soap.RoundTripper, req *types.InstallServerCertificate) (*types.InstallServerCertificateResponse, error) { var reqBody, resBody InstallServerCertificateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type InstallSmartCardTrustAnchorBody struct { Req *types.InstallSmartCardTrustAnchor `xml:"urn:vim25 InstallSmartCardTrustAnchor,omitempty"` Res *types.InstallSmartCardTrustAnchorResponse `xml:"urn:vim25 InstallSmartCardTrustAnchorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *InstallSmartCardTrustAnchorBody) Fault() *soap.Fault { return b.Fault_ } func InstallSmartCardTrustAnchor(ctx context.Context, r soap.RoundTripper, req *types.InstallSmartCardTrustAnchor) (*types.InstallSmartCardTrustAnchorResponse, error) { var reqBody, resBody InstallSmartCardTrustAnchorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type IsSharedGraphicsActiveBody struct { Req *types.IsSharedGraphicsActive `xml:"urn:vim25 IsSharedGraphicsActive,omitempty"` Res *types.IsSharedGraphicsActiveResponse `xml:"urn:vim25 IsSharedGraphicsActiveResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *IsSharedGraphicsActiveBody) Fault() *soap.Fault { return b.Fault_ } func IsSharedGraphicsActive(ctx context.Context, r soap.RoundTripper, req *types.IsSharedGraphicsActive) (*types.IsSharedGraphicsActiveResponse, error) { var reqBody, resBody IsSharedGraphicsActiveBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type JoinDomainWithCAM_TaskBody struct { Req *types.JoinDomainWithCAM_Task `xml:"urn:vim25 JoinDomainWithCAM_Task,omitempty"` Res *types.JoinDomainWithCAM_TaskResponse `xml:"urn:vim25 JoinDomainWithCAM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *JoinDomainWithCAM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func JoinDomainWithCAM_Task(ctx context.Context, r soap.RoundTripper, req *types.JoinDomainWithCAM_Task) (*types.JoinDomainWithCAM_TaskResponse, error) { var reqBody, resBody JoinDomainWithCAM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type JoinDomain_TaskBody struct { Req *types.JoinDomain_Task `xml:"urn:vim25 JoinDomain_Task,omitempty"` Res *types.JoinDomain_TaskResponse `xml:"urn:vim25 JoinDomain_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *JoinDomain_TaskBody) Fault() *soap.Fault { return b.Fault_ } func JoinDomain_Task(ctx context.Context, r soap.RoundTripper, req *types.JoinDomain_Task) (*types.JoinDomain_TaskResponse, error) { var reqBody, resBody JoinDomain_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LeaveCurrentDomain_TaskBody struct { Req *types.LeaveCurrentDomain_Task `xml:"urn:vim25 LeaveCurrentDomain_Task,omitempty"` Res *types.LeaveCurrentDomain_TaskResponse `xml:"urn:vim25 LeaveCurrentDomain_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LeaveCurrentDomain_TaskBody) Fault() *soap.Fault { return b.Fault_ } func LeaveCurrentDomain_Task(ctx context.Context, r soap.RoundTripper, req *types.LeaveCurrentDomain_Task) (*types.LeaveCurrentDomain_TaskResponse, error) { var reqBody, resBody LeaveCurrentDomain_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListCACertificateRevocationListsBody struct { Req *types.ListCACertificateRevocationLists `xml:"urn:vim25 ListCACertificateRevocationLists,omitempty"` Res *types.ListCACertificateRevocationListsResponse `xml:"urn:vim25 ListCACertificateRevocationListsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListCACertificateRevocationListsBody) Fault() *soap.Fault { return b.Fault_ } func ListCACertificateRevocationLists(ctx context.Context, r soap.RoundTripper, req *types.ListCACertificateRevocationLists) (*types.ListCACertificateRevocationListsResponse, error) { var reqBody, resBody ListCACertificateRevocationListsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListCACertificatesBody struct { Req *types.ListCACertificates `xml:"urn:vim25 ListCACertificates,omitempty"` Res *types.ListCACertificatesResponse `xml:"urn:vim25 ListCACertificatesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListCACertificatesBody) Fault() *soap.Fault { return b.Fault_ } func ListCACertificates(ctx context.Context, r soap.RoundTripper, req *types.ListCACertificates) (*types.ListCACertificatesResponse, error) { var reqBody, resBody ListCACertificatesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListFilesInGuestBody struct { Req *types.ListFilesInGuest `xml:"urn:vim25 ListFilesInGuest,omitempty"` Res *types.ListFilesInGuestResponse `xml:"urn:vim25 ListFilesInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListFilesInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ListFilesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListFilesInGuest) (*types.ListFilesInGuestResponse, error) { var reqBody, resBody ListFilesInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListGuestAliasesBody struct { Req *types.ListGuestAliases `xml:"urn:vim25 ListGuestAliases,omitempty"` Res *types.ListGuestAliasesResponse `xml:"urn:vim25 ListGuestAliasesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListGuestAliasesBody) Fault() *soap.Fault { return b.Fault_ } func ListGuestAliases(ctx context.Context, r soap.RoundTripper, req *types.ListGuestAliases) (*types.ListGuestAliasesResponse, error) { var reqBody, resBody ListGuestAliasesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListGuestMappedAliasesBody struct { Req *types.ListGuestMappedAliases `xml:"urn:vim25 ListGuestMappedAliases,omitempty"` Res *types.ListGuestMappedAliasesResponse `xml:"urn:vim25 ListGuestMappedAliasesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListGuestMappedAliasesBody) Fault() *soap.Fault { return b.Fault_ } func ListGuestMappedAliases(ctx context.Context, r soap.RoundTripper, req *types.ListGuestMappedAliases) (*types.ListGuestMappedAliasesResponse, error) { var reqBody, resBody ListGuestMappedAliasesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListKeysBody struct { Req *types.ListKeys `xml:"urn:vim25 ListKeys,omitempty"` Res *types.ListKeysResponse `xml:"urn:vim25 ListKeysResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListKeysBody) Fault() *soap.Fault { return b.Fault_ } func ListKeys(ctx context.Context, r soap.RoundTripper, req *types.ListKeys) (*types.ListKeysResponse, error) { var reqBody, resBody ListKeysBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListKmipServersBody struct { Req *types.ListKmipServers `xml:"urn:vim25 ListKmipServers,omitempty"` Res *types.ListKmipServersResponse `xml:"urn:vim25 ListKmipServersResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListKmipServersBody) Fault() *soap.Fault { return b.Fault_ } func ListKmipServers(ctx context.Context, r soap.RoundTripper, req *types.ListKmipServers) (*types.ListKmipServersResponse, error) { var reqBody, resBody ListKmipServersBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListProcessesInGuestBody struct { Req *types.ListProcessesInGuest `xml:"urn:vim25 ListProcessesInGuest,omitempty"` Res *types.ListProcessesInGuestResponse `xml:"urn:vim25 ListProcessesInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListProcessesInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ListProcessesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListProcessesInGuest) (*types.ListProcessesInGuestResponse, error) { var reqBody, resBody ListProcessesInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListRegistryKeysInGuestBody struct { Req *types.ListRegistryKeysInGuest `xml:"urn:vim25 ListRegistryKeysInGuest,omitempty"` Res *types.ListRegistryKeysInGuestResponse `xml:"urn:vim25 ListRegistryKeysInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListRegistryKeysInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ListRegistryKeysInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListRegistryKeysInGuest) (*types.ListRegistryKeysInGuestResponse, error) { var reqBody, resBody ListRegistryKeysInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListRegistryValuesInGuestBody struct { Req *types.ListRegistryValuesInGuest `xml:"urn:vim25 ListRegistryValuesInGuest,omitempty"` Res *types.ListRegistryValuesInGuestResponse `xml:"urn:vim25 ListRegistryValuesInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListRegistryValuesInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ListRegistryValuesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListRegistryValuesInGuest) (*types.ListRegistryValuesInGuestResponse, error) { var reqBody, resBody ListRegistryValuesInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListSmartCardTrustAnchorsBody struct { Req *types.ListSmartCardTrustAnchors `xml:"urn:vim25 ListSmartCardTrustAnchors,omitempty"` Res *types.ListSmartCardTrustAnchorsResponse `xml:"urn:vim25 ListSmartCardTrustAnchorsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListSmartCardTrustAnchorsBody) Fault() *soap.Fault { return b.Fault_ } func ListSmartCardTrustAnchors(ctx context.Context, r soap.RoundTripper, req *types.ListSmartCardTrustAnchors) (*types.ListSmartCardTrustAnchorsResponse, error) { var reqBody, resBody ListSmartCardTrustAnchorsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListTagsAttachedToVStorageObjectBody struct { Req *types.ListTagsAttachedToVStorageObject `xml:"urn:vim25 ListTagsAttachedToVStorageObject,omitempty"` Res *types.ListTagsAttachedToVStorageObjectResponse `xml:"urn:vim25 ListTagsAttachedToVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListTagsAttachedToVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func ListTagsAttachedToVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.ListTagsAttachedToVStorageObject) (*types.ListTagsAttachedToVStorageObjectResponse, error) { var reqBody, resBody ListTagsAttachedToVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListVStorageObjectBody struct { Req *types.ListVStorageObject `xml:"urn:vim25 ListVStorageObject,omitempty"` Res *types.ListVStorageObjectResponse `xml:"urn:vim25 ListVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func ListVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.ListVStorageObject) (*types.ListVStorageObjectResponse, error) { var reqBody, resBody ListVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ListVStorageObjectsAttachedToTagBody struct { Req *types.ListVStorageObjectsAttachedToTag `xml:"urn:vim25 ListVStorageObjectsAttachedToTag,omitempty"` Res *types.ListVStorageObjectsAttachedToTagResponse `xml:"urn:vim25 ListVStorageObjectsAttachedToTagResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ListVStorageObjectsAttachedToTagBody) Fault() *soap.Fault { return b.Fault_ } func ListVStorageObjectsAttachedToTag(ctx context.Context, r soap.RoundTripper, req *types.ListVStorageObjectsAttachedToTag) (*types.ListVStorageObjectsAttachedToTagResponse, error) { var reqBody, resBody ListVStorageObjectsAttachedToTagBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LogUserEventBody struct { Req *types.LogUserEvent `xml:"urn:vim25 LogUserEvent,omitempty"` Res *types.LogUserEventResponse `xml:"urn:vim25 LogUserEventResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LogUserEventBody) Fault() *soap.Fault { return b.Fault_ } func LogUserEvent(ctx context.Context, r soap.RoundTripper, req *types.LogUserEvent) (*types.LogUserEventResponse, error) { var reqBody, resBody LogUserEventBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LoginBody struct { Req *types.Login `xml:"urn:vim25 Login,omitempty"` Res *types.LoginResponse `xml:"urn:vim25 LoginResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LoginBody) Fault() *soap.Fault { return b.Fault_ } func Login(ctx context.Context, r soap.RoundTripper, req *types.Login) (*types.LoginResponse, error) { var reqBody, resBody LoginBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LoginBySSPIBody struct { Req *types.LoginBySSPI `xml:"urn:vim25 LoginBySSPI,omitempty"` Res *types.LoginBySSPIResponse `xml:"urn:vim25 LoginBySSPIResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LoginBySSPIBody) Fault() *soap.Fault { return b.Fault_ } func LoginBySSPI(ctx context.Context, r soap.RoundTripper, req *types.LoginBySSPI) (*types.LoginBySSPIResponse, error) { var reqBody, resBody LoginBySSPIBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LoginByTokenBody struct { Req *types.LoginByToken `xml:"urn:vim25 LoginByToken,omitempty"` Res *types.LoginByTokenResponse `xml:"urn:vim25 LoginByTokenResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LoginByTokenBody) Fault() *soap.Fault { return b.Fault_ } func LoginByToken(ctx context.Context, r soap.RoundTripper, req *types.LoginByToken) (*types.LoginByTokenResponse, error) { var reqBody, resBody LoginByTokenBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LoginExtensionByCertificateBody struct { Req *types.LoginExtensionByCertificate `xml:"urn:vim25 LoginExtensionByCertificate,omitempty"` Res *types.LoginExtensionByCertificateResponse `xml:"urn:vim25 LoginExtensionByCertificateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LoginExtensionByCertificateBody) Fault() *soap.Fault { return b.Fault_ } func LoginExtensionByCertificate(ctx context.Context, r soap.RoundTripper, req *types.LoginExtensionByCertificate) (*types.LoginExtensionByCertificateResponse, error) { var reqBody, resBody LoginExtensionByCertificateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LoginExtensionBySubjectNameBody struct { Req *types.LoginExtensionBySubjectName `xml:"urn:vim25 LoginExtensionBySubjectName,omitempty"` Res *types.LoginExtensionBySubjectNameResponse `xml:"urn:vim25 LoginExtensionBySubjectNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LoginExtensionBySubjectNameBody) Fault() *soap.Fault { return b.Fault_ } func LoginExtensionBySubjectName(ctx context.Context, r soap.RoundTripper, req *types.LoginExtensionBySubjectName) (*types.LoginExtensionBySubjectNameResponse, error) { var reqBody, resBody LoginExtensionBySubjectNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LogoutBody struct { Req *types.Logout `xml:"urn:vim25 Logout,omitempty"` Res *types.LogoutResponse `xml:"urn:vim25 LogoutResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LogoutBody) Fault() *soap.Fault { return b.Fault_ } func Logout(ctx context.Context, r soap.RoundTripper, req *types.Logout) (*types.LogoutResponse, error) { var reqBody, resBody LogoutBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LookupDvPortGroupBody struct { Req *types.LookupDvPortGroup `xml:"urn:vim25 LookupDvPortGroup,omitempty"` Res *types.LookupDvPortGroupResponse `xml:"urn:vim25 LookupDvPortGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LookupDvPortGroupBody) Fault() *soap.Fault { return b.Fault_ } func LookupDvPortGroup(ctx context.Context, r soap.RoundTripper, req *types.LookupDvPortGroup) (*types.LookupDvPortGroupResponse, error) { var reqBody, resBody LookupDvPortGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type LookupVmOverheadMemoryBody struct { Req *types.LookupVmOverheadMemory `xml:"urn:vim25 LookupVmOverheadMemory,omitempty"` Res *types.LookupVmOverheadMemoryResponse `xml:"urn:vim25 LookupVmOverheadMemoryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *LookupVmOverheadMemoryBody) Fault() *soap.Fault { return b.Fault_ } func LookupVmOverheadMemory(ctx context.Context, r soap.RoundTripper, req *types.LookupVmOverheadMemory) (*types.LookupVmOverheadMemoryResponse, error) { var reqBody, resBody LookupVmOverheadMemoryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MakeDirectoryBody struct { Req *types.MakeDirectory `xml:"urn:vim25 MakeDirectory,omitempty"` Res *types.MakeDirectoryResponse `xml:"urn:vim25 MakeDirectoryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MakeDirectoryBody) Fault() *soap.Fault { return b.Fault_ } func MakeDirectory(ctx context.Context, r soap.RoundTripper, req *types.MakeDirectory) (*types.MakeDirectoryResponse, error) { var reqBody, resBody MakeDirectoryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MakeDirectoryInGuestBody struct { Req *types.MakeDirectoryInGuest `xml:"urn:vim25 MakeDirectoryInGuest,omitempty"` Res *types.MakeDirectoryInGuestResponse `xml:"urn:vim25 MakeDirectoryInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MakeDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } func MakeDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.MakeDirectoryInGuest) (*types.MakeDirectoryInGuestResponse, error) { var reqBody, resBody MakeDirectoryInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MakePrimaryVM_TaskBody struct { Req *types.MakePrimaryVM_Task `xml:"urn:vim25 MakePrimaryVM_Task,omitempty"` Res *types.MakePrimaryVM_TaskResponse `xml:"urn:vim25 MakePrimaryVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MakePrimaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MakePrimaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.MakePrimaryVM_Task) (*types.MakePrimaryVM_TaskResponse, error) { var reqBody, resBody MakePrimaryVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkAsLocal_TaskBody struct { Req *types.MarkAsLocal_Task `xml:"urn:vim25 MarkAsLocal_Task,omitempty"` Res *types.MarkAsLocal_TaskResponse `xml:"urn:vim25 MarkAsLocal_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkAsLocal_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MarkAsLocal_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsLocal_Task) (*types.MarkAsLocal_TaskResponse, error) { var reqBody, resBody MarkAsLocal_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkAsNonLocal_TaskBody struct { Req *types.MarkAsNonLocal_Task `xml:"urn:vim25 MarkAsNonLocal_Task,omitempty"` Res *types.MarkAsNonLocal_TaskResponse `xml:"urn:vim25 MarkAsNonLocal_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkAsNonLocal_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MarkAsNonLocal_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsNonLocal_Task) (*types.MarkAsNonLocal_TaskResponse, error) { var reqBody, resBody MarkAsNonLocal_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkAsNonSsd_TaskBody struct { Req *types.MarkAsNonSsd_Task `xml:"urn:vim25 MarkAsNonSsd_Task,omitempty"` Res *types.MarkAsNonSsd_TaskResponse `xml:"urn:vim25 MarkAsNonSsd_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkAsNonSsd_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MarkAsNonSsd_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsNonSsd_Task) (*types.MarkAsNonSsd_TaskResponse, error) { var reqBody, resBody MarkAsNonSsd_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkAsSsd_TaskBody struct { Req *types.MarkAsSsd_Task `xml:"urn:vim25 MarkAsSsd_Task,omitempty"` Res *types.MarkAsSsd_TaskResponse `xml:"urn:vim25 MarkAsSsd_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkAsSsd_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MarkAsSsd_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsSsd_Task) (*types.MarkAsSsd_TaskResponse, error) { var reqBody, resBody MarkAsSsd_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkAsTemplateBody struct { Req *types.MarkAsTemplate `xml:"urn:vim25 MarkAsTemplate,omitempty"` Res *types.MarkAsTemplateResponse `xml:"urn:vim25 MarkAsTemplateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkAsTemplateBody) Fault() *soap.Fault { return b.Fault_ } func MarkAsTemplate(ctx context.Context, r soap.RoundTripper, req *types.MarkAsTemplate) (*types.MarkAsTemplateResponse, error) { var reqBody, resBody MarkAsTemplateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkAsVirtualMachineBody struct { Req *types.MarkAsVirtualMachine `xml:"urn:vim25 MarkAsVirtualMachine,omitempty"` Res *types.MarkAsVirtualMachineResponse `xml:"urn:vim25 MarkAsVirtualMachineResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkAsVirtualMachineBody) Fault() *soap.Fault { return b.Fault_ } func MarkAsVirtualMachine(ctx context.Context, r soap.RoundTripper, req *types.MarkAsVirtualMachine) (*types.MarkAsVirtualMachineResponse, error) { var reqBody, resBody MarkAsVirtualMachineBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkDefaultBody struct { Req *types.MarkDefault `xml:"urn:vim25 MarkDefault,omitempty"` Res *types.MarkDefaultResponse `xml:"urn:vim25 MarkDefaultResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkDefaultBody) Fault() *soap.Fault { return b.Fault_ } func MarkDefault(ctx context.Context, r soap.RoundTripper, req *types.MarkDefault) (*types.MarkDefaultResponse, error) { var reqBody, resBody MarkDefaultBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MarkForRemovalBody struct { Req *types.MarkForRemoval `xml:"urn:vim25 MarkForRemoval,omitempty"` Res *types.MarkForRemovalResponse `xml:"urn:vim25 MarkForRemovalResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MarkForRemovalBody) Fault() *soap.Fault { return b.Fault_ } func MarkForRemoval(ctx context.Context, r soap.RoundTripper, req *types.MarkForRemoval) (*types.MarkForRemovalResponse, error) { var reqBody, resBody MarkForRemovalBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MergeDvs_TaskBody struct { Req *types.MergeDvs_Task `xml:"urn:vim25 MergeDvs_Task,omitempty"` Res *types.MergeDvs_TaskResponse `xml:"urn:vim25 MergeDvs_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MergeDvs_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MergeDvs_Task(ctx context.Context, r soap.RoundTripper, req *types.MergeDvs_Task) (*types.MergeDvs_TaskResponse, error) { var reqBody, resBody MergeDvs_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MergePermissionsBody struct { Req *types.MergePermissions `xml:"urn:vim25 MergePermissions,omitempty"` Res *types.MergePermissionsResponse `xml:"urn:vim25 MergePermissionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MergePermissionsBody) Fault() *soap.Fault { return b.Fault_ } func MergePermissions(ctx context.Context, r soap.RoundTripper, req *types.MergePermissions) (*types.MergePermissionsResponse, error) { var reqBody, resBody MergePermissionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MigrateVM_TaskBody struct { Req *types.MigrateVM_Task `xml:"urn:vim25 MigrateVM_Task,omitempty"` Res *types.MigrateVM_TaskResponse `xml:"urn:vim25 MigrateVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MigrateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MigrateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.MigrateVM_Task) (*types.MigrateVM_TaskResponse, error) { var reqBody, resBody MigrateVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ModifyListViewBody struct { Req *types.ModifyListView `xml:"urn:vim25 ModifyListView,omitempty"` Res *types.ModifyListViewResponse `xml:"urn:vim25 ModifyListViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ModifyListViewBody) Fault() *soap.Fault { return b.Fault_ } func ModifyListView(ctx context.Context, r soap.RoundTripper, req *types.ModifyListView) (*types.ModifyListViewResponse, error) { var reqBody, resBody ModifyListViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MountToolsInstallerBody struct { Req *types.MountToolsInstaller `xml:"urn:vim25 MountToolsInstaller,omitempty"` Res *types.MountToolsInstallerResponse `xml:"urn:vim25 MountToolsInstallerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MountToolsInstallerBody) Fault() *soap.Fault { return b.Fault_ } func MountToolsInstaller(ctx context.Context, r soap.RoundTripper, req *types.MountToolsInstaller) (*types.MountToolsInstallerResponse, error) { var reqBody, resBody MountToolsInstallerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MountVffsVolumeBody struct { Req *types.MountVffsVolume `xml:"urn:vim25 MountVffsVolume,omitempty"` Res *types.MountVffsVolumeResponse `xml:"urn:vim25 MountVffsVolumeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MountVffsVolumeBody) Fault() *soap.Fault { return b.Fault_ } func MountVffsVolume(ctx context.Context, r soap.RoundTripper, req *types.MountVffsVolume) (*types.MountVffsVolumeResponse, error) { var reqBody, resBody MountVffsVolumeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MountVmfsVolumeBody struct { Req *types.MountVmfsVolume `xml:"urn:vim25 MountVmfsVolume,omitempty"` Res *types.MountVmfsVolumeResponse `xml:"urn:vim25 MountVmfsVolumeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MountVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } func MountVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.MountVmfsVolume) (*types.MountVmfsVolumeResponse, error) { var reqBody, resBody MountVmfsVolumeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MountVmfsVolumeEx_TaskBody struct { Req *types.MountVmfsVolumeEx_Task `xml:"urn:vim25 MountVmfsVolumeEx_Task,omitempty"` Res *types.MountVmfsVolumeEx_TaskResponse `xml:"urn:vim25 MountVmfsVolumeEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MountVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MountVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.MountVmfsVolumeEx_Task) (*types.MountVmfsVolumeEx_TaskResponse, error) { var reqBody, resBody MountVmfsVolumeEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveDVPort_TaskBody struct { Req *types.MoveDVPort_Task `xml:"urn:vim25 MoveDVPort_Task,omitempty"` Res *types.MoveDVPort_TaskResponse `xml:"urn:vim25 MoveDVPort_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveDVPort_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MoveDVPort_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveDVPort_Task) (*types.MoveDVPort_TaskResponse, error) { var reqBody, resBody MoveDVPort_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveDatastoreFile_TaskBody struct { Req *types.MoveDatastoreFile_Task `xml:"urn:vim25 MoveDatastoreFile_Task,omitempty"` Res *types.MoveDatastoreFile_TaskResponse `xml:"urn:vim25 MoveDatastoreFile_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MoveDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveDatastoreFile_Task) (*types.MoveDatastoreFile_TaskResponse, error) { var reqBody, resBody MoveDatastoreFile_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveDirectoryInGuestBody struct { Req *types.MoveDirectoryInGuest `xml:"urn:vim25 MoveDirectoryInGuest,omitempty"` Res *types.MoveDirectoryInGuestResponse `xml:"urn:vim25 MoveDirectoryInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } func MoveDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.MoveDirectoryInGuest) (*types.MoveDirectoryInGuestResponse, error) { var reqBody, resBody MoveDirectoryInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveFileInGuestBody struct { Req *types.MoveFileInGuest `xml:"urn:vim25 MoveFileInGuest,omitempty"` Res *types.MoveFileInGuestResponse `xml:"urn:vim25 MoveFileInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveFileInGuestBody) Fault() *soap.Fault { return b.Fault_ } func MoveFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.MoveFileInGuest) (*types.MoveFileInGuestResponse, error) { var reqBody, resBody MoveFileInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveHostInto_TaskBody struct { Req *types.MoveHostInto_Task `xml:"urn:vim25 MoveHostInto_Task,omitempty"` Res *types.MoveHostInto_TaskResponse `xml:"urn:vim25 MoveHostInto_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveHostInto_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MoveHostInto_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveHostInto_Task) (*types.MoveHostInto_TaskResponse, error) { var reqBody, resBody MoveHostInto_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveIntoFolder_TaskBody struct { Req *types.MoveIntoFolder_Task `xml:"urn:vim25 MoveIntoFolder_Task,omitempty"` Res *types.MoveIntoFolder_TaskResponse `xml:"urn:vim25 MoveIntoFolder_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveIntoFolder_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MoveIntoFolder_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveIntoFolder_Task) (*types.MoveIntoFolder_TaskResponse, error) { var reqBody, resBody MoveIntoFolder_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveIntoResourcePoolBody struct { Req *types.MoveIntoResourcePool `xml:"urn:vim25 MoveIntoResourcePool,omitempty"` Res *types.MoveIntoResourcePoolResponse `xml:"urn:vim25 MoveIntoResourcePoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveIntoResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } func MoveIntoResourcePool(ctx context.Context, r soap.RoundTripper, req *types.MoveIntoResourcePool) (*types.MoveIntoResourcePoolResponse, error) { var reqBody, resBody MoveIntoResourcePoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveInto_TaskBody struct { Req *types.MoveInto_Task `xml:"urn:vim25 MoveInto_Task,omitempty"` Res *types.MoveInto_TaskResponse `xml:"urn:vim25 MoveInto_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveInto_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MoveInto_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveInto_Task) (*types.MoveInto_TaskResponse, error) { var reqBody, resBody MoveInto_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type MoveVirtualDisk_TaskBody struct { Req *types.MoveVirtualDisk_Task `xml:"urn:vim25 MoveVirtualDisk_Task,omitempty"` Res *types.MoveVirtualDisk_TaskResponse `xml:"urn:vim25 MoveVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *MoveVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func MoveVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveVirtualDisk_Task) (*types.MoveVirtualDisk_TaskResponse, error) { var reqBody, resBody MoveVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type OpenInventoryViewFolderBody struct { Req *types.OpenInventoryViewFolder `xml:"urn:vim25 OpenInventoryViewFolder,omitempty"` Res *types.OpenInventoryViewFolderResponse `xml:"urn:vim25 OpenInventoryViewFolderResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *OpenInventoryViewFolderBody) Fault() *soap.Fault { return b.Fault_ } func OpenInventoryViewFolder(ctx context.Context, r soap.RoundTripper, req *types.OpenInventoryViewFolder) (*types.OpenInventoryViewFolderResponse, error) { var reqBody, resBody OpenInventoryViewFolderBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type OverwriteCustomizationSpecBody struct { Req *types.OverwriteCustomizationSpec `xml:"urn:vim25 OverwriteCustomizationSpec,omitempty"` Res *types.OverwriteCustomizationSpecResponse `xml:"urn:vim25 OverwriteCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *OverwriteCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func OverwriteCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.OverwriteCustomizationSpec) (*types.OverwriteCustomizationSpecResponse, error) { var reqBody, resBody OverwriteCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ParseDescriptorBody struct { Req *types.ParseDescriptor `xml:"urn:vim25 ParseDescriptor,omitempty"` Res *types.ParseDescriptorResponse `xml:"urn:vim25 ParseDescriptorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ParseDescriptorBody) Fault() *soap.Fault { return b.Fault_ } func ParseDescriptor(ctx context.Context, r soap.RoundTripper, req *types.ParseDescriptor) (*types.ParseDescriptorResponse, error) { var reqBody, resBody ParseDescriptorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PerformDvsProductSpecOperation_TaskBody struct { Req *types.PerformDvsProductSpecOperation_Task `xml:"urn:vim25 PerformDvsProductSpecOperation_Task,omitempty"` Res *types.PerformDvsProductSpecOperation_TaskResponse `xml:"urn:vim25 PerformDvsProductSpecOperation_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PerformDvsProductSpecOperation_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PerformDvsProductSpecOperation_Task(ctx context.Context, r soap.RoundTripper, req *types.PerformDvsProductSpecOperation_Task) (*types.PerformDvsProductSpecOperation_TaskResponse, error) { var reqBody, resBody PerformDvsProductSpecOperation_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PerformVsanUpgradePreflightCheckBody struct { Req *types.PerformVsanUpgradePreflightCheck `xml:"urn:vim25 PerformVsanUpgradePreflightCheck,omitempty"` Res *types.PerformVsanUpgradePreflightCheckResponse `xml:"urn:vim25 PerformVsanUpgradePreflightCheckResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PerformVsanUpgradePreflightCheckBody) Fault() *soap.Fault { return b.Fault_ } func PerformVsanUpgradePreflightCheck(ctx context.Context, r soap.RoundTripper, req *types.PerformVsanUpgradePreflightCheck) (*types.PerformVsanUpgradePreflightCheckResponse, error) { var reqBody, resBody PerformVsanUpgradePreflightCheckBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PerformVsanUpgrade_TaskBody struct { Req *types.PerformVsanUpgrade_Task `xml:"urn:vim25 PerformVsanUpgrade_Task,omitempty"` Res *types.PerformVsanUpgrade_TaskResponse `xml:"urn:vim25 PerformVsanUpgrade_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PerformVsanUpgrade_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PerformVsanUpgrade_Task(ctx context.Context, r soap.RoundTripper, req *types.PerformVsanUpgrade_Task) (*types.PerformVsanUpgrade_TaskResponse, error) { var reqBody, resBody PerformVsanUpgrade_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PlaceVmBody struct { Req *types.PlaceVm `xml:"urn:vim25 PlaceVm,omitempty"` Res *types.PlaceVmResponse `xml:"urn:vim25 PlaceVmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PlaceVmBody) Fault() *soap.Fault { return b.Fault_ } func PlaceVm(ctx context.Context, r soap.RoundTripper, req *types.PlaceVm) (*types.PlaceVmResponse, error) { var reqBody, resBody PlaceVmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PostEventBody struct { Req *types.PostEvent `xml:"urn:vim25 PostEvent,omitempty"` Res *types.PostEventResponse `xml:"urn:vim25 PostEventResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PostEventBody) Fault() *soap.Fault { return b.Fault_ } func PostEvent(ctx context.Context, r soap.RoundTripper, req *types.PostEvent) (*types.PostEventResponse, error) { var reqBody, resBody PostEventBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PostHealthUpdatesBody struct { Req *types.PostHealthUpdates `xml:"urn:vim25 PostHealthUpdates,omitempty"` Res *types.PostHealthUpdatesResponse `xml:"urn:vim25 PostHealthUpdatesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PostHealthUpdatesBody) Fault() *soap.Fault { return b.Fault_ } func PostHealthUpdates(ctx context.Context, r soap.RoundTripper, req *types.PostHealthUpdates) (*types.PostHealthUpdatesResponse, error) { var reqBody, resBody PostHealthUpdatesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerDownHostToStandBy_TaskBody struct { Req *types.PowerDownHostToStandBy_Task `xml:"urn:vim25 PowerDownHostToStandBy_Task,omitempty"` Res *types.PowerDownHostToStandBy_TaskResponse `xml:"urn:vim25 PowerDownHostToStandBy_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerDownHostToStandBy_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerDownHostToStandBy_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerDownHostToStandBy_Task) (*types.PowerDownHostToStandBy_TaskResponse, error) { var reqBody, resBody PowerDownHostToStandBy_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerOffVApp_TaskBody struct { Req *types.PowerOffVApp_Task `xml:"urn:vim25 PowerOffVApp_Task,omitempty"` Res *types.PowerOffVApp_TaskResponse `xml:"urn:vim25 PowerOffVApp_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerOffVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerOffVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOffVApp_Task) (*types.PowerOffVApp_TaskResponse, error) { var reqBody, resBody PowerOffVApp_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerOffVM_TaskBody struct { Req *types.PowerOffVM_Task `xml:"urn:vim25 PowerOffVM_Task,omitempty"` Res *types.PowerOffVM_TaskResponse `xml:"urn:vim25 PowerOffVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerOffVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerOffVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOffVM_Task) (*types.PowerOffVM_TaskResponse, error) { var reqBody, resBody PowerOffVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerOnMultiVM_TaskBody struct { Req *types.PowerOnMultiVM_Task `xml:"urn:vim25 PowerOnMultiVM_Task,omitempty"` Res *types.PowerOnMultiVM_TaskResponse `xml:"urn:vim25 PowerOnMultiVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerOnMultiVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerOnMultiVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnMultiVM_Task) (*types.PowerOnMultiVM_TaskResponse, error) { var reqBody, resBody PowerOnMultiVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerOnVApp_TaskBody struct { Req *types.PowerOnVApp_Task `xml:"urn:vim25 PowerOnVApp_Task,omitempty"` Res *types.PowerOnVApp_TaskResponse `xml:"urn:vim25 PowerOnVApp_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerOnVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerOnVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnVApp_Task) (*types.PowerOnVApp_TaskResponse, error) { var reqBody, resBody PowerOnVApp_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerOnVM_TaskBody struct { Req *types.PowerOnVM_Task `xml:"urn:vim25 PowerOnVM_Task,omitempty"` Res *types.PowerOnVM_TaskResponse `xml:"urn:vim25 PowerOnVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerOnVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerOnVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnVM_Task) (*types.PowerOnVM_TaskResponse, error) { var reqBody, resBody PowerOnVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PowerUpHostFromStandBy_TaskBody struct { Req *types.PowerUpHostFromStandBy_Task `xml:"urn:vim25 PowerUpHostFromStandBy_Task,omitempty"` Res *types.PowerUpHostFromStandBy_TaskResponse `xml:"urn:vim25 PowerUpHostFromStandBy_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PowerUpHostFromStandBy_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PowerUpHostFromStandBy_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerUpHostFromStandBy_Task) (*types.PowerUpHostFromStandBy_TaskResponse, error) { var reqBody, resBody PowerUpHostFromStandBy_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PrepareCryptoBody struct { Req *types.PrepareCrypto `xml:"urn:vim25 PrepareCrypto,omitempty"` Res *types.PrepareCryptoResponse `xml:"urn:vim25 PrepareCryptoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PrepareCryptoBody) Fault() *soap.Fault { return b.Fault_ } func PrepareCrypto(ctx context.Context, r soap.RoundTripper, req *types.PrepareCrypto) (*types.PrepareCryptoResponse, error) { var reqBody, resBody PrepareCryptoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PromoteDisks_TaskBody struct { Req *types.PromoteDisks_Task `xml:"urn:vim25 PromoteDisks_Task,omitempty"` Res *types.PromoteDisks_TaskResponse `xml:"urn:vim25 PromoteDisks_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PromoteDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } func PromoteDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.PromoteDisks_Task) (*types.PromoteDisks_TaskResponse, error) { var reqBody, resBody PromoteDisks_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type PutUsbScanCodesBody struct { Req *types.PutUsbScanCodes `xml:"urn:vim25 PutUsbScanCodes,omitempty"` Res *types.PutUsbScanCodesResponse `xml:"urn:vim25 PutUsbScanCodesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *PutUsbScanCodesBody) Fault() *soap.Fault { return b.Fault_ } func PutUsbScanCodes(ctx context.Context, r soap.RoundTripper, req *types.PutUsbScanCodes) (*types.PutUsbScanCodesResponse, error) { var reqBody, resBody PutUsbScanCodesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAnswerFileStatusBody struct { Req *types.QueryAnswerFileStatus `xml:"urn:vim25 QueryAnswerFileStatus,omitempty"` Res *types.QueryAnswerFileStatusResponse `xml:"urn:vim25 QueryAnswerFileStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAnswerFileStatusBody) Fault() *soap.Fault { return b.Fault_ } func QueryAnswerFileStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryAnswerFileStatus) (*types.QueryAnswerFileStatusResponse, error) { var reqBody, resBody QueryAnswerFileStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAssignedLicensesBody struct { Req *types.QueryAssignedLicenses `xml:"urn:vim25 QueryAssignedLicenses,omitempty"` Res *types.QueryAssignedLicensesResponse `xml:"urn:vim25 QueryAssignedLicensesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAssignedLicensesBody) Fault() *soap.Fault { return b.Fault_ } func QueryAssignedLicenses(ctx context.Context, r soap.RoundTripper, req *types.QueryAssignedLicenses) (*types.QueryAssignedLicensesResponse, error) { var reqBody, resBody QueryAssignedLicensesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAvailableDisksForVmfsBody struct { Req *types.QueryAvailableDisksForVmfs `xml:"urn:vim25 QueryAvailableDisksForVmfs,omitempty"` Res *types.QueryAvailableDisksForVmfsResponse `xml:"urn:vim25 QueryAvailableDisksForVmfsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAvailableDisksForVmfsBody) Fault() *soap.Fault { return b.Fault_ } func QueryAvailableDisksForVmfs(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableDisksForVmfs) (*types.QueryAvailableDisksForVmfsResponse, error) { var reqBody, resBody QueryAvailableDisksForVmfsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAvailableDvsSpecBody struct { Req *types.QueryAvailableDvsSpec `xml:"urn:vim25 QueryAvailableDvsSpec,omitempty"` Res *types.QueryAvailableDvsSpecResponse `xml:"urn:vim25 QueryAvailableDvsSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAvailableDvsSpecBody) Fault() *soap.Fault { return b.Fault_ } func QueryAvailableDvsSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableDvsSpec) (*types.QueryAvailableDvsSpecResponse, error) { var reqBody, resBody QueryAvailableDvsSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAvailablePartitionBody struct { Req *types.QueryAvailablePartition `xml:"urn:vim25 QueryAvailablePartition,omitempty"` Res *types.QueryAvailablePartitionResponse `xml:"urn:vim25 QueryAvailablePartitionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAvailablePartitionBody) Fault() *soap.Fault { return b.Fault_ } func QueryAvailablePartition(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailablePartition) (*types.QueryAvailablePartitionResponse, error) { var reqBody, resBody QueryAvailablePartitionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAvailablePerfMetricBody struct { Req *types.QueryAvailablePerfMetric `xml:"urn:vim25 QueryAvailablePerfMetric,omitempty"` Res *types.QueryAvailablePerfMetricResponse `xml:"urn:vim25 QueryAvailablePerfMetricResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAvailablePerfMetricBody) Fault() *soap.Fault { return b.Fault_ } func QueryAvailablePerfMetric(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailablePerfMetric) (*types.QueryAvailablePerfMetricResponse, error) { var reqBody, resBody QueryAvailablePerfMetricBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAvailableSsdsBody struct { Req *types.QueryAvailableSsds `xml:"urn:vim25 QueryAvailableSsds,omitempty"` Res *types.QueryAvailableSsdsResponse `xml:"urn:vim25 QueryAvailableSsdsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAvailableSsdsBody) Fault() *soap.Fault { return b.Fault_ } func QueryAvailableSsds(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableSsds) (*types.QueryAvailableSsdsResponse, error) { var reqBody, resBody QueryAvailableSsdsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryAvailableTimeZonesBody struct { Req *types.QueryAvailableTimeZones `xml:"urn:vim25 QueryAvailableTimeZones,omitempty"` Res *types.QueryAvailableTimeZonesResponse `xml:"urn:vim25 QueryAvailableTimeZonesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryAvailableTimeZonesBody) Fault() *soap.Fault { return b.Fault_ } func QueryAvailableTimeZones(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableTimeZones) (*types.QueryAvailableTimeZonesResponse, error) { var reqBody, resBody QueryAvailableTimeZonesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryBootDevicesBody struct { Req *types.QueryBootDevices `xml:"urn:vim25 QueryBootDevices,omitempty"` Res *types.QueryBootDevicesResponse `xml:"urn:vim25 QueryBootDevicesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryBootDevicesBody) Fault() *soap.Fault { return b.Fault_ } func QueryBootDevices(ctx context.Context, r soap.RoundTripper, req *types.QueryBootDevices) (*types.QueryBootDevicesResponse, error) { var reqBody, resBody QueryBootDevicesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryBoundVnicsBody struct { Req *types.QueryBoundVnics `xml:"urn:vim25 QueryBoundVnics,omitempty"` Res *types.QueryBoundVnicsResponse `xml:"urn:vim25 QueryBoundVnicsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryBoundVnicsBody) Fault() *soap.Fault { return b.Fault_ } func QueryBoundVnics(ctx context.Context, r soap.RoundTripper, req *types.QueryBoundVnics) (*types.QueryBoundVnicsResponse, error) { var reqBody, resBody QueryBoundVnicsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryCandidateNicsBody struct { Req *types.QueryCandidateNics `xml:"urn:vim25 QueryCandidateNics,omitempty"` Res *types.QueryCandidateNicsResponse `xml:"urn:vim25 QueryCandidateNicsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryCandidateNicsBody) Fault() *soap.Fault { return b.Fault_ } func QueryCandidateNics(ctx context.Context, r soap.RoundTripper, req *types.QueryCandidateNics) (*types.QueryCandidateNicsResponse, error) { var reqBody, resBody QueryCandidateNicsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryChangedDiskAreasBody struct { Req *types.QueryChangedDiskAreas `xml:"urn:vim25 QueryChangedDiskAreas,omitempty"` Res *types.QueryChangedDiskAreasResponse `xml:"urn:vim25 QueryChangedDiskAreasResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryChangedDiskAreasBody) Fault() *soap.Fault { return b.Fault_ } func QueryChangedDiskAreas(ctx context.Context, r soap.RoundTripper, req *types.QueryChangedDiskAreas) (*types.QueryChangedDiskAreasResponse, error) { var reqBody, resBody QueryChangedDiskAreasBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryCmmdsBody struct { Req *types.QueryCmmds `xml:"urn:vim25 QueryCmmds,omitempty"` Res *types.QueryCmmdsResponse `xml:"urn:vim25 QueryCmmdsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryCmmdsBody) Fault() *soap.Fault { return b.Fault_ } func QueryCmmds(ctx context.Context, r soap.RoundTripper, req *types.QueryCmmds) (*types.QueryCmmdsResponse, error) { var reqBody, resBody QueryCmmdsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryCompatibleHostForExistingDvsBody struct { Req *types.QueryCompatibleHostForExistingDvs `xml:"urn:vim25 QueryCompatibleHostForExistingDvs,omitempty"` Res *types.QueryCompatibleHostForExistingDvsResponse `xml:"urn:vim25 QueryCompatibleHostForExistingDvsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryCompatibleHostForExistingDvsBody) Fault() *soap.Fault { return b.Fault_ } func QueryCompatibleHostForExistingDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleHostForExistingDvs) (*types.QueryCompatibleHostForExistingDvsResponse, error) { var reqBody, resBody QueryCompatibleHostForExistingDvsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryCompatibleHostForNewDvsBody struct { Req *types.QueryCompatibleHostForNewDvs `xml:"urn:vim25 QueryCompatibleHostForNewDvs,omitempty"` Res *types.QueryCompatibleHostForNewDvsResponse `xml:"urn:vim25 QueryCompatibleHostForNewDvsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryCompatibleHostForNewDvsBody) Fault() *soap.Fault { return b.Fault_ } func QueryCompatibleHostForNewDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleHostForNewDvs) (*types.QueryCompatibleHostForNewDvsResponse, error) { var reqBody, resBody QueryCompatibleHostForNewDvsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryComplianceStatusBody struct { Req *types.QueryComplianceStatus `xml:"urn:vim25 QueryComplianceStatus,omitempty"` Res *types.QueryComplianceStatusResponse `xml:"urn:vim25 QueryComplianceStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ } func QueryComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryComplianceStatus) (*types.QueryComplianceStatusResponse, error) { var reqBody, resBody QueryComplianceStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConfigOptionBody struct { Req *types.QueryConfigOption `xml:"urn:vim25 QueryConfigOption,omitempty"` Res *types.QueryConfigOptionResponse `xml:"urn:vim25 QueryConfigOptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } func QueryConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOption) (*types.QueryConfigOptionResponse, error) { var reqBody, resBody QueryConfigOptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConfigOptionDescriptorBody struct { Req *types.QueryConfigOptionDescriptor `xml:"urn:vim25 QueryConfigOptionDescriptor,omitempty"` Res *types.QueryConfigOptionDescriptorResponse `xml:"urn:vim25 QueryConfigOptionDescriptorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConfigOptionDescriptorBody) Fault() *soap.Fault { return b.Fault_ } func QueryConfigOptionDescriptor(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOptionDescriptor) (*types.QueryConfigOptionDescriptorResponse, error) { var reqBody, resBody QueryConfigOptionDescriptorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConfigOptionExBody struct { Req *types.QueryConfigOptionEx `xml:"urn:vim25 QueryConfigOptionEx,omitempty"` Res *types.QueryConfigOptionExResponse `xml:"urn:vim25 QueryConfigOptionExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConfigOptionExBody) Fault() *soap.Fault { return b.Fault_ } func QueryConfigOptionEx(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOptionEx) (*types.QueryConfigOptionExResponse, error) { var reqBody, resBody QueryConfigOptionExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConfigTargetBody struct { Req *types.QueryConfigTarget `xml:"urn:vim25 QueryConfigTarget,omitempty"` Res *types.QueryConfigTargetResponse `xml:"urn:vim25 QueryConfigTargetResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConfigTargetBody) Fault() *soap.Fault { return b.Fault_ } func QueryConfigTarget(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigTarget) (*types.QueryConfigTargetResponse, error) { var reqBody, resBody QueryConfigTargetBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConfiguredModuleOptionStringBody struct { Req *types.QueryConfiguredModuleOptionString `xml:"urn:vim25 QueryConfiguredModuleOptionString,omitempty"` Res *types.QueryConfiguredModuleOptionStringResponse `xml:"urn:vim25 QueryConfiguredModuleOptionStringResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConfiguredModuleOptionStringBody) Fault() *soap.Fault { return b.Fault_ } func QueryConfiguredModuleOptionString(ctx context.Context, r soap.RoundTripper, req *types.QueryConfiguredModuleOptionString) (*types.QueryConfiguredModuleOptionStringResponse, error) { var reqBody, resBody QueryConfiguredModuleOptionStringBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConnectionInfoBody struct { Req *types.QueryConnectionInfo `xml:"urn:vim25 QueryConnectionInfo,omitempty"` Res *types.QueryConnectionInfoResponse `xml:"urn:vim25 QueryConnectionInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConnectionInfoBody) Fault() *soap.Fault { return b.Fault_ } func QueryConnectionInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryConnectionInfo) (*types.QueryConnectionInfoResponse, error) { var reqBody, resBody QueryConnectionInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryConnectionInfoViaSpecBody struct { Req *types.QueryConnectionInfoViaSpec `xml:"urn:vim25 QueryConnectionInfoViaSpec,omitempty"` Res *types.QueryConnectionInfoViaSpecResponse `xml:"urn:vim25 QueryConnectionInfoViaSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryConnectionInfoViaSpecBody) Fault() *soap.Fault { return b.Fault_ } func QueryConnectionInfoViaSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryConnectionInfoViaSpec) (*types.QueryConnectionInfoViaSpecResponse, error) { var reqBody, resBody QueryConnectionInfoViaSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDatastorePerformanceSummaryBody struct { Req *types.QueryDatastorePerformanceSummary `xml:"urn:vim25 QueryDatastorePerformanceSummary,omitempty"` Res *types.QueryDatastorePerformanceSummaryResponse `xml:"urn:vim25 QueryDatastorePerformanceSummaryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDatastorePerformanceSummaryBody) Fault() *soap.Fault { return b.Fault_ } func QueryDatastorePerformanceSummary(ctx context.Context, r soap.RoundTripper, req *types.QueryDatastorePerformanceSummary) (*types.QueryDatastorePerformanceSummaryResponse, error) { var reqBody, resBody QueryDatastorePerformanceSummaryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDateTimeBody struct { Req *types.QueryDateTime `xml:"urn:vim25 QueryDateTime,omitempty"` Res *types.QueryDateTimeResponse `xml:"urn:vim25 QueryDateTimeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDateTimeBody) Fault() *soap.Fault { return b.Fault_ } func QueryDateTime(ctx context.Context, r soap.RoundTripper, req *types.QueryDateTime) (*types.QueryDateTimeResponse, error) { var reqBody, resBody QueryDateTimeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDescriptionsBody struct { Req *types.QueryDescriptions `xml:"urn:vim25 QueryDescriptions,omitempty"` Res *types.QueryDescriptionsResponse `xml:"urn:vim25 QueryDescriptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDescriptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryDescriptions(ctx context.Context, r soap.RoundTripper, req *types.QueryDescriptions) (*types.QueryDescriptionsResponse, error) { var reqBody, resBody QueryDescriptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDisksForVsanBody struct { Req *types.QueryDisksForVsan `xml:"urn:vim25 QueryDisksForVsan,omitempty"` Res *types.QueryDisksForVsanResponse `xml:"urn:vim25 QueryDisksForVsanResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDisksForVsanBody) Fault() *soap.Fault { return b.Fault_ } func QueryDisksForVsan(ctx context.Context, r soap.RoundTripper, req *types.QueryDisksForVsan) (*types.QueryDisksForVsanResponse, error) { var reqBody, resBody QueryDisksForVsanBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDisksUsingFilterBody struct { Req *types.QueryDisksUsingFilter `xml:"urn:vim25 QueryDisksUsingFilter,omitempty"` Res *types.QueryDisksUsingFilterResponse `xml:"urn:vim25 QueryDisksUsingFilterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDisksUsingFilterBody) Fault() *soap.Fault { return b.Fault_ } func QueryDisksUsingFilter(ctx context.Context, r soap.RoundTripper, req *types.QueryDisksUsingFilter) (*types.QueryDisksUsingFilterResponse, error) { var reqBody, resBody QueryDisksUsingFilterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDvsByUuidBody struct { Req *types.QueryDvsByUuid `xml:"urn:vim25 QueryDvsByUuid,omitempty"` Res *types.QueryDvsByUuidResponse `xml:"urn:vim25 QueryDvsByUuidResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDvsByUuidBody) Fault() *soap.Fault { return b.Fault_ } func QueryDvsByUuid(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsByUuid) (*types.QueryDvsByUuidResponse, error) { var reqBody, resBody QueryDvsByUuidBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDvsCheckCompatibilityBody struct { Req *types.QueryDvsCheckCompatibility `xml:"urn:vim25 QueryDvsCheckCompatibility,omitempty"` Res *types.QueryDvsCheckCompatibilityResponse `xml:"urn:vim25 QueryDvsCheckCompatibilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDvsCheckCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } func QueryDvsCheckCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsCheckCompatibility) (*types.QueryDvsCheckCompatibilityResponse, error) { var reqBody, resBody QueryDvsCheckCompatibilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDvsCompatibleHostSpecBody struct { Req *types.QueryDvsCompatibleHostSpec `xml:"urn:vim25 QueryDvsCompatibleHostSpec,omitempty"` Res *types.QueryDvsCompatibleHostSpecResponse `xml:"urn:vim25 QueryDvsCompatibleHostSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDvsCompatibleHostSpecBody) Fault() *soap.Fault { return b.Fault_ } func QueryDvsCompatibleHostSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsCompatibleHostSpec) (*types.QueryDvsCompatibleHostSpecResponse, error) { var reqBody, resBody QueryDvsCompatibleHostSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDvsConfigTargetBody struct { Req *types.QueryDvsConfigTarget `xml:"urn:vim25 QueryDvsConfigTarget,omitempty"` Res *types.QueryDvsConfigTargetResponse `xml:"urn:vim25 QueryDvsConfigTargetResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDvsConfigTargetBody) Fault() *soap.Fault { return b.Fault_ } func QueryDvsConfigTarget(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsConfigTarget) (*types.QueryDvsConfigTargetResponse, error) { var reqBody, resBody QueryDvsConfigTargetBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryDvsFeatureCapabilityBody struct { Req *types.QueryDvsFeatureCapability `xml:"urn:vim25 QueryDvsFeatureCapability,omitempty"` Res *types.QueryDvsFeatureCapabilityResponse `xml:"urn:vim25 QueryDvsFeatureCapabilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryDvsFeatureCapabilityBody) Fault() *soap.Fault { return b.Fault_ } func QueryDvsFeatureCapability(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsFeatureCapability) (*types.QueryDvsFeatureCapabilityResponse, error) { var reqBody, resBody QueryDvsFeatureCapabilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryEventsBody struct { Req *types.QueryEvents `xml:"urn:vim25 QueryEvents,omitempty"` Res *types.QueryEventsResponse `xml:"urn:vim25 QueryEventsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryEventsBody) Fault() *soap.Fault { return b.Fault_ } func QueryEvents(ctx context.Context, r soap.RoundTripper, req *types.QueryEvents) (*types.QueryEventsResponse, error) { var reqBody, resBody QueryEventsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryExpressionMetadataBody struct { Req *types.QueryExpressionMetadata `xml:"urn:vim25 QueryExpressionMetadata,omitempty"` Res *types.QueryExpressionMetadataResponse `xml:"urn:vim25 QueryExpressionMetadataResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryExpressionMetadataBody) Fault() *soap.Fault { return b.Fault_ } func QueryExpressionMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryExpressionMetadata) (*types.QueryExpressionMetadataResponse, error) { var reqBody, resBody QueryExpressionMetadataBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryExtensionIpAllocationUsageBody struct { Req *types.QueryExtensionIpAllocationUsage `xml:"urn:vim25 QueryExtensionIpAllocationUsage,omitempty"` Res *types.QueryExtensionIpAllocationUsageResponse `xml:"urn:vim25 QueryExtensionIpAllocationUsageResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryExtensionIpAllocationUsageBody) Fault() *soap.Fault { return b.Fault_ } func QueryExtensionIpAllocationUsage(ctx context.Context, r soap.RoundTripper, req *types.QueryExtensionIpAllocationUsage) (*types.QueryExtensionIpAllocationUsageResponse, error) { var reqBody, resBody QueryExtensionIpAllocationUsageBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFaultToleranceCompatibilityBody struct { Req *types.QueryFaultToleranceCompatibility `xml:"urn:vim25 QueryFaultToleranceCompatibility,omitempty"` Res *types.QueryFaultToleranceCompatibilityResponse `xml:"urn:vim25 QueryFaultToleranceCompatibilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFaultToleranceCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } func QueryFaultToleranceCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryFaultToleranceCompatibility) (*types.QueryFaultToleranceCompatibilityResponse, error) { var reqBody, resBody QueryFaultToleranceCompatibilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFaultToleranceCompatibilityExBody struct { Req *types.QueryFaultToleranceCompatibilityEx `xml:"urn:vim25 QueryFaultToleranceCompatibilityEx,omitempty"` Res *types.QueryFaultToleranceCompatibilityExResponse `xml:"urn:vim25 QueryFaultToleranceCompatibilityExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFaultToleranceCompatibilityExBody) Fault() *soap.Fault { return b.Fault_ } func QueryFaultToleranceCompatibilityEx(ctx context.Context, r soap.RoundTripper, req *types.QueryFaultToleranceCompatibilityEx) (*types.QueryFaultToleranceCompatibilityExResponse, error) { var reqBody, resBody QueryFaultToleranceCompatibilityExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFilterEntitiesBody struct { Req *types.QueryFilterEntities `xml:"urn:vim25 QueryFilterEntities,omitempty"` Res *types.QueryFilterEntitiesResponse `xml:"urn:vim25 QueryFilterEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func QueryFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterEntities) (*types.QueryFilterEntitiesResponse, error) { var reqBody, resBody QueryFilterEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFilterInfoIdsBody struct { Req *types.QueryFilterInfoIds `xml:"urn:vim25 QueryFilterInfoIds,omitempty"` Res *types.QueryFilterInfoIdsResponse `xml:"urn:vim25 QueryFilterInfoIdsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFilterInfoIdsBody) Fault() *soap.Fault { return b.Fault_ } func QueryFilterInfoIds(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterInfoIds) (*types.QueryFilterInfoIdsResponse, error) { var reqBody, resBody QueryFilterInfoIdsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFilterListBody struct { Req *types.QueryFilterList `xml:"urn:vim25 QueryFilterList,omitempty"` Res *types.QueryFilterListResponse `xml:"urn:vim25 QueryFilterListResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFilterListBody) Fault() *soap.Fault { return b.Fault_ } func QueryFilterList(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterList) (*types.QueryFilterListResponse, error) { var reqBody, resBody QueryFilterListBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFilterNameBody struct { Req *types.QueryFilterName `xml:"urn:vim25 QueryFilterName,omitempty"` Res *types.QueryFilterNameResponse `xml:"urn:vim25 QueryFilterNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFilterNameBody) Fault() *soap.Fault { return b.Fault_ } func QueryFilterName(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterName) (*types.QueryFilterNameResponse, error) { var reqBody, resBody QueryFilterNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryFirmwareConfigUploadURLBody struct { Req *types.QueryFirmwareConfigUploadURL `xml:"urn:vim25 QueryFirmwareConfigUploadURL,omitempty"` Res *types.QueryFirmwareConfigUploadURLResponse `xml:"urn:vim25 QueryFirmwareConfigUploadURLResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryFirmwareConfigUploadURLBody) Fault() *soap.Fault { return b.Fault_ } func QueryFirmwareConfigUploadURL(ctx context.Context, r soap.RoundTripper, req *types.QueryFirmwareConfigUploadURL) (*types.QueryFirmwareConfigUploadURLResponse, error) { var reqBody, resBody QueryFirmwareConfigUploadURLBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryHealthUpdateInfosBody struct { Req *types.QueryHealthUpdateInfos `xml:"urn:vim25 QueryHealthUpdateInfos,omitempty"` Res *types.QueryHealthUpdateInfosResponse `xml:"urn:vim25 QueryHealthUpdateInfosResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryHealthUpdateInfosBody) Fault() *soap.Fault { return b.Fault_ } func QueryHealthUpdateInfos(ctx context.Context, r soap.RoundTripper, req *types.QueryHealthUpdateInfos) (*types.QueryHealthUpdateInfosResponse, error) { var reqBody, resBody QueryHealthUpdateInfosBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryHealthUpdatesBody struct { Req *types.QueryHealthUpdates `xml:"urn:vim25 QueryHealthUpdates,omitempty"` Res *types.QueryHealthUpdatesResponse `xml:"urn:vim25 QueryHealthUpdatesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryHealthUpdatesBody) Fault() *soap.Fault { return b.Fault_ } func QueryHealthUpdates(ctx context.Context, r soap.RoundTripper, req *types.QueryHealthUpdates) (*types.QueryHealthUpdatesResponse, error) { var reqBody, resBody QueryHealthUpdatesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryHostConnectionInfoBody struct { Req *types.QueryHostConnectionInfo `xml:"urn:vim25 QueryHostConnectionInfo,omitempty"` Res *types.QueryHostConnectionInfoResponse `xml:"urn:vim25 QueryHostConnectionInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryHostConnectionInfoBody) Fault() *soap.Fault { return b.Fault_ } func QueryHostConnectionInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryHostConnectionInfo) (*types.QueryHostConnectionInfoResponse, error) { var reqBody, resBody QueryHostConnectionInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryHostPatch_TaskBody struct { Req *types.QueryHostPatch_Task `xml:"urn:vim25 QueryHostPatch_Task,omitempty"` Res *types.QueryHostPatch_TaskResponse `xml:"urn:vim25 QueryHostPatch_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } func QueryHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.QueryHostPatch_Task) (*types.QueryHostPatch_TaskResponse, error) { var reqBody, resBody QueryHostPatch_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryHostProfileMetadataBody struct { Req *types.QueryHostProfileMetadata `xml:"urn:vim25 QueryHostProfileMetadata,omitempty"` Res *types.QueryHostProfileMetadataResponse `xml:"urn:vim25 QueryHostProfileMetadataResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryHostProfileMetadataBody) Fault() *soap.Fault { return b.Fault_ } func QueryHostProfileMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryHostProfileMetadata) (*types.QueryHostProfileMetadataResponse, error) { var reqBody, resBody QueryHostProfileMetadataBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryHostStatusBody struct { Req *types.QueryHostStatus `xml:"urn:vim25 QueryHostStatus,omitempty"` Res *types.QueryHostStatusResponse `xml:"urn:vim25 QueryHostStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryHostStatusBody) Fault() *soap.Fault { return b.Fault_ } func QueryHostStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryHostStatus) (*types.QueryHostStatusResponse, error) { var reqBody, resBody QueryHostStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryIORMConfigOptionBody struct { Req *types.QueryIORMConfigOption `xml:"urn:vim25 QueryIORMConfigOption,omitempty"` Res *types.QueryIORMConfigOptionResponse `xml:"urn:vim25 QueryIORMConfigOptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryIORMConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } func QueryIORMConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryIORMConfigOption) (*types.QueryIORMConfigOptionResponse, error) { var reqBody, resBody QueryIORMConfigOptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryIPAllocationsBody struct { Req *types.QueryIPAllocations `xml:"urn:vim25 QueryIPAllocations,omitempty"` Res *types.QueryIPAllocationsResponse `xml:"urn:vim25 QueryIPAllocationsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryIPAllocationsBody) Fault() *soap.Fault { return b.Fault_ } func QueryIPAllocations(ctx context.Context, r soap.RoundTripper, req *types.QueryIPAllocations) (*types.QueryIPAllocationsResponse, error) { var reqBody, resBody QueryIPAllocationsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryIoFilterInfoBody struct { Req *types.QueryIoFilterInfo `xml:"urn:vim25 QueryIoFilterInfo,omitempty"` Res *types.QueryIoFilterInfoResponse `xml:"urn:vim25 QueryIoFilterInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryIoFilterInfoBody) Fault() *soap.Fault { return b.Fault_ } func QueryIoFilterInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryIoFilterInfo) (*types.QueryIoFilterInfoResponse, error) { var reqBody, resBody QueryIoFilterInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryIoFilterIssuesBody struct { Req *types.QueryIoFilterIssues `xml:"urn:vim25 QueryIoFilterIssues,omitempty"` Res *types.QueryIoFilterIssuesResponse `xml:"urn:vim25 QueryIoFilterIssuesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryIoFilterIssuesBody) Fault() *soap.Fault { return b.Fault_ } func QueryIoFilterIssues(ctx context.Context, r soap.RoundTripper, req *types.QueryIoFilterIssues) (*types.QueryIoFilterIssuesResponse, error) { var reqBody, resBody QueryIoFilterIssuesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryIpPoolsBody struct { Req *types.QueryIpPools `xml:"urn:vim25 QueryIpPools,omitempty"` Res *types.QueryIpPoolsResponse `xml:"urn:vim25 QueryIpPoolsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryIpPoolsBody) Fault() *soap.Fault { return b.Fault_ } func QueryIpPools(ctx context.Context, r soap.RoundTripper, req *types.QueryIpPools) (*types.QueryIpPoolsResponse, error) { var reqBody, resBody QueryIpPoolsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryLicenseSourceAvailabilityBody struct { Req *types.QueryLicenseSourceAvailability `xml:"urn:vim25 QueryLicenseSourceAvailability,omitempty"` Res *types.QueryLicenseSourceAvailabilityResponse `xml:"urn:vim25 QueryLicenseSourceAvailabilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryLicenseSourceAvailabilityBody) Fault() *soap.Fault { return b.Fault_ } func QueryLicenseSourceAvailability(ctx context.Context, r soap.RoundTripper, req *types.QueryLicenseSourceAvailability) (*types.QueryLicenseSourceAvailabilityResponse, error) { var reqBody, resBody QueryLicenseSourceAvailabilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryLicenseUsageBody struct { Req *types.QueryLicenseUsage `xml:"urn:vim25 QueryLicenseUsage,omitempty"` Res *types.QueryLicenseUsageResponse `xml:"urn:vim25 QueryLicenseUsageResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryLicenseUsageBody) Fault() *soap.Fault { return b.Fault_ } func QueryLicenseUsage(ctx context.Context, r soap.RoundTripper, req *types.QueryLicenseUsage) (*types.QueryLicenseUsageResponse, error) { var reqBody, resBody QueryLicenseUsageBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryLockdownExceptionsBody struct { Req *types.QueryLockdownExceptions `xml:"urn:vim25 QueryLockdownExceptions,omitempty"` Res *types.QueryLockdownExceptionsResponse `xml:"urn:vim25 QueryLockdownExceptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryLockdownExceptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryLockdownExceptions(ctx context.Context, r soap.RoundTripper, req *types.QueryLockdownExceptions) (*types.QueryLockdownExceptionsResponse, error) { var reqBody, resBody QueryLockdownExceptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryManagedByBody struct { Req *types.QueryManagedBy `xml:"urn:vim25 QueryManagedBy,omitempty"` Res *types.QueryManagedByResponse `xml:"urn:vim25 QueryManagedByResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryManagedByBody) Fault() *soap.Fault { return b.Fault_ } func QueryManagedBy(ctx context.Context, r soap.RoundTripper, req *types.QueryManagedBy) (*types.QueryManagedByResponse, error) { var reqBody, resBody QueryManagedByBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryMemoryOverheadBody struct { Req *types.QueryMemoryOverhead `xml:"urn:vim25 QueryMemoryOverhead,omitempty"` Res *types.QueryMemoryOverheadResponse `xml:"urn:vim25 QueryMemoryOverheadResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryMemoryOverheadBody) Fault() *soap.Fault { return b.Fault_ } func QueryMemoryOverhead(ctx context.Context, r soap.RoundTripper, req *types.QueryMemoryOverhead) (*types.QueryMemoryOverheadResponse, error) { var reqBody, resBody QueryMemoryOverheadBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryMemoryOverheadExBody struct { Req *types.QueryMemoryOverheadEx `xml:"urn:vim25 QueryMemoryOverheadEx,omitempty"` Res *types.QueryMemoryOverheadExResponse `xml:"urn:vim25 QueryMemoryOverheadExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryMemoryOverheadExBody) Fault() *soap.Fault { return b.Fault_ } func QueryMemoryOverheadEx(ctx context.Context, r soap.RoundTripper, req *types.QueryMemoryOverheadEx) (*types.QueryMemoryOverheadExResponse, error) { var reqBody, resBody QueryMemoryOverheadExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryMigrationDependenciesBody struct { Req *types.QueryMigrationDependencies `xml:"urn:vim25 QueryMigrationDependencies,omitempty"` Res *types.QueryMigrationDependenciesResponse `xml:"urn:vim25 QueryMigrationDependenciesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryMigrationDependenciesBody) Fault() *soap.Fault { return b.Fault_ } func QueryMigrationDependencies(ctx context.Context, r soap.RoundTripper, req *types.QueryMigrationDependencies) (*types.QueryMigrationDependenciesResponse, error) { var reqBody, resBody QueryMigrationDependenciesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryModulesBody struct { Req *types.QueryModules `xml:"urn:vim25 QueryModules,omitempty"` Res *types.QueryModulesResponse `xml:"urn:vim25 QueryModulesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryModulesBody) Fault() *soap.Fault { return b.Fault_ } func QueryModules(ctx context.Context, r soap.RoundTripper, req *types.QueryModules) (*types.QueryModulesResponse, error) { var reqBody, resBody QueryModulesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryMonitoredEntitiesBody struct { Req *types.QueryMonitoredEntities `xml:"urn:vim25 QueryMonitoredEntities,omitempty"` Res *types.QueryMonitoredEntitiesResponse `xml:"urn:vim25 QueryMonitoredEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func QueryMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.QueryMonitoredEntities) (*types.QueryMonitoredEntitiesResponse, error) { var reqBody, resBody QueryMonitoredEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryNFSUserBody struct { Req *types.QueryNFSUser `xml:"urn:vim25 QueryNFSUser,omitempty"` Res *types.QueryNFSUserResponse `xml:"urn:vim25 QueryNFSUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryNFSUserBody) Fault() *soap.Fault { return b.Fault_ } func QueryNFSUser(ctx context.Context, r soap.RoundTripper, req *types.QueryNFSUser) (*types.QueryNFSUserResponse, error) { var reqBody, resBody QueryNFSUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryNetConfigBody struct { Req *types.QueryNetConfig `xml:"urn:vim25 QueryNetConfig,omitempty"` Res *types.QueryNetConfigResponse `xml:"urn:vim25 QueryNetConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryNetConfigBody) Fault() *soap.Fault { return b.Fault_ } func QueryNetConfig(ctx context.Context, r soap.RoundTripper, req *types.QueryNetConfig) (*types.QueryNetConfigResponse, error) { var reqBody, resBody QueryNetConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryNetworkHintBody struct { Req *types.QueryNetworkHint `xml:"urn:vim25 QueryNetworkHint,omitempty"` Res *types.QueryNetworkHintResponse `xml:"urn:vim25 QueryNetworkHintResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryNetworkHintBody) Fault() *soap.Fault { return b.Fault_ } func QueryNetworkHint(ctx context.Context, r soap.RoundTripper, req *types.QueryNetworkHint) (*types.QueryNetworkHintResponse, error) { var reqBody, resBody QueryNetworkHintBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryObjectsOnPhysicalVsanDiskBody struct { Req *types.QueryObjectsOnPhysicalVsanDisk `xml:"urn:vim25 QueryObjectsOnPhysicalVsanDisk,omitempty"` Res *types.QueryObjectsOnPhysicalVsanDiskResponse `xml:"urn:vim25 QueryObjectsOnPhysicalVsanDiskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryObjectsOnPhysicalVsanDiskBody) Fault() *soap.Fault { return b.Fault_ } func QueryObjectsOnPhysicalVsanDisk(ctx context.Context, r soap.RoundTripper, req *types.QueryObjectsOnPhysicalVsanDisk) (*types.QueryObjectsOnPhysicalVsanDiskResponse, error) { var reqBody, resBody QueryObjectsOnPhysicalVsanDiskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryOptionsBody struct { Req *types.QueryOptions `xml:"urn:vim25 QueryOptions,omitempty"` Res *types.QueryOptionsResponse `xml:"urn:vim25 QueryOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryOptions) (*types.QueryOptionsResponse, error) { var reqBody, resBody QueryOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPartitionCreateDescBody struct { Req *types.QueryPartitionCreateDesc `xml:"urn:vim25 QueryPartitionCreateDesc,omitempty"` Res *types.QueryPartitionCreateDescResponse `xml:"urn:vim25 QueryPartitionCreateDescResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPartitionCreateDescBody) Fault() *soap.Fault { return b.Fault_ } func QueryPartitionCreateDesc(ctx context.Context, r soap.RoundTripper, req *types.QueryPartitionCreateDesc) (*types.QueryPartitionCreateDescResponse, error) { var reqBody, resBody QueryPartitionCreateDescBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPartitionCreateOptionsBody struct { Req *types.QueryPartitionCreateOptions `xml:"urn:vim25 QueryPartitionCreateOptions,omitempty"` Res *types.QueryPartitionCreateOptionsResponse `xml:"urn:vim25 QueryPartitionCreateOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPartitionCreateOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryPartitionCreateOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryPartitionCreateOptions) (*types.QueryPartitionCreateOptionsResponse, error) { var reqBody, resBody QueryPartitionCreateOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPathSelectionPolicyOptionsBody struct { Req *types.QueryPathSelectionPolicyOptions `xml:"urn:vim25 QueryPathSelectionPolicyOptions,omitempty"` Res *types.QueryPathSelectionPolicyOptionsResponse `xml:"urn:vim25 QueryPathSelectionPolicyOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPathSelectionPolicyOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryPathSelectionPolicyOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryPathSelectionPolicyOptions) (*types.QueryPathSelectionPolicyOptionsResponse, error) { var reqBody, resBody QueryPathSelectionPolicyOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPerfBody struct { Req *types.QueryPerf `xml:"urn:vim25 QueryPerf,omitempty"` Res *types.QueryPerfResponse `xml:"urn:vim25 QueryPerfResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPerfBody) Fault() *soap.Fault { return b.Fault_ } func QueryPerf(ctx context.Context, r soap.RoundTripper, req *types.QueryPerf) (*types.QueryPerfResponse, error) { var reqBody, resBody QueryPerfBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPerfCompositeBody struct { Req *types.QueryPerfComposite `xml:"urn:vim25 QueryPerfComposite,omitempty"` Res *types.QueryPerfCompositeResponse `xml:"urn:vim25 QueryPerfCompositeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPerfCompositeBody) Fault() *soap.Fault { return b.Fault_ } func QueryPerfComposite(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfComposite) (*types.QueryPerfCompositeResponse, error) { var reqBody, resBody QueryPerfCompositeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPerfCounterBody struct { Req *types.QueryPerfCounter `xml:"urn:vim25 QueryPerfCounter,omitempty"` Res *types.QueryPerfCounterResponse `xml:"urn:vim25 QueryPerfCounterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPerfCounterBody) Fault() *soap.Fault { return b.Fault_ } func QueryPerfCounter(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfCounter) (*types.QueryPerfCounterResponse, error) { var reqBody, resBody QueryPerfCounterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPerfCounterByLevelBody struct { Req *types.QueryPerfCounterByLevel `xml:"urn:vim25 QueryPerfCounterByLevel,omitempty"` Res *types.QueryPerfCounterByLevelResponse `xml:"urn:vim25 QueryPerfCounterByLevelResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPerfCounterByLevelBody) Fault() *soap.Fault { return b.Fault_ } func QueryPerfCounterByLevel(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfCounterByLevel) (*types.QueryPerfCounterByLevelResponse, error) { var reqBody, resBody QueryPerfCounterByLevelBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPerfProviderSummaryBody struct { Req *types.QueryPerfProviderSummary `xml:"urn:vim25 QueryPerfProviderSummary,omitempty"` Res *types.QueryPerfProviderSummaryResponse `xml:"urn:vim25 QueryPerfProviderSummaryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPerfProviderSummaryBody) Fault() *soap.Fault { return b.Fault_ } func QueryPerfProviderSummary(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfProviderSummary) (*types.QueryPerfProviderSummaryResponse, error) { var reqBody, resBody QueryPerfProviderSummaryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPhysicalVsanDisksBody struct { Req *types.QueryPhysicalVsanDisks `xml:"urn:vim25 QueryPhysicalVsanDisks,omitempty"` Res *types.QueryPhysicalVsanDisksResponse `xml:"urn:vim25 QueryPhysicalVsanDisksResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPhysicalVsanDisksBody) Fault() *soap.Fault { return b.Fault_ } func QueryPhysicalVsanDisks(ctx context.Context, r soap.RoundTripper, req *types.QueryPhysicalVsanDisks) (*types.QueryPhysicalVsanDisksResponse, error) { var reqBody, resBody QueryPhysicalVsanDisksBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPnicStatusBody struct { Req *types.QueryPnicStatus `xml:"urn:vim25 QueryPnicStatus,omitempty"` Res *types.QueryPnicStatusResponse `xml:"urn:vim25 QueryPnicStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPnicStatusBody) Fault() *soap.Fault { return b.Fault_ } func QueryPnicStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryPnicStatus) (*types.QueryPnicStatusResponse, error) { var reqBody, resBody QueryPnicStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryPolicyMetadataBody struct { Req *types.QueryPolicyMetadata `xml:"urn:vim25 QueryPolicyMetadata,omitempty"` Res *types.QueryPolicyMetadataResponse `xml:"urn:vim25 QueryPolicyMetadataResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryPolicyMetadataBody) Fault() *soap.Fault { return b.Fault_ } func QueryPolicyMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryPolicyMetadata) (*types.QueryPolicyMetadataResponse, error) { var reqBody, resBody QueryPolicyMetadataBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryProfileStructureBody struct { Req *types.QueryProfileStructure `xml:"urn:vim25 QueryProfileStructure,omitempty"` Res *types.QueryProfileStructureResponse `xml:"urn:vim25 QueryProfileStructureResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryProfileStructureBody) Fault() *soap.Fault { return b.Fault_ } func QueryProfileStructure(ctx context.Context, r soap.RoundTripper, req *types.QueryProfileStructure) (*types.QueryProfileStructureResponse, error) { var reqBody, resBody QueryProfileStructureBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryProviderListBody struct { Req *types.QueryProviderList `xml:"urn:vim25 QueryProviderList,omitempty"` Res *types.QueryProviderListResponse `xml:"urn:vim25 QueryProviderListResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryProviderListBody) Fault() *soap.Fault { return b.Fault_ } func QueryProviderList(ctx context.Context, r soap.RoundTripper, req *types.QueryProviderList) (*types.QueryProviderListResponse, error) { var reqBody, resBody QueryProviderListBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryProviderNameBody struct { Req *types.QueryProviderName `xml:"urn:vim25 QueryProviderName,omitempty"` Res *types.QueryProviderNameResponse `xml:"urn:vim25 QueryProviderNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryProviderNameBody) Fault() *soap.Fault { return b.Fault_ } func QueryProviderName(ctx context.Context, r soap.RoundTripper, req *types.QueryProviderName) (*types.QueryProviderNameResponse, error) { var reqBody, resBody QueryProviderNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryResourceConfigOptionBody struct { Req *types.QueryResourceConfigOption `xml:"urn:vim25 QueryResourceConfigOption,omitempty"` Res *types.QueryResourceConfigOptionResponse `xml:"urn:vim25 QueryResourceConfigOptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryResourceConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } func QueryResourceConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryResourceConfigOption) (*types.QueryResourceConfigOptionResponse, error) { var reqBody, resBody QueryResourceConfigOptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryServiceListBody struct { Req *types.QueryServiceList `xml:"urn:vim25 QueryServiceList,omitempty"` Res *types.QueryServiceListResponse `xml:"urn:vim25 QueryServiceListResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryServiceListBody) Fault() *soap.Fault { return b.Fault_ } func QueryServiceList(ctx context.Context, r soap.RoundTripper, req *types.QueryServiceList) (*types.QueryServiceListResponse, error) { var reqBody, resBody QueryServiceListBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryStorageArrayTypePolicyOptionsBody struct { Req *types.QueryStorageArrayTypePolicyOptions `xml:"urn:vim25 QueryStorageArrayTypePolicyOptions,omitempty"` Res *types.QueryStorageArrayTypePolicyOptionsResponse `xml:"urn:vim25 QueryStorageArrayTypePolicyOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryStorageArrayTypePolicyOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryStorageArrayTypePolicyOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryStorageArrayTypePolicyOptions) (*types.QueryStorageArrayTypePolicyOptionsResponse, error) { var reqBody, resBody QueryStorageArrayTypePolicyOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QuerySupportedFeaturesBody struct { Req *types.QuerySupportedFeatures `xml:"urn:vim25 QuerySupportedFeatures,omitempty"` Res *types.QuerySupportedFeaturesResponse `xml:"urn:vim25 QuerySupportedFeaturesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QuerySupportedFeaturesBody) Fault() *soap.Fault { return b.Fault_ } func QuerySupportedFeatures(ctx context.Context, r soap.RoundTripper, req *types.QuerySupportedFeatures) (*types.QuerySupportedFeaturesResponse, error) { var reqBody, resBody QuerySupportedFeaturesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QuerySyncingVsanObjectsBody struct { Req *types.QuerySyncingVsanObjects `xml:"urn:vim25 QuerySyncingVsanObjects,omitempty"` Res *types.QuerySyncingVsanObjectsResponse `xml:"urn:vim25 QuerySyncingVsanObjectsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QuerySyncingVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } func QuerySyncingVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.QuerySyncingVsanObjects) (*types.QuerySyncingVsanObjectsResponse, error) { var reqBody, resBody QuerySyncingVsanObjectsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QuerySystemUsersBody struct { Req *types.QuerySystemUsers `xml:"urn:vim25 QuerySystemUsers,omitempty"` Res *types.QuerySystemUsersResponse `xml:"urn:vim25 QuerySystemUsersResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QuerySystemUsersBody) Fault() *soap.Fault { return b.Fault_ } func QuerySystemUsers(ctx context.Context, r soap.RoundTripper, req *types.QuerySystemUsers) (*types.QuerySystemUsersResponse, error) { var reqBody, resBody QuerySystemUsersBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryTargetCapabilitiesBody struct { Req *types.QueryTargetCapabilities `xml:"urn:vim25 QueryTargetCapabilities,omitempty"` Res *types.QueryTargetCapabilitiesResponse `xml:"urn:vim25 QueryTargetCapabilitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryTargetCapabilitiesBody) Fault() *soap.Fault { return b.Fault_ } func QueryTargetCapabilities(ctx context.Context, r soap.RoundTripper, req *types.QueryTargetCapabilities) (*types.QueryTargetCapabilitiesResponse, error) { var reqBody, resBody QueryTargetCapabilitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryTpmAttestationReportBody struct { Req *types.QueryTpmAttestationReport `xml:"urn:vim25 QueryTpmAttestationReport,omitempty"` Res *types.QueryTpmAttestationReportResponse `xml:"urn:vim25 QueryTpmAttestationReportResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryTpmAttestationReportBody) Fault() *soap.Fault { return b.Fault_ } func QueryTpmAttestationReport(ctx context.Context, r soap.RoundTripper, req *types.QueryTpmAttestationReport) (*types.QueryTpmAttestationReportResponse, error) { var reqBody, resBody QueryTpmAttestationReportBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryUnmonitoredHostsBody struct { Req *types.QueryUnmonitoredHosts `xml:"urn:vim25 QueryUnmonitoredHosts,omitempty"` Res *types.QueryUnmonitoredHostsResponse `xml:"urn:vim25 QueryUnmonitoredHostsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryUnmonitoredHostsBody) Fault() *soap.Fault { return b.Fault_ } func QueryUnmonitoredHosts(ctx context.Context, r soap.RoundTripper, req *types.QueryUnmonitoredHosts) (*types.QueryUnmonitoredHostsResponse, error) { var reqBody, resBody QueryUnmonitoredHostsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryUnownedFilesBody struct { Req *types.QueryUnownedFiles `xml:"urn:vim25 QueryUnownedFiles,omitempty"` Res *types.QueryUnownedFilesResponse `xml:"urn:vim25 QueryUnownedFilesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryUnownedFilesBody) Fault() *soap.Fault { return b.Fault_ } func QueryUnownedFiles(ctx context.Context, r soap.RoundTripper, req *types.QueryUnownedFiles) (*types.QueryUnownedFilesResponse, error) { var reqBody, resBody QueryUnownedFilesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryUnresolvedVmfsVolumeBody struct { Req *types.QueryUnresolvedVmfsVolume `xml:"urn:vim25 QueryUnresolvedVmfsVolume,omitempty"` Res *types.QueryUnresolvedVmfsVolumeResponse `xml:"urn:vim25 QueryUnresolvedVmfsVolumeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryUnresolvedVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } func QueryUnresolvedVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.QueryUnresolvedVmfsVolume) (*types.QueryUnresolvedVmfsVolumeResponse, error) { var reqBody, resBody QueryUnresolvedVmfsVolumeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryUnresolvedVmfsVolumesBody struct { Req *types.QueryUnresolvedVmfsVolumes `xml:"urn:vim25 QueryUnresolvedVmfsVolumes,omitempty"` Res *types.QueryUnresolvedVmfsVolumesResponse `xml:"urn:vim25 QueryUnresolvedVmfsVolumesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryUnresolvedVmfsVolumesBody) Fault() *soap.Fault { return b.Fault_ } func QueryUnresolvedVmfsVolumes(ctx context.Context, r soap.RoundTripper, req *types.QueryUnresolvedVmfsVolumes) (*types.QueryUnresolvedVmfsVolumesResponse, error) { var reqBody, resBody QueryUnresolvedVmfsVolumesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryUsedVlanIdInDvsBody struct { Req *types.QueryUsedVlanIdInDvs `xml:"urn:vim25 QueryUsedVlanIdInDvs,omitempty"` Res *types.QueryUsedVlanIdInDvsResponse `xml:"urn:vim25 QueryUsedVlanIdInDvsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryUsedVlanIdInDvsBody) Fault() *soap.Fault { return b.Fault_ } func QueryUsedVlanIdInDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryUsedVlanIdInDvs) (*types.QueryUsedVlanIdInDvsResponse, error) { var reqBody, resBody QueryUsedVlanIdInDvsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVMotionCompatibilityBody struct { Req *types.QueryVMotionCompatibility `xml:"urn:vim25 QueryVMotionCompatibility,omitempty"` Res *types.QueryVMotionCompatibilityResponse `xml:"urn:vim25 QueryVMotionCompatibilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVMotionCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } func QueryVMotionCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryVMotionCompatibility) (*types.QueryVMotionCompatibilityResponse, error) { var reqBody, resBody QueryVMotionCompatibilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVMotionCompatibilityEx_TaskBody struct { Req *types.QueryVMotionCompatibilityEx_Task `xml:"urn:vim25 QueryVMotionCompatibilityEx_Task,omitempty"` Res *types.QueryVMotionCompatibilityEx_TaskResponse `xml:"urn:vim25 QueryVMotionCompatibilityEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVMotionCompatibilityEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func QueryVMotionCompatibilityEx_Task(ctx context.Context, r soap.RoundTripper, req *types.QueryVMotionCompatibilityEx_Task) (*types.QueryVMotionCompatibilityEx_TaskResponse, error) { var reqBody, resBody QueryVMotionCompatibilityEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVirtualDiskFragmentationBody struct { Req *types.QueryVirtualDiskFragmentation `xml:"urn:vim25 QueryVirtualDiskFragmentation,omitempty"` Res *types.QueryVirtualDiskFragmentationResponse `xml:"urn:vim25 QueryVirtualDiskFragmentationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVirtualDiskFragmentationBody) Fault() *soap.Fault { return b.Fault_ } func QueryVirtualDiskFragmentation(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskFragmentation) (*types.QueryVirtualDiskFragmentationResponse, error) { var reqBody, resBody QueryVirtualDiskFragmentationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVirtualDiskGeometryBody struct { Req *types.QueryVirtualDiskGeometry `xml:"urn:vim25 QueryVirtualDiskGeometry,omitempty"` Res *types.QueryVirtualDiskGeometryResponse `xml:"urn:vim25 QueryVirtualDiskGeometryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVirtualDiskGeometryBody) Fault() *soap.Fault { return b.Fault_ } func QueryVirtualDiskGeometry(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskGeometry) (*types.QueryVirtualDiskGeometryResponse, error) { var reqBody, resBody QueryVirtualDiskGeometryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVirtualDiskUuidBody struct { Req *types.QueryVirtualDiskUuid `xml:"urn:vim25 QueryVirtualDiskUuid,omitempty"` Res *types.QueryVirtualDiskUuidResponse `xml:"urn:vim25 QueryVirtualDiskUuidResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVirtualDiskUuidBody) Fault() *soap.Fault { return b.Fault_ } func QueryVirtualDiskUuid(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskUuid) (*types.QueryVirtualDiskUuidResponse, error) { var reqBody, resBody QueryVirtualDiskUuidBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVmfsConfigOptionBody struct { Req *types.QueryVmfsConfigOption `xml:"urn:vim25 QueryVmfsConfigOption,omitempty"` Res *types.QueryVmfsConfigOptionResponse `xml:"urn:vim25 QueryVmfsConfigOptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVmfsConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } func QueryVmfsConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsConfigOption) (*types.QueryVmfsConfigOptionResponse, error) { var reqBody, resBody QueryVmfsConfigOptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVmfsDatastoreCreateOptionsBody struct { Req *types.QueryVmfsDatastoreCreateOptions `xml:"urn:vim25 QueryVmfsDatastoreCreateOptions,omitempty"` Res *types.QueryVmfsDatastoreCreateOptionsResponse `xml:"urn:vim25 QueryVmfsDatastoreCreateOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVmfsDatastoreCreateOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryVmfsDatastoreCreateOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreCreateOptions) (*types.QueryVmfsDatastoreCreateOptionsResponse, error) { var reqBody, resBody QueryVmfsDatastoreCreateOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVmfsDatastoreExpandOptionsBody struct { Req *types.QueryVmfsDatastoreExpandOptions `xml:"urn:vim25 QueryVmfsDatastoreExpandOptions,omitempty"` Res *types.QueryVmfsDatastoreExpandOptionsResponse `xml:"urn:vim25 QueryVmfsDatastoreExpandOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVmfsDatastoreExpandOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryVmfsDatastoreExpandOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreExpandOptions) (*types.QueryVmfsDatastoreExpandOptionsResponse, error) { var reqBody, resBody QueryVmfsDatastoreExpandOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVmfsDatastoreExtendOptionsBody struct { Req *types.QueryVmfsDatastoreExtendOptions `xml:"urn:vim25 QueryVmfsDatastoreExtendOptions,omitempty"` Res *types.QueryVmfsDatastoreExtendOptionsResponse `xml:"urn:vim25 QueryVmfsDatastoreExtendOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVmfsDatastoreExtendOptionsBody) Fault() *soap.Fault { return b.Fault_ } func QueryVmfsDatastoreExtendOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreExtendOptions) (*types.QueryVmfsDatastoreExtendOptionsResponse, error) { var reqBody, resBody QueryVmfsDatastoreExtendOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVnicStatusBody struct { Req *types.QueryVnicStatus `xml:"urn:vim25 QueryVnicStatus,omitempty"` Res *types.QueryVnicStatusResponse `xml:"urn:vim25 QueryVnicStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVnicStatusBody) Fault() *soap.Fault { return b.Fault_ } func QueryVnicStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryVnicStatus) (*types.QueryVnicStatusResponse, error) { var reqBody, resBody QueryVnicStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVsanObjectUuidsByFilterBody struct { Req *types.QueryVsanObjectUuidsByFilter `xml:"urn:vim25 QueryVsanObjectUuidsByFilter,omitempty"` Res *types.QueryVsanObjectUuidsByFilterResponse `xml:"urn:vim25 QueryVsanObjectUuidsByFilterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVsanObjectUuidsByFilterBody) Fault() *soap.Fault { return b.Fault_ } func QueryVsanObjectUuidsByFilter(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanObjectUuidsByFilter) (*types.QueryVsanObjectUuidsByFilterResponse, error) { var reqBody, resBody QueryVsanObjectUuidsByFilterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVsanObjectsBody struct { Req *types.QueryVsanObjects `xml:"urn:vim25 QueryVsanObjects,omitempty"` Res *types.QueryVsanObjectsResponse `xml:"urn:vim25 QueryVsanObjectsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } func QueryVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanObjects) (*types.QueryVsanObjectsResponse, error) { var reqBody, resBody QueryVsanObjectsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVsanStatisticsBody struct { Req *types.QueryVsanStatistics `xml:"urn:vim25 QueryVsanStatistics,omitempty"` Res *types.QueryVsanStatisticsResponse `xml:"urn:vim25 QueryVsanStatisticsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVsanStatisticsBody) Fault() *soap.Fault { return b.Fault_ } func QueryVsanStatistics(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanStatistics) (*types.QueryVsanStatisticsResponse, error) { var reqBody, resBody QueryVsanStatisticsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type QueryVsanUpgradeStatusBody struct { Req *types.QueryVsanUpgradeStatus `xml:"urn:vim25 QueryVsanUpgradeStatus,omitempty"` Res *types.QueryVsanUpgradeStatusResponse `xml:"urn:vim25 QueryVsanUpgradeStatusResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *QueryVsanUpgradeStatusBody) Fault() *soap.Fault { return b.Fault_ } func QueryVsanUpgradeStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanUpgradeStatus) (*types.QueryVsanUpgradeStatusResponse, error) { var reqBody, resBody QueryVsanUpgradeStatusBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReadEnvironmentVariableInGuestBody struct { Req *types.ReadEnvironmentVariableInGuest `xml:"urn:vim25 ReadEnvironmentVariableInGuest,omitempty"` Res *types.ReadEnvironmentVariableInGuestResponse `xml:"urn:vim25 ReadEnvironmentVariableInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReadEnvironmentVariableInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ReadEnvironmentVariableInGuest(ctx context.Context, r soap.RoundTripper, req *types.ReadEnvironmentVariableInGuest) (*types.ReadEnvironmentVariableInGuestResponse, error) { var reqBody, resBody ReadEnvironmentVariableInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReadNextEventsBody struct { Req *types.ReadNextEvents `xml:"urn:vim25 ReadNextEvents,omitempty"` Res *types.ReadNextEventsResponse `xml:"urn:vim25 ReadNextEventsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReadNextEventsBody) Fault() *soap.Fault { return b.Fault_ } func ReadNextEvents(ctx context.Context, r soap.RoundTripper, req *types.ReadNextEvents) (*types.ReadNextEventsResponse, error) { var reqBody, resBody ReadNextEventsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReadNextTasksBody struct { Req *types.ReadNextTasks `xml:"urn:vim25 ReadNextTasks,omitempty"` Res *types.ReadNextTasksResponse `xml:"urn:vim25 ReadNextTasksResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReadNextTasksBody) Fault() *soap.Fault { return b.Fault_ } func ReadNextTasks(ctx context.Context, r soap.RoundTripper, req *types.ReadNextTasks) (*types.ReadNextTasksResponse, error) { var reqBody, resBody ReadNextTasksBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReadPreviousEventsBody struct { Req *types.ReadPreviousEvents `xml:"urn:vim25 ReadPreviousEvents,omitempty"` Res *types.ReadPreviousEventsResponse `xml:"urn:vim25 ReadPreviousEventsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReadPreviousEventsBody) Fault() *soap.Fault { return b.Fault_ } func ReadPreviousEvents(ctx context.Context, r soap.RoundTripper, req *types.ReadPreviousEvents) (*types.ReadPreviousEventsResponse, error) { var reqBody, resBody ReadPreviousEventsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReadPreviousTasksBody struct { Req *types.ReadPreviousTasks `xml:"urn:vim25 ReadPreviousTasks,omitempty"` Res *types.ReadPreviousTasksResponse `xml:"urn:vim25 ReadPreviousTasksResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReadPreviousTasksBody) Fault() *soap.Fault { return b.Fault_ } func ReadPreviousTasks(ctx context.Context, r soap.RoundTripper, req *types.ReadPreviousTasks) (*types.ReadPreviousTasksResponse, error) { var reqBody, resBody ReadPreviousTasksBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RebootGuestBody struct { Req *types.RebootGuest `xml:"urn:vim25 RebootGuest,omitempty"` Res *types.RebootGuestResponse `xml:"urn:vim25 RebootGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RebootGuestBody) Fault() *soap.Fault { return b.Fault_ } func RebootGuest(ctx context.Context, r soap.RoundTripper, req *types.RebootGuest) (*types.RebootGuestResponse, error) { var reqBody, resBody RebootGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RebootHost_TaskBody struct { Req *types.RebootHost_Task `xml:"urn:vim25 RebootHost_Task,omitempty"` Res *types.RebootHost_TaskResponse `xml:"urn:vim25 RebootHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RebootHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RebootHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RebootHost_Task) (*types.RebootHost_TaskResponse, error) { var reqBody, resBody RebootHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RecommendDatastoresBody struct { Req *types.RecommendDatastores `xml:"urn:vim25 RecommendDatastores,omitempty"` Res *types.RecommendDatastoresResponse `xml:"urn:vim25 RecommendDatastoresResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RecommendDatastoresBody) Fault() *soap.Fault { return b.Fault_ } func RecommendDatastores(ctx context.Context, r soap.RoundTripper, req *types.RecommendDatastores) (*types.RecommendDatastoresResponse, error) { var reqBody, resBody RecommendDatastoresBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RecommendHostsForVmBody struct { Req *types.RecommendHostsForVm `xml:"urn:vim25 RecommendHostsForVm,omitempty"` Res *types.RecommendHostsForVmResponse `xml:"urn:vim25 RecommendHostsForVmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RecommendHostsForVmBody) Fault() *soap.Fault { return b.Fault_ } func RecommendHostsForVm(ctx context.Context, r soap.RoundTripper, req *types.RecommendHostsForVm) (*types.RecommendHostsForVmResponse, error) { var reqBody, resBody RecommendHostsForVmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RecommissionVsanNode_TaskBody struct { Req *types.RecommissionVsanNode_Task `xml:"urn:vim25 RecommissionVsanNode_Task,omitempty"` Res *types.RecommissionVsanNode_TaskResponse `xml:"urn:vim25 RecommissionVsanNode_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RecommissionVsanNode_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RecommissionVsanNode_Task(ctx context.Context, r soap.RoundTripper, req *types.RecommissionVsanNode_Task) (*types.RecommissionVsanNode_TaskResponse, error) { var reqBody, resBody RecommissionVsanNode_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconcileDatastoreInventory_TaskBody struct { Req *types.ReconcileDatastoreInventory_Task `xml:"urn:vim25 ReconcileDatastoreInventory_Task,omitempty"` Res *types.ReconcileDatastoreInventory_TaskResponse `xml:"urn:vim25 ReconcileDatastoreInventory_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconcileDatastoreInventory_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconcileDatastoreInventory_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconcileDatastoreInventory_Task) (*types.ReconcileDatastoreInventory_TaskResponse, error) { var reqBody, resBody ReconcileDatastoreInventory_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigVM_TaskBody struct { Req *types.ReconfigVM_Task `xml:"urn:vim25 ReconfigVM_Task,omitempty"` Res *types.ReconfigVM_TaskResponse `xml:"urn:vim25 ReconfigVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigVM_Task) (*types.ReconfigVM_TaskResponse, error) { var reqBody, resBody ReconfigVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigurationSatisfiableBody struct { Req *types.ReconfigurationSatisfiable `xml:"urn:vim25 ReconfigurationSatisfiable,omitempty"` Res *types.ReconfigurationSatisfiableResponse `xml:"urn:vim25 ReconfigurationSatisfiableResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigurationSatisfiableBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigurationSatisfiable(ctx context.Context, r soap.RoundTripper, req *types.ReconfigurationSatisfiable) (*types.ReconfigurationSatisfiableResponse, error) { var reqBody, resBody ReconfigurationSatisfiableBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureAlarmBody struct { Req *types.ReconfigureAlarm `xml:"urn:vim25 ReconfigureAlarm,omitempty"` Res *types.ReconfigureAlarmResponse `xml:"urn:vim25 ReconfigureAlarmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureAlarmBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureAlarm(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureAlarm) (*types.ReconfigureAlarmResponse, error) { var reqBody, resBody ReconfigureAlarmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureAutostartBody struct { Req *types.ReconfigureAutostart `xml:"urn:vim25 ReconfigureAutostart,omitempty"` Res *types.ReconfigureAutostartResponse `xml:"urn:vim25 ReconfigureAutostartResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureAutostartBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureAutostart(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureAutostart) (*types.ReconfigureAutostartResponse, error) { var reqBody, resBody ReconfigureAutostartBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureCluster_TaskBody struct { Req *types.ReconfigureCluster_Task `xml:"urn:vim25 ReconfigureCluster_Task,omitempty"` Res *types.ReconfigureCluster_TaskResponse `xml:"urn:vim25 ReconfigureCluster_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureCluster_Task) (*types.ReconfigureCluster_TaskResponse, error) { var reqBody, resBody ReconfigureCluster_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureComputeResource_TaskBody struct { Req *types.ReconfigureComputeResource_Task `xml:"urn:vim25 ReconfigureComputeResource_Task,omitempty"` Res *types.ReconfigureComputeResource_TaskResponse `xml:"urn:vim25 ReconfigureComputeResource_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureComputeResource_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureComputeResource_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureComputeResource_Task) (*types.ReconfigureComputeResource_TaskResponse, error) { var reqBody, resBody ReconfigureComputeResource_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureDVPort_TaskBody struct { Req *types.ReconfigureDVPort_Task `xml:"urn:vim25 ReconfigureDVPort_Task,omitempty"` Res *types.ReconfigureDVPort_TaskResponse `xml:"urn:vim25 ReconfigureDVPort_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureDVPort_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureDVPort_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDVPort_Task) (*types.ReconfigureDVPort_TaskResponse, error) { var reqBody, resBody ReconfigureDVPort_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureDVPortgroup_TaskBody struct { Req *types.ReconfigureDVPortgroup_Task `xml:"urn:vim25 ReconfigureDVPortgroup_Task,omitempty"` Res *types.ReconfigureDVPortgroup_TaskResponse `xml:"urn:vim25 ReconfigureDVPortgroup_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDVPortgroup_Task) (*types.ReconfigureDVPortgroup_TaskResponse, error) { var reqBody, resBody ReconfigureDVPortgroup_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureDatacenter_TaskBody struct { Req *types.ReconfigureDatacenter_Task `xml:"urn:vim25 ReconfigureDatacenter_Task,omitempty"` Res *types.ReconfigureDatacenter_TaskResponse `xml:"urn:vim25 ReconfigureDatacenter_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureDatacenter_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureDatacenter_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDatacenter_Task) (*types.ReconfigureDatacenter_TaskResponse, error) { var reqBody, resBody ReconfigureDatacenter_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureDomObjectBody struct { Req *types.ReconfigureDomObject `xml:"urn:vim25 ReconfigureDomObject,omitempty"` Res *types.ReconfigureDomObjectResponse `xml:"urn:vim25 ReconfigureDomObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureDomObjectBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureDomObject(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDomObject) (*types.ReconfigureDomObjectResponse, error) { var reqBody, resBody ReconfigureDomObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureDvs_TaskBody struct { Req *types.ReconfigureDvs_Task `xml:"urn:vim25 ReconfigureDvs_Task,omitempty"` Res *types.ReconfigureDvs_TaskResponse `xml:"urn:vim25 ReconfigureDvs_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureDvs_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureDvs_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDvs_Task) (*types.ReconfigureDvs_TaskResponse, error) { var reqBody, resBody ReconfigureDvs_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureHostForDAS_TaskBody struct { Req *types.ReconfigureHostForDAS_Task `xml:"urn:vim25 ReconfigureHostForDAS_Task,omitempty"` Res *types.ReconfigureHostForDAS_TaskResponse `xml:"urn:vim25 ReconfigureHostForDAS_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureHostForDAS_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureHostForDAS_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureHostForDAS_Task) (*types.ReconfigureHostForDAS_TaskResponse, error) { var reqBody, resBody ReconfigureHostForDAS_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureScheduledTaskBody struct { Req *types.ReconfigureScheduledTask `xml:"urn:vim25 ReconfigureScheduledTask,omitempty"` Res *types.ReconfigureScheduledTaskResponse `xml:"urn:vim25 ReconfigureScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureScheduledTask) (*types.ReconfigureScheduledTaskResponse, error) { var reqBody, resBody ReconfigureScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureServiceConsoleReservationBody struct { Req *types.ReconfigureServiceConsoleReservation `xml:"urn:vim25 ReconfigureServiceConsoleReservation,omitempty"` Res *types.ReconfigureServiceConsoleReservationResponse `xml:"urn:vim25 ReconfigureServiceConsoleReservationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureServiceConsoleReservationBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureServiceConsoleReservation(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureServiceConsoleReservation) (*types.ReconfigureServiceConsoleReservationResponse, error) { var reqBody, resBody ReconfigureServiceConsoleReservationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureSnmpAgentBody struct { Req *types.ReconfigureSnmpAgent `xml:"urn:vim25 ReconfigureSnmpAgent,omitempty"` Res *types.ReconfigureSnmpAgentResponse `xml:"urn:vim25 ReconfigureSnmpAgentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureSnmpAgentBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureSnmpAgent(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureSnmpAgent) (*types.ReconfigureSnmpAgentResponse, error) { var reqBody, resBody ReconfigureSnmpAgentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconfigureVirtualMachineReservationBody struct { Req *types.ReconfigureVirtualMachineReservation `xml:"urn:vim25 ReconfigureVirtualMachineReservation,omitempty"` Res *types.ReconfigureVirtualMachineReservationResponse `xml:"urn:vim25 ReconfigureVirtualMachineReservationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconfigureVirtualMachineReservationBody) Fault() *soap.Fault { return b.Fault_ } func ReconfigureVirtualMachineReservation(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureVirtualMachineReservation) (*types.ReconfigureVirtualMachineReservationResponse, error) { var reqBody, resBody ReconfigureVirtualMachineReservationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReconnectHost_TaskBody struct { Req *types.ReconnectHost_Task `xml:"urn:vim25 ReconnectHost_Task,omitempty"` Res *types.ReconnectHost_TaskResponse `xml:"urn:vim25 ReconnectHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReconnectHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ReconnectHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconnectHost_Task) (*types.ReconnectHost_TaskResponse, error) { var reqBody, resBody ReconnectHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RectifyDvsHost_TaskBody struct { Req *types.RectifyDvsHost_Task `xml:"urn:vim25 RectifyDvsHost_Task,omitempty"` Res *types.RectifyDvsHost_TaskResponse `xml:"urn:vim25 RectifyDvsHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RectifyDvsHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RectifyDvsHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RectifyDvsHost_Task) (*types.RectifyDvsHost_TaskResponse, error) { var reqBody, resBody RectifyDvsHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RectifyDvsOnHost_TaskBody struct { Req *types.RectifyDvsOnHost_Task `xml:"urn:vim25 RectifyDvsOnHost_Task,omitempty"` Res *types.RectifyDvsOnHost_TaskResponse `xml:"urn:vim25 RectifyDvsOnHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RectifyDvsOnHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RectifyDvsOnHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RectifyDvsOnHost_Task) (*types.RectifyDvsOnHost_TaskResponse, error) { var reqBody, resBody RectifyDvsOnHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshBody struct { Req *types.Refresh `xml:"urn:vim25 Refresh,omitempty"` Res *types.RefreshResponse `xml:"urn:vim25 RefreshResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshBody) Fault() *soap.Fault { return b.Fault_ } func Refresh(ctx context.Context, r soap.RoundTripper, req *types.Refresh) (*types.RefreshResponse, error) { var reqBody, resBody RefreshBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshDVPortStateBody struct { Req *types.RefreshDVPortState `xml:"urn:vim25 RefreshDVPortState,omitempty"` Res *types.RefreshDVPortStateResponse `xml:"urn:vim25 RefreshDVPortStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshDVPortStateBody) Fault() *soap.Fault { return b.Fault_ } func RefreshDVPortState(ctx context.Context, r soap.RoundTripper, req *types.RefreshDVPortState) (*types.RefreshDVPortStateResponse, error) { var reqBody, resBody RefreshDVPortStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshDatastoreBody struct { Req *types.RefreshDatastore `xml:"urn:vim25 RefreshDatastore,omitempty"` Res *types.RefreshDatastoreResponse `xml:"urn:vim25 RefreshDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func RefreshDatastore(ctx context.Context, r soap.RoundTripper, req *types.RefreshDatastore) (*types.RefreshDatastoreResponse, error) { var reqBody, resBody RefreshDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshDatastoreStorageInfoBody struct { Req *types.RefreshDatastoreStorageInfo `xml:"urn:vim25 RefreshDatastoreStorageInfo,omitempty"` Res *types.RefreshDatastoreStorageInfoResponse `xml:"urn:vim25 RefreshDatastoreStorageInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshDatastoreStorageInfoBody) Fault() *soap.Fault { return b.Fault_ } func RefreshDatastoreStorageInfo(ctx context.Context, r soap.RoundTripper, req *types.RefreshDatastoreStorageInfo) (*types.RefreshDatastoreStorageInfoResponse, error) { var reqBody, resBody RefreshDatastoreStorageInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshDateTimeSystemBody struct { Req *types.RefreshDateTimeSystem `xml:"urn:vim25 RefreshDateTimeSystem,omitempty"` Res *types.RefreshDateTimeSystemResponse `xml:"urn:vim25 RefreshDateTimeSystemResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshDateTimeSystemBody) Fault() *soap.Fault { return b.Fault_ } func RefreshDateTimeSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshDateTimeSystem) (*types.RefreshDateTimeSystemResponse, error) { var reqBody, resBody RefreshDateTimeSystemBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshFirewallBody struct { Req *types.RefreshFirewall `xml:"urn:vim25 RefreshFirewall,omitempty"` Res *types.RefreshFirewallResponse `xml:"urn:vim25 RefreshFirewallResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshFirewallBody) Fault() *soap.Fault { return b.Fault_ } func RefreshFirewall(ctx context.Context, r soap.RoundTripper, req *types.RefreshFirewall) (*types.RefreshFirewallResponse, error) { var reqBody, resBody RefreshFirewallBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshGraphicsManagerBody struct { Req *types.RefreshGraphicsManager `xml:"urn:vim25 RefreshGraphicsManager,omitempty"` Res *types.RefreshGraphicsManagerResponse `xml:"urn:vim25 RefreshGraphicsManagerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshGraphicsManagerBody) Fault() *soap.Fault { return b.Fault_ } func RefreshGraphicsManager(ctx context.Context, r soap.RoundTripper, req *types.RefreshGraphicsManager) (*types.RefreshGraphicsManagerResponse, error) { var reqBody, resBody RefreshGraphicsManagerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshHealthStatusSystemBody struct { Req *types.RefreshHealthStatusSystem `xml:"urn:vim25 RefreshHealthStatusSystem,omitempty"` Res *types.RefreshHealthStatusSystemResponse `xml:"urn:vim25 RefreshHealthStatusSystemResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshHealthStatusSystemBody) Fault() *soap.Fault { return b.Fault_ } func RefreshHealthStatusSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshHealthStatusSystem) (*types.RefreshHealthStatusSystemResponse, error) { var reqBody, resBody RefreshHealthStatusSystemBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshNetworkSystemBody struct { Req *types.RefreshNetworkSystem `xml:"urn:vim25 RefreshNetworkSystem,omitempty"` Res *types.RefreshNetworkSystemResponse `xml:"urn:vim25 RefreshNetworkSystemResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshNetworkSystemBody) Fault() *soap.Fault { return b.Fault_ } func RefreshNetworkSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshNetworkSystem) (*types.RefreshNetworkSystemResponse, error) { var reqBody, resBody RefreshNetworkSystemBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshRecommendationBody struct { Req *types.RefreshRecommendation `xml:"urn:vim25 RefreshRecommendation,omitempty"` Res *types.RefreshRecommendationResponse `xml:"urn:vim25 RefreshRecommendationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshRecommendationBody) Fault() *soap.Fault { return b.Fault_ } func RefreshRecommendation(ctx context.Context, r soap.RoundTripper, req *types.RefreshRecommendation) (*types.RefreshRecommendationResponse, error) { var reqBody, resBody RefreshRecommendationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshRuntimeBody struct { Req *types.RefreshRuntime `xml:"urn:vim25 RefreshRuntime,omitempty"` Res *types.RefreshRuntimeResponse `xml:"urn:vim25 RefreshRuntimeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshRuntimeBody) Fault() *soap.Fault { return b.Fault_ } func RefreshRuntime(ctx context.Context, r soap.RoundTripper, req *types.RefreshRuntime) (*types.RefreshRuntimeResponse, error) { var reqBody, resBody RefreshRuntimeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshServicesBody struct { Req *types.RefreshServices `xml:"urn:vim25 RefreshServices,omitempty"` Res *types.RefreshServicesResponse `xml:"urn:vim25 RefreshServicesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshServicesBody) Fault() *soap.Fault { return b.Fault_ } func RefreshServices(ctx context.Context, r soap.RoundTripper, req *types.RefreshServices) (*types.RefreshServicesResponse, error) { var reqBody, resBody RefreshServicesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshStorageDrsRecommendationBody struct { Req *types.RefreshStorageDrsRecommendation `xml:"urn:vim25 RefreshStorageDrsRecommendation,omitempty"` Res *types.RefreshStorageDrsRecommendationResponse `xml:"urn:vim25 RefreshStorageDrsRecommendationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshStorageDrsRecommendationBody) Fault() *soap.Fault { return b.Fault_ } func RefreshStorageDrsRecommendation(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageDrsRecommendation) (*types.RefreshStorageDrsRecommendationResponse, error) { var reqBody, resBody RefreshStorageDrsRecommendationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshStorageInfoBody struct { Req *types.RefreshStorageInfo `xml:"urn:vim25 RefreshStorageInfo,omitempty"` Res *types.RefreshStorageInfoResponse `xml:"urn:vim25 RefreshStorageInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshStorageInfoBody) Fault() *soap.Fault { return b.Fault_ } func RefreshStorageInfo(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageInfo) (*types.RefreshStorageInfoResponse, error) { var reqBody, resBody RefreshStorageInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RefreshStorageSystemBody struct { Req *types.RefreshStorageSystem `xml:"urn:vim25 RefreshStorageSystem,omitempty"` Res *types.RefreshStorageSystemResponse `xml:"urn:vim25 RefreshStorageSystemResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RefreshStorageSystemBody) Fault() *soap.Fault { return b.Fault_ } func RefreshStorageSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageSystem) (*types.RefreshStorageSystemResponse, error) { var reqBody, resBody RefreshStorageSystemBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RegisterChildVM_TaskBody struct { Req *types.RegisterChildVM_Task `xml:"urn:vim25 RegisterChildVM_Task,omitempty"` Res *types.RegisterChildVM_TaskResponse `xml:"urn:vim25 RegisterChildVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RegisterChildVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RegisterChildVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RegisterChildVM_Task) (*types.RegisterChildVM_TaskResponse, error) { var reqBody, resBody RegisterChildVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RegisterDiskBody struct { Req *types.RegisterDisk `xml:"urn:vim25 RegisterDisk,omitempty"` Res *types.RegisterDiskResponse `xml:"urn:vim25 RegisterDiskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RegisterDiskBody) Fault() *soap.Fault { return b.Fault_ } func RegisterDisk(ctx context.Context, r soap.RoundTripper, req *types.RegisterDisk) (*types.RegisterDiskResponse, error) { var reqBody, resBody RegisterDiskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RegisterExtensionBody struct { Req *types.RegisterExtension `xml:"urn:vim25 RegisterExtension,omitempty"` Res *types.RegisterExtensionResponse `xml:"urn:vim25 RegisterExtensionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RegisterExtensionBody) Fault() *soap.Fault { return b.Fault_ } func RegisterExtension(ctx context.Context, r soap.RoundTripper, req *types.RegisterExtension) (*types.RegisterExtensionResponse, error) { var reqBody, resBody RegisterExtensionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RegisterHealthUpdateProviderBody struct { Req *types.RegisterHealthUpdateProvider `xml:"urn:vim25 RegisterHealthUpdateProvider,omitempty"` Res *types.RegisterHealthUpdateProviderResponse `xml:"urn:vim25 RegisterHealthUpdateProviderResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RegisterHealthUpdateProviderBody) Fault() *soap.Fault { return b.Fault_ } func RegisterHealthUpdateProvider(ctx context.Context, r soap.RoundTripper, req *types.RegisterHealthUpdateProvider) (*types.RegisterHealthUpdateProviderResponse, error) { var reqBody, resBody RegisterHealthUpdateProviderBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RegisterKmipServerBody struct { Req *types.RegisterKmipServer `xml:"urn:vim25 RegisterKmipServer,omitempty"` Res *types.RegisterKmipServerResponse `xml:"urn:vim25 RegisterKmipServerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RegisterKmipServerBody) Fault() *soap.Fault { return b.Fault_ } func RegisterKmipServer(ctx context.Context, r soap.RoundTripper, req *types.RegisterKmipServer) (*types.RegisterKmipServerResponse, error) { var reqBody, resBody RegisterKmipServerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RegisterVM_TaskBody struct { Req *types.RegisterVM_Task `xml:"urn:vim25 RegisterVM_Task,omitempty"` Res *types.RegisterVM_TaskResponse `xml:"urn:vim25 RegisterVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RegisterVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RegisterVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RegisterVM_Task) (*types.RegisterVM_TaskResponse, error) { var reqBody, resBody RegisterVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReleaseCredentialsInGuestBody struct { Req *types.ReleaseCredentialsInGuest `xml:"urn:vim25 ReleaseCredentialsInGuest,omitempty"` Res *types.ReleaseCredentialsInGuestResponse `xml:"urn:vim25 ReleaseCredentialsInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReleaseCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ReleaseCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.ReleaseCredentialsInGuest) (*types.ReleaseCredentialsInGuestResponse, error) { var reqBody, resBody ReleaseCredentialsInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReleaseIpAllocationBody struct { Req *types.ReleaseIpAllocation `xml:"urn:vim25 ReleaseIpAllocation,omitempty"` Res *types.ReleaseIpAllocationResponse `xml:"urn:vim25 ReleaseIpAllocationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReleaseIpAllocationBody) Fault() *soap.Fault { return b.Fault_ } func ReleaseIpAllocation(ctx context.Context, r soap.RoundTripper, req *types.ReleaseIpAllocation) (*types.ReleaseIpAllocationResponse, error) { var reqBody, resBody ReleaseIpAllocationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReleaseManagedSnapshotBody struct { Req *types.ReleaseManagedSnapshot `xml:"urn:vim25 ReleaseManagedSnapshot,omitempty"` Res *types.ReleaseManagedSnapshotResponse `xml:"urn:vim25 ReleaseManagedSnapshotResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReleaseManagedSnapshotBody) Fault() *soap.Fault { return b.Fault_ } func ReleaseManagedSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ReleaseManagedSnapshot) (*types.ReleaseManagedSnapshotResponse, error) { var reqBody, resBody ReleaseManagedSnapshotBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReloadBody struct { Req *types.Reload `xml:"urn:vim25 Reload,omitempty"` Res *types.ReloadResponse `xml:"urn:vim25 ReloadResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReloadBody) Fault() *soap.Fault { return b.Fault_ } func Reload(ctx context.Context, r soap.RoundTripper, req *types.Reload) (*types.ReloadResponse, error) { var reqBody, resBody ReloadBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RelocateVM_TaskBody struct { Req *types.RelocateVM_Task `xml:"urn:vim25 RelocateVM_Task,omitempty"` Res *types.RelocateVM_TaskResponse `xml:"urn:vim25 RelocateVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RelocateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RelocateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RelocateVM_Task) (*types.RelocateVM_TaskResponse, error) { var reqBody, resBody RelocateVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RelocateVStorageObject_TaskBody struct { Req *types.RelocateVStorageObject_Task `xml:"urn:vim25 RelocateVStorageObject_Task,omitempty"` Res *types.RelocateVStorageObject_TaskResponse `xml:"urn:vim25 RelocateVStorageObject_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RelocateVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RelocateVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.RelocateVStorageObject_Task) (*types.RelocateVStorageObject_TaskResponse, error) { var reqBody, resBody RelocateVStorageObject_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveAlarmBody struct { Req *types.RemoveAlarm `xml:"urn:vim25 RemoveAlarm,omitempty"` Res *types.RemoveAlarmResponse `xml:"urn:vim25 RemoveAlarmResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveAlarmBody) Fault() *soap.Fault { return b.Fault_ } func RemoveAlarm(ctx context.Context, r soap.RoundTripper, req *types.RemoveAlarm) (*types.RemoveAlarmResponse, error) { var reqBody, resBody RemoveAlarmBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveAllSnapshots_TaskBody struct { Req *types.RemoveAllSnapshots_Task `xml:"urn:vim25 RemoveAllSnapshots_Task,omitempty"` Res *types.RemoveAllSnapshots_TaskResponse `xml:"urn:vim25 RemoveAllSnapshots_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveAllSnapshots_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RemoveAllSnapshots_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveAllSnapshots_Task) (*types.RemoveAllSnapshots_TaskResponse, error) { var reqBody, resBody RemoveAllSnapshots_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveAssignedLicenseBody struct { Req *types.RemoveAssignedLicense `xml:"urn:vim25 RemoveAssignedLicense,omitempty"` Res *types.RemoveAssignedLicenseResponse `xml:"urn:vim25 RemoveAssignedLicenseResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveAssignedLicenseBody) Fault() *soap.Fault { return b.Fault_ } func RemoveAssignedLicense(ctx context.Context, r soap.RoundTripper, req *types.RemoveAssignedLicense) (*types.RemoveAssignedLicenseResponse, error) { var reqBody, resBody RemoveAssignedLicenseBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveAuthorizationRoleBody struct { Req *types.RemoveAuthorizationRole `xml:"urn:vim25 RemoveAuthorizationRole,omitempty"` Res *types.RemoveAuthorizationRoleResponse `xml:"urn:vim25 RemoveAuthorizationRoleResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ } func RemoveAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.RemoveAuthorizationRole) (*types.RemoveAuthorizationRoleResponse, error) { var reqBody, resBody RemoveAuthorizationRoleBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveCustomFieldDefBody struct { Req *types.RemoveCustomFieldDef `xml:"urn:vim25 RemoveCustomFieldDef,omitempty"` Res *types.RemoveCustomFieldDefResponse `xml:"urn:vim25 RemoveCustomFieldDefResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ } func RemoveCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.RemoveCustomFieldDef) (*types.RemoveCustomFieldDefResponse, error) { var reqBody, resBody RemoveCustomFieldDefBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveDatastoreBody struct { Req *types.RemoveDatastore `xml:"urn:vim25 RemoveDatastore,omitempty"` Res *types.RemoveDatastoreResponse `xml:"urn:vim25 RemoveDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func RemoveDatastore(ctx context.Context, r soap.RoundTripper, req *types.RemoveDatastore) (*types.RemoveDatastoreResponse, error) { var reqBody, resBody RemoveDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveDatastoreEx_TaskBody struct { Req *types.RemoveDatastoreEx_Task `xml:"urn:vim25 RemoveDatastoreEx_Task,omitempty"` Res *types.RemoveDatastoreEx_TaskResponse `xml:"urn:vim25 RemoveDatastoreEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveDatastoreEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RemoveDatastoreEx_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDatastoreEx_Task) (*types.RemoveDatastoreEx_TaskResponse, error) { var reqBody, resBody RemoveDatastoreEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveDiskMapping_TaskBody struct { Req *types.RemoveDiskMapping_Task `xml:"urn:vim25 RemoveDiskMapping_Task,omitempty"` Res *types.RemoveDiskMapping_TaskResponse `xml:"urn:vim25 RemoveDiskMapping_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveDiskMapping_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RemoveDiskMapping_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDiskMapping_Task) (*types.RemoveDiskMapping_TaskResponse, error) { var reqBody, resBody RemoveDiskMapping_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveDisk_TaskBody struct { Req *types.RemoveDisk_Task `xml:"urn:vim25 RemoveDisk_Task,omitempty"` Res *types.RemoveDisk_TaskResponse `xml:"urn:vim25 RemoveDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RemoveDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDisk_Task) (*types.RemoveDisk_TaskResponse, error) { var reqBody, resBody RemoveDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveEntityPermissionBody struct { Req *types.RemoveEntityPermission `xml:"urn:vim25 RemoveEntityPermission,omitempty"` Res *types.RemoveEntityPermissionResponse `xml:"urn:vim25 RemoveEntityPermissionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveEntityPermissionBody) Fault() *soap.Fault { return b.Fault_ } func RemoveEntityPermission(ctx context.Context, r soap.RoundTripper, req *types.RemoveEntityPermission) (*types.RemoveEntityPermissionResponse, error) { var reqBody, resBody RemoveEntityPermissionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveFilterBody struct { Req *types.RemoveFilter `xml:"urn:vim25 RemoveFilter,omitempty"` Res *types.RemoveFilterResponse `xml:"urn:vim25 RemoveFilterResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveFilterBody) Fault() *soap.Fault { return b.Fault_ } func RemoveFilter(ctx context.Context, r soap.RoundTripper, req *types.RemoveFilter) (*types.RemoveFilterResponse, error) { var reqBody, resBody RemoveFilterBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveFilterEntitiesBody struct { Req *types.RemoveFilterEntities `xml:"urn:vim25 RemoveFilterEntities,omitempty"` Res *types.RemoveFilterEntitiesResponse `xml:"urn:vim25 RemoveFilterEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func RemoveFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.RemoveFilterEntities) (*types.RemoveFilterEntitiesResponse, error) { var reqBody, resBody RemoveFilterEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveGroupBody struct { Req *types.RemoveGroup `xml:"urn:vim25 RemoveGroup,omitempty"` Res *types.RemoveGroupResponse `xml:"urn:vim25 RemoveGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveGroupBody) Fault() *soap.Fault { return b.Fault_ } func RemoveGroup(ctx context.Context, r soap.RoundTripper, req *types.RemoveGroup) (*types.RemoveGroupResponse, error) { var reqBody, resBody RemoveGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveGuestAliasBody struct { Req *types.RemoveGuestAlias `xml:"urn:vim25 RemoveGuestAlias,omitempty"` Res *types.RemoveGuestAliasResponse `xml:"urn:vim25 RemoveGuestAliasResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveGuestAliasBody) Fault() *soap.Fault { return b.Fault_ } func RemoveGuestAlias(ctx context.Context, r soap.RoundTripper, req *types.RemoveGuestAlias) (*types.RemoveGuestAliasResponse, error) { var reqBody, resBody RemoveGuestAliasBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveGuestAliasByCertBody struct { Req *types.RemoveGuestAliasByCert `xml:"urn:vim25 RemoveGuestAliasByCert,omitempty"` Res *types.RemoveGuestAliasByCertResponse `xml:"urn:vim25 RemoveGuestAliasByCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveGuestAliasByCertBody) Fault() *soap.Fault { return b.Fault_ } func RemoveGuestAliasByCert(ctx context.Context, r soap.RoundTripper, req *types.RemoveGuestAliasByCert) (*types.RemoveGuestAliasByCertResponse, error) { var reqBody, resBody RemoveGuestAliasByCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveInternetScsiSendTargetsBody struct { Req *types.RemoveInternetScsiSendTargets `xml:"urn:vim25 RemoveInternetScsiSendTargets,omitempty"` Res *types.RemoveInternetScsiSendTargetsResponse `xml:"urn:vim25 RemoveInternetScsiSendTargetsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveInternetScsiSendTargetsBody) Fault() *soap.Fault { return b.Fault_ } func RemoveInternetScsiSendTargets(ctx context.Context, r soap.RoundTripper, req *types.RemoveInternetScsiSendTargets) (*types.RemoveInternetScsiSendTargetsResponse, error) { var reqBody, resBody RemoveInternetScsiSendTargetsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveInternetScsiStaticTargetsBody struct { Req *types.RemoveInternetScsiStaticTargets `xml:"urn:vim25 RemoveInternetScsiStaticTargets,omitempty"` Res *types.RemoveInternetScsiStaticTargetsResponse `xml:"urn:vim25 RemoveInternetScsiStaticTargetsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveInternetScsiStaticTargetsBody) Fault() *soap.Fault { return b.Fault_ } func RemoveInternetScsiStaticTargets(ctx context.Context, r soap.RoundTripper, req *types.RemoveInternetScsiStaticTargets) (*types.RemoveInternetScsiStaticTargetsResponse, error) { var reqBody, resBody RemoveInternetScsiStaticTargetsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveKeyBody struct { Req *types.RemoveKey `xml:"urn:vim25 RemoveKey,omitempty"` Res *types.RemoveKeyResponse `xml:"urn:vim25 RemoveKeyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveKeyBody) Fault() *soap.Fault { return b.Fault_ } func RemoveKey(ctx context.Context, r soap.RoundTripper, req *types.RemoveKey) (*types.RemoveKeyResponse, error) { var reqBody, resBody RemoveKeyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveKeysBody struct { Req *types.RemoveKeys `xml:"urn:vim25 RemoveKeys,omitempty"` Res *types.RemoveKeysResponse `xml:"urn:vim25 RemoveKeysResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveKeysBody) Fault() *soap.Fault { return b.Fault_ } func RemoveKeys(ctx context.Context, r soap.RoundTripper, req *types.RemoveKeys) (*types.RemoveKeysResponse, error) { var reqBody, resBody RemoveKeysBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveKmipServerBody struct { Req *types.RemoveKmipServer `xml:"urn:vim25 RemoveKmipServer,omitempty"` Res *types.RemoveKmipServerResponse `xml:"urn:vim25 RemoveKmipServerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveKmipServerBody) Fault() *soap.Fault { return b.Fault_ } func RemoveKmipServer(ctx context.Context, r soap.RoundTripper, req *types.RemoveKmipServer) (*types.RemoveKmipServerResponse, error) { var reqBody, resBody RemoveKmipServerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveLicenseBody struct { Req *types.RemoveLicense `xml:"urn:vim25 RemoveLicense,omitempty"` Res *types.RemoveLicenseResponse `xml:"urn:vim25 RemoveLicenseResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveLicenseBody) Fault() *soap.Fault { return b.Fault_ } func RemoveLicense(ctx context.Context, r soap.RoundTripper, req *types.RemoveLicense) (*types.RemoveLicenseResponse, error) { var reqBody, resBody RemoveLicenseBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveLicenseLabelBody struct { Req *types.RemoveLicenseLabel `xml:"urn:vim25 RemoveLicenseLabel,omitempty"` Res *types.RemoveLicenseLabelResponse `xml:"urn:vim25 RemoveLicenseLabelResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveLicenseLabelBody) Fault() *soap.Fault { return b.Fault_ } func RemoveLicenseLabel(ctx context.Context, r soap.RoundTripper, req *types.RemoveLicenseLabel) (*types.RemoveLicenseLabelResponse, error) { var reqBody, resBody RemoveLicenseLabelBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveMonitoredEntitiesBody struct { Req *types.RemoveMonitoredEntities `xml:"urn:vim25 RemoveMonitoredEntities,omitempty"` Res *types.RemoveMonitoredEntitiesResponse `xml:"urn:vim25 RemoveMonitoredEntitiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ } func RemoveMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.RemoveMonitoredEntities) (*types.RemoveMonitoredEntitiesResponse, error) { var reqBody, resBody RemoveMonitoredEntitiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveNetworkResourcePoolBody struct { Req *types.RemoveNetworkResourcePool `xml:"urn:vim25 RemoveNetworkResourcePool,omitempty"` Res *types.RemoveNetworkResourcePoolResponse `xml:"urn:vim25 RemoveNetworkResourcePoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } func RemoveNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.RemoveNetworkResourcePool) (*types.RemoveNetworkResourcePoolResponse, error) { var reqBody, resBody RemoveNetworkResourcePoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemovePerfIntervalBody struct { Req *types.RemovePerfInterval `xml:"urn:vim25 RemovePerfInterval,omitempty"` Res *types.RemovePerfIntervalResponse `xml:"urn:vim25 RemovePerfIntervalResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemovePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ } func RemovePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.RemovePerfInterval) (*types.RemovePerfIntervalResponse, error) { var reqBody, resBody RemovePerfIntervalBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemovePortGroupBody struct { Req *types.RemovePortGroup `xml:"urn:vim25 RemovePortGroup,omitempty"` Res *types.RemovePortGroupResponse `xml:"urn:vim25 RemovePortGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemovePortGroupBody) Fault() *soap.Fault { return b.Fault_ } func RemovePortGroup(ctx context.Context, r soap.RoundTripper, req *types.RemovePortGroup) (*types.RemovePortGroupResponse, error) { var reqBody, resBody RemovePortGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveScheduledTaskBody struct { Req *types.RemoveScheduledTask `xml:"urn:vim25 RemoveScheduledTask,omitempty"` Res *types.RemoveScheduledTaskResponse `xml:"urn:vim25 RemoveScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func RemoveScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RemoveScheduledTask) (*types.RemoveScheduledTaskResponse, error) { var reqBody, resBody RemoveScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveServiceConsoleVirtualNicBody struct { Req *types.RemoveServiceConsoleVirtualNic `xml:"urn:vim25 RemoveServiceConsoleVirtualNic,omitempty"` Res *types.RemoveServiceConsoleVirtualNicResponse `xml:"urn:vim25 RemoveServiceConsoleVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func RemoveServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RemoveServiceConsoleVirtualNic) (*types.RemoveServiceConsoleVirtualNicResponse, error) { var reqBody, resBody RemoveServiceConsoleVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveSmartCardTrustAnchorBody struct { Req *types.RemoveSmartCardTrustAnchor `xml:"urn:vim25 RemoveSmartCardTrustAnchor,omitempty"` Res *types.RemoveSmartCardTrustAnchorResponse `xml:"urn:vim25 RemoveSmartCardTrustAnchorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveSmartCardTrustAnchorBody) Fault() *soap.Fault { return b.Fault_ } func RemoveSmartCardTrustAnchor(ctx context.Context, r soap.RoundTripper, req *types.RemoveSmartCardTrustAnchor) (*types.RemoveSmartCardTrustAnchorResponse, error) { var reqBody, resBody RemoveSmartCardTrustAnchorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveSmartCardTrustAnchorByFingerprintBody struct { Req *types.RemoveSmartCardTrustAnchorByFingerprint `xml:"urn:vim25 RemoveSmartCardTrustAnchorByFingerprint,omitempty"` Res *types.RemoveSmartCardTrustAnchorByFingerprintResponse `xml:"urn:vim25 RemoveSmartCardTrustAnchorByFingerprintResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveSmartCardTrustAnchorByFingerprintBody) Fault() *soap.Fault { return b.Fault_ } func RemoveSmartCardTrustAnchorByFingerprint(ctx context.Context, r soap.RoundTripper, req *types.RemoveSmartCardTrustAnchorByFingerprint) (*types.RemoveSmartCardTrustAnchorByFingerprintResponse, error) { var reqBody, resBody RemoveSmartCardTrustAnchorByFingerprintBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveSnapshot_TaskBody struct { Req *types.RemoveSnapshot_Task `xml:"urn:vim25 RemoveSnapshot_Task,omitempty"` Res *types.RemoveSnapshot_TaskResponse `xml:"urn:vim25 RemoveSnapshot_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RemoveSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveSnapshot_Task) (*types.RemoveSnapshot_TaskResponse, error) { var reqBody, resBody RemoveSnapshot_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveUserBody struct { Req *types.RemoveUser `xml:"urn:vim25 RemoveUser,omitempty"` Res *types.RemoveUserResponse `xml:"urn:vim25 RemoveUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveUserBody) Fault() *soap.Fault { return b.Fault_ } func RemoveUser(ctx context.Context, r soap.RoundTripper, req *types.RemoveUser) (*types.RemoveUserResponse, error) { var reqBody, resBody RemoveUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveVirtualNicBody struct { Req *types.RemoveVirtualNic `xml:"urn:vim25 RemoveVirtualNic,omitempty"` Res *types.RemoveVirtualNicResponse `xml:"urn:vim25 RemoveVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func RemoveVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RemoveVirtualNic) (*types.RemoveVirtualNicResponse, error) { var reqBody, resBody RemoveVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RemoveVirtualSwitchBody struct { Req *types.RemoveVirtualSwitch `xml:"urn:vim25 RemoveVirtualSwitch,omitempty"` Res *types.RemoveVirtualSwitchResponse `xml:"urn:vim25 RemoveVirtualSwitchResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RemoveVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ } func RemoveVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.RemoveVirtualSwitch) (*types.RemoveVirtualSwitchResponse, error) { var reqBody, resBody RemoveVirtualSwitchBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RenameCustomFieldDefBody struct { Req *types.RenameCustomFieldDef `xml:"urn:vim25 RenameCustomFieldDef,omitempty"` Res *types.RenameCustomFieldDefResponse `xml:"urn:vim25 RenameCustomFieldDefResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RenameCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ } func RenameCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.RenameCustomFieldDef) (*types.RenameCustomFieldDefResponse, error) { var reqBody, resBody RenameCustomFieldDefBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RenameCustomizationSpecBody struct { Req *types.RenameCustomizationSpec `xml:"urn:vim25 RenameCustomizationSpec,omitempty"` Res *types.RenameCustomizationSpecResponse `xml:"urn:vim25 RenameCustomizationSpecResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RenameCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } func RenameCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.RenameCustomizationSpec) (*types.RenameCustomizationSpecResponse, error) { var reqBody, resBody RenameCustomizationSpecBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RenameDatastoreBody struct { Req *types.RenameDatastore `xml:"urn:vim25 RenameDatastore,omitempty"` Res *types.RenameDatastoreResponse `xml:"urn:vim25 RenameDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RenameDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func RenameDatastore(ctx context.Context, r soap.RoundTripper, req *types.RenameDatastore) (*types.RenameDatastoreResponse, error) { var reqBody, resBody RenameDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RenameSnapshotBody struct { Req *types.RenameSnapshot `xml:"urn:vim25 RenameSnapshot,omitempty"` Res *types.RenameSnapshotResponse `xml:"urn:vim25 RenameSnapshotResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RenameSnapshotBody) Fault() *soap.Fault { return b.Fault_ } func RenameSnapshot(ctx context.Context, r soap.RoundTripper, req *types.RenameSnapshot) (*types.RenameSnapshotResponse, error) { var reqBody, resBody RenameSnapshotBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RenameVStorageObjectBody struct { Req *types.RenameVStorageObject `xml:"urn:vim25 RenameVStorageObject,omitempty"` Res *types.RenameVStorageObjectResponse `xml:"urn:vim25 RenameVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RenameVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func RenameVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.RenameVStorageObject) (*types.RenameVStorageObjectResponse, error) { var reqBody, resBody RenameVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type Rename_TaskBody struct { Req *types.Rename_Task `xml:"urn:vim25 Rename_Task,omitempty"` Res *types.Rename_TaskResponse `xml:"urn:vim25 Rename_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *Rename_TaskBody) Fault() *soap.Fault { return b.Fault_ } func Rename_Task(ctx context.Context, r soap.RoundTripper, req *types.Rename_Task) (*types.Rename_TaskResponse, error) { var reqBody, resBody Rename_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReplaceCACertificatesAndCRLsBody struct { Req *types.ReplaceCACertificatesAndCRLs `xml:"urn:vim25 ReplaceCACertificatesAndCRLs,omitempty"` Res *types.ReplaceCACertificatesAndCRLsResponse `xml:"urn:vim25 ReplaceCACertificatesAndCRLsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReplaceCACertificatesAndCRLsBody) Fault() *soap.Fault { return b.Fault_ } func ReplaceCACertificatesAndCRLs(ctx context.Context, r soap.RoundTripper, req *types.ReplaceCACertificatesAndCRLs) (*types.ReplaceCACertificatesAndCRLsResponse, error) { var reqBody, resBody ReplaceCACertificatesAndCRLsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ReplaceSmartCardTrustAnchorsBody struct { Req *types.ReplaceSmartCardTrustAnchors `xml:"urn:vim25 ReplaceSmartCardTrustAnchors,omitempty"` Res *types.ReplaceSmartCardTrustAnchorsResponse `xml:"urn:vim25 ReplaceSmartCardTrustAnchorsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ReplaceSmartCardTrustAnchorsBody) Fault() *soap.Fault { return b.Fault_ } func ReplaceSmartCardTrustAnchors(ctx context.Context, r soap.RoundTripper, req *types.ReplaceSmartCardTrustAnchors) (*types.ReplaceSmartCardTrustAnchorsResponse, error) { var reqBody, resBody ReplaceSmartCardTrustAnchorsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RescanAllHbaBody struct { Req *types.RescanAllHba `xml:"urn:vim25 RescanAllHba,omitempty"` Res *types.RescanAllHbaResponse `xml:"urn:vim25 RescanAllHbaResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RescanAllHbaBody) Fault() *soap.Fault { return b.Fault_ } func RescanAllHba(ctx context.Context, r soap.RoundTripper, req *types.RescanAllHba) (*types.RescanAllHbaResponse, error) { var reqBody, resBody RescanAllHbaBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RescanHbaBody struct { Req *types.RescanHba `xml:"urn:vim25 RescanHba,omitempty"` Res *types.RescanHbaResponse `xml:"urn:vim25 RescanHbaResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RescanHbaBody) Fault() *soap.Fault { return b.Fault_ } func RescanHba(ctx context.Context, r soap.RoundTripper, req *types.RescanHba) (*types.RescanHbaResponse, error) { var reqBody, resBody RescanHbaBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RescanVffsBody struct { Req *types.RescanVffs `xml:"urn:vim25 RescanVffs,omitempty"` Res *types.RescanVffsResponse `xml:"urn:vim25 RescanVffsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RescanVffsBody) Fault() *soap.Fault { return b.Fault_ } func RescanVffs(ctx context.Context, r soap.RoundTripper, req *types.RescanVffs) (*types.RescanVffsResponse, error) { var reqBody, resBody RescanVffsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RescanVmfsBody struct { Req *types.RescanVmfs `xml:"urn:vim25 RescanVmfs,omitempty"` Res *types.RescanVmfsResponse `xml:"urn:vim25 RescanVmfsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RescanVmfsBody) Fault() *soap.Fault { return b.Fault_ } func RescanVmfs(ctx context.Context, r soap.RoundTripper, req *types.RescanVmfs) (*types.RescanVmfsResponse, error) { var reqBody, resBody RescanVmfsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetCollectorBody struct { Req *types.ResetCollector `xml:"urn:vim25 ResetCollector,omitempty"` Res *types.ResetCollectorResponse `xml:"urn:vim25 ResetCollectorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetCollectorBody) Fault() *soap.Fault { return b.Fault_ } func ResetCollector(ctx context.Context, r soap.RoundTripper, req *types.ResetCollector) (*types.ResetCollectorResponse, error) { var reqBody, resBody ResetCollectorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetCounterLevelMappingBody struct { Req *types.ResetCounterLevelMapping `xml:"urn:vim25 ResetCounterLevelMapping,omitempty"` Res *types.ResetCounterLevelMappingResponse `xml:"urn:vim25 ResetCounterLevelMappingResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetCounterLevelMappingBody) Fault() *soap.Fault { return b.Fault_ } func ResetCounterLevelMapping(ctx context.Context, r soap.RoundTripper, req *types.ResetCounterLevelMapping) (*types.ResetCounterLevelMappingResponse, error) { var reqBody, resBody ResetCounterLevelMappingBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetEntityPermissionsBody struct { Req *types.ResetEntityPermissions `xml:"urn:vim25 ResetEntityPermissions,omitempty"` Res *types.ResetEntityPermissionsResponse `xml:"urn:vim25 ResetEntityPermissionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ } func ResetEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.ResetEntityPermissions) (*types.ResetEntityPermissionsResponse, error) { var reqBody, resBody ResetEntityPermissionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetFirmwareToFactoryDefaultsBody struct { Req *types.ResetFirmwareToFactoryDefaults `xml:"urn:vim25 ResetFirmwareToFactoryDefaults,omitempty"` Res *types.ResetFirmwareToFactoryDefaultsResponse `xml:"urn:vim25 ResetFirmwareToFactoryDefaultsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetFirmwareToFactoryDefaultsBody) Fault() *soap.Fault { return b.Fault_ } func ResetFirmwareToFactoryDefaults(ctx context.Context, r soap.RoundTripper, req *types.ResetFirmwareToFactoryDefaults) (*types.ResetFirmwareToFactoryDefaultsResponse, error) { var reqBody, resBody ResetFirmwareToFactoryDefaultsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetGuestInformationBody struct { Req *types.ResetGuestInformation `xml:"urn:vim25 ResetGuestInformation,omitempty"` Res *types.ResetGuestInformationResponse `xml:"urn:vim25 ResetGuestInformationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetGuestInformationBody) Fault() *soap.Fault { return b.Fault_ } func ResetGuestInformation(ctx context.Context, r soap.RoundTripper, req *types.ResetGuestInformation) (*types.ResetGuestInformationResponse, error) { var reqBody, resBody ResetGuestInformationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetListViewBody struct { Req *types.ResetListView `xml:"urn:vim25 ResetListView,omitempty"` Res *types.ResetListViewResponse `xml:"urn:vim25 ResetListViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetListViewBody) Fault() *soap.Fault { return b.Fault_ } func ResetListView(ctx context.Context, r soap.RoundTripper, req *types.ResetListView) (*types.ResetListViewResponse, error) { var reqBody, resBody ResetListViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetListViewFromViewBody struct { Req *types.ResetListViewFromView `xml:"urn:vim25 ResetListViewFromView,omitempty"` Res *types.ResetListViewFromViewResponse `xml:"urn:vim25 ResetListViewFromViewResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetListViewFromViewBody) Fault() *soap.Fault { return b.Fault_ } func ResetListViewFromView(ctx context.Context, r soap.RoundTripper, req *types.ResetListViewFromView) (*types.ResetListViewFromViewResponse, error) { var reqBody, resBody ResetListViewFromViewBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetSystemHealthInfoBody struct { Req *types.ResetSystemHealthInfo `xml:"urn:vim25 ResetSystemHealthInfo,omitempty"` Res *types.ResetSystemHealthInfoResponse `xml:"urn:vim25 ResetSystemHealthInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetSystemHealthInfoBody) Fault() *soap.Fault { return b.Fault_ } func ResetSystemHealthInfo(ctx context.Context, r soap.RoundTripper, req *types.ResetSystemHealthInfo) (*types.ResetSystemHealthInfoResponse, error) { var reqBody, resBody ResetSystemHealthInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResetVM_TaskBody struct { Req *types.ResetVM_Task `xml:"urn:vim25 ResetVM_Task,omitempty"` Res *types.ResetVM_TaskResponse `xml:"urn:vim25 ResetVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResetVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ResetVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ResetVM_Task) (*types.ResetVM_TaskResponse, error) { var reqBody, resBody ResetVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResignatureUnresolvedVmfsVolume_TaskBody struct { Req *types.ResignatureUnresolvedVmfsVolume_Task `xml:"urn:vim25 ResignatureUnresolvedVmfsVolume_Task,omitempty"` Res *types.ResignatureUnresolvedVmfsVolume_TaskResponse `xml:"urn:vim25 ResignatureUnresolvedVmfsVolume_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResignatureUnresolvedVmfsVolume_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ResignatureUnresolvedVmfsVolume_Task(ctx context.Context, r soap.RoundTripper, req *types.ResignatureUnresolvedVmfsVolume_Task) (*types.ResignatureUnresolvedVmfsVolume_TaskResponse, error) { var reqBody, resBody ResignatureUnresolvedVmfsVolume_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResolveInstallationErrorsOnCluster_TaskBody struct { Req *types.ResolveInstallationErrorsOnCluster_Task `xml:"urn:vim25 ResolveInstallationErrorsOnCluster_Task,omitempty"` Res *types.ResolveInstallationErrorsOnCluster_TaskResponse `xml:"urn:vim25 ResolveInstallationErrorsOnCluster_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResolveInstallationErrorsOnCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ResolveInstallationErrorsOnCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveInstallationErrorsOnCluster_Task) (*types.ResolveInstallationErrorsOnCluster_TaskResponse, error) { var reqBody, resBody ResolveInstallationErrorsOnCluster_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResolveInstallationErrorsOnHost_TaskBody struct { Req *types.ResolveInstallationErrorsOnHost_Task `xml:"urn:vim25 ResolveInstallationErrorsOnHost_Task,omitempty"` Res *types.ResolveInstallationErrorsOnHost_TaskResponse `xml:"urn:vim25 ResolveInstallationErrorsOnHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResolveInstallationErrorsOnHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ResolveInstallationErrorsOnHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveInstallationErrorsOnHost_Task) (*types.ResolveInstallationErrorsOnHost_TaskResponse, error) { var reqBody, resBody ResolveInstallationErrorsOnHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResolveMultipleUnresolvedVmfsVolumesBody struct { Req *types.ResolveMultipleUnresolvedVmfsVolumes `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumes,omitempty"` Res *types.ResolveMultipleUnresolvedVmfsVolumesResponse `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResolveMultipleUnresolvedVmfsVolumesBody) Fault() *soap.Fault { return b.Fault_ } func ResolveMultipleUnresolvedVmfsVolumes(ctx context.Context, r soap.RoundTripper, req *types.ResolveMultipleUnresolvedVmfsVolumes) (*types.ResolveMultipleUnresolvedVmfsVolumesResponse, error) { var reqBody, resBody ResolveMultipleUnresolvedVmfsVolumesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody struct { Req *types.ResolveMultipleUnresolvedVmfsVolumesEx_Task `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesEx_Task,omitempty"` Res *types.ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ResolveMultipleUnresolvedVmfsVolumesEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveMultipleUnresolvedVmfsVolumesEx_Task) (*types.ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse, error) { var reqBody, resBody ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RestartServiceBody struct { Req *types.RestartService `xml:"urn:vim25 RestartService,omitempty"` Res *types.RestartServiceResponse `xml:"urn:vim25 RestartServiceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RestartServiceBody) Fault() *soap.Fault { return b.Fault_ } func RestartService(ctx context.Context, r soap.RoundTripper, req *types.RestartService) (*types.RestartServiceResponse, error) { var reqBody, resBody RestartServiceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RestartServiceConsoleVirtualNicBody struct { Req *types.RestartServiceConsoleVirtualNic `xml:"urn:vim25 RestartServiceConsoleVirtualNic,omitempty"` Res *types.RestartServiceConsoleVirtualNicResponse `xml:"urn:vim25 RestartServiceConsoleVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RestartServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func RestartServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RestartServiceConsoleVirtualNic) (*types.RestartServiceConsoleVirtualNicResponse, error) { var reqBody, resBody RestartServiceConsoleVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RestoreFirmwareConfigurationBody struct { Req *types.RestoreFirmwareConfiguration `xml:"urn:vim25 RestoreFirmwareConfiguration,omitempty"` Res *types.RestoreFirmwareConfigurationResponse `xml:"urn:vim25 RestoreFirmwareConfigurationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RestoreFirmwareConfigurationBody) Fault() *soap.Fault { return b.Fault_ } func RestoreFirmwareConfiguration(ctx context.Context, r soap.RoundTripper, req *types.RestoreFirmwareConfiguration) (*types.RestoreFirmwareConfigurationResponse, error) { var reqBody, resBody RestoreFirmwareConfigurationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveAllPermissionsBody struct { Req *types.RetrieveAllPermissions `xml:"urn:vim25 RetrieveAllPermissions,omitempty"` Res *types.RetrieveAllPermissionsResponse `xml:"urn:vim25 RetrieveAllPermissionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveAllPermissionsBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveAllPermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAllPermissions) (*types.RetrieveAllPermissionsResponse, error) { var reqBody, resBody RetrieveAllPermissionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveAnswerFileBody struct { Req *types.RetrieveAnswerFile `xml:"urn:vim25 RetrieveAnswerFile,omitempty"` Res *types.RetrieveAnswerFileResponse `xml:"urn:vim25 RetrieveAnswerFileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveAnswerFileBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveAnswerFile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAnswerFile) (*types.RetrieveAnswerFileResponse, error) { var reqBody, resBody RetrieveAnswerFileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveAnswerFileForProfileBody struct { Req *types.RetrieveAnswerFileForProfile `xml:"urn:vim25 RetrieveAnswerFileForProfile,omitempty"` Res *types.RetrieveAnswerFileForProfileResponse `xml:"urn:vim25 RetrieveAnswerFileForProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveAnswerFileForProfileBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveAnswerFileForProfile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAnswerFileForProfile) (*types.RetrieveAnswerFileForProfileResponse, error) { var reqBody, resBody RetrieveAnswerFileForProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveArgumentDescriptionBody struct { Req *types.RetrieveArgumentDescription `xml:"urn:vim25 RetrieveArgumentDescription,omitempty"` Res *types.RetrieveArgumentDescriptionResponse `xml:"urn:vim25 RetrieveArgumentDescriptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveArgumentDescriptionBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveArgumentDescription(ctx context.Context, r soap.RoundTripper, req *types.RetrieveArgumentDescription) (*types.RetrieveArgumentDescriptionResponse, error) { var reqBody, resBody RetrieveArgumentDescriptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveClientCertBody struct { Req *types.RetrieveClientCert `xml:"urn:vim25 RetrieveClientCert,omitempty"` Res *types.RetrieveClientCertResponse `xml:"urn:vim25 RetrieveClientCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveClientCertBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveClientCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveClientCert) (*types.RetrieveClientCertResponse, error) { var reqBody, resBody RetrieveClientCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveClientCsrBody struct { Req *types.RetrieveClientCsr `xml:"urn:vim25 RetrieveClientCsr,omitempty"` Res *types.RetrieveClientCsrResponse `xml:"urn:vim25 RetrieveClientCsrResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveClientCsrBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveClientCsr(ctx context.Context, r soap.RoundTripper, req *types.RetrieveClientCsr) (*types.RetrieveClientCsrResponse, error) { var reqBody, resBody RetrieveClientCsrBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveDasAdvancedRuntimeInfoBody struct { Req *types.RetrieveDasAdvancedRuntimeInfo `xml:"urn:vim25 RetrieveDasAdvancedRuntimeInfo,omitempty"` Res *types.RetrieveDasAdvancedRuntimeInfoResponse `xml:"urn:vim25 RetrieveDasAdvancedRuntimeInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveDasAdvancedRuntimeInfoBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveDasAdvancedRuntimeInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDasAdvancedRuntimeInfo) (*types.RetrieveDasAdvancedRuntimeInfoResponse, error) { var reqBody, resBody RetrieveDasAdvancedRuntimeInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveDescriptionBody struct { Req *types.RetrieveDescription `xml:"urn:vim25 RetrieveDescription,omitempty"` Res *types.RetrieveDescriptionResponse `xml:"urn:vim25 RetrieveDescriptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveDescriptionBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveDescription(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDescription) (*types.RetrieveDescriptionResponse, error) { var reqBody, resBody RetrieveDescriptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveDiskPartitionInfoBody struct { Req *types.RetrieveDiskPartitionInfo `xml:"urn:vim25 RetrieveDiskPartitionInfo,omitempty"` Res *types.RetrieveDiskPartitionInfoResponse `xml:"urn:vim25 RetrieveDiskPartitionInfoResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveDiskPartitionInfoBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveDiskPartitionInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDiskPartitionInfo) (*types.RetrieveDiskPartitionInfoResponse, error) { var reqBody, resBody RetrieveDiskPartitionInfoBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveEntityPermissionsBody struct { Req *types.RetrieveEntityPermissions `xml:"urn:vim25 RetrieveEntityPermissions,omitempty"` Res *types.RetrieveEntityPermissionsResponse `xml:"urn:vim25 RetrieveEntityPermissionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveEntityPermissions) (*types.RetrieveEntityPermissionsResponse, error) { var reqBody, resBody RetrieveEntityPermissionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveEntityScheduledTaskBody struct { Req *types.RetrieveEntityScheduledTask `xml:"urn:vim25 RetrieveEntityScheduledTask,omitempty"` Res *types.RetrieveEntityScheduledTaskResponse `xml:"urn:vim25 RetrieveEntityScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveEntityScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveEntityScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RetrieveEntityScheduledTask) (*types.RetrieveEntityScheduledTaskResponse, error) { var reqBody, resBody RetrieveEntityScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveHardwareUptimeBody struct { Req *types.RetrieveHardwareUptime `xml:"urn:vim25 RetrieveHardwareUptime,omitempty"` Res *types.RetrieveHardwareUptimeResponse `xml:"urn:vim25 RetrieveHardwareUptimeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveHardwareUptimeBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveHardwareUptime(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHardwareUptime) (*types.RetrieveHardwareUptimeResponse, error) { var reqBody, resBody RetrieveHardwareUptimeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveHostAccessControlEntriesBody struct { Req *types.RetrieveHostAccessControlEntries `xml:"urn:vim25 RetrieveHostAccessControlEntries,omitempty"` Res *types.RetrieveHostAccessControlEntriesResponse `xml:"urn:vim25 RetrieveHostAccessControlEntriesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveHostAccessControlEntriesBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveHostAccessControlEntries(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostAccessControlEntries) (*types.RetrieveHostAccessControlEntriesResponse, error) { var reqBody, resBody RetrieveHostAccessControlEntriesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveHostCustomizationsBody struct { Req *types.RetrieveHostCustomizations `xml:"urn:vim25 RetrieveHostCustomizations,omitempty"` Res *types.RetrieveHostCustomizationsResponse `xml:"urn:vim25 RetrieveHostCustomizationsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveHostCustomizationsBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveHostCustomizations(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostCustomizations) (*types.RetrieveHostCustomizationsResponse, error) { var reqBody, resBody RetrieveHostCustomizationsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveHostCustomizationsForProfileBody struct { Req *types.RetrieveHostCustomizationsForProfile `xml:"urn:vim25 RetrieveHostCustomizationsForProfile,omitempty"` Res *types.RetrieveHostCustomizationsForProfileResponse `xml:"urn:vim25 RetrieveHostCustomizationsForProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveHostCustomizationsForProfileBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveHostCustomizationsForProfile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostCustomizationsForProfile) (*types.RetrieveHostCustomizationsForProfileResponse, error) { var reqBody, resBody RetrieveHostCustomizationsForProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveHostSpecificationBody struct { Req *types.RetrieveHostSpecification `xml:"urn:vim25 RetrieveHostSpecification,omitempty"` Res *types.RetrieveHostSpecificationResponse `xml:"urn:vim25 RetrieveHostSpecificationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostSpecification) (*types.RetrieveHostSpecificationResponse, error) { var reqBody, resBody RetrieveHostSpecificationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveKmipServerCertBody struct { Req *types.RetrieveKmipServerCert `xml:"urn:vim25 RetrieveKmipServerCert,omitempty"` Res *types.RetrieveKmipServerCertResponse `xml:"urn:vim25 RetrieveKmipServerCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveKmipServerCertBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveKmipServerCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveKmipServerCert) (*types.RetrieveKmipServerCertResponse, error) { var reqBody, resBody RetrieveKmipServerCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveKmipServersStatus_TaskBody struct { Req *types.RetrieveKmipServersStatus_Task `xml:"urn:vim25 RetrieveKmipServersStatus_Task,omitempty"` Res *types.RetrieveKmipServersStatus_TaskResponse `xml:"urn:vim25 RetrieveKmipServersStatus_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveKmipServersStatus_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveKmipServersStatus_Task(ctx context.Context, r soap.RoundTripper, req *types.RetrieveKmipServersStatus_Task) (*types.RetrieveKmipServersStatus_TaskResponse, error) { var reqBody, resBody RetrieveKmipServersStatus_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveObjectScheduledTaskBody struct { Req *types.RetrieveObjectScheduledTask `xml:"urn:vim25 RetrieveObjectScheduledTask,omitempty"` Res *types.RetrieveObjectScheduledTaskResponse `xml:"urn:vim25 RetrieveObjectScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveObjectScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveObjectScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RetrieveObjectScheduledTask) (*types.RetrieveObjectScheduledTaskResponse, error) { var reqBody, resBody RetrieveObjectScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveProductComponentsBody struct { Req *types.RetrieveProductComponents `xml:"urn:vim25 RetrieveProductComponents,omitempty"` Res *types.RetrieveProductComponentsResponse `xml:"urn:vim25 RetrieveProductComponentsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveProductComponentsBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveProductComponents(ctx context.Context, r soap.RoundTripper, req *types.RetrieveProductComponents) (*types.RetrieveProductComponentsResponse, error) { var reqBody, resBody RetrieveProductComponentsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrievePropertiesBody struct { Req *types.RetrieveProperties `xml:"urn:vim25 RetrieveProperties,omitempty"` Res *types.RetrievePropertiesResponse `xml:"urn:vim25 RetrievePropertiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrievePropertiesBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveProperties(ctx context.Context, r soap.RoundTripper, req *types.RetrieveProperties) (*types.RetrievePropertiesResponse, error) { var reqBody, resBody RetrievePropertiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrievePropertiesExBody struct { Req *types.RetrievePropertiesEx `xml:"urn:vim25 RetrievePropertiesEx,omitempty"` Res *types.RetrievePropertiesExResponse `xml:"urn:vim25 RetrievePropertiesExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ } func RetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.RetrievePropertiesEx) (*types.RetrievePropertiesExResponse, error) { var reqBody, resBody RetrievePropertiesExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveRolePermissionsBody struct { Req *types.RetrieveRolePermissions `xml:"urn:vim25 RetrieveRolePermissions,omitempty"` Res *types.RetrieveRolePermissionsResponse `xml:"urn:vim25 RetrieveRolePermissionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveRolePermissionsBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveRolePermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveRolePermissions) (*types.RetrieveRolePermissionsResponse, error) { var reqBody, resBody RetrieveRolePermissionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveSelfSignedClientCertBody struct { Req *types.RetrieveSelfSignedClientCert `xml:"urn:vim25 RetrieveSelfSignedClientCert,omitempty"` Res *types.RetrieveSelfSignedClientCertResponse `xml:"urn:vim25 RetrieveSelfSignedClientCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveSelfSignedClientCert) (*types.RetrieveSelfSignedClientCertResponse, error) { var reqBody, resBody RetrieveSelfSignedClientCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveServiceContentBody struct { Req *types.RetrieveServiceContent `xml:"urn:vim25 RetrieveServiceContent,omitempty"` Res *types.RetrieveServiceContentResponse `xml:"urn:vim25 RetrieveServiceContentResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveServiceContentBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveServiceContent(ctx context.Context, r soap.RoundTripper, req *types.RetrieveServiceContent) (*types.RetrieveServiceContentResponse, error) { var reqBody, resBody RetrieveServiceContentBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveUserGroupsBody struct { Req *types.RetrieveUserGroups `xml:"urn:vim25 RetrieveUserGroups,omitempty"` Res *types.RetrieveUserGroupsResponse `xml:"urn:vim25 RetrieveUserGroupsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveUserGroupsBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveUserGroups(ctx context.Context, r soap.RoundTripper, req *types.RetrieveUserGroups) (*types.RetrieveUserGroupsResponse, error) { var reqBody, resBody RetrieveUserGroupsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveVStorageObjectBody struct { Req *types.RetrieveVStorageObject `xml:"urn:vim25 RetrieveVStorageObject,omitempty"` Res *types.RetrieveVStorageObjectResponse `xml:"urn:vim25 RetrieveVStorageObjectResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObject) (*types.RetrieveVStorageObjectResponse, error) { var reqBody, resBody RetrieveVStorageObjectBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RetrieveVStorageObjectStateBody struct { Req *types.RetrieveVStorageObjectState `xml:"urn:vim25 RetrieveVStorageObjectState,omitempty"` Res *types.RetrieveVStorageObjectStateResponse `xml:"urn:vim25 RetrieveVStorageObjectStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RetrieveVStorageObjectStateBody) Fault() *soap.Fault { return b.Fault_ } func RetrieveVStorageObjectState(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObjectState) (*types.RetrieveVStorageObjectStateResponse, error) { var reqBody, resBody RetrieveVStorageObjectStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RevertToCurrentSnapshot_TaskBody struct { Req *types.RevertToCurrentSnapshot_Task `xml:"urn:vim25 RevertToCurrentSnapshot_Task,omitempty"` Res *types.RevertToCurrentSnapshot_TaskResponse `xml:"urn:vim25 RevertToCurrentSnapshot_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RevertToCurrentSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RevertToCurrentSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertToCurrentSnapshot_Task) (*types.RevertToCurrentSnapshot_TaskResponse, error) { var reqBody, resBody RevertToCurrentSnapshot_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RevertToSnapshot_TaskBody struct { Req *types.RevertToSnapshot_Task `xml:"urn:vim25 RevertToSnapshot_Task,omitempty"` Res *types.RevertToSnapshot_TaskResponse `xml:"urn:vim25 RevertToSnapshot_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RevertToSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } func RevertToSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertToSnapshot_Task) (*types.RevertToSnapshot_TaskResponse, error) { var reqBody, resBody RevertToSnapshot_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RewindCollectorBody struct { Req *types.RewindCollector `xml:"urn:vim25 RewindCollector,omitempty"` Res *types.RewindCollectorResponse `xml:"urn:vim25 RewindCollectorResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RewindCollectorBody) Fault() *soap.Fault { return b.Fault_ } func RewindCollector(ctx context.Context, r soap.RoundTripper, req *types.RewindCollector) (*types.RewindCollectorResponse, error) { var reqBody, resBody RewindCollectorBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RunScheduledTaskBody struct { Req *types.RunScheduledTask `xml:"urn:vim25 RunScheduledTask,omitempty"` Res *types.RunScheduledTaskResponse `xml:"urn:vim25 RunScheduledTaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RunScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } func RunScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RunScheduledTask) (*types.RunScheduledTaskResponse, error) { var reqBody, resBody RunScheduledTaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type RunVsanPhysicalDiskDiagnosticsBody struct { Req *types.RunVsanPhysicalDiskDiagnostics `xml:"urn:vim25 RunVsanPhysicalDiskDiagnostics,omitempty"` Res *types.RunVsanPhysicalDiskDiagnosticsResponse `xml:"urn:vim25 RunVsanPhysicalDiskDiagnosticsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *RunVsanPhysicalDiskDiagnosticsBody) Fault() *soap.Fault { return b.Fault_ } func RunVsanPhysicalDiskDiagnostics(ctx context.Context, r soap.RoundTripper, req *types.RunVsanPhysicalDiskDiagnostics) (*types.RunVsanPhysicalDiskDiagnosticsResponse, error) { var reqBody, resBody RunVsanPhysicalDiskDiagnosticsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ScanHostPatchV2_TaskBody struct { Req *types.ScanHostPatchV2_Task `xml:"urn:vim25 ScanHostPatchV2_Task,omitempty"` Res *types.ScanHostPatchV2_TaskResponse `xml:"urn:vim25 ScanHostPatchV2_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ScanHostPatchV2_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ScanHostPatchV2_Task(ctx context.Context, r soap.RoundTripper, req *types.ScanHostPatchV2_Task) (*types.ScanHostPatchV2_TaskResponse, error) { var reqBody, resBody ScanHostPatchV2_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ScanHostPatch_TaskBody struct { Req *types.ScanHostPatch_Task `xml:"urn:vim25 ScanHostPatch_Task,omitempty"` Res *types.ScanHostPatch_TaskResponse `xml:"urn:vim25 ScanHostPatch_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ScanHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ScanHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.ScanHostPatch_Task) (*types.ScanHostPatch_TaskResponse, error) { var reqBody, resBody ScanHostPatch_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ScheduleReconcileDatastoreInventoryBody struct { Req *types.ScheduleReconcileDatastoreInventory `xml:"urn:vim25 ScheduleReconcileDatastoreInventory,omitempty"` Res *types.ScheduleReconcileDatastoreInventoryResponse `xml:"urn:vim25 ScheduleReconcileDatastoreInventoryResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ScheduleReconcileDatastoreInventoryBody) Fault() *soap.Fault { return b.Fault_ } func ScheduleReconcileDatastoreInventory(ctx context.Context, r soap.RoundTripper, req *types.ScheduleReconcileDatastoreInventory) (*types.ScheduleReconcileDatastoreInventoryResponse, error) { var reqBody, resBody ScheduleReconcileDatastoreInventoryBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SearchDatastoreSubFolders_TaskBody struct { Req *types.SearchDatastoreSubFolders_Task `xml:"urn:vim25 SearchDatastoreSubFolders_Task,omitempty"` Res *types.SearchDatastoreSubFolders_TaskResponse `xml:"urn:vim25 SearchDatastoreSubFolders_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SearchDatastoreSubFolders_TaskBody) Fault() *soap.Fault { return b.Fault_ } func SearchDatastoreSubFolders_Task(ctx context.Context, r soap.RoundTripper, req *types.SearchDatastoreSubFolders_Task) (*types.SearchDatastoreSubFolders_TaskResponse, error) { var reqBody, resBody SearchDatastoreSubFolders_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SearchDatastore_TaskBody struct { Req *types.SearchDatastore_Task `xml:"urn:vim25 SearchDatastore_Task,omitempty"` Res *types.SearchDatastore_TaskResponse `xml:"urn:vim25 SearchDatastore_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SearchDatastore_TaskBody) Fault() *soap.Fault { return b.Fault_ } func SearchDatastore_Task(ctx context.Context, r soap.RoundTripper, req *types.SearchDatastore_Task) (*types.SearchDatastore_TaskResponse, error) { var reqBody, resBody SearchDatastore_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SelectActivePartitionBody struct { Req *types.SelectActivePartition `xml:"urn:vim25 SelectActivePartition,omitempty"` Res *types.SelectActivePartitionResponse `xml:"urn:vim25 SelectActivePartitionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SelectActivePartitionBody) Fault() *soap.Fault { return b.Fault_ } func SelectActivePartition(ctx context.Context, r soap.RoundTripper, req *types.SelectActivePartition) (*types.SelectActivePartitionResponse, error) { var reqBody, resBody SelectActivePartitionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SelectVnicBody struct { Req *types.SelectVnic `xml:"urn:vim25 SelectVnic,omitempty"` Res *types.SelectVnicResponse `xml:"urn:vim25 SelectVnicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SelectVnicBody) Fault() *soap.Fault { return b.Fault_ } func SelectVnic(ctx context.Context, r soap.RoundTripper, req *types.SelectVnic) (*types.SelectVnicResponse, error) { var reqBody, resBody SelectVnicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SelectVnicForNicTypeBody struct { Req *types.SelectVnicForNicType `xml:"urn:vim25 SelectVnicForNicType,omitempty"` Res *types.SelectVnicForNicTypeResponse `xml:"urn:vim25 SelectVnicForNicTypeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SelectVnicForNicTypeBody) Fault() *soap.Fault { return b.Fault_ } func SelectVnicForNicType(ctx context.Context, r soap.RoundTripper, req *types.SelectVnicForNicType) (*types.SelectVnicForNicTypeResponse, error) { var reqBody, resBody SelectVnicForNicTypeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SendNMIBody struct { Req *types.SendNMI `xml:"urn:vim25 SendNMI,omitempty"` Res *types.SendNMIResponse `xml:"urn:vim25 SendNMIResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SendNMIBody) Fault() *soap.Fault { return b.Fault_ } func SendNMI(ctx context.Context, r soap.RoundTripper, req *types.SendNMI) (*types.SendNMIResponse, error) { var reqBody, resBody SendNMIBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SendTestNotificationBody struct { Req *types.SendTestNotification `xml:"urn:vim25 SendTestNotification,omitempty"` Res *types.SendTestNotificationResponse `xml:"urn:vim25 SendTestNotificationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SendTestNotificationBody) Fault() *soap.Fault { return b.Fault_ } func SendTestNotification(ctx context.Context, r soap.RoundTripper, req *types.SendTestNotification) (*types.SendTestNotificationResponse, error) { var reqBody, resBody SendTestNotificationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SessionIsActiveBody struct { Req *types.SessionIsActive `xml:"urn:vim25 SessionIsActive,omitempty"` Res *types.SessionIsActiveResponse `xml:"urn:vim25 SessionIsActiveResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SessionIsActiveBody) Fault() *soap.Fault { return b.Fault_ } func SessionIsActive(ctx context.Context, r soap.RoundTripper, req *types.SessionIsActive) (*types.SessionIsActiveResponse, error) { var reqBody, resBody SessionIsActiveBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetCollectorPageSizeBody struct { Req *types.SetCollectorPageSize `xml:"urn:vim25 SetCollectorPageSize,omitempty"` Res *types.SetCollectorPageSizeResponse `xml:"urn:vim25 SetCollectorPageSizeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetCollectorPageSizeBody) Fault() *soap.Fault { return b.Fault_ } func SetCollectorPageSize(ctx context.Context, r soap.RoundTripper, req *types.SetCollectorPageSize) (*types.SetCollectorPageSizeResponse, error) { var reqBody, resBody SetCollectorPageSizeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetDisplayTopologyBody struct { Req *types.SetDisplayTopology `xml:"urn:vim25 SetDisplayTopology,omitempty"` Res *types.SetDisplayTopologyResponse `xml:"urn:vim25 SetDisplayTopologyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetDisplayTopologyBody) Fault() *soap.Fault { return b.Fault_ } func SetDisplayTopology(ctx context.Context, r soap.RoundTripper, req *types.SetDisplayTopology) (*types.SetDisplayTopologyResponse, error) { var reqBody, resBody SetDisplayTopologyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetEntityPermissionsBody struct { Req *types.SetEntityPermissions `xml:"urn:vim25 SetEntityPermissions,omitempty"` Res *types.SetEntityPermissionsResponse `xml:"urn:vim25 SetEntityPermissionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ } func SetEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.SetEntityPermissions) (*types.SetEntityPermissionsResponse, error) { var reqBody, resBody SetEntityPermissionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetExtensionCertificateBody struct { Req *types.SetExtensionCertificate `xml:"urn:vim25 SetExtensionCertificate,omitempty"` Res *types.SetExtensionCertificateResponse `xml:"urn:vim25 SetExtensionCertificateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetExtensionCertificateBody) Fault() *soap.Fault { return b.Fault_ } func SetExtensionCertificate(ctx context.Context, r soap.RoundTripper, req *types.SetExtensionCertificate) (*types.SetExtensionCertificateResponse, error) { var reqBody, resBody SetExtensionCertificateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetFieldBody struct { Req *types.SetField `xml:"urn:vim25 SetField,omitempty"` Res *types.SetFieldResponse `xml:"urn:vim25 SetFieldResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetFieldBody) Fault() *soap.Fault { return b.Fault_ } func SetField(ctx context.Context, r soap.RoundTripper, req *types.SetField) (*types.SetFieldResponse, error) { var reqBody, resBody SetFieldBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetLicenseEditionBody struct { Req *types.SetLicenseEdition `xml:"urn:vim25 SetLicenseEdition,omitempty"` Res *types.SetLicenseEditionResponse `xml:"urn:vim25 SetLicenseEditionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetLicenseEditionBody) Fault() *soap.Fault { return b.Fault_ } func SetLicenseEdition(ctx context.Context, r soap.RoundTripper, req *types.SetLicenseEdition) (*types.SetLicenseEditionResponse, error) { var reqBody, resBody SetLicenseEditionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetLocaleBody struct { Req *types.SetLocale `xml:"urn:vim25 SetLocale,omitempty"` Res *types.SetLocaleResponse `xml:"urn:vim25 SetLocaleResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetLocaleBody) Fault() *soap.Fault { return b.Fault_ } func SetLocale(ctx context.Context, r soap.RoundTripper, req *types.SetLocale) (*types.SetLocaleResponse, error) { var reqBody, resBody SetLocaleBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetMultipathLunPolicyBody struct { Req *types.SetMultipathLunPolicy `xml:"urn:vim25 SetMultipathLunPolicy,omitempty"` Res *types.SetMultipathLunPolicyResponse `xml:"urn:vim25 SetMultipathLunPolicyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetMultipathLunPolicyBody) Fault() *soap.Fault { return b.Fault_ } func SetMultipathLunPolicy(ctx context.Context, r soap.RoundTripper, req *types.SetMultipathLunPolicy) (*types.SetMultipathLunPolicyResponse, error) { var reqBody, resBody SetMultipathLunPolicyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetNFSUserBody struct { Req *types.SetNFSUser `xml:"urn:vim25 SetNFSUser,omitempty"` Res *types.SetNFSUserResponse `xml:"urn:vim25 SetNFSUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetNFSUserBody) Fault() *soap.Fault { return b.Fault_ } func SetNFSUser(ctx context.Context, r soap.RoundTripper, req *types.SetNFSUser) (*types.SetNFSUserResponse, error) { var reqBody, resBody SetNFSUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetPublicKeyBody struct { Req *types.SetPublicKey `xml:"urn:vim25 SetPublicKey,omitempty"` Res *types.SetPublicKeyResponse `xml:"urn:vim25 SetPublicKeyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetPublicKeyBody) Fault() *soap.Fault { return b.Fault_ } func SetPublicKey(ctx context.Context, r soap.RoundTripper, req *types.SetPublicKey) (*types.SetPublicKeyResponse, error) { var reqBody, resBody SetPublicKeyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetRegistryValueInGuestBody struct { Req *types.SetRegistryValueInGuest `xml:"urn:vim25 SetRegistryValueInGuest,omitempty"` Res *types.SetRegistryValueInGuestResponse `xml:"urn:vim25 SetRegistryValueInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetRegistryValueInGuestBody) Fault() *soap.Fault { return b.Fault_ } func SetRegistryValueInGuest(ctx context.Context, r soap.RoundTripper, req *types.SetRegistryValueInGuest) (*types.SetRegistryValueInGuestResponse, error) { var reqBody, resBody SetRegistryValueInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetScreenResolutionBody struct { Req *types.SetScreenResolution `xml:"urn:vim25 SetScreenResolution,omitempty"` Res *types.SetScreenResolutionResponse `xml:"urn:vim25 SetScreenResolutionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetScreenResolutionBody) Fault() *soap.Fault { return b.Fault_ } func SetScreenResolution(ctx context.Context, r soap.RoundTripper, req *types.SetScreenResolution) (*types.SetScreenResolutionResponse, error) { var reqBody, resBody SetScreenResolutionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetTaskDescriptionBody struct { Req *types.SetTaskDescription `xml:"urn:vim25 SetTaskDescription,omitempty"` Res *types.SetTaskDescriptionResponse `xml:"urn:vim25 SetTaskDescriptionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetTaskDescriptionBody) Fault() *soap.Fault { return b.Fault_ } func SetTaskDescription(ctx context.Context, r soap.RoundTripper, req *types.SetTaskDescription) (*types.SetTaskDescriptionResponse, error) { var reqBody, resBody SetTaskDescriptionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetTaskStateBody struct { Req *types.SetTaskState `xml:"urn:vim25 SetTaskState,omitempty"` Res *types.SetTaskStateResponse `xml:"urn:vim25 SetTaskStateResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetTaskStateBody) Fault() *soap.Fault { return b.Fault_ } func SetTaskState(ctx context.Context, r soap.RoundTripper, req *types.SetTaskState) (*types.SetTaskStateResponse, error) { var reqBody, resBody SetTaskStateBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SetVirtualDiskUuidBody struct { Req *types.SetVirtualDiskUuid `xml:"urn:vim25 SetVirtualDiskUuid,omitempty"` Res *types.SetVirtualDiskUuidResponse `xml:"urn:vim25 SetVirtualDiskUuidResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SetVirtualDiskUuidBody) Fault() *soap.Fault { return b.Fault_ } func SetVirtualDiskUuid(ctx context.Context, r soap.RoundTripper, req *types.SetVirtualDiskUuid) (*types.SetVirtualDiskUuidResponse, error) { var reqBody, resBody SetVirtualDiskUuidBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ShrinkVirtualDisk_TaskBody struct { Req *types.ShrinkVirtualDisk_Task `xml:"urn:vim25 ShrinkVirtualDisk_Task,omitempty"` Res *types.ShrinkVirtualDisk_TaskResponse `xml:"urn:vim25 ShrinkVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ShrinkVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ShrinkVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ShrinkVirtualDisk_Task) (*types.ShrinkVirtualDisk_TaskResponse, error) { var reqBody, resBody ShrinkVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ShutdownGuestBody struct { Req *types.ShutdownGuest `xml:"urn:vim25 ShutdownGuest,omitempty"` Res *types.ShutdownGuestResponse `xml:"urn:vim25 ShutdownGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ShutdownGuestBody) Fault() *soap.Fault { return b.Fault_ } func ShutdownGuest(ctx context.Context, r soap.RoundTripper, req *types.ShutdownGuest) (*types.ShutdownGuestResponse, error) { var reqBody, resBody ShutdownGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ShutdownHost_TaskBody struct { Req *types.ShutdownHost_Task `xml:"urn:vim25 ShutdownHost_Task,omitempty"` Res *types.ShutdownHost_TaskResponse `xml:"urn:vim25 ShutdownHost_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ShutdownHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ShutdownHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ShutdownHost_Task) (*types.ShutdownHost_TaskResponse, error) { var reqBody, resBody ShutdownHost_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StageHostPatch_TaskBody struct { Req *types.StageHostPatch_Task `xml:"urn:vim25 StageHostPatch_Task,omitempty"` Res *types.StageHostPatch_TaskResponse `xml:"urn:vim25 StageHostPatch_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StageHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } func StageHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.StageHostPatch_Task) (*types.StageHostPatch_TaskResponse, error) { var reqBody, resBody StageHostPatch_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StampAllRulesWithUuid_TaskBody struct { Req *types.StampAllRulesWithUuid_Task `xml:"urn:vim25 StampAllRulesWithUuid_Task,omitempty"` Res *types.StampAllRulesWithUuid_TaskResponse `xml:"urn:vim25 StampAllRulesWithUuid_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StampAllRulesWithUuid_TaskBody) Fault() *soap.Fault { return b.Fault_ } func StampAllRulesWithUuid_Task(ctx context.Context, r soap.RoundTripper, req *types.StampAllRulesWithUuid_Task) (*types.StampAllRulesWithUuid_TaskResponse, error) { var reqBody, resBody StampAllRulesWithUuid_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StandbyGuestBody struct { Req *types.StandbyGuest `xml:"urn:vim25 StandbyGuest,omitempty"` Res *types.StandbyGuestResponse `xml:"urn:vim25 StandbyGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StandbyGuestBody) Fault() *soap.Fault { return b.Fault_ } func StandbyGuest(ctx context.Context, r soap.RoundTripper, req *types.StandbyGuest) (*types.StandbyGuestResponse, error) { var reqBody, resBody StandbyGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StartProgramInGuestBody struct { Req *types.StartProgramInGuest `xml:"urn:vim25 StartProgramInGuest,omitempty"` Res *types.StartProgramInGuestResponse `xml:"urn:vim25 StartProgramInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StartProgramInGuestBody) Fault() *soap.Fault { return b.Fault_ } func StartProgramInGuest(ctx context.Context, r soap.RoundTripper, req *types.StartProgramInGuest) (*types.StartProgramInGuestResponse, error) { var reqBody, resBody StartProgramInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StartRecording_TaskBody struct { Req *types.StartRecording_Task `xml:"urn:vim25 StartRecording_Task,omitempty"` Res *types.StartRecording_TaskResponse `xml:"urn:vim25 StartRecording_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StartRecording_TaskBody) Fault() *soap.Fault { return b.Fault_ } func StartRecording_Task(ctx context.Context, r soap.RoundTripper, req *types.StartRecording_Task) (*types.StartRecording_TaskResponse, error) { var reqBody, resBody StartRecording_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StartReplaying_TaskBody struct { Req *types.StartReplaying_Task `xml:"urn:vim25 StartReplaying_Task,omitempty"` Res *types.StartReplaying_TaskResponse `xml:"urn:vim25 StartReplaying_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StartReplaying_TaskBody) Fault() *soap.Fault { return b.Fault_ } func StartReplaying_Task(ctx context.Context, r soap.RoundTripper, req *types.StartReplaying_Task) (*types.StartReplaying_TaskResponse, error) { var reqBody, resBody StartReplaying_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StartServiceBody struct { Req *types.StartService `xml:"urn:vim25 StartService,omitempty"` Res *types.StartServiceResponse `xml:"urn:vim25 StartServiceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StartServiceBody) Fault() *soap.Fault { return b.Fault_ } func StartService(ctx context.Context, r soap.RoundTripper, req *types.StartService) (*types.StartServiceResponse, error) { var reqBody, resBody StartServiceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StopRecording_TaskBody struct { Req *types.StopRecording_Task `xml:"urn:vim25 StopRecording_Task,omitempty"` Res *types.StopRecording_TaskResponse `xml:"urn:vim25 StopRecording_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StopRecording_TaskBody) Fault() *soap.Fault { return b.Fault_ } func StopRecording_Task(ctx context.Context, r soap.RoundTripper, req *types.StopRecording_Task) (*types.StopRecording_TaskResponse, error) { var reqBody, resBody StopRecording_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StopReplaying_TaskBody struct { Req *types.StopReplaying_Task `xml:"urn:vim25 StopReplaying_Task,omitempty"` Res *types.StopReplaying_TaskResponse `xml:"urn:vim25 StopReplaying_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StopReplaying_TaskBody) Fault() *soap.Fault { return b.Fault_ } func StopReplaying_Task(ctx context.Context, r soap.RoundTripper, req *types.StopReplaying_Task) (*types.StopReplaying_TaskResponse, error) { var reqBody, resBody StopReplaying_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type StopServiceBody struct { Req *types.StopService `xml:"urn:vim25 StopService,omitempty"` Res *types.StopServiceResponse `xml:"urn:vim25 StopServiceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *StopServiceBody) Fault() *soap.Fault { return b.Fault_ } func StopService(ctx context.Context, r soap.RoundTripper, req *types.StopService) (*types.StopServiceResponse, error) { var reqBody, resBody StopServiceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SuspendVApp_TaskBody struct { Req *types.SuspendVApp_Task `xml:"urn:vim25 SuspendVApp_Task,omitempty"` Res *types.SuspendVApp_TaskResponse `xml:"urn:vim25 SuspendVApp_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SuspendVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } func SuspendVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.SuspendVApp_Task) (*types.SuspendVApp_TaskResponse, error) { var reqBody, resBody SuspendVApp_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type SuspendVM_TaskBody struct { Req *types.SuspendVM_Task `xml:"urn:vim25 SuspendVM_Task,omitempty"` Res *types.SuspendVM_TaskResponse `xml:"urn:vim25 SuspendVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *SuspendVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func SuspendVM_Task(ctx context.Context, r soap.RoundTripper, req *types.SuspendVM_Task) (*types.SuspendVM_TaskResponse, error) { var reqBody, resBody SuspendVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TerminateFaultTolerantVM_TaskBody struct { Req *types.TerminateFaultTolerantVM_Task `xml:"urn:vim25 TerminateFaultTolerantVM_Task,omitempty"` Res *types.TerminateFaultTolerantVM_TaskResponse `xml:"urn:vim25 TerminateFaultTolerantVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TerminateFaultTolerantVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func TerminateFaultTolerantVM_Task(ctx context.Context, r soap.RoundTripper, req *types.TerminateFaultTolerantVM_Task) (*types.TerminateFaultTolerantVM_TaskResponse, error) { var reqBody, resBody TerminateFaultTolerantVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TerminateProcessInGuestBody struct { Req *types.TerminateProcessInGuest `xml:"urn:vim25 TerminateProcessInGuest,omitempty"` Res *types.TerminateProcessInGuestResponse `xml:"urn:vim25 TerminateProcessInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TerminateProcessInGuestBody) Fault() *soap.Fault { return b.Fault_ } func TerminateProcessInGuest(ctx context.Context, r soap.RoundTripper, req *types.TerminateProcessInGuest) (*types.TerminateProcessInGuestResponse, error) { var reqBody, resBody TerminateProcessInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TerminateSessionBody struct { Req *types.TerminateSession `xml:"urn:vim25 TerminateSession,omitempty"` Res *types.TerminateSessionResponse `xml:"urn:vim25 TerminateSessionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TerminateSessionBody) Fault() *soap.Fault { return b.Fault_ } func TerminateSession(ctx context.Context, r soap.RoundTripper, req *types.TerminateSession) (*types.TerminateSessionResponse, error) { var reqBody, resBody TerminateSessionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TerminateVMBody struct { Req *types.TerminateVM `xml:"urn:vim25 TerminateVM,omitempty"` Res *types.TerminateVMResponse `xml:"urn:vim25 TerminateVMResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TerminateVMBody) Fault() *soap.Fault { return b.Fault_ } func TerminateVM(ctx context.Context, r soap.RoundTripper, req *types.TerminateVM) (*types.TerminateVMResponse, error) { var reqBody, resBody TerminateVMBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TurnDiskLocatorLedOff_TaskBody struct { Req *types.TurnDiskLocatorLedOff_Task `xml:"urn:vim25 TurnDiskLocatorLedOff_Task,omitempty"` Res *types.TurnDiskLocatorLedOff_TaskResponse `xml:"urn:vim25 TurnDiskLocatorLedOff_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TurnDiskLocatorLedOff_TaskBody) Fault() *soap.Fault { return b.Fault_ } func TurnDiskLocatorLedOff_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnDiskLocatorLedOff_Task) (*types.TurnDiskLocatorLedOff_TaskResponse, error) { var reqBody, resBody TurnDiskLocatorLedOff_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TurnDiskLocatorLedOn_TaskBody struct { Req *types.TurnDiskLocatorLedOn_Task `xml:"urn:vim25 TurnDiskLocatorLedOn_Task,omitempty"` Res *types.TurnDiskLocatorLedOn_TaskResponse `xml:"urn:vim25 TurnDiskLocatorLedOn_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TurnDiskLocatorLedOn_TaskBody) Fault() *soap.Fault { return b.Fault_ } func TurnDiskLocatorLedOn_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnDiskLocatorLedOn_Task) (*types.TurnDiskLocatorLedOn_TaskResponse, error) { var reqBody, resBody TurnDiskLocatorLedOn_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type TurnOffFaultToleranceForVM_TaskBody struct { Req *types.TurnOffFaultToleranceForVM_Task `xml:"urn:vim25 TurnOffFaultToleranceForVM_Task,omitempty"` Res *types.TurnOffFaultToleranceForVM_TaskResponse `xml:"urn:vim25 TurnOffFaultToleranceForVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *TurnOffFaultToleranceForVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func TurnOffFaultToleranceForVM_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnOffFaultToleranceForVM_Task) (*types.TurnOffFaultToleranceForVM_TaskResponse, error) { var reqBody, resBody TurnOffFaultToleranceForVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnassignUserFromGroupBody struct { Req *types.UnassignUserFromGroup `xml:"urn:vim25 UnassignUserFromGroup,omitempty"` Res *types.UnassignUserFromGroupResponse `xml:"urn:vim25 UnassignUserFromGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnassignUserFromGroupBody) Fault() *soap.Fault { return b.Fault_ } func UnassignUserFromGroup(ctx context.Context, r soap.RoundTripper, req *types.UnassignUserFromGroup) (*types.UnassignUserFromGroupResponse, error) { var reqBody, resBody UnassignUserFromGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnbindVnicBody struct { Req *types.UnbindVnic `xml:"urn:vim25 UnbindVnic,omitempty"` Res *types.UnbindVnicResponse `xml:"urn:vim25 UnbindVnicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnbindVnicBody) Fault() *soap.Fault { return b.Fault_ } func UnbindVnic(ctx context.Context, r soap.RoundTripper, req *types.UnbindVnic) (*types.UnbindVnicResponse, error) { var reqBody, resBody UnbindVnicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UninstallHostPatch_TaskBody struct { Req *types.UninstallHostPatch_Task `xml:"urn:vim25 UninstallHostPatch_Task,omitempty"` Res *types.UninstallHostPatch_TaskResponse `xml:"urn:vim25 UninstallHostPatch_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UninstallHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UninstallHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.UninstallHostPatch_Task) (*types.UninstallHostPatch_TaskResponse, error) { var reqBody, resBody UninstallHostPatch_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UninstallIoFilter_TaskBody struct { Req *types.UninstallIoFilter_Task `xml:"urn:vim25 UninstallIoFilter_Task,omitempty"` Res *types.UninstallIoFilter_TaskResponse `xml:"urn:vim25 UninstallIoFilter_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UninstallIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UninstallIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.UninstallIoFilter_Task) (*types.UninstallIoFilter_TaskResponse, error) { var reqBody, resBody UninstallIoFilter_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UninstallServiceBody struct { Req *types.UninstallService `xml:"urn:vim25 UninstallService,omitempty"` Res *types.UninstallServiceResponse `xml:"urn:vim25 UninstallServiceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UninstallServiceBody) Fault() *soap.Fault { return b.Fault_ } func UninstallService(ctx context.Context, r soap.RoundTripper, req *types.UninstallService) (*types.UninstallServiceResponse, error) { var reqBody, resBody UninstallServiceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmapVmfsVolumeEx_TaskBody struct { Req *types.UnmapVmfsVolumeEx_Task `xml:"urn:vim25 UnmapVmfsVolumeEx_Task,omitempty"` Res *types.UnmapVmfsVolumeEx_TaskResponse `xml:"urn:vim25 UnmapVmfsVolumeEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmapVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UnmapVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmapVmfsVolumeEx_Task) (*types.UnmapVmfsVolumeEx_TaskResponse, error) { var reqBody, resBody UnmapVmfsVolumeEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmountDiskMapping_TaskBody struct { Req *types.UnmountDiskMapping_Task `xml:"urn:vim25 UnmountDiskMapping_Task,omitempty"` Res *types.UnmountDiskMapping_TaskResponse `xml:"urn:vim25 UnmountDiskMapping_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmountDiskMapping_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UnmountDiskMapping_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmountDiskMapping_Task) (*types.UnmountDiskMapping_TaskResponse, error) { var reqBody, resBody UnmountDiskMapping_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmountForceMountedVmfsVolumeBody struct { Req *types.UnmountForceMountedVmfsVolume `xml:"urn:vim25 UnmountForceMountedVmfsVolume,omitempty"` Res *types.UnmountForceMountedVmfsVolumeResponse `xml:"urn:vim25 UnmountForceMountedVmfsVolumeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmountForceMountedVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } func UnmountForceMountedVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountForceMountedVmfsVolume) (*types.UnmountForceMountedVmfsVolumeResponse, error) { var reqBody, resBody UnmountForceMountedVmfsVolumeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmountToolsInstallerBody struct { Req *types.UnmountToolsInstaller `xml:"urn:vim25 UnmountToolsInstaller,omitempty"` Res *types.UnmountToolsInstallerResponse `xml:"urn:vim25 UnmountToolsInstallerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmountToolsInstallerBody) Fault() *soap.Fault { return b.Fault_ } func UnmountToolsInstaller(ctx context.Context, r soap.RoundTripper, req *types.UnmountToolsInstaller) (*types.UnmountToolsInstallerResponse, error) { var reqBody, resBody UnmountToolsInstallerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmountVffsVolumeBody struct { Req *types.UnmountVffsVolume `xml:"urn:vim25 UnmountVffsVolume,omitempty"` Res *types.UnmountVffsVolumeResponse `xml:"urn:vim25 UnmountVffsVolumeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmountVffsVolumeBody) Fault() *soap.Fault { return b.Fault_ } func UnmountVffsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountVffsVolume) (*types.UnmountVffsVolumeResponse, error) { var reqBody, resBody UnmountVffsVolumeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmountVmfsVolumeBody struct { Req *types.UnmountVmfsVolume `xml:"urn:vim25 UnmountVmfsVolume,omitempty"` Res *types.UnmountVmfsVolumeResponse `xml:"urn:vim25 UnmountVmfsVolumeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmountVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } func UnmountVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountVmfsVolume) (*types.UnmountVmfsVolumeResponse, error) { var reqBody, resBody UnmountVmfsVolumeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnmountVmfsVolumeEx_TaskBody struct { Req *types.UnmountVmfsVolumeEx_Task `xml:"urn:vim25 UnmountVmfsVolumeEx_Task,omitempty"` Res *types.UnmountVmfsVolumeEx_TaskResponse `xml:"urn:vim25 UnmountVmfsVolumeEx_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnmountVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UnmountVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmountVmfsVolumeEx_Task) (*types.UnmountVmfsVolumeEx_TaskResponse, error) { var reqBody, resBody UnmountVmfsVolumeEx_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnregisterAndDestroy_TaskBody struct { Req *types.UnregisterAndDestroy_Task `xml:"urn:vim25 UnregisterAndDestroy_Task,omitempty"` Res *types.UnregisterAndDestroy_TaskResponse `xml:"urn:vim25 UnregisterAndDestroy_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnregisterAndDestroy_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UnregisterAndDestroy_Task(ctx context.Context, r soap.RoundTripper, req *types.UnregisterAndDestroy_Task) (*types.UnregisterAndDestroy_TaskResponse, error) { var reqBody, resBody UnregisterAndDestroy_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnregisterExtensionBody struct { Req *types.UnregisterExtension `xml:"urn:vim25 UnregisterExtension,omitempty"` Res *types.UnregisterExtensionResponse `xml:"urn:vim25 UnregisterExtensionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnregisterExtensionBody) Fault() *soap.Fault { return b.Fault_ } func UnregisterExtension(ctx context.Context, r soap.RoundTripper, req *types.UnregisterExtension) (*types.UnregisterExtensionResponse, error) { var reqBody, resBody UnregisterExtensionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnregisterHealthUpdateProviderBody struct { Req *types.UnregisterHealthUpdateProvider `xml:"urn:vim25 UnregisterHealthUpdateProvider,omitempty"` Res *types.UnregisterHealthUpdateProviderResponse `xml:"urn:vim25 UnregisterHealthUpdateProviderResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnregisterHealthUpdateProviderBody) Fault() *soap.Fault { return b.Fault_ } func UnregisterHealthUpdateProvider(ctx context.Context, r soap.RoundTripper, req *types.UnregisterHealthUpdateProvider) (*types.UnregisterHealthUpdateProviderResponse, error) { var reqBody, resBody UnregisterHealthUpdateProviderBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UnregisterVMBody struct { Req *types.UnregisterVM `xml:"urn:vim25 UnregisterVM,omitempty"` Res *types.UnregisterVMResponse `xml:"urn:vim25 UnregisterVMResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UnregisterVMBody) Fault() *soap.Fault { return b.Fault_ } func UnregisterVM(ctx context.Context, r soap.RoundTripper, req *types.UnregisterVM) (*types.UnregisterVMResponse, error) { var reqBody, resBody UnregisterVMBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateAnswerFile_TaskBody struct { Req *types.UpdateAnswerFile_Task `xml:"urn:vim25 UpdateAnswerFile_Task,omitempty"` Res *types.UpdateAnswerFile_TaskResponse `xml:"urn:vim25 UpdateAnswerFile_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateAnswerFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateAnswerFile_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateAnswerFile_Task) (*types.UpdateAnswerFile_TaskResponse, error) { var reqBody, resBody UpdateAnswerFile_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateAssignedLicenseBody struct { Req *types.UpdateAssignedLicense `xml:"urn:vim25 UpdateAssignedLicense,omitempty"` Res *types.UpdateAssignedLicenseResponse `xml:"urn:vim25 UpdateAssignedLicenseResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateAssignedLicenseBody) Fault() *soap.Fault { return b.Fault_ } func UpdateAssignedLicense(ctx context.Context, r soap.RoundTripper, req *types.UpdateAssignedLicense) (*types.UpdateAssignedLicenseResponse, error) { var reqBody, resBody UpdateAssignedLicenseBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateAuthorizationRoleBody struct { Req *types.UpdateAuthorizationRole `xml:"urn:vim25 UpdateAuthorizationRole,omitempty"` Res *types.UpdateAuthorizationRoleResponse `xml:"urn:vim25 UpdateAuthorizationRoleResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ } func UpdateAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.UpdateAuthorizationRole) (*types.UpdateAuthorizationRoleResponse, error) { var reqBody, resBody UpdateAuthorizationRoleBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateBootDeviceBody struct { Req *types.UpdateBootDevice `xml:"urn:vim25 UpdateBootDevice,omitempty"` Res *types.UpdateBootDeviceResponse `xml:"urn:vim25 UpdateBootDeviceResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateBootDeviceBody) Fault() *soap.Fault { return b.Fault_ } func UpdateBootDevice(ctx context.Context, r soap.RoundTripper, req *types.UpdateBootDevice) (*types.UpdateBootDeviceResponse, error) { var reqBody, resBody UpdateBootDeviceBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateChildResourceConfigurationBody struct { Req *types.UpdateChildResourceConfiguration `xml:"urn:vim25 UpdateChildResourceConfiguration,omitempty"` Res *types.UpdateChildResourceConfigurationResponse `xml:"urn:vim25 UpdateChildResourceConfigurationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateChildResourceConfigurationBody) Fault() *soap.Fault { return b.Fault_ } func UpdateChildResourceConfiguration(ctx context.Context, r soap.RoundTripper, req *types.UpdateChildResourceConfiguration) (*types.UpdateChildResourceConfigurationResponse, error) { var reqBody, resBody UpdateChildResourceConfigurationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateClusterProfileBody struct { Req *types.UpdateClusterProfile `xml:"urn:vim25 UpdateClusterProfile,omitempty"` Res *types.UpdateClusterProfileResponse `xml:"urn:vim25 UpdateClusterProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateClusterProfileBody) Fault() *soap.Fault { return b.Fault_ } func UpdateClusterProfile(ctx context.Context, r soap.RoundTripper, req *types.UpdateClusterProfile) (*types.UpdateClusterProfileResponse, error) { var reqBody, resBody UpdateClusterProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateConfigBody struct { Req *types.UpdateConfig `xml:"urn:vim25 UpdateConfig,omitempty"` Res *types.UpdateConfigResponse `xml:"urn:vim25 UpdateConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateConfig) (*types.UpdateConfigResponse, error) { var reqBody, resBody UpdateConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateConsoleIpRouteConfigBody struct { Req *types.UpdateConsoleIpRouteConfig `xml:"urn:vim25 UpdateConsoleIpRouteConfig,omitempty"` Res *types.UpdateConsoleIpRouteConfigResponse `xml:"urn:vim25 UpdateConsoleIpRouteConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateConsoleIpRouteConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateConsoleIpRouteConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateConsoleIpRouteConfig) (*types.UpdateConsoleIpRouteConfigResponse, error) { var reqBody, resBody UpdateConsoleIpRouteConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateCounterLevelMappingBody struct { Req *types.UpdateCounterLevelMapping `xml:"urn:vim25 UpdateCounterLevelMapping,omitempty"` Res *types.UpdateCounterLevelMappingResponse `xml:"urn:vim25 UpdateCounterLevelMappingResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateCounterLevelMappingBody) Fault() *soap.Fault { return b.Fault_ } func UpdateCounterLevelMapping(ctx context.Context, r soap.RoundTripper, req *types.UpdateCounterLevelMapping) (*types.UpdateCounterLevelMappingResponse, error) { var reqBody, resBody UpdateCounterLevelMappingBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDVSHealthCheckConfig_TaskBody struct { Req *types.UpdateDVSHealthCheckConfig_Task `xml:"urn:vim25 UpdateDVSHealthCheckConfig_Task,omitempty"` Res *types.UpdateDVSHealthCheckConfig_TaskResponse `xml:"urn:vim25 UpdateDVSHealthCheckConfig_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDVSHealthCheckConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDVSHealthCheckConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateDVSHealthCheckConfig_Task) (*types.UpdateDVSHealthCheckConfig_TaskResponse, error) { var reqBody, resBody UpdateDVSHealthCheckConfig_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDVSLacpGroupConfig_TaskBody struct { Req *types.UpdateDVSLacpGroupConfig_Task `xml:"urn:vim25 UpdateDVSLacpGroupConfig_Task,omitempty"` Res *types.UpdateDVSLacpGroupConfig_TaskResponse `xml:"urn:vim25 UpdateDVSLacpGroupConfig_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDVSLacpGroupConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDVSLacpGroupConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateDVSLacpGroupConfig_Task) (*types.UpdateDVSLacpGroupConfig_TaskResponse, error) { var reqBody, resBody UpdateDVSLacpGroupConfig_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDateTimeBody struct { Req *types.UpdateDateTime `xml:"urn:vim25 UpdateDateTime,omitempty"` Res *types.UpdateDateTimeResponse `xml:"urn:vim25 UpdateDateTimeResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDateTimeBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDateTime(ctx context.Context, r soap.RoundTripper, req *types.UpdateDateTime) (*types.UpdateDateTimeResponse, error) { var reqBody, resBody UpdateDateTimeBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDateTimeConfigBody struct { Req *types.UpdateDateTimeConfig `xml:"urn:vim25 UpdateDateTimeConfig,omitempty"` Res *types.UpdateDateTimeConfigResponse `xml:"urn:vim25 UpdateDateTimeConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDateTimeConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDateTimeConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateDateTimeConfig) (*types.UpdateDateTimeConfigResponse, error) { var reqBody, resBody UpdateDateTimeConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDefaultPolicyBody struct { Req *types.UpdateDefaultPolicy `xml:"urn:vim25 UpdateDefaultPolicy,omitempty"` Res *types.UpdateDefaultPolicyResponse `xml:"urn:vim25 UpdateDefaultPolicyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDefaultPolicyBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDefaultPolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateDefaultPolicy) (*types.UpdateDefaultPolicyResponse, error) { var reqBody, resBody UpdateDefaultPolicyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDiskPartitionsBody struct { Req *types.UpdateDiskPartitions `xml:"urn:vim25 UpdateDiskPartitions,omitempty"` Res *types.UpdateDiskPartitionsResponse `xml:"urn:vim25 UpdateDiskPartitionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDiskPartitionsBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDiskPartitions(ctx context.Context, r soap.RoundTripper, req *types.UpdateDiskPartitions) (*types.UpdateDiskPartitionsResponse, error) { var reqBody, resBody UpdateDiskPartitionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDnsConfigBody struct { Req *types.UpdateDnsConfig `xml:"urn:vim25 UpdateDnsConfig,omitempty"` Res *types.UpdateDnsConfigResponse `xml:"urn:vim25 UpdateDnsConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDnsConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDnsConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateDnsConfig) (*types.UpdateDnsConfigResponse, error) { var reqBody, resBody UpdateDnsConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateDvsCapabilityBody struct { Req *types.UpdateDvsCapability `xml:"urn:vim25 UpdateDvsCapability,omitempty"` Res *types.UpdateDvsCapabilityResponse `xml:"urn:vim25 UpdateDvsCapabilityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateDvsCapabilityBody) Fault() *soap.Fault { return b.Fault_ } func UpdateDvsCapability(ctx context.Context, r soap.RoundTripper, req *types.UpdateDvsCapability) (*types.UpdateDvsCapabilityResponse, error) { var reqBody, resBody UpdateDvsCapabilityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateExtensionBody struct { Req *types.UpdateExtension `xml:"urn:vim25 UpdateExtension,omitempty"` Res *types.UpdateExtensionResponse `xml:"urn:vim25 UpdateExtensionResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateExtensionBody) Fault() *soap.Fault { return b.Fault_ } func UpdateExtension(ctx context.Context, r soap.RoundTripper, req *types.UpdateExtension) (*types.UpdateExtensionResponse, error) { var reqBody, resBody UpdateExtensionBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateFlagsBody struct { Req *types.UpdateFlags `xml:"urn:vim25 UpdateFlags,omitempty"` Res *types.UpdateFlagsResponse `xml:"urn:vim25 UpdateFlagsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateFlagsBody) Fault() *soap.Fault { return b.Fault_ } func UpdateFlags(ctx context.Context, r soap.RoundTripper, req *types.UpdateFlags) (*types.UpdateFlagsResponse, error) { var reqBody, resBody UpdateFlagsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateGraphicsConfigBody struct { Req *types.UpdateGraphicsConfig `xml:"urn:vim25 UpdateGraphicsConfig,omitempty"` Res *types.UpdateGraphicsConfigResponse `xml:"urn:vim25 UpdateGraphicsConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateGraphicsConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateGraphicsConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateGraphicsConfig) (*types.UpdateGraphicsConfigResponse, error) { var reqBody, resBody UpdateGraphicsConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateHostCustomizations_TaskBody struct { Req *types.UpdateHostCustomizations_Task `xml:"urn:vim25 UpdateHostCustomizations_Task,omitempty"` Res *types.UpdateHostCustomizations_TaskResponse `xml:"urn:vim25 UpdateHostCustomizations_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateHostCustomizations_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateHostCustomizations_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostCustomizations_Task) (*types.UpdateHostCustomizations_TaskResponse, error) { var reqBody, resBody UpdateHostCustomizations_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateHostImageAcceptanceLevelBody struct { Req *types.UpdateHostImageAcceptanceLevel `xml:"urn:vim25 UpdateHostImageAcceptanceLevel,omitempty"` Res *types.UpdateHostImageAcceptanceLevelResponse `xml:"urn:vim25 UpdateHostImageAcceptanceLevelResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateHostImageAcceptanceLevelBody) Fault() *soap.Fault { return b.Fault_ } func UpdateHostImageAcceptanceLevel(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostImageAcceptanceLevel) (*types.UpdateHostImageAcceptanceLevelResponse, error) { var reqBody, resBody UpdateHostImageAcceptanceLevelBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateHostProfileBody struct { Req *types.UpdateHostProfile `xml:"urn:vim25 UpdateHostProfile,omitempty"` Res *types.UpdateHostProfileResponse `xml:"urn:vim25 UpdateHostProfileResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateHostProfileBody) Fault() *soap.Fault { return b.Fault_ } func UpdateHostProfile(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostProfile) (*types.UpdateHostProfileResponse, error) { var reqBody, resBody UpdateHostProfileBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateHostSpecificationBody struct { Req *types.UpdateHostSpecification `xml:"urn:vim25 UpdateHostSpecification,omitempty"` Res *types.UpdateHostSpecificationResponse `xml:"urn:vim25 UpdateHostSpecificationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ } func UpdateHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostSpecification) (*types.UpdateHostSpecificationResponse, error) { var reqBody, resBody UpdateHostSpecificationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateHostSubSpecificationBody struct { Req *types.UpdateHostSubSpecification `xml:"urn:vim25 UpdateHostSubSpecification,omitempty"` Res *types.UpdateHostSubSpecificationResponse `xml:"urn:vim25 UpdateHostSubSpecificationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateHostSubSpecificationBody) Fault() *soap.Fault { return b.Fault_ } func UpdateHostSubSpecification(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostSubSpecification) (*types.UpdateHostSubSpecificationResponse, error) { var reqBody, resBody UpdateHostSubSpecificationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiAdvancedOptionsBody struct { Req *types.UpdateInternetScsiAdvancedOptions `xml:"urn:vim25 UpdateInternetScsiAdvancedOptions,omitempty"` Res *types.UpdateInternetScsiAdvancedOptionsResponse `xml:"urn:vim25 UpdateInternetScsiAdvancedOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiAdvancedOptionsBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiAdvancedOptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAdvancedOptions) (*types.UpdateInternetScsiAdvancedOptionsResponse, error) { var reqBody, resBody UpdateInternetScsiAdvancedOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiAliasBody struct { Req *types.UpdateInternetScsiAlias `xml:"urn:vim25 UpdateInternetScsiAlias,omitempty"` Res *types.UpdateInternetScsiAliasResponse `xml:"urn:vim25 UpdateInternetScsiAliasResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiAliasBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiAlias(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAlias) (*types.UpdateInternetScsiAliasResponse, error) { var reqBody, resBody UpdateInternetScsiAliasBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiAuthenticationPropertiesBody struct { Req *types.UpdateInternetScsiAuthenticationProperties `xml:"urn:vim25 UpdateInternetScsiAuthenticationProperties,omitempty"` Res *types.UpdateInternetScsiAuthenticationPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiAuthenticationPropertiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiAuthenticationPropertiesBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiAuthenticationProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAuthenticationProperties) (*types.UpdateInternetScsiAuthenticationPropertiesResponse, error) { var reqBody, resBody UpdateInternetScsiAuthenticationPropertiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiDigestPropertiesBody struct { Req *types.UpdateInternetScsiDigestProperties `xml:"urn:vim25 UpdateInternetScsiDigestProperties,omitempty"` Res *types.UpdateInternetScsiDigestPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiDigestPropertiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiDigestPropertiesBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiDigestProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiDigestProperties) (*types.UpdateInternetScsiDigestPropertiesResponse, error) { var reqBody, resBody UpdateInternetScsiDigestPropertiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiDiscoveryPropertiesBody struct { Req *types.UpdateInternetScsiDiscoveryProperties `xml:"urn:vim25 UpdateInternetScsiDiscoveryProperties,omitempty"` Res *types.UpdateInternetScsiDiscoveryPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiDiscoveryPropertiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiDiscoveryPropertiesBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiDiscoveryProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiDiscoveryProperties) (*types.UpdateInternetScsiDiscoveryPropertiesResponse, error) { var reqBody, resBody UpdateInternetScsiDiscoveryPropertiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiIPPropertiesBody struct { Req *types.UpdateInternetScsiIPProperties `xml:"urn:vim25 UpdateInternetScsiIPProperties,omitempty"` Res *types.UpdateInternetScsiIPPropertiesResponse `xml:"urn:vim25 UpdateInternetScsiIPPropertiesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiIPPropertiesBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiIPProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiIPProperties) (*types.UpdateInternetScsiIPPropertiesResponse, error) { var reqBody, resBody UpdateInternetScsiIPPropertiesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateInternetScsiNameBody struct { Req *types.UpdateInternetScsiName `xml:"urn:vim25 UpdateInternetScsiName,omitempty"` Res *types.UpdateInternetScsiNameResponse `xml:"urn:vim25 UpdateInternetScsiNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateInternetScsiNameBody) Fault() *soap.Fault { return b.Fault_ } func UpdateInternetScsiName(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiName) (*types.UpdateInternetScsiNameResponse, error) { var reqBody, resBody UpdateInternetScsiNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateIpConfigBody struct { Req *types.UpdateIpConfig `xml:"urn:vim25 UpdateIpConfig,omitempty"` Res *types.UpdateIpConfigResponse `xml:"urn:vim25 UpdateIpConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateIpConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateIpConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpConfig) (*types.UpdateIpConfigResponse, error) { var reqBody, resBody UpdateIpConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateIpPoolBody struct { Req *types.UpdateIpPool `xml:"urn:vim25 UpdateIpPool,omitempty"` Res *types.UpdateIpPoolResponse `xml:"urn:vim25 UpdateIpPoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateIpPoolBody) Fault() *soap.Fault { return b.Fault_ } func UpdateIpPool(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpPool) (*types.UpdateIpPoolResponse, error) { var reqBody, resBody UpdateIpPoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateIpRouteConfigBody struct { Req *types.UpdateIpRouteConfig `xml:"urn:vim25 UpdateIpRouteConfig,omitempty"` Res *types.UpdateIpRouteConfigResponse `xml:"urn:vim25 UpdateIpRouteConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateIpRouteConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateIpRouteConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpRouteConfig) (*types.UpdateIpRouteConfigResponse, error) { var reqBody, resBody UpdateIpRouteConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateIpRouteTableConfigBody struct { Req *types.UpdateIpRouteTableConfig `xml:"urn:vim25 UpdateIpRouteTableConfig,omitempty"` Res *types.UpdateIpRouteTableConfigResponse `xml:"urn:vim25 UpdateIpRouteTableConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateIpRouteTableConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateIpRouteTableConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpRouteTableConfig) (*types.UpdateIpRouteTableConfigResponse, error) { var reqBody, resBody UpdateIpRouteTableConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateIpmiBody struct { Req *types.UpdateIpmi `xml:"urn:vim25 UpdateIpmi,omitempty"` Res *types.UpdateIpmiResponse `xml:"urn:vim25 UpdateIpmiResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateIpmiBody) Fault() *soap.Fault { return b.Fault_ } func UpdateIpmi(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpmi) (*types.UpdateIpmiResponse, error) { var reqBody, resBody UpdateIpmiBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateKmipServerBody struct { Req *types.UpdateKmipServer `xml:"urn:vim25 UpdateKmipServer,omitempty"` Res *types.UpdateKmipServerResponse `xml:"urn:vim25 UpdateKmipServerResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateKmipServerBody) Fault() *soap.Fault { return b.Fault_ } func UpdateKmipServer(ctx context.Context, r soap.RoundTripper, req *types.UpdateKmipServer) (*types.UpdateKmipServerResponse, error) { var reqBody, resBody UpdateKmipServerBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateKmsSignedCsrClientCertBody struct { Req *types.UpdateKmsSignedCsrClientCert `xml:"urn:vim25 UpdateKmsSignedCsrClientCert,omitempty"` Res *types.UpdateKmsSignedCsrClientCertResponse `xml:"urn:vim25 UpdateKmsSignedCsrClientCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateKmsSignedCsrClientCertBody) Fault() *soap.Fault { return b.Fault_ } func UpdateKmsSignedCsrClientCert(ctx context.Context, r soap.RoundTripper, req *types.UpdateKmsSignedCsrClientCert) (*types.UpdateKmsSignedCsrClientCertResponse, error) { var reqBody, resBody UpdateKmsSignedCsrClientCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateLicenseBody struct { Req *types.UpdateLicense `xml:"urn:vim25 UpdateLicense,omitempty"` Res *types.UpdateLicenseResponse `xml:"urn:vim25 UpdateLicenseResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateLicenseBody) Fault() *soap.Fault { return b.Fault_ } func UpdateLicense(ctx context.Context, r soap.RoundTripper, req *types.UpdateLicense) (*types.UpdateLicenseResponse, error) { var reqBody, resBody UpdateLicenseBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateLicenseLabelBody struct { Req *types.UpdateLicenseLabel `xml:"urn:vim25 UpdateLicenseLabel,omitempty"` Res *types.UpdateLicenseLabelResponse `xml:"urn:vim25 UpdateLicenseLabelResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateLicenseLabelBody) Fault() *soap.Fault { return b.Fault_ } func UpdateLicenseLabel(ctx context.Context, r soap.RoundTripper, req *types.UpdateLicenseLabel) (*types.UpdateLicenseLabelResponse, error) { var reqBody, resBody UpdateLicenseLabelBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateLinkedChildrenBody struct { Req *types.UpdateLinkedChildren `xml:"urn:vim25 UpdateLinkedChildren,omitempty"` Res *types.UpdateLinkedChildrenResponse `xml:"urn:vim25 UpdateLinkedChildrenResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateLinkedChildrenBody) Fault() *soap.Fault { return b.Fault_ } func UpdateLinkedChildren(ctx context.Context, r soap.RoundTripper, req *types.UpdateLinkedChildren) (*types.UpdateLinkedChildrenResponse, error) { var reqBody, resBody UpdateLinkedChildrenBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateLocalSwapDatastoreBody struct { Req *types.UpdateLocalSwapDatastore `xml:"urn:vim25 UpdateLocalSwapDatastore,omitempty"` Res *types.UpdateLocalSwapDatastoreResponse `xml:"urn:vim25 UpdateLocalSwapDatastoreResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateLocalSwapDatastoreBody) Fault() *soap.Fault { return b.Fault_ } func UpdateLocalSwapDatastore(ctx context.Context, r soap.RoundTripper, req *types.UpdateLocalSwapDatastore) (*types.UpdateLocalSwapDatastoreResponse, error) { var reqBody, resBody UpdateLocalSwapDatastoreBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateLockdownExceptionsBody struct { Req *types.UpdateLockdownExceptions `xml:"urn:vim25 UpdateLockdownExceptions,omitempty"` Res *types.UpdateLockdownExceptionsResponse `xml:"urn:vim25 UpdateLockdownExceptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateLockdownExceptionsBody) Fault() *soap.Fault { return b.Fault_ } func UpdateLockdownExceptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateLockdownExceptions) (*types.UpdateLockdownExceptionsResponse, error) { var reqBody, resBody UpdateLockdownExceptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateModuleOptionStringBody struct { Req *types.UpdateModuleOptionString `xml:"urn:vim25 UpdateModuleOptionString,omitempty"` Res *types.UpdateModuleOptionStringResponse `xml:"urn:vim25 UpdateModuleOptionStringResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateModuleOptionStringBody) Fault() *soap.Fault { return b.Fault_ } func UpdateModuleOptionString(ctx context.Context, r soap.RoundTripper, req *types.UpdateModuleOptionString) (*types.UpdateModuleOptionStringResponse, error) { var reqBody, resBody UpdateModuleOptionStringBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateNetworkConfigBody struct { Req *types.UpdateNetworkConfig `xml:"urn:vim25 UpdateNetworkConfig,omitempty"` Res *types.UpdateNetworkConfigResponse `xml:"urn:vim25 UpdateNetworkConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateNetworkConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateNetworkConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateNetworkConfig) (*types.UpdateNetworkConfigResponse, error) { var reqBody, resBody UpdateNetworkConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateNetworkResourcePoolBody struct { Req *types.UpdateNetworkResourcePool `xml:"urn:vim25 UpdateNetworkResourcePool,omitempty"` Res *types.UpdateNetworkResourcePoolResponse `xml:"urn:vim25 UpdateNetworkResourcePoolResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } func UpdateNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.UpdateNetworkResourcePool) (*types.UpdateNetworkResourcePoolResponse, error) { var reqBody, resBody UpdateNetworkResourcePoolBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateOptionsBody struct { Req *types.UpdateOptions `xml:"urn:vim25 UpdateOptions,omitempty"` Res *types.UpdateOptionsResponse `xml:"urn:vim25 UpdateOptionsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateOptionsBody) Fault() *soap.Fault { return b.Fault_ } func UpdateOptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateOptions) (*types.UpdateOptionsResponse, error) { var reqBody, resBody UpdateOptionsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdatePassthruConfigBody struct { Req *types.UpdatePassthruConfig `xml:"urn:vim25 UpdatePassthruConfig,omitempty"` Res *types.UpdatePassthruConfigResponse `xml:"urn:vim25 UpdatePassthruConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdatePassthruConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdatePassthruConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdatePassthruConfig) (*types.UpdatePassthruConfigResponse, error) { var reqBody, resBody UpdatePassthruConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdatePerfIntervalBody struct { Req *types.UpdatePerfInterval `xml:"urn:vim25 UpdatePerfInterval,omitempty"` Res *types.UpdatePerfIntervalResponse `xml:"urn:vim25 UpdatePerfIntervalResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdatePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ } func UpdatePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.UpdatePerfInterval) (*types.UpdatePerfIntervalResponse, error) { var reqBody, resBody UpdatePerfIntervalBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdatePhysicalNicLinkSpeedBody struct { Req *types.UpdatePhysicalNicLinkSpeed `xml:"urn:vim25 UpdatePhysicalNicLinkSpeed,omitempty"` Res *types.UpdatePhysicalNicLinkSpeedResponse `xml:"urn:vim25 UpdatePhysicalNicLinkSpeedResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdatePhysicalNicLinkSpeedBody) Fault() *soap.Fault { return b.Fault_ } func UpdatePhysicalNicLinkSpeed(ctx context.Context, r soap.RoundTripper, req *types.UpdatePhysicalNicLinkSpeed) (*types.UpdatePhysicalNicLinkSpeedResponse, error) { var reqBody, resBody UpdatePhysicalNicLinkSpeedBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdatePortGroupBody struct { Req *types.UpdatePortGroup `xml:"urn:vim25 UpdatePortGroup,omitempty"` Res *types.UpdatePortGroupResponse `xml:"urn:vim25 UpdatePortGroupResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdatePortGroupBody) Fault() *soap.Fault { return b.Fault_ } func UpdatePortGroup(ctx context.Context, r soap.RoundTripper, req *types.UpdatePortGroup) (*types.UpdatePortGroupResponse, error) { var reqBody, resBody UpdatePortGroupBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateProgressBody struct { Req *types.UpdateProgress `xml:"urn:vim25 UpdateProgress,omitempty"` Res *types.UpdateProgressResponse `xml:"urn:vim25 UpdateProgressResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateProgressBody) Fault() *soap.Fault { return b.Fault_ } func UpdateProgress(ctx context.Context, r soap.RoundTripper, req *types.UpdateProgress) (*types.UpdateProgressResponse, error) { var reqBody, resBody UpdateProgressBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateReferenceHostBody struct { Req *types.UpdateReferenceHost `xml:"urn:vim25 UpdateReferenceHost,omitempty"` Res *types.UpdateReferenceHostResponse `xml:"urn:vim25 UpdateReferenceHostResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateReferenceHostBody) Fault() *soap.Fault { return b.Fault_ } func UpdateReferenceHost(ctx context.Context, r soap.RoundTripper, req *types.UpdateReferenceHost) (*types.UpdateReferenceHostResponse, error) { var reqBody, resBody UpdateReferenceHostBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateRulesetBody struct { Req *types.UpdateRuleset `xml:"urn:vim25 UpdateRuleset,omitempty"` Res *types.UpdateRulesetResponse `xml:"urn:vim25 UpdateRulesetResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateRulesetBody) Fault() *soap.Fault { return b.Fault_ } func UpdateRuleset(ctx context.Context, r soap.RoundTripper, req *types.UpdateRuleset) (*types.UpdateRulesetResponse, error) { var reqBody, resBody UpdateRulesetBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateScsiLunDisplayNameBody struct { Req *types.UpdateScsiLunDisplayName `xml:"urn:vim25 UpdateScsiLunDisplayName,omitempty"` Res *types.UpdateScsiLunDisplayNameResponse `xml:"urn:vim25 UpdateScsiLunDisplayNameResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateScsiLunDisplayNameBody) Fault() *soap.Fault { return b.Fault_ } func UpdateScsiLunDisplayName(ctx context.Context, r soap.RoundTripper, req *types.UpdateScsiLunDisplayName) (*types.UpdateScsiLunDisplayNameResponse, error) { var reqBody, resBody UpdateScsiLunDisplayNameBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateSelfSignedClientCertBody struct { Req *types.UpdateSelfSignedClientCert `xml:"urn:vim25 UpdateSelfSignedClientCert,omitempty"` Res *types.UpdateSelfSignedClientCertResponse `xml:"urn:vim25 UpdateSelfSignedClientCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ } func UpdateSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.UpdateSelfSignedClientCert) (*types.UpdateSelfSignedClientCertResponse, error) { var reqBody, resBody UpdateSelfSignedClientCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateServiceConsoleVirtualNicBody struct { Req *types.UpdateServiceConsoleVirtualNic `xml:"urn:vim25 UpdateServiceConsoleVirtualNic,omitempty"` Res *types.UpdateServiceConsoleVirtualNicResponse `xml:"urn:vim25 UpdateServiceConsoleVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func UpdateServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.UpdateServiceConsoleVirtualNic) (*types.UpdateServiceConsoleVirtualNicResponse, error) { var reqBody, resBody UpdateServiceConsoleVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateServiceMessageBody struct { Req *types.UpdateServiceMessage `xml:"urn:vim25 UpdateServiceMessage,omitempty"` Res *types.UpdateServiceMessageResponse `xml:"urn:vim25 UpdateServiceMessageResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateServiceMessageBody) Fault() *soap.Fault { return b.Fault_ } func UpdateServiceMessage(ctx context.Context, r soap.RoundTripper, req *types.UpdateServiceMessage) (*types.UpdateServiceMessageResponse, error) { var reqBody, resBody UpdateServiceMessageBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateServicePolicyBody struct { Req *types.UpdateServicePolicy `xml:"urn:vim25 UpdateServicePolicy,omitempty"` Res *types.UpdateServicePolicyResponse `xml:"urn:vim25 UpdateServicePolicyResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateServicePolicyBody) Fault() *soap.Fault { return b.Fault_ } func UpdateServicePolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateServicePolicy) (*types.UpdateServicePolicyResponse, error) { var reqBody, resBody UpdateServicePolicyBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateSoftwareInternetScsiEnabledBody struct { Req *types.UpdateSoftwareInternetScsiEnabled `xml:"urn:vim25 UpdateSoftwareInternetScsiEnabled,omitempty"` Res *types.UpdateSoftwareInternetScsiEnabledResponse `xml:"urn:vim25 UpdateSoftwareInternetScsiEnabledResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateSoftwareInternetScsiEnabledBody) Fault() *soap.Fault { return b.Fault_ } func UpdateSoftwareInternetScsiEnabled(ctx context.Context, r soap.RoundTripper, req *types.UpdateSoftwareInternetScsiEnabled) (*types.UpdateSoftwareInternetScsiEnabledResponse, error) { var reqBody, resBody UpdateSoftwareInternetScsiEnabledBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateSystemResourcesBody struct { Req *types.UpdateSystemResources `xml:"urn:vim25 UpdateSystemResources,omitempty"` Res *types.UpdateSystemResourcesResponse `xml:"urn:vim25 UpdateSystemResourcesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateSystemResourcesBody) Fault() *soap.Fault { return b.Fault_ } func UpdateSystemResources(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemResources) (*types.UpdateSystemResourcesResponse, error) { var reqBody, resBody UpdateSystemResourcesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateSystemSwapConfigurationBody struct { Req *types.UpdateSystemSwapConfiguration `xml:"urn:vim25 UpdateSystemSwapConfiguration,omitempty"` Res *types.UpdateSystemSwapConfigurationResponse `xml:"urn:vim25 UpdateSystemSwapConfigurationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateSystemSwapConfigurationBody) Fault() *soap.Fault { return b.Fault_ } func UpdateSystemSwapConfiguration(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemSwapConfiguration) (*types.UpdateSystemSwapConfigurationResponse, error) { var reqBody, resBody UpdateSystemSwapConfigurationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateSystemUsersBody struct { Req *types.UpdateSystemUsers `xml:"urn:vim25 UpdateSystemUsers,omitempty"` Res *types.UpdateSystemUsersResponse `xml:"urn:vim25 UpdateSystemUsersResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateSystemUsersBody) Fault() *soap.Fault { return b.Fault_ } func UpdateSystemUsers(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemUsers) (*types.UpdateSystemUsersResponse, error) { var reqBody, resBody UpdateSystemUsersBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateUserBody struct { Req *types.UpdateUser `xml:"urn:vim25 UpdateUser,omitempty"` Res *types.UpdateUserResponse `xml:"urn:vim25 UpdateUserResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateUserBody) Fault() *soap.Fault { return b.Fault_ } func UpdateUser(ctx context.Context, r soap.RoundTripper, req *types.UpdateUser) (*types.UpdateUserResponse, error) { var reqBody, resBody UpdateUserBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVAppConfigBody struct { Req *types.UpdateVAppConfig `xml:"urn:vim25 UpdateVAppConfig,omitempty"` Res *types.UpdateVAppConfigResponse `xml:"urn:vim25 UpdateVAppConfigResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVAppConfigBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVAppConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateVAppConfig) (*types.UpdateVAppConfigResponse, error) { var reqBody, resBody UpdateVAppConfigBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVVolVirtualMachineFiles_TaskBody struct { Req *types.UpdateVVolVirtualMachineFiles_Task `xml:"urn:vim25 UpdateVVolVirtualMachineFiles_Task,omitempty"` Res *types.UpdateVVolVirtualMachineFiles_TaskResponse `xml:"urn:vim25 UpdateVVolVirtualMachineFiles_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVVolVirtualMachineFiles_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVVolVirtualMachineFiles_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVVolVirtualMachineFiles_Task) (*types.UpdateVVolVirtualMachineFiles_TaskResponse, error) { var reqBody, resBody UpdateVVolVirtualMachineFiles_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVirtualMachineFiles_TaskBody struct { Req *types.UpdateVirtualMachineFiles_Task `xml:"urn:vim25 UpdateVirtualMachineFiles_Task,omitempty"` Res *types.UpdateVirtualMachineFiles_TaskResponse `xml:"urn:vim25 UpdateVirtualMachineFiles_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVirtualMachineFiles_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVirtualMachineFiles_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualMachineFiles_Task) (*types.UpdateVirtualMachineFiles_TaskResponse, error) { var reqBody, resBody UpdateVirtualMachineFiles_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVirtualNicBody struct { Req *types.UpdateVirtualNic `xml:"urn:vim25 UpdateVirtualNic,omitempty"` Res *types.UpdateVirtualNicResponse `xml:"urn:vim25 UpdateVirtualNicResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualNic) (*types.UpdateVirtualNicResponse, error) { var reqBody, resBody UpdateVirtualNicBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVirtualSwitchBody struct { Req *types.UpdateVirtualSwitch `xml:"urn:vim25 UpdateVirtualSwitch,omitempty"` Res *types.UpdateVirtualSwitchResponse `xml:"urn:vim25 UpdateVirtualSwitchResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualSwitch) (*types.UpdateVirtualSwitchResponse, error) { var reqBody, resBody UpdateVirtualSwitchBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVmfsUnmapPriorityBody struct { Req *types.UpdateVmfsUnmapPriority `xml:"urn:vim25 UpdateVmfsUnmapPriority,omitempty"` Res *types.UpdateVmfsUnmapPriorityResponse `xml:"urn:vim25 UpdateVmfsUnmapPriorityResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVmfsUnmapPriorityBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVmfsUnmapPriority(ctx context.Context, r soap.RoundTripper, req *types.UpdateVmfsUnmapPriority) (*types.UpdateVmfsUnmapPriorityResponse, error) { var reqBody, resBody UpdateVmfsUnmapPriorityBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpdateVsan_TaskBody struct { Req *types.UpdateVsan_Task `xml:"urn:vim25 UpdateVsan_Task,omitempty"` Res *types.UpdateVsan_TaskResponse `xml:"urn:vim25 UpdateVsan_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpdateVsan_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpdateVsan_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVsan_Task) (*types.UpdateVsan_TaskResponse, error) { var reqBody, resBody UpdateVsan_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpgradeIoFilter_TaskBody struct { Req *types.UpgradeIoFilter_Task `xml:"urn:vim25 UpgradeIoFilter_Task,omitempty"` Res *types.UpgradeIoFilter_TaskResponse `xml:"urn:vim25 UpgradeIoFilter_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpgradeIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpgradeIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeIoFilter_Task) (*types.UpgradeIoFilter_TaskResponse, error) { var reqBody, resBody UpgradeIoFilter_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpgradeTools_TaskBody struct { Req *types.UpgradeTools_Task `xml:"urn:vim25 UpgradeTools_Task,omitempty"` Res *types.UpgradeTools_TaskResponse `xml:"urn:vim25 UpgradeTools_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpgradeTools_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpgradeTools_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeTools_Task) (*types.UpgradeTools_TaskResponse, error) { var reqBody, resBody UpgradeTools_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpgradeVM_TaskBody struct { Req *types.UpgradeVM_Task `xml:"urn:vim25 UpgradeVM_Task,omitempty"` Res *types.UpgradeVM_TaskResponse `xml:"urn:vim25 UpgradeVM_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpgradeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } func UpgradeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVM_Task) (*types.UpgradeVM_TaskResponse, error) { var reqBody, resBody UpgradeVM_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpgradeVmLayoutBody struct { Req *types.UpgradeVmLayout `xml:"urn:vim25 UpgradeVmLayout,omitempty"` Res *types.UpgradeVmLayoutResponse `xml:"urn:vim25 UpgradeVmLayoutResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpgradeVmLayoutBody) Fault() *soap.Fault { return b.Fault_ } func UpgradeVmLayout(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVmLayout) (*types.UpgradeVmLayoutResponse, error) { var reqBody, resBody UpgradeVmLayoutBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpgradeVmfsBody struct { Req *types.UpgradeVmfs `xml:"urn:vim25 UpgradeVmfs,omitempty"` Res *types.UpgradeVmfsResponse `xml:"urn:vim25 UpgradeVmfsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpgradeVmfsBody) Fault() *soap.Fault { return b.Fault_ } func UpgradeVmfs(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVmfs) (*types.UpgradeVmfsResponse, error) { var reqBody, resBody UpgradeVmfsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UpgradeVsanObjectsBody struct { Req *types.UpgradeVsanObjects `xml:"urn:vim25 UpgradeVsanObjects,omitempty"` Res *types.UpgradeVsanObjectsResponse `xml:"urn:vim25 UpgradeVsanObjectsResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UpgradeVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } func UpgradeVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVsanObjects) (*types.UpgradeVsanObjectsResponse, error) { var reqBody, resBody UpgradeVsanObjectsBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UploadClientCertBody struct { Req *types.UploadClientCert `xml:"urn:vim25 UploadClientCert,omitempty"` Res *types.UploadClientCertResponse `xml:"urn:vim25 UploadClientCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UploadClientCertBody) Fault() *soap.Fault { return b.Fault_ } func UploadClientCert(ctx context.Context, r soap.RoundTripper, req *types.UploadClientCert) (*types.UploadClientCertResponse, error) { var reqBody, resBody UploadClientCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type UploadKmipServerCertBody struct { Req *types.UploadKmipServerCert `xml:"urn:vim25 UploadKmipServerCert,omitempty"` Res *types.UploadKmipServerCertResponse `xml:"urn:vim25 UploadKmipServerCertResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *UploadKmipServerCertBody) Fault() *soap.Fault { return b.Fault_ } func UploadKmipServerCert(ctx context.Context, r soap.RoundTripper, req *types.UploadKmipServerCert) (*types.UploadKmipServerCertResponse, error) { var reqBody, resBody UploadKmipServerCertBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ValidateCredentialsInGuestBody struct { Req *types.ValidateCredentialsInGuest `xml:"urn:vim25 ValidateCredentialsInGuest,omitempty"` Res *types.ValidateCredentialsInGuestResponse `xml:"urn:vim25 ValidateCredentialsInGuestResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ValidateCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ } func ValidateCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.ValidateCredentialsInGuest) (*types.ValidateCredentialsInGuestResponse, error) { var reqBody, resBody ValidateCredentialsInGuestBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ValidateHostBody struct { Req *types.ValidateHost `xml:"urn:vim25 ValidateHost,omitempty"` Res *types.ValidateHostResponse `xml:"urn:vim25 ValidateHostResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ValidateHostBody) Fault() *soap.Fault { return b.Fault_ } func ValidateHost(ctx context.Context, r soap.RoundTripper, req *types.ValidateHost) (*types.ValidateHostResponse, error) { var reqBody, resBody ValidateHostBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ValidateMigrationBody struct { Req *types.ValidateMigration `xml:"urn:vim25 ValidateMigration,omitempty"` Res *types.ValidateMigrationResponse `xml:"urn:vim25 ValidateMigrationResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ValidateMigrationBody) Fault() *soap.Fault { return b.Fault_ } func ValidateMigration(ctx context.Context, r soap.RoundTripper, req *types.ValidateMigration) (*types.ValidateMigrationResponse, error) { var reqBody, resBody ValidateMigrationBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type WaitForUpdatesBody struct { Req *types.WaitForUpdates `xml:"urn:vim25 WaitForUpdates,omitempty"` Res *types.WaitForUpdatesResponse `xml:"urn:vim25 WaitForUpdatesResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *WaitForUpdatesBody) Fault() *soap.Fault { return b.Fault_ } func WaitForUpdates(ctx context.Context, r soap.RoundTripper, req *types.WaitForUpdates) (*types.WaitForUpdatesResponse, error) { var reqBody, resBody WaitForUpdatesBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type WaitForUpdatesExBody struct { Req *types.WaitForUpdatesEx `xml:"urn:vim25 WaitForUpdatesEx,omitempty"` Res *types.WaitForUpdatesExResponse `xml:"urn:vim25 WaitForUpdatesExResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *WaitForUpdatesExBody) Fault() *soap.Fault { return b.Fault_ } func WaitForUpdatesEx(ctx context.Context, r soap.RoundTripper, req *types.WaitForUpdatesEx) (*types.WaitForUpdatesExResponse, error) { var reqBody, resBody WaitForUpdatesExBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type XmlToCustomizationSpecItemBody struct { Req *types.XmlToCustomizationSpecItem `xml:"urn:vim25 XmlToCustomizationSpecItem,omitempty"` Res *types.XmlToCustomizationSpecItemResponse `xml:"urn:vim25 XmlToCustomizationSpecItemResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *XmlToCustomizationSpecItemBody) Fault() *soap.Fault { return b.Fault_ } func XmlToCustomizationSpecItem(ctx context.Context, r soap.RoundTripper, req *types.XmlToCustomizationSpecItem) (*types.XmlToCustomizationSpecItemResponse, error) { var reqBody, resBody XmlToCustomizationSpecItemBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } type ZeroFillVirtualDisk_TaskBody struct { Req *types.ZeroFillVirtualDisk_Task `xml:"urn:vim25 ZeroFillVirtualDisk_Task,omitempty"` Res *types.ZeroFillVirtualDisk_TaskResponse `xml:"urn:vim25 ZeroFillVirtualDisk_TaskResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` } func (b *ZeroFillVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } func ZeroFillVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ZeroFillVirtualDisk_Task) (*types.ZeroFillVirtualDisk_TaskResponse, error) { var reqBody, resBody ZeroFillVirtualDisk_TaskBody reqBody.Req = req if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { return nil, err } return resBody.Res, nil } govmomi-0.15.0/vim25/methods/service_content.go000066400000000000000000000025361312205533500214050ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package methods import ( "context" "time" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) var ServiceInstance = types.ManagedObjectReference{ Type: "ServiceInstance", Value: "ServiceInstance", } func GetServiceContent(ctx context.Context, r soap.RoundTripper) (types.ServiceContent, error) { req := types.RetrieveServiceContent{ This: ServiceInstance, } res, err := RetrieveServiceContent(ctx, r, &req) if err != nil { return types.ServiceContent{}, err } return res.Returnval, nil } func GetCurrentTime(ctx context.Context, r soap.RoundTripper) (*time.Time, error) { req := types.CurrentTime{ This: ServiceInstance, } res, err := CurrentTime(ctx, r, &req) if err != nil { return nil, err } return &res.Returnval, nil } govmomi-0.15.0/vim25/mo/000077500000000000000000000000001312205533500146265ustar00rootroot00000000000000govmomi-0.15.0/vim25/mo/ancestors.go000066400000000000000000000070511312205533500171610ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import ( "context" "fmt" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) // Ancestors returns the entire ancestry tree of a specified managed object. // The return value includes the root node and the specified object itself. func Ancestors(ctx context.Context, rt soap.RoundTripper, pc, obj types.ManagedObjectReference) ([]ManagedEntity, error) { ospec := types.ObjectSpec{ Obj: obj, SelectSet: []types.BaseSelectionSpec{ &types.TraversalSpec{ SelectionSpec: types.SelectionSpec{Name: "traverseParent"}, Type: "ManagedEntity", Path: "parent", Skip: types.NewBool(false), SelectSet: []types.BaseSelectionSpec{ &types.SelectionSpec{Name: "traverseParent"}, }, }, &types.TraversalSpec{ SelectionSpec: types.SelectionSpec{}, Type: "VirtualMachine", Path: "parentVApp", Skip: types.NewBool(false), SelectSet: []types.BaseSelectionSpec{ &types.SelectionSpec{Name: "traverseParent"}, }, }, }, Skip: types.NewBool(false), } pspec := []types.PropertySpec{ { Type: "ManagedEntity", PathSet: []string{"name", "parent"}, }, { Type: "VirtualMachine", PathSet: []string{"parentVApp"}, }, } req := types.RetrieveProperties{ This: pc, SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ospec}, PropSet: pspec, }, }, } var ifaces []interface{} err := RetrievePropertiesForRequest(ctx, rt, req, &ifaces) if err != nil { return nil, err } var out []ManagedEntity // Build ancestry tree by iteratively finding a new child. for len(out) < len(ifaces) { var find types.ManagedObjectReference if len(out) > 0 { find = out[len(out)-1].Self } // Find entity we're looking for given the last entity in the current tree. for _, iface := range ifaces { me := iface.(IsManagedEntity).GetManagedEntity() if me.Name == "" { // The types below have their own 'Name' field, so ManagedEntity.Name (me.Name) is empty. // We only hit this case when the 'obj' param is one of these types. // In most cases, 'obj' is a Folder so Name isn't collected in this call. switch x := iface.(type) { case Network: me.Name = x.Name case DistributedVirtualSwitch: me.Name = x.Name case DistributedVirtualPortgroup: me.Name = x.Name case OpaqueNetwork: me.Name = x.Name default: // ManagedEntity always has a Name, if we hit this point we missed a case above. panic(fmt.Sprintf("%#v Name is empty", me.Reference())) } } if me.Parent == nil { // Special case for VirtualMachine within VirtualApp, // unlikely to hit this other than via Finder.Element() switch x := iface.(type) { case VirtualMachine: me.Parent = x.ParentVApp } } if me.Parent == nil { out = append(out, me) break } if *me.Parent == find { out = append(out, me) break } } } return out, nil } govmomi-0.15.0/vim25/mo/entity.go000066400000000000000000000013671312205533500165000ustar00rootroot00000000000000/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo // Entity is the interface that is implemented by all managed objects // that extend ManagedEntity. type Entity interface { Reference Entity() *ManagedEntity } govmomi-0.15.0/vim25/mo/extra.go000066400000000000000000000027601312205533500163050ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo type IsManagedEntity interface { GetManagedEntity() ManagedEntity } func (m ComputeResource) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m Datacenter) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m Datastore) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m DistributedVirtualSwitch) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m DistributedVirtualPortgroup) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m Folder) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m HostSystem) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m Network) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m ResourcePool) GetManagedEntity() ManagedEntity { return m.ManagedEntity } func (m VirtualMachine) GetManagedEntity() ManagedEntity { return m.ManagedEntity } govmomi-0.15.0/vim25/mo/fixtures/000077500000000000000000000000001312205533500164775ustar00rootroot00000000000000govmomi-0.15.0/vim25/mo/fixtures/cluster_host_property.xml000066400000000000000000000015251312205533500237060ustar00rootroot00000000000000 domain-c7 host host-14 host-17 host-19 host-52 govmomi-0.15.0/vim25/mo/fixtures/hostsystem_list_name_property.xml000066400000000000000000000010471312205533500254440ustar00rootroot00000000000000 host-10 name host-01.example.com host-30 name host-02.example.com govmomi-0.15.0/vim25/mo/fixtures/nested_property.xml000066400000000000000000000010351312205533500224460ustar00rootroot00000000000000 vm-411 config.name kubernetes-master config.uuid 422ec880-ab06-06b4-23f3-beb7a052a4c9 govmomi-0.15.0/vim25/mo/fixtures/not_authenticated_fault.xml000066400000000000000000000026501312205533500241210ustar00rootroot00000000000000 SessionManager defaultLocale en messageLocaleList ja zh_CN en de zh_TW ko fr message group-d1 System.View sessionList group-d1 Sessions.TerminateSession govmomi-0.15.0/vim25/mo/fixtures/pointer_property.xml000066400000000000000000000011231312205533500226420ustar00rootroot00000000000000 vm-411 config.bootOptions 0 false false 10000 govmomi-0.15.0/vim25/mo/mo.go000066400000000000000000001306131312205533500155740ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import ( "reflect" "time" "github.com/vmware/govmomi/vim25/types" ) type Alarm struct { ExtensibleManagedObject Info types.AlarmInfo `mo:"info"` } func init() { t["Alarm"] = reflect.TypeOf((*Alarm)(nil)).Elem() } type AlarmManager struct { Self types.ManagedObjectReference DefaultExpression []types.BaseAlarmExpression `mo:"defaultExpression"` Description types.AlarmDescription `mo:"description"` } func (m AlarmManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["AlarmManager"] = reflect.TypeOf((*AlarmManager)(nil)).Elem() } type AuthorizationManager struct { Self types.ManagedObjectReference PrivilegeList []types.AuthorizationPrivilege `mo:"privilegeList"` RoleList []types.AuthorizationRole `mo:"roleList"` Description types.AuthorizationDescription `mo:"description"` } func (m AuthorizationManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["AuthorizationManager"] = reflect.TypeOf((*AuthorizationManager)(nil)).Elem() } type CertificateManager struct { Self types.ManagedObjectReference } func (m CertificateManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["CertificateManager"] = reflect.TypeOf((*CertificateManager)(nil)).Elem() } type ClusterComputeResource struct { ComputeResource Configuration types.ClusterConfigInfo `mo:"configuration"` Recommendation []types.ClusterRecommendation `mo:"recommendation"` DrsRecommendation []types.ClusterDrsRecommendation `mo:"drsRecommendation"` MigrationHistory []types.ClusterDrsMigration `mo:"migrationHistory"` ActionHistory []types.ClusterActionHistory `mo:"actionHistory"` DrsFault []types.ClusterDrsFaults `mo:"drsFault"` } func init() { t["ClusterComputeResource"] = reflect.TypeOf((*ClusterComputeResource)(nil)).Elem() } type ClusterEVCManager struct { ExtensibleManagedObject ManagedCluster types.ManagedObjectReference `mo:"managedCluster"` EvcState types.ClusterEVCManagerEVCState `mo:"evcState"` } func init() { t["ClusterEVCManager"] = reflect.TypeOf((*ClusterEVCManager)(nil)).Elem() } type ClusterProfile struct { Profile } func init() { t["ClusterProfile"] = reflect.TypeOf((*ClusterProfile)(nil)).Elem() } type ClusterProfileManager struct { ProfileManager } func init() { t["ClusterProfileManager"] = reflect.TypeOf((*ClusterProfileManager)(nil)).Elem() } type ComputeResource struct { ManagedEntity ResourcePool *types.ManagedObjectReference `mo:"resourcePool"` Host []types.ManagedObjectReference `mo:"host"` Datastore []types.ManagedObjectReference `mo:"datastore"` Network []types.ManagedObjectReference `mo:"network"` Summary types.BaseComputeResourceSummary `mo:"summary"` EnvironmentBrowser *types.ManagedObjectReference `mo:"environmentBrowser"` ConfigurationEx types.BaseComputeResourceConfigInfo `mo:"configurationEx"` } func (m *ComputeResource) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["ComputeResource"] = reflect.TypeOf((*ComputeResource)(nil)).Elem() } type ContainerView struct { ManagedObjectView Container types.ManagedObjectReference `mo:"container"` Type []string `mo:"type"` Recursive bool `mo:"recursive"` } func init() { t["ContainerView"] = reflect.TypeOf((*ContainerView)(nil)).Elem() } type CryptoManager struct { Self types.ManagedObjectReference Enabled bool `mo:"enabled"` } func (m CryptoManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["CryptoManager"] = reflect.TypeOf((*CryptoManager)(nil)).Elem() } type CryptoManagerKmip struct { CryptoManager KmipServers []types.KmipClusterInfo `mo:"kmipServers"` } func init() { t["CryptoManagerKmip"] = reflect.TypeOf((*CryptoManagerKmip)(nil)).Elem() } type CustomFieldsManager struct { Self types.ManagedObjectReference Field []types.CustomFieldDef `mo:"field"` } func (m CustomFieldsManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["CustomFieldsManager"] = reflect.TypeOf((*CustomFieldsManager)(nil)).Elem() } type CustomizationSpecManager struct { Self types.ManagedObjectReference Info []types.CustomizationSpecInfo `mo:"info"` EncryptionKey []byte `mo:"encryptionKey"` } func (m CustomizationSpecManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["CustomizationSpecManager"] = reflect.TypeOf((*CustomizationSpecManager)(nil)).Elem() } type Datacenter struct { ManagedEntity VmFolder types.ManagedObjectReference `mo:"vmFolder"` HostFolder types.ManagedObjectReference `mo:"hostFolder"` DatastoreFolder types.ManagedObjectReference `mo:"datastoreFolder"` NetworkFolder types.ManagedObjectReference `mo:"networkFolder"` Datastore []types.ManagedObjectReference `mo:"datastore"` Network []types.ManagedObjectReference `mo:"network"` Configuration types.DatacenterConfigInfo `mo:"configuration"` } func (m *Datacenter) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["Datacenter"] = reflect.TypeOf((*Datacenter)(nil)).Elem() } type Datastore struct { ManagedEntity Info types.BaseDatastoreInfo `mo:"info"` Summary types.DatastoreSummary `mo:"summary"` Host []types.DatastoreHostMount `mo:"host"` Vm []types.ManagedObjectReference `mo:"vm"` Browser types.ManagedObjectReference `mo:"browser"` Capability types.DatastoreCapability `mo:"capability"` IormConfiguration *types.StorageIORMInfo `mo:"iormConfiguration"` } func (m *Datastore) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["Datastore"] = reflect.TypeOf((*Datastore)(nil)).Elem() } type DatastoreNamespaceManager struct { Self types.ManagedObjectReference } func (m DatastoreNamespaceManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["DatastoreNamespaceManager"] = reflect.TypeOf((*DatastoreNamespaceManager)(nil)).Elem() } type DiagnosticManager struct { Self types.ManagedObjectReference } func (m DiagnosticManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["DiagnosticManager"] = reflect.TypeOf((*DiagnosticManager)(nil)).Elem() } type DistributedVirtualPortgroup struct { Network Key string `mo:"key"` Config types.DVPortgroupConfigInfo `mo:"config"` PortKeys []string `mo:"portKeys"` } func init() { t["DistributedVirtualPortgroup"] = reflect.TypeOf((*DistributedVirtualPortgroup)(nil)).Elem() } type DistributedVirtualSwitch struct { ManagedEntity Uuid string `mo:"uuid"` Capability types.DVSCapability `mo:"capability"` Summary types.DVSSummary `mo:"summary"` Config types.BaseDVSConfigInfo `mo:"config"` NetworkResourcePool []types.DVSNetworkResourcePool `mo:"networkResourcePool"` Portgroup []types.ManagedObjectReference `mo:"portgroup"` Runtime *types.DVSRuntimeInfo `mo:"runtime"` } func (m *DistributedVirtualSwitch) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["DistributedVirtualSwitch"] = reflect.TypeOf((*DistributedVirtualSwitch)(nil)).Elem() } type DistributedVirtualSwitchManager struct { Self types.ManagedObjectReference } func (m DistributedVirtualSwitchManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["DistributedVirtualSwitchManager"] = reflect.TypeOf((*DistributedVirtualSwitchManager)(nil)).Elem() } type EnvironmentBrowser struct { Self types.ManagedObjectReference DatastoreBrowser *types.ManagedObjectReference `mo:"datastoreBrowser"` } func (m EnvironmentBrowser) Reference() types.ManagedObjectReference { return m.Self } func init() { t["EnvironmentBrowser"] = reflect.TypeOf((*EnvironmentBrowser)(nil)).Elem() } type EventHistoryCollector struct { HistoryCollector LatestPage []types.BaseEvent `mo:"latestPage"` } func init() { t["EventHistoryCollector"] = reflect.TypeOf((*EventHistoryCollector)(nil)).Elem() } type EventManager struct { Self types.ManagedObjectReference Description types.EventDescription `mo:"description"` LatestEvent types.BaseEvent `mo:"latestEvent"` MaxCollector int32 `mo:"maxCollector"` } func (m EventManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["EventManager"] = reflect.TypeOf((*EventManager)(nil)).Elem() } type ExtensibleManagedObject struct { Self types.ManagedObjectReference Value []types.BaseCustomFieldValue `mo:"value"` AvailableField []types.CustomFieldDef `mo:"availableField"` } func (m ExtensibleManagedObject) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ExtensibleManagedObject"] = reflect.TypeOf((*ExtensibleManagedObject)(nil)).Elem() } type ExtensionManager struct { Self types.ManagedObjectReference ExtensionList []types.Extension `mo:"extensionList"` } func (m ExtensionManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ExtensionManager"] = reflect.TypeOf((*ExtensionManager)(nil)).Elem() } type FailoverClusterConfigurator struct { Self types.ManagedObjectReference DisabledConfigureMethod []string `mo:"disabledConfigureMethod"` } func (m FailoverClusterConfigurator) Reference() types.ManagedObjectReference { return m.Self } func init() { t["FailoverClusterConfigurator"] = reflect.TypeOf((*FailoverClusterConfigurator)(nil)).Elem() } type FailoverClusterManager struct { Self types.ManagedObjectReference DisabledClusterMethod []string `mo:"disabledClusterMethod"` } func (m FailoverClusterManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["FailoverClusterManager"] = reflect.TypeOf((*FailoverClusterManager)(nil)).Elem() } type FileManager struct { Self types.ManagedObjectReference } func (m FileManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["FileManager"] = reflect.TypeOf((*FileManager)(nil)).Elem() } type Folder struct { ManagedEntity ChildType []string `mo:"childType"` ChildEntity []types.ManagedObjectReference `mo:"childEntity"` } func (m *Folder) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["Folder"] = reflect.TypeOf((*Folder)(nil)).Elem() } type GuestAliasManager struct { Self types.ManagedObjectReference } func (m GuestAliasManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["GuestAliasManager"] = reflect.TypeOf((*GuestAliasManager)(nil)).Elem() } type GuestAuthManager struct { Self types.ManagedObjectReference } func (m GuestAuthManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["GuestAuthManager"] = reflect.TypeOf((*GuestAuthManager)(nil)).Elem() } type GuestFileManager struct { Self types.ManagedObjectReference } func (m GuestFileManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["GuestFileManager"] = reflect.TypeOf((*GuestFileManager)(nil)).Elem() } type GuestOperationsManager struct { Self types.ManagedObjectReference AuthManager *types.ManagedObjectReference `mo:"authManager"` FileManager *types.ManagedObjectReference `mo:"fileManager"` ProcessManager *types.ManagedObjectReference `mo:"processManager"` GuestWindowsRegistryManager *types.ManagedObjectReference `mo:"guestWindowsRegistryManager"` AliasManager *types.ManagedObjectReference `mo:"aliasManager"` } func (m GuestOperationsManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["GuestOperationsManager"] = reflect.TypeOf((*GuestOperationsManager)(nil)).Elem() } type GuestProcessManager struct { Self types.ManagedObjectReference } func (m GuestProcessManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["GuestProcessManager"] = reflect.TypeOf((*GuestProcessManager)(nil)).Elem() } type GuestWindowsRegistryManager struct { Self types.ManagedObjectReference } func (m GuestWindowsRegistryManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["GuestWindowsRegistryManager"] = reflect.TypeOf((*GuestWindowsRegistryManager)(nil)).Elem() } type HealthUpdateManager struct { Self types.ManagedObjectReference } func (m HealthUpdateManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HealthUpdateManager"] = reflect.TypeOf((*HealthUpdateManager)(nil)).Elem() } type HistoryCollector struct { Self types.ManagedObjectReference Filter types.AnyType `mo:"filter"` } func (m HistoryCollector) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HistoryCollector"] = reflect.TypeOf((*HistoryCollector)(nil)).Elem() } type HostAccessManager struct { Self types.ManagedObjectReference LockdownMode types.HostLockdownMode `mo:"lockdownMode"` } func (m HostAccessManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostAccessManager"] = reflect.TypeOf((*HostAccessManager)(nil)).Elem() } type HostActiveDirectoryAuthentication struct { HostDirectoryStore } func init() { t["HostActiveDirectoryAuthentication"] = reflect.TypeOf((*HostActiveDirectoryAuthentication)(nil)).Elem() } type HostAuthenticationManager struct { Self types.ManagedObjectReference Info types.HostAuthenticationManagerInfo `mo:"info"` SupportedStore []types.ManagedObjectReference `mo:"supportedStore"` } func (m HostAuthenticationManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostAuthenticationManager"] = reflect.TypeOf((*HostAuthenticationManager)(nil)).Elem() } type HostAuthenticationStore struct { Self types.ManagedObjectReference Info types.BaseHostAuthenticationStoreInfo `mo:"info"` } func (m HostAuthenticationStore) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostAuthenticationStore"] = reflect.TypeOf((*HostAuthenticationStore)(nil)).Elem() } type HostAutoStartManager struct { Self types.ManagedObjectReference Config types.HostAutoStartManagerConfig `mo:"config"` } func (m HostAutoStartManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostAutoStartManager"] = reflect.TypeOf((*HostAutoStartManager)(nil)).Elem() } type HostBootDeviceSystem struct { Self types.ManagedObjectReference } func (m HostBootDeviceSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostBootDeviceSystem"] = reflect.TypeOf((*HostBootDeviceSystem)(nil)).Elem() } type HostCacheConfigurationManager struct { Self types.ManagedObjectReference CacheConfigurationInfo []types.HostCacheConfigurationInfo `mo:"cacheConfigurationInfo"` } func (m HostCacheConfigurationManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostCacheConfigurationManager"] = reflect.TypeOf((*HostCacheConfigurationManager)(nil)).Elem() } type HostCertificateManager struct { Self types.ManagedObjectReference CertificateInfo types.HostCertificateManagerCertificateInfo `mo:"certificateInfo"` } func (m HostCertificateManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostCertificateManager"] = reflect.TypeOf((*HostCertificateManager)(nil)).Elem() } type HostCpuSchedulerSystem struct { ExtensibleManagedObject HyperthreadInfo *types.HostHyperThreadScheduleInfo `mo:"hyperthreadInfo"` } func init() { t["HostCpuSchedulerSystem"] = reflect.TypeOf((*HostCpuSchedulerSystem)(nil)).Elem() } type HostDatastoreBrowser struct { Self types.ManagedObjectReference Datastore []types.ManagedObjectReference `mo:"datastore"` SupportedType []types.BaseFileQuery `mo:"supportedType"` } func (m HostDatastoreBrowser) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostDatastoreBrowser"] = reflect.TypeOf((*HostDatastoreBrowser)(nil)).Elem() } type HostDatastoreSystem struct { Self types.ManagedObjectReference Datastore []types.ManagedObjectReference `mo:"datastore"` Capabilities types.HostDatastoreSystemCapabilities `mo:"capabilities"` } func (m HostDatastoreSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostDatastoreSystem"] = reflect.TypeOf((*HostDatastoreSystem)(nil)).Elem() } type HostDateTimeSystem struct { Self types.ManagedObjectReference DateTimeInfo types.HostDateTimeInfo `mo:"dateTimeInfo"` } func (m HostDateTimeSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostDateTimeSystem"] = reflect.TypeOf((*HostDateTimeSystem)(nil)).Elem() } type HostDiagnosticSystem struct { Self types.ManagedObjectReference ActivePartition *types.HostDiagnosticPartition `mo:"activePartition"` } func (m HostDiagnosticSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostDiagnosticSystem"] = reflect.TypeOf((*HostDiagnosticSystem)(nil)).Elem() } type HostDirectoryStore struct { HostAuthenticationStore } func init() { t["HostDirectoryStore"] = reflect.TypeOf((*HostDirectoryStore)(nil)).Elem() } type HostEsxAgentHostManager struct { Self types.ManagedObjectReference ConfigInfo types.HostEsxAgentHostManagerConfigInfo `mo:"configInfo"` } func (m HostEsxAgentHostManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostEsxAgentHostManager"] = reflect.TypeOf((*HostEsxAgentHostManager)(nil)).Elem() } type HostFirewallSystem struct { ExtensibleManagedObject FirewallInfo *types.HostFirewallInfo `mo:"firewallInfo"` } func init() { t["HostFirewallSystem"] = reflect.TypeOf((*HostFirewallSystem)(nil)).Elem() } type HostFirmwareSystem struct { Self types.ManagedObjectReference } func (m HostFirmwareSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostFirmwareSystem"] = reflect.TypeOf((*HostFirmwareSystem)(nil)).Elem() } type HostGraphicsManager struct { ExtensibleManagedObject GraphicsInfo []types.HostGraphicsInfo `mo:"graphicsInfo"` GraphicsConfig *types.HostGraphicsConfig `mo:"graphicsConfig"` SharedPassthruGpuTypes []string `mo:"sharedPassthruGpuTypes"` } func init() { t["HostGraphicsManager"] = reflect.TypeOf((*HostGraphicsManager)(nil)).Elem() } type HostHealthStatusSystem struct { Self types.ManagedObjectReference Runtime types.HealthSystemRuntime `mo:"runtime"` } func (m HostHealthStatusSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostHealthStatusSystem"] = reflect.TypeOf((*HostHealthStatusSystem)(nil)).Elem() } type HostImageConfigManager struct { Self types.ManagedObjectReference } func (m HostImageConfigManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostImageConfigManager"] = reflect.TypeOf((*HostImageConfigManager)(nil)).Elem() } type HostKernelModuleSystem struct { Self types.ManagedObjectReference } func (m HostKernelModuleSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostKernelModuleSystem"] = reflect.TypeOf((*HostKernelModuleSystem)(nil)).Elem() } type HostLocalAccountManager struct { Self types.ManagedObjectReference } func (m HostLocalAccountManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostLocalAccountManager"] = reflect.TypeOf((*HostLocalAccountManager)(nil)).Elem() } type HostLocalAuthentication struct { HostAuthenticationStore } func init() { t["HostLocalAuthentication"] = reflect.TypeOf((*HostLocalAuthentication)(nil)).Elem() } type HostMemorySystem struct { ExtensibleManagedObject ConsoleReservationInfo *types.ServiceConsoleReservationInfo `mo:"consoleReservationInfo"` VirtualMachineReservationInfo *types.VirtualMachineMemoryReservationInfo `mo:"virtualMachineReservationInfo"` } func init() { t["HostMemorySystem"] = reflect.TypeOf((*HostMemorySystem)(nil)).Elem() } type HostNetworkSystem struct { ExtensibleManagedObject Capabilities *types.HostNetCapabilities `mo:"capabilities"` NetworkInfo *types.HostNetworkInfo `mo:"networkInfo"` OffloadCapabilities *types.HostNetOffloadCapabilities `mo:"offloadCapabilities"` NetworkConfig *types.HostNetworkConfig `mo:"networkConfig"` DnsConfig types.BaseHostDnsConfig `mo:"dnsConfig"` IpRouteConfig types.BaseHostIpRouteConfig `mo:"ipRouteConfig"` ConsoleIpRouteConfig types.BaseHostIpRouteConfig `mo:"consoleIpRouteConfig"` } func init() { t["HostNetworkSystem"] = reflect.TypeOf((*HostNetworkSystem)(nil)).Elem() } type HostPatchManager struct { Self types.ManagedObjectReference } func (m HostPatchManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostPatchManager"] = reflect.TypeOf((*HostPatchManager)(nil)).Elem() } type HostPciPassthruSystem struct { ExtensibleManagedObject PciPassthruInfo []types.BaseHostPciPassthruInfo `mo:"pciPassthruInfo"` SriovDevicePoolInfo []types.BaseHostSriovDevicePoolInfo `mo:"sriovDevicePoolInfo"` } func init() { t["HostPciPassthruSystem"] = reflect.TypeOf((*HostPciPassthruSystem)(nil)).Elem() } type HostPowerSystem struct { Self types.ManagedObjectReference Capability types.PowerSystemCapability `mo:"capability"` Info types.PowerSystemInfo `mo:"info"` } func (m HostPowerSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostPowerSystem"] = reflect.TypeOf((*HostPowerSystem)(nil)).Elem() } type HostProfile struct { Profile ReferenceHost *types.ManagedObjectReference `mo:"referenceHost"` } func init() { t["HostProfile"] = reflect.TypeOf((*HostProfile)(nil)).Elem() } type HostProfileManager struct { ProfileManager } func init() { t["HostProfileManager"] = reflect.TypeOf((*HostProfileManager)(nil)).Elem() } type HostServiceSystem struct { ExtensibleManagedObject ServiceInfo types.HostServiceInfo `mo:"serviceInfo"` } func init() { t["HostServiceSystem"] = reflect.TypeOf((*HostServiceSystem)(nil)).Elem() } type HostSnmpSystem struct { Self types.ManagedObjectReference Configuration types.HostSnmpConfigSpec `mo:"configuration"` Limits types.HostSnmpSystemAgentLimits `mo:"limits"` } func (m HostSnmpSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostSnmpSystem"] = reflect.TypeOf((*HostSnmpSystem)(nil)).Elem() } type HostSpecificationManager struct { Self types.ManagedObjectReference } func (m HostSpecificationManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostSpecificationManager"] = reflect.TypeOf((*HostSpecificationManager)(nil)).Elem() } type HostStorageSystem struct { ExtensibleManagedObject StorageDeviceInfo *types.HostStorageDeviceInfo `mo:"storageDeviceInfo"` FileSystemVolumeInfo types.HostFileSystemVolumeInfo `mo:"fileSystemVolumeInfo"` SystemFile []string `mo:"systemFile"` MultipathStateInfo *types.HostMultipathStateInfo `mo:"multipathStateInfo"` } func init() { t["HostStorageSystem"] = reflect.TypeOf((*HostStorageSystem)(nil)).Elem() } type HostSystem struct { ManagedEntity Runtime types.HostRuntimeInfo `mo:"runtime"` Summary types.HostListSummary `mo:"summary"` Hardware *types.HostHardwareInfo `mo:"hardware"` Capability *types.HostCapability `mo:"capability"` LicensableResource types.HostLicensableResourceInfo `mo:"licensableResource"` ConfigManager types.HostConfigManager `mo:"configManager"` Config *types.HostConfigInfo `mo:"config"` Vm []types.ManagedObjectReference `mo:"vm"` Datastore []types.ManagedObjectReference `mo:"datastore"` Network []types.ManagedObjectReference `mo:"network"` DatastoreBrowser types.ManagedObjectReference `mo:"datastoreBrowser"` SystemResources *types.HostSystemResourceInfo `mo:"systemResources"` } func (m *HostSystem) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["HostSystem"] = reflect.TypeOf((*HostSystem)(nil)).Elem() } type HostVFlashManager struct { Self types.ManagedObjectReference VFlashConfigInfo *types.HostVFlashManagerVFlashConfigInfo `mo:"vFlashConfigInfo"` } func (m HostVFlashManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostVFlashManager"] = reflect.TypeOf((*HostVFlashManager)(nil)).Elem() } type HostVMotionSystem struct { ExtensibleManagedObject NetConfig *types.HostVMotionNetConfig `mo:"netConfig"` IpConfig *types.HostIpConfig `mo:"ipConfig"` } func init() { t["HostVMotionSystem"] = reflect.TypeOf((*HostVMotionSystem)(nil)).Elem() } type HostVStorageObjectManager struct { VStorageObjectManagerBase } func init() { t["HostVStorageObjectManager"] = reflect.TypeOf((*HostVStorageObjectManager)(nil)).Elem() } type HostVirtualNicManager struct { ExtensibleManagedObject Info types.HostVirtualNicManagerInfo `mo:"info"` } func init() { t["HostVirtualNicManager"] = reflect.TypeOf((*HostVirtualNicManager)(nil)).Elem() } type HostVsanInternalSystem struct { Self types.ManagedObjectReference } func (m HostVsanInternalSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostVsanInternalSystem"] = reflect.TypeOf((*HostVsanInternalSystem)(nil)).Elem() } type HostVsanSystem struct { Self types.ManagedObjectReference Config types.VsanHostConfigInfo `mo:"config"` } func (m HostVsanSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HostVsanSystem"] = reflect.TypeOf((*HostVsanSystem)(nil)).Elem() } type HttpNfcLease struct { Self types.ManagedObjectReference InitializeProgress int32 `mo:"initializeProgress"` Info *types.HttpNfcLeaseInfo `mo:"info"` State types.HttpNfcLeaseState `mo:"state"` Error *types.LocalizedMethodFault `mo:"error"` } func (m HttpNfcLease) Reference() types.ManagedObjectReference { return m.Self } func init() { t["HttpNfcLease"] = reflect.TypeOf((*HttpNfcLease)(nil)).Elem() } type InventoryView struct { ManagedObjectView } func init() { t["InventoryView"] = reflect.TypeOf((*InventoryView)(nil)).Elem() } type IoFilterManager struct { Self types.ManagedObjectReference } func (m IoFilterManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["IoFilterManager"] = reflect.TypeOf((*IoFilterManager)(nil)).Elem() } type IpPoolManager struct { Self types.ManagedObjectReference } func (m IpPoolManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["IpPoolManager"] = reflect.TypeOf((*IpPoolManager)(nil)).Elem() } type IscsiManager struct { Self types.ManagedObjectReference } func (m IscsiManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["IscsiManager"] = reflect.TypeOf((*IscsiManager)(nil)).Elem() } type LicenseAssignmentManager struct { Self types.ManagedObjectReference } func (m LicenseAssignmentManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["LicenseAssignmentManager"] = reflect.TypeOf((*LicenseAssignmentManager)(nil)).Elem() } type LicenseManager struct { Self types.ManagedObjectReference Source types.BaseLicenseSource `mo:"source"` SourceAvailable bool `mo:"sourceAvailable"` Diagnostics *types.LicenseDiagnostics `mo:"diagnostics"` FeatureInfo []types.LicenseFeatureInfo `mo:"featureInfo"` LicensedEdition string `mo:"licensedEdition"` Licenses []types.LicenseManagerLicenseInfo `mo:"licenses"` LicenseAssignmentManager *types.ManagedObjectReference `mo:"licenseAssignmentManager"` Evaluation types.LicenseManagerEvaluationInfo `mo:"evaluation"` } func (m LicenseManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["LicenseManager"] = reflect.TypeOf((*LicenseManager)(nil)).Elem() } type ListView struct { ManagedObjectView } func init() { t["ListView"] = reflect.TypeOf((*ListView)(nil)).Elem() } type LocalizationManager struct { Self types.ManagedObjectReference Catalog []types.LocalizationManagerMessageCatalog `mo:"catalog"` } func (m LocalizationManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["LocalizationManager"] = reflect.TypeOf((*LocalizationManager)(nil)).Elem() } type ManagedEntity struct { ExtensibleManagedObject Parent *types.ManagedObjectReference `mo:"parent"` CustomValue []types.BaseCustomFieldValue `mo:"customValue"` OverallStatus types.ManagedEntityStatus `mo:"overallStatus"` ConfigStatus types.ManagedEntityStatus `mo:"configStatus"` ConfigIssue []types.BaseEvent `mo:"configIssue"` EffectiveRole []int32 `mo:"effectiveRole"` Permission []types.Permission `mo:"permission"` Name string `mo:"name"` DisabledMethod []string `mo:"disabledMethod"` RecentTask []types.ManagedObjectReference `mo:"recentTask"` DeclaredAlarmState []types.AlarmState `mo:"declaredAlarmState"` TriggeredAlarmState []types.AlarmState `mo:"triggeredAlarmState"` AlarmActionsEnabled *bool `mo:"alarmActionsEnabled"` Tag []types.Tag `mo:"tag"` } func init() { t["ManagedEntity"] = reflect.TypeOf((*ManagedEntity)(nil)).Elem() } type ManagedObjectView struct { Self types.ManagedObjectReference View []types.ManagedObjectReference `mo:"view"` } func (m ManagedObjectView) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ManagedObjectView"] = reflect.TypeOf((*ManagedObjectView)(nil)).Elem() } type MessageBusProxy struct { Self types.ManagedObjectReference } func (m MessageBusProxy) Reference() types.ManagedObjectReference { return m.Self } func init() { t["MessageBusProxy"] = reflect.TypeOf((*MessageBusProxy)(nil)).Elem() } type Network struct { ManagedEntity Name string `mo:"name"` Summary types.BaseNetworkSummary `mo:"summary"` Host []types.ManagedObjectReference `mo:"host"` Vm []types.ManagedObjectReference `mo:"vm"` } func (m *Network) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["Network"] = reflect.TypeOf((*Network)(nil)).Elem() } type OpaqueNetwork struct { Network Capability *types.OpaqueNetworkCapability `mo:"capability"` ExtraConfig []types.BaseOptionValue `mo:"extraConfig"` } func init() { t["OpaqueNetwork"] = reflect.TypeOf((*OpaqueNetwork)(nil)).Elem() } type OptionManager struct { Self types.ManagedObjectReference SupportedOption []types.OptionDef `mo:"supportedOption"` Setting []types.BaseOptionValue `mo:"setting"` } func (m OptionManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["OptionManager"] = reflect.TypeOf((*OptionManager)(nil)).Elem() } type OverheadMemoryManager struct { Self types.ManagedObjectReference } func (m OverheadMemoryManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["OverheadMemoryManager"] = reflect.TypeOf((*OverheadMemoryManager)(nil)).Elem() } type OvfManager struct { Self types.ManagedObjectReference OvfImportOption []types.OvfOptionInfo `mo:"ovfImportOption"` OvfExportOption []types.OvfOptionInfo `mo:"ovfExportOption"` } func (m OvfManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["OvfManager"] = reflect.TypeOf((*OvfManager)(nil)).Elem() } type PerformanceManager struct { Self types.ManagedObjectReference Description types.PerformanceDescription `mo:"description"` HistoricalInterval []types.PerfInterval `mo:"historicalInterval"` PerfCounter []types.PerfCounterInfo `mo:"perfCounter"` } func (m PerformanceManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["PerformanceManager"] = reflect.TypeOf((*PerformanceManager)(nil)).Elem() } type Profile struct { Self types.ManagedObjectReference Config types.BaseProfileConfigInfo `mo:"config"` Description *types.ProfileDescription `mo:"description"` Name string `mo:"name"` CreatedTime time.Time `mo:"createdTime"` ModifiedTime time.Time `mo:"modifiedTime"` Entity []types.ManagedObjectReference `mo:"entity"` ComplianceStatus string `mo:"complianceStatus"` } func (m Profile) Reference() types.ManagedObjectReference { return m.Self } func init() { t["Profile"] = reflect.TypeOf((*Profile)(nil)).Elem() } type ProfileComplianceManager struct { Self types.ManagedObjectReference } func (m ProfileComplianceManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ProfileComplianceManager"] = reflect.TypeOf((*ProfileComplianceManager)(nil)).Elem() } type ProfileManager struct { Self types.ManagedObjectReference Profile []types.ManagedObjectReference `mo:"profile"` } func (m ProfileManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ProfileManager"] = reflect.TypeOf((*ProfileManager)(nil)).Elem() } type PropertyCollector struct { Self types.ManagedObjectReference Filter []types.ManagedObjectReference `mo:"filter"` } func (m PropertyCollector) Reference() types.ManagedObjectReference { return m.Self } func init() { t["PropertyCollector"] = reflect.TypeOf((*PropertyCollector)(nil)).Elem() } type PropertyFilter struct { Self types.ManagedObjectReference Spec types.PropertyFilterSpec `mo:"spec"` PartialUpdates bool `mo:"partialUpdates"` } func (m PropertyFilter) Reference() types.ManagedObjectReference { return m.Self } func init() { t["PropertyFilter"] = reflect.TypeOf((*PropertyFilter)(nil)).Elem() } type ResourcePlanningManager struct { Self types.ManagedObjectReference } func (m ResourcePlanningManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ResourcePlanningManager"] = reflect.TypeOf((*ResourcePlanningManager)(nil)).Elem() } type ResourcePool struct { ManagedEntity Summary types.BaseResourcePoolSummary `mo:"summary"` Runtime types.ResourcePoolRuntimeInfo `mo:"runtime"` Owner types.ManagedObjectReference `mo:"owner"` ResourcePool []types.ManagedObjectReference `mo:"resourcePool"` Vm []types.ManagedObjectReference `mo:"vm"` Config types.ResourceConfigSpec `mo:"config"` ChildConfiguration []types.ResourceConfigSpec `mo:"childConfiguration"` } func (m *ResourcePool) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["ResourcePool"] = reflect.TypeOf((*ResourcePool)(nil)).Elem() } type ScheduledTask struct { ExtensibleManagedObject Info types.ScheduledTaskInfo `mo:"info"` } func init() { t["ScheduledTask"] = reflect.TypeOf((*ScheduledTask)(nil)).Elem() } type ScheduledTaskManager struct { Self types.ManagedObjectReference ScheduledTask []types.ManagedObjectReference `mo:"scheduledTask"` Description types.ScheduledTaskDescription `mo:"description"` } func (m ScheduledTaskManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ScheduledTaskManager"] = reflect.TypeOf((*ScheduledTaskManager)(nil)).Elem() } type SearchIndex struct { Self types.ManagedObjectReference } func (m SearchIndex) Reference() types.ManagedObjectReference { return m.Self } func init() { t["SearchIndex"] = reflect.TypeOf((*SearchIndex)(nil)).Elem() } type ServiceInstance struct { Self types.ManagedObjectReference ServerClock time.Time `mo:"serverClock"` Capability types.Capability `mo:"capability"` Content types.ServiceContent `mo:"content"` } func (m ServiceInstance) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ServiceInstance"] = reflect.TypeOf((*ServiceInstance)(nil)).Elem() } type ServiceManager struct { Self types.ManagedObjectReference Service []types.ServiceManagerServiceInfo `mo:"service"` } func (m ServiceManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ServiceManager"] = reflect.TypeOf((*ServiceManager)(nil)).Elem() } type SessionManager struct { Self types.ManagedObjectReference SessionList []types.UserSession `mo:"sessionList"` CurrentSession *types.UserSession `mo:"currentSession"` Message *string `mo:"message"` MessageLocaleList []string `mo:"messageLocaleList"` SupportedLocaleList []string `mo:"supportedLocaleList"` DefaultLocale string `mo:"defaultLocale"` } func (m SessionManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["SessionManager"] = reflect.TypeOf((*SessionManager)(nil)).Elem() } type SimpleCommand struct { Self types.ManagedObjectReference EncodingType types.SimpleCommandEncoding `mo:"encodingType"` Entity types.ServiceManagerServiceInfo `mo:"entity"` } func (m SimpleCommand) Reference() types.ManagedObjectReference { return m.Self } func init() { t["SimpleCommand"] = reflect.TypeOf((*SimpleCommand)(nil)).Elem() } type StoragePod struct { Folder Summary *types.StoragePodSummary `mo:"summary"` PodStorageDrsEntry *types.PodStorageDrsEntry `mo:"podStorageDrsEntry"` } func init() { t["StoragePod"] = reflect.TypeOf((*StoragePod)(nil)).Elem() } type StorageResourceManager struct { Self types.ManagedObjectReference } func (m StorageResourceManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["StorageResourceManager"] = reflect.TypeOf((*StorageResourceManager)(nil)).Elem() } type Task struct { ExtensibleManagedObject Info types.TaskInfo `mo:"info"` } func init() { t["Task"] = reflect.TypeOf((*Task)(nil)).Elem() } type TaskHistoryCollector struct { HistoryCollector LatestPage []types.TaskInfo `mo:"latestPage"` } func init() { t["TaskHistoryCollector"] = reflect.TypeOf((*TaskHistoryCollector)(nil)).Elem() } type TaskManager struct { Self types.ManagedObjectReference RecentTask []types.ManagedObjectReference `mo:"recentTask"` Description types.TaskDescription `mo:"description"` MaxCollector int32 `mo:"maxCollector"` } func (m TaskManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["TaskManager"] = reflect.TypeOf((*TaskManager)(nil)).Elem() } type UserDirectory struct { Self types.ManagedObjectReference DomainList []string `mo:"domainList"` } func (m UserDirectory) Reference() types.ManagedObjectReference { return m.Self } func init() { t["UserDirectory"] = reflect.TypeOf((*UserDirectory)(nil)).Elem() } type VStorageObjectManagerBase struct { Self types.ManagedObjectReference } func (m VStorageObjectManagerBase) Reference() types.ManagedObjectReference { return m.Self } func init() { t["VStorageObjectManagerBase"] = reflect.TypeOf((*VStorageObjectManagerBase)(nil)).Elem() } type VcenterVStorageObjectManager struct { VStorageObjectManagerBase } func init() { t["VcenterVStorageObjectManager"] = reflect.TypeOf((*VcenterVStorageObjectManager)(nil)).Elem() } type View struct { Self types.ManagedObjectReference } func (m View) Reference() types.ManagedObjectReference { return m.Self } func init() { t["View"] = reflect.TypeOf((*View)(nil)).Elem() } type ViewManager struct { Self types.ManagedObjectReference ViewList []types.ManagedObjectReference `mo:"viewList"` } func (m ViewManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["ViewManager"] = reflect.TypeOf((*ViewManager)(nil)).Elem() } type VirtualApp struct { ResourcePool ParentFolder *types.ManagedObjectReference `mo:"parentFolder"` Datastore []types.ManagedObjectReference `mo:"datastore"` Network []types.ManagedObjectReference `mo:"network"` VAppConfig *types.VAppConfigInfo `mo:"vAppConfig"` ParentVApp *types.ManagedObjectReference `mo:"parentVApp"` ChildLink []types.VirtualAppLinkInfo `mo:"childLink"` } func init() { t["VirtualApp"] = reflect.TypeOf((*VirtualApp)(nil)).Elem() } type VirtualDiskManager struct { Self types.ManagedObjectReference } func (m VirtualDiskManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["VirtualDiskManager"] = reflect.TypeOf((*VirtualDiskManager)(nil)).Elem() } type VirtualMachine struct { ManagedEntity Capability types.VirtualMachineCapability `mo:"capability"` Config *types.VirtualMachineConfigInfo `mo:"config"` Layout *types.VirtualMachineFileLayout `mo:"layout"` LayoutEx *types.VirtualMachineFileLayoutEx `mo:"layoutEx"` Storage *types.VirtualMachineStorageInfo `mo:"storage"` EnvironmentBrowser types.ManagedObjectReference `mo:"environmentBrowser"` ResourcePool *types.ManagedObjectReference `mo:"resourcePool"` ParentVApp *types.ManagedObjectReference `mo:"parentVApp"` ResourceConfig *types.ResourceConfigSpec `mo:"resourceConfig"` Runtime types.VirtualMachineRuntimeInfo `mo:"runtime"` Guest *types.GuestInfo `mo:"guest"` Summary types.VirtualMachineSummary `mo:"summary"` Datastore []types.ManagedObjectReference `mo:"datastore"` Network []types.ManagedObjectReference `mo:"network"` Snapshot *types.VirtualMachineSnapshotInfo `mo:"snapshot"` RootSnapshot []types.ManagedObjectReference `mo:"rootSnapshot"` GuestHeartbeatStatus types.ManagedEntityStatus `mo:"guestHeartbeatStatus"` } func (m *VirtualMachine) Entity() *ManagedEntity { return &m.ManagedEntity } func init() { t["VirtualMachine"] = reflect.TypeOf((*VirtualMachine)(nil)).Elem() } type VirtualMachineCompatibilityChecker struct { Self types.ManagedObjectReference } func (m VirtualMachineCompatibilityChecker) Reference() types.ManagedObjectReference { return m.Self } func init() { t["VirtualMachineCompatibilityChecker"] = reflect.TypeOf((*VirtualMachineCompatibilityChecker)(nil)).Elem() } type VirtualMachineProvisioningChecker struct { Self types.ManagedObjectReference } func (m VirtualMachineProvisioningChecker) Reference() types.ManagedObjectReference { return m.Self } func init() { t["VirtualMachineProvisioningChecker"] = reflect.TypeOf((*VirtualMachineProvisioningChecker)(nil)).Elem() } type VirtualMachineSnapshot struct { ExtensibleManagedObject Config types.VirtualMachineConfigInfo `mo:"config"` ChildSnapshot []types.ManagedObjectReference `mo:"childSnapshot"` Vm types.ManagedObjectReference `mo:"vm"` } func init() { t["VirtualMachineSnapshot"] = reflect.TypeOf((*VirtualMachineSnapshot)(nil)).Elem() } type VirtualizationManager struct { Self types.ManagedObjectReference } func (m VirtualizationManager) Reference() types.ManagedObjectReference { return m.Self } func init() { t["VirtualizationManager"] = reflect.TypeOf((*VirtualizationManager)(nil)).Elem() } type VmwareDistributedVirtualSwitch struct { DistributedVirtualSwitch } func init() { t["VmwareDistributedVirtualSwitch"] = reflect.TypeOf((*VmwareDistributedVirtualSwitch)(nil)).Elem() } type VsanUpgradeSystem struct { Self types.ManagedObjectReference } func (m VsanUpgradeSystem) Reference() types.ManagedObjectReference { return m.Self } func init() { t["VsanUpgradeSystem"] = reflect.TypeOf((*VsanUpgradeSystem)(nil)).Elem() } govmomi-0.15.0/vim25/mo/reference.go000066400000000000000000000016511312205533500171160ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import "github.com/vmware/govmomi/vim25/types" // Reference is the interface that is implemented by all the managed objects // defined in this package. It specifies that these managed objects have a // function that returns the managed object reference to themselves. type Reference interface { Reference() types.ManagedObjectReference } govmomi-0.15.0/vim25/mo/registry.go000066400000000000000000000012111312205533500170200ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import "reflect" var t = map[string]reflect.Type{} govmomi-0.15.0/vim25/mo/retrieve.go000066400000000000000000000110551312205533500170040ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import ( "context" "reflect" "github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" ) func ignoreMissingProperty(ref types.ManagedObjectReference, p types.MissingProperty) bool { switch ref.Type { case "VirtualMachine": switch p.Path { case "environmentBrowser": // See https://github.com/vmware/govmomi/pull/242 return true case "alarmActionsEnabled": // Seen with vApp child VM return true } } return false } // ObjectContentToType loads an ObjectContent value into the value it // represents. If the ObjectContent value has a non-empty 'MissingSet' field, // it returns the first fault it finds there as error. If the 'MissingSet' // field is empty, it returns a pointer to a reflect.Value. It handles contain // nested properties, such as 'guest.ipAddress' or 'config.hardware'. func ObjectContentToType(o types.ObjectContent) (interface{}, error) { // Expect no properties in the missing set for _, p := range o.MissingSet { if ignoreMissingProperty(o.Obj, p) { continue } return nil, soap.WrapVimFault(p.Fault.Fault) } ti := typeInfoForType(o.Obj.Type) v, err := ti.LoadFromObjectContent(o) if err != nil { return nil, err } return v.Elem().Interface(), nil } // LoadRetrievePropertiesResponse converts the response of a call to // RetrieveProperties to one or more managed objects. func LoadRetrievePropertiesResponse(res *types.RetrievePropertiesResponse, dst interface{}) error { rt := reflect.TypeOf(dst) if rt == nil || rt.Kind() != reflect.Ptr { panic("need pointer") } rv := reflect.ValueOf(dst).Elem() if !rv.CanSet() { panic("cannot set dst") } isSlice := false switch rt.Elem().Kind() { case reflect.Struct: case reflect.Slice: isSlice = true default: panic("unexpected type") } if isSlice { for _, p := range res.Returnval { v, err := ObjectContentToType(p) if err != nil { return err } vt := reflect.TypeOf(v) if !rv.Type().AssignableTo(vt) { // For example: dst is []ManagedEntity, res is []HostSystem if field, ok := vt.FieldByName(rt.Elem().Elem().Name()); ok && field.Anonymous { rv.Set(reflect.Append(rv, reflect.ValueOf(v).FieldByIndex(field.Index))) continue } } rv.Set(reflect.Append(rv, reflect.ValueOf(v))) } } else { switch len(res.Returnval) { case 0: case 1: v, err := ObjectContentToType(res.Returnval[0]) if err != nil { return err } vt := reflect.TypeOf(v) if !rv.Type().AssignableTo(vt) { // For example: dst is ComputeResource, res is ClusterComputeResource if field, ok := vt.FieldByName(rt.Elem().Name()); ok && field.Anonymous { rv.Set(reflect.ValueOf(v).FieldByIndex(field.Index)) return nil } } rv.Set(reflect.ValueOf(v)) default: // If dst is not a slice, expect to receive 0 or 1 results panic("more than 1 result") } } return nil } // RetrievePropertiesForRequest calls the RetrieveProperties method with the // specified request and decodes the response struct into the value pointed to // by dst. func RetrievePropertiesForRequest(ctx context.Context, r soap.RoundTripper, req types.RetrieveProperties, dst interface{}) error { res, err := methods.RetrieveProperties(ctx, r, &req) if err != nil { return err } return LoadRetrievePropertiesResponse(res, dst) } // RetrieveProperties retrieves the properties of the managed object specified // as obj and decodes the response struct into the value pointed to by dst. func RetrieveProperties(ctx context.Context, r soap.RoundTripper, pc, obj types.ManagedObjectReference, dst interface{}) error { req := types.RetrieveProperties{ This: pc, SpecSet: []types.PropertyFilterSpec{ { ObjectSet: []types.ObjectSpec{ { Obj: obj, Skip: types.NewBool(false), }, }, PropSet: []types.PropertySpec{ { All: types.NewBool(true), Type: obj.Type, }, }, }, }, } return RetrievePropertiesForRequest(ctx, r, req, dst) } govmomi-0.15.0/vim25/mo/retrieve_test.go000066400000000000000000000064521312205533500200500ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import ( "os" "testing" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/xml" ) func load(name string) *types.RetrievePropertiesResponse { f, err := os.Open(name) if err != nil { panic(err) } defer f.Close() var b types.RetrievePropertiesResponse dec := xml.NewDecoder(f) dec.TypeFunc = types.TypeFunc() if err := dec.Decode(&b); err != nil { panic(err) } return &b } func TestNotAuthenticatedFault(t *testing.T) { var s SessionManager err := LoadRetrievePropertiesResponse(load("fixtures/not_authenticated_fault.xml"), &s) if !soap.IsVimFault(err) { t.Errorf("Expected IsVimFault") } fault := soap.ToVimFault(err).(*types.NotAuthenticated) if fault.PrivilegeId != "System.View" { t.Errorf("Expected first fault to be returned") } } func TestNestedProperty(t *testing.T) { var vm VirtualMachine err := LoadRetrievePropertiesResponse(load("fixtures/nested_property.xml"), &vm) if err != nil { t.Fatalf("Expected no error, got: %s", err) } self := types.ManagedObjectReference{ Type: "VirtualMachine", Value: "vm-411", } if vm.Self != self { t.Fatalf("Expected vm.Self to be set") } if vm.Config == nil { t.Fatalf("Expected vm.Config to be set") } if vm.Config.Name != "kubernetes-master" { t.Errorf("Got: %s", vm.Config.Name) } if vm.Config.Uuid != "422ec880-ab06-06b4-23f3-beb7a052a4c9" { t.Errorf("Got: %s", vm.Config.Uuid) } } func TestPointerProperty(t *testing.T) { var vm VirtualMachine err := LoadRetrievePropertiesResponse(load("fixtures/pointer_property.xml"), &vm) if err != nil { t.Fatalf("Expected no error, got: %s", err) } if vm.Config == nil { t.Fatalf("Expected vm.Config to be set") } if vm.Config.BootOptions == nil { t.Fatalf("Expected vm.Config.BootOptions to be set") } } func TestEmbeddedTypeProperty(t *testing.T) { // Test that we avoid in this case: // panic: reflect.Set: value of type mo.ClusterComputeResource is not assignable to type mo.ComputeResource var cr ComputeResource err := LoadRetrievePropertiesResponse(load("fixtures/cluster_host_property.xml"), &cr) if err != nil { t.Fatalf("Expected no error, got: %s", err) } if len(cr.Host) != 4 { t.Fatalf("Expected cr.Host to be set") } } func TestEmbeddedTypePropertySlice(t *testing.T) { var me []ManagedEntity err := LoadRetrievePropertiesResponse(load("fixtures/hostsystem_list_name_property.xml"), &me) if err != nil { t.Fatalf("Expected no error, got: %s", err) } if len(me) != 2 { t.Fatalf("Expected 2 elements") } for _, m := range me { if m.Name == "" { t.Fatal("Expected Name field to be set") } } if me[0].Name == me[1].Name { t.Fatal("Name fields should not be the same") } } govmomi-0.15.0/vim25/mo/type_info.go000066400000000000000000000123021312205533500171470ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import ( "fmt" "reflect" "regexp" "strings" "sync" "github.com/vmware/govmomi/vim25/types" ) type typeInfo struct { typ reflect.Type // Field indices of "Self" field. self []int // Map property names to field indices. props map[string][]int } var typeInfoLock sync.RWMutex var typeInfoMap = make(map[string]*typeInfo) func typeInfoForType(tname string) *typeInfo { typeInfoLock.RLock() ti, ok := typeInfoMap[tname] typeInfoLock.RUnlock() if ok { return ti } // Create new typeInfo for type. if typ, ok := t[tname]; !ok { panic("unknown type: " + tname) } else { // Multiple routines may race to set it, but the result is the same. typeInfoLock.Lock() ti = newTypeInfo(typ) typeInfoMap[tname] = ti typeInfoLock.Unlock() } return ti } func newTypeInfo(typ reflect.Type) *typeInfo { t := typeInfo{ typ: typ, props: make(map[string][]int), } t.build(typ, "", []int{}) return &t } var managedObjectRefType = reflect.TypeOf((*types.ManagedObjectReference)(nil)).Elem() func buildName(fn string, f reflect.StructField) string { if fn != "" { fn += "." } motag := f.Tag.Get("mo") if motag != "" { return fn + motag } xmltag := f.Tag.Get("xml") if xmltag != "" { tokens := strings.Split(xmltag, ",") if tokens[0] != "" { return fn + tokens[0] } } return "" } func (t *typeInfo) build(typ reflect.Type, fn string, fi []int) { if typ.Kind() == reflect.Ptr { typ = typ.Elem() } if typ.Kind() != reflect.Struct { panic("need struct") } for i := 0; i < typ.NumField(); i++ { f := typ.Field(i) ftyp := f.Type // Copy field indices so they can be passed along. fic := make([]int, len(fi)+1) copy(fic, fi) fic[len(fi)] = i // Recurse into embedded field. if f.Anonymous { t.build(ftyp, fn, fic) continue } // Top level type has a "Self" field. if f.Name == "Self" && ftyp == managedObjectRefType { t.self = fic continue } fnc := buildName(fn, f) if fnc == "" { continue } t.props[fnc] = fic // Dereference pointer. if ftyp.Kind() == reflect.Ptr { ftyp = ftyp.Elem() } // Slices are not addressable by `foo.bar.qux`. if ftyp.Kind() == reflect.Slice { continue } // Skip the managed reference type. if ftyp == managedObjectRefType { continue } // Recurse into structs. if ftyp.Kind() == reflect.Struct { t.build(ftyp, fnc, fic) } } } // assignValue assignes a value 'pv' to the struct pointed to by 'val', given a // slice of field indices. It recurses into the struct until it finds the field // specified by the indices. It creates new values for pointer types where // needed. func assignValue(val reflect.Value, fi []int, pv reflect.Value) { // Create new value if necessary. if val.Kind() == reflect.Ptr { if val.IsNil() { val.Set(reflect.New(val.Type().Elem())) } val = val.Elem() } rv := val.Field(fi[0]) fi = fi[1:] if len(fi) == 0 { rt := rv.Type() pt := pv.Type() // If type is a pointer, create new instance of type. if rt.Kind() == reflect.Ptr { rv.Set(reflect.New(rt.Elem())) rv = rv.Elem() rt = rv.Type() } // If type is an interface, check if pv implements it. if rt.Kind() == reflect.Interface && !pt.Implements(rt) { // Check if pointer to pv implements it. if reflect.PtrTo(pt).Implements(rt) { npv := reflect.New(pt) npv.Elem().Set(pv) pv = npv pt = pv.Type() } else { panic(fmt.Sprintf("type %s doesn't implement %s", pt.Name(), rt.Name())) } } if pt.AssignableTo(rt) { rv.Set(pv) } else if rt.ConvertibleTo(pt) { rv.Set(pv.Convert(rt)) } else { panic(fmt.Sprintf("cannot assign %s (%s) to %s (%s)", rt.Name(), rt.Kind(), pt.Name(), pt.Kind())) } return } assignValue(rv, fi, pv) } var arrayOfRegexp = regexp.MustCompile("ArrayOf(.*)$") func anyTypeToValue(t interface{}) reflect.Value { rt := reflect.TypeOf(t) rv := reflect.ValueOf(t) // Dereference if ArrayOfXYZ type m := arrayOfRegexp.FindStringSubmatch(rt.Name()) if len(m) > 0 { // ArrayOfXYZ type has single field named XYZ rv = rv.FieldByName(m[1]) if !rv.IsValid() { panic(fmt.Sprintf("expected %s type to have field %s", m[0], m[1])) } } return rv } // LoadObjectFromContent loads properties from the 'PropSet' field in the // specified ObjectContent value into the value it represents, which is // returned as a reflect.Value. func (t *typeInfo) LoadFromObjectContent(o types.ObjectContent) (reflect.Value, error) { v := reflect.New(t.typ) assignValue(v, t.self, reflect.ValueOf(o.Obj)) for _, p := range o.PropSet { rv, ok := t.props[p.Name] if !ok { continue } assignValue(v, rv, anyTypeToValue(p.Val)) } return v, nil } govmomi-0.15.0/vim25/mo/type_info_test.go000066400000000000000000000017701312205533500202150ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package mo import ( "reflect" "testing" ) func TestLoadAll(*testing.T) { for _, typ := range t { newTypeInfo(typ) } } // The virtual machine managed object has about 500 nested properties. // It's likely to be indicative of the function's performance in general. func BenchmarkLoadVirtualMachine(b *testing.B) { vmtyp := reflect.TypeOf((*VirtualMachine)(nil)).Elem() for i := 0; i < b.N; i++ { newTypeInfo(vmtyp) } } govmomi-0.15.0/vim25/progress/000077500000000000000000000000001312205533500160575ustar00rootroot00000000000000govmomi-0.15.0/vim25/progress/aggregator.go000066400000000000000000000027341312205533500205360ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import "sync" type Aggregator struct { downstream Sinker upstream chan (<-chan Report) done chan struct{} w sync.WaitGroup } func NewAggregator(s Sinker) *Aggregator { a := &Aggregator{ downstream: s, upstream: make(chan (<-chan Report)), done: make(chan struct{}), } a.w.Add(1) go a.loop() return a } func (a *Aggregator) loop() { defer a.w.Done() dch := a.downstream.Sink() defer close(dch) for { select { case uch := <-a.upstream: // Drain upstream channel for e := range uch { dch <- e } case <-a.done: return } } } func (a *Aggregator) Sink() chan<- Report { ch := make(chan Report) a.upstream <- ch return ch } // Done marks the aggregator as done. No more calls to Sink() may be made and // the downstream progress report channel will be closed when Done() returns. func (a *Aggregator) Done() { close(a.done) a.w.Wait() } govmomi-0.15.0/vim25/progress/aggregator_test.go000066400000000000000000000031171312205533500215710ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import ( "testing" "time" ) func TestAggregatorNoSinks(t *testing.T) { ch := make(chan Report) a := NewAggregator(dummySinker{ch}) a.Done() _, ok := <-ch if ok { t.Errorf("Expected channel to be closed") } } func TestAggregatorMultipleSinks(t *testing.T) { ch := make(chan Report) a := NewAggregator(dummySinker{ch}) for i := 0; i < 5; i++ { go func(ch chan<- Report) { ch <- dummyReport{} ch <- dummyReport{} close(ch) }(a.Sink()) <-ch <-ch } a.Done() _, ok := <-ch if ok { t.Errorf("Expected channel to be closed") } } func TestAggregatorSinkInFlightOnDone(t *testing.T) { ch := make(chan Report) a := NewAggregator(dummySinker{ch}) // Simulate upstream go func(ch chan<- Report) { time.Sleep(1 * time.Millisecond) ch <- dummyReport{} close(ch) }(a.Sink()) // Drain downstream go func(ch <-chan Report) { <-ch }(ch) // This should wait for upstream to complete a.Done() _, ok := <-ch if ok { t.Errorf("Expected channel to be closed") } } govmomi-0.15.0/vim25/progress/common_test.go000066400000000000000000000016431312205533500207410ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress type dummySinker struct { ch chan Report } func (d dummySinker) Sink() chan<- Report { return d.ch } type dummyReport struct { p float32 d string e error } func (p dummyReport) Percentage() float32 { return p.p } func (p dummyReport) Detail() string { return p.d } func (p dummyReport) Error() error { return p.e } govmomi-0.15.0/vim25/progress/doc.go000066400000000000000000000025021312205533500171520ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress /* The progress package contains functionality to deal with progress reporting. The functionality is built to serve progress reporting for infrastructure operations when talking the vSphere API, but is generic enough to be used elsewhere. At the core of this progress reporting API lies the Sinker interface. This interface is implemented by any object that can act as a sink for progress reports. Callers of the Sink() function receives a send-only channel for progress reports. They are responsible for closing the channel when done. This semantic makes it easy to keep track of multiple progress report channels; they are only created when Sink() is called and assumed closed when any function that receives a Sinker parameter returns. */ govmomi-0.15.0/vim25/progress/prefix.go000066400000000000000000000023471312205533500177110ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import "fmt" type prefixedReport struct { Report prefix string } func (r prefixedReport) Detail() string { if d := r.Report.Detail(); d != "" { return fmt.Sprintf("%s: %s", r.prefix, d) } return r.prefix } func prefixLoop(upstream <-chan Report, downstream chan<- Report, prefix string) { defer close(downstream) for r := range upstream { downstream <- prefixedReport{ Report: r, prefix: prefix, } } } func Prefix(s Sinker, prefix string) Sinker { fn := func() chan<- Report { upstream := make(chan Report) downstream := s.Sink() go prefixLoop(upstream, downstream, prefix) return upstream } return SinkFunc(fn) } govmomi-0.15.0/vim25/progress/prefix_test.go000066400000000000000000000017751312205533500207540ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import "testing" func TestPrefix(t *testing.T) { var r Report ch := make(chan Report, 1) s := Prefix(dummySinker{ch}, "prefix").Sink() // No detail s <- dummyReport{d: ""} r = <-ch if r.Detail() != "prefix" { t.Errorf("Expected detail to be prefixed") } // With detail s <- dummyReport{d: "something"} r = <-ch if r.Detail() != "prefix: something" { t.Errorf("Expected detail to be prefixed") } } govmomi-0.15.0/vim25/progress/reader.go000066400000000000000000000067471312205533500176660ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import ( "container/list" "fmt" "io" "sync/atomic" "time" ) type readerReport struct { t time.Time pos int64 size int64 bps *uint64 err error } func (r readerReport) Percentage() float32 { return 100.0 * float32(r.pos) / float32(r.size) } func (r readerReport) Detail() string { const ( KiB = 1024 MiB = 1024 * KiB GiB = 1024 * MiB ) // Use the reader's bps field, so this report returns an up-to-date number. // // For example: if there hasn't been progress for the last 5 seconds, the // most recent report should return "0B/s". // bps := atomic.LoadUint64(r.bps) switch { case bps >= GiB: return fmt.Sprintf("%.1fGiB/s", float32(bps)/float32(GiB)) case bps >= MiB: return fmt.Sprintf("%.1fMiB/s", float32(bps)/float32(MiB)) case bps >= KiB: return fmt.Sprintf("%.1fKiB/s", float32(bps)/float32(KiB)) default: return fmt.Sprintf("%dB/s", bps) } } func (p readerReport) Error() error { return p.err } // reader wraps an io.Reader and sends a progress report over a channel for // every read it handles. type reader struct { r io.Reader pos int64 size int64 bps uint64 ch chan<- Report } func NewReader(s Sinker, r io.Reader, size int64) *reader { pr := reader{ r: r, size: size, } // Reports must be sent downstream and to the bps computation loop. pr.ch = Tee(s, newBpsLoop(&pr.bps)).Sink() return &pr } // Read calls the Read function on the underlying io.Reader. Additionally, // every read causes a progress report to be sent to the progress reader's // underlying channel. func (r *reader) Read(b []byte) (int, error) { n, err := r.r.Read(b) if err != nil { return n, err } r.pos += int64(n) q := readerReport{ t: time.Now(), pos: r.pos, size: r.size, bps: &r.bps, } r.ch <- q return n, err } // Done marks the progress reader as done, optionally including an error in the // progress report. After sending it, the underlying channel is closed. func (r *reader) Done(err error) { q := readerReport{ t: time.Now(), pos: r.pos, size: r.size, bps: &r.bps, err: err, } r.ch <- q close(r.ch) } // newBpsLoop returns a sink that monitors and stores throughput. func newBpsLoop(dst *uint64) SinkFunc { fn := func() chan<- Report { sink := make(chan Report) go bpsLoop(sink, dst) return sink } return fn } func bpsLoop(ch <-chan Report, dst *uint64) { l := list.New() for { var tch <-chan time.Time // Setup timer for front of list to become stale. if e := l.Front(); e != nil { dt := time.Second - time.Now().Sub(e.Value.(readerReport).t) tch = time.After(dt) } select { case q, ok := <-ch: if !ok { return } l.PushBack(q) case <-tch: l.Remove(l.Front()) } // Compute new bps if l.Len() == 0 { atomic.StoreUint64(dst, 0) } else { f := l.Front().Value.(readerReport) b := l.Back().Value.(readerReport) atomic.StoreUint64(dst, uint64(b.pos-f.pos)) } } } govmomi-0.15.0/vim25/progress/reader_test.go000066400000000000000000000036211312205533500207110ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import ( "io" "strings" "testing" ) func TestReader(t *testing.T) { s := "helloworld" ch := make(chan Report, 1) pr := NewReader(&dummySinker{ch}, strings.NewReader(s), int64(len(s))) var buf [10]byte var q Report var n int var err error // Read first byte n, err = pr.Read(buf[0:1]) if n != 1 { t.Errorf("Expected n=1, but got: %d", n) } if err != nil { t.Errorf("Error: %s", err) } q = <-ch if q.Error() != nil { t.Errorf("Error: %s", err) } if f := q.Percentage(); f != 10.0 { t.Errorf("Expected percentage after 1 byte to be 10%%, but got: %.0f%%", f) } // Read remaining bytes n, err = pr.Read(buf[:]) if n != 9 { t.Errorf("Expected n=1, but got: %d", n) } if err != nil { t.Errorf("Error: %s", err) } q = <-ch if q.Error() != nil { t.Errorf("Error: %s", err) } if f := q.Percentage(); f != 100.0 { t.Errorf("Expected percentage after 10 bytes to be 100%%, but got: %.0f%%", f) } // Read EOF _, err = pr.Read(buf[:]) if err != io.EOF { t.Errorf("Expected io.EOF, but got: %s", err) } // Mark progress reader as done pr.Done(io.EOF) q = <-ch if err != io.EOF { t.Errorf("Expected io.EOF, but got: %s", err) } // Progress channel should be closed after progress reader is marked done _, ok := <-ch if ok { t.Errorf("Expected channel to be closed") } } govmomi-0.15.0/vim25/progress/report.go000066400000000000000000000015501312205533500177220ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress // Report defines the interface for types that can deliver progress reports. // Examples include uploads/downloads in the http client and the task info // field in the task managed object. type Report interface { Percentage() float32 Detail() string Error() error } govmomi-0.15.0/vim25/progress/scale.go000066400000000000000000000027061312205533500175020ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress type scaledReport struct { Report n int i int } func (r scaledReport) Percentage() float32 { b := 100 * float32(r.i) / float32(r.n) return b + (r.Report.Percentage() / float32(r.n)) } type scaleOne struct { s Sinker n int i int } func (s scaleOne) Sink() chan<- Report { upstream := make(chan Report) downstream := s.s.Sink() go s.loop(upstream, downstream) return upstream } func (s scaleOne) loop(upstream <-chan Report, downstream chan<- Report) { defer close(downstream) for r := range upstream { downstream <- scaledReport{ Report: r, n: s.n, i: s.i, } } } type scaleMany struct { s Sinker n int i int } func Scale(s Sinker, n int) Sinker { return &scaleMany{ s: s, n: n, } } func (s *scaleMany) Sink() chan<- Report { if s.i == s.n { s.n++ } ch := scaleOne{s: s.s, n: s.n, i: s.i}.Sink() s.i++ return ch } govmomi-0.15.0/vim25/progress/scale_test.go000066400000000000000000000021411312205533500205320ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import "testing" func TestScaleMany(t *testing.T) { ch := make(chan Report) a := NewAggregator(dummySinker{ch}) defer a.Done() s := Scale(a, 5) go func() { for i := 0; i < 5; i++ { go func(ch chan<- Report) { ch <- dummyReport{p: 0.0} ch <- dummyReport{p: 50.0} close(ch) }(s.Sink()) } }() // Expect percentages to be scaled across sinks for p := float32(0.0); p < 100.0; p += 10.0 { r := <-ch if r.Percentage() != p { t.Errorf("Expected percentage to be: %.0f%%", p) } } } govmomi-0.15.0/vim25/progress/sinker.go000066400000000000000000000022061312205533500177010ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress // Sinker defines what is expected of a type that can act as a sink for // progress reports. The semantics are as follows. If you call Sink(), you are // responsible for closing the returned channel. Closing this channel means // that the related task is done, or resulted in error. type Sinker interface { Sink() chan<- Report } // SinkFunc defines a function that returns a progress report channel. type SinkFunc func() chan<- Report // Sink makes the SinkFunc implement the Sinker interface. func (fn SinkFunc) Sink() chan<- Report { return fn() } govmomi-0.15.0/vim25/progress/tee.go000066400000000000000000000017671312205533500171760ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress // Tee works like Unix tee; it forwards all progress reports it receives to the // specified sinks func Tee(s1, s2 Sinker) Sinker { fn := func() chan<- Report { d1 := s1.Sink() d2 := s2.Sink() u := make(chan Report) go tee(u, d1, d2) return u } return SinkFunc(fn) } func tee(u <-chan Report, d1, d2 chan<- Report) { defer close(d1) defer close(d2) for r := range u { d1 <- r d2 <- r } } govmomi-0.15.0/vim25/progress/tee_test.go000066400000000000000000000017671312205533500202350ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package progress import "testing" func TestTee(t *testing.T) { var ok bool ch1 := make(chan Report) ch2 := make(chan Report) s := Tee(&dummySinker{ch: ch1}, &dummySinker{ch: ch2}) in := s.Sink() in <- dummyReport{} close(in) // Receive dummy on both sinks <-ch1 <-ch2 _, ok = <-ch1 if ok { t.Errorf("Expected channel to be closed") } _, ok = <-ch2 if ok { t.Errorf("Expected channel to be closed") } } govmomi-0.15.0/vim25/retry.go000066400000000000000000000047541312205533500157210ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vim25 import ( "context" "net" "net/url" "time" "github.com/vmware/govmomi/vim25/soap" ) type RetryFunc func(err error) (retry bool, delay time.Duration) // TemporaryNetworkError returns a RetryFunc that retries up to a maximum of n // times, only if the error returned by the RoundTrip function is a temporary // network error (for example: a connect timeout). func TemporaryNetworkError(n int) RetryFunc { return func(err error) (retry bool, delay time.Duration) { var nerr net.Error var ok bool // Never retry if this is not a network error. switch rerr := err.(type) { case *url.Error: if nerr, ok = rerr.Err.(net.Error); !ok { return false, 0 } case net.Error: nerr = rerr default: return false, 0 } if !nerr.Temporary() { return false, 0 } // Don't retry if we're out of tries. if n--; n <= 0 { return false, 0 } return true, 0 } } type retry struct { roundTripper soap.RoundTripper // fn is a custom function that is called when an error occurs. // It returns whether or not to retry, and if so, how long to // delay before retrying. fn RetryFunc } // Retry wraps the specified soap.RoundTripper and invokes the // specified RetryFunc. The RetryFunc returns whether or not to // retry the call, and if so, how long to wait before retrying. If // the result of this function is to not retry, the original error // is returned from the RoundTrip function. func Retry(roundTripper soap.RoundTripper, fn RetryFunc) soap.RoundTripper { r := &retry{ roundTripper: roundTripper, fn: fn, } return r } func (r *retry) RoundTrip(ctx context.Context, req, res soap.HasFault) error { var err error for { err = r.roundTripper.RoundTrip(ctx, req, res) if err == nil { break } // Invoke retry function to see if another attempt should be made. if retry, delay := r.fn(err); retry { time.Sleep(delay) continue } break } return err } govmomi-0.15.0/vim25/retry_test.go000066400000000000000000000036751312205533500167610ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package vim25 import ( "context" "testing" "github.com/vmware/govmomi/vim25/soap" ) type tempError struct{} func (tempError) Error() string { return "tempError" } func (tempError) Timeout() bool { return true } func (tempError) Temporary() bool { return true } type nonTempError struct{} func (nonTempError) Error() string { return "nonTempError" } func (nonTempError) Timeout() bool { return false } func (nonTempError) Temporary() bool { return false } type fakeRoundTripper struct { errs []error } func (f *fakeRoundTripper) RoundTrip(ctx context.Context, req, res soap.HasFault) error { err := f.errs[0] f.errs = f.errs[1:] return err } func TestRetry(t *testing.T) { var tcs = []struct { errs []error expected error }{ { errs: []error{nil}, expected: nil, }, { errs: []error{tempError{}, nil}, expected: nil, }, { errs: []error{tempError{}, tempError{}}, expected: tempError{}, }, { errs: []error{nonTempError{}}, expected: nonTempError{}, }, { errs: []error{tempError{}, nonTempError{}}, expected: nonTempError{}, }, } for _, tc := range tcs { var rt soap.RoundTripper rt = &fakeRoundTripper{errs: tc.errs} rt = Retry(rt, TemporaryNetworkError(2)) err := rt.RoundTrip(nil, nil, nil) if err != tc.expected { t.Errorf("Expected: %s, got: %s", tc.expected, err) } } } govmomi-0.15.0/vim25/soap/000077500000000000000000000000001312205533500151555ustar00rootroot00000000000000govmomi-0.15.0/vim25/soap/client.go000066400000000000000000000366061312205533500167750ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package soap import ( "bufio" "bytes" "context" "crypto/sha1" "crypto/tls" "crypto/x509" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net" "net/http" "net/http/cookiejar" "net/url" "os" "path/filepath" "regexp" "strings" "sync" "time" "github.com/vmware/govmomi/vim25/progress" "github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/xml" ) type HasFault interface { Fault() *Fault } type RoundTripper interface { RoundTrip(ctx context.Context, req, res HasFault) error } const ( DefaultVimNamespace = "urn:vim25" DefaultVimVersion = "6.5" DefaultMinVimVersion = "5.5" ) type header struct { Cookie string `xml:"vcSessionCookie,omitempty"` } type Client struct { http.Client u *url.URL k bool // Named after curl's -k flag d *debugContainer t *http.Transport p *url.URL hostsMu sync.Mutex hosts map[string]string Namespace string // Vim namespace Version string // Vim version UserAgent string header *header } var schemeMatch = regexp.MustCompile(`^\w+://`) // ParseURL is wrapper around url.Parse, where Scheme defaults to "https" and Path defaults to "/sdk" func ParseURL(s string) (*url.URL, error) { var err error var u *url.URL if s != "" { // Default the scheme to https if !schemeMatch.MatchString(s) { s = "https://" + s } u, err = url.Parse(s) if err != nil { return nil, err } // Default the path to /sdk if u.Path == "" { u.Path = "/sdk" } if u.User == nil { u.User = url.UserPassword("", "") } } return u, nil } func NewClient(u *url.URL, insecure bool) *Client { c := Client{ u: u, k: insecure, d: newDebug(), } // Initialize http.RoundTripper on client, so we can customize it below if t, ok := http.DefaultTransport.(*http.Transport); ok { c.t = &http.Transport{ Proxy: t.Proxy, DialContext: t.DialContext, MaxIdleConns: t.MaxIdleConns, IdleConnTimeout: t.IdleConnTimeout, TLSHandshakeTimeout: t.TLSHandshakeTimeout, ExpectContinueTimeout: t.ExpectContinueTimeout, } } else { c.t = new(http.Transport) } c.hosts = make(map[string]string) c.t.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.k} // Don't bother setting DialTLS if InsecureSkipVerify=true if !c.k { c.t.DialTLS = c.dialTLS } c.Client.Transport = c.t c.Client.Jar, _ = cookiejar.New(nil) // Remove user information from a copy of the URL c.u = c.URL() c.u.User = nil c.Namespace = DefaultVimNamespace c.Version = DefaultVimVersion return &c } // NewServiceClient creates a NewClient with the given URL.Path and namespace. func (c *Client) NewServiceClient(path string, namespace string) *Client { u := c.URL() u.Path = path client := NewClient(u, c.k) client.Namespace = namespace // Copy the cookies client.Client.Jar.SetCookies(u, c.Client.Jar.Cookies(u)) // Set SOAP Header cookie for _, cookie := range client.Jar.Cookies(u) { if cookie.Name == "vmware_soap_session" { client.header = &header{ Cookie: cookie.Value, } break } } return client } // SetRootCAs defines the set of root certificate authorities // that clients use when verifying server certificates. // By default TLS uses the host's root CA set. // // See: http.Client.Transport.TLSClientConfig.RootCAs func (c *Client) SetRootCAs(file string) error { pool := x509.NewCertPool() for _, name := range filepath.SplitList(file) { pem, err := ioutil.ReadFile(name) if err != nil { return err } pool.AppendCertsFromPEM(pem) } c.t.TLSClientConfig.RootCAs = pool return nil } // Add default https port if missing func hostAddr(addr string) string { _, port := splitHostPort(addr) if port == "" { return addr + ":443" } return addr } // SetThumbprint sets the known certificate thumbprint for the given host. // A custom DialTLS function is used to support thumbprint based verification. // We first try tls.Dial with the default tls.Config, only falling back to thumbprint verification // if it fails with an x509.UnknownAuthorityError or x509.HostnameError // // See: http.Client.Transport.DialTLS func (c *Client) SetThumbprint(host string, thumbprint string) { host = hostAddr(host) c.hostsMu.Lock() if thumbprint == "" { delete(c.hosts, host) } else { c.hosts[host] = thumbprint } c.hostsMu.Unlock() } // Thumbprint returns the certificate thumbprint for the given host if known to this client. func (c *Client) Thumbprint(host string) string { host = hostAddr(host) c.hostsMu.Lock() defer c.hostsMu.Unlock() return c.hosts[host] } // LoadThumbprints from file with the give name. // If name is empty or name does not exist this function will return nil. func (c *Client) LoadThumbprints(file string) error { if file == "" { return nil } for _, name := range filepath.SplitList(file) { err := c.loadThumbprints(name) if err != nil { return err } } return nil } func (c *Client) loadThumbprints(name string) error { f, err := os.Open(name) if err != nil { if os.IsNotExist(err) { return nil } return err } scanner := bufio.NewScanner(f) for scanner.Scan() { e := strings.SplitN(scanner.Text(), " ", 2) if len(e) != 2 { continue } c.SetThumbprint(e[0], e[1]) } _ = f.Close() return scanner.Err() } // ThumbprintSHA1 returns the thumbprint of the given cert in the same format used by the SDK and Client.SetThumbprint. // // See: SSLVerifyFault.Thumbprint, SessionManagerGenericServiceTicket.Thumbprint, HostConnectSpec.SslThumbprint func ThumbprintSHA1(cert *x509.Certificate) string { sum := sha1.Sum(cert.Raw) hex := make([]string, len(sum)) for i, b := range sum { hex[i] = fmt.Sprintf("%02X", b) } return strings.Join(hex, ":") } func (c *Client) dialTLS(network string, addr string) (net.Conn, error) { // Would be nice if there was a tls.Config.Verify func, // see tls.clientHandshakeState.doFullHandshake conn, err := tls.Dial(network, addr, c.t.TLSClientConfig) if err == nil { return conn, nil } switch err.(type) { case x509.UnknownAuthorityError: case x509.HostnameError: default: return nil, err } thumbprint := c.Thumbprint(addr) if thumbprint == "" { return nil, err } config := &tls.Config{InsecureSkipVerify: true} conn, err = tls.Dial(network, addr, config) if err != nil { return nil, err } cert := conn.ConnectionState().PeerCertificates[0] peer := ThumbprintSHA1(cert) if thumbprint != peer { _ = conn.Close() return nil, fmt.Errorf("Host %q thumbprint does not match %q", addr, thumbprint) } return conn, nil } // splitHostPort is similar to net.SplitHostPort, // but rather than return error if there isn't a ':port', // return an empty string for the port. func splitHostPort(host string) (string, string) { ix := strings.LastIndex(host, ":") if ix <= strings.LastIndex(host, "]") { return host, "" } name := host[:ix] port := host[ix+1:] return name, port } const sdkTunnel = "sdkTunnel:8089" func (c *Client) SetCertificate(cert tls.Certificate) { t := c.Client.Transport.(*http.Transport) // Extension certificate t.TLSClientConfig.Certificates = []tls.Certificate{cert} // Proxy to vCenter host on port 80 host, _ := splitHostPort(c.u.Host) // Should be no reason to change the default port other than testing key := "GOVMOMI_TUNNEL_PROXY_PORT" port := c.URL().Query().Get(key) if port == "" { port = os.Getenv(key) } if port != "" { host += ":" + port } c.p = &url.URL{ Scheme: "http", Host: host, } t.Proxy = func(r *http.Request) (*url.URL, error) { // Only sdk requests should be proxied if r.URL.Path == "/sdk" { return c.p, nil } return http.ProxyFromEnvironment(r) } // Rewrite url Host to use the sdk tunnel, required for a certificate request. c.u.Host = sdkTunnel } func (c *Client) URL() *url.URL { urlCopy := *c.u return &urlCopy } type marshaledClient struct { Cookies []*http.Cookie URL *url.URL Insecure bool } func (c *Client) MarshalJSON() ([]byte, error) { m := marshaledClient{ Cookies: c.Jar.Cookies(c.u), URL: c.u, Insecure: c.k, } return json.Marshal(m) } func (c *Client) UnmarshalJSON(b []byte) error { var m marshaledClient err := json.Unmarshal(b, &m) if err != nil { return err } *c = *NewClient(m.URL, m.Insecure) c.Jar.SetCookies(m.URL, m.Cookies) return nil } func (c *Client) do(ctx context.Context, req *http.Request) (*http.Response, error) { if nil == ctx || nil == ctx.Done() { // ctx.Done() is for ctx return c.Client.Do(req) } return c.Client.Do(req.WithContext(ctx)) } func (c *Client) RoundTrip(ctx context.Context, reqBody, resBody HasFault) error { var err error reqEnv := Envelope{Body: reqBody} resEnv := Envelope{Body: resBody} reqEnv.Header = c.header // Create debugging context for this round trip d := c.d.newRoundTrip() if d.enabled() { defer d.done() } b, err := xml.Marshal(reqEnv) if err != nil { panic(err) } rawReqBody := io.MultiReader(strings.NewReader(xml.Header), bytes.NewReader(b)) req, err := http.NewRequest("POST", c.u.String(), rawReqBody) if err != nil { panic(err) } req.Header.Set(`Content-Type`, `text/xml; charset="utf-8"`) soapAction := fmt.Sprintf("%s/%s", c.Namespace, c.Version) req.Header.Set(`SOAPAction`, soapAction) if c.UserAgent != "" { req.Header.Set(`User-Agent`, c.UserAgent) } if d.enabled() { d.debugRequest(req) } tstart := time.Now() res, err := c.do(ctx, req) tstop := time.Now() if d.enabled() { d.logf("%6dms (%T)", tstop.Sub(tstart)/time.Millisecond, resBody) } if err != nil { return err } if d.enabled() { d.debugResponse(res) } // Close response regardless of what happens next defer res.Body.Close() switch res.StatusCode { case http.StatusOK: // OK case http.StatusInternalServerError: // Error, but typically includes a body explaining the error default: return errors.New(res.Status) } dec := xml.NewDecoder(res.Body) dec.TypeFunc = types.TypeFunc() err = dec.Decode(&resEnv) if err != nil { return err } if f := resBody.Fault(); f != nil { return WrapSoapFault(f) } return err } func (c *Client) CloseIdleConnections() { c.t.CloseIdleConnections() } // ParseURL wraps url.Parse to rewrite the URL.Host field // In the case of VM guest uploads or NFC lease URLs, a Host // field with a value of "*" is rewritten to the Client's URL.Host. func (c *Client) ParseURL(urlStr string) (*url.URL, error) { u, err := url.Parse(urlStr) if err != nil { return nil, err } host, _ := splitHostPort(u.Host) if host == "*" { // Also use Client's port, to support port forwarding u.Host = c.URL().Host } return u, nil } type Upload struct { Type string Method string ContentLength int64 Headers map[string]string Ticket *http.Cookie Progress progress.Sinker } var DefaultUpload = Upload{ Type: "application/octet-stream", Method: "PUT", } // Upload PUTs the local file to the given URL func (c *Client) Upload(f io.Reader, u *url.URL, param *Upload) error { var err error if param.Progress != nil { pr := progress.NewReader(param.Progress, f, param.ContentLength) f = pr // Mark progress reader as done when returning from this function. defer func() { pr.Done(err) }() } req, err := http.NewRequest(param.Method, u.String(), f) if err != nil { return err } req.ContentLength = param.ContentLength req.Header.Set("Content-Type", param.Type) for k, v := range param.Headers { req.Header.Add(k, v) } if param.Ticket != nil { req.AddCookie(param.Ticket) } res, err := c.Client.Do(req) if err != nil { return err } switch res.StatusCode { case http.StatusOK: case http.StatusCreated: default: err = errors.New(res.Status) } return err } // UploadFile PUTs the local file to the given URL func (c *Client) UploadFile(file string, u *url.URL, param *Upload) error { if param == nil { p := DefaultUpload // Copy since we set ContentLength param = &p } s, err := os.Stat(file) if err != nil { return err } f, err := os.Open(file) if err != nil { return err } defer f.Close() param.ContentLength = s.Size() return c.Upload(f, u, param) } type Download struct { Method string Headers map[string]string Ticket *http.Cookie Progress progress.Sinker } var DefaultDownload = Download{ Method: "GET", } // DownloadRequest wraps http.Client.Do, returning the http.Response without checking its StatusCode func (c *Client) DownloadRequest(u *url.URL, param *Download) (*http.Response, error) { req, err := http.NewRequest(param.Method, u.String(), nil) if err != nil { return nil, err } for k, v := range param.Headers { req.Header.Add(k, v) } if param.Ticket != nil { req.AddCookie(param.Ticket) } return c.Client.Do(req) } // directoryReader wraps an io.ReadCloser to support streaming download // of a guest directory, stops reading once it sees the stream trailer. // This is only useful when guest tools is the Go toolbox. // The trailer is required since TransferFromGuest requires a Content-Length, // which toolbox doesn't know ahead of time as the gzip'd tarball never touches the disk. // We opted to wrap this here for now rather than guest.FileManager so // DownloadFile can be also be used as-is to handle this use case. type directoryReader struct { io.ReadCloser } var ( gzipHeader = []byte{0x1f, 0x8b, 0x08} // rfc1952 {ID1, ID2, CM} gzipHeaderLen = len(gzipHeader) ) func (r *directoryReader) Read(buf []byte) (int, error) { nr, err := r.ReadCloser.Read(buf) // Stop reading if the last N bytes are the gzipTrailer if nr >= gzipHeaderLen { if bytes.Equal(buf[nr-gzipHeaderLen:nr], gzipHeader) { nr -= gzipHeaderLen err = io.EOF } } return nr, err } // Download GETs the remote file from the given URL func (c *Client) Download(u *url.URL, param *Download) (io.ReadCloser, int64, error) { res, err := c.DownloadRequest(u, param) if err != nil { return nil, 0, err } switch res.StatusCode { case http.StatusOK: default: err = errors.New(res.Status) } if err != nil { return nil, 0, err } r := res.Body if strings.HasSuffix(u.Path, "/") { r = &directoryReader{ReadCloser: r} } return r, res.ContentLength, nil } // DownloadFile GETs the given URL to a local file func (c *Client) DownloadFile(file string, u *url.URL, param *Download) error { var err error if param == nil { param = &DefaultDownload } rc, contentLength, err := c.Download(u, param) if err != nil { return err } defer rc.Close() var r io.Reader = rc fh, err := os.Create(file) if err != nil { return err } defer fh.Close() if param.Progress != nil { pr := progress.NewReader(param.Progress, r, contentLength) r = pr // Mark progress reader as done when returning from this function. defer func() { pr.Done(err) }() } _, err = io.Copy(fh, r) if err != nil { return err } // Assign error before returning so that it gets picked up by the deferred // function marking the progress reader as done. err = fh.Close() if err != nil { return err } return nil } govmomi-0.15.0/vim25/soap/client_test.go000066400000000000000000000021551312205533500200240ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package soap import "testing" func TestSplitHostPort(t *testing.T) { tests := []struct { url string host string port string }{ {"127.0.0.1", "127.0.0.1", ""}, {"*:1234", "*", "1234"}, {"127.0.0.1:80", "127.0.0.1", "80"}, {"[::1]:6767", "[::1]", "6767"}, {"[::1]", "[::1]", ""}, } for _, test := range tests { host, port := splitHostPort(test.url) if host != test.host { t.Errorf("(%s) %s != %s", test.url, host, test.host) } if port != test.port { t.Errorf("(%s) %s != %s", test.url, port, test.port) } } } govmomi-0.15.0/vim25/soap/debug.go000066400000000000000000000061521312205533500165760ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package soap import ( "fmt" "io" "net/http" "net/http/httputil" "sync/atomic" "time" "github.com/vmware/govmomi/vim25/debug" ) // teeReader wraps io.TeeReader and patches through the Close() function. type teeReader struct { io.Reader io.Closer } func newTeeReader(rc io.ReadCloser, w io.Writer) io.ReadCloser { return teeReader{ Reader: io.TeeReader(rc, w), Closer: rc, } } // debugRoundTrip contains state and logic needed to debug a single round trip. type debugRoundTrip struct { cn uint64 // Client number rn uint64 // Request number log io.WriteCloser // Request log cs []io.Closer // Files that need closing when done } func (d *debugRoundTrip) logf(format string, a ...interface{}) { now := time.Now().Format("2006-01-02T15-04-05.000000000") fmt.Fprintf(d.log, "%s - %04d: ", now, d.rn) fmt.Fprintf(d.log, format, a...) fmt.Fprintf(d.log, "\n") } func (d *debugRoundTrip) enabled() bool { return d != nil } func (d *debugRoundTrip) done() { for _, c := range d.cs { c.Close() } } func (d *debugRoundTrip) newFile(suffix string) io.WriteCloser { return debug.NewFile(fmt.Sprintf("%d-%04d.%s", d.cn, d.rn, suffix)) } func (d *debugRoundTrip) debugRequest(req *http.Request) { if d == nil { return } var wc io.WriteCloser // Capture headers wc = d.newFile("req.headers") b, _ := httputil.DumpRequest(req, false) wc.Write(b) wc.Close() // Capture body wc = d.newFile("req.xml") req.Body = newTeeReader(req.Body, wc) // Delay closing until marked done d.cs = append(d.cs, wc) } func (d *debugRoundTrip) debugResponse(res *http.Response) { if d == nil { return } var wc io.WriteCloser // Capture headers wc = d.newFile("res.headers") b, _ := httputil.DumpResponse(res, false) wc.Write(b) wc.Close() // Capture body wc = d.newFile("res.xml") res.Body = newTeeReader(res.Body, wc) // Delay closing until marked done d.cs = append(d.cs, wc) } var cn uint64 // Client counter // debugContainer wraps the debugging state for a single client. type debugContainer struct { cn uint64 // Client number rn uint64 // Request counter log io.WriteCloser // Request log } func newDebug() *debugContainer { d := debugContainer{ cn: atomic.AddUint64(&cn, 1), rn: 0, } if !debug.Enabled() { return nil } d.log = debug.NewFile(fmt.Sprintf("%d-client.log", d.cn)) return &d } func (d *debugContainer) newRoundTrip() *debugRoundTrip { if d == nil { return nil } drt := debugRoundTrip{ cn: d.cn, rn: atomic.AddUint64(&d.rn, 1), log: d.log, } return &drt } govmomi-0.15.0/vim25/soap/error.go000066400000000000000000000041751312205533500166440ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package soap import ( "fmt" "reflect" "github.com/vmware/govmomi/vim25/types" ) type regularError struct { err error } func (r regularError) Error() string { return r.err.Error() } type soapFaultError struct { fault *Fault } func (s soapFaultError) Error() string { msg := s.fault.String if msg == "" { msg = reflect.TypeOf(s.fault.Detail.Fault).Name() } return fmt.Sprintf("%s: %s", s.fault.Code, msg) } type vimFaultError struct { fault types.BaseMethodFault } func (v vimFaultError) Error() string { typ := reflect.TypeOf(v.fault) for typ.Kind() == reflect.Ptr { typ = typ.Elem() } return typ.Name() } func (v vimFaultError) Fault() types.BaseMethodFault { return v.fault } func Wrap(err error) error { switch err.(type) { case regularError: return err case soapFaultError: return err case vimFaultError: return err } return WrapRegularError(err) } func WrapRegularError(err error) error { return regularError{err} } func IsRegularError(err error) bool { _, ok := err.(regularError) return ok } func ToRegularError(err error) error { return err.(regularError).err } func WrapSoapFault(f *Fault) error { return soapFaultError{f} } func IsSoapFault(err error) bool { _, ok := err.(soapFaultError) return ok } func ToSoapFault(err error) *Fault { return err.(soapFaultError).fault } func WrapVimFault(v types.BaseMethodFault) error { return vimFaultError{v} } func IsVimFault(err error) bool { _, ok := err.(vimFaultError) return ok } func ToVimFault(err error) types.BaseMethodFault { return err.(vimFaultError).fault } govmomi-0.15.0/vim25/soap/soap.go000066400000000000000000000022311312205533500164440ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package soap import ( "github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/xml" ) type Envelope struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"` Header interface{} `xml:",omitempty"` Body interface{} } type Fault struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"` Code string `xml:"faultcode"` String string `xml:"faultstring"` Detail struct { Fault types.AnyType `xml:",any,typeattr"` } `xml:"detail"` } func (f *Fault) VimFault() types.AnyType { return f.Detail.Fault } govmomi-0.15.0/vim25/soap/soap_test.go000066400000000000000000000024211312205533500175040ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package soap import ( "testing" "github.com/vmware/govmomi/vim25/xml" ) func TestEmptyEnvelope(t *testing.T) { env := Envelope{} b, err := xml.Marshal(env) if err != nil { t.Errorf("error: %s", err) return } expected := `` actual := string(b) if expected != actual { t.Fatalf("expected: %s, actual: %s", expected, actual) } } func TestNonEmptyHeader(t *testing.T) { env := Envelope{ Header: struct { Foo string }{"bar"}, } b, err := xml.Marshal(env) if err != nil { t.Errorf("error: %s", err) return } env = Envelope{} err = xml.Unmarshal(b, &env) if err != nil { t.Errorf("error: %s", err) } } govmomi-0.15.0/vim25/types/000077500000000000000000000000001312205533500153575ustar00rootroot00000000000000govmomi-0.15.0/vim25/types/base.go000066400000000000000000000011611312205533500166170ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types type AnyType interface{} govmomi-0.15.0/vim25/types/base_test.go000066400000000000000000000027651312205533500176710ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "bytes" "reflect" "testing" "github.com/vmware/govmomi/vim25/xml" ) func TestAnyType(t *testing.T) { x := func(s string) []byte { s = `` + s s += `` return []byte(s) } tests := []struct { Input []byte Value interface{} }{ { Input: x(`test`), Value: "test", }, { Input: x(`AABB`), Value: ArrayOfString{String: []string{"AA", "BB"}}, }, } for _, test := range tests { var r struct { A interface{} `xml:"name,typeattr"` } dec := xml.NewDecoder(bytes.NewReader(test.Input)) dec.TypeFunc = TypeFunc() err := dec.Decode(&r) if err != nil { t.Fatalf("Decode: %s", err) } if !reflect.DeepEqual(r.A, test.Value) { t.Errorf("Expected: %#v, actual: %#v", r.A, test.Value) } } } govmomi-0.15.0/vim25/types/enum.go000066400000000000000000006161711312205533500166660ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import "reflect" type ActionParameter string const ( ActionParameterTargetName = ActionParameter("targetName") ActionParameterAlarmName = ActionParameter("alarmName") ActionParameterOldStatus = ActionParameter("oldStatus") ActionParameterNewStatus = ActionParameter("newStatus") ActionParameterTriggeringSummary = ActionParameter("triggeringSummary") ActionParameterDeclaringSummary = ActionParameter("declaringSummary") ActionParameterEventDescription = ActionParameter("eventDescription") ActionParameterTarget = ActionParameter("target") ActionParameterAlarm = ActionParameter("alarm") ) func init() { t["ActionParameter"] = reflect.TypeOf((*ActionParameter)(nil)).Elem() } type ActionType string const ( ActionTypeMigrationV1 = ActionType("MigrationV1") ActionTypeVmPowerV1 = ActionType("VmPowerV1") ActionTypeHostPowerV1 = ActionType("HostPowerV1") ActionTypeHostMaintenanceV1 = ActionType("HostMaintenanceV1") ActionTypeStorageMigrationV1 = ActionType("StorageMigrationV1") ActionTypeStoragePlacementV1 = ActionType("StoragePlacementV1") ActionTypePlacementV1 = ActionType("PlacementV1") ActionTypeHostInfraUpdateHaV1 = ActionType("HostInfraUpdateHaV1") ) func init() { t["ActionType"] = reflect.TypeOf((*ActionType)(nil)).Elem() } type AffinityType string const ( AffinityTypeMemory = AffinityType("memory") AffinityTypeCpu = AffinityType("cpu") ) func init() { t["AffinityType"] = reflect.TypeOf((*AffinityType)(nil)).Elem() } type AgentInstallFailedReason string const ( AgentInstallFailedReasonNotEnoughSpaceOnDevice = AgentInstallFailedReason("NotEnoughSpaceOnDevice") AgentInstallFailedReasonPrepareToUpgradeFailed = AgentInstallFailedReason("PrepareToUpgradeFailed") AgentInstallFailedReasonAgentNotRunning = AgentInstallFailedReason("AgentNotRunning") AgentInstallFailedReasonAgentNotReachable = AgentInstallFailedReason("AgentNotReachable") AgentInstallFailedReasonInstallTimedout = AgentInstallFailedReason("InstallTimedout") AgentInstallFailedReasonSignatureVerificationFailed = AgentInstallFailedReason("SignatureVerificationFailed") AgentInstallFailedReasonAgentUploadFailed = AgentInstallFailedReason("AgentUploadFailed") AgentInstallFailedReasonAgentUploadTimedout = AgentInstallFailedReason("AgentUploadTimedout") AgentInstallFailedReasonUnknownInstallerError = AgentInstallFailedReason("UnknownInstallerError") ) func init() { t["AgentInstallFailedReason"] = reflect.TypeOf((*AgentInstallFailedReason)(nil)).Elem() } type ArrayUpdateOperation string const ( ArrayUpdateOperationAdd = ArrayUpdateOperation("add") ArrayUpdateOperationRemove = ArrayUpdateOperation("remove") ArrayUpdateOperationEdit = ArrayUpdateOperation("edit") ) func init() { t["ArrayUpdateOperation"] = reflect.TypeOf((*ArrayUpdateOperation)(nil)).Elem() } type AutoStartAction string const ( AutoStartActionNone = AutoStartAction("none") AutoStartActionSystemDefault = AutoStartAction("systemDefault") AutoStartActionPowerOn = AutoStartAction("powerOn") AutoStartActionPowerOff = AutoStartAction("powerOff") AutoStartActionGuestShutdown = AutoStartAction("guestShutdown") AutoStartActionSuspend = AutoStartAction("suspend") ) func init() { t["AutoStartAction"] = reflect.TypeOf((*AutoStartAction)(nil)).Elem() } type AutoStartWaitHeartbeatSetting string const ( AutoStartWaitHeartbeatSettingYes = AutoStartWaitHeartbeatSetting("yes") AutoStartWaitHeartbeatSettingNo = AutoStartWaitHeartbeatSetting("no") AutoStartWaitHeartbeatSettingSystemDefault = AutoStartWaitHeartbeatSetting("systemDefault") ) func init() { t["AutoStartWaitHeartbeatSetting"] = reflect.TypeOf((*AutoStartWaitHeartbeatSetting)(nil)).Elem() } type BaseConfigInfoDiskFileBackingInfoProvisioningType string const ( BaseConfigInfoDiskFileBackingInfoProvisioningTypeThin = BaseConfigInfoDiskFileBackingInfoProvisioningType("thin") BaseConfigInfoDiskFileBackingInfoProvisioningTypeEagerZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("eagerZeroedThick") BaseConfigInfoDiskFileBackingInfoProvisioningTypeLazyZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("lazyZeroedThick") ) func init() { t["BaseConfigInfoDiskFileBackingInfoProvisioningType"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfoProvisioningType)(nil)).Elem() } type BatchResultResult string const ( BatchResultResultSuccess = BatchResultResult("success") BatchResultResultFail = BatchResultResult("fail") ) func init() { t["BatchResultResult"] = reflect.TypeOf((*BatchResultResult)(nil)).Elem() } type CannotEnableVmcpForClusterReason string const ( CannotEnableVmcpForClusterReasonAPDTimeoutDisabled = CannotEnableVmcpForClusterReason("APDTimeoutDisabled") CannotEnableVmcpForClusterReasonIncompatibleHostVersion = CannotEnableVmcpForClusterReason("IncompatibleHostVersion") ) func init() { t["CannotEnableVmcpForClusterReason"] = reflect.TypeOf((*CannotEnableVmcpForClusterReason)(nil)).Elem() } type CannotMoveFaultToleranceVmMoveType string const ( CannotMoveFaultToleranceVmMoveTypeResourcePool = CannotMoveFaultToleranceVmMoveType("resourcePool") CannotMoveFaultToleranceVmMoveTypeCluster = CannotMoveFaultToleranceVmMoveType("cluster") ) func init() { t["CannotMoveFaultToleranceVmMoveType"] = reflect.TypeOf((*CannotMoveFaultToleranceVmMoveType)(nil)).Elem() } type CannotPowerOffVmInClusterOperation string const ( CannotPowerOffVmInClusterOperationSuspend = CannotPowerOffVmInClusterOperation("suspend") CannotPowerOffVmInClusterOperationPowerOff = CannotPowerOffVmInClusterOperation("powerOff") CannotPowerOffVmInClusterOperationGuestShutdown = CannotPowerOffVmInClusterOperation("guestShutdown") CannotPowerOffVmInClusterOperationGuestSuspend = CannotPowerOffVmInClusterOperation("guestSuspend") ) func init() { t["CannotPowerOffVmInClusterOperation"] = reflect.TypeOf((*CannotPowerOffVmInClusterOperation)(nil)).Elem() } type CannotUseNetworkReason string const ( CannotUseNetworkReasonNetworkReservationNotSupported = CannotUseNetworkReason("NetworkReservationNotSupported") CannotUseNetworkReasonMismatchedNetworkPolicies = CannotUseNetworkReason("MismatchedNetworkPolicies") CannotUseNetworkReasonMismatchedDvsVersionOrVendor = CannotUseNetworkReason("MismatchedDvsVersionOrVendor") CannotUseNetworkReasonVMotionToUnsupportedNetworkType = CannotUseNetworkReason("VMotionToUnsupportedNetworkType") ) func init() { t["CannotUseNetworkReason"] = reflect.TypeOf((*CannotUseNetworkReason)(nil)).Elem() } type CheckTestType string const ( CheckTestTypeSourceTests = CheckTestType("sourceTests") CheckTestTypeHostTests = CheckTestType("hostTests") CheckTestTypeResourcePoolTests = CheckTestType("resourcePoolTests") CheckTestTypeDatastoreTests = CheckTestType("datastoreTests") CheckTestTypeNetworkTests = CheckTestType("networkTests") ) func init() { t["CheckTestType"] = reflect.TypeOf((*CheckTestType)(nil)).Elem() } type ClusterDasAamNodeStateDasState string const ( ClusterDasAamNodeStateDasStateUninitialized = ClusterDasAamNodeStateDasState("uninitialized") ClusterDasAamNodeStateDasStateInitialized = ClusterDasAamNodeStateDasState("initialized") ClusterDasAamNodeStateDasStateConfiguring = ClusterDasAamNodeStateDasState("configuring") ClusterDasAamNodeStateDasStateUnconfiguring = ClusterDasAamNodeStateDasState("unconfiguring") ClusterDasAamNodeStateDasStateRunning = ClusterDasAamNodeStateDasState("running") ClusterDasAamNodeStateDasStateError = ClusterDasAamNodeStateDasState("error") ClusterDasAamNodeStateDasStateAgentShutdown = ClusterDasAamNodeStateDasState("agentShutdown") ClusterDasAamNodeStateDasStateNodeFailed = ClusterDasAamNodeStateDasState("nodeFailed") ) func init() { t["ClusterDasAamNodeStateDasState"] = reflect.TypeOf((*ClusterDasAamNodeStateDasState)(nil)).Elem() } type ClusterDasConfigInfoHBDatastoreCandidate string const ( ClusterDasConfigInfoHBDatastoreCandidateUserSelectedDs = ClusterDasConfigInfoHBDatastoreCandidate("userSelectedDs") ClusterDasConfigInfoHBDatastoreCandidateAllFeasibleDs = ClusterDasConfigInfoHBDatastoreCandidate("allFeasibleDs") ClusterDasConfigInfoHBDatastoreCandidateAllFeasibleDsWithUserPreference = ClusterDasConfigInfoHBDatastoreCandidate("allFeasibleDsWithUserPreference") ) func init() { t["ClusterDasConfigInfoHBDatastoreCandidate"] = reflect.TypeOf((*ClusterDasConfigInfoHBDatastoreCandidate)(nil)).Elem() } type ClusterDasConfigInfoServiceState string const ( ClusterDasConfigInfoServiceStateDisabled = ClusterDasConfigInfoServiceState("disabled") ClusterDasConfigInfoServiceStateEnabled = ClusterDasConfigInfoServiceState("enabled") ) func init() { t["ClusterDasConfigInfoServiceState"] = reflect.TypeOf((*ClusterDasConfigInfoServiceState)(nil)).Elem() } type ClusterDasConfigInfoVmMonitoringState string const ( ClusterDasConfigInfoVmMonitoringStateVmMonitoringDisabled = ClusterDasConfigInfoVmMonitoringState("vmMonitoringDisabled") ClusterDasConfigInfoVmMonitoringStateVmMonitoringOnly = ClusterDasConfigInfoVmMonitoringState("vmMonitoringOnly") ClusterDasConfigInfoVmMonitoringStateVmAndAppMonitoring = ClusterDasConfigInfoVmMonitoringState("vmAndAppMonitoring") ) func init() { t["ClusterDasConfigInfoVmMonitoringState"] = reflect.TypeOf((*ClusterDasConfigInfoVmMonitoringState)(nil)).Elem() } type ClusterDasFdmAvailabilityState string const ( ClusterDasFdmAvailabilityStateUninitialized = ClusterDasFdmAvailabilityState("uninitialized") ClusterDasFdmAvailabilityStateElection = ClusterDasFdmAvailabilityState("election") ClusterDasFdmAvailabilityStateMaster = ClusterDasFdmAvailabilityState("master") ClusterDasFdmAvailabilityStateConnectedToMaster = ClusterDasFdmAvailabilityState("connectedToMaster") ClusterDasFdmAvailabilityStateNetworkPartitionedFromMaster = ClusterDasFdmAvailabilityState("networkPartitionedFromMaster") ClusterDasFdmAvailabilityStateNetworkIsolated = ClusterDasFdmAvailabilityState("networkIsolated") ClusterDasFdmAvailabilityStateHostDown = ClusterDasFdmAvailabilityState("hostDown") ClusterDasFdmAvailabilityStateInitializationError = ClusterDasFdmAvailabilityState("initializationError") ClusterDasFdmAvailabilityStateUninitializationError = ClusterDasFdmAvailabilityState("uninitializationError") ClusterDasFdmAvailabilityStateFdmUnreachable = ClusterDasFdmAvailabilityState("fdmUnreachable") ) func init() { t["ClusterDasFdmAvailabilityState"] = reflect.TypeOf((*ClusterDasFdmAvailabilityState)(nil)).Elem() } type ClusterDasVmSettingsIsolationResponse string const ( ClusterDasVmSettingsIsolationResponseNone = ClusterDasVmSettingsIsolationResponse("none") ClusterDasVmSettingsIsolationResponsePowerOff = ClusterDasVmSettingsIsolationResponse("powerOff") ClusterDasVmSettingsIsolationResponseShutdown = ClusterDasVmSettingsIsolationResponse("shutdown") ClusterDasVmSettingsIsolationResponseClusterIsolationResponse = ClusterDasVmSettingsIsolationResponse("clusterIsolationResponse") ) func init() { t["ClusterDasVmSettingsIsolationResponse"] = reflect.TypeOf((*ClusterDasVmSettingsIsolationResponse)(nil)).Elem() } type ClusterDasVmSettingsRestartPriority string const ( ClusterDasVmSettingsRestartPriorityDisabled = ClusterDasVmSettingsRestartPriority("disabled") ClusterDasVmSettingsRestartPriorityLowest = ClusterDasVmSettingsRestartPriority("lowest") ClusterDasVmSettingsRestartPriorityLow = ClusterDasVmSettingsRestartPriority("low") ClusterDasVmSettingsRestartPriorityMedium = ClusterDasVmSettingsRestartPriority("medium") ClusterDasVmSettingsRestartPriorityHigh = ClusterDasVmSettingsRestartPriority("high") ClusterDasVmSettingsRestartPriorityHighest = ClusterDasVmSettingsRestartPriority("highest") ClusterDasVmSettingsRestartPriorityClusterRestartPriority = ClusterDasVmSettingsRestartPriority("clusterRestartPriority") ) func init() { t["ClusterDasVmSettingsRestartPriority"] = reflect.TypeOf((*ClusterDasVmSettingsRestartPriority)(nil)).Elem() } type ClusterHostInfraUpdateHaModeActionOperationType string const ( ClusterHostInfraUpdateHaModeActionOperationTypeEnterQuarantine = ClusterHostInfraUpdateHaModeActionOperationType("enterQuarantine") ClusterHostInfraUpdateHaModeActionOperationTypeExitQuarantine = ClusterHostInfraUpdateHaModeActionOperationType("exitQuarantine") ClusterHostInfraUpdateHaModeActionOperationTypeEnterMaintenance = ClusterHostInfraUpdateHaModeActionOperationType("enterMaintenance") ) func init() { t["ClusterHostInfraUpdateHaModeActionOperationType"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeActionOperationType)(nil)).Elem() } type ClusterInfraUpdateHaConfigInfoBehaviorType string const ( ClusterInfraUpdateHaConfigInfoBehaviorTypeManual = ClusterInfraUpdateHaConfigInfoBehaviorType("Manual") ClusterInfraUpdateHaConfigInfoBehaviorTypeAutomated = ClusterInfraUpdateHaConfigInfoBehaviorType("Automated") ) func init() { t["ClusterInfraUpdateHaConfigInfoBehaviorType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoBehaviorType)(nil)).Elem() } type ClusterInfraUpdateHaConfigInfoRemediationType string const ( ClusterInfraUpdateHaConfigInfoRemediationTypeQuarantineMode = ClusterInfraUpdateHaConfigInfoRemediationType("QuarantineMode") ClusterInfraUpdateHaConfigInfoRemediationTypeMaintenanceMode = ClusterInfraUpdateHaConfigInfoRemediationType("MaintenanceMode") ) func init() { t["ClusterInfraUpdateHaConfigInfoRemediationType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoRemediationType)(nil)).Elem() } type ClusterPowerOnVmOption string const ( ClusterPowerOnVmOptionOverrideAutomationLevel = ClusterPowerOnVmOption("OverrideAutomationLevel") ClusterPowerOnVmOptionReserveResources = ClusterPowerOnVmOption("ReserveResources") ) func init() { t["ClusterPowerOnVmOption"] = reflect.TypeOf((*ClusterPowerOnVmOption)(nil)).Elem() } type ClusterProfileServiceType string const ( ClusterProfileServiceTypeDRS = ClusterProfileServiceType("DRS") ClusterProfileServiceTypeHA = ClusterProfileServiceType("HA") ClusterProfileServiceTypeDPM = ClusterProfileServiceType("DPM") ClusterProfileServiceTypeFT = ClusterProfileServiceType("FT") ) func init() { t["ClusterProfileServiceType"] = reflect.TypeOf((*ClusterProfileServiceType)(nil)).Elem() } type ClusterVmComponentProtectionSettingsStorageVmReaction string const ( ClusterVmComponentProtectionSettingsStorageVmReactionDisabled = ClusterVmComponentProtectionSettingsStorageVmReaction("disabled") ClusterVmComponentProtectionSettingsStorageVmReactionWarning = ClusterVmComponentProtectionSettingsStorageVmReaction("warning") ClusterVmComponentProtectionSettingsStorageVmReactionRestartConservative = ClusterVmComponentProtectionSettingsStorageVmReaction("restartConservative") ClusterVmComponentProtectionSettingsStorageVmReactionRestartAggressive = ClusterVmComponentProtectionSettingsStorageVmReaction("restartAggressive") ClusterVmComponentProtectionSettingsStorageVmReactionClusterDefault = ClusterVmComponentProtectionSettingsStorageVmReaction("clusterDefault") ) func init() { t["ClusterVmComponentProtectionSettingsStorageVmReaction"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsStorageVmReaction)(nil)).Elem() } type ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared string const ( ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedNone = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("none") ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedReset = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("reset") ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedUseClusterDefault = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("useClusterDefault") ) func init() { t["ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared)(nil)).Elem() } type ClusterVmReadinessReadyCondition string const ( ClusterVmReadinessReadyConditionNone = ClusterVmReadinessReadyCondition("none") ClusterVmReadinessReadyConditionPoweredOn = ClusterVmReadinessReadyCondition("poweredOn") ClusterVmReadinessReadyConditionGuestHbStatusGreen = ClusterVmReadinessReadyCondition("guestHbStatusGreen") ClusterVmReadinessReadyConditionAppHbStatusGreen = ClusterVmReadinessReadyCondition("appHbStatusGreen") ClusterVmReadinessReadyConditionUseClusterDefault = ClusterVmReadinessReadyCondition("useClusterDefault") ) func init() { t["ClusterVmReadinessReadyCondition"] = reflect.TypeOf((*ClusterVmReadinessReadyCondition)(nil)).Elem() } type ComplianceResultStatus string const ( ComplianceResultStatusCompliant = ComplianceResultStatus("compliant") ComplianceResultStatusNonCompliant = ComplianceResultStatus("nonCompliant") ComplianceResultStatusUnknown = ComplianceResultStatus("unknown") ) func init() { t["ComplianceResultStatus"] = reflect.TypeOf((*ComplianceResultStatus)(nil)).Elem() } type ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState string const ( ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateLicensed = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("licensed") ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateUnlicensed = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("unlicensed") ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateUnknown = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("unknown") ) func init() { t["ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState"] = reflect.TypeOf((*ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState)(nil)).Elem() } type ConfigSpecOperation string const ( ConfigSpecOperationAdd = ConfigSpecOperation("add") ConfigSpecOperationEdit = ConfigSpecOperation("edit") ConfigSpecOperationRemove = ConfigSpecOperation("remove") ) func init() { t["ConfigSpecOperation"] = reflect.TypeOf((*ConfigSpecOperation)(nil)).Elem() } type CustomizationLicenseDataMode string const ( CustomizationLicenseDataModePerServer = CustomizationLicenseDataMode("perServer") CustomizationLicenseDataModePerSeat = CustomizationLicenseDataMode("perSeat") ) func init() { t["CustomizationLicenseDataMode"] = reflect.TypeOf((*CustomizationLicenseDataMode)(nil)).Elem() } type CustomizationNetBIOSMode string const ( CustomizationNetBIOSModeEnableNetBIOSViaDhcp = CustomizationNetBIOSMode("enableNetBIOSViaDhcp") CustomizationNetBIOSModeEnableNetBIOS = CustomizationNetBIOSMode("enableNetBIOS") CustomizationNetBIOSModeDisableNetBIOS = CustomizationNetBIOSMode("disableNetBIOS") ) func init() { t["CustomizationNetBIOSMode"] = reflect.TypeOf((*CustomizationNetBIOSMode)(nil)).Elem() } type CustomizationSysprepRebootOption string const ( CustomizationSysprepRebootOptionReboot = CustomizationSysprepRebootOption("reboot") CustomizationSysprepRebootOptionNoreboot = CustomizationSysprepRebootOption("noreboot") CustomizationSysprepRebootOptionShutdown = CustomizationSysprepRebootOption("shutdown") ) func init() { t["CustomizationSysprepRebootOption"] = reflect.TypeOf((*CustomizationSysprepRebootOption)(nil)).Elem() } type DVPortStatusVmDirectPathGen2InactiveReasonNetwork string const ( DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptIncompatibleDvs = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptIncompatibleDvs") DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptNoCompatibleNics = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptNoCompatibleNics") DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptNoVirtualFunctionsAvailable = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptNoVirtualFunctionsAvailable") DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptDisabledForPort = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptDisabledForPort") ) func init() { t["DVPortStatusVmDirectPathGen2InactiveReasonNetwork"] = reflect.TypeOf((*DVPortStatusVmDirectPathGen2InactiveReasonNetwork)(nil)).Elem() } type DVPortStatusVmDirectPathGen2InactiveReasonOther string const ( DVPortStatusVmDirectPathGen2InactiveReasonOtherPortNptIncompatibleHost = DVPortStatusVmDirectPathGen2InactiveReasonOther("portNptIncompatibleHost") DVPortStatusVmDirectPathGen2InactiveReasonOtherPortNptIncompatibleConnectee = DVPortStatusVmDirectPathGen2InactiveReasonOther("portNptIncompatibleConnectee") ) func init() { t["DVPortStatusVmDirectPathGen2InactiveReasonOther"] = reflect.TypeOf((*DVPortStatusVmDirectPathGen2InactiveReasonOther)(nil)).Elem() } type DasConfigFaultDasConfigFaultReason string const ( DasConfigFaultDasConfigFaultReasonHostNetworkMisconfiguration = DasConfigFaultDasConfigFaultReason("HostNetworkMisconfiguration") DasConfigFaultDasConfigFaultReasonHostMisconfiguration = DasConfigFaultDasConfigFaultReason("HostMisconfiguration") DasConfigFaultDasConfigFaultReasonInsufficientPrivileges = DasConfigFaultDasConfigFaultReason("InsufficientPrivileges") DasConfigFaultDasConfigFaultReasonNoPrimaryAgentAvailable = DasConfigFaultDasConfigFaultReason("NoPrimaryAgentAvailable") DasConfigFaultDasConfigFaultReasonOther = DasConfigFaultDasConfigFaultReason("Other") DasConfigFaultDasConfigFaultReasonNoDatastoresConfigured = DasConfigFaultDasConfigFaultReason("NoDatastoresConfigured") DasConfigFaultDasConfigFaultReasonCreateConfigVvolFailed = DasConfigFaultDasConfigFaultReason("CreateConfigVvolFailed") DasConfigFaultDasConfigFaultReasonVSanNotSupportedOnHost = DasConfigFaultDasConfigFaultReason("VSanNotSupportedOnHost") DasConfigFaultDasConfigFaultReasonDasNetworkMisconfiguration = DasConfigFaultDasConfigFaultReason("DasNetworkMisconfiguration") ) func init() { t["DasConfigFaultDasConfigFaultReason"] = reflect.TypeOf((*DasConfigFaultDasConfigFaultReason)(nil)).Elem() } type DasVmPriority string const ( DasVmPriorityDisabled = DasVmPriority("disabled") DasVmPriorityLow = DasVmPriority("low") DasVmPriorityMedium = DasVmPriority("medium") DasVmPriorityHigh = DasVmPriority("high") ) func init() { t["DasVmPriority"] = reflect.TypeOf((*DasVmPriority)(nil)).Elem() } type DatastoreAccessible string const ( DatastoreAccessibleTrue = DatastoreAccessible("True") DatastoreAccessibleFalse = DatastoreAccessible("False") ) func init() { t["DatastoreAccessible"] = reflect.TypeOf((*DatastoreAccessible)(nil)).Elem() } type DatastoreSummaryMaintenanceModeState string const ( DatastoreSummaryMaintenanceModeStateNormal = DatastoreSummaryMaintenanceModeState("normal") DatastoreSummaryMaintenanceModeStateEnteringMaintenance = DatastoreSummaryMaintenanceModeState("enteringMaintenance") DatastoreSummaryMaintenanceModeStateInMaintenance = DatastoreSummaryMaintenanceModeState("inMaintenance") ) func init() { t["DatastoreSummaryMaintenanceModeState"] = reflect.TypeOf((*DatastoreSummaryMaintenanceModeState)(nil)).Elem() } type DayOfWeek string const ( DayOfWeekSunday = DayOfWeek("sunday") DayOfWeekMonday = DayOfWeek("monday") DayOfWeekTuesday = DayOfWeek("tuesday") DayOfWeekWednesday = DayOfWeek("wednesday") DayOfWeekThursday = DayOfWeek("thursday") DayOfWeekFriday = DayOfWeek("friday") DayOfWeekSaturday = DayOfWeek("saturday") ) func init() { t["DayOfWeek"] = reflect.TypeOf((*DayOfWeek)(nil)).Elem() } type DeviceNotSupportedReason string const ( DeviceNotSupportedReasonHost = DeviceNotSupportedReason("host") DeviceNotSupportedReasonGuest = DeviceNotSupportedReason("guest") ) func init() { t["DeviceNotSupportedReason"] = reflect.TypeOf((*DeviceNotSupportedReason)(nil)).Elem() } type DiagnosticManagerLogCreator string const ( DiagnosticManagerLogCreatorVpxd = DiagnosticManagerLogCreator("vpxd") DiagnosticManagerLogCreatorVpxa = DiagnosticManagerLogCreator("vpxa") DiagnosticManagerLogCreatorHostd = DiagnosticManagerLogCreator("hostd") DiagnosticManagerLogCreatorServerd = DiagnosticManagerLogCreator("serverd") DiagnosticManagerLogCreatorInstall = DiagnosticManagerLogCreator("install") DiagnosticManagerLogCreatorVpxClient = DiagnosticManagerLogCreator("vpxClient") DiagnosticManagerLogCreatorRecordLog = DiagnosticManagerLogCreator("recordLog") ) func init() { t["DiagnosticManagerLogCreator"] = reflect.TypeOf((*DiagnosticManagerLogCreator)(nil)).Elem() } type DiagnosticManagerLogFormat string const ( DiagnosticManagerLogFormatPlain = DiagnosticManagerLogFormat("plain") ) func init() { t["DiagnosticManagerLogFormat"] = reflect.TypeOf((*DiagnosticManagerLogFormat)(nil)).Elem() } type DiagnosticPartitionStorageType string const ( DiagnosticPartitionStorageTypeDirectAttached = DiagnosticPartitionStorageType("directAttached") DiagnosticPartitionStorageTypeNetworkAttached = DiagnosticPartitionStorageType("networkAttached") ) func init() { t["DiagnosticPartitionStorageType"] = reflect.TypeOf((*DiagnosticPartitionStorageType)(nil)).Elem() } type DiagnosticPartitionType string const ( DiagnosticPartitionTypeSingleHost = DiagnosticPartitionType("singleHost") DiagnosticPartitionTypeMultiHost = DiagnosticPartitionType("multiHost") ) func init() { t["DiagnosticPartitionType"] = reflect.TypeOf((*DiagnosticPartitionType)(nil)).Elem() } type DisallowedChangeByServiceDisallowedChange string const ( DisallowedChangeByServiceDisallowedChangeHotExtendDisk = DisallowedChangeByServiceDisallowedChange("hotExtendDisk") ) func init() { t["DisallowedChangeByServiceDisallowedChange"] = reflect.TypeOf((*DisallowedChangeByServiceDisallowedChange)(nil)).Elem() } type DistributedVirtualPortgroupMetaTagName string const ( DistributedVirtualPortgroupMetaTagNameDvsName = DistributedVirtualPortgroupMetaTagName("dvsName") DistributedVirtualPortgroupMetaTagNamePortgroupName = DistributedVirtualPortgroupMetaTagName("portgroupName") DistributedVirtualPortgroupMetaTagNamePortIndex = DistributedVirtualPortgroupMetaTagName("portIndex") ) func init() { t["DistributedVirtualPortgroupMetaTagName"] = reflect.TypeOf((*DistributedVirtualPortgroupMetaTagName)(nil)).Elem() } type DistributedVirtualPortgroupPortgroupType string const ( DistributedVirtualPortgroupPortgroupTypeEarlyBinding = DistributedVirtualPortgroupPortgroupType("earlyBinding") DistributedVirtualPortgroupPortgroupTypeLateBinding = DistributedVirtualPortgroupPortgroupType("lateBinding") DistributedVirtualPortgroupPortgroupTypeEphemeral = DistributedVirtualPortgroupPortgroupType("ephemeral") ) func init() { t["DistributedVirtualPortgroupPortgroupType"] = reflect.TypeOf((*DistributedVirtualPortgroupPortgroupType)(nil)).Elem() } type DistributedVirtualSwitchHostInfrastructureTrafficClass string const ( DistributedVirtualSwitchHostInfrastructureTrafficClassManagement = DistributedVirtualSwitchHostInfrastructureTrafficClass("management") DistributedVirtualSwitchHostInfrastructureTrafficClassFaultTolerance = DistributedVirtualSwitchHostInfrastructureTrafficClass("faultTolerance") DistributedVirtualSwitchHostInfrastructureTrafficClassVmotion = DistributedVirtualSwitchHostInfrastructureTrafficClass("vmotion") DistributedVirtualSwitchHostInfrastructureTrafficClassVirtualMachine = DistributedVirtualSwitchHostInfrastructureTrafficClass("virtualMachine") DistributedVirtualSwitchHostInfrastructureTrafficClassISCSI = DistributedVirtualSwitchHostInfrastructureTrafficClass("iSCSI") DistributedVirtualSwitchHostInfrastructureTrafficClassNfs = DistributedVirtualSwitchHostInfrastructureTrafficClass("nfs") DistributedVirtualSwitchHostInfrastructureTrafficClassHbr = DistributedVirtualSwitchHostInfrastructureTrafficClass("hbr") DistributedVirtualSwitchHostInfrastructureTrafficClassVsan = DistributedVirtualSwitchHostInfrastructureTrafficClass("vsan") DistributedVirtualSwitchHostInfrastructureTrafficClassVdp = DistributedVirtualSwitchHostInfrastructureTrafficClass("vdp") ) func init() { t["DistributedVirtualSwitchHostInfrastructureTrafficClass"] = reflect.TypeOf((*DistributedVirtualSwitchHostInfrastructureTrafficClass)(nil)).Elem() } type DistributedVirtualSwitchHostMemberHostComponentState string const ( DistributedVirtualSwitchHostMemberHostComponentStateUp = DistributedVirtualSwitchHostMemberHostComponentState("up") DistributedVirtualSwitchHostMemberHostComponentStatePending = DistributedVirtualSwitchHostMemberHostComponentState("pending") DistributedVirtualSwitchHostMemberHostComponentStateOutOfSync = DistributedVirtualSwitchHostMemberHostComponentState("outOfSync") DistributedVirtualSwitchHostMemberHostComponentStateWarning = DistributedVirtualSwitchHostMemberHostComponentState("warning") DistributedVirtualSwitchHostMemberHostComponentStateDisconnected = DistributedVirtualSwitchHostMemberHostComponentState("disconnected") DistributedVirtualSwitchHostMemberHostComponentStateDown = DistributedVirtualSwitchHostMemberHostComponentState("down") ) func init() { t["DistributedVirtualSwitchHostMemberHostComponentState"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberHostComponentState)(nil)).Elem() } type DistributedVirtualSwitchNetworkResourceControlVersion string const ( DistributedVirtualSwitchNetworkResourceControlVersionVersion2 = DistributedVirtualSwitchNetworkResourceControlVersion("version2") DistributedVirtualSwitchNetworkResourceControlVersionVersion3 = DistributedVirtualSwitchNetworkResourceControlVersion("version3") ) func init() { t["DistributedVirtualSwitchNetworkResourceControlVersion"] = reflect.TypeOf((*DistributedVirtualSwitchNetworkResourceControlVersion)(nil)).Elem() } type DistributedVirtualSwitchNicTeamingPolicyMode string const ( DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_ip = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_ip") DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_srcmac = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_srcmac") DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_srcid = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_srcid") DistributedVirtualSwitchNicTeamingPolicyModeFailover_explicit = DistributedVirtualSwitchNicTeamingPolicyMode("failover_explicit") DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_loadbased = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_loadbased") ) func init() { t["DistributedVirtualSwitchNicTeamingPolicyMode"] = reflect.TypeOf((*DistributedVirtualSwitchNicTeamingPolicyMode)(nil)).Elem() } type DistributedVirtualSwitchPortConnecteeConnecteeType string const ( DistributedVirtualSwitchPortConnecteeConnecteeTypePnic = DistributedVirtualSwitchPortConnecteeConnecteeType("pnic") DistributedVirtualSwitchPortConnecteeConnecteeTypeVmVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("vmVnic") DistributedVirtualSwitchPortConnecteeConnecteeTypeHostConsoleVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("hostConsoleVnic") DistributedVirtualSwitchPortConnecteeConnecteeTypeHostVmkVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("hostVmkVnic") ) func init() { t["DistributedVirtualSwitchPortConnecteeConnecteeType"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnecteeConnecteeType)(nil)).Elem() } type DistributedVirtualSwitchProductSpecOperationType string const ( DistributedVirtualSwitchProductSpecOperationTypePreInstall = DistributedVirtualSwitchProductSpecOperationType("preInstall") DistributedVirtualSwitchProductSpecOperationTypeUpgrade = DistributedVirtualSwitchProductSpecOperationType("upgrade") DistributedVirtualSwitchProductSpecOperationTypeNotifyAvailableUpgrade = DistributedVirtualSwitchProductSpecOperationType("notifyAvailableUpgrade") DistributedVirtualSwitchProductSpecOperationTypeProceedWithUpgrade = DistributedVirtualSwitchProductSpecOperationType("proceedWithUpgrade") DistributedVirtualSwitchProductSpecOperationTypeUpdateBundleInfo = DistributedVirtualSwitchProductSpecOperationType("updateBundleInfo") ) func init() { t["DistributedVirtualSwitchProductSpecOperationType"] = reflect.TypeOf((*DistributedVirtualSwitchProductSpecOperationType)(nil)).Elem() } type DpmBehavior string const ( DpmBehaviorManual = DpmBehavior("manual") DpmBehaviorAutomated = DpmBehavior("automated") ) func init() { t["DpmBehavior"] = reflect.TypeOf((*DpmBehavior)(nil)).Elem() } type DrsBehavior string const ( DrsBehaviorManual = DrsBehavior("manual") DrsBehaviorPartiallyAutomated = DrsBehavior("partiallyAutomated") DrsBehaviorFullyAutomated = DrsBehavior("fullyAutomated") ) func init() { t["DrsBehavior"] = reflect.TypeOf((*DrsBehavior)(nil)).Elem() } type DrsInjectorWorkloadCorrelationState string const ( DrsInjectorWorkloadCorrelationStateCorrelated = DrsInjectorWorkloadCorrelationState("Correlated") DrsInjectorWorkloadCorrelationStateUncorrelated = DrsInjectorWorkloadCorrelationState("Uncorrelated") ) func init() { t["DrsInjectorWorkloadCorrelationState"] = reflect.TypeOf((*DrsInjectorWorkloadCorrelationState)(nil)).Elem() } type DrsRecommendationReasonCode string const ( DrsRecommendationReasonCodeFairnessCpuAvg = DrsRecommendationReasonCode("fairnessCpuAvg") DrsRecommendationReasonCodeFairnessMemAvg = DrsRecommendationReasonCode("fairnessMemAvg") DrsRecommendationReasonCodeJointAffin = DrsRecommendationReasonCode("jointAffin") DrsRecommendationReasonCodeAntiAffin = DrsRecommendationReasonCode("antiAffin") DrsRecommendationReasonCodeHostMaint = DrsRecommendationReasonCode("hostMaint") ) func init() { t["DrsRecommendationReasonCode"] = reflect.TypeOf((*DrsRecommendationReasonCode)(nil)).Elem() } type DvsEventPortBlockState string const ( DvsEventPortBlockStateUnset = DvsEventPortBlockState("unset") DvsEventPortBlockStateBlocked = DvsEventPortBlockState("blocked") DvsEventPortBlockStateUnblocked = DvsEventPortBlockState("unblocked") DvsEventPortBlockStateUnknown = DvsEventPortBlockState("unknown") ) func init() { t["DvsEventPortBlockState"] = reflect.TypeOf((*DvsEventPortBlockState)(nil)).Elem() } type DvsFilterOnFailure string const ( DvsFilterOnFailureFailOpen = DvsFilterOnFailure("failOpen") DvsFilterOnFailureFailClosed = DvsFilterOnFailure("failClosed") ) func init() { t["DvsFilterOnFailure"] = reflect.TypeOf((*DvsFilterOnFailure)(nil)).Elem() } type DvsNetworkRuleDirectionType string const ( DvsNetworkRuleDirectionTypeIncomingPackets = DvsNetworkRuleDirectionType("incomingPackets") DvsNetworkRuleDirectionTypeOutgoingPackets = DvsNetworkRuleDirectionType("outgoingPackets") DvsNetworkRuleDirectionTypeBoth = DvsNetworkRuleDirectionType("both") ) func init() { t["DvsNetworkRuleDirectionType"] = reflect.TypeOf((*DvsNetworkRuleDirectionType)(nil)).Elem() } type EntityImportType string const ( EntityImportTypeCreateEntityWithNewIdentifier = EntityImportType("createEntityWithNewIdentifier") EntityImportTypeCreateEntityWithOriginalIdentifier = EntityImportType("createEntityWithOriginalIdentifier") EntityImportTypeApplyToEntitySpecified = EntityImportType("applyToEntitySpecified") ) func init() { t["EntityImportType"] = reflect.TypeOf((*EntityImportType)(nil)).Elem() } type EntityType string const ( EntityTypeDistributedVirtualSwitch = EntityType("distributedVirtualSwitch") EntityTypeDistributedVirtualPortgroup = EntityType("distributedVirtualPortgroup") ) func init() { t["EntityType"] = reflect.TypeOf((*EntityType)(nil)).Elem() } type EventAlarmExpressionComparisonOperator string const ( EventAlarmExpressionComparisonOperatorEquals = EventAlarmExpressionComparisonOperator("equals") EventAlarmExpressionComparisonOperatorNotEqualTo = EventAlarmExpressionComparisonOperator("notEqualTo") EventAlarmExpressionComparisonOperatorStartsWith = EventAlarmExpressionComparisonOperator("startsWith") EventAlarmExpressionComparisonOperatorDoesNotStartWith = EventAlarmExpressionComparisonOperator("doesNotStartWith") EventAlarmExpressionComparisonOperatorEndsWith = EventAlarmExpressionComparisonOperator("endsWith") EventAlarmExpressionComparisonOperatorDoesNotEndWith = EventAlarmExpressionComparisonOperator("doesNotEndWith") ) func init() { t["EventAlarmExpressionComparisonOperator"] = reflect.TypeOf((*EventAlarmExpressionComparisonOperator)(nil)).Elem() } type EventCategory string const ( EventCategoryInfo = EventCategory("info") EventCategoryWarning = EventCategory("warning") EventCategoryError = EventCategory("error") EventCategoryUser = EventCategory("user") ) func init() { t["EventCategory"] = reflect.TypeOf((*EventCategory)(nil)).Elem() } type EventEventSeverity string const ( EventEventSeverityError = EventEventSeverity("error") EventEventSeverityWarning = EventEventSeverity("warning") EventEventSeverityInfo = EventEventSeverity("info") EventEventSeverityUser = EventEventSeverity("user") ) func init() { t["EventEventSeverity"] = reflect.TypeOf((*EventEventSeverity)(nil)).Elem() } type EventFilterSpecRecursionOption string const ( EventFilterSpecRecursionOptionSelf = EventFilterSpecRecursionOption("self") EventFilterSpecRecursionOptionChildren = EventFilterSpecRecursionOption("children") EventFilterSpecRecursionOptionAll = EventFilterSpecRecursionOption("all") ) func init() { t["EventFilterSpecRecursionOption"] = reflect.TypeOf((*EventFilterSpecRecursionOption)(nil)).Elem() } type FibreChannelPortType string const ( FibreChannelPortTypeFabric = FibreChannelPortType("fabric") FibreChannelPortTypeLoop = FibreChannelPortType("loop") FibreChannelPortTypePointToPoint = FibreChannelPortType("pointToPoint") FibreChannelPortTypeUnknown = FibreChannelPortType("unknown") ) func init() { t["FibreChannelPortType"] = reflect.TypeOf((*FibreChannelPortType)(nil)).Elem() } type FileSystemMountInfoVStorageSupportStatus string const ( FileSystemMountInfoVStorageSupportStatusVStorageSupported = FileSystemMountInfoVStorageSupportStatus("vStorageSupported") FileSystemMountInfoVStorageSupportStatusVStorageUnsupported = FileSystemMountInfoVStorageSupportStatus("vStorageUnsupported") FileSystemMountInfoVStorageSupportStatusVStorageUnknown = FileSystemMountInfoVStorageSupportStatus("vStorageUnknown") ) func init() { t["FileSystemMountInfoVStorageSupportStatus"] = reflect.TypeOf((*FileSystemMountInfoVStorageSupportStatus)(nil)).Elem() } type FtIssuesOnHostHostSelectionType string const ( FtIssuesOnHostHostSelectionTypeUser = FtIssuesOnHostHostSelectionType("user") FtIssuesOnHostHostSelectionTypeVc = FtIssuesOnHostHostSelectionType("vc") FtIssuesOnHostHostSelectionTypeDrs = FtIssuesOnHostHostSelectionType("drs") ) func init() { t["FtIssuesOnHostHostSelectionType"] = reflect.TypeOf((*FtIssuesOnHostHostSelectionType)(nil)).Elem() } type GuestFileType string const ( GuestFileTypeFile = GuestFileType("file") GuestFileTypeDirectory = GuestFileType("directory") GuestFileTypeSymlink = GuestFileType("symlink") ) func init() { t["GuestFileType"] = reflect.TypeOf((*GuestFileType)(nil)).Elem() } type GuestInfoAppStateType string const ( GuestInfoAppStateTypeNone = GuestInfoAppStateType("none") GuestInfoAppStateTypeAppStateOk = GuestInfoAppStateType("appStateOk") GuestInfoAppStateTypeAppStateNeedReset = GuestInfoAppStateType("appStateNeedReset") ) func init() { t["GuestInfoAppStateType"] = reflect.TypeOf((*GuestInfoAppStateType)(nil)).Elem() } type GuestOsDescriptorFirmwareType string const ( GuestOsDescriptorFirmwareTypeBios = GuestOsDescriptorFirmwareType("bios") GuestOsDescriptorFirmwareTypeEfi = GuestOsDescriptorFirmwareType("efi") ) func init() { t["GuestOsDescriptorFirmwareType"] = reflect.TypeOf((*GuestOsDescriptorFirmwareType)(nil)).Elem() } type GuestOsDescriptorSupportLevel string const ( GuestOsDescriptorSupportLevelExperimental = GuestOsDescriptorSupportLevel("experimental") GuestOsDescriptorSupportLevelLegacy = GuestOsDescriptorSupportLevel("legacy") GuestOsDescriptorSupportLevelTerminated = GuestOsDescriptorSupportLevel("terminated") GuestOsDescriptorSupportLevelSupported = GuestOsDescriptorSupportLevel("supported") GuestOsDescriptorSupportLevelUnsupported = GuestOsDescriptorSupportLevel("unsupported") GuestOsDescriptorSupportLevelDeprecated = GuestOsDescriptorSupportLevel("deprecated") GuestOsDescriptorSupportLevelTechPreview = GuestOsDescriptorSupportLevel("techPreview") ) func init() { t["GuestOsDescriptorSupportLevel"] = reflect.TypeOf((*GuestOsDescriptorSupportLevel)(nil)).Elem() } type GuestRegKeyWowSpec string const ( GuestRegKeyWowSpecWOWNative = GuestRegKeyWowSpec("WOWNative") GuestRegKeyWowSpecWOW32 = GuestRegKeyWowSpec("WOW32") GuestRegKeyWowSpecWOW64 = GuestRegKeyWowSpec("WOW64") ) func init() { t["GuestRegKeyWowSpec"] = reflect.TypeOf((*GuestRegKeyWowSpec)(nil)).Elem() } type HealthUpdateInfoComponentType string const ( HealthUpdateInfoComponentTypeMemory = HealthUpdateInfoComponentType("Memory") HealthUpdateInfoComponentTypePower = HealthUpdateInfoComponentType("Power") HealthUpdateInfoComponentTypeFan = HealthUpdateInfoComponentType("Fan") HealthUpdateInfoComponentTypeNetwork = HealthUpdateInfoComponentType("Network") HealthUpdateInfoComponentTypeStorage = HealthUpdateInfoComponentType("Storage") ) func init() { t["HealthUpdateInfoComponentType"] = reflect.TypeOf((*HealthUpdateInfoComponentType)(nil)).Elem() } type HostAccessMode string const ( HostAccessModeAccessNone = HostAccessMode("accessNone") HostAccessModeAccessAdmin = HostAccessMode("accessAdmin") HostAccessModeAccessNoAccess = HostAccessMode("accessNoAccess") HostAccessModeAccessReadOnly = HostAccessMode("accessReadOnly") HostAccessModeAccessOther = HostAccessMode("accessOther") ) func init() { t["HostAccessMode"] = reflect.TypeOf((*HostAccessMode)(nil)).Elem() } type HostActiveDirectoryAuthenticationCertificateDigest string const ( HostActiveDirectoryAuthenticationCertificateDigestSHA1 = HostActiveDirectoryAuthenticationCertificateDigest("SHA1") ) func init() { t["HostActiveDirectoryAuthenticationCertificateDigest"] = reflect.TypeOf((*HostActiveDirectoryAuthenticationCertificateDigest)(nil)).Elem() } type HostActiveDirectoryInfoDomainMembershipStatus string const ( HostActiveDirectoryInfoDomainMembershipStatusUnknown = HostActiveDirectoryInfoDomainMembershipStatus("unknown") HostActiveDirectoryInfoDomainMembershipStatusOk = HostActiveDirectoryInfoDomainMembershipStatus("ok") HostActiveDirectoryInfoDomainMembershipStatusNoServers = HostActiveDirectoryInfoDomainMembershipStatus("noServers") HostActiveDirectoryInfoDomainMembershipStatusClientTrustBroken = HostActiveDirectoryInfoDomainMembershipStatus("clientTrustBroken") HostActiveDirectoryInfoDomainMembershipStatusServerTrustBroken = HostActiveDirectoryInfoDomainMembershipStatus("serverTrustBroken") HostActiveDirectoryInfoDomainMembershipStatusInconsistentTrust = HostActiveDirectoryInfoDomainMembershipStatus("inconsistentTrust") HostActiveDirectoryInfoDomainMembershipStatusOtherProblem = HostActiveDirectoryInfoDomainMembershipStatus("otherProblem") ) func init() { t["HostActiveDirectoryInfoDomainMembershipStatus"] = reflect.TypeOf((*HostActiveDirectoryInfoDomainMembershipStatus)(nil)).Elem() } type HostCapabilityFtUnsupportedReason string const ( HostCapabilityFtUnsupportedReasonVMotionNotLicensed = HostCapabilityFtUnsupportedReason("vMotionNotLicensed") HostCapabilityFtUnsupportedReasonMissingVMotionNic = HostCapabilityFtUnsupportedReason("missingVMotionNic") HostCapabilityFtUnsupportedReasonMissingFTLoggingNic = HostCapabilityFtUnsupportedReason("missingFTLoggingNic") HostCapabilityFtUnsupportedReasonFtNotLicensed = HostCapabilityFtUnsupportedReason("ftNotLicensed") HostCapabilityFtUnsupportedReasonHaAgentIssue = HostCapabilityFtUnsupportedReason("haAgentIssue") HostCapabilityFtUnsupportedReasonUnsupportedProduct = HostCapabilityFtUnsupportedReason("unsupportedProduct") HostCapabilityFtUnsupportedReasonCpuHvUnsupported = HostCapabilityFtUnsupportedReason("cpuHvUnsupported") HostCapabilityFtUnsupportedReasonCpuHwmmuUnsupported = HostCapabilityFtUnsupportedReason("cpuHwmmuUnsupported") HostCapabilityFtUnsupportedReasonCpuHvDisabled = HostCapabilityFtUnsupportedReason("cpuHvDisabled") ) func init() { t["HostCapabilityFtUnsupportedReason"] = reflect.TypeOf((*HostCapabilityFtUnsupportedReason)(nil)).Elem() } type HostCapabilityVmDirectPathGen2UnsupportedReason string const ( HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptIncompatibleProduct = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptIncompatibleProduct") HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptIncompatibleHardware = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptIncompatibleHardware") HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptDisabled = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptDisabled") ) func init() { t["HostCapabilityVmDirectPathGen2UnsupportedReason"] = reflect.TypeOf((*HostCapabilityVmDirectPathGen2UnsupportedReason)(nil)).Elem() } type HostCertificateManagerCertificateInfoCertificateStatus string const ( HostCertificateManagerCertificateInfoCertificateStatusUnknown = HostCertificateManagerCertificateInfoCertificateStatus("unknown") HostCertificateManagerCertificateInfoCertificateStatusExpired = HostCertificateManagerCertificateInfoCertificateStatus("expired") HostCertificateManagerCertificateInfoCertificateStatusExpiring = HostCertificateManagerCertificateInfoCertificateStatus("expiring") HostCertificateManagerCertificateInfoCertificateStatusExpiringShortly = HostCertificateManagerCertificateInfoCertificateStatus("expiringShortly") HostCertificateManagerCertificateInfoCertificateStatusExpirationImminent = HostCertificateManagerCertificateInfoCertificateStatus("expirationImminent") HostCertificateManagerCertificateInfoCertificateStatusGood = HostCertificateManagerCertificateInfoCertificateStatus("good") ) func init() { t["HostCertificateManagerCertificateInfoCertificateStatus"] = reflect.TypeOf((*HostCertificateManagerCertificateInfoCertificateStatus)(nil)).Elem() } type HostConfigChangeMode string const ( HostConfigChangeModeModify = HostConfigChangeMode("modify") HostConfigChangeModeReplace = HostConfigChangeMode("replace") ) func init() { t["HostConfigChangeMode"] = reflect.TypeOf((*HostConfigChangeMode)(nil)).Elem() } type HostConfigChangeOperation string const ( HostConfigChangeOperationAdd = HostConfigChangeOperation("add") HostConfigChangeOperationRemove = HostConfigChangeOperation("remove") HostConfigChangeOperationEdit = HostConfigChangeOperation("edit") HostConfigChangeOperationIgnore = HostConfigChangeOperation("ignore") ) func init() { t["HostConfigChangeOperation"] = reflect.TypeOf((*HostConfigChangeOperation)(nil)).Elem() } type HostCpuPackageVendor string const ( HostCpuPackageVendorUnknown = HostCpuPackageVendor("unknown") HostCpuPackageVendorIntel = HostCpuPackageVendor("intel") HostCpuPackageVendorAmd = HostCpuPackageVendor("amd") ) func init() { t["HostCpuPackageVendor"] = reflect.TypeOf((*HostCpuPackageVendor)(nil)).Elem() } type HostCpuPowerManagementInfoPolicyType string const ( HostCpuPowerManagementInfoPolicyTypeOff = HostCpuPowerManagementInfoPolicyType("off") HostCpuPowerManagementInfoPolicyTypeStaticPolicy = HostCpuPowerManagementInfoPolicyType("staticPolicy") HostCpuPowerManagementInfoPolicyTypeDynamicPolicy = HostCpuPowerManagementInfoPolicyType("dynamicPolicy") ) func init() { t["HostCpuPowerManagementInfoPolicyType"] = reflect.TypeOf((*HostCpuPowerManagementInfoPolicyType)(nil)).Elem() } type HostCryptoState string const ( HostCryptoStateIncapable = HostCryptoState("incapable") HostCryptoStatePrepared = HostCryptoState("prepared") HostCryptoStateSafe = HostCryptoState("safe") ) func init() { t["HostCryptoState"] = reflect.TypeOf((*HostCryptoState)(nil)).Elem() } type HostDasErrorEventHostDasErrorReason string const ( HostDasErrorEventHostDasErrorReasonConfigFailed = HostDasErrorEventHostDasErrorReason("configFailed") HostDasErrorEventHostDasErrorReasonTimeout = HostDasErrorEventHostDasErrorReason("timeout") HostDasErrorEventHostDasErrorReasonCommunicationInitFailed = HostDasErrorEventHostDasErrorReason("communicationInitFailed") HostDasErrorEventHostDasErrorReasonHealthCheckScriptFailed = HostDasErrorEventHostDasErrorReason("healthCheckScriptFailed") HostDasErrorEventHostDasErrorReasonAgentFailed = HostDasErrorEventHostDasErrorReason("agentFailed") HostDasErrorEventHostDasErrorReasonAgentShutdown = HostDasErrorEventHostDasErrorReason("agentShutdown") HostDasErrorEventHostDasErrorReasonIsolationAddressUnpingable = HostDasErrorEventHostDasErrorReason("isolationAddressUnpingable") HostDasErrorEventHostDasErrorReasonOther = HostDasErrorEventHostDasErrorReason("other") ) func init() { t["HostDasErrorEventHostDasErrorReason"] = reflect.TypeOf((*HostDasErrorEventHostDasErrorReason)(nil)).Elem() } type HostDigestInfoDigestMethodType string const ( HostDigestInfoDigestMethodTypeSHA1 = HostDigestInfoDigestMethodType("SHA1") HostDigestInfoDigestMethodTypeMD5 = HostDigestInfoDigestMethodType("MD5") ) func init() { t["HostDigestInfoDigestMethodType"] = reflect.TypeOf((*HostDigestInfoDigestMethodType)(nil)).Elem() } type HostDisconnectedEventReasonCode string const ( HostDisconnectedEventReasonCodeSslThumbprintVerifyFailed = HostDisconnectedEventReasonCode("sslThumbprintVerifyFailed") HostDisconnectedEventReasonCodeLicenseExpired = HostDisconnectedEventReasonCode("licenseExpired") HostDisconnectedEventReasonCodeAgentUpgrade = HostDisconnectedEventReasonCode("agentUpgrade") HostDisconnectedEventReasonCodeUserRequest = HostDisconnectedEventReasonCode("userRequest") HostDisconnectedEventReasonCodeInsufficientLicenses = HostDisconnectedEventReasonCode("insufficientLicenses") HostDisconnectedEventReasonCodeAgentOutOfDate = HostDisconnectedEventReasonCode("agentOutOfDate") HostDisconnectedEventReasonCodePasswordDecryptFailure = HostDisconnectedEventReasonCode("passwordDecryptFailure") HostDisconnectedEventReasonCodeUnknown = HostDisconnectedEventReasonCode("unknown") HostDisconnectedEventReasonCodeVcVRAMCapacityExceeded = HostDisconnectedEventReasonCode("vcVRAMCapacityExceeded") ) func init() { t["HostDisconnectedEventReasonCode"] = reflect.TypeOf((*HostDisconnectedEventReasonCode)(nil)).Elem() } type HostDiskPartitionInfoPartitionFormat string const ( HostDiskPartitionInfoPartitionFormatGpt = HostDiskPartitionInfoPartitionFormat("gpt") HostDiskPartitionInfoPartitionFormatMbr = HostDiskPartitionInfoPartitionFormat("mbr") HostDiskPartitionInfoPartitionFormatUnknown = HostDiskPartitionInfoPartitionFormat("unknown") ) func init() { t["HostDiskPartitionInfoPartitionFormat"] = reflect.TypeOf((*HostDiskPartitionInfoPartitionFormat)(nil)).Elem() } type HostDiskPartitionInfoType string const ( HostDiskPartitionInfoTypeNone = HostDiskPartitionInfoType("none") HostDiskPartitionInfoTypeVmfs = HostDiskPartitionInfoType("vmfs") HostDiskPartitionInfoTypeLinuxNative = HostDiskPartitionInfoType("linuxNative") HostDiskPartitionInfoTypeLinuxSwap = HostDiskPartitionInfoType("linuxSwap") HostDiskPartitionInfoTypeExtended = HostDiskPartitionInfoType("extended") HostDiskPartitionInfoTypeNtfs = HostDiskPartitionInfoType("ntfs") HostDiskPartitionInfoTypeVmkDiagnostic = HostDiskPartitionInfoType("vmkDiagnostic") HostDiskPartitionInfoTypeVffs = HostDiskPartitionInfoType("vffs") ) func init() { t["HostDiskPartitionInfoType"] = reflect.TypeOf((*HostDiskPartitionInfoType)(nil)).Elem() } type HostFeatureVersionKey string const ( HostFeatureVersionKeyFaultTolerance = HostFeatureVersionKey("faultTolerance") ) func init() { t["HostFeatureVersionKey"] = reflect.TypeOf((*HostFeatureVersionKey)(nil)).Elem() } type HostFileSystemVolumeFileSystemType string const ( HostFileSystemVolumeFileSystemTypeVMFS = HostFileSystemVolumeFileSystemType("VMFS") HostFileSystemVolumeFileSystemTypeNFS = HostFileSystemVolumeFileSystemType("NFS") HostFileSystemVolumeFileSystemTypeNFS41 = HostFileSystemVolumeFileSystemType("NFS41") HostFileSystemVolumeFileSystemTypeCIFS = HostFileSystemVolumeFileSystemType("CIFS") HostFileSystemVolumeFileSystemTypeVsan = HostFileSystemVolumeFileSystemType("vsan") HostFileSystemVolumeFileSystemTypeVFFS = HostFileSystemVolumeFileSystemType("VFFS") HostFileSystemVolumeFileSystemTypeVVOL = HostFileSystemVolumeFileSystemType("VVOL") HostFileSystemVolumeFileSystemTypeOTHER = HostFileSystemVolumeFileSystemType("OTHER") ) func init() { t["HostFileSystemVolumeFileSystemType"] = reflect.TypeOf((*HostFileSystemVolumeFileSystemType)(nil)).Elem() } type HostFirewallRuleDirection string const ( HostFirewallRuleDirectionInbound = HostFirewallRuleDirection("inbound") HostFirewallRuleDirectionOutbound = HostFirewallRuleDirection("outbound") ) func init() { t["HostFirewallRuleDirection"] = reflect.TypeOf((*HostFirewallRuleDirection)(nil)).Elem() } type HostFirewallRulePortType string const ( HostFirewallRulePortTypeSrc = HostFirewallRulePortType("src") HostFirewallRulePortTypeDst = HostFirewallRulePortType("dst") ) func init() { t["HostFirewallRulePortType"] = reflect.TypeOf((*HostFirewallRulePortType)(nil)).Elem() } type HostFirewallRuleProtocol string const ( HostFirewallRuleProtocolTcp = HostFirewallRuleProtocol("tcp") HostFirewallRuleProtocolUdp = HostFirewallRuleProtocol("udp") ) func init() { t["HostFirewallRuleProtocol"] = reflect.TypeOf((*HostFirewallRuleProtocol)(nil)).Elem() } type HostGraphicsConfigGraphicsType string const ( HostGraphicsConfigGraphicsTypeShared = HostGraphicsConfigGraphicsType("shared") HostGraphicsConfigGraphicsTypeSharedDirect = HostGraphicsConfigGraphicsType("sharedDirect") ) func init() { t["HostGraphicsConfigGraphicsType"] = reflect.TypeOf((*HostGraphicsConfigGraphicsType)(nil)).Elem() } type HostGraphicsConfigSharedPassthruAssignmentPolicy string const ( HostGraphicsConfigSharedPassthruAssignmentPolicyPerformance = HostGraphicsConfigSharedPassthruAssignmentPolicy("performance") HostGraphicsConfigSharedPassthruAssignmentPolicyConsolidation = HostGraphicsConfigSharedPassthruAssignmentPolicy("consolidation") ) func init() { t["HostGraphicsConfigSharedPassthruAssignmentPolicy"] = reflect.TypeOf((*HostGraphicsConfigSharedPassthruAssignmentPolicy)(nil)).Elem() } type HostGraphicsInfoGraphicsType string const ( HostGraphicsInfoGraphicsTypeBasic = HostGraphicsInfoGraphicsType("basic") HostGraphicsInfoGraphicsTypeShared = HostGraphicsInfoGraphicsType("shared") HostGraphicsInfoGraphicsTypeDirect = HostGraphicsInfoGraphicsType("direct") HostGraphicsInfoGraphicsTypeSharedDirect = HostGraphicsInfoGraphicsType("sharedDirect") ) func init() { t["HostGraphicsInfoGraphicsType"] = reflect.TypeOf((*HostGraphicsInfoGraphicsType)(nil)).Elem() } type HostHardwareElementStatus string const ( HostHardwareElementStatusUnknown = HostHardwareElementStatus("Unknown") HostHardwareElementStatusGreen = HostHardwareElementStatus("Green") HostHardwareElementStatusYellow = HostHardwareElementStatus("Yellow") HostHardwareElementStatusRed = HostHardwareElementStatus("Red") ) func init() { t["HostHardwareElementStatus"] = reflect.TypeOf((*HostHardwareElementStatus)(nil)).Elem() } type HostHasComponentFailureHostComponentType string const ( HostHasComponentFailureHostComponentTypeDatastore = HostHasComponentFailureHostComponentType("Datastore") ) func init() { t["HostHasComponentFailureHostComponentType"] = reflect.TypeOf((*HostHasComponentFailureHostComponentType)(nil)).Elem() } type HostImageAcceptanceLevel string const ( HostImageAcceptanceLevelVmware_certified = HostImageAcceptanceLevel("vmware_certified") HostImageAcceptanceLevelVmware_accepted = HostImageAcceptanceLevel("vmware_accepted") HostImageAcceptanceLevelPartner = HostImageAcceptanceLevel("partner") HostImageAcceptanceLevelCommunity = HostImageAcceptanceLevel("community") ) func init() { t["HostImageAcceptanceLevel"] = reflect.TypeOf((*HostImageAcceptanceLevel)(nil)).Elem() } type HostIncompatibleForFaultToleranceReason string const ( HostIncompatibleForFaultToleranceReasonProduct = HostIncompatibleForFaultToleranceReason("product") HostIncompatibleForFaultToleranceReasonProcessor = HostIncompatibleForFaultToleranceReason("processor") ) func init() { t["HostIncompatibleForFaultToleranceReason"] = reflect.TypeOf((*HostIncompatibleForFaultToleranceReason)(nil)).Elem() } type HostIncompatibleForRecordReplayReason string const ( HostIncompatibleForRecordReplayReasonProduct = HostIncompatibleForRecordReplayReason("product") HostIncompatibleForRecordReplayReasonProcessor = HostIncompatibleForRecordReplayReason("processor") ) func init() { t["HostIncompatibleForRecordReplayReason"] = reflect.TypeOf((*HostIncompatibleForRecordReplayReason)(nil)).Elem() } type HostInternetScsiHbaChapAuthenticationType string const ( HostInternetScsiHbaChapAuthenticationTypeChapProhibited = HostInternetScsiHbaChapAuthenticationType("chapProhibited") HostInternetScsiHbaChapAuthenticationTypeChapDiscouraged = HostInternetScsiHbaChapAuthenticationType("chapDiscouraged") HostInternetScsiHbaChapAuthenticationTypeChapPreferred = HostInternetScsiHbaChapAuthenticationType("chapPreferred") HostInternetScsiHbaChapAuthenticationTypeChapRequired = HostInternetScsiHbaChapAuthenticationType("chapRequired") ) func init() { t["HostInternetScsiHbaChapAuthenticationType"] = reflect.TypeOf((*HostInternetScsiHbaChapAuthenticationType)(nil)).Elem() } type HostInternetScsiHbaDigestType string const ( HostInternetScsiHbaDigestTypeDigestProhibited = HostInternetScsiHbaDigestType("digestProhibited") HostInternetScsiHbaDigestTypeDigestDiscouraged = HostInternetScsiHbaDigestType("digestDiscouraged") HostInternetScsiHbaDigestTypeDigestPreferred = HostInternetScsiHbaDigestType("digestPreferred") HostInternetScsiHbaDigestTypeDigestRequired = HostInternetScsiHbaDigestType("digestRequired") ) func init() { t["HostInternetScsiHbaDigestType"] = reflect.TypeOf((*HostInternetScsiHbaDigestType)(nil)).Elem() } type HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType string const ( HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeDHCP = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("DHCP") HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeAutoConfigured = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("AutoConfigured") HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeStatic = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("Static") HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeOther = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("Other") ) func init() { t["HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType)(nil)).Elem() } type HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation string const ( HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperationAdd = HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation("add") HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperationRemove = HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation("remove") ) func init() { t["HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation)(nil)).Elem() } type HostInternetScsiHbaNetworkBindingSupportType string const ( HostInternetScsiHbaNetworkBindingSupportTypeNotsupported = HostInternetScsiHbaNetworkBindingSupportType("notsupported") HostInternetScsiHbaNetworkBindingSupportTypeOptional = HostInternetScsiHbaNetworkBindingSupportType("optional") HostInternetScsiHbaNetworkBindingSupportTypeRequired = HostInternetScsiHbaNetworkBindingSupportType("required") ) func init() { t["HostInternetScsiHbaNetworkBindingSupportType"] = reflect.TypeOf((*HostInternetScsiHbaNetworkBindingSupportType)(nil)).Elem() } type HostInternetScsiHbaStaticTargetTargetDiscoveryMethod string const ( HostInternetScsiHbaStaticTargetTargetDiscoveryMethodStaticMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("staticMethod") HostInternetScsiHbaStaticTargetTargetDiscoveryMethodSendTargetMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("sendTargetMethod") HostInternetScsiHbaStaticTargetTargetDiscoveryMethodSlpMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("slpMethod") HostInternetScsiHbaStaticTargetTargetDiscoveryMethodIsnsMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("isnsMethod") HostInternetScsiHbaStaticTargetTargetDiscoveryMethodUnknownMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("unknownMethod") ) func init() { t["HostInternetScsiHbaStaticTargetTargetDiscoveryMethod"] = reflect.TypeOf((*HostInternetScsiHbaStaticTargetTargetDiscoveryMethod)(nil)).Elem() } type HostIpConfigIpV6AddressConfigType string const ( HostIpConfigIpV6AddressConfigTypeOther = HostIpConfigIpV6AddressConfigType("other") HostIpConfigIpV6AddressConfigTypeManual = HostIpConfigIpV6AddressConfigType("manual") HostIpConfigIpV6AddressConfigTypeDhcp = HostIpConfigIpV6AddressConfigType("dhcp") HostIpConfigIpV6AddressConfigTypeLinklayer = HostIpConfigIpV6AddressConfigType("linklayer") HostIpConfigIpV6AddressConfigTypeRandom = HostIpConfigIpV6AddressConfigType("random") ) func init() { t["HostIpConfigIpV6AddressConfigType"] = reflect.TypeOf((*HostIpConfigIpV6AddressConfigType)(nil)).Elem() } type HostIpConfigIpV6AddressStatus string const ( HostIpConfigIpV6AddressStatusPreferred = HostIpConfigIpV6AddressStatus("preferred") HostIpConfigIpV6AddressStatusDeprecated = HostIpConfigIpV6AddressStatus("deprecated") HostIpConfigIpV6AddressStatusInvalid = HostIpConfigIpV6AddressStatus("invalid") HostIpConfigIpV6AddressStatusInaccessible = HostIpConfigIpV6AddressStatus("inaccessible") HostIpConfigIpV6AddressStatusUnknown = HostIpConfigIpV6AddressStatus("unknown") HostIpConfigIpV6AddressStatusTentative = HostIpConfigIpV6AddressStatus("tentative") HostIpConfigIpV6AddressStatusDuplicate = HostIpConfigIpV6AddressStatus("duplicate") ) func init() { t["HostIpConfigIpV6AddressStatus"] = reflect.TypeOf((*HostIpConfigIpV6AddressStatus)(nil)).Elem() } type HostLicensableResourceKey string const ( HostLicensableResourceKeyNumCpuPackages = HostLicensableResourceKey("numCpuPackages") HostLicensableResourceKeyNumCpuCores = HostLicensableResourceKey("numCpuCores") HostLicensableResourceKeyMemorySize = HostLicensableResourceKey("memorySize") HostLicensableResourceKeyMemoryForVms = HostLicensableResourceKey("memoryForVms") HostLicensableResourceKeyNumVmsStarted = HostLicensableResourceKey("numVmsStarted") HostLicensableResourceKeyNumVmsStarting = HostLicensableResourceKey("numVmsStarting") ) func init() { t["HostLicensableResourceKey"] = reflect.TypeOf((*HostLicensableResourceKey)(nil)).Elem() } type HostLockdownMode string const ( HostLockdownModeLockdownDisabled = HostLockdownMode("lockdownDisabled") HostLockdownModeLockdownNormal = HostLockdownMode("lockdownNormal") HostLockdownModeLockdownStrict = HostLockdownMode("lockdownStrict") ) func init() { t["HostLockdownMode"] = reflect.TypeOf((*HostLockdownMode)(nil)).Elem() } type HostLowLevelProvisioningManagerFileType string const ( HostLowLevelProvisioningManagerFileTypeFile = HostLowLevelProvisioningManagerFileType("File") HostLowLevelProvisioningManagerFileTypeVirtualDisk = HostLowLevelProvisioningManagerFileType("VirtualDisk") HostLowLevelProvisioningManagerFileTypeDirectory = HostLowLevelProvisioningManagerFileType("Directory") ) func init() { t["HostLowLevelProvisioningManagerFileType"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileType)(nil)).Elem() } type HostLowLevelProvisioningManagerReloadTarget string const ( HostLowLevelProvisioningManagerReloadTargetCurrentConfig = HostLowLevelProvisioningManagerReloadTarget("currentConfig") HostLowLevelProvisioningManagerReloadTargetSnapshotConfig = HostLowLevelProvisioningManagerReloadTarget("snapshotConfig") ) func init() { t["HostLowLevelProvisioningManagerReloadTarget"] = reflect.TypeOf((*HostLowLevelProvisioningManagerReloadTarget)(nil)).Elem() } type HostMountInfoInaccessibleReason string const ( HostMountInfoInaccessibleReasonAllPathsDown_Start = HostMountInfoInaccessibleReason("AllPathsDown_Start") HostMountInfoInaccessibleReasonAllPathsDown_Timeout = HostMountInfoInaccessibleReason("AllPathsDown_Timeout") HostMountInfoInaccessibleReasonPermanentDeviceLoss = HostMountInfoInaccessibleReason("PermanentDeviceLoss") ) func init() { t["HostMountInfoInaccessibleReason"] = reflect.TypeOf((*HostMountInfoInaccessibleReason)(nil)).Elem() } type HostMountMode string const ( HostMountModeReadWrite = HostMountMode("readWrite") HostMountModeReadOnly = HostMountMode("readOnly") ) func init() { t["HostMountMode"] = reflect.TypeOf((*HostMountMode)(nil)).Elem() } type HostNasVolumeSecurityType string const ( HostNasVolumeSecurityTypeAUTH_SYS = HostNasVolumeSecurityType("AUTH_SYS") HostNasVolumeSecurityTypeSEC_KRB5 = HostNasVolumeSecurityType("SEC_KRB5") HostNasVolumeSecurityTypeSEC_KRB5I = HostNasVolumeSecurityType("SEC_KRB5I") ) func init() { t["HostNasVolumeSecurityType"] = reflect.TypeOf((*HostNasVolumeSecurityType)(nil)).Elem() } type HostNetStackInstanceCongestionControlAlgorithmType string const ( HostNetStackInstanceCongestionControlAlgorithmTypeNewreno = HostNetStackInstanceCongestionControlAlgorithmType("newreno") HostNetStackInstanceCongestionControlAlgorithmTypeCubic = HostNetStackInstanceCongestionControlAlgorithmType("cubic") ) func init() { t["HostNetStackInstanceCongestionControlAlgorithmType"] = reflect.TypeOf((*HostNetStackInstanceCongestionControlAlgorithmType)(nil)).Elem() } type HostNetStackInstanceSystemStackKey string const ( HostNetStackInstanceSystemStackKeyDefaultTcpipStack = HostNetStackInstanceSystemStackKey("defaultTcpipStack") HostNetStackInstanceSystemStackKeyVmotion = HostNetStackInstanceSystemStackKey("vmotion") HostNetStackInstanceSystemStackKeyVSphereProvisioning = HostNetStackInstanceSystemStackKey("vSphereProvisioning") ) func init() { t["HostNetStackInstanceSystemStackKey"] = reflect.TypeOf((*HostNetStackInstanceSystemStackKey)(nil)).Elem() } type HostNumericSensorHealthState string const ( HostNumericSensorHealthStateUnknown = HostNumericSensorHealthState("unknown") HostNumericSensorHealthStateGreen = HostNumericSensorHealthState("green") HostNumericSensorHealthStateYellow = HostNumericSensorHealthState("yellow") HostNumericSensorHealthStateRed = HostNumericSensorHealthState("red") ) func init() { t["HostNumericSensorHealthState"] = reflect.TypeOf((*HostNumericSensorHealthState)(nil)).Elem() } type HostNumericSensorType string const ( HostNumericSensorTypeFan = HostNumericSensorType("fan") HostNumericSensorTypePower = HostNumericSensorType("power") HostNumericSensorTypeTemperature = HostNumericSensorType("temperature") HostNumericSensorTypeVoltage = HostNumericSensorType("voltage") HostNumericSensorTypeOther = HostNumericSensorType("other") HostNumericSensorTypeProcessor = HostNumericSensorType("processor") HostNumericSensorTypeMemory = HostNumericSensorType("memory") HostNumericSensorTypeStorage = HostNumericSensorType("storage") HostNumericSensorTypeSystemBoard = HostNumericSensorType("systemBoard") HostNumericSensorTypeBattery = HostNumericSensorType("battery") HostNumericSensorTypeBios = HostNumericSensorType("bios") HostNumericSensorTypeCable = HostNumericSensorType("cable") HostNumericSensorTypeWatchdog = HostNumericSensorType("watchdog") ) func init() { t["HostNumericSensorType"] = reflect.TypeOf((*HostNumericSensorType)(nil)).Elem() } type HostOpaqueSwitchOpaqueSwitchState string const ( HostOpaqueSwitchOpaqueSwitchStateUp = HostOpaqueSwitchOpaqueSwitchState("up") HostOpaqueSwitchOpaqueSwitchStateWarning = HostOpaqueSwitchOpaqueSwitchState("warning") HostOpaqueSwitchOpaqueSwitchStateDown = HostOpaqueSwitchOpaqueSwitchState("down") ) func init() { t["HostOpaqueSwitchOpaqueSwitchState"] = reflect.TypeOf((*HostOpaqueSwitchOpaqueSwitchState)(nil)).Elem() } type HostPatchManagerInstallState string const ( HostPatchManagerInstallStateHostRestarted = HostPatchManagerInstallState("hostRestarted") HostPatchManagerInstallStateImageActive = HostPatchManagerInstallState("imageActive") ) func init() { t["HostPatchManagerInstallState"] = reflect.TypeOf((*HostPatchManagerInstallState)(nil)).Elem() } type HostPatchManagerIntegrityStatus string const ( HostPatchManagerIntegrityStatusValidated = HostPatchManagerIntegrityStatus("validated") HostPatchManagerIntegrityStatusKeyNotFound = HostPatchManagerIntegrityStatus("keyNotFound") HostPatchManagerIntegrityStatusKeyRevoked = HostPatchManagerIntegrityStatus("keyRevoked") HostPatchManagerIntegrityStatusKeyExpired = HostPatchManagerIntegrityStatus("keyExpired") HostPatchManagerIntegrityStatusDigestMismatch = HostPatchManagerIntegrityStatus("digestMismatch") HostPatchManagerIntegrityStatusNotEnoughSignatures = HostPatchManagerIntegrityStatus("notEnoughSignatures") HostPatchManagerIntegrityStatusValidationError = HostPatchManagerIntegrityStatus("validationError") ) func init() { t["HostPatchManagerIntegrityStatus"] = reflect.TypeOf((*HostPatchManagerIntegrityStatus)(nil)).Elem() } type HostPatchManagerReason string const ( HostPatchManagerReasonObsoleted = HostPatchManagerReason("obsoleted") HostPatchManagerReasonMissingPatch = HostPatchManagerReason("missingPatch") HostPatchManagerReasonMissingLib = HostPatchManagerReason("missingLib") HostPatchManagerReasonHasDependentPatch = HostPatchManagerReason("hasDependentPatch") HostPatchManagerReasonConflictPatch = HostPatchManagerReason("conflictPatch") HostPatchManagerReasonConflictLib = HostPatchManagerReason("conflictLib") ) func init() { t["HostPatchManagerReason"] = reflect.TypeOf((*HostPatchManagerReason)(nil)).Elem() } type HostPowerOperationType string const ( HostPowerOperationTypePowerOn = HostPowerOperationType("powerOn") HostPowerOperationTypePowerOff = HostPowerOperationType("powerOff") ) func init() { t["HostPowerOperationType"] = reflect.TypeOf((*HostPowerOperationType)(nil)).Elem() } type HostProfileManagerAnswerFileStatus string const ( HostProfileManagerAnswerFileStatusValid = HostProfileManagerAnswerFileStatus("valid") HostProfileManagerAnswerFileStatusInvalid = HostProfileManagerAnswerFileStatus("invalid") HostProfileManagerAnswerFileStatusUnknown = HostProfileManagerAnswerFileStatus("unknown") ) func init() { t["HostProfileManagerAnswerFileStatus"] = reflect.TypeOf((*HostProfileManagerAnswerFileStatus)(nil)).Elem() } type HostProfileManagerTaskListRequirement string const ( HostProfileManagerTaskListRequirementMaintenanceModeRequired = HostProfileManagerTaskListRequirement("maintenanceModeRequired") HostProfileManagerTaskListRequirementRebootRequired = HostProfileManagerTaskListRequirement("rebootRequired") ) func init() { t["HostProfileManagerTaskListRequirement"] = reflect.TypeOf((*HostProfileManagerTaskListRequirement)(nil)).Elem() } type HostProtocolEndpointPEType string const ( HostProtocolEndpointPETypeBlock = HostProtocolEndpointPEType("block") HostProtocolEndpointPETypeNas = HostProtocolEndpointPEType("nas") ) func init() { t["HostProtocolEndpointPEType"] = reflect.TypeOf((*HostProtocolEndpointPEType)(nil)).Elem() } type HostProtocolEndpointProtocolEndpointType string const ( HostProtocolEndpointProtocolEndpointTypeScsi = HostProtocolEndpointProtocolEndpointType("scsi") HostProtocolEndpointProtocolEndpointTypeNfs = HostProtocolEndpointProtocolEndpointType("nfs") HostProtocolEndpointProtocolEndpointTypeNfs4x = HostProtocolEndpointProtocolEndpointType("nfs4x") ) func init() { t["HostProtocolEndpointProtocolEndpointType"] = reflect.TypeOf((*HostProtocolEndpointProtocolEndpointType)(nil)).Elem() } type HostReplayUnsupportedReason string const ( HostReplayUnsupportedReasonIncompatibleProduct = HostReplayUnsupportedReason("incompatibleProduct") HostReplayUnsupportedReasonIncompatibleCpu = HostReplayUnsupportedReason("incompatibleCpu") HostReplayUnsupportedReasonHvDisabled = HostReplayUnsupportedReason("hvDisabled") HostReplayUnsupportedReasonCpuidLimitSet = HostReplayUnsupportedReason("cpuidLimitSet") HostReplayUnsupportedReasonOldBIOS = HostReplayUnsupportedReason("oldBIOS") HostReplayUnsupportedReasonUnknown = HostReplayUnsupportedReason("unknown") ) func init() { t["HostReplayUnsupportedReason"] = reflect.TypeOf((*HostReplayUnsupportedReason)(nil)).Elem() } type HostRuntimeInfoNetStackInstanceRuntimeInfoState string const ( HostRuntimeInfoNetStackInstanceRuntimeInfoStateInactive = HostRuntimeInfoNetStackInstanceRuntimeInfoState("inactive") HostRuntimeInfoNetStackInstanceRuntimeInfoStateActive = HostRuntimeInfoNetStackInstanceRuntimeInfoState("active") HostRuntimeInfoNetStackInstanceRuntimeInfoStateDeactivating = HostRuntimeInfoNetStackInstanceRuntimeInfoState("deactivating") HostRuntimeInfoNetStackInstanceRuntimeInfoStateActivating = HostRuntimeInfoNetStackInstanceRuntimeInfoState("activating") ) func init() { t["HostRuntimeInfoNetStackInstanceRuntimeInfoState"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfoState)(nil)).Elem() } type HostServicePolicy string const ( HostServicePolicyOn = HostServicePolicy("on") HostServicePolicyAutomatic = HostServicePolicy("automatic") HostServicePolicyOff = HostServicePolicy("off") ) func init() { t["HostServicePolicy"] = reflect.TypeOf((*HostServicePolicy)(nil)).Elem() } type HostSnmpAgentCapability string const ( HostSnmpAgentCapabilityCOMPLETE = HostSnmpAgentCapability("COMPLETE") HostSnmpAgentCapabilityDIAGNOSTICS = HostSnmpAgentCapability("DIAGNOSTICS") HostSnmpAgentCapabilityCONFIGURATION = HostSnmpAgentCapability("CONFIGURATION") ) func init() { t["HostSnmpAgentCapability"] = reflect.TypeOf((*HostSnmpAgentCapability)(nil)).Elem() } type HostStandbyMode string const ( HostStandbyModeEntering = HostStandbyMode("entering") HostStandbyModeExiting = HostStandbyMode("exiting") HostStandbyModeIn = HostStandbyMode("in") HostStandbyModeNone = HostStandbyMode("none") ) func init() { t["HostStandbyMode"] = reflect.TypeOf((*HostStandbyMode)(nil)).Elem() } type HostSystemConnectionState string const ( HostSystemConnectionStateConnected = HostSystemConnectionState("connected") HostSystemConnectionStateNotResponding = HostSystemConnectionState("notResponding") HostSystemConnectionStateDisconnected = HostSystemConnectionState("disconnected") ) func init() { t["HostSystemConnectionState"] = reflect.TypeOf((*HostSystemConnectionState)(nil)).Elem() } type HostSystemIdentificationInfoIdentifier string const ( HostSystemIdentificationInfoIdentifierAssetTag = HostSystemIdentificationInfoIdentifier("AssetTag") HostSystemIdentificationInfoIdentifierServiceTag = HostSystemIdentificationInfoIdentifier("ServiceTag") HostSystemIdentificationInfoIdentifierOemSpecificString = HostSystemIdentificationInfoIdentifier("OemSpecificString") ) func init() { t["HostSystemIdentificationInfoIdentifier"] = reflect.TypeOf((*HostSystemIdentificationInfoIdentifier)(nil)).Elem() } type HostSystemPowerState string const ( HostSystemPowerStatePoweredOn = HostSystemPowerState("poweredOn") HostSystemPowerStatePoweredOff = HostSystemPowerState("poweredOff") HostSystemPowerStateStandBy = HostSystemPowerState("standBy") HostSystemPowerStateUnknown = HostSystemPowerState("unknown") ) func init() { t["HostSystemPowerState"] = reflect.TypeOf((*HostSystemPowerState)(nil)).Elem() } type HostUnresolvedVmfsExtentUnresolvedReason string const ( HostUnresolvedVmfsExtentUnresolvedReasonDiskIdMismatch = HostUnresolvedVmfsExtentUnresolvedReason("diskIdMismatch") HostUnresolvedVmfsExtentUnresolvedReasonUuidConflict = HostUnresolvedVmfsExtentUnresolvedReason("uuidConflict") ) func init() { t["HostUnresolvedVmfsExtentUnresolvedReason"] = reflect.TypeOf((*HostUnresolvedVmfsExtentUnresolvedReason)(nil)).Elem() } type HostUnresolvedVmfsResolutionSpecVmfsUuidResolution string const ( HostUnresolvedVmfsResolutionSpecVmfsUuidResolutionResignature = HostUnresolvedVmfsResolutionSpecVmfsUuidResolution("resignature") HostUnresolvedVmfsResolutionSpecVmfsUuidResolutionForceMount = HostUnresolvedVmfsResolutionSpecVmfsUuidResolution("forceMount") ) func init() { t["HostUnresolvedVmfsResolutionSpecVmfsUuidResolution"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionSpecVmfsUuidResolution)(nil)).Elem() } type HostVirtualNicManagerNicType string const ( HostVirtualNicManagerNicTypeVmotion = HostVirtualNicManagerNicType("vmotion") HostVirtualNicManagerNicTypeFaultToleranceLogging = HostVirtualNicManagerNicType("faultToleranceLogging") HostVirtualNicManagerNicTypeVSphereReplication = HostVirtualNicManagerNicType("vSphereReplication") HostVirtualNicManagerNicTypeVSphereReplicationNFC = HostVirtualNicManagerNicType("vSphereReplicationNFC") HostVirtualNicManagerNicTypeManagement = HostVirtualNicManagerNicType("management") HostVirtualNicManagerNicTypeVsan = HostVirtualNicManagerNicType("vsan") HostVirtualNicManagerNicTypeVSphereProvisioning = HostVirtualNicManagerNicType("vSphereProvisioning") HostVirtualNicManagerNicTypeVsanWitness = HostVirtualNicManagerNicType("vsanWitness") ) func init() { t["HostVirtualNicManagerNicType"] = reflect.TypeOf((*HostVirtualNicManagerNicType)(nil)).Elem() } type HostVmciAccessManagerMode string const ( HostVmciAccessManagerModeGrant = HostVmciAccessManagerMode("grant") HostVmciAccessManagerModeReplace = HostVmciAccessManagerMode("replace") HostVmciAccessManagerModeRevoke = HostVmciAccessManagerMode("revoke") ) func init() { t["HostVmciAccessManagerMode"] = reflect.TypeOf((*HostVmciAccessManagerMode)(nil)).Elem() } type HostVmfsVolumeUnmapPriority string const ( HostVmfsVolumeUnmapPriorityNone = HostVmfsVolumeUnmapPriority("none") HostVmfsVolumeUnmapPriorityLow = HostVmfsVolumeUnmapPriority("low") ) func init() { t["HostVmfsVolumeUnmapPriority"] = reflect.TypeOf((*HostVmfsVolumeUnmapPriority)(nil)).Elem() } type HttpNfcLeaseState string const ( HttpNfcLeaseStateInitializing = HttpNfcLeaseState("initializing") HttpNfcLeaseStateReady = HttpNfcLeaseState("ready") HttpNfcLeaseStateDone = HttpNfcLeaseState("done") HttpNfcLeaseStateError = HttpNfcLeaseState("error") ) func init() { t["HttpNfcLeaseState"] = reflect.TypeOf((*HttpNfcLeaseState)(nil)).Elem() } type IncompatibleHostForVmReplicationIncompatibleReason string const ( IncompatibleHostForVmReplicationIncompatibleReasonRpo = IncompatibleHostForVmReplicationIncompatibleReason("rpo") IncompatibleHostForVmReplicationIncompatibleReasonNetCompression = IncompatibleHostForVmReplicationIncompatibleReason("netCompression") ) func init() { t["IncompatibleHostForVmReplicationIncompatibleReason"] = reflect.TypeOf((*IncompatibleHostForVmReplicationIncompatibleReason)(nil)).Elem() } type InternetScsiSnsDiscoveryMethod string const ( InternetScsiSnsDiscoveryMethodIsnsStatic = InternetScsiSnsDiscoveryMethod("isnsStatic") InternetScsiSnsDiscoveryMethodIsnsDhcp = InternetScsiSnsDiscoveryMethod("isnsDhcp") InternetScsiSnsDiscoveryMethodIsnsSlp = InternetScsiSnsDiscoveryMethod("isnsSlp") ) func init() { t["InternetScsiSnsDiscoveryMethod"] = reflect.TypeOf((*InternetScsiSnsDiscoveryMethod)(nil)).Elem() } type InvalidDasConfigArgumentEntryForInvalidArgument string const ( InvalidDasConfigArgumentEntryForInvalidArgumentAdmissionControl = InvalidDasConfigArgumentEntryForInvalidArgument("admissionControl") InvalidDasConfigArgumentEntryForInvalidArgumentUserHeartbeatDs = InvalidDasConfigArgumentEntryForInvalidArgument("userHeartbeatDs") InvalidDasConfigArgumentEntryForInvalidArgumentVmConfig = InvalidDasConfigArgumentEntryForInvalidArgument("vmConfig") ) func init() { t["InvalidDasConfigArgumentEntryForInvalidArgument"] = reflect.TypeOf((*InvalidDasConfigArgumentEntryForInvalidArgument)(nil)).Elem() } type InvalidProfileReferenceHostReason string const ( InvalidProfileReferenceHostReasonIncompatibleVersion = InvalidProfileReferenceHostReason("incompatibleVersion") InvalidProfileReferenceHostReasonMissingReferenceHost = InvalidProfileReferenceHostReason("missingReferenceHost") ) func init() { t["InvalidProfileReferenceHostReason"] = reflect.TypeOf((*InvalidProfileReferenceHostReason)(nil)).Elem() } type IoFilterOperation string const ( IoFilterOperationInstall = IoFilterOperation("install") IoFilterOperationUninstall = IoFilterOperation("uninstall") IoFilterOperationUpgrade = IoFilterOperation("upgrade") ) func init() { t["IoFilterOperation"] = reflect.TypeOf((*IoFilterOperation)(nil)).Elem() } type IoFilterType string const ( IoFilterTypeCache = IoFilterType("cache") IoFilterTypeReplication = IoFilterType("replication") IoFilterTypeEncryption = IoFilterType("encryption") IoFilterTypeCompression = IoFilterType("compression") IoFilterTypeInspection = IoFilterType("inspection") IoFilterTypeDatastoreIoControl = IoFilterType("datastoreIoControl") IoFilterTypeDataProvider = IoFilterType("dataProvider") ) func init() { t["IoFilterType"] = reflect.TypeOf((*IoFilterType)(nil)).Elem() } type IscsiPortInfoPathStatus string const ( IscsiPortInfoPathStatusNotUsed = IscsiPortInfoPathStatus("notUsed") IscsiPortInfoPathStatusActive = IscsiPortInfoPathStatus("active") IscsiPortInfoPathStatusStandBy = IscsiPortInfoPathStatus("standBy") IscsiPortInfoPathStatusLastActive = IscsiPortInfoPathStatus("lastActive") ) func init() { t["IscsiPortInfoPathStatus"] = reflect.TypeOf((*IscsiPortInfoPathStatus)(nil)).Elem() } type LatencySensitivitySensitivityLevel string const ( LatencySensitivitySensitivityLevelLow = LatencySensitivitySensitivityLevel("low") LatencySensitivitySensitivityLevelNormal = LatencySensitivitySensitivityLevel("normal") LatencySensitivitySensitivityLevelMedium = LatencySensitivitySensitivityLevel("medium") LatencySensitivitySensitivityLevelHigh = LatencySensitivitySensitivityLevel("high") LatencySensitivitySensitivityLevelCustom = LatencySensitivitySensitivityLevel("custom") ) func init() { t["LatencySensitivitySensitivityLevel"] = reflect.TypeOf((*LatencySensitivitySensitivityLevel)(nil)).Elem() } type LicenseAssignmentFailedReason string const ( LicenseAssignmentFailedReasonKeyEntityMismatch = LicenseAssignmentFailedReason("keyEntityMismatch") LicenseAssignmentFailedReasonDowngradeDisallowed = LicenseAssignmentFailedReason("downgradeDisallowed") LicenseAssignmentFailedReasonInventoryNotManageableByVirtualCenter = LicenseAssignmentFailedReason("inventoryNotManageableByVirtualCenter") LicenseAssignmentFailedReasonHostsUnmanageableByVirtualCenterWithoutLicenseServer = LicenseAssignmentFailedReason("hostsUnmanageableByVirtualCenterWithoutLicenseServer") ) func init() { t["LicenseAssignmentFailedReason"] = reflect.TypeOf((*LicenseAssignmentFailedReason)(nil)).Elem() } type LicenseFeatureInfoSourceRestriction string const ( LicenseFeatureInfoSourceRestrictionUnrestricted = LicenseFeatureInfoSourceRestriction("unrestricted") LicenseFeatureInfoSourceRestrictionServed = LicenseFeatureInfoSourceRestriction("served") LicenseFeatureInfoSourceRestrictionFile = LicenseFeatureInfoSourceRestriction("file") ) func init() { t["LicenseFeatureInfoSourceRestriction"] = reflect.TypeOf((*LicenseFeatureInfoSourceRestriction)(nil)).Elem() } type LicenseFeatureInfoState string const ( LicenseFeatureInfoStateEnabled = LicenseFeatureInfoState("enabled") LicenseFeatureInfoStateDisabled = LicenseFeatureInfoState("disabled") LicenseFeatureInfoStateOptional = LicenseFeatureInfoState("optional") ) func init() { t["LicenseFeatureInfoState"] = reflect.TypeOf((*LicenseFeatureInfoState)(nil)).Elem() } type LicenseFeatureInfoUnit string const ( LicenseFeatureInfoUnitHost = LicenseFeatureInfoUnit("host") LicenseFeatureInfoUnitCpuCore = LicenseFeatureInfoUnit("cpuCore") LicenseFeatureInfoUnitCpuPackage = LicenseFeatureInfoUnit("cpuPackage") LicenseFeatureInfoUnitServer = LicenseFeatureInfoUnit("server") LicenseFeatureInfoUnitVm = LicenseFeatureInfoUnit("vm") ) func init() { t["LicenseFeatureInfoUnit"] = reflect.TypeOf((*LicenseFeatureInfoUnit)(nil)).Elem() } type LicenseManagerLicenseKey string const ( LicenseManagerLicenseKeyEsxFull = LicenseManagerLicenseKey("esxFull") LicenseManagerLicenseKeyEsxVmtn = LicenseManagerLicenseKey("esxVmtn") LicenseManagerLicenseKeyEsxExpress = LicenseManagerLicenseKey("esxExpress") LicenseManagerLicenseKeySan = LicenseManagerLicenseKey("san") LicenseManagerLicenseKeyIscsi = LicenseManagerLicenseKey("iscsi") LicenseManagerLicenseKeyNas = LicenseManagerLicenseKey("nas") LicenseManagerLicenseKeyVsmp = LicenseManagerLicenseKey("vsmp") LicenseManagerLicenseKeyBackup = LicenseManagerLicenseKey("backup") LicenseManagerLicenseKeyVc = LicenseManagerLicenseKey("vc") LicenseManagerLicenseKeyVcExpress = LicenseManagerLicenseKey("vcExpress") LicenseManagerLicenseKeyEsxHost = LicenseManagerLicenseKey("esxHost") LicenseManagerLicenseKeyGsxHost = LicenseManagerLicenseKey("gsxHost") LicenseManagerLicenseKeyServerHost = LicenseManagerLicenseKey("serverHost") LicenseManagerLicenseKeyDrsPower = LicenseManagerLicenseKey("drsPower") LicenseManagerLicenseKeyVmotion = LicenseManagerLicenseKey("vmotion") LicenseManagerLicenseKeyDrs = LicenseManagerLicenseKey("drs") LicenseManagerLicenseKeyDas = LicenseManagerLicenseKey("das") ) func init() { t["LicenseManagerLicenseKey"] = reflect.TypeOf((*LicenseManagerLicenseKey)(nil)).Elem() } type LicenseManagerState string const ( LicenseManagerStateInitializing = LicenseManagerState("initializing") LicenseManagerStateNormal = LicenseManagerState("normal") LicenseManagerStateMarginal = LicenseManagerState("marginal") LicenseManagerStateFault = LicenseManagerState("fault") ) func init() { t["LicenseManagerState"] = reflect.TypeOf((*LicenseManagerState)(nil)).Elem() } type LicenseReservationInfoState string const ( LicenseReservationInfoStateNotUsed = LicenseReservationInfoState("notUsed") LicenseReservationInfoStateNoLicense = LicenseReservationInfoState("noLicense") LicenseReservationInfoStateUnlicensedUse = LicenseReservationInfoState("unlicensedUse") LicenseReservationInfoStateLicensed = LicenseReservationInfoState("licensed") ) func init() { t["LicenseReservationInfoState"] = reflect.TypeOf((*LicenseReservationInfoState)(nil)).Elem() } type LinkDiscoveryProtocolConfigOperationType string const ( LinkDiscoveryProtocolConfigOperationTypeNone = LinkDiscoveryProtocolConfigOperationType("none") LinkDiscoveryProtocolConfigOperationTypeListen = LinkDiscoveryProtocolConfigOperationType("listen") LinkDiscoveryProtocolConfigOperationTypeAdvertise = LinkDiscoveryProtocolConfigOperationType("advertise") LinkDiscoveryProtocolConfigOperationTypeBoth = LinkDiscoveryProtocolConfigOperationType("both") ) func init() { t["LinkDiscoveryProtocolConfigOperationType"] = reflect.TypeOf((*LinkDiscoveryProtocolConfigOperationType)(nil)).Elem() } type LinkDiscoveryProtocolConfigProtocolType string const ( LinkDiscoveryProtocolConfigProtocolTypeCdp = LinkDiscoveryProtocolConfigProtocolType("cdp") LinkDiscoveryProtocolConfigProtocolTypeLldp = LinkDiscoveryProtocolConfigProtocolType("lldp") ) func init() { t["LinkDiscoveryProtocolConfigProtocolType"] = reflect.TypeOf((*LinkDiscoveryProtocolConfigProtocolType)(nil)).Elem() } type ManagedEntityStatus string const ( ManagedEntityStatusGray = ManagedEntityStatus("gray") ManagedEntityStatusGreen = ManagedEntityStatus("green") ManagedEntityStatusYellow = ManagedEntityStatus("yellow") ManagedEntityStatusRed = ManagedEntityStatus("red") ) func init() { t["ManagedEntityStatus"] = reflect.TypeOf((*ManagedEntityStatus)(nil)).Elem() } type MetricAlarmOperator string const ( MetricAlarmOperatorIsAbove = MetricAlarmOperator("isAbove") MetricAlarmOperatorIsBelow = MetricAlarmOperator("isBelow") ) func init() { t["MetricAlarmOperator"] = reflect.TypeOf((*MetricAlarmOperator)(nil)).Elem() } type MultipathState string const ( MultipathStateStandby = MultipathState("standby") MultipathStateActive = MultipathState("active") MultipathStateDisabled = MultipathState("disabled") MultipathStateDead = MultipathState("dead") MultipathStateUnknown = MultipathState("unknown") ) func init() { t["MultipathState"] = reflect.TypeOf((*MultipathState)(nil)).Elem() } type NetBIOSConfigInfoMode string const ( NetBIOSConfigInfoModeUnknown = NetBIOSConfigInfoMode("unknown") NetBIOSConfigInfoModeEnabled = NetBIOSConfigInfoMode("enabled") NetBIOSConfigInfoModeDisabled = NetBIOSConfigInfoMode("disabled") NetBIOSConfigInfoModeEnabledViaDHCP = NetBIOSConfigInfoMode("enabledViaDHCP") ) func init() { t["NetBIOSConfigInfoMode"] = reflect.TypeOf((*NetBIOSConfigInfoMode)(nil)).Elem() } type NetIpConfigInfoIpAddressOrigin string const ( NetIpConfigInfoIpAddressOriginOther = NetIpConfigInfoIpAddressOrigin("other") NetIpConfigInfoIpAddressOriginManual = NetIpConfigInfoIpAddressOrigin("manual") NetIpConfigInfoIpAddressOriginDhcp = NetIpConfigInfoIpAddressOrigin("dhcp") NetIpConfigInfoIpAddressOriginLinklayer = NetIpConfigInfoIpAddressOrigin("linklayer") NetIpConfigInfoIpAddressOriginRandom = NetIpConfigInfoIpAddressOrigin("random") ) func init() { t["NetIpConfigInfoIpAddressOrigin"] = reflect.TypeOf((*NetIpConfigInfoIpAddressOrigin)(nil)).Elem() } type NetIpConfigInfoIpAddressStatus string const ( NetIpConfigInfoIpAddressStatusPreferred = NetIpConfigInfoIpAddressStatus("preferred") NetIpConfigInfoIpAddressStatusDeprecated = NetIpConfigInfoIpAddressStatus("deprecated") NetIpConfigInfoIpAddressStatusInvalid = NetIpConfigInfoIpAddressStatus("invalid") NetIpConfigInfoIpAddressStatusInaccessible = NetIpConfigInfoIpAddressStatus("inaccessible") NetIpConfigInfoIpAddressStatusUnknown = NetIpConfigInfoIpAddressStatus("unknown") NetIpConfigInfoIpAddressStatusTentative = NetIpConfigInfoIpAddressStatus("tentative") NetIpConfigInfoIpAddressStatusDuplicate = NetIpConfigInfoIpAddressStatus("duplicate") ) func init() { t["NetIpConfigInfoIpAddressStatus"] = reflect.TypeOf((*NetIpConfigInfoIpAddressStatus)(nil)).Elem() } type NetIpStackInfoEntryType string const ( NetIpStackInfoEntryTypeOther = NetIpStackInfoEntryType("other") NetIpStackInfoEntryTypeInvalid = NetIpStackInfoEntryType("invalid") NetIpStackInfoEntryTypeDynamic = NetIpStackInfoEntryType("dynamic") NetIpStackInfoEntryTypeManual = NetIpStackInfoEntryType("manual") ) func init() { t["NetIpStackInfoEntryType"] = reflect.TypeOf((*NetIpStackInfoEntryType)(nil)).Elem() } type NetIpStackInfoPreference string const ( NetIpStackInfoPreferenceReserved = NetIpStackInfoPreference("reserved") NetIpStackInfoPreferenceLow = NetIpStackInfoPreference("low") NetIpStackInfoPreferenceMedium = NetIpStackInfoPreference("medium") NetIpStackInfoPreferenceHigh = NetIpStackInfoPreference("high") ) func init() { t["NetIpStackInfoPreference"] = reflect.TypeOf((*NetIpStackInfoPreference)(nil)).Elem() } type NotSupportedDeviceForFTDeviceType string const ( NotSupportedDeviceForFTDeviceTypeVirtualVmxnet3 = NotSupportedDeviceForFTDeviceType("virtualVmxnet3") NotSupportedDeviceForFTDeviceTypeParaVirtualSCSIController = NotSupportedDeviceForFTDeviceType("paraVirtualSCSIController") ) func init() { t["NotSupportedDeviceForFTDeviceType"] = reflect.TypeOf((*NotSupportedDeviceForFTDeviceType)(nil)).Elem() } type NumVirtualCpusIncompatibleReason string const ( NumVirtualCpusIncompatibleReasonRecordReplay = NumVirtualCpusIncompatibleReason("recordReplay") NumVirtualCpusIncompatibleReasonFaultTolerance = NumVirtualCpusIncompatibleReason("faultTolerance") ) func init() { t["NumVirtualCpusIncompatibleReason"] = reflect.TypeOf((*NumVirtualCpusIncompatibleReason)(nil)).Elem() } type ObjectUpdateKind string const ( ObjectUpdateKindModify = ObjectUpdateKind("modify") ObjectUpdateKindEnter = ObjectUpdateKind("enter") ObjectUpdateKindLeave = ObjectUpdateKind("leave") ) func init() { t["ObjectUpdateKind"] = reflect.TypeOf((*ObjectUpdateKind)(nil)).Elem() } type OvfConsumerOstNodeType string const ( OvfConsumerOstNodeTypeEnvelope = OvfConsumerOstNodeType("envelope") OvfConsumerOstNodeTypeVirtualSystem = OvfConsumerOstNodeType("virtualSystem") OvfConsumerOstNodeTypeVirtualSystemCollection = OvfConsumerOstNodeType("virtualSystemCollection") ) func init() { t["OvfConsumerOstNodeType"] = reflect.TypeOf((*OvfConsumerOstNodeType)(nil)).Elem() } type OvfCreateImportSpecParamsDiskProvisioningType string const ( OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicSparse = OvfCreateImportSpecParamsDiskProvisioningType("monolithicSparse") OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicFlat = OvfCreateImportSpecParamsDiskProvisioningType("monolithicFlat") OvfCreateImportSpecParamsDiskProvisioningTypeTwoGbMaxExtentSparse = OvfCreateImportSpecParamsDiskProvisioningType("twoGbMaxExtentSparse") OvfCreateImportSpecParamsDiskProvisioningTypeTwoGbMaxExtentFlat = OvfCreateImportSpecParamsDiskProvisioningType("twoGbMaxExtentFlat") OvfCreateImportSpecParamsDiskProvisioningTypeThin = OvfCreateImportSpecParamsDiskProvisioningType("thin") OvfCreateImportSpecParamsDiskProvisioningTypeThick = OvfCreateImportSpecParamsDiskProvisioningType("thick") OvfCreateImportSpecParamsDiskProvisioningTypeSeSparse = OvfCreateImportSpecParamsDiskProvisioningType("seSparse") OvfCreateImportSpecParamsDiskProvisioningTypeEagerZeroedThick = OvfCreateImportSpecParamsDiskProvisioningType("eagerZeroedThick") OvfCreateImportSpecParamsDiskProvisioningTypeSparse = OvfCreateImportSpecParamsDiskProvisioningType("sparse") OvfCreateImportSpecParamsDiskProvisioningTypeFlat = OvfCreateImportSpecParamsDiskProvisioningType("flat") ) func init() { t["OvfCreateImportSpecParamsDiskProvisioningType"] = reflect.TypeOf((*OvfCreateImportSpecParamsDiskProvisioningType)(nil)).Elem() } type PerfFormat string const ( PerfFormatNormal = PerfFormat("normal") PerfFormatCsv = PerfFormat("csv") ) func init() { t["PerfFormat"] = reflect.TypeOf((*PerfFormat)(nil)).Elem() } type PerfStatsType string const ( PerfStatsTypeAbsolute = PerfStatsType("absolute") PerfStatsTypeDelta = PerfStatsType("delta") PerfStatsTypeRate = PerfStatsType("rate") ) func init() { t["PerfStatsType"] = reflect.TypeOf((*PerfStatsType)(nil)).Elem() } type PerfSummaryType string const ( PerfSummaryTypeAverage = PerfSummaryType("average") PerfSummaryTypeMaximum = PerfSummaryType("maximum") PerfSummaryTypeMinimum = PerfSummaryType("minimum") PerfSummaryTypeLatest = PerfSummaryType("latest") PerfSummaryTypeSummation = PerfSummaryType("summation") PerfSummaryTypeNone = PerfSummaryType("none") ) func init() { t["PerfSummaryType"] = reflect.TypeOf((*PerfSummaryType)(nil)).Elem() } type PerformanceManagerUnit string const ( PerformanceManagerUnitPercent = PerformanceManagerUnit("percent") PerformanceManagerUnitKiloBytes = PerformanceManagerUnit("kiloBytes") PerformanceManagerUnitMegaBytes = PerformanceManagerUnit("megaBytes") PerformanceManagerUnitMegaHertz = PerformanceManagerUnit("megaHertz") PerformanceManagerUnitNumber = PerformanceManagerUnit("number") PerformanceManagerUnitMicrosecond = PerformanceManagerUnit("microsecond") PerformanceManagerUnitMillisecond = PerformanceManagerUnit("millisecond") PerformanceManagerUnitSecond = PerformanceManagerUnit("second") PerformanceManagerUnitKiloBytesPerSecond = PerformanceManagerUnit("kiloBytesPerSecond") PerformanceManagerUnitMegaBytesPerSecond = PerformanceManagerUnit("megaBytesPerSecond") PerformanceManagerUnitWatt = PerformanceManagerUnit("watt") PerformanceManagerUnitJoule = PerformanceManagerUnit("joule") PerformanceManagerUnitTeraBytes = PerformanceManagerUnit("teraBytes") ) func init() { t["PerformanceManagerUnit"] = reflect.TypeOf((*PerformanceManagerUnit)(nil)).Elem() } type PhysicalNicResourcePoolSchedulerDisallowedReason string const ( PhysicalNicResourcePoolSchedulerDisallowedReasonUserOptOut = PhysicalNicResourcePoolSchedulerDisallowedReason("userOptOut") PhysicalNicResourcePoolSchedulerDisallowedReasonHardwareUnsupported = PhysicalNicResourcePoolSchedulerDisallowedReason("hardwareUnsupported") ) func init() { t["PhysicalNicResourcePoolSchedulerDisallowedReason"] = reflect.TypeOf((*PhysicalNicResourcePoolSchedulerDisallowedReason)(nil)).Elem() } type PhysicalNicVmDirectPathGen2SupportedMode string const ( PhysicalNicVmDirectPathGen2SupportedModeUpt = PhysicalNicVmDirectPathGen2SupportedMode("upt") ) func init() { t["PhysicalNicVmDirectPathGen2SupportedMode"] = reflect.TypeOf((*PhysicalNicVmDirectPathGen2SupportedMode)(nil)).Elem() } type PlacementAffinityRuleRuleScope string const ( PlacementAffinityRuleRuleScopeCluster = PlacementAffinityRuleRuleScope("cluster") PlacementAffinityRuleRuleScopeHost = PlacementAffinityRuleRuleScope("host") PlacementAffinityRuleRuleScopeStoragePod = PlacementAffinityRuleRuleScope("storagePod") PlacementAffinityRuleRuleScopeDatastore = PlacementAffinityRuleRuleScope("datastore") ) func init() { t["PlacementAffinityRuleRuleScope"] = reflect.TypeOf((*PlacementAffinityRuleRuleScope)(nil)).Elem() } type PlacementAffinityRuleRuleType string const ( PlacementAffinityRuleRuleTypeAffinity = PlacementAffinityRuleRuleType("affinity") PlacementAffinityRuleRuleTypeAntiAffinity = PlacementAffinityRuleRuleType("antiAffinity") PlacementAffinityRuleRuleTypeSoftAffinity = PlacementAffinityRuleRuleType("softAffinity") PlacementAffinityRuleRuleTypeSoftAntiAffinity = PlacementAffinityRuleRuleType("softAntiAffinity") ) func init() { t["PlacementAffinityRuleRuleType"] = reflect.TypeOf((*PlacementAffinityRuleRuleType)(nil)).Elem() } type PlacementSpecPlacementType string const ( PlacementSpecPlacementTypeCreate = PlacementSpecPlacementType("create") PlacementSpecPlacementTypeReconfigure = PlacementSpecPlacementType("reconfigure") PlacementSpecPlacementTypeRelocate = PlacementSpecPlacementType("relocate") PlacementSpecPlacementTypeClone = PlacementSpecPlacementType("clone") ) func init() { t["PlacementSpecPlacementType"] = reflect.TypeOf((*PlacementSpecPlacementType)(nil)).Elem() } type PortGroupConnecteeType string const ( PortGroupConnecteeTypeVirtualMachine = PortGroupConnecteeType("virtualMachine") PortGroupConnecteeTypeSystemManagement = PortGroupConnecteeType("systemManagement") PortGroupConnecteeTypeHost = PortGroupConnecteeType("host") PortGroupConnecteeTypeUnknown = PortGroupConnecteeType("unknown") ) func init() { t["PortGroupConnecteeType"] = reflect.TypeOf((*PortGroupConnecteeType)(nil)).Elem() } type ProfileExecuteResultStatus string const ( ProfileExecuteResultStatusSuccess = ProfileExecuteResultStatus("success") ProfileExecuteResultStatusNeedInput = ProfileExecuteResultStatus("needInput") ProfileExecuteResultStatusError = ProfileExecuteResultStatus("error") ) func init() { t["ProfileExecuteResultStatus"] = reflect.TypeOf((*ProfileExecuteResultStatus)(nil)).Elem() } type ProfileNumericComparator string const ( ProfileNumericComparatorLessThan = ProfileNumericComparator("lessThan") ProfileNumericComparatorLessThanEqual = ProfileNumericComparator("lessThanEqual") ProfileNumericComparatorEqual = ProfileNumericComparator("equal") ProfileNumericComparatorNotEqual = ProfileNumericComparator("notEqual") ProfileNumericComparatorGreaterThanEqual = ProfileNumericComparator("greaterThanEqual") ProfileNumericComparatorGreaterThan = ProfileNumericComparator("greaterThan") ) func init() { t["ProfileNumericComparator"] = reflect.TypeOf((*ProfileNumericComparator)(nil)).Elem() } type PropertyChangeOp string const ( PropertyChangeOpAdd = PropertyChangeOp("add") PropertyChangeOpRemove = PropertyChangeOp("remove") PropertyChangeOpAssign = PropertyChangeOp("assign") PropertyChangeOpIndirectRemove = PropertyChangeOp("indirectRemove") ) func init() { t["PropertyChangeOp"] = reflect.TypeOf((*PropertyChangeOp)(nil)).Elem() } type QuarantineModeFaultFaultType string const ( QuarantineModeFaultFaultTypeNoCompatibleNonQuarantinedHost = QuarantineModeFaultFaultType("NoCompatibleNonQuarantinedHost") QuarantineModeFaultFaultTypeCorrectionDisallowed = QuarantineModeFaultFaultType("CorrectionDisallowed") QuarantineModeFaultFaultTypeCorrectionImpact = QuarantineModeFaultFaultType("CorrectionImpact") ) func init() { t["QuarantineModeFaultFaultType"] = reflect.TypeOf((*QuarantineModeFaultFaultType)(nil)).Elem() } type QuiesceMode string const ( QuiesceModeApplication = QuiesceMode("application") QuiesceModeFilesystem = QuiesceMode("filesystem") QuiesceModeNone = QuiesceMode("none") ) func init() { t["QuiesceMode"] = reflect.TypeOf((*QuiesceMode)(nil)).Elem() } type RecommendationReasonCode string const ( RecommendationReasonCodeFairnessCpuAvg = RecommendationReasonCode("fairnessCpuAvg") RecommendationReasonCodeFairnessMemAvg = RecommendationReasonCode("fairnessMemAvg") RecommendationReasonCodeJointAffin = RecommendationReasonCode("jointAffin") RecommendationReasonCodeAntiAffin = RecommendationReasonCode("antiAffin") RecommendationReasonCodeHostMaint = RecommendationReasonCode("hostMaint") RecommendationReasonCodeEnterStandby = RecommendationReasonCode("enterStandby") RecommendationReasonCodeReservationCpu = RecommendationReasonCode("reservationCpu") RecommendationReasonCodeReservationMem = RecommendationReasonCode("reservationMem") RecommendationReasonCodePowerOnVm = RecommendationReasonCode("powerOnVm") RecommendationReasonCodePowerSaving = RecommendationReasonCode("powerSaving") RecommendationReasonCodeIncreaseCapacity = RecommendationReasonCode("increaseCapacity") RecommendationReasonCodeCheckResource = RecommendationReasonCode("checkResource") RecommendationReasonCodeUnreservedCapacity = RecommendationReasonCode("unreservedCapacity") RecommendationReasonCodeVmHostHardAffinity = RecommendationReasonCode("vmHostHardAffinity") RecommendationReasonCodeVmHostSoftAffinity = RecommendationReasonCode("vmHostSoftAffinity") RecommendationReasonCodeBalanceDatastoreSpaceUsage = RecommendationReasonCode("balanceDatastoreSpaceUsage") RecommendationReasonCodeBalanceDatastoreIOLoad = RecommendationReasonCode("balanceDatastoreIOLoad") RecommendationReasonCodeBalanceDatastoreIOPSReservation = RecommendationReasonCode("balanceDatastoreIOPSReservation") RecommendationReasonCodeDatastoreMaint = RecommendationReasonCode("datastoreMaint") RecommendationReasonCodeVirtualDiskJointAffin = RecommendationReasonCode("virtualDiskJointAffin") RecommendationReasonCodeVirtualDiskAntiAffin = RecommendationReasonCode("virtualDiskAntiAffin") RecommendationReasonCodeDatastoreSpaceOutage = RecommendationReasonCode("datastoreSpaceOutage") RecommendationReasonCodeStoragePlacement = RecommendationReasonCode("storagePlacement") RecommendationReasonCodeIolbDisabledInternal = RecommendationReasonCode("iolbDisabledInternal") RecommendationReasonCodeXvmotionPlacement = RecommendationReasonCode("xvmotionPlacement") RecommendationReasonCodeNetworkBandwidthReservation = RecommendationReasonCode("networkBandwidthReservation") RecommendationReasonCodeHostInDegradation = RecommendationReasonCode("hostInDegradation") RecommendationReasonCodeHostExitDegradation = RecommendationReasonCode("hostExitDegradation") RecommendationReasonCodeMaxVmsConstraint = RecommendationReasonCode("maxVmsConstraint") RecommendationReasonCodeFtConstraints = RecommendationReasonCode("ftConstraints") ) func init() { t["RecommendationReasonCode"] = reflect.TypeOf((*RecommendationReasonCode)(nil)).Elem() } type RecommendationType string const ( RecommendationTypeV1 = RecommendationType("V1") ) func init() { t["RecommendationType"] = reflect.TypeOf((*RecommendationType)(nil)).Elem() } type ReplicationDiskConfigFaultReasonForFault string const ( ReplicationDiskConfigFaultReasonForFaultDiskNotFound = ReplicationDiskConfigFaultReasonForFault("diskNotFound") ReplicationDiskConfigFaultReasonForFaultDiskTypeNotSupported = ReplicationDiskConfigFaultReasonForFault("diskTypeNotSupported") ReplicationDiskConfigFaultReasonForFaultInvalidDiskKey = ReplicationDiskConfigFaultReasonForFault("invalidDiskKey") ReplicationDiskConfigFaultReasonForFaultInvalidDiskReplicationId = ReplicationDiskConfigFaultReasonForFault("invalidDiskReplicationId") ReplicationDiskConfigFaultReasonForFaultDuplicateDiskReplicationId = ReplicationDiskConfigFaultReasonForFault("duplicateDiskReplicationId") ReplicationDiskConfigFaultReasonForFaultInvalidPersistentFilePath = ReplicationDiskConfigFaultReasonForFault("invalidPersistentFilePath") ReplicationDiskConfigFaultReasonForFaultReconfigureDiskReplicationIdNotAllowed = ReplicationDiskConfigFaultReasonForFault("reconfigureDiskReplicationIdNotAllowed") ) func init() { t["ReplicationDiskConfigFaultReasonForFault"] = reflect.TypeOf((*ReplicationDiskConfigFaultReasonForFault)(nil)).Elem() } type ReplicationVmConfigFaultReasonForFault string const ( ReplicationVmConfigFaultReasonForFaultIncompatibleHwVersion = ReplicationVmConfigFaultReasonForFault("incompatibleHwVersion") ReplicationVmConfigFaultReasonForFaultInvalidVmReplicationId = ReplicationVmConfigFaultReasonForFault("invalidVmReplicationId") ReplicationVmConfigFaultReasonForFaultInvalidGenerationNumber = ReplicationVmConfigFaultReasonForFault("invalidGenerationNumber") ReplicationVmConfigFaultReasonForFaultOutOfBoundsRpoValue = ReplicationVmConfigFaultReasonForFault("outOfBoundsRpoValue") ReplicationVmConfigFaultReasonForFaultInvalidDestinationIpAddress = ReplicationVmConfigFaultReasonForFault("invalidDestinationIpAddress") ReplicationVmConfigFaultReasonForFaultInvalidDestinationPort = ReplicationVmConfigFaultReasonForFault("invalidDestinationPort") ReplicationVmConfigFaultReasonForFaultInvalidExtraVmOptions = ReplicationVmConfigFaultReasonForFault("invalidExtraVmOptions") ReplicationVmConfigFaultReasonForFaultStaleGenerationNumber = ReplicationVmConfigFaultReasonForFault("staleGenerationNumber") ReplicationVmConfigFaultReasonForFaultReconfigureVmReplicationIdNotAllowed = ReplicationVmConfigFaultReasonForFault("reconfigureVmReplicationIdNotAllowed") ReplicationVmConfigFaultReasonForFaultCannotRetrieveVmReplicationConfiguration = ReplicationVmConfigFaultReasonForFault("cannotRetrieveVmReplicationConfiguration") ReplicationVmConfigFaultReasonForFaultReplicationAlreadyEnabled = ReplicationVmConfigFaultReasonForFault("replicationAlreadyEnabled") ReplicationVmConfigFaultReasonForFaultInvalidPriorConfiguration = ReplicationVmConfigFaultReasonForFault("invalidPriorConfiguration") ReplicationVmConfigFaultReasonForFaultReplicationNotEnabled = ReplicationVmConfigFaultReasonForFault("replicationNotEnabled") ReplicationVmConfigFaultReasonForFaultReplicationConfigurationFailed = ReplicationVmConfigFaultReasonForFault("replicationConfigurationFailed") ReplicationVmConfigFaultReasonForFaultEncryptedVm = ReplicationVmConfigFaultReasonForFault("encryptedVm") ) func init() { t["ReplicationVmConfigFaultReasonForFault"] = reflect.TypeOf((*ReplicationVmConfigFaultReasonForFault)(nil)).Elem() } type ReplicationVmFaultReasonForFault string const ( ReplicationVmFaultReasonForFaultNotConfigured = ReplicationVmFaultReasonForFault("notConfigured") ReplicationVmFaultReasonForFaultPoweredOff = ReplicationVmFaultReasonForFault("poweredOff") ReplicationVmFaultReasonForFaultSuspended = ReplicationVmFaultReasonForFault("suspended") ReplicationVmFaultReasonForFaultPoweredOn = ReplicationVmFaultReasonForFault("poweredOn") ReplicationVmFaultReasonForFaultOfflineReplicating = ReplicationVmFaultReasonForFault("offlineReplicating") ReplicationVmFaultReasonForFaultInvalidState = ReplicationVmFaultReasonForFault("invalidState") ReplicationVmFaultReasonForFaultInvalidInstanceId = ReplicationVmFaultReasonForFault("invalidInstanceId") ReplicationVmFaultReasonForFaultCloseDiskError = ReplicationVmFaultReasonForFault("closeDiskError") ) func init() { t["ReplicationVmFaultReasonForFault"] = reflect.TypeOf((*ReplicationVmFaultReasonForFault)(nil)).Elem() } type ReplicationVmInProgressFaultActivity string const ( ReplicationVmInProgressFaultActivityFullSync = ReplicationVmInProgressFaultActivity("fullSync") ReplicationVmInProgressFaultActivityDelta = ReplicationVmInProgressFaultActivity("delta") ) func init() { t["ReplicationVmInProgressFaultActivity"] = reflect.TypeOf((*ReplicationVmInProgressFaultActivity)(nil)).Elem() } type ReplicationVmState string const ( ReplicationVmStateNone = ReplicationVmState("none") ReplicationVmStatePaused = ReplicationVmState("paused") ReplicationVmStateSyncing = ReplicationVmState("syncing") ReplicationVmStateIdle = ReplicationVmState("idle") ReplicationVmStateActive = ReplicationVmState("active") ReplicationVmStateError = ReplicationVmState("error") ) func init() { t["ReplicationVmState"] = reflect.TypeOf((*ReplicationVmState)(nil)).Elem() } type ScheduledHardwareUpgradeInfoHardwareUpgradePolicy string const ( ScheduledHardwareUpgradeInfoHardwareUpgradePolicyNever = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("never") ScheduledHardwareUpgradeInfoHardwareUpgradePolicyOnSoftPowerOff = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("onSoftPowerOff") ScheduledHardwareUpgradeInfoHardwareUpgradePolicyAlways = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("always") ) func init() { t["ScheduledHardwareUpgradeInfoHardwareUpgradePolicy"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradePolicy)(nil)).Elem() } type ScheduledHardwareUpgradeInfoHardwareUpgradeStatus string const ( ScheduledHardwareUpgradeInfoHardwareUpgradeStatusNone = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("none") ScheduledHardwareUpgradeInfoHardwareUpgradeStatusPending = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("pending") ScheduledHardwareUpgradeInfoHardwareUpgradeStatusSuccess = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("success") ScheduledHardwareUpgradeInfoHardwareUpgradeStatusFailed = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("failed") ) func init() { t["ScheduledHardwareUpgradeInfoHardwareUpgradeStatus"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradeStatus)(nil)).Elem() } type ScsiDiskType string const ( ScsiDiskTypeNative512 = ScsiDiskType("native512") ScsiDiskTypeEmulated512 = ScsiDiskType("emulated512") ScsiDiskTypeNative4k = ScsiDiskType("native4k") ScsiDiskTypeUnknown = ScsiDiskType("unknown") ) func init() { t["ScsiDiskType"] = reflect.TypeOf((*ScsiDiskType)(nil)).Elem() } type ScsiLunDescriptorQuality string const ( ScsiLunDescriptorQualityHighQuality = ScsiLunDescriptorQuality("highQuality") ScsiLunDescriptorQualityMediumQuality = ScsiLunDescriptorQuality("mediumQuality") ScsiLunDescriptorQualityLowQuality = ScsiLunDescriptorQuality("lowQuality") ScsiLunDescriptorQualityUnknownQuality = ScsiLunDescriptorQuality("unknownQuality") ) func init() { t["ScsiLunDescriptorQuality"] = reflect.TypeOf((*ScsiLunDescriptorQuality)(nil)).Elem() } type ScsiLunState string const ( ScsiLunStateUnknownState = ScsiLunState("unknownState") ScsiLunStateOk = ScsiLunState("ok") ScsiLunStateError = ScsiLunState("error") ScsiLunStateOff = ScsiLunState("off") ScsiLunStateQuiesced = ScsiLunState("quiesced") ScsiLunStateDegraded = ScsiLunState("degraded") ScsiLunStateLostCommunication = ScsiLunState("lostCommunication") ScsiLunStateTimeout = ScsiLunState("timeout") ) func init() { t["ScsiLunState"] = reflect.TypeOf((*ScsiLunState)(nil)).Elem() } type ScsiLunType string const ( ScsiLunTypeDisk = ScsiLunType("disk") ScsiLunTypeTape = ScsiLunType("tape") ScsiLunTypePrinter = ScsiLunType("printer") ScsiLunTypeProcessor = ScsiLunType("processor") ScsiLunTypeWorm = ScsiLunType("worm") ScsiLunTypeCdrom = ScsiLunType("cdrom") ScsiLunTypeScanner = ScsiLunType("scanner") ScsiLunTypeOpticalDevice = ScsiLunType("opticalDevice") ScsiLunTypeMediaChanger = ScsiLunType("mediaChanger") ScsiLunTypeCommunications = ScsiLunType("communications") ScsiLunTypeStorageArrayController = ScsiLunType("storageArrayController") ScsiLunTypeEnclosure = ScsiLunType("enclosure") ScsiLunTypeUnknown = ScsiLunType("unknown") ) func init() { t["ScsiLunType"] = reflect.TypeOf((*ScsiLunType)(nil)).Elem() } type ScsiLunVStorageSupportStatus string const ( ScsiLunVStorageSupportStatusVStorageSupported = ScsiLunVStorageSupportStatus("vStorageSupported") ScsiLunVStorageSupportStatusVStorageUnsupported = ScsiLunVStorageSupportStatus("vStorageUnsupported") ScsiLunVStorageSupportStatusVStorageUnknown = ScsiLunVStorageSupportStatus("vStorageUnknown") ) func init() { t["ScsiLunVStorageSupportStatus"] = reflect.TypeOf((*ScsiLunVStorageSupportStatus)(nil)).Elem() } type SessionManagerHttpServiceRequestSpecMethod string const ( SessionManagerHttpServiceRequestSpecMethodHttpOptions = SessionManagerHttpServiceRequestSpecMethod("httpOptions") SessionManagerHttpServiceRequestSpecMethodHttpGet = SessionManagerHttpServiceRequestSpecMethod("httpGet") SessionManagerHttpServiceRequestSpecMethodHttpHead = SessionManagerHttpServiceRequestSpecMethod("httpHead") SessionManagerHttpServiceRequestSpecMethodHttpPost = SessionManagerHttpServiceRequestSpecMethod("httpPost") SessionManagerHttpServiceRequestSpecMethodHttpPut = SessionManagerHttpServiceRequestSpecMethod("httpPut") SessionManagerHttpServiceRequestSpecMethodHttpDelete = SessionManagerHttpServiceRequestSpecMethod("httpDelete") SessionManagerHttpServiceRequestSpecMethodHttpTrace = SessionManagerHttpServiceRequestSpecMethod("httpTrace") SessionManagerHttpServiceRequestSpecMethodHttpConnect = SessionManagerHttpServiceRequestSpecMethod("httpConnect") ) func init() { t["SessionManagerHttpServiceRequestSpecMethod"] = reflect.TypeOf((*SessionManagerHttpServiceRequestSpecMethod)(nil)).Elem() } type SharesLevel string const ( SharesLevelLow = SharesLevel("low") SharesLevelNormal = SharesLevel("normal") SharesLevelHigh = SharesLevel("high") SharesLevelCustom = SharesLevel("custom") ) func init() { t["SharesLevel"] = reflect.TypeOf((*SharesLevel)(nil)).Elem() } type SimpleCommandEncoding string const ( SimpleCommandEncodingCSV = SimpleCommandEncoding("CSV") SimpleCommandEncodingHEX = SimpleCommandEncoding("HEX") SimpleCommandEncodingSTRING = SimpleCommandEncoding("STRING") ) func init() { t["SimpleCommandEncoding"] = reflect.TypeOf((*SimpleCommandEncoding)(nil)).Elem() } type SlpDiscoveryMethod string const ( SlpDiscoveryMethodSlpDhcp = SlpDiscoveryMethod("slpDhcp") SlpDiscoveryMethodSlpAutoUnicast = SlpDiscoveryMethod("slpAutoUnicast") SlpDiscoveryMethodSlpAutoMulticast = SlpDiscoveryMethod("slpAutoMulticast") SlpDiscoveryMethodSlpManual = SlpDiscoveryMethod("slpManual") ) func init() { t["SlpDiscoveryMethod"] = reflect.TypeOf((*SlpDiscoveryMethod)(nil)).Elem() } type SoftwarePackageConstraint string const ( SoftwarePackageConstraintEquals = SoftwarePackageConstraint("equals") SoftwarePackageConstraintLessThan = SoftwarePackageConstraint("lessThan") SoftwarePackageConstraintLessThanEqual = SoftwarePackageConstraint("lessThanEqual") SoftwarePackageConstraintGreaterThanEqual = SoftwarePackageConstraint("greaterThanEqual") SoftwarePackageConstraintGreaterThan = SoftwarePackageConstraint("greaterThan") ) func init() { t["SoftwarePackageConstraint"] = reflect.TypeOf((*SoftwarePackageConstraint)(nil)).Elem() } type SoftwarePackageVibType string const ( SoftwarePackageVibTypeBootbank = SoftwarePackageVibType("bootbank") SoftwarePackageVibTypeTools = SoftwarePackageVibType("tools") SoftwarePackageVibTypeMeta = SoftwarePackageVibType("meta") ) func init() { t["SoftwarePackageVibType"] = reflect.TypeOf((*SoftwarePackageVibType)(nil)).Elem() } type StateAlarmOperator string const ( StateAlarmOperatorIsEqual = StateAlarmOperator("isEqual") StateAlarmOperatorIsUnequal = StateAlarmOperator("isUnequal") ) func init() { t["StateAlarmOperator"] = reflect.TypeOf((*StateAlarmOperator)(nil)).Elem() } type StorageDrsPodConfigInfoBehavior string const ( StorageDrsPodConfigInfoBehaviorManual = StorageDrsPodConfigInfoBehavior("manual") StorageDrsPodConfigInfoBehaviorAutomated = StorageDrsPodConfigInfoBehavior("automated") ) func init() { t["StorageDrsPodConfigInfoBehavior"] = reflect.TypeOf((*StorageDrsPodConfigInfoBehavior)(nil)).Elem() } type StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode string const ( StorageDrsSpaceLoadBalanceConfigSpaceThresholdModeUtilization = StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode("utilization") StorageDrsSpaceLoadBalanceConfigSpaceThresholdModeFreeSpace = StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode("freeSpace") ) func init() { t["StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode"] = reflect.TypeOf((*StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode)(nil)).Elem() } type StorageIORMThresholdMode string const ( StorageIORMThresholdModeAutomatic = StorageIORMThresholdMode("automatic") StorageIORMThresholdModeManual = StorageIORMThresholdMode("manual") ) func init() { t["StorageIORMThresholdMode"] = reflect.TypeOf((*StorageIORMThresholdMode)(nil)).Elem() } type StoragePlacementSpecPlacementType string const ( StoragePlacementSpecPlacementTypeCreate = StoragePlacementSpecPlacementType("create") StoragePlacementSpecPlacementTypeReconfigure = StoragePlacementSpecPlacementType("reconfigure") StoragePlacementSpecPlacementTypeRelocate = StoragePlacementSpecPlacementType("relocate") StoragePlacementSpecPlacementTypeClone = StoragePlacementSpecPlacementType("clone") ) func init() { t["StoragePlacementSpecPlacementType"] = reflect.TypeOf((*StoragePlacementSpecPlacementType)(nil)).Elem() } type TaskFilterSpecRecursionOption string const ( TaskFilterSpecRecursionOptionSelf = TaskFilterSpecRecursionOption("self") TaskFilterSpecRecursionOptionChildren = TaskFilterSpecRecursionOption("children") TaskFilterSpecRecursionOptionAll = TaskFilterSpecRecursionOption("all") ) func init() { t["TaskFilterSpecRecursionOption"] = reflect.TypeOf((*TaskFilterSpecRecursionOption)(nil)).Elem() } type TaskFilterSpecTimeOption string const ( TaskFilterSpecTimeOptionQueuedTime = TaskFilterSpecTimeOption("queuedTime") TaskFilterSpecTimeOptionStartedTime = TaskFilterSpecTimeOption("startedTime") TaskFilterSpecTimeOptionCompletedTime = TaskFilterSpecTimeOption("completedTime") ) func init() { t["TaskFilterSpecTimeOption"] = reflect.TypeOf((*TaskFilterSpecTimeOption)(nil)).Elem() } type TaskInfoState string const ( TaskInfoStateQueued = TaskInfoState("queued") TaskInfoStateRunning = TaskInfoState("running") TaskInfoStateSuccess = TaskInfoState("success") TaskInfoStateError = TaskInfoState("error") ) func init() { t["TaskInfoState"] = reflect.TypeOf((*TaskInfoState)(nil)).Elem() } type ThirdPartyLicenseAssignmentFailedReason string const ( ThirdPartyLicenseAssignmentFailedReasonLicenseAssignmentFailed = ThirdPartyLicenseAssignmentFailedReason("licenseAssignmentFailed") ThirdPartyLicenseAssignmentFailedReasonModuleNotInstalled = ThirdPartyLicenseAssignmentFailedReason("moduleNotInstalled") ) func init() { t["ThirdPartyLicenseAssignmentFailedReason"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailedReason)(nil)).Elem() } type UpgradePolicy string const ( UpgradePolicyManual = UpgradePolicy("manual") UpgradePolicyUpgradeAtPowerCycle = UpgradePolicy("upgradeAtPowerCycle") ) func init() { t["UpgradePolicy"] = reflect.TypeOf((*UpgradePolicy)(nil)).Elem() } type VAppAutoStartAction string const ( VAppAutoStartActionNone = VAppAutoStartAction("none") VAppAutoStartActionPowerOn = VAppAutoStartAction("powerOn") VAppAutoStartActionPowerOff = VAppAutoStartAction("powerOff") VAppAutoStartActionGuestShutdown = VAppAutoStartAction("guestShutdown") VAppAutoStartActionSuspend = VAppAutoStartAction("suspend") ) func init() { t["VAppAutoStartAction"] = reflect.TypeOf((*VAppAutoStartAction)(nil)).Elem() } type VAppCloneSpecProvisioningType string const ( VAppCloneSpecProvisioningTypeSameAsSource = VAppCloneSpecProvisioningType("sameAsSource") VAppCloneSpecProvisioningTypeThin = VAppCloneSpecProvisioningType("thin") VAppCloneSpecProvisioningTypeThick = VAppCloneSpecProvisioningType("thick") ) func init() { t["VAppCloneSpecProvisioningType"] = reflect.TypeOf((*VAppCloneSpecProvisioningType)(nil)).Elem() } type VAppIPAssignmentInfoAllocationSchemes string const ( VAppIPAssignmentInfoAllocationSchemesDhcp = VAppIPAssignmentInfoAllocationSchemes("dhcp") VAppIPAssignmentInfoAllocationSchemesOvfenv = VAppIPAssignmentInfoAllocationSchemes("ovfenv") ) func init() { t["VAppIPAssignmentInfoAllocationSchemes"] = reflect.TypeOf((*VAppIPAssignmentInfoAllocationSchemes)(nil)).Elem() } type VAppIPAssignmentInfoIpAllocationPolicy string const ( VAppIPAssignmentInfoIpAllocationPolicyDhcpPolicy = VAppIPAssignmentInfoIpAllocationPolicy("dhcpPolicy") VAppIPAssignmentInfoIpAllocationPolicyTransientPolicy = VAppIPAssignmentInfoIpAllocationPolicy("transientPolicy") VAppIPAssignmentInfoIpAllocationPolicyFixedPolicy = VAppIPAssignmentInfoIpAllocationPolicy("fixedPolicy") VAppIPAssignmentInfoIpAllocationPolicyFixedAllocatedPolicy = VAppIPAssignmentInfoIpAllocationPolicy("fixedAllocatedPolicy") ) func init() { t["VAppIPAssignmentInfoIpAllocationPolicy"] = reflect.TypeOf((*VAppIPAssignmentInfoIpAllocationPolicy)(nil)).Elem() } type VAppIPAssignmentInfoProtocols string const ( VAppIPAssignmentInfoProtocolsIPv4 = VAppIPAssignmentInfoProtocols("IPv4") VAppIPAssignmentInfoProtocolsIPv6 = VAppIPAssignmentInfoProtocols("IPv6") ) func init() { t["VAppIPAssignmentInfoProtocols"] = reflect.TypeOf((*VAppIPAssignmentInfoProtocols)(nil)).Elem() } type VFlashModuleNotSupportedReason string const ( VFlashModuleNotSupportedReasonCacheModeNotSupported = VFlashModuleNotSupportedReason("CacheModeNotSupported") VFlashModuleNotSupportedReasonCacheConsistencyTypeNotSupported = VFlashModuleNotSupportedReason("CacheConsistencyTypeNotSupported") VFlashModuleNotSupportedReasonCacheBlockSizeNotSupported = VFlashModuleNotSupportedReason("CacheBlockSizeNotSupported") VFlashModuleNotSupportedReasonCacheReservationNotSupported = VFlashModuleNotSupportedReason("CacheReservationNotSupported") VFlashModuleNotSupportedReasonDiskSizeNotSupported = VFlashModuleNotSupportedReason("DiskSizeNotSupported") ) func init() { t["VFlashModuleNotSupportedReason"] = reflect.TypeOf((*VFlashModuleNotSupportedReason)(nil)).Elem() } type VMotionCompatibilityType string const ( VMotionCompatibilityTypeCpu = VMotionCompatibilityType("cpu") VMotionCompatibilityTypeSoftware = VMotionCompatibilityType("software") ) func init() { t["VMotionCompatibilityType"] = reflect.TypeOf((*VMotionCompatibilityType)(nil)).Elem() } type VMwareDVSTeamingMatchStatus string const ( VMwareDVSTeamingMatchStatusIphashMatch = VMwareDVSTeamingMatchStatus("iphashMatch") VMwareDVSTeamingMatchStatusNonIphashMatch = VMwareDVSTeamingMatchStatus("nonIphashMatch") VMwareDVSTeamingMatchStatusIphashMismatch = VMwareDVSTeamingMatchStatus("iphashMismatch") VMwareDVSTeamingMatchStatusNonIphashMismatch = VMwareDVSTeamingMatchStatus("nonIphashMismatch") ) func init() { t["VMwareDVSTeamingMatchStatus"] = reflect.TypeOf((*VMwareDVSTeamingMatchStatus)(nil)).Elem() } type VMwareDVSVspanSessionEncapType string const ( VMwareDVSVspanSessionEncapTypeGre = VMwareDVSVspanSessionEncapType("gre") VMwareDVSVspanSessionEncapTypeErspan2 = VMwareDVSVspanSessionEncapType("erspan2") VMwareDVSVspanSessionEncapTypeErspan3 = VMwareDVSVspanSessionEncapType("erspan3") ) func init() { t["VMwareDVSVspanSessionEncapType"] = reflect.TypeOf((*VMwareDVSVspanSessionEncapType)(nil)).Elem() } type VMwareDVSVspanSessionType string const ( VMwareDVSVspanSessionTypeMixedDestMirror = VMwareDVSVspanSessionType("mixedDestMirror") VMwareDVSVspanSessionTypeDvPortMirror = VMwareDVSVspanSessionType("dvPortMirror") VMwareDVSVspanSessionTypeRemoteMirrorSource = VMwareDVSVspanSessionType("remoteMirrorSource") VMwareDVSVspanSessionTypeRemoteMirrorDest = VMwareDVSVspanSessionType("remoteMirrorDest") VMwareDVSVspanSessionTypeEncapsulatedRemoteMirrorSource = VMwareDVSVspanSessionType("encapsulatedRemoteMirrorSource") ) func init() { t["VMwareDVSVspanSessionType"] = reflect.TypeOf((*VMwareDVSVspanSessionType)(nil)).Elem() } type VMwareDvsLacpApiVersion string const ( VMwareDvsLacpApiVersionSingleLag = VMwareDvsLacpApiVersion("singleLag") VMwareDvsLacpApiVersionMultipleLag = VMwareDvsLacpApiVersion("multipleLag") ) func init() { t["VMwareDvsLacpApiVersion"] = reflect.TypeOf((*VMwareDvsLacpApiVersion)(nil)).Elem() } type VMwareDvsLacpLoadBalanceAlgorithm string const ( VMwareDvsLacpLoadBalanceAlgorithmSrcMac = VMwareDvsLacpLoadBalanceAlgorithm("srcMac") VMwareDvsLacpLoadBalanceAlgorithmDestMac = VMwareDvsLacpLoadBalanceAlgorithm("destMac") VMwareDvsLacpLoadBalanceAlgorithmSrcDestMac = VMwareDvsLacpLoadBalanceAlgorithm("srcDestMac") VMwareDvsLacpLoadBalanceAlgorithmDestIpVlan = VMwareDvsLacpLoadBalanceAlgorithm("destIpVlan") VMwareDvsLacpLoadBalanceAlgorithmSrcIpVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcIpVlan") VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpVlan") VMwareDvsLacpLoadBalanceAlgorithmDestTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("destTcpUdpPort") VMwareDvsLacpLoadBalanceAlgorithmSrcTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcTcpUdpPort") VMwareDvsLacpLoadBalanceAlgorithmSrcDestTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcDestTcpUdpPort") VMwareDvsLacpLoadBalanceAlgorithmDestIpTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("destIpTcpUdpPort") VMwareDvsLacpLoadBalanceAlgorithmSrcIpTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcIpTcpUdpPort") VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpTcpUdpPort") VMwareDvsLacpLoadBalanceAlgorithmDestIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("destIpTcpUdpPortVlan") VMwareDvsLacpLoadBalanceAlgorithmSrcIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcIpTcpUdpPortVlan") VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpTcpUdpPortVlan") VMwareDvsLacpLoadBalanceAlgorithmDestIp = VMwareDvsLacpLoadBalanceAlgorithm("destIp") VMwareDvsLacpLoadBalanceAlgorithmSrcIp = VMwareDvsLacpLoadBalanceAlgorithm("srcIp") VMwareDvsLacpLoadBalanceAlgorithmSrcDestIp = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIp") VMwareDvsLacpLoadBalanceAlgorithmVlan = VMwareDvsLacpLoadBalanceAlgorithm("vlan") VMwareDvsLacpLoadBalanceAlgorithmSrcPortId = VMwareDvsLacpLoadBalanceAlgorithm("srcPortId") ) func init() { t["VMwareDvsLacpLoadBalanceAlgorithm"] = reflect.TypeOf((*VMwareDvsLacpLoadBalanceAlgorithm)(nil)).Elem() } type VMwareDvsMulticastFilteringMode string const ( VMwareDvsMulticastFilteringModeLegacyFiltering = VMwareDvsMulticastFilteringMode("legacyFiltering") VMwareDvsMulticastFilteringModeSnooping = VMwareDvsMulticastFilteringMode("snooping") ) func init() { t["VMwareDvsMulticastFilteringMode"] = reflect.TypeOf((*VMwareDvsMulticastFilteringMode)(nil)).Elem() } type VMwareUplinkLacpMode string const ( VMwareUplinkLacpModeActive = VMwareUplinkLacpMode("active") VMwareUplinkLacpModePassive = VMwareUplinkLacpMode("passive") ) func init() { t["VMwareUplinkLacpMode"] = reflect.TypeOf((*VMwareUplinkLacpMode)(nil)).Elem() } type VStorageObjectConsumptionType string const ( VStorageObjectConsumptionTypeDisk = VStorageObjectConsumptionType("disk") ) func init() { t["VStorageObjectConsumptionType"] = reflect.TypeOf((*VStorageObjectConsumptionType)(nil)).Elem() } type ValidateMigrationTestType string const ( ValidateMigrationTestTypeSourceTests = ValidateMigrationTestType("sourceTests") ValidateMigrationTestTypeCompatibilityTests = ValidateMigrationTestType("compatibilityTests") ValidateMigrationTestTypeDiskAccessibilityTests = ValidateMigrationTestType("diskAccessibilityTests") ValidateMigrationTestTypeResourceTests = ValidateMigrationTestType("resourceTests") ) func init() { t["ValidateMigrationTestType"] = reflect.TypeOf((*ValidateMigrationTestType)(nil)).Elem() } type VchaClusterMode string const ( VchaClusterModeEnabled = VchaClusterMode("enabled") VchaClusterModeDisabled = VchaClusterMode("disabled") VchaClusterModeMaintenance = VchaClusterMode("maintenance") ) func init() { t["VchaClusterMode"] = reflect.TypeOf((*VchaClusterMode)(nil)).Elem() } type VchaClusterState string const ( VchaClusterStateHealthy = VchaClusterState("healthy") VchaClusterStateDegraded = VchaClusterState("degraded") VchaClusterStateIsolated = VchaClusterState("isolated") ) func init() { t["VchaClusterState"] = reflect.TypeOf((*VchaClusterState)(nil)).Elem() } type VchaNodeRole string const ( VchaNodeRoleActive = VchaNodeRole("active") VchaNodeRolePassive = VchaNodeRole("passive") VchaNodeRoleWitness = VchaNodeRole("witness") ) func init() { t["VchaNodeRole"] = reflect.TypeOf((*VchaNodeRole)(nil)).Elem() } type VchaNodeState string const ( VchaNodeStateUp = VchaNodeState("up") VchaNodeStateDown = VchaNodeState("down") ) func init() { t["VchaNodeState"] = reflect.TypeOf((*VchaNodeState)(nil)).Elem() } type VchaState string const ( VchaStateConfigured = VchaState("configured") VchaStateNotConfigured = VchaState("notConfigured") VchaStateInvalid = VchaState("invalid") VchaStatePrepared = VchaState("prepared") ) func init() { t["VchaState"] = reflect.TypeOf((*VchaState)(nil)).Elem() } type VirtualAppVAppState string const ( VirtualAppVAppStateStarted = VirtualAppVAppState("started") VirtualAppVAppStateStopped = VirtualAppVAppState("stopped") VirtualAppVAppStateStarting = VirtualAppVAppState("starting") VirtualAppVAppStateStopping = VirtualAppVAppState("stopping") ) func init() { t["VirtualAppVAppState"] = reflect.TypeOf((*VirtualAppVAppState)(nil)).Elem() } type VirtualDeviceConfigSpecFileOperation string const ( VirtualDeviceConfigSpecFileOperationCreate = VirtualDeviceConfigSpecFileOperation("create") VirtualDeviceConfigSpecFileOperationDestroy = VirtualDeviceConfigSpecFileOperation("destroy") VirtualDeviceConfigSpecFileOperationReplace = VirtualDeviceConfigSpecFileOperation("replace") ) func init() { t["VirtualDeviceConfigSpecFileOperation"] = reflect.TypeOf((*VirtualDeviceConfigSpecFileOperation)(nil)).Elem() } type VirtualDeviceConfigSpecOperation string const ( VirtualDeviceConfigSpecOperationAdd = VirtualDeviceConfigSpecOperation("add") VirtualDeviceConfigSpecOperationRemove = VirtualDeviceConfigSpecOperation("remove") VirtualDeviceConfigSpecOperationEdit = VirtualDeviceConfigSpecOperation("edit") ) func init() { t["VirtualDeviceConfigSpecOperation"] = reflect.TypeOf((*VirtualDeviceConfigSpecOperation)(nil)).Elem() } type VirtualDeviceConnectInfoStatus string const ( VirtualDeviceConnectInfoStatusOk = VirtualDeviceConnectInfoStatus("ok") VirtualDeviceConnectInfoStatusRecoverableError = VirtualDeviceConnectInfoStatus("recoverableError") VirtualDeviceConnectInfoStatusUnrecoverableError = VirtualDeviceConnectInfoStatus("unrecoverableError") VirtualDeviceConnectInfoStatusUntried = VirtualDeviceConnectInfoStatus("untried") ) func init() { t["VirtualDeviceConnectInfoStatus"] = reflect.TypeOf((*VirtualDeviceConnectInfoStatus)(nil)).Elem() } type VirtualDeviceFileExtension string const ( VirtualDeviceFileExtensionIso = VirtualDeviceFileExtension("iso") VirtualDeviceFileExtensionFlp = VirtualDeviceFileExtension("flp") VirtualDeviceFileExtensionVmdk = VirtualDeviceFileExtension("vmdk") VirtualDeviceFileExtensionDsk = VirtualDeviceFileExtension("dsk") VirtualDeviceFileExtensionRdm = VirtualDeviceFileExtension("rdm") ) func init() { t["VirtualDeviceFileExtension"] = reflect.TypeOf((*VirtualDeviceFileExtension)(nil)).Elem() } type VirtualDeviceURIBackingOptionDirection string const ( VirtualDeviceURIBackingOptionDirectionServer = VirtualDeviceURIBackingOptionDirection("server") VirtualDeviceURIBackingOptionDirectionClient = VirtualDeviceURIBackingOptionDirection("client") ) func init() { t["VirtualDeviceURIBackingOptionDirection"] = reflect.TypeOf((*VirtualDeviceURIBackingOptionDirection)(nil)).Elem() } type VirtualDiskAdapterType string const ( VirtualDiskAdapterTypeIde = VirtualDiskAdapterType("ide") VirtualDiskAdapterTypeBusLogic = VirtualDiskAdapterType("busLogic") VirtualDiskAdapterTypeLsiLogic = VirtualDiskAdapterType("lsiLogic") ) func init() { t["VirtualDiskAdapterType"] = reflect.TypeOf((*VirtualDiskAdapterType)(nil)).Elem() } type VirtualDiskCompatibilityMode string const ( VirtualDiskCompatibilityModeVirtualMode = VirtualDiskCompatibilityMode("virtualMode") VirtualDiskCompatibilityModePhysicalMode = VirtualDiskCompatibilityMode("physicalMode") ) func init() { t["VirtualDiskCompatibilityMode"] = reflect.TypeOf((*VirtualDiskCompatibilityMode)(nil)).Elem() } type VirtualDiskDeltaDiskFormat string const ( VirtualDiskDeltaDiskFormatRedoLogFormat = VirtualDiskDeltaDiskFormat("redoLogFormat") VirtualDiskDeltaDiskFormatNativeFormat = VirtualDiskDeltaDiskFormat("nativeFormat") VirtualDiskDeltaDiskFormatSeSparseFormat = VirtualDiskDeltaDiskFormat("seSparseFormat") ) func init() { t["VirtualDiskDeltaDiskFormat"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormat)(nil)).Elem() } type VirtualDiskDeltaDiskFormatVariant string const ( VirtualDiskDeltaDiskFormatVariantVmfsSparseVariant = VirtualDiskDeltaDiskFormatVariant("vmfsSparseVariant") VirtualDiskDeltaDiskFormatVariantVsanSparseVariant = VirtualDiskDeltaDiskFormatVariant("vsanSparseVariant") ) func init() { t["VirtualDiskDeltaDiskFormatVariant"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormatVariant)(nil)).Elem() } type VirtualDiskMode string const ( VirtualDiskModePersistent = VirtualDiskMode("persistent") VirtualDiskModeNonpersistent = VirtualDiskMode("nonpersistent") VirtualDiskModeUndoable = VirtualDiskMode("undoable") VirtualDiskModeIndependent_persistent = VirtualDiskMode("independent_persistent") VirtualDiskModeIndependent_nonpersistent = VirtualDiskMode("independent_nonpersistent") VirtualDiskModeAppend = VirtualDiskMode("append") ) func init() { t["VirtualDiskMode"] = reflect.TypeOf((*VirtualDiskMode)(nil)).Elem() } type VirtualDiskSharing string const ( VirtualDiskSharingSharingNone = VirtualDiskSharing("sharingNone") VirtualDiskSharingSharingMultiWriter = VirtualDiskSharing("sharingMultiWriter") ) func init() { t["VirtualDiskSharing"] = reflect.TypeOf((*VirtualDiskSharing)(nil)).Elem() } type VirtualDiskType string const ( VirtualDiskTypePreallocated = VirtualDiskType("preallocated") VirtualDiskTypeThin = VirtualDiskType("thin") VirtualDiskTypeSeSparse = VirtualDiskType("seSparse") VirtualDiskTypeRdm = VirtualDiskType("rdm") VirtualDiskTypeRdmp = VirtualDiskType("rdmp") VirtualDiskTypeRaw = VirtualDiskType("raw") VirtualDiskTypeDelta = VirtualDiskType("delta") VirtualDiskTypeSparse2Gb = VirtualDiskType("sparse2Gb") VirtualDiskTypeThick2Gb = VirtualDiskType("thick2Gb") VirtualDiskTypeEagerZeroedThick = VirtualDiskType("eagerZeroedThick") VirtualDiskTypeSparseMonolithic = VirtualDiskType("sparseMonolithic") VirtualDiskTypeFlatMonolithic = VirtualDiskType("flatMonolithic") VirtualDiskTypeThick = VirtualDiskType("thick") ) func init() { t["VirtualDiskType"] = reflect.TypeOf((*VirtualDiskType)(nil)).Elem() } type VirtualDiskVFlashCacheConfigInfoCacheConsistencyType string const ( VirtualDiskVFlashCacheConfigInfoCacheConsistencyTypeStrong = VirtualDiskVFlashCacheConfigInfoCacheConsistencyType("strong") VirtualDiskVFlashCacheConfigInfoCacheConsistencyTypeWeak = VirtualDiskVFlashCacheConfigInfoCacheConsistencyType("weak") ) func init() { t["VirtualDiskVFlashCacheConfigInfoCacheConsistencyType"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfoCacheConsistencyType)(nil)).Elem() } type VirtualDiskVFlashCacheConfigInfoCacheMode string const ( VirtualDiskVFlashCacheConfigInfoCacheModeWrite_thru = VirtualDiskVFlashCacheConfigInfoCacheMode("write_thru") VirtualDiskVFlashCacheConfigInfoCacheModeWrite_back = VirtualDiskVFlashCacheConfigInfoCacheMode("write_back") ) func init() { t["VirtualDiskVFlashCacheConfigInfoCacheMode"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfoCacheMode)(nil)).Elem() } type VirtualEthernetCardLegacyNetworkDeviceName string const ( VirtualEthernetCardLegacyNetworkDeviceNameBridged = VirtualEthernetCardLegacyNetworkDeviceName("bridged") VirtualEthernetCardLegacyNetworkDeviceNameNat = VirtualEthernetCardLegacyNetworkDeviceName("nat") VirtualEthernetCardLegacyNetworkDeviceNameHostonly = VirtualEthernetCardLegacyNetworkDeviceName("hostonly") ) func init() { t["VirtualEthernetCardLegacyNetworkDeviceName"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkDeviceName)(nil)).Elem() } type VirtualEthernetCardMacType string const ( VirtualEthernetCardMacTypeManual = VirtualEthernetCardMacType("manual") VirtualEthernetCardMacTypeGenerated = VirtualEthernetCardMacType("generated") VirtualEthernetCardMacTypeAssigned = VirtualEthernetCardMacType("assigned") ) func init() { t["VirtualEthernetCardMacType"] = reflect.TypeOf((*VirtualEthernetCardMacType)(nil)).Elem() } type VirtualMachineAppHeartbeatStatusType string const ( VirtualMachineAppHeartbeatStatusTypeAppStatusGray = VirtualMachineAppHeartbeatStatusType("appStatusGray") VirtualMachineAppHeartbeatStatusTypeAppStatusGreen = VirtualMachineAppHeartbeatStatusType("appStatusGreen") VirtualMachineAppHeartbeatStatusTypeAppStatusRed = VirtualMachineAppHeartbeatStatusType("appStatusRed") ) func init() { t["VirtualMachineAppHeartbeatStatusType"] = reflect.TypeOf((*VirtualMachineAppHeartbeatStatusType)(nil)).Elem() } type VirtualMachineBootOptionsNetworkBootProtocolType string const ( VirtualMachineBootOptionsNetworkBootProtocolTypeIpv4 = VirtualMachineBootOptionsNetworkBootProtocolType("ipv4") VirtualMachineBootOptionsNetworkBootProtocolTypeIpv6 = VirtualMachineBootOptionsNetworkBootProtocolType("ipv6") ) func init() { t["VirtualMachineBootOptionsNetworkBootProtocolType"] = reflect.TypeOf((*VirtualMachineBootOptionsNetworkBootProtocolType)(nil)).Elem() } type VirtualMachineConfigInfoNpivWwnType string const ( VirtualMachineConfigInfoNpivWwnTypeVc = VirtualMachineConfigInfoNpivWwnType("vc") VirtualMachineConfigInfoNpivWwnTypeHost = VirtualMachineConfigInfoNpivWwnType("host") VirtualMachineConfigInfoNpivWwnTypeExternal = VirtualMachineConfigInfoNpivWwnType("external") ) func init() { t["VirtualMachineConfigInfoNpivWwnType"] = reflect.TypeOf((*VirtualMachineConfigInfoNpivWwnType)(nil)).Elem() } type VirtualMachineConfigInfoSwapPlacementType string const ( VirtualMachineConfigInfoSwapPlacementTypeInherit = VirtualMachineConfigInfoSwapPlacementType("inherit") VirtualMachineConfigInfoSwapPlacementTypeVmDirectory = VirtualMachineConfigInfoSwapPlacementType("vmDirectory") VirtualMachineConfigInfoSwapPlacementTypeHostLocal = VirtualMachineConfigInfoSwapPlacementType("hostLocal") ) func init() { t["VirtualMachineConfigInfoSwapPlacementType"] = reflect.TypeOf((*VirtualMachineConfigInfoSwapPlacementType)(nil)).Elem() } type VirtualMachineConfigSpecEncryptedVMotionModes string const ( VirtualMachineConfigSpecEncryptedVMotionModesDisabled = VirtualMachineConfigSpecEncryptedVMotionModes("disabled") VirtualMachineConfigSpecEncryptedVMotionModesOpportunistic = VirtualMachineConfigSpecEncryptedVMotionModes("opportunistic") VirtualMachineConfigSpecEncryptedVMotionModesRequired = VirtualMachineConfigSpecEncryptedVMotionModes("required") ) func init() { t["VirtualMachineConfigSpecEncryptedVMotionModes"] = reflect.TypeOf((*VirtualMachineConfigSpecEncryptedVMotionModes)(nil)).Elem() } type VirtualMachineConfigSpecNpivWwnOp string const ( VirtualMachineConfigSpecNpivWwnOpGenerate = VirtualMachineConfigSpecNpivWwnOp("generate") VirtualMachineConfigSpecNpivWwnOpSet = VirtualMachineConfigSpecNpivWwnOp("set") VirtualMachineConfigSpecNpivWwnOpRemove = VirtualMachineConfigSpecNpivWwnOp("remove") VirtualMachineConfigSpecNpivWwnOpExtend = VirtualMachineConfigSpecNpivWwnOp("extend") ) func init() { t["VirtualMachineConfigSpecNpivWwnOp"] = reflect.TypeOf((*VirtualMachineConfigSpecNpivWwnOp)(nil)).Elem() } type VirtualMachineConnectionState string const ( VirtualMachineConnectionStateConnected = VirtualMachineConnectionState("connected") VirtualMachineConnectionStateDisconnected = VirtualMachineConnectionState("disconnected") VirtualMachineConnectionStateOrphaned = VirtualMachineConnectionState("orphaned") VirtualMachineConnectionStateInaccessible = VirtualMachineConnectionState("inaccessible") VirtualMachineConnectionStateInvalid = VirtualMachineConnectionState("invalid") ) func init() { t["VirtualMachineConnectionState"] = reflect.TypeOf((*VirtualMachineConnectionState)(nil)).Elem() } type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther string const ( VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOtherVmNptIncompatibleHost = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther("vmNptIncompatibleHost") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOtherVmNptIncompatibleNetwork = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther("vmNptIncompatibleNetwork") ) func init() { t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther)(nil)).Elem() } type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm string const ( VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleGuest = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleGuest") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleGuestDriver = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleGuestDriver") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleAdapterType = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleAdapterType") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptDisabledOrDisconnectedAdapter = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptDisabledOrDisconnectedAdapter") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleAdapterFeatures = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleAdapterFeatures") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleBackingType = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleBackingType") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptInsufficientMemoryReservation = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptInsufficientMemoryReservation") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptFaultToleranceOrRecordReplayConfigured = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptFaultToleranceOrRecordReplayConfigured") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptConflictingIOChainConfigured = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptConflictingIOChainConfigured") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptMonitorBlocks = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptMonitorBlocks") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptConflictingOperationInProgress = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptConflictingOperationInProgress") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptRuntimeError = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptRuntimeError") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptOutOfIntrVector = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptOutOfIntrVector") VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptVMCIActive = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptVMCIActive") ) func init() { t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm)(nil)).Elem() } type VirtualMachineFaultToleranceState string const ( VirtualMachineFaultToleranceStateNotConfigured = VirtualMachineFaultToleranceState("notConfigured") VirtualMachineFaultToleranceStateDisabled = VirtualMachineFaultToleranceState("disabled") VirtualMachineFaultToleranceStateEnabled = VirtualMachineFaultToleranceState("enabled") VirtualMachineFaultToleranceStateNeedSecondary = VirtualMachineFaultToleranceState("needSecondary") VirtualMachineFaultToleranceStateStarting = VirtualMachineFaultToleranceState("starting") VirtualMachineFaultToleranceStateRunning = VirtualMachineFaultToleranceState("running") ) func init() { t["VirtualMachineFaultToleranceState"] = reflect.TypeOf((*VirtualMachineFaultToleranceState)(nil)).Elem() } type VirtualMachineFaultToleranceType string const ( VirtualMachineFaultToleranceTypeUnset = VirtualMachineFaultToleranceType("unset") VirtualMachineFaultToleranceTypeRecordReplay = VirtualMachineFaultToleranceType("recordReplay") VirtualMachineFaultToleranceTypeCheckpointing = VirtualMachineFaultToleranceType("checkpointing") ) func init() { t["VirtualMachineFaultToleranceType"] = reflect.TypeOf((*VirtualMachineFaultToleranceType)(nil)).Elem() } type VirtualMachineFileLayoutExFileType string const ( VirtualMachineFileLayoutExFileTypeConfig = VirtualMachineFileLayoutExFileType("config") VirtualMachineFileLayoutExFileTypeExtendedConfig = VirtualMachineFileLayoutExFileType("extendedConfig") VirtualMachineFileLayoutExFileTypeDiskDescriptor = VirtualMachineFileLayoutExFileType("diskDescriptor") VirtualMachineFileLayoutExFileTypeDiskExtent = VirtualMachineFileLayoutExFileType("diskExtent") VirtualMachineFileLayoutExFileTypeDigestDescriptor = VirtualMachineFileLayoutExFileType("digestDescriptor") VirtualMachineFileLayoutExFileTypeDigestExtent = VirtualMachineFileLayoutExFileType("digestExtent") VirtualMachineFileLayoutExFileTypeDiskReplicationState = VirtualMachineFileLayoutExFileType("diskReplicationState") VirtualMachineFileLayoutExFileTypeLog = VirtualMachineFileLayoutExFileType("log") VirtualMachineFileLayoutExFileTypeStat = VirtualMachineFileLayoutExFileType("stat") VirtualMachineFileLayoutExFileTypeNamespaceData = VirtualMachineFileLayoutExFileType("namespaceData") VirtualMachineFileLayoutExFileTypeNvram = VirtualMachineFileLayoutExFileType("nvram") VirtualMachineFileLayoutExFileTypeSnapshotData = VirtualMachineFileLayoutExFileType("snapshotData") VirtualMachineFileLayoutExFileTypeSnapshotMemory = VirtualMachineFileLayoutExFileType("snapshotMemory") VirtualMachineFileLayoutExFileTypeSnapshotList = VirtualMachineFileLayoutExFileType("snapshotList") VirtualMachineFileLayoutExFileTypeSnapshotManifestList = VirtualMachineFileLayoutExFileType("snapshotManifestList") VirtualMachineFileLayoutExFileTypeSuspend = VirtualMachineFileLayoutExFileType("suspend") VirtualMachineFileLayoutExFileTypeSuspendMemory = VirtualMachineFileLayoutExFileType("suspendMemory") VirtualMachineFileLayoutExFileTypeSwap = VirtualMachineFileLayoutExFileType("swap") VirtualMachineFileLayoutExFileTypeUwswap = VirtualMachineFileLayoutExFileType("uwswap") VirtualMachineFileLayoutExFileTypeCore = VirtualMachineFileLayoutExFileType("core") VirtualMachineFileLayoutExFileTypeScreenshot = VirtualMachineFileLayoutExFileType("screenshot") VirtualMachineFileLayoutExFileTypeFtMetadata = VirtualMachineFileLayoutExFileType("ftMetadata") VirtualMachineFileLayoutExFileTypeGuestCustomization = VirtualMachineFileLayoutExFileType("guestCustomization") ) func init() { t["VirtualMachineFileLayoutExFileType"] = reflect.TypeOf((*VirtualMachineFileLayoutExFileType)(nil)).Elem() } type VirtualMachineFlagInfoMonitorType string const ( VirtualMachineFlagInfoMonitorTypeRelease = VirtualMachineFlagInfoMonitorType("release") VirtualMachineFlagInfoMonitorTypeDebug = VirtualMachineFlagInfoMonitorType("debug") VirtualMachineFlagInfoMonitorTypeStats = VirtualMachineFlagInfoMonitorType("stats") ) func init() { t["VirtualMachineFlagInfoMonitorType"] = reflect.TypeOf((*VirtualMachineFlagInfoMonitorType)(nil)).Elem() } type VirtualMachineFlagInfoVirtualExecUsage string const ( VirtualMachineFlagInfoVirtualExecUsageHvAuto = VirtualMachineFlagInfoVirtualExecUsage("hvAuto") VirtualMachineFlagInfoVirtualExecUsageHvOn = VirtualMachineFlagInfoVirtualExecUsage("hvOn") VirtualMachineFlagInfoVirtualExecUsageHvOff = VirtualMachineFlagInfoVirtualExecUsage("hvOff") ) func init() { t["VirtualMachineFlagInfoVirtualExecUsage"] = reflect.TypeOf((*VirtualMachineFlagInfoVirtualExecUsage)(nil)).Elem() } type VirtualMachineFlagInfoVirtualMmuUsage string const ( VirtualMachineFlagInfoVirtualMmuUsageAutomatic = VirtualMachineFlagInfoVirtualMmuUsage("automatic") VirtualMachineFlagInfoVirtualMmuUsageOn = VirtualMachineFlagInfoVirtualMmuUsage("on") VirtualMachineFlagInfoVirtualMmuUsageOff = VirtualMachineFlagInfoVirtualMmuUsage("off") ) func init() { t["VirtualMachineFlagInfoVirtualMmuUsage"] = reflect.TypeOf((*VirtualMachineFlagInfoVirtualMmuUsage)(nil)).Elem() } type VirtualMachineForkConfigInfoChildType string const ( VirtualMachineForkConfigInfoChildTypeNone = VirtualMachineForkConfigInfoChildType("none") VirtualMachineForkConfigInfoChildTypePersistent = VirtualMachineForkConfigInfoChildType("persistent") VirtualMachineForkConfigInfoChildTypeNonpersistent = VirtualMachineForkConfigInfoChildType("nonpersistent") ) func init() { t["VirtualMachineForkConfigInfoChildType"] = reflect.TypeOf((*VirtualMachineForkConfigInfoChildType)(nil)).Elem() } type VirtualMachineGuestOsFamily string const ( VirtualMachineGuestOsFamilyWindowsGuest = VirtualMachineGuestOsFamily("windowsGuest") VirtualMachineGuestOsFamilyLinuxGuest = VirtualMachineGuestOsFamily("linuxGuest") VirtualMachineGuestOsFamilyNetwareGuest = VirtualMachineGuestOsFamily("netwareGuest") VirtualMachineGuestOsFamilySolarisGuest = VirtualMachineGuestOsFamily("solarisGuest") VirtualMachineGuestOsFamilyDarwinGuestFamily = VirtualMachineGuestOsFamily("darwinGuestFamily") VirtualMachineGuestOsFamilyOtherGuestFamily = VirtualMachineGuestOsFamily("otherGuestFamily") ) func init() { t["VirtualMachineGuestOsFamily"] = reflect.TypeOf((*VirtualMachineGuestOsFamily)(nil)).Elem() } type VirtualMachineGuestOsIdentifier string const ( VirtualMachineGuestOsIdentifierDosGuest = VirtualMachineGuestOsIdentifier("dosGuest") VirtualMachineGuestOsIdentifierWin31Guest = VirtualMachineGuestOsIdentifier("win31Guest") VirtualMachineGuestOsIdentifierWin95Guest = VirtualMachineGuestOsIdentifier("win95Guest") VirtualMachineGuestOsIdentifierWin98Guest = VirtualMachineGuestOsIdentifier("win98Guest") VirtualMachineGuestOsIdentifierWinMeGuest = VirtualMachineGuestOsIdentifier("winMeGuest") VirtualMachineGuestOsIdentifierWinNTGuest = VirtualMachineGuestOsIdentifier("winNTGuest") VirtualMachineGuestOsIdentifierWin2000ProGuest = VirtualMachineGuestOsIdentifier("win2000ProGuest") VirtualMachineGuestOsIdentifierWin2000ServGuest = VirtualMachineGuestOsIdentifier("win2000ServGuest") VirtualMachineGuestOsIdentifierWin2000AdvServGuest = VirtualMachineGuestOsIdentifier("win2000AdvServGuest") VirtualMachineGuestOsIdentifierWinXPHomeGuest = VirtualMachineGuestOsIdentifier("winXPHomeGuest") VirtualMachineGuestOsIdentifierWinXPProGuest = VirtualMachineGuestOsIdentifier("winXPProGuest") VirtualMachineGuestOsIdentifierWinXPPro64Guest = VirtualMachineGuestOsIdentifier("winXPPro64Guest") VirtualMachineGuestOsIdentifierWinNetWebGuest = VirtualMachineGuestOsIdentifier("winNetWebGuest") VirtualMachineGuestOsIdentifierWinNetStandardGuest = VirtualMachineGuestOsIdentifier("winNetStandardGuest") VirtualMachineGuestOsIdentifierWinNetEnterpriseGuest = VirtualMachineGuestOsIdentifier("winNetEnterpriseGuest") VirtualMachineGuestOsIdentifierWinNetDatacenterGuest = VirtualMachineGuestOsIdentifier("winNetDatacenterGuest") VirtualMachineGuestOsIdentifierWinNetBusinessGuest = VirtualMachineGuestOsIdentifier("winNetBusinessGuest") VirtualMachineGuestOsIdentifierWinNetStandard64Guest = VirtualMachineGuestOsIdentifier("winNetStandard64Guest") VirtualMachineGuestOsIdentifierWinNetEnterprise64Guest = VirtualMachineGuestOsIdentifier("winNetEnterprise64Guest") VirtualMachineGuestOsIdentifierWinLonghornGuest = VirtualMachineGuestOsIdentifier("winLonghornGuest") VirtualMachineGuestOsIdentifierWinLonghorn64Guest = VirtualMachineGuestOsIdentifier("winLonghorn64Guest") VirtualMachineGuestOsIdentifierWinNetDatacenter64Guest = VirtualMachineGuestOsIdentifier("winNetDatacenter64Guest") VirtualMachineGuestOsIdentifierWinVistaGuest = VirtualMachineGuestOsIdentifier("winVistaGuest") VirtualMachineGuestOsIdentifierWinVista64Guest = VirtualMachineGuestOsIdentifier("winVista64Guest") VirtualMachineGuestOsIdentifierWindows7Guest = VirtualMachineGuestOsIdentifier("windows7Guest") VirtualMachineGuestOsIdentifierWindows7_64Guest = VirtualMachineGuestOsIdentifier("windows7_64Guest") VirtualMachineGuestOsIdentifierWindows7Server64Guest = VirtualMachineGuestOsIdentifier("windows7Server64Guest") VirtualMachineGuestOsIdentifierWindows8Guest = VirtualMachineGuestOsIdentifier("windows8Guest") VirtualMachineGuestOsIdentifierWindows8_64Guest = VirtualMachineGuestOsIdentifier("windows8_64Guest") VirtualMachineGuestOsIdentifierWindows8Server64Guest = VirtualMachineGuestOsIdentifier("windows8Server64Guest") VirtualMachineGuestOsIdentifierWindows9Guest = VirtualMachineGuestOsIdentifier("windows9Guest") VirtualMachineGuestOsIdentifierWindows9_64Guest = VirtualMachineGuestOsIdentifier("windows9_64Guest") VirtualMachineGuestOsIdentifierWindows9Server64Guest = VirtualMachineGuestOsIdentifier("windows9Server64Guest") VirtualMachineGuestOsIdentifierWindowsHyperVGuest = VirtualMachineGuestOsIdentifier("windowsHyperVGuest") VirtualMachineGuestOsIdentifierFreebsdGuest = VirtualMachineGuestOsIdentifier("freebsdGuest") VirtualMachineGuestOsIdentifierFreebsd64Guest = VirtualMachineGuestOsIdentifier("freebsd64Guest") VirtualMachineGuestOsIdentifierRedhatGuest = VirtualMachineGuestOsIdentifier("redhatGuest") VirtualMachineGuestOsIdentifierRhel2Guest = VirtualMachineGuestOsIdentifier("rhel2Guest") VirtualMachineGuestOsIdentifierRhel3Guest = VirtualMachineGuestOsIdentifier("rhel3Guest") VirtualMachineGuestOsIdentifierRhel3_64Guest = VirtualMachineGuestOsIdentifier("rhel3_64Guest") VirtualMachineGuestOsIdentifierRhel4Guest = VirtualMachineGuestOsIdentifier("rhel4Guest") VirtualMachineGuestOsIdentifierRhel4_64Guest = VirtualMachineGuestOsIdentifier("rhel4_64Guest") VirtualMachineGuestOsIdentifierRhel5Guest = VirtualMachineGuestOsIdentifier("rhel5Guest") VirtualMachineGuestOsIdentifierRhel5_64Guest = VirtualMachineGuestOsIdentifier("rhel5_64Guest") VirtualMachineGuestOsIdentifierRhel6Guest = VirtualMachineGuestOsIdentifier("rhel6Guest") VirtualMachineGuestOsIdentifierRhel6_64Guest = VirtualMachineGuestOsIdentifier("rhel6_64Guest") VirtualMachineGuestOsIdentifierRhel7Guest = VirtualMachineGuestOsIdentifier("rhel7Guest") VirtualMachineGuestOsIdentifierRhel7_64Guest = VirtualMachineGuestOsIdentifier("rhel7_64Guest") VirtualMachineGuestOsIdentifierCentosGuest = VirtualMachineGuestOsIdentifier("centosGuest") VirtualMachineGuestOsIdentifierCentos64Guest = VirtualMachineGuestOsIdentifier("centos64Guest") VirtualMachineGuestOsIdentifierCentos6Guest = VirtualMachineGuestOsIdentifier("centos6Guest") VirtualMachineGuestOsIdentifierCentos6_64Guest = VirtualMachineGuestOsIdentifier("centos6_64Guest") VirtualMachineGuestOsIdentifierCentos7Guest = VirtualMachineGuestOsIdentifier("centos7Guest") VirtualMachineGuestOsIdentifierCentos7_64Guest = VirtualMachineGuestOsIdentifier("centos7_64Guest") VirtualMachineGuestOsIdentifierOracleLinuxGuest = VirtualMachineGuestOsIdentifier("oracleLinuxGuest") VirtualMachineGuestOsIdentifierOracleLinux64Guest = VirtualMachineGuestOsIdentifier("oracleLinux64Guest") VirtualMachineGuestOsIdentifierOracleLinux6Guest = VirtualMachineGuestOsIdentifier("oracleLinux6Guest") VirtualMachineGuestOsIdentifierOracleLinux6_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux6_64Guest") VirtualMachineGuestOsIdentifierOracleLinux7Guest = VirtualMachineGuestOsIdentifier("oracleLinux7Guest") VirtualMachineGuestOsIdentifierOracleLinux7_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux7_64Guest") VirtualMachineGuestOsIdentifierSuseGuest = VirtualMachineGuestOsIdentifier("suseGuest") VirtualMachineGuestOsIdentifierSuse64Guest = VirtualMachineGuestOsIdentifier("suse64Guest") VirtualMachineGuestOsIdentifierSlesGuest = VirtualMachineGuestOsIdentifier("slesGuest") VirtualMachineGuestOsIdentifierSles64Guest = VirtualMachineGuestOsIdentifier("sles64Guest") VirtualMachineGuestOsIdentifierSles10Guest = VirtualMachineGuestOsIdentifier("sles10Guest") VirtualMachineGuestOsIdentifierSles10_64Guest = VirtualMachineGuestOsIdentifier("sles10_64Guest") VirtualMachineGuestOsIdentifierSles11Guest = VirtualMachineGuestOsIdentifier("sles11Guest") VirtualMachineGuestOsIdentifierSles11_64Guest = VirtualMachineGuestOsIdentifier("sles11_64Guest") VirtualMachineGuestOsIdentifierSles12Guest = VirtualMachineGuestOsIdentifier("sles12Guest") VirtualMachineGuestOsIdentifierSles12_64Guest = VirtualMachineGuestOsIdentifier("sles12_64Guest") VirtualMachineGuestOsIdentifierNld9Guest = VirtualMachineGuestOsIdentifier("nld9Guest") VirtualMachineGuestOsIdentifierOesGuest = VirtualMachineGuestOsIdentifier("oesGuest") VirtualMachineGuestOsIdentifierSjdsGuest = VirtualMachineGuestOsIdentifier("sjdsGuest") VirtualMachineGuestOsIdentifierMandrakeGuest = VirtualMachineGuestOsIdentifier("mandrakeGuest") VirtualMachineGuestOsIdentifierMandrivaGuest = VirtualMachineGuestOsIdentifier("mandrivaGuest") VirtualMachineGuestOsIdentifierMandriva64Guest = VirtualMachineGuestOsIdentifier("mandriva64Guest") VirtualMachineGuestOsIdentifierTurboLinuxGuest = VirtualMachineGuestOsIdentifier("turboLinuxGuest") VirtualMachineGuestOsIdentifierTurboLinux64Guest = VirtualMachineGuestOsIdentifier("turboLinux64Guest") VirtualMachineGuestOsIdentifierUbuntuGuest = VirtualMachineGuestOsIdentifier("ubuntuGuest") VirtualMachineGuestOsIdentifierUbuntu64Guest = VirtualMachineGuestOsIdentifier("ubuntu64Guest") VirtualMachineGuestOsIdentifierDebian4Guest = VirtualMachineGuestOsIdentifier("debian4Guest") VirtualMachineGuestOsIdentifierDebian4_64Guest = VirtualMachineGuestOsIdentifier("debian4_64Guest") VirtualMachineGuestOsIdentifierDebian5Guest = VirtualMachineGuestOsIdentifier("debian5Guest") VirtualMachineGuestOsIdentifierDebian5_64Guest = VirtualMachineGuestOsIdentifier("debian5_64Guest") VirtualMachineGuestOsIdentifierDebian6Guest = VirtualMachineGuestOsIdentifier("debian6Guest") VirtualMachineGuestOsIdentifierDebian6_64Guest = VirtualMachineGuestOsIdentifier("debian6_64Guest") VirtualMachineGuestOsIdentifierDebian7Guest = VirtualMachineGuestOsIdentifier("debian7Guest") VirtualMachineGuestOsIdentifierDebian7_64Guest = VirtualMachineGuestOsIdentifier("debian7_64Guest") VirtualMachineGuestOsIdentifierDebian8Guest = VirtualMachineGuestOsIdentifier("debian8Guest") VirtualMachineGuestOsIdentifierDebian8_64Guest = VirtualMachineGuestOsIdentifier("debian8_64Guest") VirtualMachineGuestOsIdentifierDebian9Guest = VirtualMachineGuestOsIdentifier("debian9Guest") VirtualMachineGuestOsIdentifierDebian9_64Guest = VirtualMachineGuestOsIdentifier("debian9_64Guest") VirtualMachineGuestOsIdentifierDebian10Guest = VirtualMachineGuestOsIdentifier("debian10Guest") VirtualMachineGuestOsIdentifierDebian10_64Guest = VirtualMachineGuestOsIdentifier("debian10_64Guest") VirtualMachineGuestOsIdentifierAsianux3Guest = VirtualMachineGuestOsIdentifier("asianux3Guest") VirtualMachineGuestOsIdentifierAsianux3_64Guest = VirtualMachineGuestOsIdentifier("asianux3_64Guest") VirtualMachineGuestOsIdentifierAsianux4Guest = VirtualMachineGuestOsIdentifier("asianux4Guest") VirtualMachineGuestOsIdentifierAsianux4_64Guest = VirtualMachineGuestOsIdentifier("asianux4_64Guest") VirtualMachineGuestOsIdentifierAsianux5_64Guest = VirtualMachineGuestOsIdentifier("asianux5_64Guest") VirtualMachineGuestOsIdentifierAsianux7_64Guest = VirtualMachineGuestOsIdentifier("asianux7_64Guest") VirtualMachineGuestOsIdentifierOpensuseGuest = VirtualMachineGuestOsIdentifier("opensuseGuest") VirtualMachineGuestOsIdentifierOpensuse64Guest = VirtualMachineGuestOsIdentifier("opensuse64Guest") VirtualMachineGuestOsIdentifierFedoraGuest = VirtualMachineGuestOsIdentifier("fedoraGuest") VirtualMachineGuestOsIdentifierFedora64Guest = VirtualMachineGuestOsIdentifier("fedora64Guest") VirtualMachineGuestOsIdentifierCoreos64Guest = VirtualMachineGuestOsIdentifier("coreos64Guest") VirtualMachineGuestOsIdentifierVmwarePhoton64Guest = VirtualMachineGuestOsIdentifier("vmwarePhoton64Guest") VirtualMachineGuestOsIdentifierOther24xLinuxGuest = VirtualMachineGuestOsIdentifier("other24xLinuxGuest") VirtualMachineGuestOsIdentifierOther26xLinuxGuest = VirtualMachineGuestOsIdentifier("other26xLinuxGuest") VirtualMachineGuestOsIdentifierOtherLinuxGuest = VirtualMachineGuestOsIdentifier("otherLinuxGuest") VirtualMachineGuestOsIdentifierOther3xLinuxGuest = VirtualMachineGuestOsIdentifier("other3xLinuxGuest") VirtualMachineGuestOsIdentifierGenericLinuxGuest = VirtualMachineGuestOsIdentifier("genericLinuxGuest") VirtualMachineGuestOsIdentifierOther24xLinux64Guest = VirtualMachineGuestOsIdentifier("other24xLinux64Guest") VirtualMachineGuestOsIdentifierOther26xLinux64Guest = VirtualMachineGuestOsIdentifier("other26xLinux64Guest") VirtualMachineGuestOsIdentifierOther3xLinux64Guest = VirtualMachineGuestOsIdentifier("other3xLinux64Guest") VirtualMachineGuestOsIdentifierOtherLinux64Guest = VirtualMachineGuestOsIdentifier("otherLinux64Guest") VirtualMachineGuestOsIdentifierSolaris6Guest = VirtualMachineGuestOsIdentifier("solaris6Guest") VirtualMachineGuestOsIdentifierSolaris7Guest = VirtualMachineGuestOsIdentifier("solaris7Guest") VirtualMachineGuestOsIdentifierSolaris8Guest = VirtualMachineGuestOsIdentifier("solaris8Guest") VirtualMachineGuestOsIdentifierSolaris9Guest = VirtualMachineGuestOsIdentifier("solaris9Guest") VirtualMachineGuestOsIdentifierSolaris10Guest = VirtualMachineGuestOsIdentifier("solaris10Guest") VirtualMachineGuestOsIdentifierSolaris10_64Guest = VirtualMachineGuestOsIdentifier("solaris10_64Guest") VirtualMachineGuestOsIdentifierSolaris11_64Guest = VirtualMachineGuestOsIdentifier("solaris11_64Guest") VirtualMachineGuestOsIdentifierOs2Guest = VirtualMachineGuestOsIdentifier("os2Guest") VirtualMachineGuestOsIdentifierEComStationGuest = VirtualMachineGuestOsIdentifier("eComStationGuest") VirtualMachineGuestOsIdentifierEComStation2Guest = VirtualMachineGuestOsIdentifier("eComStation2Guest") VirtualMachineGuestOsIdentifierNetware4Guest = VirtualMachineGuestOsIdentifier("netware4Guest") VirtualMachineGuestOsIdentifierNetware5Guest = VirtualMachineGuestOsIdentifier("netware5Guest") VirtualMachineGuestOsIdentifierNetware6Guest = VirtualMachineGuestOsIdentifier("netware6Guest") VirtualMachineGuestOsIdentifierOpenServer5Guest = VirtualMachineGuestOsIdentifier("openServer5Guest") VirtualMachineGuestOsIdentifierOpenServer6Guest = VirtualMachineGuestOsIdentifier("openServer6Guest") VirtualMachineGuestOsIdentifierUnixWare7Guest = VirtualMachineGuestOsIdentifier("unixWare7Guest") VirtualMachineGuestOsIdentifierDarwinGuest = VirtualMachineGuestOsIdentifier("darwinGuest") VirtualMachineGuestOsIdentifierDarwin64Guest = VirtualMachineGuestOsIdentifier("darwin64Guest") VirtualMachineGuestOsIdentifierDarwin10Guest = VirtualMachineGuestOsIdentifier("darwin10Guest") VirtualMachineGuestOsIdentifierDarwin10_64Guest = VirtualMachineGuestOsIdentifier("darwin10_64Guest") VirtualMachineGuestOsIdentifierDarwin11Guest = VirtualMachineGuestOsIdentifier("darwin11Guest") VirtualMachineGuestOsIdentifierDarwin11_64Guest = VirtualMachineGuestOsIdentifier("darwin11_64Guest") VirtualMachineGuestOsIdentifierDarwin12_64Guest = VirtualMachineGuestOsIdentifier("darwin12_64Guest") VirtualMachineGuestOsIdentifierDarwin13_64Guest = VirtualMachineGuestOsIdentifier("darwin13_64Guest") VirtualMachineGuestOsIdentifierDarwin14_64Guest = VirtualMachineGuestOsIdentifier("darwin14_64Guest") VirtualMachineGuestOsIdentifierDarwin15_64Guest = VirtualMachineGuestOsIdentifier("darwin15_64Guest") VirtualMachineGuestOsIdentifierDarwin16_64Guest = VirtualMachineGuestOsIdentifier("darwin16_64Guest") VirtualMachineGuestOsIdentifierVmkernelGuest = VirtualMachineGuestOsIdentifier("vmkernelGuest") VirtualMachineGuestOsIdentifierVmkernel5Guest = VirtualMachineGuestOsIdentifier("vmkernel5Guest") VirtualMachineGuestOsIdentifierVmkernel6Guest = VirtualMachineGuestOsIdentifier("vmkernel6Guest") VirtualMachineGuestOsIdentifierVmkernel65Guest = VirtualMachineGuestOsIdentifier("vmkernel65Guest") VirtualMachineGuestOsIdentifierOtherGuest = VirtualMachineGuestOsIdentifier("otherGuest") VirtualMachineGuestOsIdentifierOtherGuest64 = VirtualMachineGuestOsIdentifier("otherGuest64") ) func init() { t["VirtualMachineGuestOsIdentifier"] = reflect.TypeOf((*VirtualMachineGuestOsIdentifier)(nil)).Elem() } type VirtualMachineGuestState string const ( VirtualMachineGuestStateRunning = VirtualMachineGuestState("running") VirtualMachineGuestStateShuttingDown = VirtualMachineGuestState("shuttingDown") VirtualMachineGuestStateResetting = VirtualMachineGuestState("resetting") VirtualMachineGuestStateStandby = VirtualMachineGuestState("standby") VirtualMachineGuestStateNotRunning = VirtualMachineGuestState("notRunning") VirtualMachineGuestStateUnknown = VirtualMachineGuestState("unknown") ) func init() { t["VirtualMachineGuestState"] = reflect.TypeOf((*VirtualMachineGuestState)(nil)).Elem() } type VirtualMachineHtSharing string const ( VirtualMachineHtSharingAny = VirtualMachineHtSharing("any") VirtualMachineHtSharingNone = VirtualMachineHtSharing("none") VirtualMachineHtSharingInternal = VirtualMachineHtSharing("internal") ) func init() { t["VirtualMachineHtSharing"] = reflect.TypeOf((*VirtualMachineHtSharing)(nil)).Elem() } type VirtualMachineMemoryAllocationPolicy string const ( VirtualMachineMemoryAllocationPolicySwapNone = VirtualMachineMemoryAllocationPolicy("swapNone") VirtualMachineMemoryAllocationPolicySwapSome = VirtualMachineMemoryAllocationPolicy("swapSome") VirtualMachineMemoryAllocationPolicySwapMost = VirtualMachineMemoryAllocationPolicy("swapMost") ) func init() { t["VirtualMachineMemoryAllocationPolicy"] = reflect.TypeOf((*VirtualMachineMemoryAllocationPolicy)(nil)).Elem() } type VirtualMachineMetadataManagerVmMetadataOp string const ( VirtualMachineMetadataManagerVmMetadataOpUpdate = VirtualMachineMetadataManagerVmMetadataOp("Update") VirtualMachineMetadataManagerVmMetadataOpRemove = VirtualMachineMetadataManagerVmMetadataOp("Remove") ) func init() { t["VirtualMachineMetadataManagerVmMetadataOp"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOp)(nil)).Elem() } type VirtualMachineMetadataManagerVmMetadataOwnerOwner string const ( VirtualMachineMetadataManagerVmMetadataOwnerOwnerComVmwareVsphereHA = VirtualMachineMetadataManagerVmMetadataOwnerOwner("ComVmwareVsphereHA") ) func init() { t["VirtualMachineMetadataManagerVmMetadataOwnerOwner"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOwnerOwner)(nil)).Elem() } type VirtualMachineMovePriority string const ( VirtualMachineMovePriorityLowPriority = VirtualMachineMovePriority("lowPriority") VirtualMachineMovePriorityHighPriority = VirtualMachineMovePriority("highPriority") VirtualMachineMovePriorityDefaultPriority = VirtualMachineMovePriority("defaultPriority") ) func init() { t["VirtualMachineMovePriority"] = reflect.TypeOf((*VirtualMachineMovePriority)(nil)).Elem() } type VirtualMachineNeedSecondaryReason string const ( VirtualMachineNeedSecondaryReasonInitializing = VirtualMachineNeedSecondaryReason("initializing") VirtualMachineNeedSecondaryReasonDivergence = VirtualMachineNeedSecondaryReason("divergence") VirtualMachineNeedSecondaryReasonLostConnection = VirtualMachineNeedSecondaryReason("lostConnection") VirtualMachineNeedSecondaryReasonPartialHardwareFailure = VirtualMachineNeedSecondaryReason("partialHardwareFailure") VirtualMachineNeedSecondaryReasonUserAction = VirtualMachineNeedSecondaryReason("userAction") VirtualMachineNeedSecondaryReasonCheckpointError = VirtualMachineNeedSecondaryReason("checkpointError") VirtualMachineNeedSecondaryReasonOther = VirtualMachineNeedSecondaryReason("other") ) func init() { t["VirtualMachineNeedSecondaryReason"] = reflect.TypeOf((*VirtualMachineNeedSecondaryReason)(nil)).Elem() } type VirtualMachinePowerOffBehavior string const ( VirtualMachinePowerOffBehaviorPowerOff = VirtualMachinePowerOffBehavior("powerOff") VirtualMachinePowerOffBehaviorRevert = VirtualMachinePowerOffBehavior("revert") VirtualMachinePowerOffBehaviorPrompt = VirtualMachinePowerOffBehavior("prompt") VirtualMachinePowerOffBehaviorTake = VirtualMachinePowerOffBehavior("take") ) func init() { t["VirtualMachinePowerOffBehavior"] = reflect.TypeOf((*VirtualMachinePowerOffBehavior)(nil)).Elem() } type VirtualMachinePowerOpType string const ( VirtualMachinePowerOpTypeSoft = VirtualMachinePowerOpType("soft") VirtualMachinePowerOpTypeHard = VirtualMachinePowerOpType("hard") VirtualMachinePowerOpTypePreset = VirtualMachinePowerOpType("preset") ) func init() { t["VirtualMachinePowerOpType"] = reflect.TypeOf((*VirtualMachinePowerOpType)(nil)).Elem() } type VirtualMachinePowerState string const ( VirtualMachinePowerStatePoweredOff = VirtualMachinePowerState("poweredOff") VirtualMachinePowerStatePoweredOn = VirtualMachinePowerState("poweredOn") VirtualMachinePowerStateSuspended = VirtualMachinePowerState("suspended") ) func init() { t["VirtualMachinePowerState"] = reflect.TypeOf((*VirtualMachinePowerState)(nil)).Elem() } type VirtualMachineRecordReplayState string const ( VirtualMachineRecordReplayStateRecording = VirtualMachineRecordReplayState("recording") VirtualMachineRecordReplayStateReplaying = VirtualMachineRecordReplayState("replaying") VirtualMachineRecordReplayStateInactive = VirtualMachineRecordReplayState("inactive") ) func init() { t["VirtualMachineRecordReplayState"] = reflect.TypeOf((*VirtualMachineRecordReplayState)(nil)).Elem() } type VirtualMachineRelocateDiskMoveOptions string const ( VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndAllowSharing = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndAllowSharing") VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndDisallowSharing = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndDisallowSharing") VirtualMachineRelocateDiskMoveOptionsMoveChildMostDiskBacking = VirtualMachineRelocateDiskMoveOptions("moveChildMostDiskBacking") VirtualMachineRelocateDiskMoveOptionsCreateNewChildDiskBacking = VirtualMachineRelocateDiskMoveOptions("createNewChildDiskBacking") VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndConsolidate = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndConsolidate") ) func init() { t["VirtualMachineRelocateDiskMoveOptions"] = reflect.TypeOf((*VirtualMachineRelocateDiskMoveOptions)(nil)).Elem() } type VirtualMachineRelocateTransformation string const ( VirtualMachineRelocateTransformationFlat = VirtualMachineRelocateTransformation("flat") VirtualMachineRelocateTransformationSparse = VirtualMachineRelocateTransformation("sparse") ) func init() { t["VirtualMachineRelocateTransformation"] = reflect.TypeOf((*VirtualMachineRelocateTransformation)(nil)).Elem() } type VirtualMachineScsiPassthroughType string const ( VirtualMachineScsiPassthroughTypeDisk = VirtualMachineScsiPassthroughType("disk") VirtualMachineScsiPassthroughTypeTape = VirtualMachineScsiPassthroughType("tape") VirtualMachineScsiPassthroughTypePrinter = VirtualMachineScsiPassthroughType("printer") VirtualMachineScsiPassthroughTypeProcessor = VirtualMachineScsiPassthroughType("processor") VirtualMachineScsiPassthroughTypeWorm = VirtualMachineScsiPassthroughType("worm") VirtualMachineScsiPassthroughTypeCdrom = VirtualMachineScsiPassthroughType("cdrom") VirtualMachineScsiPassthroughTypeScanner = VirtualMachineScsiPassthroughType("scanner") VirtualMachineScsiPassthroughTypeOptical = VirtualMachineScsiPassthroughType("optical") VirtualMachineScsiPassthroughTypeMedia = VirtualMachineScsiPassthroughType("media") VirtualMachineScsiPassthroughTypeCom = VirtualMachineScsiPassthroughType("com") VirtualMachineScsiPassthroughTypeRaid = VirtualMachineScsiPassthroughType("raid") VirtualMachineScsiPassthroughTypeUnknown = VirtualMachineScsiPassthroughType("unknown") ) func init() { t["VirtualMachineScsiPassthroughType"] = reflect.TypeOf((*VirtualMachineScsiPassthroughType)(nil)).Elem() } type VirtualMachineStandbyActionType string const ( VirtualMachineStandbyActionTypeCheckpoint = VirtualMachineStandbyActionType("checkpoint") VirtualMachineStandbyActionTypePowerOnSuspend = VirtualMachineStandbyActionType("powerOnSuspend") ) func init() { t["VirtualMachineStandbyActionType"] = reflect.TypeOf((*VirtualMachineStandbyActionType)(nil)).Elem() } type VirtualMachineTargetInfoConfigurationTag string const ( VirtualMachineTargetInfoConfigurationTagCompliant = VirtualMachineTargetInfoConfigurationTag("compliant") VirtualMachineTargetInfoConfigurationTagClusterWide = VirtualMachineTargetInfoConfigurationTag("clusterWide") ) func init() { t["VirtualMachineTargetInfoConfigurationTag"] = reflect.TypeOf((*VirtualMachineTargetInfoConfigurationTag)(nil)).Elem() } type VirtualMachineTicketType string const ( VirtualMachineTicketTypeMks = VirtualMachineTicketType("mks") VirtualMachineTicketTypeDevice = VirtualMachineTicketType("device") VirtualMachineTicketTypeGuestControl = VirtualMachineTicketType("guestControl") VirtualMachineTicketTypeWebmks = VirtualMachineTicketType("webmks") ) func init() { t["VirtualMachineTicketType"] = reflect.TypeOf((*VirtualMachineTicketType)(nil)).Elem() } type VirtualMachineToolsInstallType string const ( VirtualMachineToolsInstallTypeGuestToolsTypeUnknown = VirtualMachineToolsInstallType("guestToolsTypeUnknown") VirtualMachineToolsInstallTypeGuestToolsTypeMSI = VirtualMachineToolsInstallType("guestToolsTypeMSI") VirtualMachineToolsInstallTypeGuestToolsTypeTar = VirtualMachineToolsInstallType("guestToolsTypeTar") VirtualMachineToolsInstallTypeGuestToolsTypeOSP = VirtualMachineToolsInstallType("guestToolsTypeOSP") VirtualMachineToolsInstallTypeGuestToolsTypeOpenVMTools = VirtualMachineToolsInstallType("guestToolsTypeOpenVMTools") ) func init() { t["VirtualMachineToolsInstallType"] = reflect.TypeOf((*VirtualMachineToolsInstallType)(nil)).Elem() } type VirtualMachineToolsRunningStatus string const ( VirtualMachineToolsRunningStatusGuestToolsNotRunning = VirtualMachineToolsRunningStatus("guestToolsNotRunning") VirtualMachineToolsRunningStatusGuestToolsRunning = VirtualMachineToolsRunningStatus("guestToolsRunning") VirtualMachineToolsRunningStatusGuestToolsExecutingScripts = VirtualMachineToolsRunningStatus("guestToolsExecutingScripts") ) func init() { t["VirtualMachineToolsRunningStatus"] = reflect.TypeOf((*VirtualMachineToolsRunningStatus)(nil)).Elem() } type VirtualMachineToolsStatus string const ( VirtualMachineToolsStatusToolsNotInstalled = VirtualMachineToolsStatus("toolsNotInstalled") VirtualMachineToolsStatusToolsNotRunning = VirtualMachineToolsStatus("toolsNotRunning") VirtualMachineToolsStatusToolsOld = VirtualMachineToolsStatus("toolsOld") VirtualMachineToolsStatusToolsOk = VirtualMachineToolsStatus("toolsOk") ) func init() { t["VirtualMachineToolsStatus"] = reflect.TypeOf((*VirtualMachineToolsStatus)(nil)).Elem() } type VirtualMachineToolsVersionStatus string const ( VirtualMachineToolsVersionStatusGuestToolsNotInstalled = VirtualMachineToolsVersionStatus("guestToolsNotInstalled") VirtualMachineToolsVersionStatusGuestToolsNeedUpgrade = VirtualMachineToolsVersionStatus("guestToolsNeedUpgrade") VirtualMachineToolsVersionStatusGuestToolsCurrent = VirtualMachineToolsVersionStatus("guestToolsCurrent") VirtualMachineToolsVersionStatusGuestToolsUnmanaged = VirtualMachineToolsVersionStatus("guestToolsUnmanaged") VirtualMachineToolsVersionStatusGuestToolsTooOld = VirtualMachineToolsVersionStatus("guestToolsTooOld") VirtualMachineToolsVersionStatusGuestToolsSupportedOld = VirtualMachineToolsVersionStatus("guestToolsSupportedOld") VirtualMachineToolsVersionStatusGuestToolsSupportedNew = VirtualMachineToolsVersionStatus("guestToolsSupportedNew") VirtualMachineToolsVersionStatusGuestToolsTooNew = VirtualMachineToolsVersionStatus("guestToolsTooNew") VirtualMachineToolsVersionStatusGuestToolsBlacklisted = VirtualMachineToolsVersionStatus("guestToolsBlacklisted") ) func init() { t["VirtualMachineToolsVersionStatus"] = reflect.TypeOf((*VirtualMachineToolsVersionStatus)(nil)).Elem() } type VirtualMachineUsbInfoFamily string const ( VirtualMachineUsbInfoFamilyAudio = VirtualMachineUsbInfoFamily("audio") VirtualMachineUsbInfoFamilyHid = VirtualMachineUsbInfoFamily("hid") VirtualMachineUsbInfoFamilyHid_bootable = VirtualMachineUsbInfoFamily("hid_bootable") VirtualMachineUsbInfoFamilyPhysical = VirtualMachineUsbInfoFamily("physical") VirtualMachineUsbInfoFamilyCommunication = VirtualMachineUsbInfoFamily("communication") VirtualMachineUsbInfoFamilyImaging = VirtualMachineUsbInfoFamily("imaging") VirtualMachineUsbInfoFamilyPrinter = VirtualMachineUsbInfoFamily("printer") VirtualMachineUsbInfoFamilyStorage = VirtualMachineUsbInfoFamily("storage") VirtualMachineUsbInfoFamilyHub = VirtualMachineUsbInfoFamily("hub") VirtualMachineUsbInfoFamilySmart_card = VirtualMachineUsbInfoFamily("smart_card") VirtualMachineUsbInfoFamilySecurity = VirtualMachineUsbInfoFamily("security") VirtualMachineUsbInfoFamilyVideo = VirtualMachineUsbInfoFamily("video") VirtualMachineUsbInfoFamilyWireless = VirtualMachineUsbInfoFamily("wireless") VirtualMachineUsbInfoFamilyBluetooth = VirtualMachineUsbInfoFamily("bluetooth") VirtualMachineUsbInfoFamilyWusb = VirtualMachineUsbInfoFamily("wusb") VirtualMachineUsbInfoFamilyPda = VirtualMachineUsbInfoFamily("pda") VirtualMachineUsbInfoFamilyVendor_specific = VirtualMachineUsbInfoFamily("vendor_specific") VirtualMachineUsbInfoFamilyOther = VirtualMachineUsbInfoFamily("other") VirtualMachineUsbInfoFamilyUnknownFamily = VirtualMachineUsbInfoFamily("unknownFamily") ) func init() { t["VirtualMachineUsbInfoFamily"] = reflect.TypeOf((*VirtualMachineUsbInfoFamily)(nil)).Elem() } type VirtualMachineUsbInfoSpeed string const ( VirtualMachineUsbInfoSpeedLow = VirtualMachineUsbInfoSpeed("low") VirtualMachineUsbInfoSpeedFull = VirtualMachineUsbInfoSpeed("full") VirtualMachineUsbInfoSpeedHigh = VirtualMachineUsbInfoSpeed("high") VirtualMachineUsbInfoSpeedSuperSpeed = VirtualMachineUsbInfoSpeed("superSpeed") VirtualMachineUsbInfoSpeedUnknownSpeed = VirtualMachineUsbInfoSpeed("unknownSpeed") ) func init() { t["VirtualMachineUsbInfoSpeed"] = reflect.TypeOf((*VirtualMachineUsbInfoSpeed)(nil)).Elem() } type VirtualMachineVMCIDeviceAction string const ( VirtualMachineVMCIDeviceActionAllow = VirtualMachineVMCIDeviceAction("allow") VirtualMachineVMCIDeviceActionDeny = VirtualMachineVMCIDeviceAction("deny") ) func init() { t["VirtualMachineVMCIDeviceAction"] = reflect.TypeOf((*VirtualMachineVMCIDeviceAction)(nil)).Elem() } type VirtualMachineVMCIDeviceDirection string const ( VirtualMachineVMCIDeviceDirectionGuest = VirtualMachineVMCIDeviceDirection("guest") VirtualMachineVMCIDeviceDirectionHost = VirtualMachineVMCIDeviceDirection("host") VirtualMachineVMCIDeviceDirectionAnyDirection = VirtualMachineVMCIDeviceDirection("anyDirection") ) func init() { t["VirtualMachineVMCIDeviceDirection"] = reflect.TypeOf((*VirtualMachineVMCIDeviceDirection)(nil)).Elem() } type VirtualMachineVMCIDeviceProtocol string const ( VirtualMachineVMCIDeviceProtocolHypervisor = VirtualMachineVMCIDeviceProtocol("hypervisor") VirtualMachineVMCIDeviceProtocolDoorbell = VirtualMachineVMCIDeviceProtocol("doorbell") VirtualMachineVMCIDeviceProtocolQueuepair = VirtualMachineVMCIDeviceProtocol("queuepair") VirtualMachineVMCIDeviceProtocolDatagram = VirtualMachineVMCIDeviceProtocol("datagram") VirtualMachineVMCIDeviceProtocolStream = VirtualMachineVMCIDeviceProtocol("stream") VirtualMachineVMCIDeviceProtocolAnyProtocol = VirtualMachineVMCIDeviceProtocol("anyProtocol") ) func init() { t["VirtualMachineVMCIDeviceProtocol"] = reflect.TypeOf((*VirtualMachineVMCIDeviceProtocol)(nil)).Elem() } type VirtualMachineVideoCardUse3dRenderer string const ( VirtualMachineVideoCardUse3dRendererAutomatic = VirtualMachineVideoCardUse3dRenderer("automatic") VirtualMachineVideoCardUse3dRendererSoftware = VirtualMachineVideoCardUse3dRenderer("software") VirtualMachineVideoCardUse3dRendererHardware = VirtualMachineVideoCardUse3dRenderer("hardware") ) func init() { t["VirtualMachineVideoCardUse3dRenderer"] = reflect.TypeOf((*VirtualMachineVideoCardUse3dRenderer)(nil)).Elem() } type VirtualMachineWindowsQuiesceSpecVssBackupContext string const ( VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_auto = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_auto") VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_backup") VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_file_share_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_file_share_backup") ) func init() { t["VirtualMachineWindowsQuiesceSpecVssBackupContext"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpecVssBackupContext)(nil)).Elem() } type VirtualPointingDeviceHostChoice string const ( VirtualPointingDeviceHostChoiceAutodetect = VirtualPointingDeviceHostChoice("autodetect") VirtualPointingDeviceHostChoiceIntellimouseExplorer = VirtualPointingDeviceHostChoice("intellimouseExplorer") VirtualPointingDeviceHostChoiceIntellimousePs2 = VirtualPointingDeviceHostChoice("intellimousePs2") VirtualPointingDeviceHostChoiceLogitechMouseman = VirtualPointingDeviceHostChoice("logitechMouseman") VirtualPointingDeviceHostChoiceMicrosoft_serial = VirtualPointingDeviceHostChoice("microsoft_serial") VirtualPointingDeviceHostChoiceMouseSystems = VirtualPointingDeviceHostChoice("mouseSystems") VirtualPointingDeviceHostChoiceMousemanSerial = VirtualPointingDeviceHostChoice("mousemanSerial") VirtualPointingDeviceHostChoicePs2 = VirtualPointingDeviceHostChoice("ps2") ) func init() { t["VirtualPointingDeviceHostChoice"] = reflect.TypeOf((*VirtualPointingDeviceHostChoice)(nil)).Elem() } type VirtualSCSISharing string const ( VirtualSCSISharingNoSharing = VirtualSCSISharing("noSharing") VirtualSCSISharingVirtualSharing = VirtualSCSISharing("virtualSharing") VirtualSCSISharingPhysicalSharing = VirtualSCSISharing("physicalSharing") ) func init() { t["VirtualSCSISharing"] = reflect.TypeOf((*VirtualSCSISharing)(nil)).Elem() } type VirtualSerialPortEndPoint string const ( VirtualSerialPortEndPointClient = VirtualSerialPortEndPoint("client") VirtualSerialPortEndPointServer = VirtualSerialPortEndPoint("server") ) func init() { t["VirtualSerialPortEndPoint"] = reflect.TypeOf((*VirtualSerialPortEndPoint)(nil)).Elem() } type VmDasBeingResetEventReasonCode string const ( VmDasBeingResetEventReasonCodeVmtoolsHeartbeatFailure = VmDasBeingResetEventReasonCode("vmtoolsHeartbeatFailure") VmDasBeingResetEventReasonCodeAppHeartbeatFailure = VmDasBeingResetEventReasonCode("appHeartbeatFailure") VmDasBeingResetEventReasonCodeAppImmediateResetRequest = VmDasBeingResetEventReasonCode("appImmediateResetRequest") VmDasBeingResetEventReasonCodeVmcpResetApdCleared = VmDasBeingResetEventReasonCode("vmcpResetApdCleared") ) func init() { t["VmDasBeingResetEventReasonCode"] = reflect.TypeOf((*VmDasBeingResetEventReasonCode)(nil)).Elem() } type VmFailedStartingSecondaryEventFailureReason string const ( VmFailedStartingSecondaryEventFailureReasonIncompatibleHost = VmFailedStartingSecondaryEventFailureReason("incompatibleHost") VmFailedStartingSecondaryEventFailureReasonLoginFailed = VmFailedStartingSecondaryEventFailureReason("loginFailed") VmFailedStartingSecondaryEventFailureReasonRegisterVmFailed = VmFailedStartingSecondaryEventFailureReason("registerVmFailed") VmFailedStartingSecondaryEventFailureReasonMigrateFailed = VmFailedStartingSecondaryEventFailureReason("migrateFailed") ) func init() { t["VmFailedStartingSecondaryEventFailureReason"] = reflect.TypeOf((*VmFailedStartingSecondaryEventFailureReason)(nil)).Elem() } type VmFaultToleranceConfigIssueReasonForIssue string const ( VmFaultToleranceConfigIssueReasonForIssueHaNotEnabled = VmFaultToleranceConfigIssueReasonForIssue("haNotEnabled") VmFaultToleranceConfigIssueReasonForIssueMoreThanOneSecondary = VmFaultToleranceConfigIssueReasonForIssue("moreThanOneSecondary") VmFaultToleranceConfigIssueReasonForIssueRecordReplayNotSupported = VmFaultToleranceConfigIssueReasonForIssue("recordReplayNotSupported") VmFaultToleranceConfigIssueReasonForIssueReplayNotSupported = VmFaultToleranceConfigIssueReasonForIssue("replayNotSupported") VmFaultToleranceConfigIssueReasonForIssueTemplateVm = VmFaultToleranceConfigIssueReasonForIssue("templateVm") VmFaultToleranceConfigIssueReasonForIssueMultipleVCPU = VmFaultToleranceConfigIssueReasonForIssue("multipleVCPU") VmFaultToleranceConfigIssueReasonForIssueHostInactive = VmFaultToleranceConfigIssueReasonForIssue("hostInactive") VmFaultToleranceConfigIssueReasonForIssueFtUnsupportedHardware = VmFaultToleranceConfigIssueReasonForIssue("ftUnsupportedHardware") VmFaultToleranceConfigIssueReasonForIssueFtUnsupportedProduct = VmFaultToleranceConfigIssueReasonForIssue("ftUnsupportedProduct") VmFaultToleranceConfigIssueReasonForIssueMissingVMotionNic = VmFaultToleranceConfigIssueReasonForIssue("missingVMotionNic") VmFaultToleranceConfigIssueReasonForIssueMissingFTLoggingNic = VmFaultToleranceConfigIssueReasonForIssue("missingFTLoggingNic") VmFaultToleranceConfigIssueReasonForIssueThinDisk = VmFaultToleranceConfigIssueReasonForIssue("thinDisk") VmFaultToleranceConfigIssueReasonForIssueVerifySSLCertificateFlagNotSet = VmFaultToleranceConfigIssueReasonForIssue("verifySSLCertificateFlagNotSet") VmFaultToleranceConfigIssueReasonForIssueHasSnapshots = VmFaultToleranceConfigIssueReasonForIssue("hasSnapshots") VmFaultToleranceConfigIssueReasonForIssueNoConfig = VmFaultToleranceConfigIssueReasonForIssue("noConfig") VmFaultToleranceConfigIssueReasonForIssueFtSecondaryVm = VmFaultToleranceConfigIssueReasonForIssue("ftSecondaryVm") VmFaultToleranceConfigIssueReasonForIssueHasLocalDisk = VmFaultToleranceConfigIssueReasonForIssue("hasLocalDisk") VmFaultToleranceConfigIssueReasonForIssueEsxAgentVm = VmFaultToleranceConfigIssueReasonForIssue("esxAgentVm") VmFaultToleranceConfigIssueReasonForIssueVideo3dEnabled = VmFaultToleranceConfigIssueReasonForIssue("video3dEnabled") VmFaultToleranceConfigIssueReasonForIssueHasUnsupportedDisk = VmFaultToleranceConfigIssueReasonForIssue("hasUnsupportedDisk") VmFaultToleranceConfigIssueReasonForIssueInsufficientBandwidth = VmFaultToleranceConfigIssueReasonForIssue("insufficientBandwidth") VmFaultToleranceConfigIssueReasonForIssueHasNestedHVConfiguration = VmFaultToleranceConfigIssueReasonForIssue("hasNestedHVConfiguration") VmFaultToleranceConfigIssueReasonForIssueHasVFlashConfiguration = VmFaultToleranceConfigIssueReasonForIssue("hasVFlashConfiguration") VmFaultToleranceConfigIssueReasonForIssueUnsupportedProduct = VmFaultToleranceConfigIssueReasonForIssue("unsupportedProduct") VmFaultToleranceConfigIssueReasonForIssueCpuHvUnsupported = VmFaultToleranceConfigIssueReasonForIssue("cpuHvUnsupported") VmFaultToleranceConfigIssueReasonForIssueCpuHwmmuUnsupported = VmFaultToleranceConfigIssueReasonForIssue("cpuHwmmuUnsupported") VmFaultToleranceConfigIssueReasonForIssueCpuHvDisabled = VmFaultToleranceConfigIssueReasonForIssue("cpuHvDisabled") VmFaultToleranceConfigIssueReasonForIssueHasEFIFirmware = VmFaultToleranceConfigIssueReasonForIssue("hasEFIFirmware") ) func init() { t["VmFaultToleranceConfigIssueReasonForIssue"] = reflect.TypeOf((*VmFaultToleranceConfigIssueReasonForIssue)(nil)).Elem() } type VmFaultToleranceInvalidFileBackingDeviceType string const ( VmFaultToleranceInvalidFileBackingDeviceTypeVirtualFloppy = VmFaultToleranceInvalidFileBackingDeviceType("virtualFloppy") VmFaultToleranceInvalidFileBackingDeviceTypeVirtualCdrom = VmFaultToleranceInvalidFileBackingDeviceType("virtualCdrom") VmFaultToleranceInvalidFileBackingDeviceTypeVirtualSerialPort = VmFaultToleranceInvalidFileBackingDeviceType("virtualSerialPort") VmFaultToleranceInvalidFileBackingDeviceTypeVirtualParallelPort = VmFaultToleranceInvalidFileBackingDeviceType("virtualParallelPort") VmFaultToleranceInvalidFileBackingDeviceTypeVirtualDisk = VmFaultToleranceInvalidFileBackingDeviceType("virtualDisk") ) func init() { t["VmFaultToleranceInvalidFileBackingDeviceType"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBackingDeviceType)(nil)).Elem() } type VmShutdownOnIsolationEventOperation string const ( VmShutdownOnIsolationEventOperationShutdown = VmShutdownOnIsolationEventOperation("shutdown") VmShutdownOnIsolationEventOperationPoweredOff = VmShutdownOnIsolationEventOperation("poweredOff") ) func init() { t["VmShutdownOnIsolationEventOperation"] = reflect.TypeOf((*VmShutdownOnIsolationEventOperation)(nil)).Elem() } type VmwareDistributedVirtualSwitchPvlanPortType string const ( VmwareDistributedVirtualSwitchPvlanPortTypePromiscuous = VmwareDistributedVirtualSwitchPvlanPortType("promiscuous") VmwareDistributedVirtualSwitchPvlanPortTypeIsolated = VmwareDistributedVirtualSwitchPvlanPortType("isolated") VmwareDistributedVirtualSwitchPvlanPortTypeCommunity = VmwareDistributedVirtualSwitchPvlanPortType("community") ) func init() { t["VmwareDistributedVirtualSwitchPvlanPortType"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchPvlanPortType)(nil)).Elem() } type VsanDiskIssueType string const ( VsanDiskIssueTypeNonExist = VsanDiskIssueType("nonExist") VsanDiskIssueTypeStampMismatch = VsanDiskIssueType("stampMismatch") VsanDiskIssueTypeUnknown = VsanDiskIssueType("unknown") ) func init() { t["VsanDiskIssueType"] = reflect.TypeOf((*VsanDiskIssueType)(nil)).Elem() } type VsanHostDecommissionModeObjectAction string const ( VsanHostDecommissionModeObjectActionNoAction = VsanHostDecommissionModeObjectAction("noAction") VsanHostDecommissionModeObjectActionEnsureObjectAccessibility = VsanHostDecommissionModeObjectAction("ensureObjectAccessibility") VsanHostDecommissionModeObjectActionEvacuateAllData = VsanHostDecommissionModeObjectAction("evacuateAllData") ) func init() { t["VsanHostDecommissionModeObjectAction"] = reflect.TypeOf((*VsanHostDecommissionModeObjectAction)(nil)).Elem() } type VsanHostDiskResultState string const ( VsanHostDiskResultStateInUse = VsanHostDiskResultState("inUse") VsanHostDiskResultStateEligible = VsanHostDiskResultState("eligible") VsanHostDiskResultStateIneligible = VsanHostDiskResultState("ineligible") ) func init() { t["VsanHostDiskResultState"] = reflect.TypeOf((*VsanHostDiskResultState)(nil)).Elem() } type VsanHostHealthState string const ( VsanHostHealthStateUnknown = VsanHostHealthState("unknown") VsanHostHealthStateHealthy = VsanHostHealthState("healthy") VsanHostHealthStateUnhealthy = VsanHostHealthState("unhealthy") ) func init() { t["VsanHostHealthState"] = reflect.TypeOf((*VsanHostHealthState)(nil)).Elem() } type VsanHostNodeState string const ( VsanHostNodeStateError = VsanHostNodeState("error") VsanHostNodeStateDisabled = VsanHostNodeState("disabled") VsanHostNodeStateAgent = VsanHostNodeState("agent") VsanHostNodeStateMaster = VsanHostNodeState("master") VsanHostNodeStateBackup = VsanHostNodeState("backup") VsanHostNodeStateStarting = VsanHostNodeState("starting") VsanHostNodeStateStopping = VsanHostNodeState("stopping") VsanHostNodeStateEnteringMaintenanceMode = VsanHostNodeState("enteringMaintenanceMode") VsanHostNodeStateExitingMaintenanceMode = VsanHostNodeState("exitingMaintenanceMode") VsanHostNodeStateDecommissioning = VsanHostNodeState("decommissioning") ) func init() { t["VsanHostNodeState"] = reflect.TypeOf((*VsanHostNodeState)(nil)).Elem() } type VsanUpgradeSystemUpgradeHistoryDiskGroupOpType string const ( VsanUpgradeSystemUpgradeHistoryDiskGroupOpTypeAdd = VsanUpgradeSystemUpgradeHistoryDiskGroupOpType("add") VsanUpgradeSystemUpgradeHistoryDiskGroupOpTypeRemove = VsanUpgradeSystemUpgradeHistoryDiskGroupOpType("remove") ) func init() { t["VsanUpgradeSystemUpgradeHistoryDiskGroupOpType"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryDiskGroupOpType)(nil)).Elem() } type WeekOfMonth string const ( WeekOfMonthFirst = WeekOfMonth("first") WeekOfMonthSecond = WeekOfMonth("second") WeekOfMonthThird = WeekOfMonth("third") WeekOfMonthFourth = WeekOfMonth("fourth") WeekOfMonthLast = WeekOfMonth("last") ) func init() { t["WeekOfMonth"] = reflect.TypeOf((*WeekOfMonth)(nil)).Elem() } type WillLoseHAProtectionResolution string const ( WillLoseHAProtectionResolutionSvmotion = WillLoseHAProtectionResolution("svmotion") WillLoseHAProtectionResolutionRelocate = WillLoseHAProtectionResolution("relocate") ) func init() { t["WillLoseHAProtectionResolution"] = reflect.TypeOf((*WillLoseHAProtectionResolution)(nil)).Elem() } govmomi-0.15.0/vim25/types/fault.go000066400000000000000000000014571312205533500170300ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types type HasFault interface { Fault() BaseMethodFault } func IsFileNotFound(err error) bool { if f, ok := err.(HasFault); ok { switch f.Fault().(type) { case *FileNotFound: return true } } return false } govmomi-0.15.0/vim25/types/helpers.go000066400000000000000000000023771312205533500173610ustar00rootroot00000000000000/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import "strings" func NewBool(v bool) *bool { return &v } func NewReference(r ManagedObjectReference) *ManagedObjectReference { return &r } func (r ManagedObjectReference) Reference() ManagedObjectReference { return r } func (r ManagedObjectReference) String() string { return strings.Join([]string{r.Type, r.Value}, ":") } func (r *ManagedObjectReference) FromString(o string) bool { s := strings.SplitN(o, ":", 2) if len(s) < 2 { return false } r.Type = s[0] r.Value = s[1] return true } func (c *PerfCounterInfo) Name() string { return c.GroupInfo.GetElementDescription().Key + "." + c.NameInfo.GetElementDescription().Key + "." + string(c.RollupType) } govmomi-0.15.0/vim25/types/if.go000066400000000000000000002671361312205533500163230ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import "reflect" func (b *Action) GetAction() *Action { return b } type BaseAction interface { GetAction() *Action } func init() { t["BaseAction"] = reflect.TypeOf((*Action)(nil)).Elem() } func (b *ActiveDirectoryFault) GetActiveDirectoryFault() *ActiveDirectoryFault { return b } type BaseActiveDirectoryFault interface { GetActiveDirectoryFault() *ActiveDirectoryFault } func init() { t["BaseActiveDirectoryFault"] = reflect.TypeOf((*ActiveDirectoryFault)(nil)).Elem() } func (b *AlarmAction) GetAlarmAction() *AlarmAction { return b } type BaseAlarmAction interface { GetAlarmAction() *AlarmAction } func init() { t["BaseAlarmAction"] = reflect.TypeOf((*AlarmAction)(nil)).Elem() } func (b *AlarmEvent) GetAlarmEvent() *AlarmEvent { return b } type BaseAlarmEvent interface { GetAlarmEvent() *AlarmEvent } func init() { t["BaseAlarmEvent"] = reflect.TypeOf((*AlarmEvent)(nil)).Elem() } func (b *AlarmExpression) GetAlarmExpression() *AlarmExpression { return b } type BaseAlarmExpression interface { GetAlarmExpression() *AlarmExpression } func init() { t["BaseAlarmExpression"] = reflect.TypeOf((*AlarmExpression)(nil)).Elem() } func (b *AlarmSpec) GetAlarmSpec() *AlarmSpec { return b } type BaseAlarmSpec interface { GetAlarmSpec() *AlarmSpec } func init() { t["BaseAlarmSpec"] = reflect.TypeOf((*AlarmSpec)(nil)).Elem() } func (b *AnswerFileCreateSpec) GetAnswerFileCreateSpec() *AnswerFileCreateSpec { return b } type BaseAnswerFileCreateSpec interface { GetAnswerFileCreateSpec() *AnswerFileCreateSpec } func init() { t["BaseAnswerFileCreateSpec"] = reflect.TypeOf((*AnswerFileCreateSpec)(nil)).Elem() } func (b *ApplyProfile) GetApplyProfile() *ApplyProfile { return b } type BaseApplyProfile interface { GetApplyProfile() *ApplyProfile } func init() { t["BaseApplyProfile"] = reflect.TypeOf((*ApplyProfile)(nil)).Elem() } func (b *ArrayUpdateSpec) GetArrayUpdateSpec() *ArrayUpdateSpec { return b } type BaseArrayUpdateSpec interface { GetArrayUpdateSpec() *ArrayUpdateSpec } func init() { t["BaseArrayUpdateSpec"] = reflect.TypeOf((*ArrayUpdateSpec)(nil)).Elem() } func (b *AuthorizationEvent) GetAuthorizationEvent() *AuthorizationEvent { return b } type BaseAuthorizationEvent interface { GetAuthorizationEvent() *AuthorizationEvent } func init() { t["BaseAuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem() } func (b *BaseConfigInfo) GetBaseConfigInfo() *BaseConfigInfo { return b } type BaseBaseConfigInfo interface { GetBaseConfigInfo() *BaseConfigInfo } func init() { t["BaseBaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem() } func (b *BaseConfigInfoBackingInfo) GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo { return b } type BaseBaseConfigInfoBackingInfo interface { GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo } func init() { t["BaseBaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem() } func (b *BaseConfigInfoFileBackingInfo) GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo { return b } type BaseBaseConfigInfoFileBackingInfo interface { GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo } func init() { t["BaseBaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem() } func (b *CannotAccessNetwork) GetCannotAccessNetwork() *CannotAccessNetwork { return b } type BaseCannotAccessNetwork interface { GetCannotAccessNetwork() *CannotAccessNetwork } func init() { t["BaseCannotAccessNetwork"] = reflect.TypeOf((*CannotAccessNetwork)(nil)).Elem() } func (b *CannotAccessVmComponent) GetCannotAccessVmComponent() *CannotAccessVmComponent { return b } type BaseCannotAccessVmComponent interface { GetCannotAccessVmComponent() *CannotAccessVmComponent } func init() { t["BaseCannotAccessVmComponent"] = reflect.TypeOf((*CannotAccessVmComponent)(nil)).Elem() } func (b *CannotAccessVmDevice) GetCannotAccessVmDevice() *CannotAccessVmDevice { return b } type BaseCannotAccessVmDevice interface { GetCannotAccessVmDevice() *CannotAccessVmDevice } func init() { t["BaseCannotAccessVmDevice"] = reflect.TypeOf((*CannotAccessVmDevice)(nil)).Elem() } func (b *CannotAccessVmDisk) GetCannotAccessVmDisk() *CannotAccessVmDisk { return b } type BaseCannotAccessVmDisk interface { GetCannotAccessVmDisk() *CannotAccessVmDisk } func init() { t["BaseCannotAccessVmDisk"] = reflect.TypeOf((*CannotAccessVmDisk)(nil)).Elem() } func (b *CannotMoveVsanEnabledHost) GetCannotMoveVsanEnabledHost() *CannotMoveVsanEnabledHost { return b } type BaseCannotMoveVsanEnabledHost interface { GetCannotMoveVsanEnabledHost() *CannotMoveVsanEnabledHost } func init() { t["BaseCannotMoveVsanEnabledHost"] = reflect.TypeOf((*CannotMoveVsanEnabledHost)(nil)).Elem() } func (b *ClusterAction) GetClusterAction() *ClusterAction { return b } type BaseClusterAction interface { GetClusterAction() *ClusterAction } func init() { t["BaseClusterAction"] = reflect.TypeOf((*ClusterAction)(nil)).Elem() } func (b *ClusterDasAdmissionControlInfo) GetClusterDasAdmissionControlInfo() *ClusterDasAdmissionControlInfo { return b } type BaseClusterDasAdmissionControlInfo interface { GetClusterDasAdmissionControlInfo() *ClusterDasAdmissionControlInfo } func init() { t["BaseClusterDasAdmissionControlInfo"] = reflect.TypeOf((*ClusterDasAdmissionControlInfo)(nil)).Elem() } func (b *ClusterDasAdmissionControlPolicy) GetClusterDasAdmissionControlPolicy() *ClusterDasAdmissionControlPolicy { return b } type BaseClusterDasAdmissionControlPolicy interface { GetClusterDasAdmissionControlPolicy() *ClusterDasAdmissionControlPolicy } func init() { t["BaseClusterDasAdmissionControlPolicy"] = reflect.TypeOf((*ClusterDasAdmissionControlPolicy)(nil)).Elem() } func (b *ClusterDasAdvancedRuntimeInfo) GetClusterDasAdvancedRuntimeInfo() *ClusterDasAdvancedRuntimeInfo { return b } type BaseClusterDasAdvancedRuntimeInfo interface { GetClusterDasAdvancedRuntimeInfo() *ClusterDasAdvancedRuntimeInfo } func init() { t["BaseClusterDasAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfo)(nil)).Elem() } func (b *ClusterDasData) GetClusterDasData() *ClusterDasData { return b } type BaseClusterDasData interface { GetClusterDasData() *ClusterDasData } func init() { t["BaseClusterDasData"] = reflect.TypeOf((*ClusterDasData)(nil)).Elem() } func (b *ClusterDasHostInfo) GetClusterDasHostInfo() *ClusterDasHostInfo { return b } type BaseClusterDasHostInfo interface { GetClusterDasHostInfo() *ClusterDasHostInfo } func init() { t["BaseClusterDasHostInfo"] = reflect.TypeOf((*ClusterDasHostInfo)(nil)).Elem() } func (b *ClusterDrsFaultsFaultsByVm) GetClusterDrsFaultsFaultsByVm() *ClusterDrsFaultsFaultsByVm { return b } type BaseClusterDrsFaultsFaultsByVm interface { GetClusterDrsFaultsFaultsByVm() *ClusterDrsFaultsFaultsByVm } func init() { t["BaseClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVm)(nil)).Elem() } func (b *ClusterEvent) GetClusterEvent() *ClusterEvent { return b } type BaseClusterEvent interface { GetClusterEvent() *ClusterEvent } func init() { t["BaseClusterEvent"] = reflect.TypeOf((*ClusterEvent)(nil)).Elem() } func (b *ClusterGroupInfo) GetClusterGroupInfo() *ClusterGroupInfo { return b } type BaseClusterGroupInfo interface { GetClusterGroupInfo() *ClusterGroupInfo } func init() { t["BaseClusterGroupInfo"] = reflect.TypeOf((*ClusterGroupInfo)(nil)).Elem() } func (b *ClusterOvercommittedEvent) GetClusterOvercommittedEvent() *ClusterOvercommittedEvent { return b } type BaseClusterOvercommittedEvent interface { GetClusterOvercommittedEvent() *ClusterOvercommittedEvent } func init() { t["BaseClusterOvercommittedEvent"] = reflect.TypeOf((*ClusterOvercommittedEvent)(nil)).Elem() } func (b *ClusterProfileConfigSpec) GetClusterProfileConfigSpec() *ClusterProfileConfigSpec { return b } type BaseClusterProfileConfigSpec interface { GetClusterProfileConfigSpec() *ClusterProfileConfigSpec } func init() { t["BaseClusterProfileConfigSpec"] = reflect.TypeOf((*ClusterProfileConfigSpec)(nil)).Elem() } func (b *ClusterProfileCreateSpec) GetClusterProfileCreateSpec() *ClusterProfileCreateSpec { return b } type BaseClusterProfileCreateSpec interface { GetClusterProfileCreateSpec() *ClusterProfileCreateSpec } func init() { t["BaseClusterProfileCreateSpec"] = reflect.TypeOf((*ClusterProfileCreateSpec)(nil)).Elem() } func (b *ClusterRuleInfo) GetClusterRuleInfo() *ClusterRuleInfo { return b } type BaseClusterRuleInfo interface { GetClusterRuleInfo() *ClusterRuleInfo } func init() { t["BaseClusterRuleInfo"] = reflect.TypeOf((*ClusterRuleInfo)(nil)).Elem() } func (b *ClusterSlotPolicy) GetClusterSlotPolicy() *ClusterSlotPolicy { return b } type BaseClusterSlotPolicy interface { GetClusterSlotPolicy() *ClusterSlotPolicy } func init() { t["BaseClusterSlotPolicy"] = reflect.TypeOf((*ClusterSlotPolicy)(nil)).Elem() } func (b *ClusterStatusChangedEvent) GetClusterStatusChangedEvent() *ClusterStatusChangedEvent { return b } type BaseClusterStatusChangedEvent interface { GetClusterStatusChangedEvent() *ClusterStatusChangedEvent } func init() { t["BaseClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem() } func (b *ComputeResourceConfigInfo) GetComputeResourceConfigInfo() *ComputeResourceConfigInfo { return b } type BaseComputeResourceConfigInfo interface { GetComputeResourceConfigInfo() *ComputeResourceConfigInfo } func init() { t["BaseComputeResourceConfigInfo"] = reflect.TypeOf((*ComputeResourceConfigInfo)(nil)).Elem() } func (b *ComputeResourceConfigSpec) GetComputeResourceConfigSpec() *ComputeResourceConfigSpec { return b } type BaseComputeResourceConfigSpec interface { GetComputeResourceConfigSpec() *ComputeResourceConfigSpec } func init() { t["BaseComputeResourceConfigSpec"] = reflect.TypeOf((*ComputeResourceConfigSpec)(nil)).Elem() } func (b *ComputeResourceSummary) GetComputeResourceSummary() *ComputeResourceSummary { return b } type BaseComputeResourceSummary interface { GetComputeResourceSummary() *ComputeResourceSummary } func init() { t["BaseComputeResourceSummary"] = reflect.TypeOf((*ComputeResourceSummary)(nil)).Elem() } func (b *CpuIncompatible) GetCpuIncompatible() *CpuIncompatible { return b } type BaseCpuIncompatible interface { GetCpuIncompatible() *CpuIncompatible } func init() { t["BaseCpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem() } func (b *CryptoSpec) GetCryptoSpec() *CryptoSpec { return b } type BaseCryptoSpec interface { GetCryptoSpec() *CryptoSpec } func init() { t["BaseCryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem() } func (b *CryptoSpecNoOp) GetCryptoSpecNoOp() *CryptoSpecNoOp { return b } type BaseCryptoSpecNoOp interface { GetCryptoSpecNoOp() *CryptoSpecNoOp } func init() { t["BaseCryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem() } func (b *CustomFieldDefEvent) GetCustomFieldDefEvent() *CustomFieldDefEvent { return b } type BaseCustomFieldDefEvent interface { GetCustomFieldDefEvent() *CustomFieldDefEvent } func init() { t["BaseCustomFieldDefEvent"] = reflect.TypeOf((*CustomFieldDefEvent)(nil)).Elem() } func (b *CustomFieldEvent) GetCustomFieldEvent() *CustomFieldEvent { return b } type BaseCustomFieldEvent interface { GetCustomFieldEvent() *CustomFieldEvent } func init() { t["BaseCustomFieldEvent"] = reflect.TypeOf((*CustomFieldEvent)(nil)).Elem() } func (b *CustomFieldValue) GetCustomFieldValue() *CustomFieldValue { return b } type BaseCustomFieldValue interface { GetCustomFieldValue() *CustomFieldValue } func init() { t["BaseCustomFieldValue"] = reflect.TypeOf((*CustomFieldValue)(nil)).Elem() } func (b *CustomizationEvent) GetCustomizationEvent() *CustomizationEvent { return b } type BaseCustomizationEvent interface { GetCustomizationEvent() *CustomizationEvent } func init() { t["BaseCustomizationEvent"] = reflect.TypeOf((*CustomizationEvent)(nil)).Elem() } func (b *CustomizationFailed) GetCustomizationFailed() *CustomizationFailed { return b } type BaseCustomizationFailed interface { GetCustomizationFailed() *CustomizationFailed } func init() { t["BaseCustomizationFailed"] = reflect.TypeOf((*CustomizationFailed)(nil)).Elem() } func (b *CustomizationFault) GetCustomizationFault() *CustomizationFault { return b } type BaseCustomizationFault interface { GetCustomizationFault() *CustomizationFault } func init() { t["BaseCustomizationFault"] = reflect.TypeOf((*CustomizationFault)(nil)).Elem() } func (b *CustomizationIdentitySettings) GetCustomizationIdentitySettings() *CustomizationIdentitySettings { return b } type BaseCustomizationIdentitySettings interface { GetCustomizationIdentitySettings() *CustomizationIdentitySettings } func init() { t["BaseCustomizationIdentitySettings"] = reflect.TypeOf((*CustomizationIdentitySettings)(nil)).Elem() } func (b *CustomizationIpGenerator) GetCustomizationIpGenerator() *CustomizationIpGenerator { return b } type BaseCustomizationIpGenerator interface { GetCustomizationIpGenerator() *CustomizationIpGenerator } func init() { t["BaseCustomizationIpGenerator"] = reflect.TypeOf((*CustomizationIpGenerator)(nil)).Elem() } func (b *CustomizationIpV6Generator) GetCustomizationIpV6Generator() *CustomizationIpV6Generator { return b } type BaseCustomizationIpV6Generator interface { GetCustomizationIpV6Generator() *CustomizationIpV6Generator } func init() { t["BaseCustomizationIpV6Generator"] = reflect.TypeOf((*CustomizationIpV6Generator)(nil)).Elem() } func (b *CustomizationName) GetCustomizationName() *CustomizationName { return b } type BaseCustomizationName interface { GetCustomizationName() *CustomizationName } func init() { t["BaseCustomizationName"] = reflect.TypeOf((*CustomizationName)(nil)).Elem() } func (b *CustomizationOptions) GetCustomizationOptions() *CustomizationOptions { return b } type BaseCustomizationOptions interface { GetCustomizationOptions() *CustomizationOptions } func init() { t["BaseCustomizationOptions"] = reflect.TypeOf((*CustomizationOptions)(nil)).Elem() } func (b *DVPortSetting) GetDVPortSetting() *DVPortSetting { return b } type BaseDVPortSetting interface { GetDVPortSetting() *DVPortSetting } func init() { t["BaseDVPortSetting"] = reflect.TypeOf((*DVPortSetting)(nil)).Elem() } func (b *DVPortgroupEvent) GetDVPortgroupEvent() *DVPortgroupEvent { return b } type BaseDVPortgroupEvent interface { GetDVPortgroupEvent() *DVPortgroupEvent } func init() { t["BaseDVPortgroupEvent"] = reflect.TypeOf((*DVPortgroupEvent)(nil)).Elem() } func (b *DVPortgroupPolicy) GetDVPortgroupPolicy() *DVPortgroupPolicy { return b } type BaseDVPortgroupPolicy interface { GetDVPortgroupPolicy() *DVPortgroupPolicy } func init() { t["BaseDVPortgroupPolicy"] = reflect.TypeOf((*DVPortgroupPolicy)(nil)).Elem() } func (b *DVSConfigInfo) GetDVSConfigInfo() *DVSConfigInfo { return b } type BaseDVSConfigInfo interface { GetDVSConfigInfo() *DVSConfigInfo } func init() { t["BaseDVSConfigInfo"] = reflect.TypeOf((*DVSConfigInfo)(nil)).Elem() } func (b *DVSConfigSpec) GetDVSConfigSpec() *DVSConfigSpec { return b } type BaseDVSConfigSpec interface { GetDVSConfigSpec() *DVSConfigSpec } func init() { t["BaseDVSConfigSpec"] = reflect.TypeOf((*DVSConfigSpec)(nil)).Elem() } func (b *DVSFeatureCapability) GetDVSFeatureCapability() *DVSFeatureCapability { return b } type BaseDVSFeatureCapability interface { GetDVSFeatureCapability() *DVSFeatureCapability } func init() { t["BaseDVSFeatureCapability"] = reflect.TypeOf((*DVSFeatureCapability)(nil)).Elem() } func (b *DVSHealthCheckCapability) GetDVSHealthCheckCapability() *DVSHealthCheckCapability { return b } type BaseDVSHealthCheckCapability interface { GetDVSHealthCheckCapability() *DVSHealthCheckCapability } func init() { t["BaseDVSHealthCheckCapability"] = reflect.TypeOf((*DVSHealthCheckCapability)(nil)).Elem() } func (b *DVSHealthCheckConfig) GetDVSHealthCheckConfig() *DVSHealthCheckConfig { return b } type BaseDVSHealthCheckConfig interface { GetDVSHealthCheckConfig() *DVSHealthCheckConfig } func init() { t["BaseDVSHealthCheckConfig"] = reflect.TypeOf((*DVSHealthCheckConfig)(nil)).Elem() } func (b *DVSUplinkPortPolicy) GetDVSUplinkPortPolicy() *DVSUplinkPortPolicy { return b } type BaseDVSUplinkPortPolicy interface { GetDVSUplinkPortPolicy() *DVSUplinkPortPolicy } func init() { t["BaseDVSUplinkPortPolicy"] = reflect.TypeOf((*DVSUplinkPortPolicy)(nil)).Elem() } func (b *DailyTaskScheduler) GetDailyTaskScheduler() *DailyTaskScheduler { return b } type BaseDailyTaskScheduler interface { GetDailyTaskScheduler() *DailyTaskScheduler } func init() { t["BaseDailyTaskScheduler"] = reflect.TypeOf((*DailyTaskScheduler)(nil)).Elem() } func (b *DatacenterEvent) GetDatacenterEvent() *DatacenterEvent { return b } type BaseDatacenterEvent interface { GetDatacenterEvent() *DatacenterEvent } func init() { t["BaseDatacenterEvent"] = reflect.TypeOf((*DatacenterEvent)(nil)).Elem() } func (b *DatastoreEvent) GetDatastoreEvent() *DatastoreEvent { return b } type BaseDatastoreEvent interface { GetDatastoreEvent() *DatastoreEvent } func init() { t["BaseDatastoreEvent"] = reflect.TypeOf((*DatastoreEvent)(nil)).Elem() } func (b *DatastoreFileEvent) GetDatastoreFileEvent() *DatastoreFileEvent { return b } type BaseDatastoreFileEvent interface { GetDatastoreFileEvent() *DatastoreFileEvent } func init() { t["BaseDatastoreFileEvent"] = reflect.TypeOf((*DatastoreFileEvent)(nil)).Elem() } func (b *DatastoreInfo) GetDatastoreInfo() *DatastoreInfo { return b } type BaseDatastoreInfo interface { GetDatastoreInfo() *DatastoreInfo } func init() { t["BaseDatastoreInfo"] = reflect.TypeOf((*DatastoreInfo)(nil)).Elem() } func (b *DatastoreNotWritableOnHost) GetDatastoreNotWritableOnHost() *DatastoreNotWritableOnHost { return b } type BaseDatastoreNotWritableOnHost interface { GetDatastoreNotWritableOnHost() *DatastoreNotWritableOnHost } func init() { t["BaseDatastoreNotWritableOnHost"] = reflect.TypeOf((*DatastoreNotWritableOnHost)(nil)).Elem() } func (b *Description) GetDescription() *Description { return b } type BaseDescription interface { GetDescription() *Description } func init() { t["BaseDescription"] = reflect.TypeOf((*Description)(nil)).Elem() } func (b *DeviceBackingNotSupported) GetDeviceBackingNotSupported() *DeviceBackingNotSupported { return b } type BaseDeviceBackingNotSupported interface { GetDeviceBackingNotSupported() *DeviceBackingNotSupported } func init() { t["BaseDeviceBackingNotSupported"] = reflect.TypeOf((*DeviceBackingNotSupported)(nil)).Elem() } func (b *DeviceNotSupported) GetDeviceNotSupported() *DeviceNotSupported { return b } type BaseDeviceNotSupported interface { GetDeviceNotSupported() *DeviceNotSupported } func init() { t["BaseDeviceNotSupported"] = reflect.TypeOf((*DeviceNotSupported)(nil)).Elem() } func (b *DiskNotSupported) GetDiskNotSupported() *DiskNotSupported { return b } type BaseDiskNotSupported interface { GetDiskNotSupported() *DiskNotSupported } func init() { t["BaseDiskNotSupported"] = reflect.TypeOf((*DiskNotSupported)(nil)).Elem() } func (b *DistributedVirtualSwitchHostMemberBacking) GetDistributedVirtualSwitchHostMemberBacking() *DistributedVirtualSwitchHostMemberBacking { return b } type BaseDistributedVirtualSwitchHostMemberBacking interface { GetDistributedVirtualSwitchHostMemberBacking() *DistributedVirtualSwitchHostMemberBacking } func init() { t["BaseDistributedVirtualSwitchHostMemberBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberBacking)(nil)).Elem() } func (b *DistributedVirtualSwitchManagerHostDvsFilterSpec) GetDistributedVirtualSwitchManagerHostDvsFilterSpec() *DistributedVirtualSwitchManagerHostDvsFilterSpec { return b } type BaseDistributedVirtualSwitchManagerHostDvsFilterSpec interface { GetDistributedVirtualSwitchManagerHostDvsFilterSpec() *DistributedVirtualSwitchManagerHostDvsFilterSpec } func init() { t["BaseDistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem() } func (b *DvsEvent) GetDvsEvent() *DvsEvent { return b } type BaseDvsEvent interface { GetDvsEvent() *DvsEvent } func init() { t["BaseDvsEvent"] = reflect.TypeOf((*DvsEvent)(nil)).Elem() } func (b *DvsFault) GetDvsFault() *DvsFault { return b } type BaseDvsFault interface { GetDvsFault() *DvsFault } func init() { t["BaseDvsFault"] = reflect.TypeOf((*DvsFault)(nil)).Elem() } func (b *DvsFilterConfig) GetDvsFilterConfig() *DvsFilterConfig { return b } type BaseDvsFilterConfig interface { GetDvsFilterConfig() *DvsFilterConfig } func init() { t["BaseDvsFilterConfig"] = reflect.TypeOf((*DvsFilterConfig)(nil)).Elem() } func (b *DvsHealthStatusChangeEvent) GetDvsHealthStatusChangeEvent() *DvsHealthStatusChangeEvent { return b } type BaseDvsHealthStatusChangeEvent interface { GetDvsHealthStatusChangeEvent() *DvsHealthStatusChangeEvent } func init() { t["BaseDvsHealthStatusChangeEvent"] = reflect.TypeOf((*DvsHealthStatusChangeEvent)(nil)).Elem() } func (b *DvsIpPort) GetDvsIpPort() *DvsIpPort { return b } type BaseDvsIpPort interface { GetDvsIpPort() *DvsIpPort } func init() { t["BaseDvsIpPort"] = reflect.TypeOf((*DvsIpPort)(nil)).Elem() } func (b *DvsNetworkRuleAction) GetDvsNetworkRuleAction() *DvsNetworkRuleAction { return b } type BaseDvsNetworkRuleAction interface { GetDvsNetworkRuleAction() *DvsNetworkRuleAction } func init() { t["BaseDvsNetworkRuleAction"] = reflect.TypeOf((*DvsNetworkRuleAction)(nil)).Elem() } func (b *DvsNetworkRuleQualifier) GetDvsNetworkRuleQualifier() *DvsNetworkRuleQualifier { return b } type BaseDvsNetworkRuleQualifier interface { GetDvsNetworkRuleQualifier() *DvsNetworkRuleQualifier } func init() { t["BaseDvsNetworkRuleQualifier"] = reflect.TypeOf((*DvsNetworkRuleQualifier)(nil)).Elem() } func (b *DvsTrafficFilterConfig) GetDvsTrafficFilterConfig() *DvsTrafficFilterConfig { return b } type BaseDvsTrafficFilterConfig interface { GetDvsTrafficFilterConfig() *DvsTrafficFilterConfig } func init() { t["BaseDvsTrafficFilterConfig"] = reflect.TypeOf((*DvsTrafficFilterConfig)(nil)).Elem() } func (b *DvsVNicProfile) GetDvsVNicProfile() *DvsVNicProfile { return b } type BaseDvsVNicProfile interface { GetDvsVNicProfile() *DvsVNicProfile } func init() { t["BaseDvsVNicProfile"] = reflect.TypeOf((*DvsVNicProfile)(nil)).Elem() } func (b *DynamicData) GetDynamicData() *DynamicData { return b } type BaseDynamicData interface { GetDynamicData() *DynamicData } func init() { t["BaseDynamicData"] = reflect.TypeOf((*DynamicData)(nil)).Elem() } func (b *EVCAdmissionFailed) GetEVCAdmissionFailed() *EVCAdmissionFailed { return b } type BaseEVCAdmissionFailed interface { GetEVCAdmissionFailed() *EVCAdmissionFailed } func init() { t["BaseEVCAdmissionFailed"] = reflect.TypeOf((*EVCAdmissionFailed)(nil)).Elem() } func (b *EVCConfigFault) GetEVCConfigFault() *EVCConfigFault { return b } type BaseEVCConfigFault interface { GetEVCConfigFault() *EVCConfigFault } func init() { t["BaseEVCConfigFault"] = reflect.TypeOf((*EVCConfigFault)(nil)).Elem() } func (b *ElementDescription) GetElementDescription() *ElementDescription { return b } type BaseElementDescription interface { GetElementDescription() *ElementDescription } func init() { t["BaseElementDescription"] = reflect.TypeOf((*ElementDescription)(nil)).Elem() } func (b *EnteredStandbyModeEvent) GetEnteredStandbyModeEvent() *EnteredStandbyModeEvent { return b } type BaseEnteredStandbyModeEvent interface { GetEnteredStandbyModeEvent() *EnteredStandbyModeEvent } func init() { t["BaseEnteredStandbyModeEvent"] = reflect.TypeOf((*EnteredStandbyModeEvent)(nil)).Elem() } func (b *EnteringStandbyModeEvent) GetEnteringStandbyModeEvent() *EnteringStandbyModeEvent { return b } type BaseEnteringStandbyModeEvent interface { GetEnteringStandbyModeEvent() *EnteringStandbyModeEvent } func init() { t["BaseEnteringStandbyModeEvent"] = reflect.TypeOf((*EnteringStandbyModeEvent)(nil)).Elem() } func (b *EntityEventArgument) GetEntityEventArgument() *EntityEventArgument { return b } type BaseEntityEventArgument interface { GetEntityEventArgument() *EntityEventArgument } func init() { t["BaseEntityEventArgument"] = reflect.TypeOf((*EntityEventArgument)(nil)).Elem() } func (b *Event) GetEvent() *Event { return b } type BaseEvent interface { GetEvent() *Event } func init() { t["BaseEvent"] = reflect.TypeOf((*Event)(nil)).Elem() } func (b *EventArgument) GetEventArgument() *EventArgument { return b } type BaseEventArgument interface { GetEventArgument() *EventArgument } func init() { t["BaseEventArgument"] = reflect.TypeOf((*EventArgument)(nil)).Elem() } func (b *ExitStandbyModeFailedEvent) GetExitStandbyModeFailedEvent() *ExitStandbyModeFailedEvent { return b } type BaseExitStandbyModeFailedEvent interface { GetExitStandbyModeFailedEvent() *ExitStandbyModeFailedEvent } func init() { t["BaseExitStandbyModeFailedEvent"] = reflect.TypeOf((*ExitStandbyModeFailedEvent)(nil)).Elem() } func (b *ExitedStandbyModeEvent) GetExitedStandbyModeEvent() *ExitedStandbyModeEvent { return b } type BaseExitedStandbyModeEvent interface { GetExitedStandbyModeEvent() *ExitedStandbyModeEvent } func init() { t["BaseExitedStandbyModeEvent"] = reflect.TypeOf((*ExitedStandbyModeEvent)(nil)).Elem() } func (b *ExitingStandbyModeEvent) GetExitingStandbyModeEvent() *ExitingStandbyModeEvent { return b } type BaseExitingStandbyModeEvent interface { GetExitingStandbyModeEvent() *ExitingStandbyModeEvent } func init() { t["BaseExitingStandbyModeEvent"] = reflect.TypeOf((*ExitingStandbyModeEvent)(nil)).Elem() } func (b *ExpiredFeatureLicense) GetExpiredFeatureLicense() *ExpiredFeatureLicense { return b } type BaseExpiredFeatureLicense interface { GetExpiredFeatureLicense() *ExpiredFeatureLicense } func init() { t["BaseExpiredFeatureLicense"] = reflect.TypeOf((*ExpiredFeatureLicense)(nil)).Elem() } func (b *FaultToleranceConfigInfo) GetFaultToleranceConfigInfo() *FaultToleranceConfigInfo { return b } type BaseFaultToleranceConfigInfo interface { GetFaultToleranceConfigInfo() *FaultToleranceConfigInfo } func init() { t["BaseFaultToleranceConfigInfo"] = reflect.TypeOf((*FaultToleranceConfigInfo)(nil)).Elem() } func (b *FcoeFault) GetFcoeFault() *FcoeFault { return b } type BaseFcoeFault interface { GetFcoeFault() *FcoeFault } func init() { t["BaseFcoeFault"] = reflect.TypeOf((*FcoeFault)(nil)).Elem() } func (b *FileBackedVirtualDiskSpec) GetFileBackedVirtualDiskSpec() *FileBackedVirtualDiskSpec { return b } type BaseFileBackedVirtualDiskSpec interface { GetFileBackedVirtualDiskSpec() *FileBackedVirtualDiskSpec } func init() { t["BaseFileBackedVirtualDiskSpec"] = reflect.TypeOf((*FileBackedVirtualDiskSpec)(nil)).Elem() } func (b *FileFault) GetFileFault() *FileFault { return b } type BaseFileFault interface { GetFileFault() *FileFault } func init() { t["BaseFileFault"] = reflect.TypeOf((*FileFault)(nil)).Elem() } func (b *FileInfo) GetFileInfo() *FileInfo { return b } type BaseFileInfo interface { GetFileInfo() *FileInfo } func init() { t["BaseFileInfo"] = reflect.TypeOf((*FileInfo)(nil)).Elem() } func (b *FileQuery) GetFileQuery() *FileQuery { return b } type BaseFileQuery interface { GetFileQuery() *FileQuery } func init() { t["BaseFileQuery"] = reflect.TypeOf((*FileQuery)(nil)).Elem() } func (b *GatewayConnectFault) GetGatewayConnectFault() *GatewayConnectFault { return b } type BaseGatewayConnectFault interface { GetGatewayConnectFault() *GatewayConnectFault } func init() { t["BaseGatewayConnectFault"] = reflect.TypeOf((*GatewayConnectFault)(nil)).Elem() } func (b *GatewayToHostConnectFault) GetGatewayToHostConnectFault() *GatewayToHostConnectFault { return b } type BaseGatewayToHostConnectFault interface { GetGatewayToHostConnectFault() *GatewayToHostConnectFault } func init() { t["BaseGatewayToHostConnectFault"] = reflect.TypeOf((*GatewayToHostConnectFault)(nil)).Elem() } func (b *GeneralEvent) GetGeneralEvent() *GeneralEvent { return b } type BaseGeneralEvent interface { GetGeneralEvent() *GeneralEvent } func init() { t["BaseGeneralEvent"] = reflect.TypeOf((*GeneralEvent)(nil)).Elem() } func (b *GuestAuthSubject) GetGuestAuthSubject() *GuestAuthSubject { return b } type BaseGuestAuthSubject interface { GetGuestAuthSubject() *GuestAuthSubject } func init() { t["BaseGuestAuthSubject"] = reflect.TypeOf((*GuestAuthSubject)(nil)).Elem() } func (b *GuestAuthentication) GetGuestAuthentication() *GuestAuthentication { return b } type BaseGuestAuthentication interface { GetGuestAuthentication() *GuestAuthentication } func init() { t["BaseGuestAuthentication"] = reflect.TypeOf((*GuestAuthentication)(nil)).Elem() } func (b *GuestFileAttributes) GetGuestFileAttributes() *GuestFileAttributes { return b } type BaseGuestFileAttributes interface { GetGuestFileAttributes() *GuestFileAttributes } func init() { t["BaseGuestFileAttributes"] = reflect.TypeOf((*GuestFileAttributes)(nil)).Elem() } func (b *GuestOperationsFault) GetGuestOperationsFault() *GuestOperationsFault { return b } type BaseGuestOperationsFault interface { GetGuestOperationsFault() *GuestOperationsFault } func init() { t["BaseGuestOperationsFault"] = reflect.TypeOf((*GuestOperationsFault)(nil)).Elem() } func (b *GuestProgramSpec) GetGuestProgramSpec() *GuestProgramSpec { return b } type BaseGuestProgramSpec interface { GetGuestProgramSpec() *GuestProgramSpec } func init() { t["BaseGuestProgramSpec"] = reflect.TypeOf((*GuestProgramSpec)(nil)).Elem() } func (b *GuestRegValueDataSpec) GetGuestRegValueDataSpec() *GuestRegValueDataSpec { return b } type BaseGuestRegValueDataSpec interface { GetGuestRegValueDataSpec() *GuestRegValueDataSpec } func init() { t["BaseGuestRegValueDataSpec"] = reflect.TypeOf((*GuestRegValueDataSpec)(nil)).Elem() } func (b *GuestRegistryFault) GetGuestRegistryFault() *GuestRegistryFault { return b } type BaseGuestRegistryFault interface { GetGuestRegistryFault() *GuestRegistryFault } func init() { t["BaseGuestRegistryFault"] = reflect.TypeOf((*GuestRegistryFault)(nil)).Elem() } func (b *GuestRegistryKeyFault) GetGuestRegistryKeyFault() *GuestRegistryKeyFault { return b } type BaseGuestRegistryKeyFault interface { GetGuestRegistryKeyFault() *GuestRegistryKeyFault } func init() { t["BaseGuestRegistryKeyFault"] = reflect.TypeOf((*GuestRegistryKeyFault)(nil)).Elem() } func (b *GuestRegistryValueFault) GetGuestRegistryValueFault() *GuestRegistryValueFault { return b } type BaseGuestRegistryValueFault interface { GetGuestRegistryValueFault() *GuestRegistryValueFault } func init() { t["BaseGuestRegistryValueFault"] = reflect.TypeOf((*GuestRegistryValueFault)(nil)).Elem() } func (b *HostAccountSpec) GetHostAccountSpec() *HostAccountSpec { return b } type BaseHostAccountSpec interface { GetHostAccountSpec() *HostAccountSpec } func init() { t["BaseHostAccountSpec"] = reflect.TypeOf((*HostAccountSpec)(nil)).Elem() } func (b *HostAuthenticationStoreInfo) GetHostAuthenticationStoreInfo() *HostAuthenticationStoreInfo { return b } type BaseHostAuthenticationStoreInfo interface { GetHostAuthenticationStoreInfo() *HostAuthenticationStoreInfo } func init() { t["BaseHostAuthenticationStoreInfo"] = reflect.TypeOf((*HostAuthenticationStoreInfo)(nil)).Elem() } func (b *HostCommunication) GetHostCommunication() *HostCommunication { return b } type BaseHostCommunication interface { GetHostCommunication() *HostCommunication } func init() { t["BaseHostCommunication"] = reflect.TypeOf((*HostCommunication)(nil)).Elem() } func (b *HostConfigFault) GetHostConfigFault() *HostConfigFault { return b } type BaseHostConfigFault interface { GetHostConfigFault() *HostConfigFault } func init() { t["BaseHostConfigFault"] = reflect.TypeOf((*HostConfigFault)(nil)).Elem() } func (b *HostConnectFault) GetHostConnectFault() *HostConnectFault { return b } type BaseHostConnectFault interface { GetHostConnectFault() *HostConnectFault } func init() { t["BaseHostConnectFault"] = reflect.TypeOf((*HostConnectFault)(nil)).Elem() } func (b *HostConnectInfoNetworkInfo) GetHostConnectInfoNetworkInfo() *HostConnectInfoNetworkInfo { return b } type BaseHostConnectInfoNetworkInfo interface { GetHostConnectInfoNetworkInfo() *HostConnectInfoNetworkInfo } func init() { t["BaseHostConnectInfoNetworkInfo"] = reflect.TypeOf((*HostConnectInfoNetworkInfo)(nil)).Elem() } func (b *HostDasEvent) GetHostDasEvent() *HostDasEvent { return b } type BaseHostDasEvent interface { GetHostDasEvent() *HostDasEvent } func init() { t["BaseHostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem() } func (b *HostDatastoreConnectInfo) GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo { return b } type BaseHostDatastoreConnectInfo interface { GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo } func init() { t["BaseHostDatastoreConnectInfo"] = reflect.TypeOf((*HostDatastoreConnectInfo)(nil)).Elem() } func (b *HostDevice) GetHostDevice() *HostDevice { return b } type BaseHostDevice interface { GetHostDevice() *HostDevice } func init() { t["BaseHostDevice"] = reflect.TypeOf((*HostDevice)(nil)).Elem() } func (b *HostDigestInfo) GetHostDigestInfo() *HostDigestInfo { return b } type BaseHostDigestInfo interface { GetHostDigestInfo() *HostDigestInfo } func init() { t["BaseHostDigestInfo"] = reflect.TypeOf((*HostDigestInfo)(nil)).Elem() } func (b *HostDirectoryStoreInfo) GetHostDirectoryStoreInfo() *HostDirectoryStoreInfo { return b } type BaseHostDirectoryStoreInfo interface { GetHostDirectoryStoreInfo() *HostDirectoryStoreInfo } func init() { t["BaseHostDirectoryStoreInfo"] = reflect.TypeOf((*HostDirectoryStoreInfo)(nil)).Elem() } func (b *HostDnsConfig) GetHostDnsConfig() *HostDnsConfig { return b } type BaseHostDnsConfig interface { GetHostDnsConfig() *HostDnsConfig } func init() { t["BaseHostDnsConfig"] = reflect.TypeOf((*HostDnsConfig)(nil)).Elem() } func (b *HostEvent) GetHostEvent() *HostEvent { return b } type BaseHostEvent interface { GetHostEvent() *HostEvent } func init() { t["BaseHostEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem() } func (b *HostFibreChannelHba) GetHostFibreChannelHba() *HostFibreChannelHba { return b } type BaseHostFibreChannelHba interface { GetHostFibreChannelHba() *HostFibreChannelHba } func init() { t["BaseHostFibreChannelHba"] = reflect.TypeOf((*HostFibreChannelHba)(nil)).Elem() } func (b *HostFibreChannelTargetTransport) GetHostFibreChannelTargetTransport() *HostFibreChannelTargetTransport { return b } type BaseHostFibreChannelTargetTransport interface { GetHostFibreChannelTargetTransport() *HostFibreChannelTargetTransport } func init() { t["BaseHostFibreChannelTargetTransport"] = reflect.TypeOf((*HostFibreChannelTargetTransport)(nil)).Elem() } func (b *HostFileSystemVolume) GetHostFileSystemVolume() *HostFileSystemVolume { return b } type BaseHostFileSystemVolume interface { GetHostFileSystemVolume() *HostFileSystemVolume } func init() { t["BaseHostFileSystemVolume"] = reflect.TypeOf((*HostFileSystemVolume)(nil)).Elem() } func (b *HostHardwareElementInfo) GetHostHardwareElementInfo() *HostHardwareElementInfo { return b } type BaseHostHardwareElementInfo interface { GetHostHardwareElementInfo() *HostHardwareElementInfo } func init() { t["BaseHostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem() } func (b *HostHostBusAdapter) GetHostHostBusAdapter() *HostHostBusAdapter { return b } type BaseHostHostBusAdapter interface { GetHostHostBusAdapter() *HostHostBusAdapter } func init() { t["BaseHostHostBusAdapter"] = reflect.TypeOf((*HostHostBusAdapter)(nil)).Elem() } func (b *HostIpRouteConfig) GetHostIpRouteConfig() *HostIpRouteConfig { return b } type BaseHostIpRouteConfig interface { GetHostIpRouteConfig() *HostIpRouteConfig } func init() { t["BaseHostIpRouteConfig"] = reflect.TypeOf((*HostIpRouteConfig)(nil)).Elem() } func (b *HostMemberHealthCheckResult) GetHostMemberHealthCheckResult() *HostMemberHealthCheckResult { return b } type BaseHostMemberHealthCheckResult interface { GetHostMemberHealthCheckResult() *HostMemberHealthCheckResult } func init() { t["BaseHostMemberHealthCheckResult"] = reflect.TypeOf((*HostMemberHealthCheckResult)(nil)).Elem() } func (b *HostMemberUplinkHealthCheckResult) GetHostMemberUplinkHealthCheckResult() *HostMemberUplinkHealthCheckResult { return b } type BaseHostMemberUplinkHealthCheckResult interface { GetHostMemberUplinkHealthCheckResult() *HostMemberUplinkHealthCheckResult } func init() { t["BaseHostMemberUplinkHealthCheckResult"] = reflect.TypeOf((*HostMemberUplinkHealthCheckResult)(nil)).Elem() } func (b *HostMultipathInfoLogicalUnitPolicy) GetHostMultipathInfoLogicalUnitPolicy() *HostMultipathInfoLogicalUnitPolicy { return b } type BaseHostMultipathInfoLogicalUnitPolicy interface { GetHostMultipathInfoLogicalUnitPolicy() *HostMultipathInfoLogicalUnitPolicy } func init() { t["BaseHostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem() } func (b *HostPciPassthruConfig) GetHostPciPassthruConfig() *HostPciPassthruConfig { return b } type BaseHostPciPassthruConfig interface { GetHostPciPassthruConfig() *HostPciPassthruConfig } func init() { t["BaseHostPciPassthruConfig"] = reflect.TypeOf((*HostPciPassthruConfig)(nil)).Elem() } func (b *HostPciPassthruInfo) GetHostPciPassthruInfo() *HostPciPassthruInfo { return b } type BaseHostPciPassthruInfo interface { GetHostPciPassthruInfo() *HostPciPassthruInfo } func init() { t["BaseHostPciPassthruInfo"] = reflect.TypeOf((*HostPciPassthruInfo)(nil)).Elem() } func (b *HostPowerOpFailed) GetHostPowerOpFailed() *HostPowerOpFailed { return b } type BaseHostPowerOpFailed interface { GetHostPowerOpFailed() *HostPowerOpFailed } func init() { t["BaseHostPowerOpFailed"] = reflect.TypeOf((*HostPowerOpFailed)(nil)).Elem() } func (b *HostProfileConfigSpec) GetHostProfileConfigSpec() *HostProfileConfigSpec { return b } type BaseHostProfileConfigSpec interface { GetHostProfileConfigSpec() *HostProfileConfigSpec } func init() { t["BaseHostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem() } func (b *HostProfilesEntityCustomizations) GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations { return b } type BaseHostProfilesEntityCustomizations interface { GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations } func init() { t["BaseHostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem() } func (b *HostSriovDevicePoolInfo) GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo { return b } type BaseHostSriovDevicePoolInfo interface { GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo } func init() { t["BaseHostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem() } func (b *HostSystemSwapConfigurationSystemSwapOption) GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption { return b } type BaseHostSystemSwapConfigurationSystemSwapOption interface { GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption } func init() { t["BaseHostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationSystemSwapOption)(nil)).Elem() } func (b *HostTargetTransport) GetHostTargetTransport() *HostTargetTransport { return b } type BaseHostTargetTransport interface { GetHostTargetTransport() *HostTargetTransport } func init() { t["BaseHostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem() } func (b *HostTpmEventDetails) GetHostTpmEventDetails() *HostTpmEventDetails { return b } type BaseHostTpmEventDetails interface { GetHostTpmEventDetails() *HostTpmEventDetails } func init() { t["BaseHostTpmEventDetails"] = reflect.TypeOf((*HostTpmEventDetails)(nil)).Elem() } func (b *HostVirtualSwitchBridge) GetHostVirtualSwitchBridge() *HostVirtualSwitchBridge { return b } type BaseHostVirtualSwitchBridge interface { GetHostVirtualSwitchBridge() *HostVirtualSwitchBridge } func init() { t["BaseHostVirtualSwitchBridge"] = reflect.TypeOf((*HostVirtualSwitchBridge)(nil)).Elem() } func (b *HourlyTaskScheduler) GetHourlyTaskScheduler() *HourlyTaskScheduler { return b } type BaseHourlyTaskScheduler interface { GetHourlyTaskScheduler() *HourlyTaskScheduler } func init() { t["BaseHourlyTaskScheduler"] = reflect.TypeOf((*HourlyTaskScheduler)(nil)).Elem() } func (b *ImportSpec) GetImportSpec() *ImportSpec { return b } type BaseImportSpec interface { GetImportSpec() *ImportSpec } func init() { t["BaseImportSpec"] = reflect.TypeOf((*ImportSpec)(nil)).Elem() } func (b *InaccessibleDatastore) GetInaccessibleDatastore() *InaccessibleDatastore { return b } type BaseInaccessibleDatastore interface { GetInaccessibleDatastore() *InaccessibleDatastore } func init() { t["BaseInaccessibleDatastore"] = reflect.TypeOf((*InaccessibleDatastore)(nil)).Elem() } func (b *InheritablePolicy) GetInheritablePolicy() *InheritablePolicy { return b } type BaseInheritablePolicy interface { GetInheritablePolicy() *InheritablePolicy } func init() { t["BaseInheritablePolicy"] = reflect.TypeOf((*InheritablePolicy)(nil)).Elem() } func (b *InsufficientHostCapacityFault) GetInsufficientHostCapacityFault() *InsufficientHostCapacityFault { return b } type BaseInsufficientHostCapacityFault interface { GetInsufficientHostCapacityFault() *InsufficientHostCapacityFault } func init() { t["BaseInsufficientHostCapacityFault"] = reflect.TypeOf((*InsufficientHostCapacityFault)(nil)).Elem() } func (b *InsufficientResourcesFault) GetInsufficientResourcesFault() *InsufficientResourcesFault { return b } type BaseInsufficientResourcesFault interface { GetInsufficientResourcesFault() *InsufficientResourcesFault } func init() { t["BaseInsufficientResourcesFault"] = reflect.TypeOf((*InsufficientResourcesFault)(nil)).Elem() } func (b *InsufficientStandbyResource) GetInsufficientStandbyResource() *InsufficientStandbyResource { return b } type BaseInsufficientStandbyResource interface { GetInsufficientStandbyResource() *InsufficientStandbyResource } func init() { t["BaseInsufficientStandbyResource"] = reflect.TypeOf((*InsufficientStandbyResource)(nil)).Elem() } func (b *InvalidArgument) GetInvalidArgument() *InvalidArgument { return b } type BaseInvalidArgument interface { GetInvalidArgument() *InvalidArgument } func init() { t["BaseInvalidArgument"] = reflect.TypeOf((*InvalidArgument)(nil)).Elem() } func (b *InvalidCAMServer) GetInvalidCAMServer() *InvalidCAMServer { return b } type BaseInvalidCAMServer interface { GetInvalidCAMServer() *InvalidCAMServer } func init() { t["BaseInvalidCAMServer"] = reflect.TypeOf((*InvalidCAMServer)(nil)).Elem() } func (b *InvalidDatastore) GetInvalidDatastore() *InvalidDatastore { return b } type BaseInvalidDatastore interface { GetInvalidDatastore() *InvalidDatastore } func init() { t["BaseInvalidDatastore"] = reflect.TypeOf((*InvalidDatastore)(nil)).Elem() } func (b *InvalidDeviceSpec) GetInvalidDeviceSpec() *InvalidDeviceSpec { return b } type BaseInvalidDeviceSpec interface { GetInvalidDeviceSpec() *InvalidDeviceSpec } func init() { t["BaseInvalidDeviceSpec"] = reflect.TypeOf((*InvalidDeviceSpec)(nil)).Elem() } func (b *InvalidFolder) GetInvalidFolder() *InvalidFolder { return b } type BaseInvalidFolder interface { GetInvalidFolder() *InvalidFolder } func init() { t["BaseInvalidFolder"] = reflect.TypeOf((*InvalidFolder)(nil)).Elem() } func (b *InvalidFormat) GetInvalidFormat() *InvalidFormat { return b } type BaseInvalidFormat interface { GetInvalidFormat() *InvalidFormat } func init() { t["BaseInvalidFormat"] = reflect.TypeOf((*InvalidFormat)(nil)).Elem() } func (b *InvalidHostState) GetInvalidHostState() *InvalidHostState { return b } type BaseInvalidHostState interface { GetInvalidHostState() *InvalidHostState } func init() { t["BaseInvalidHostState"] = reflect.TypeOf((*InvalidHostState)(nil)).Elem() } func (b *InvalidLogin) GetInvalidLogin() *InvalidLogin { return b } type BaseInvalidLogin interface { GetInvalidLogin() *InvalidLogin } func init() { t["BaseInvalidLogin"] = reflect.TypeOf((*InvalidLogin)(nil)).Elem() } func (b *InvalidPropertyValue) GetInvalidPropertyValue() *InvalidPropertyValue { return b } type BaseInvalidPropertyValue interface { GetInvalidPropertyValue() *InvalidPropertyValue } func init() { t["BaseInvalidPropertyValue"] = reflect.TypeOf((*InvalidPropertyValue)(nil)).Elem() } func (b *InvalidRequest) GetInvalidRequest() *InvalidRequest { return b } type BaseInvalidRequest interface { GetInvalidRequest() *InvalidRequest } func init() { t["BaseInvalidRequest"] = reflect.TypeOf((*InvalidRequest)(nil)).Elem() } func (b *InvalidState) GetInvalidState() *InvalidState { return b } type BaseInvalidState interface { GetInvalidState() *InvalidState } func init() { t["BaseInvalidState"] = reflect.TypeOf((*InvalidState)(nil)).Elem() } func (b *InvalidVmConfig) GetInvalidVmConfig() *InvalidVmConfig { return b } type BaseInvalidVmConfig interface { GetInvalidVmConfig() *InvalidVmConfig } func init() { t["BaseInvalidVmConfig"] = reflect.TypeOf((*InvalidVmConfig)(nil)).Elem() } func (b *IoFilterInfo) GetIoFilterInfo() *IoFilterInfo { return b } type BaseIoFilterInfo interface { GetIoFilterInfo() *IoFilterInfo } func init() { t["BaseIoFilterInfo"] = reflect.TypeOf((*IoFilterInfo)(nil)).Elem() } func (b *IpAddress) GetIpAddress() *IpAddress { return b } type BaseIpAddress interface { GetIpAddress() *IpAddress } func init() { t["BaseIpAddress"] = reflect.TypeOf((*IpAddress)(nil)).Elem() } func (b *IscsiFault) GetIscsiFault() *IscsiFault { return b } type BaseIscsiFault interface { GetIscsiFault() *IscsiFault } func init() { t["BaseIscsiFault"] = reflect.TypeOf((*IscsiFault)(nil)).Elem() } func (b *LicenseEvent) GetLicenseEvent() *LicenseEvent { return b } type BaseLicenseEvent interface { GetLicenseEvent() *LicenseEvent } func init() { t["BaseLicenseEvent"] = reflect.TypeOf((*LicenseEvent)(nil)).Elem() } func (b *LicenseSource) GetLicenseSource() *LicenseSource { return b } type BaseLicenseSource interface { GetLicenseSource() *LicenseSource } func init() { t["BaseLicenseSource"] = reflect.TypeOf((*LicenseSource)(nil)).Elem() } func (b *MacAddress) GetMacAddress() *MacAddress { return b } type BaseMacAddress interface { GetMacAddress() *MacAddress } func init() { t["BaseMacAddress"] = reflect.TypeOf((*MacAddress)(nil)).Elem() } func (b *MethodFault) GetMethodFault() *MethodFault { return b } type BaseMethodFault interface { GetMethodFault() *MethodFault } func init() { t["BaseMethodFault"] = reflect.TypeOf((*MethodFault)(nil)).Elem() } func (b *MigrationEvent) GetMigrationEvent() *MigrationEvent { return b } type BaseMigrationEvent interface { GetMigrationEvent() *MigrationEvent } func init() { t["BaseMigrationEvent"] = reflect.TypeOf((*MigrationEvent)(nil)).Elem() } func (b *MigrationFault) GetMigrationFault() *MigrationFault { return b } type BaseMigrationFault interface { GetMigrationFault() *MigrationFault } func init() { t["BaseMigrationFault"] = reflect.TypeOf((*MigrationFault)(nil)).Elem() } func (b *MigrationFeatureNotSupported) GetMigrationFeatureNotSupported() *MigrationFeatureNotSupported { return b } type BaseMigrationFeatureNotSupported interface { GetMigrationFeatureNotSupported() *MigrationFeatureNotSupported } func init() { t["BaseMigrationFeatureNotSupported"] = reflect.TypeOf((*MigrationFeatureNotSupported)(nil)).Elem() } func (b *MonthlyTaskScheduler) GetMonthlyTaskScheduler() *MonthlyTaskScheduler { return b } type BaseMonthlyTaskScheduler interface { GetMonthlyTaskScheduler() *MonthlyTaskScheduler } func init() { t["BaseMonthlyTaskScheduler"] = reflect.TypeOf((*MonthlyTaskScheduler)(nil)).Elem() } func (b *NasConfigFault) GetNasConfigFault() *NasConfigFault { return b } type BaseNasConfigFault interface { GetNasConfigFault() *NasConfigFault } func init() { t["BaseNasConfigFault"] = reflect.TypeOf((*NasConfigFault)(nil)).Elem() } func (b *NegatableExpression) GetNegatableExpression() *NegatableExpression { return b } type BaseNegatableExpression interface { GetNegatableExpression() *NegatableExpression } func init() { t["BaseNegatableExpression"] = reflect.TypeOf((*NegatableExpression)(nil)).Elem() } func (b *NetBIOSConfigInfo) GetNetBIOSConfigInfo() *NetBIOSConfigInfo { return b } type BaseNetBIOSConfigInfo interface { GetNetBIOSConfigInfo() *NetBIOSConfigInfo } func init() { t["BaseNetBIOSConfigInfo"] = reflect.TypeOf((*NetBIOSConfigInfo)(nil)).Elem() } func (b *NetworkSummary) GetNetworkSummary() *NetworkSummary { return b } type BaseNetworkSummary interface { GetNetworkSummary() *NetworkSummary } func init() { t["BaseNetworkSummary"] = reflect.TypeOf((*NetworkSummary)(nil)).Elem() } func (b *NoCompatibleHost) GetNoCompatibleHost() *NoCompatibleHost { return b } type BaseNoCompatibleHost interface { GetNoCompatibleHost() *NoCompatibleHost } func init() { t["BaseNoCompatibleHost"] = reflect.TypeOf((*NoCompatibleHost)(nil)).Elem() } func (b *NoPermission) GetNoPermission() *NoPermission { return b } type BaseNoPermission interface { GetNoPermission() *NoPermission } func init() { t["BaseNoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem() } func (b *NodeDeploymentSpec) GetNodeDeploymentSpec() *NodeDeploymentSpec { return b } type BaseNodeDeploymentSpec interface { GetNodeDeploymentSpec() *NodeDeploymentSpec } func init() { t["BaseNodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem() } func (b *NodeNetworkSpec) GetNodeNetworkSpec() *NodeNetworkSpec { return b } type BaseNodeNetworkSpec interface { GetNodeNetworkSpec() *NodeNetworkSpec } func init() { t["BaseNodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem() } func (b *NotEnoughCpus) GetNotEnoughCpus() *NotEnoughCpus { return b } type BaseNotEnoughCpus interface { GetNotEnoughCpus() *NotEnoughCpus } func init() { t["BaseNotEnoughCpus"] = reflect.TypeOf((*NotEnoughCpus)(nil)).Elem() } func (b *NotEnoughLicenses) GetNotEnoughLicenses() *NotEnoughLicenses { return b } type BaseNotEnoughLicenses interface { GetNotEnoughLicenses() *NotEnoughLicenses } func init() { t["BaseNotEnoughLicenses"] = reflect.TypeOf((*NotEnoughLicenses)(nil)).Elem() } func (b *NotSupported) GetNotSupported() *NotSupported { return b } type BaseNotSupported interface { GetNotSupported() *NotSupported } func init() { t["BaseNotSupported"] = reflect.TypeOf((*NotSupported)(nil)).Elem() } func (b *NotSupportedHost) GetNotSupportedHost() *NotSupportedHost { return b } type BaseNotSupportedHost interface { GetNotSupportedHost() *NotSupportedHost } func init() { t["BaseNotSupportedHost"] = reflect.TypeOf((*NotSupportedHost)(nil)).Elem() } func (b *NotSupportedHostInCluster) GetNotSupportedHostInCluster() *NotSupportedHostInCluster { return b } type BaseNotSupportedHostInCluster interface { GetNotSupportedHostInCluster() *NotSupportedHostInCluster } func init() { t["BaseNotSupportedHostInCluster"] = reflect.TypeOf((*NotSupportedHostInCluster)(nil)).Elem() } func (b *OptionType) GetOptionType() *OptionType { return b } type BaseOptionType interface { GetOptionType() *OptionType } func init() { t["BaseOptionType"] = reflect.TypeOf((*OptionType)(nil)).Elem() } func (b *OptionValue) GetOptionValue() *OptionValue { return b } type BaseOptionValue interface { GetOptionValue() *OptionValue } func init() { t["BaseOptionValue"] = reflect.TypeOf((*OptionValue)(nil)).Elem() } func (b *OvfAttribute) GetOvfAttribute() *OvfAttribute { return b } type BaseOvfAttribute interface { GetOvfAttribute() *OvfAttribute } func init() { t["BaseOvfAttribute"] = reflect.TypeOf((*OvfAttribute)(nil)).Elem() } func (b *OvfConnectedDevice) GetOvfConnectedDevice() *OvfConnectedDevice { return b } type BaseOvfConnectedDevice interface { GetOvfConnectedDevice() *OvfConnectedDevice } func init() { t["BaseOvfConnectedDevice"] = reflect.TypeOf((*OvfConnectedDevice)(nil)).Elem() } func (b *OvfConstraint) GetOvfConstraint() *OvfConstraint { return b } type BaseOvfConstraint interface { GetOvfConstraint() *OvfConstraint } func init() { t["BaseOvfConstraint"] = reflect.TypeOf((*OvfConstraint)(nil)).Elem() } func (b *OvfConsumerCallbackFault) GetOvfConsumerCallbackFault() *OvfConsumerCallbackFault { return b } type BaseOvfConsumerCallbackFault interface { GetOvfConsumerCallbackFault() *OvfConsumerCallbackFault } func init() { t["BaseOvfConsumerCallbackFault"] = reflect.TypeOf((*OvfConsumerCallbackFault)(nil)).Elem() } func (b *OvfElement) GetOvfElement() *OvfElement { return b } type BaseOvfElement interface { GetOvfElement() *OvfElement } func init() { t["BaseOvfElement"] = reflect.TypeOf((*OvfElement)(nil)).Elem() } func (b *OvfExport) GetOvfExport() *OvfExport { return b } type BaseOvfExport interface { GetOvfExport() *OvfExport } func init() { t["BaseOvfExport"] = reflect.TypeOf((*OvfExport)(nil)).Elem() } func (b *OvfFault) GetOvfFault() *OvfFault { return b } type BaseOvfFault interface { GetOvfFault() *OvfFault } func init() { t["BaseOvfFault"] = reflect.TypeOf((*OvfFault)(nil)).Elem() } func (b *OvfHardwareExport) GetOvfHardwareExport() *OvfHardwareExport { return b } type BaseOvfHardwareExport interface { GetOvfHardwareExport() *OvfHardwareExport } func init() { t["BaseOvfHardwareExport"] = reflect.TypeOf((*OvfHardwareExport)(nil)).Elem() } func (b *OvfImport) GetOvfImport() *OvfImport { return b } type BaseOvfImport interface { GetOvfImport() *OvfImport } func init() { t["BaseOvfImport"] = reflect.TypeOf((*OvfImport)(nil)).Elem() } func (b *OvfInvalidPackage) GetOvfInvalidPackage() *OvfInvalidPackage { return b } type BaseOvfInvalidPackage interface { GetOvfInvalidPackage() *OvfInvalidPackage } func init() { t["BaseOvfInvalidPackage"] = reflect.TypeOf((*OvfInvalidPackage)(nil)).Elem() } func (b *OvfInvalidValue) GetOvfInvalidValue() *OvfInvalidValue { return b } type BaseOvfInvalidValue interface { GetOvfInvalidValue() *OvfInvalidValue } func init() { t["BaseOvfInvalidValue"] = reflect.TypeOf((*OvfInvalidValue)(nil)).Elem() } func (b *OvfManagerCommonParams) GetOvfManagerCommonParams() *OvfManagerCommonParams { return b } type BaseOvfManagerCommonParams interface { GetOvfManagerCommonParams() *OvfManagerCommonParams } func init() { t["BaseOvfManagerCommonParams"] = reflect.TypeOf((*OvfManagerCommonParams)(nil)).Elem() } func (b *OvfMissingElement) GetOvfMissingElement() *OvfMissingElement { return b } type BaseOvfMissingElement interface { GetOvfMissingElement() *OvfMissingElement } func init() { t["BaseOvfMissingElement"] = reflect.TypeOf((*OvfMissingElement)(nil)).Elem() } func (b *OvfProperty) GetOvfProperty() *OvfProperty { return b } type BaseOvfProperty interface { GetOvfProperty() *OvfProperty } func init() { t["BaseOvfProperty"] = reflect.TypeOf((*OvfProperty)(nil)).Elem() } func (b *OvfSystemFault) GetOvfSystemFault() *OvfSystemFault { return b } type BaseOvfSystemFault interface { GetOvfSystemFault() *OvfSystemFault } func init() { t["BaseOvfSystemFault"] = reflect.TypeOf((*OvfSystemFault)(nil)).Elem() } func (b *OvfUnsupportedAttribute) GetOvfUnsupportedAttribute() *OvfUnsupportedAttribute { return b } type BaseOvfUnsupportedAttribute interface { GetOvfUnsupportedAttribute() *OvfUnsupportedAttribute } func init() { t["BaseOvfUnsupportedAttribute"] = reflect.TypeOf((*OvfUnsupportedAttribute)(nil)).Elem() } func (b *OvfUnsupportedElement) GetOvfUnsupportedElement() *OvfUnsupportedElement { return b } type BaseOvfUnsupportedElement interface { GetOvfUnsupportedElement() *OvfUnsupportedElement } func init() { t["BaseOvfUnsupportedElement"] = reflect.TypeOf((*OvfUnsupportedElement)(nil)).Elem() } func (b *OvfUnsupportedPackage) GetOvfUnsupportedPackage() *OvfUnsupportedPackage { return b } type BaseOvfUnsupportedPackage interface { GetOvfUnsupportedPackage() *OvfUnsupportedPackage } func init() { t["BaseOvfUnsupportedPackage"] = reflect.TypeOf((*OvfUnsupportedPackage)(nil)).Elem() } func (b *PatchMetadataInvalid) GetPatchMetadataInvalid() *PatchMetadataInvalid { return b } type BasePatchMetadataInvalid interface { GetPatchMetadataInvalid() *PatchMetadataInvalid } func init() { t["BasePatchMetadataInvalid"] = reflect.TypeOf((*PatchMetadataInvalid)(nil)).Elem() } func (b *PatchNotApplicable) GetPatchNotApplicable() *PatchNotApplicable { return b } type BasePatchNotApplicable interface { GetPatchNotApplicable() *PatchNotApplicable } func init() { t["BasePatchNotApplicable"] = reflect.TypeOf((*PatchNotApplicable)(nil)).Elem() } func (b *PerfEntityMetricBase) GetPerfEntityMetricBase() *PerfEntityMetricBase { return b } type BasePerfEntityMetricBase interface { GetPerfEntityMetricBase() *PerfEntityMetricBase } func init() { t["BasePerfEntityMetricBase"] = reflect.TypeOf((*PerfEntityMetricBase)(nil)).Elem() } func (b *PerfMetricSeries) GetPerfMetricSeries() *PerfMetricSeries { return b } type BasePerfMetricSeries interface { GetPerfMetricSeries() *PerfMetricSeries } func init() { t["BasePerfMetricSeries"] = reflect.TypeOf((*PerfMetricSeries)(nil)).Elem() } func (b *PermissionEvent) GetPermissionEvent() *PermissionEvent { return b } type BasePermissionEvent interface { GetPermissionEvent() *PermissionEvent } func init() { t["BasePermissionEvent"] = reflect.TypeOf((*PermissionEvent)(nil)).Elem() } func (b *PhysicalNicHint) GetPhysicalNicHint() *PhysicalNicHint { return b } type BasePhysicalNicHint interface { GetPhysicalNicHint() *PhysicalNicHint } func init() { t["BasePhysicalNicHint"] = reflect.TypeOf((*PhysicalNicHint)(nil)).Elem() } func (b *PlatformConfigFault) GetPlatformConfigFault() *PlatformConfigFault { return b } type BasePlatformConfigFault interface { GetPlatformConfigFault() *PlatformConfigFault } func init() { t["BasePlatformConfigFault"] = reflect.TypeOf((*PlatformConfigFault)(nil)).Elem() } func (b *PolicyOption) GetPolicyOption() *PolicyOption { return b } type BasePolicyOption interface { GetPolicyOption() *PolicyOption } func init() { t["BasePolicyOption"] = reflect.TypeOf((*PolicyOption)(nil)).Elem() } func (b *PortGroupProfile) GetPortGroupProfile() *PortGroupProfile { return b } type BasePortGroupProfile interface { GetPortGroupProfile() *PortGroupProfile } func init() { t["BasePortGroupProfile"] = reflect.TypeOf((*PortGroupProfile)(nil)).Elem() } func (b *ProfileConfigInfo) GetProfileConfigInfo() *ProfileConfigInfo { return b } type BaseProfileConfigInfo interface { GetProfileConfigInfo() *ProfileConfigInfo } func init() { t["BaseProfileConfigInfo"] = reflect.TypeOf((*ProfileConfigInfo)(nil)).Elem() } func (b *ProfileCreateSpec) GetProfileCreateSpec() *ProfileCreateSpec { return b } type BaseProfileCreateSpec interface { GetProfileCreateSpec() *ProfileCreateSpec } func init() { t["BaseProfileCreateSpec"] = reflect.TypeOf((*ProfileCreateSpec)(nil)).Elem() } func (b *ProfileEvent) GetProfileEvent() *ProfileEvent { return b } type BaseProfileEvent interface { GetProfileEvent() *ProfileEvent } func init() { t["BaseProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem() } func (b *ProfileExecuteResult) GetProfileExecuteResult() *ProfileExecuteResult { return b } type BaseProfileExecuteResult interface { GetProfileExecuteResult() *ProfileExecuteResult } func init() { t["BaseProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem() } func (b *ProfileExpression) GetProfileExpression() *ProfileExpression { return b } type BaseProfileExpression interface { GetProfileExpression() *ProfileExpression } func init() { t["BaseProfileExpression"] = reflect.TypeOf((*ProfileExpression)(nil)).Elem() } func (b *ProfilePolicyOptionMetadata) GetProfilePolicyOptionMetadata() *ProfilePolicyOptionMetadata { return b } type BaseProfilePolicyOptionMetadata interface { GetProfilePolicyOptionMetadata() *ProfilePolicyOptionMetadata } func init() { t["BaseProfilePolicyOptionMetadata"] = reflect.TypeOf((*ProfilePolicyOptionMetadata)(nil)).Elem() } func (b *ProfileSerializedCreateSpec) GetProfileSerializedCreateSpec() *ProfileSerializedCreateSpec { return b } type BaseProfileSerializedCreateSpec interface { GetProfileSerializedCreateSpec() *ProfileSerializedCreateSpec } func init() { t["BaseProfileSerializedCreateSpec"] = reflect.TypeOf((*ProfileSerializedCreateSpec)(nil)).Elem() } func (b *RDMNotSupported) GetRDMNotSupported() *RDMNotSupported { return b } type BaseRDMNotSupported interface { GetRDMNotSupported() *RDMNotSupported } func init() { t["BaseRDMNotSupported"] = reflect.TypeOf((*RDMNotSupported)(nil)).Elem() } func (b *RecurrentTaskScheduler) GetRecurrentTaskScheduler() *RecurrentTaskScheduler { return b } type BaseRecurrentTaskScheduler interface { GetRecurrentTaskScheduler() *RecurrentTaskScheduler } func init() { t["BaseRecurrentTaskScheduler"] = reflect.TypeOf((*RecurrentTaskScheduler)(nil)).Elem() } func (b *ReplicationConfigFault) GetReplicationConfigFault() *ReplicationConfigFault { return b } type BaseReplicationConfigFault interface { GetReplicationConfigFault() *ReplicationConfigFault } func init() { t["BaseReplicationConfigFault"] = reflect.TypeOf((*ReplicationConfigFault)(nil)).Elem() } func (b *ReplicationFault) GetReplicationFault() *ReplicationFault { return b } type BaseReplicationFault interface { GetReplicationFault() *ReplicationFault } func init() { t["BaseReplicationFault"] = reflect.TypeOf((*ReplicationFault)(nil)).Elem() } func (b *ReplicationVmFault) GetReplicationVmFault() *ReplicationVmFault { return b } type BaseReplicationVmFault interface { GetReplicationVmFault() *ReplicationVmFault } func init() { t["BaseReplicationVmFault"] = reflect.TypeOf((*ReplicationVmFault)(nil)).Elem() } func (b *ResourceAllocationInfo) GetResourceAllocationInfo() *ResourceAllocationInfo { return b } type BaseResourceAllocationInfo interface { GetResourceAllocationInfo() *ResourceAllocationInfo } func init() { t["BaseResourceAllocationInfo"] = reflect.TypeOf((*ResourceAllocationInfo)(nil)).Elem() } func (b *ResourceInUse) GetResourceInUse() *ResourceInUse { return b } type BaseResourceInUse interface { GetResourceInUse() *ResourceInUse } func init() { t["BaseResourceInUse"] = reflect.TypeOf((*ResourceInUse)(nil)).Elem() } func (b *ResourcePoolEvent) GetResourcePoolEvent() *ResourcePoolEvent { return b } type BaseResourcePoolEvent interface { GetResourcePoolEvent() *ResourcePoolEvent } func init() { t["BaseResourcePoolEvent"] = reflect.TypeOf((*ResourcePoolEvent)(nil)).Elem() } func (b *ResourcePoolSummary) GetResourcePoolSummary() *ResourcePoolSummary { return b } type BaseResourcePoolSummary interface { GetResourcePoolSummary() *ResourcePoolSummary } func init() { t["BaseResourcePoolSummary"] = reflect.TypeOf((*ResourcePoolSummary)(nil)).Elem() } func (b *RoleEvent) GetRoleEvent() *RoleEvent { return b } type BaseRoleEvent interface { GetRoleEvent() *RoleEvent } func init() { t["BaseRoleEvent"] = reflect.TypeOf((*RoleEvent)(nil)).Elem() } func (b *RuntimeFault) GetRuntimeFault() *RuntimeFault { return b } type BaseRuntimeFault interface { GetRuntimeFault() *RuntimeFault } func init() { t["BaseRuntimeFault"] = reflect.TypeOf((*RuntimeFault)(nil)).Elem() } func (b *ScheduledTaskEvent) GetScheduledTaskEvent() *ScheduledTaskEvent { return b } type BaseScheduledTaskEvent interface { GetScheduledTaskEvent() *ScheduledTaskEvent } func init() { t["BaseScheduledTaskEvent"] = reflect.TypeOf((*ScheduledTaskEvent)(nil)).Elem() } func (b *ScheduledTaskSpec) GetScheduledTaskSpec() *ScheduledTaskSpec { return b } type BaseScheduledTaskSpec interface { GetScheduledTaskSpec() *ScheduledTaskSpec } func init() { t["BaseScheduledTaskSpec"] = reflect.TypeOf((*ScheduledTaskSpec)(nil)).Elem() } func (b *ScsiLun) GetScsiLun() *ScsiLun { return b } type BaseScsiLun interface { GetScsiLun() *ScsiLun } func init() { t["BaseScsiLun"] = reflect.TypeOf((*ScsiLun)(nil)).Elem() } func (b *SecurityError) GetSecurityError() *SecurityError { return b } type BaseSecurityError interface { GetSecurityError() *SecurityError } func init() { t["BaseSecurityError"] = reflect.TypeOf((*SecurityError)(nil)).Elem() } func (b *SelectionSet) GetSelectionSet() *SelectionSet { return b } type BaseSelectionSet interface { GetSelectionSet() *SelectionSet } func init() { t["BaseSelectionSet"] = reflect.TypeOf((*SelectionSet)(nil)).Elem() } func (b *SelectionSpec) GetSelectionSpec() *SelectionSpec { return b } type BaseSelectionSpec interface { GetSelectionSpec() *SelectionSpec } func init() { t["BaseSelectionSpec"] = reflect.TypeOf((*SelectionSpec)(nil)).Elem() } func (b *ServiceLocatorCredential) GetServiceLocatorCredential() *ServiceLocatorCredential { return b } type BaseServiceLocatorCredential interface { GetServiceLocatorCredential() *ServiceLocatorCredential } func init() { t["BaseServiceLocatorCredential"] = reflect.TypeOf((*ServiceLocatorCredential)(nil)).Elem() } func (b *SessionEvent) GetSessionEvent() *SessionEvent { return b } type BaseSessionEvent interface { GetSessionEvent() *SessionEvent } func init() { t["BaseSessionEvent"] = reflect.TypeOf((*SessionEvent)(nil)).Elem() } func (b *SessionManagerServiceRequestSpec) GetSessionManagerServiceRequestSpec() *SessionManagerServiceRequestSpec { return b } type BaseSessionManagerServiceRequestSpec interface { GetSessionManagerServiceRequestSpec() *SessionManagerServiceRequestSpec } func init() { t["BaseSessionManagerServiceRequestSpec"] = reflect.TypeOf((*SessionManagerServiceRequestSpec)(nil)).Elem() } func (b *SnapshotCopyNotSupported) GetSnapshotCopyNotSupported() *SnapshotCopyNotSupported { return b } type BaseSnapshotCopyNotSupported interface { GetSnapshotCopyNotSupported() *SnapshotCopyNotSupported } func init() { t["BaseSnapshotCopyNotSupported"] = reflect.TypeOf((*SnapshotCopyNotSupported)(nil)).Elem() } func (b *SnapshotFault) GetSnapshotFault() *SnapshotFault { return b } type BaseSnapshotFault interface { GetSnapshotFault() *SnapshotFault } func init() { t["BaseSnapshotFault"] = reflect.TypeOf((*SnapshotFault)(nil)).Elem() } func (b *TaskEvent) GetTaskEvent() *TaskEvent { return b } type BaseTaskEvent interface { GetTaskEvent() *TaskEvent } func init() { t["BaseTaskEvent"] = reflect.TypeOf((*TaskEvent)(nil)).Elem() } func (b *TaskInProgress) GetTaskInProgress() *TaskInProgress { return b } type BaseTaskInProgress interface { GetTaskInProgress() *TaskInProgress } func init() { t["BaseTaskInProgress"] = reflect.TypeOf((*TaskInProgress)(nil)).Elem() } func (b *TaskReason) GetTaskReason() *TaskReason { return b } type BaseTaskReason interface { GetTaskReason() *TaskReason } func init() { t["BaseTaskReason"] = reflect.TypeOf((*TaskReason)(nil)).Elem() } func (b *TaskScheduler) GetTaskScheduler() *TaskScheduler { return b } type BaseTaskScheduler interface { GetTaskScheduler() *TaskScheduler } func init() { t["BaseTaskScheduler"] = reflect.TypeOf((*TaskScheduler)(nil)).Elem() } func (b *TemplateUpgradeEvent) GetTemplateUpgradeEvent() *TemplateUpgradeEvent { return b } type BaseTemplateUpgradeEvent interface { GetTemplateUpgradeEvent() *TemplateUpgradeEvent } func init() { t["BaseTemplateUpgradeEvent"] = reflect.TypeOf((*TemplateUpgradeEvent)(nil)).Elem() } func (b *Timedout) GetTimedout() *Timedout { return b } type BaseTimedout interface { GetTimedout() *Timedout } func init() { t["BaseTimedout"] = reflect.TypeOf((*Timedout)(nil)).Elem() } func (b *TypeDescription) GetTypeDescription() *TypeDescription { return b } type BaseTypeDescription interface { GetTypeDescription() *TypeDescription } func init() { t["BaseTypeDescription"] = reflect.TypeOf((*TypeDescription)(nil)).Elem() } func (b *UnsupportedDatastore) GetUnsupportedDatastore() *UnsupportedDatastore { return b } type BaseUnsupportedDatastore interface { GetUnsupportedDatastore() *UnsupportedDatastore } func init() { t["BaseUnsupportedDatastore"] = reflect.TypeOf((*UnsupportedDatastore)(nil)).Elem() } func (b *UpgradeEvent) GetUpgradeEvent() *UpgradeEvent { return b } type BaseUpgradeEvent interface { GetUpgradeEvent() *UpgradeEvent } func init() { t["BaseUpgradeEvent"] = reflect.TypeOf((*UpgradeEvent)(nil)).Elem() } func (b *UserSearchResult) GetUserSearchResult() *UserSearchResult { return b } type BaseUserSearchResult interface { GetUserSearchResult() *UserSearchResult } func init() { t["BaseUserSearchResult"] = reflect.TypeOf((*UserSearchResult)(nil)).Elem() } func (b *VAppConfigFault) GetVAppConfigFault() *VAppConfigFault { return b } type BaseVAppConfigFault interface { GetVAppConfigFault() *VAppConfigFault } func init() { t["BaseVAppConfigFault"] = reflect.TypeOf((*VAppConfigFault)(nil)).Elem() } func (b *VAppPropertyFault) GetVAppPropertyFault() *VAppPropertyFault { return b } type BaseVAppPropertyFault interface { GetVAppPropertyFault() *VAppPropertyFault } func init() { t["BaseVAppPropertyFault"] = reflect.TypeOf((*VAppPropertyFault)(nil)).Elem() } func (b *VMotionInterfaceIssue) GetVMotionInterfaceIssue() *VMotionInterfaceIssue { return b } type BaseVMotionInterfaceIssue interface { GetVMotionInterfaceIssue() *VMotionInterfaceIssue } func init() { t["BaseVMotionInterfaceIssue"] = reflect.TypeOf((*VMotionInterfaceIssue)(nil)).Elem() } func (b *VMwareDVSHealthCheckConfig) GetVMwareDVSHealthCheckConfig() *VMwareDVSHealthCheckConfig { return b } type BaseVMwareDVSHealthCheckConfig interface { GetVMwareDVSHealthCheckConfig() *VMwareDVSHealthCheckConfig } func init() { t["BaseVMwareDVSHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSHealthCheckConfig)(nil)).Elem() } func (b *VimFault) GetVimFault() *VimFault { return b } type BaseVimFault interface { GetVimFault() *VimFault } func init() { t["BaseVimFault"] = reflect.TypeOf((*VimFault)(nil)).Elem() } func (b *VirtualController) GetVirtualController() *VirtualController { return b } type BaseVirtualController interface { GetVirtualController() *VirtualController } func init() { t["BaseVirtualController"] = reflect.TypeOf((*VirtualController)(nil)).Elem() } func (b *VirtualControllerOption) GetVirtualControllerOption() *VirtualControllerOption { return b } type BaseVirtualControllerOption interface { GetVirtualControllerOption() *VirtualControllerOption } func init() { t["BaseVirtualControllerOption"] = reflect.TypeOf((*VirtualControllerOption)(nil)).Elem() } func (b *VirtualDevice) GetVirtualDevice() *VirtualDevice { return b } type BaseVirtualDevice interface { GetVirtualDevice() *VirtualDevice } func init() { t["BaseVirtualDevice"] = reflect.TypeOf((*VirtualDevice)(nil)).Elem() } func (b *VirtualDeviceBackingInfo) GetVirtualDeviceBackingInfo() *VirtualDeviceBackingInfo { return b } type BaseVirtualDeviceBackingInfo interface { GetVirtualDeviceBackingInfo() *VirtualDeviceBackingInfo } func init() { t["BaseVirtualDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceBackingInfo)(nil)).Elem() } func (b *VirtualDeviceBackingOption) GetVirtualDeviceBackingOption() *VirtualDeviceBackingOption { return b } type BaseVirtualDeviceBackingOption interface { GetVirtualDeviceBackingOption() *VirtualDeviceBackingOption } func init() { t["BaseVirtualDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceBackingOption)(nil)).Elem() } func (b *VirtualDeviceBusSlotInfo) GetVirtualDeviceBusSlotInfo() *VirtualDeviceBusSlotInfo { return b } type BaseVirtualDeviceBusSlotInfo interface { GetVirtualDeviceBusSlotInfo() *VirtualDeviceBusSlotInfo } func init() { t["BaseVirtualDeviceBusSlotInfo"] = reflect.TypeOf((*VirtualDeviceBusSlotInfo)(nil)).Elem() } func (b *VirtualDeviceConfigSpec) GetVirtualDeviceConfigSpec() *VirtualDeviceConfigSpec { return b } type BaseVirtualDeviceConfigSpec interface { GetVirtualDeviceConfigSpec() *VirtualDeviceConfigSpec } func init() { t["BaseVirtualDeviceConfigSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpec)(nil)).Elem() } func (b *VirtualDeviceDeviceBackingInfo) GetVirtualDeviceDeviceBackingInfo() *VirtualDeviceDeviceBackingInfo { return b } type BaseVirtualDeviceDeviceBackingInfo interface { GetVirtualDeviceDeviceBackingInfo() *VirtualDeviceDeviceBackingInfo } func init() { t["BaseVirtualDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceDeviceBackingInfo)(nil)).Elem() } func (b *VirtualDeviceDeviceBackingOption) GetVirtualDeviceDeviceBackingOption() *VirtualDeviceDeviceBackingOption { return b } type BaseVirtualDeviceDeviceBackingOption interface { GetVirtualDeviceDeviceBackingOption() *VirtualDeviceDeviceBackingOption } func init() { t["BaseVirtualDeviceDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceDeviceBackingOption)(nil)).Elem() } func (b *VirtualDeviceFileBackingInfo) GetVirtualDeviceFileBackingInfo() *VirtualDeviceFileBackingInfo { return b } type BaseVirtualDeviceFileBackingInfo interface { GetVirtualDeviceFileBackingInfo() *VirtualDeviceFileBackingInfo } func init() { t["BaseVirtualDeviceFileBackingInfo"] = reflect.TypeOf((*VirtualDeviceFileBackingInfo)(nil)).Elem() } func (b *VirtualDeviceFileBackingOption) GetVirtualDeviceFileBackingOption() *VirtualDeviceFileBackingOption { return b } type BaseVirtualDeviceFileBackingOption interface { GetVirtualDeviceFileBackingOption() *VirtualDeviceFileBackingOption } func init() { t["BaseVirtualDeviceFileBackingOption"] = reflect.TypeOf((*VirtualDeviceFileBackingOption)(nil)).Elem() } func (b *VirtualDeviceOption) GetVirtualDeviceOption() *VirtualDeviceOption { return b } type BaseVirtualDeviceOption interface { GetVirtualDeviceOption() *VirtualDeviceOption } func init() { t["BaseVirtualDeviceOption"] = reflect.TypeOf((*VirtualDeviceOption)(nil)).Elem() } func (b *VirtualDevicePciBusSlotInfo) GetVirtualDevicePciBusSlotInfo() *VirtualDevicePciBusSlotInfo { return b } type BaseVirtualDevicePciBusSlotInfo interface { GetVirtualDevicePciBusSlotInfo() *VirtualDevicePciBusSlotInfo } func init() { t["BaseVirtualDevicePciBusSlotInfo"] = reflect.TypeOf((*VirtualDevicePciBusSlotInfo)(nil)).Elem() } func (b *VirtualDevicePipeBackingInfo) GetVirtualDevicePipeBackingInfo() *VirtualDevicePipeBackingInfo { return b } type BaseVirtualDevicePipeBackingInfo interface { GetVirtualDevicePipeBackingInfo() *VirtualDevicePipeBackingInfo } func init() { t["BaseVirtualDevicePipeBackingInfo"] = reflect.TypeOf((*VirtualDevicePipeBackingInfo)(nil)).Elem() } func (b *VirtualDevicePipeBackingOption) GetVirtualDevicePipeBackingOption() *VirtualDevicePipeBackingOption { return b } type BaseVirtualDevicePipeBackingOption interface { GetVirtualDevicePipeBackingOption() *VirtualDevicePipeBackingOption } func init() { t["BaseVirtualDevicePipeBackingOption"] = reflect.TypeOf((*VirtualDevicePipeBackingOption)(nil)).Elem() } func (b *VirtualDeviceRemoteDeviceBackingInfo) GetVirtualDeviceRemoteDeviceBackingInfo() *VirtualDeviceRemoteDeviceBackingInfo { return b } type BaseVirtualDeviceRemoteDeviceBackingInfo interface { GetVirtualDeviceRemoteDeviceBackingInfo() *VirtualDeviceRemoteDeviceBackingInfo } func init() { t["BaseVirtualDeviceRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingInfo)(nil)).Elem() } func (b *VirtualDeviceRemoteDeviceBackingOption) GetVirtualDeviceRemoteDeviceBackingOption() *VirtualDeviceRemoteDeviceBackingOption { return b } type BaseVirtualDeviceRemoteDeviceBackingOption interface { GetVirtualDeviceRemoteDeviceBackingOption() *VirtualDeviceRemoteDeviceBackingOption } func init() { t["BaseVirtualDeviceRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingOption)(nil)).Elem() } func (b *VirtualDeviceURIBackingInfo) GetVirtualDeviceURIBackingInfo() *VirtualDeviceURIBackingInfo { return b } type BaseVirtualDeviceURIBackingInfo interface { GetVirtualDeviceURIBackingInfo() *VirtualDeviceURIBackingInfo } func init() { t["BaseVirtualDeviceURIBackingInfo"] = reflect.TypeOf((*VirtualDeviceURIBackingInfo)(nil)).Elem() } func (b *VirtualDeviceURIBackingOption) GetVirtualDeviceURIBackingOption() *VirtualDeviceURIBackingOption { return b } type BaseVirtualDeviceURIBackingOption interface { GetVirtualDeviceURIBackingOption() *VirtualDeviceURIBackingOption } func init() { t["BaseVirtualDeviceURIBackingOption"] = reflect.TypeOf((*VirtualDeviceURIBackingOption)(nil)).Elem() } func (b *VirtualDiskRawDiskVer2BackingInfo) GetVirtualDiskRawDiskVer2BackingInfo() *VirtualDiskRawDiskVer2BackingInfo { return b } type BaseVirtualDiskRawDiskVer2BackingInfo interface { GetVirtualDiskRawDiskVer2BackingInfo() *VirtualDiskRawDiskVer2BackingInfo } func init() { t["BaseVirtualDiskRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingInfo)(nil)).Elem() } func (b *VirtualDiskRawDiskVer2BackingOption) GetVirtualDiskRawDiskVer2BackingOption() *VirtualDiskRawDiskVer2BackingOption { return b } type BaseVirtualDiskRawDiskVer2BackingOption interface { GetVirtualDiskRawDiskVer2BackingOption() *VirtualDiskRawDiskVer2BackingOption } func init() { t["BaseVirtualDiskRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingOption)(nil)).Elem() } func (b *VirtualDiskSpec) GetVirtualDiskSpec() *VirtualDiskSpec { return b } type BaseVirtualDiskSpec interface { GetVirtualDiskSpec() *VirtualDiskSpec } func init() { t["BaseVirtualDiskSpec"] = reflect.TypeOf((*VirtualDiskSpec)(nil)).Elem() } func (b *VirtualEthernetCard) GetVirtualEthernetCard() *VirtualEthernetCard { return b } type BaseVirtualEthernetCard interface { GetVirtualEthernetCard() *VirtualEthernetCard } func init() { t["BaseVirtualEthernetCard"] = reflect.TypeOf((*VirtualEthernetCard)(nil)).Elem() } func (b *VirtualEthernetCardOption) GetVirtualEthernetCardOption() *VirtualEthernetCardOption { return b } type BaseVirtualEthernetCardOption interface { GetVirtualEthernetCardOption() *VirtualEthernetCardOption } func init() { t["BaseVirtualEthernetCardOption"] = reflect.TypeOf((*VirtualEthernetCardOption)(nil)).Elem() } func (b *VirtualHardwareCompatibilityIssue) GetVirtualHardwareCompatibilityIssue() *VirtualHardwareCompatibilityIssue { return b } type BaseVirtualHardwareCompatibilityIssue interface { GetVirtualHardwareCompatibilityIssue() *VirtualHardwareCompatibilityIssue } func init() { t["BaseVirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem() } func (b *VirtualMachineBootOptionsBootableDevice) GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice { return b } type BaseVirtualMachineBootOptionsBootableDevice interface { GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice } func init() { t["BaseVirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDevice)(nil)).Elem() } func (b *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState) GetVirtualMachineDeviceRuntimeInfoDeviceRuntimeState() *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState { return b } type BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState interface { GetVirtualMachineDeviceRuntimeInfoDeviceRuntimeState() *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState } func init() { t["BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoDeviceRuntimeState)(nil)).Elem() } func (b *VirtualMachineDiskDeviceInfo) GetVirtualMachineDiskDeviceInfo() *VirtualMachineDiskDeviceInfo { return b } type BaseVirtualMachineDiskDeviceInfo interface { GetVirtualMachineDiskDeviceInfo() *VirtualMachineDiskDeviceInfo } func init() { t["BaseVirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem() } func (b *VirtualMachineGuestQuiesceSpec) GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec { return b } type BaseVirtualMachineGuestQuiesceSpec interface { GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec } func init() { t["BaseVirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem() } func (b *VirtualMachinePciPassthroughInfo) GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo { return b } type BaseVirtualMachinePciPassthroughInfo interface { GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo } func init() { t["BaseVirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciPassthroughInfo)(nil)).Elem() } func (b *VirtualMachineProfileSpec) GetVirtualMachineProfileSpec() *VirtualMachineProfileSpec { return b } type BaseVirtualMachineProfileSpec interface { GetVirtualMachineProfileSpec() *VirtualMachineProfileSpec } func init() { t["BaseVirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem() } func (b *VirtualMachineSriovDevicePoolInfo) GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo { return b } type BaseVirtualMachineSriovDevicePoolInfo interface { GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo } func init() { t["BaseVirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem() } func (b *VirtualMachineTargetInfo) GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo { return b } type BaseVirtualMachineTargetInfo interface { GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo } func init() { t["BaseVirtualMachineTargetInfo"] = reflect.TypeOf((*VirtualMachineTargetInfo)(nil)).Elem() } func (b *VirtualPCIPassthroughPluginBackingInfo) GetVirtualPCIPassthroughPluginBackingInfo() *VirtualPCIPassthroughPluginBackingInfo { return b } type BaseVirtualPCIPassthroughPluginBackingInfo interface { GetVirtualPCIPassthroughPluginBackingInfo() *VirtualPCIPassthroughPluginBackingInfo } func init() { t["BaseVirtualPCIPassthroughPluginBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingInfo)(nil)).Elem() } func (b *VirtualPCIPassthroughPluginBackingOption) GetVirtualPCIPassthroughPluginBackingOption() *VirtualPCIPassthroughPluginBackingOption { return b } type BaseVirtualPCIPassthroughPluginBackingOption interface { GetVirtualPCIPassthroughPluginBackingOption() *VirtualPCIPassthroughPluginBackingOption } func init() { t["BaseVirtualPCIPassthroughPluginBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingOption)(nil)).Elem() } func (b *VirtualSATAController) GetVirtualSATAController() *VirtualSATAController { return b } type BaseVirtualSATAController interface { GetVirtualSATAController() *VirtualSATAController } func init() { t["BaseVirtualSATAController"] = reflect.TypeOf((*VirtualSATAController)(nil)).Elem() } func (b *VirtualSATAControllerOption) GetVirtualSATAControllerOption() *VirtualSATAControllerOption { return b } type BaseVirtualSATAControllerOption interface { GetVirtualSATAControllerOption() *VirtualSATAControllerOption } func init() { t["BaseVirtualSATAControllerOption"] = reflect.TypeOf((*VirtualSATAControllerOption)(nil)).Elem() } func (b *VirtualSCSIController) GetVirtualSCSIController() *VirtualSCSIController { return b } type BaseVirtualSCSIController interface { GetVirtualSCSIController() *VirtualSCSIController } func init() { t["BaseVirtualSCSIController"] = reflect.TypeOf((*VirtualSCSIController)(nil)).Elem() } func (b *VirtualSCSIControllerOption) GetVirtualSCSIControllerOption() *VirtualSCSIControllerOption { return b } type BaseVirtualSCSIControllerOption interface { GetVirtualSCSIControllerOption() *VirtualSCSIControllerOption } func init() { t["BaseVirtualSCSIControllerOption"] = reflect.TypeOf((*VirtualSCSIControllerOption)(nil)).Elem() } func (b *VirtualSoundCard) GetVirtualSoundCard() *VirtualSoundCard { return b } type BaseVirtualSoundCard interface { GetVirtualSoundCard() *VirtualSoundCard } func init() { t["BaseVirtualSoundCard"] = reflect.TypeOf((*VirtualSoundCard)(nil)).Elem() } func (b *VirtualSoundCardOption) GetVirtualSoundCardOption() *VirtualSoundCardOption { return b } type BaseVirtualSoundCardOption interface { GetVirtualSoundCardOption() *VirtualSoundCardOption } func init() { t["BaseVirtualSoundCardOption"] = reflect.TypeOf((*VirtualSoundCardOption)(nil)).Elem() } func (b *VirtualVmxnet) GetVirtualVmxnet() *VirtualVmxnet { return b } type BaseVirtualVmxnet interface { GetVirtualVmxnet() *VirtualVmxnet } func init() { t["BaseVirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem() } func (b *VirtualVmxnet3) GetVirtualVmxnet3() *VirtualVmxnet3 { return b } type BaseVirtualVmxnet3 interface { GetVirtualVmxnet3() *VirtualVmxnet3 } func init() { t["BaseVirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem() } func (b *VirtualVmxnet3Option) GetVirtualVmxnet3Option() *VirtualVmxnet3Option { return b } type BaseVirtualVmxnet3Option interface { GetVirtualVmxnet3Option() *VirtualVmxnet3Option } func init() { t["BaseVirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem() } func (b *VirtualVmxnetOption) GetVirtualVmxnetOption() *VirtualVmxnetOption { return b } type BaseVirtualVmxnetOption interface { GetVirtualVmxnetOption() *VirtualVmxnetOption } func init() { t["BaseVirtualVmxnetOption"] = reflect.TypeOf((*VirtualVmxnetOption)(nil)).Elem() } func (b *VmCloneEvent) GetVmCloneEvent() *VmCloneEvent { return b } type BaseVmCloneEvent interface { GetVmCloneEvent() *VmCloneEvent } func init() { t["BaseVmCloneEvent"] = reflect.TypeOf((*VmCloneEvent)(nil)).Elem() } func (b *VmConfigFault) GetVmConfigFault() *VmConfigFault { return b } type BaseVmConfigFault interface { GetVmConfigFault() *VmConfigFault } func init() { t["BaseVmConfigFault"] = reflect.TypeOf((*VmConfigFault)(nil)).Elem() } func (b *VmConfigFileInfo) GetVmConfigFileInfo() *VmConfigFileInfo { return b } type BaseVmConfigFileInfo interface { GetVmConfigFileInfo() *VmConfigFileInfo } func init() { t["BaseVmConfigFileInfo"] = reflect.TypeOf((*VmConfigFileInfo)(nil)).Elem() } func (b *VmConfigFileQuery) GetVmConfigFileQuery() *VmConfigFileQuery { return b } type BaseVmConfigFileQuery interface { GetVmConfigFileQuery() *VmConfigFileQuery } func init() { t["BaseVmConfigFileQuery"] = reflect.TypeOf((*VmConfigFileQuery)(nil)).Elem() } func (b *VmConfigInfo) GetVmConfigInfo() *VmConfigInfo { return b } type BaseVmConfigInfo interface { GetVmConfigInfo() *VmConfigInfo } func init() { t["BaseVmConfigInfo"] = reflect.TypeOf((*VmConfigInfo)(nil)).Elem() } func (b *VmConfigSpec) GetVmConfigSpec() *VmConfigSpec { return b } type BaseVmConfigSpec interface { GetVmConfigSpec() *VmConfigSpec } func init() { t["BaseVmConfigSpec"] = reflect.TypeOf((*VmConfigSpec)(nil)).Elem() } func (b *VmDasBeingResetEvent) GetVmDasBeingResetEvent() *VmDasBeingResetEvent { return b } type BaseVmDasBeingResetEvent interface { GetVmDasBeingResetEvent() *VmDasBeingResetEvent } func init() { t["BaseVmDasBeingResetEvent"] = reflect.TypeOf((*VmDasBeingResetEvent)(nil)).Elem() } func (b *VmEvent) GetVmEvent() *VmEvent { return b } type BaseVmEvent interface { GetVmEvent() *VmEvent } func init() { t["BaseVmEvent"] = reflect.TypeOf((*VmEvent)(nil)).Elem() } func (b *VmFaultToleranceIssue) GetVmFaultToleranceIssue() *VmFaultToleranceIssue { return b } type BaseVmFaultToleranceIssue interface { GetVmFaultToleranceIssue() *VmFaultToleranceIssue } func init() { t["BaseVmFaultToleranceIssue"] = reflect.TypeOf((*VmFaultToleranceIssue)(nil)).Elem() } func (b *VmMigratedEvent) GetVmMigratedEvent() *VmMigratedEvent { return b } type BaseVmMigratedEvent interface { GetVmMigratedEvent() *VmMigratedEvent } func init() { t["BaseVmMigratedEvent"] = reflect.TypeOf((*VmMigratedEvent)(nil)).Elem() } func (b *VmPoweredOffEvent) GetVmPoweredOffEvent() *VmPoweredOffEvent { return b } type BaseVmPoweredOffEvent interface { GetVmPoweredOffEvent() *VmPoweredOffEvent } func init() { t["BaseVmPoweredOffEvent"] = reflect.TypeOf((*VmPoweredOffEvent)(nil)).Elem() } func (b *VmPoweredOnEvent) GetVmPoweredOnEvent() *VmPoweredOnEvent { return b } type BaseVmPoweredOnEvent interface { GetVmPoweredOnEvent() *VmPoweredOnEvent } func init() { t["BaseVmPoweredOnEvent"] = reflect.TypeOf((*VmPoweredOnEvent)(nil)).Elem() } func (b *VmRelocateSpecEvent) GetVmRelocateSpecEvent() *VmRelocateSpecEvent { return b } type BaseVmRelocateSpecEvent interface { GetVmRelocateSpecEvent() *VmRelocateSpecEvent } func init() { t["BaseVmRelocateSpecEvent"] = reflect.TypeOf((*VmRelocateSpecEvent)(nil)).Elem() } func (b *VmStartingEvent) GetVmStartingEvent() *VmStartingEvent { return b } type BaseVmStartingEvent interface { GetVmStartingEvent() *VmStartingEvent } func init() { t["BaseVmStartingEvent"] = reflect.TypeOf((*VmStartingEvent)(nil)).Elem() } func (b *VmToolsUpgradeFault) GetVmToolsUpgradeFault() *VmToolsUpgradeFault { return b } type BaseVmToolsUpgradeFault interface { GetVmToolsUpgradeFault() *VmToolsUpgradeFault } func init() { t["BaseVmToolsUpgradeFault"] = reflect.TypeOf((*VmToolsUpgradeFault)(nil)).Elem() } func (b *VmfsDatastoreBaseOption) GetVmfsDatastoreBaseOption() *VmfsDatastoreBaseOption { return b } type BaseVmfsDatastoreBaseOption interface { GetVmfsDatastoreBaseOption() *VmfsDatastoreBaseOption } func init() { t["BaseVmfsDatastoreBaseOption"] = reflect.TypeOf((*VmfsDatastoreBaseOption)(nil)).Elem() } func (b *VmfsDatastoreSingleExtentOption) GetVmfsDatastoreSingleExtentOption() *VmfsDatastoreSingleExtentOption { return b } type BaseVmfsDatastoreSingleExtentOption interface { GetVmfsDatastoreSingleExtentOption() *VmfsDatastoreSingleExtentOption } func init() { t["BaseVmfsDatastoreSingleExtentOption"] = reflect.TypeOf((*VmfsDatastoreSingleExtentOption)(nil)).Elem() } func (b *VmfsDatastoreSpec) GetVmfsDatastoreSpec() *VmfsDatastoreSpec { return b } type BaseVmfsDatastoreSpec interface { GetVmfsDatastoreSpec() *VmfsDatastoreSpec } func init() { t["BaseVmfsDatastoreSpec"] = reflect.TypeOf((*VmfsDatastoreSpec)(nil)).Elem() } func (b *VmfsMountFault) GetVmfsMountFault() *VmfsMountFault { return b } type BaseVmfsMountFault interface { GetVmfsMountFault() *VmfsMountFault } func init() { t["BaseVmfsMountFault"] = reflect.TypeOf((*VmfsMountFault)(nil)).Elem() } func (b *VmwareDistributedVirtualSwitchVlanSpec) GetVmwareDistributedVirtualSwitchVlanSpec() *VmwareDistributedVirtualSwitchVlanSpec { return b } type BaseVmwareDistributedVirtualSwitchVlanSpec interface { GetVmwareDistributedVirtualSwitchVlanSpec() *VmwareDistributedVirtualSwitchVlanSpec } func init() { t["BaseVmwareDistributedVirtualSwitchVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanSpec)(nil)).Elem() } func (b *VsanDiskFault) GetVsanDiskFault() *VsanDiskFault { return b } type BaseVsanDiskFault interface { GetVsanDiskFault() *VsanDiskFault } func init() { t["BaseVsanDiskFault"] = reflect.TypeOf((*VsanDiskFault)(nil)).Elem() } func (b *VsanFault) GetVsanFault() *VsanFault { return b } type BaseVsanFault interface { GetVsanFault() *VsanFault } func init() { t["BaseVsanFault"] = reflect.TypeOf((*VsanFault)(nil)).Elem() } func (b *VsanUpgradeSystemPreflightCheckIssue) GetVsanUpgradeSystemPreflightCheckIssue() *VsanUpgradeSystemPreflightCheckIssue { return b } type BaseVsanUpgradeSystemPreflightCheckIssue interface { GetVsanUpgradeSystemPreflightCheckIssue() *VsanUpgradeSystemPreflightCheckIssue } func init() { t["BaseVsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckIssue)(nil)).Elem() } func (b *VsanUpgradeSystemUpgradeHistoryItem) GetVsanUpgradeSystemUpgradeHistoryItem() *VsanUpgradeSystemUpgradeHistoryItem { return b } type BaseVsanUpgradeSystemUpgradeHistoryItem interface { GetVsanUpgradeSystemUpgradeHistoryItem() *VsanUpgradeSystemUpgradeHistoryItem } func init() { t["BaseVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem() } func (b *VslmCreateSpecBackingSpec) GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec { return b } type BaseVslmCreateSpecBackingSpec interface { GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec } func init() { t["BaseVslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem() } func (b *VslmMigrateSpec) GetVslmMigrateSpec() *VslmMigrateSpec { return b } type BaseVslmMigrateSpec interface { GetVslmMigrateSpec() *VslmMigrateSpec } func init() { t["BaseVslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem() } govmomi-0.15.0/vim25/types/internal.go000066400000000000000000000201511312205533500175210ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import "reflect" type DynamicTypeMgrQueryMoInstances struct { This ManagedObjectReference `xml:"_this"` FilterSpec BaseDynamicTypeMgrFilterSpec `xml:"filterSpec,omitempty,typeattr"` } type DynamicTypeMgrQueryMoInstancesResponse struct { Returnval []DynamicTypeMgrMoInstance `xml:"urn:vim25 returnval"` } type DynamicTypeEnumTypeInfo struct { DynamicData Name string `xml:"name"` WsdlName string `xml:"wsdlName"` Version string `xml:"version"` Value []string `xml:"value,omitempty"` Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` } func init() { t["DynamicTypeEnumTypeInfo"] = reflect.TypeOf((*DynamicTypeEnumTypeInfo)(nil)).Elem() } type DynamicTypeMgrAllTypeInfo struct { DynamicData ManagedTypeInfo []DynamicTypeMgrManagedTypeInfo `xml:"managedTypeInfo,omitempty"` EnumTypeInfo []DynamicTypeEnumTypeInfo `xml:"enumTypeInfo,omitempty"` DataTypeInfo []DynamicTypeMgrDataTypeInfo `xml:"dataTypeInfo,omitempty"` } func init() { t["DynamicTypeMgrAllTypeInfo"] = reflect.TypeOf((*DynamicTypeMgrAllTypeInfo)(nil)).Elem() } type DynamicTypeMgrAnnotation struct { DynamicData Name string `xml:"name"` Parameter []string `xml:"parameter,omitempty"` } func init() { t["DynamicTypeMgrAnnotation"] = reflect.TypeOf((*DynamicTypeMgrAnnotation)(nil)).Elem() } type DynamicTypeMgrDataTypeInfo struct { DynamicData Name string `xml:"name"` WsdlName string `xml:"wsdlName"` Version string `xml:"version"` Base []string `xml:"base,omitempty"` Property []DynamicTypeMgrPropertyTypeInfo `xml:"property,omitempty"` Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` } func init() { t["DynamicTypeMgrDataTypeInfo"] = reflect.TypeOf((*DynamicTypeMgrDataTypeInfo)(nil)).Elem() } func (b *DynamicTypeMgrFilterSpec) GetDynamicTypeMgrFilterSpec() *DynamicTypeMgrFilterSpec { return b } type BaseDynamicTypeMgrFilterSpec interface { GetDynamicTypeMgrFilterSpec() *DynamicTypeMgrFilterSpec } type DynamicTypeMgrFilterSpec struct { DynamicData } func init() { t["DynamicTypeMgrFilterSpec"] = reflect.TypeOf((*DynamicTypeMgrFilterSpec)(nil)).Elem() } type DynamicTypeMgrManagedTypeInfo struct { DynamicData Name string `xml:"name"` WsdlName string `xml:"wsdlName"` Version string `xml:"version"` Base []string `xml:"base,omitempty"` Property []DynamicTypeMgrPropertyTypeInfo `xml:"property,omitempty"` Method []DynamicTypeMgrMethodTypeInfo `xml:"method,omitempty"` Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` } func init() { t["DynamicTypeMgrManagedTypeInfo"] = reflect.TypeOf((*DynamicTypeMgrManagedTypeInfo)(nil)).Elem() } type DynamicTypeMgrMethodTypeInfo struct { DynamicData Name string `xml:"name"` WsdlName string `xml:"wsdlName"` Version string `xml:"version"` ParamTypeInfo []DynamicTypeMgrParamTypeInfo `xml:"paramTypeInfo,omitempty"` ReturnTypeInfo *DynamicTypeMgrParamTypeInfo `xml:"returnTypeInfo,omitempty"` Fault []string `xml:"fault,omitempty"` PrivId string `xml:"privId,omitempty"` Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` } func init() { t["DynamicTypeMgrMethodTypeInfo"] = reflect.TypeOf((*DynamicTypeMgrMethodTypeInfo)(nil)).Elem() } type DynamicTypeMgrMoFilterSpec struct { DynamicTypeMgrFilterSpec Id string `xml:"id,omitempty"` TypeSubstr string `xml:"typeSubstr,omitempty"` } func init() { t["DynamicTypeMgrMoFilterSpec"] = reflect.TypeOf((*DynamicTypeMgrMoFilterSpec)(nil)).Elem() } type DynamicTypeMgrMoInstance struct { DynamicData Id string `xml:"id"` MoType string `xml:"moType"` } func init() { t["DynamicTypeMgrMoInstance"] = reflect.TypeOf((*DynamicTypeMgrMoInstance)(nil)).Elem() } type DynamicTypeMgrParamTypeInfo struct { DynamicData Name string `xml:"name"` Version string `xml:"version"` Type string `xml:"type"` PrivId string `xml:"privId,omitempty"` Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` } func init() { t["DynamicTypeMgrParamTypeInfo"] = reflect.TypeOf((*DynamicTypeMgrParamTypeInfo)(nil)).Elem() } type DynamicTypeMgrPropertyTypeInfo struct { DynamicData Name string `xml:"name"` Version string `xml:"version"` Type string `xml:"type"` PrivId string `xml:"privId,omitempty"` MsgIdFormat string `xml:"msgIdFormat,omitempty"` Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` } type DynamicTypeMgrQueryTypeInfo struct { This ManagedObjectReference `xml:"_this"` FilterSpec BaseDynamicTypeMgrFilterSpec `xml:"filterSpec,omitempty,typeattr"` } type DynamicTypeMgrQueryTypeInfoResponse struct { Returnval DynamicTypeMgrAllTypeInfo `xml:"urn:vim25 returnval"` } func init() { t["DynamicTypeMgrPropertyTypeInfo"] = reflect.TypeOf((*DynamicTypeMgrPropertyTypeInfo)(nil)).Elem() } type DynamicTypeMgrTypeFilterSpec struct { DynamicTypeMgrFilterSpec TypeSubstr string `xml:"typeSubstr,omitempty"` } func init() { t["DynamicTypeMgrTypeFilterSpec"] = reflect.TypeOf((*DynamicTypeMgrTypeFilterSpec)(nil)).Elem() } type ReflectManagedMethodExecuterSoapArgument struct { DynamicData Name string `xml:"name"` Val string `xml:"val"` } func init() { t["ReflectManagedMethodExecuterSoapArgument"] = reflect.TypeOf((*ReflectManagedMethodExecuterSoapArgument)(nil)).Elem() } type ReflectManagedMethodExecuterSoapFault struct { DynamicData FaultMsg string `xml:"faultMsg"` FaultDetail string `xml:"faultDetail,omitempty"` } func init() { t["ReflectManagedMethodExecuterSoapFault"] = reflect.TypeOf((*ReflectManagedMethodExecuterSoapFault)(nil)).Elem() } type ReflectManagedMethodExecuterSoapResult struct { DynamicData Response string `xml:"response,omitempty"` Fault *ReflectManagedMethodExecuterSoapFault `xml:"fault,omitempty"` } type RetrieveDynamicTypeManager struct { This ManagedObjectReference `xml:"_this"` } type RetrieveDynamicTypeManagerResponse struct { Returnval *InternalDynamicTypeManager `xml:"urn:vim25 returnval"` } type RetrieveManagedMethodExecuter struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveManagedMethodExecuter"] = reflect.TypeOf((*RetrieveManagedMethodExecuter)(nil)).Elem() } type RetrieveManagedMethodExecuterResponse struct { Returnval *ReflectManagedMethodExecuter `xml:"urn:vim25 returnval"` } type InternalDynamicTypeManager struct { ManagedObjectReference } type ReflectManagedMethodExecuter struct { ManagedObjectReference } type ExecuteSoap struct { This ManagedObjectReference `xml:"_this"` Moid string `xml:"moid"` Version string `xml:"version"` Method string `xml:"method"` Argument []ReflectManagedMethodExecuterSoapArgument `xml:"argument,omitempty"` } type ExecuteSoapResponse struct { Returnval *ReflectManagedMethodExecuterSoapResult `xml:"urn:vim25 returnval"` } govmomi-0.15.0/vim25/types/registry.go000066400000000000000000000021021312205533500175510ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "reflect" "strings" ) var t = map[string]reflect.Type{} func Add(name string, kind reflect.Type) { t[name] = kind } type Func func(string) (reflect.Type, bool) func TypeFunc() Func { return func(name string) (reflect.Type, bool) { typ, ok := t[name] if !ok { // The /sdk endpoint does not prefix types with the namespace, // but extension endpoints, such as /pbm/sdk do. name = strings.TrimPrefix(name, "vim25:") typ, ok = t[name] } return typ, ok } } govmomi-0.15.0/vim25/types/registry_test.go000066400000000000000000000017471312205533500206260ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "reflect" "testing" ) func TestTypeFunc(t *testing.T) { var ok bool fn := TypeFunc() _, ok = fn("unknown") if ok { t.Errorf("Expected ok==false") } actual, ok := fn("UserProfile") if !ok { t.Errorf("Expected ok==true") } expected := reflect.TypeOf(UserProfile{}) if !reflect.DeepEqual(expected, actual) { t.Errorf("Expected: %#v, actual: %#v", expected, actual) } } govmomi-0.15.0/vim25/types/types.go000066400000000000000000056205331312205533500170700ustar00rootroot00000000000000/* Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "net/url" "reflect" "time" ) type AbdicateDomOwnership AbdicateDomOwnershipRequestType func init() { t["AbdicateDomOwnership"] = reflect.TypeOf((*AbdicateDomOwnership)(nil)).Elem() } type AbdicateDomOwnershipRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids"` } func init() { t["AbdicateDomOwnershipRequestType"] = reflect.TypeOf((*AbdicateDomOwnershipRequestType)(nil)).Elem() } type AbdicateDomOwnershipResponse struct { Returnval []string `xml:"returnval,omitempty"` } type AboutInfo struct { DynamicData Name string `xml:"name"` FullName string `xml:"fullName"` Vendor string `xml:"vendor"` Version string `xml:"version"` Build string `xml:"build"` LocaleVersion string `xml:"localeVersion,omitempty"` LocaleBuild string `xml:"localeBuild,omitempty"` OsType string `xml:"osType"` ProductLineId string `xml:"productLineId"` ApiType string `xml:"apiType"` ApiVersion string `xml:"apiVersion"` InstanceUuid string `xml:"instanceUuid,omitempty"` LicenseProductName string `xml:"licenseProductName,omitempty"` LicenseProductVersion string `xml:"licenseProductVersion,omitempty"` } func init() { t["AboutInfo"] = reflect.TypeOf((*AboutInfo)(nil)).Elem() } type AccountCreatedEvent struct { HostEvent Spec BaseHostAccountSpec `xml:"spec,typeattr"` Group bool `xml:"group"` } func init() { t["AccountCreatedEvent"] = reflect.TypeOf((*AccountCreatedEvent)(nil)).Elem() } type AccountRemovedEvent struct { HostEvent Account string `xml:"account"` Group bool `xml:"group"` } func init() { t["AccountRemovedEvent"] = reflect.TypeOf((*AccountRemovedEvent)(nil)).Elem() } type AccountUpdatedEvent struct { HostEvent Spec BaseHostAccountSpec `xml:"spec,typeattr"` Group bool `xml:"group"` PrevDescription string `xml:"prevDescription,omitempty"` } func init() { t["AccountUpdatedEvent"] = reflect.TypeOf((*AccountUpdatedEvent)(nil)).Elem() } type AcknowledgeAlarm AcknowledgeAlarmRequestType func init() { t["AcknowledgeAlarm"] = reflect.TypeOf((*AcknowledgeAlarm)(nil)).Elem() } type AcknowledgeAlarmRequestType struct { This ManagedObjectReference `xml:"_this"` Alarm ManagedObjectReference `xml:"alarm"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["AcknowledgeAlarmRequestType"] = reflect.TypeOf((*AcknowledgeAlarmRequestType)(nil)).Elem() } type AcknowledgeAlarmResponse struct { } type AcquireCimServicesTicket AcquireCimServicesTicketRequestType func init() { t["AcquireCimServicesTicket"] = reflect.TypeOf((*AcquireCimServicesTicket)(nil)).Elem() } type AcquireCimServicesTicketRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["AcquireCimServicesTicketRequestType"] = reflect.TypeOf((*AcquireCimServicesTicketRequestType)(nil)).Elem() } type AcquireCimServicesTicketResponse struct { Returnval HostServiceTicket `xml:"returnval"` } type AcquireCloneTicket AcquireCloneTicketRequestType func init() { t["AcquireCloneTicket"] = reflect.TypeOf((*AcquireCloneTicket)(nil)).Elem() } type AcquireCloneTicketRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["AcquireCloneTicketRequestType"] = reflect.TypeOf((*AcquireCloneTicketRequestType)(nil)).Elem() } type AcquireCloneTicketResponse struct { Returnval string `xml:"returnval"` } type AcquireCredentialsInGuest AcquireCredentialsInGuestRequestType func init() { t["AcquireCredentialsInGuest"] = reflect.TypeOf((*AcquireCredentialsInGuest)(nil)).Elem() } type AcquireCredentialsInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` RequestedAuth BaseGuestAuthentication `xml:"requestedAuth,typeattr"` SessionID int64 `xml:"sessionID,omitempty"` } func init() { t["AcquireCredentialsInGuestRequestType"] = reflect.TypeOf((*AcquireCredentialsInGuestRequestType)(nil)).Elem() } type AcquireCredentialsInGuestResponse struct { Returnval BaseGuestAuthentication `xml:"returnval,typeattr"` } type AcquireGenericServiceTicket AcquireGenericServiceTicketRequestType func init() { t["AcquireGenericServiceTicket"] = reflect.TypeOf((*AcquireGenericServiceTicket)(nil)).Elem() } type AcquireGenericServiceTicketRequestType struct { This ManagedObjectReference `xml:"_this"` Spec BaseSessionManagerServiceRequestSpec `xml:"spec,typeattr"` } func init() { t["AcquireGenericServiceTicketRequestType"] = reflect.TypeOf((*AcquireGenericServiceTicketRequestType)(nil)).Elem() } type AcquireGenericServiceTicketResponse struct { Returnval SessionManagerGenericServiceTicket `xml:"returnval"` } type AcquireLocalTicket AcquireLocalTicketRequestType func init() { t["AcquireLocalTicket"] = reflect.TypeOf((*AcquireLocalTicket)(nil)).Elem() } type AcquireLocalTicketRequestType struct { This ManagedObjectReference `xml:"_this"` UserName string `xml:"userName"` } func init() { t["AcquireLocalTicketRequestType"] = reflect.TypeOf((*AcquireLocalTicketRequestType)(nil)).Elem() } type AcquireLocalTicketResponse struct { Returnval SessionManagerLocalTicket `xml:"returnval"` } type AcquireMksTicket AcquireMksTicketRequestType func init() { t["AcquireMksTicket"] = reflect.TypeOf((*AcquireMksTicket)(nil)).Elem() } type AcquireMksTicketRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["AcquireMksTicketRequestType"] = reflect.TypeOf((*AcquireMksTicketRequestType)(nil)).Elem() } type AcquireMksTicketResponse struct { Returnval VirtualMachineMksTicket `xml:"returnval"` } type AcquireTicket AcquireTicketRequestType func init() { t["AcquireTicket"] = reflect.TypeOf((*AcquireTicket)(nil)).Elem() } type AcquireTicketRequestType struct { This ManagedObjectReference `xml:"_this"` TicketType string `xml:"ticketType"` } func init() { t["AcquireTicketRequestType"] = reflect.TypeOf((*AcquireTicketRequestType)(nil)).Elem() } type AcquireTicketResponse struct { Returnval VirtualMachineTicket `xml:"returnval"` } type Action struct { DynamicData } func init() { t["Action"] = reflect.TypeOf((*Action)(nil)).Elem() } type ActiveDirectoryFault struct { VimFault ErrorCode int32 `xml:"errorCode,omitempty"` } func init() { t["ActiveDirectoryFault"] = reflect.TypeOf((*ActiveDirectoryFault)(nil)).Elem() } type ActiveDirectoryFaultFault BaseActiveDirectoryFault func init() { t["ActiveDirectoryFaultFault"] = reflect.TypeOf((*ActiveDirectoryFaultFault)(nil)).Elem() } type ActiveDirectoryProfile struct { ApplyProfile } func init() { t["ActiveDirectoryProfile"] = reflect.TypeOf((*ActiveDirectoryProfile)(nil)).Elem() } type ActiveVMsBlockingEVC struct { EVCConfigFault EvcMode string `xml:"evcMode,omitempty"` Host []ManagedObjectReference `xml:"host,omitempty"` HostName []string `xml:"hostName,omitempty"` } func init() { t["ActiveVMsBlockingEVC"] = reflect.TypeOf((*ActiveVMsBlockingEVC)(nil)).Elem() } type ActiveVMsBlockingEVCFault ActiveVMsBlockingEVC func init() { t["ActiveVMsBlockingEVCFault"] = reflect.TypeOf((*ActiveVMsBlockingEVCFault)(nil)).Elem() } type AddAuthorizationRole AddAuthorizationRoleRequestType func init() { t["AddAuthorizationRole"] = reflect.TypeOf((*AddAuthorizationRole)(nil)).Elem() } type AddAuthorizationRoleRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` PrivIds []string `xml:"privIds,omitempty"` } func init() { t["AddAuthorizationRoleRequestType"] = reflect.TypeOf((*AddAuthorizationRoleRequestType)(nil)).Elem() } type AddAuthorizationRoleResponse struct { Returnval int32 `xml:"returnval"` } type AddCustomFieldDef AddCustomFieldDefRequestType func init() { t["AddCustomFieldDef"] = reflect.TypeOf((*AddCustomFieldDef)(nil)).Elem() } type AddCustomFieldDefRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` MoType string `xml:"moType,omitempty"` FieldDefPolicy *PrivilegePolicyDef `xml:"fieldDefPolicy,omitempty"` FieldPolicy *PrivilegePolicyDef `xml:"fieldPolicy,omitempty"` } func init() { t["AddCustomFieldDefRequestType"] = reflect.TypeOf((*AddCustomFieldDefRequestType)(nil)).Elem() } type AddCustomFieldDefResponse struct { Returnval CustomFieldDef `xml:"returnval"` } type AddDVPortgroupRequestType struct { This ManagedObjectReference `xml:"_this"` Spec []DVPortgroupConfigSpec `xml:"spec"` } func init() { t["AddDVPortgroupRequestType"] = reflect.TypeOf((*AddDVPortgroupRequestType)(nil)).Elem() } type AddDVPortgroup_Task AddDVPortgroupRequestType func init() { t["AddDVPortgroup_Task"] = reflect.TypeOf((*AddDVPortgroup_Task)(nil)).Elem() } type AddDVPortgroup_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type AddDisksRequestType struct { This ManagedObjectReference `xml:"_this"` Disk []HostScsiDisk `xml:"disk"` } func init() { t["AddDisksRequestType"] = reflect.TypeOf((*AddDisksRequestType)(nil)).Elem() } type AddDisks_Task AddDisksRequestType func init() { t["AddDisks_Task"] = reflect.TypeOf((*AddDisks_Task)(nil)).Elem() } type AddDisks_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type AddFilter AddFilterRequestType func init() { t["AddFilter"] = reflect.TypeOf((*AddFilter)(nil)).Elem() } type AddFilterEntities AddFilterEntitiesRequestType func init() { t["AddFilterEntities"] = reflect.TypeOf((*AddFilterEntities)(nil)).Elem() } type AddFilterEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` Entities []ManagedObjectReference `xml:"entities,omitempty"` } func init() { t["AddFilterEntitiesRequestType"] = reflect.TypeOf((*AddFilterEntitiesRequestType)(nil)).Elem() } type AddFilterEntitiesResponse struct { } type AddFilterRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` FilterName string `xml:"filterName"` InfoIds []string `xml:"infoIds,omitempty"` } func init() { t["AddFilterRequestType"] = reflect.TypeOf((*AddFilterRequestType)(nil)).Elem() } type AddFilterResponse struct { Returnval string `xml:"returnval"` } type AddGuestAlias AddGuestAliasRequestType func init() { t["AddGuestAlias"] = reflect.TypeOf((*AddGuestAlias)(nil)).Elem() } type AddGuestAliasRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Username string `xml:"username"` MapCert bool `xml:"mapCert"` Base64Cert string `xml:"base64Cert"` AliasInfo GuestAuthAliasInfo `xml:"aliasInfo"` } func init() { t["AddGuestAliasRequestType"] = reflect.TypeOf((*AddGuestAliasRequestType)(nil)).Elem() } type AddGuestAliasResponse struct { } type AddHostRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostConnectSpec `xml:"spec"` AsConnected bool `xml:"asConnected"` ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` License string `xml:"license,omitempty"` } func init() { t["AddHostRequestType"] = reflect.TypeOf((*AddHostRequestType)(nil)).Elem() } type AddHost_Task AddHostRequestType func init() { t["AddHost_Task"] = reflect.TypeOf((*AddHost_Task)(nil)).Elem() } type AddHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type AddInternetScsiSendTargets AddInternetScsiSendTargetsRequestType func init() { t["AddInternetScsiSendTargets"] = reflect.TypeOf((*AddInternetScsiSendTargets)(nil)).Elem() } type AddInternetScsiSendTargetsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` Targets []HostInternetScsiHbaSendTarget `xml:"targets"` } func init() { t["AddInternetScsiSendTargetsRequestType"] = reflect.TypeOf((*AddInternetScsiSendTargetsRequestType)(nil)).Elem() } type AddInternetScsiSendTargetsResponse struct { } type AddInternetScsiStaticTargets AddInternetScsiStaticTargetsRequestType func init() { t["AddInternetScsiStaticTargets"] = reflect.TypeOf((*AddInternetScsiStaticTargets)(nil)).Elem() } type AddInternetScsiStaticTargetsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` Targets []HostInternetScsiHbaStaticTarget `xml:"targets"` } func init() { t["AddInternetScsiStaticTargetsRequestType"] = reflect.TypeOf((*AddInternetScsiStaticTargetsRequestType)(nil)).Elem() } type AddInternetScsiStaticTargetsResponse struct { } type AddKey AddKeyRequestType func init() { t["AddKey"] = reflect.TypeOf((*AddKey)(nil)).Elem() } type AddKeyRequestType struct { This ManagedObjectReference `xml:"_this"` Key CryptoKeyPlain `xml:"key"` } func init() { t["AddKeyRequestType"] = reflect.TypeOf((*AddKeyRequestType)(nil)).Elem() } type AddKeyResponse struct { } type AddKeys AddKeysRequestType func init() { t["AddKeys"] = reflect.TypeOf((*AddKeys)(nil)).Elem() } type AddKeysRequestType struct { This ManagedObjectReference `xml:"_this"` Keys []CryptoKeyPlain `xml:"keys,omitempty"` } func init() { t["AddKeysRequestType"] = reflect.TypeOf((*AddKeysRequestType)(nil)).Elem() } type AddKeysResponse struct { Returnval []CryptoKeyResult `xml:"returnval,omitempty"` } type AddLicense AddLicenseRequestType func init() { t["AddLicense"] = reflect.TypeOf((*AddLicense)(nil)).Elem() } type AddLicenseRequestType struct { This ManagedObjectReference `xml:"_this"` LicenseKey string `xml:"licenseKey"` Labels []KeyValue `xml:"labels,omitempty"` } func init() { t["AddLicenseRequestType"] = reflect.TypeOf((*AddLicenseRequestType)(nil)).Elem() } type AddLicenseResponse struct { Returnval LicenseManagerLicenseInfo `xml:"returnval"` } type AddMonitoredEntities AddMonitoredEntitiesRequestType func init() { t["AddMonitoredEntities"] = reflect.TypeOf((*AddMonitoredEntities)(nil)).Elem() } type AddMonitoredEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` Entities []ManagedObjectReference `xml:"entities,omitempty"` } func init() { t["AddMonitoredEntitiesRequestType"] = reflect.TypeOf((*AddMonitoredEntitiesRequestType)(nil)).Elem() } type AddMonitoredEntitiesResponse struct { } type AddNetworkResourcePool AddNetworkResourcePoolRequestType func init() { t["AddNetworkResourcePool"] = reflect.TypeOf((*AddNetworkResourcePool)(nil)).Elem() } type AddNetworkResourcePoolRequestType struct { This ManagedObjectReference `xml:"_this"` ConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"configSpec"` } func init() { t["AddNetworkResourcePoolRequestType"] = reflect.TypeOf((*AddNetworkResourcePoolRequestType)(nil)).Elem() } type AddNetworkResourcePoolResponse struct { } type AddPortGroup AddPortGroupRequestType func init() { t["AddPortGroup"] = reflect.TypeOf((*AddPortGroup)(nil)).Elem() } type AddPortGroupRequestType struct { This ManagedObjectReference `xml:"_this"` Portgrp HostPortGroupSpec `xml:"portgrp"` } func init() { t["AddPortGroupRequestType"] = reflect.TypeOf((*AddPortGroupRequestType)(nil)).Elem() } type AddPortGroupResponse struct { } type AddServiceConsoleVirtualNic AddServiceConsoleVirtualNicRequestType func init() { t["AddServiceConsoleVirtualNic"] = reflect.TypeOf((*AddServiceConsoleVirtualNic)(nil)).Elem() } type AddServiceConsoleVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Portgroup string `xml:"portgroup"` Nic HostVirtualNicSpec `xml:"nic"` } func init() { t["AddServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*AddServiceConsoleVirtualNicRequestType)(nil)).Elem() } type AddServiceConsoleVirtualNicResponse struct { Returnval string `xml:"returnval"` } type AddStandaloneHostRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostConnectSpec `xml:"spec"` CompResSpec BaseComputeResourceConfigSpec `xml:"compResSpec,omitempty,typeattr"` AddConnected bool `xml:"addConnected"` License string `xml:"license,omitempty"` } func init() { t["AddStandaloneHostRequestType"] = reflect.TypeOf((*AddStandaloneHostRequestType)(nil)).Elem() } type AddStandaloneHost_Task AddStandaloneHostRequestType func init() { t["AddStandaloneHost_Task"] = reflect.TypeOf((*AddStandaloneHost_Task)(nil)).Elem() } type AddStandaloneHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type AddVirtualNic AddVirtualNicRequestType func init() { t["AddVirtualNic"] = reflect.TypeOf((*AddVirtualNic)(nil)).Elem() } type AddVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Portgroup string `xml:"portgroup"` Nic HostVirtualNicSpec `xml:"nic"` } func init() { t["AddVirtualNicRequestType"] = reflect.TypeOf((*AddVirtualNicRequestType)(nil)).Elem() } type AddVirtualNicResponse struct { Returnval string `xml:"returnval"` } type AddVirtualSwitch AddVirtualSwitchRequestType func init() { t["AddVirtualSwitch"] = reflect.TypeOf((*AddVirtualSwitch)(nil)).Elem() } type AddVirtualSwitchRequestType struct { This ManagedObjectReference `xml:"_this"` VswitchName string `xml:"vswitchName"` Spec *HostVirtualSwitchSpec `xml:"spec,omitempty"` } func init() { t["AddVirtualSwitchRequestType"] = reflect.TypeOf((*AddVirtualSwitchRequestType)(nil)).Elem() } type AddVirtualSwitchResponse struct { } type AdminDisabled struct { HostConfigFault } func init() { t["AdminDisabled"] = reflect.TypeOf((*AdminDisabled)(nil)).Elem() } type AdminDisabledFault AdminDisabled func init() { t["AdminDisabledFault"] = reflect.TypeOf((*AdminDisabledFault)(nil)).Elem() } type AdminNotDisabled struct { HostConfigFault } func init() { t["AdminNotDisabled"] = reflect.TypeOf((*AdminNotDisabled)(nil)).Elem() } type AdminNotDisabledFault AdminNotDisabled func init() { t["AdminNotDisabledFault"] = reflect.TypeOf((*AdminNotDisabledFault)(nil)).Elem() } type AdminPasswordNotChangedEvent struct { HostEvent } func init() { t["AdminPasswordNotChangedEvent"] = reflect.TypeOf((*AdminPasswordNotChangedEvent)(nil)).Elem() } type AffinityConfigured struct { MigrationFault ConfiguredAffinity []string `xml:"configuredAffinity"` } func init() { t["AffinityConfigured"] = reflect.TypeOf((*AffinityConfigured)(nil)).Elem() } type AffinityConfiguredFault AffinityConfigured func init() { t["AffinityConfiguredFault"] = reflect.TypeOf((*AffinityConfiguredFault)(nil)).Elem() } type AfterStartupTaskScheduler struct { TaskScheduler Minute int32 `xml:"minute"` } func init() { t["AfterStartupTaskScheduler"] = reflect.TypeOf((*AfterStartupTaskScheduler)(nil)).Elem() } type AgentInstallFailed struct { HostConnectFault Reason string `xml:"reason,omitempty"` StatusCode int32 `xml:"statusCode,omitempty"` InstallerOutput string `xml:"installerOutput,omitempty"` } func init() { t["AgentInstallFailed"] = reflect.TypeOf((*AgentInstallFailed)(nil)).Elem() } type AgentInstallFailedFault AgentInstallFailed func init() { t["AgentInstallFailedFault"] = reflect.TypeOf((*AgentInstallFailedFault)(nil)).Elem() } type AlarmAcknowledgedEvent struct { AlarmEvent Source ManagedEntityEventArgument `xml:"source"` Entity ManagedEntityEventArgument `xml:"entity"` } func init() { t["AlarmAcknowledgedEvent"] = reflect.TypeOf((*AlarmAcknowledgedEvent)(nil)).Elem() } type AlarmAction struct { DynamicData } func init() { t["AlarmAction"] = reflect.TypeOf((*AlarmAction)(nil)).Elem() } type AlarmActionTriggeredEvent struct { AlarmEvent Source ManagedEntityEventArgument `xml:"source"` Entity ManagedEntityEventArgument `xml:"entity"` } func init() { t["AlarmActionTriggeredEvent"] = reflect.TypeOf((*AlarmActionTriggeredEvent)(nil)).Elem() } type AlarmClearedEvent struct { AlarmEvent Source ManagedEntityEventArgument `xml:"source"` Entity ManagedEntityEventArgument `xml:"entity"` From string `xml:"from"` } func init() { t["AlarmClearedEvent"] = reflect.TypeOf((*AlarmClearedEvent)(nil)).Elem() } type AlarmCreatedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` } func init() { t["AlarmCreatedEvent"] = reflect.TypeOf((*AlarmCreatedEvent)(nil)).Elem() } type AlarmDescription struct { DynamicData Expr []BaseTypeDescription `xml:"expr,typeattr"` StateOperator []BaseElementDescription `xml:"stateOperator,typeattr"` MetricOperator []BaseElementDescription `xml:"metricOperator,typeattr"` HostSystemConnectionState []BaseElementDescription `xml:"hostSystemConnectionState,typeattr"` VirtualMachinePowerState []BaseElementDescription `xml:"virtualMachinePowerState,typeattr"` DatastoreConnectionState []BaseElementDescription `xml:"datastoreConnectionState,omitempty,typeattr"` HostSystemPowerState []BaseElementDescription `xml:"hostSystemPowerState,omitempty,typeattr"` VirtualMachineGuestHeartbeatStatus []BaseElementDescription `xml:"virtualMachineGuestHeartbeatStatus,omitempty,typeattr"` EntityStatus []BaseElementDescription `xml:"entityStatus,typeattr"` Action []BaseTypeDescription `xml:"action,typeattr"` } func init() { t["AlarmDescription"] = reflect.TypeOf((*AlarmDescription)(nil)).Elem() } type AlarmEmailCompletedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` To string `xml:"to"` } func init() { t["AlarmEmailCompletedEvent"] = reflect.TypeOf((*AlarmEmailCompletedEvent)(nil)).Elem() } type AlarmEmailFailedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` To string `xml:"to"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["AlarmEmailFailedEvent"] = reflect.TypeOf((*AlarmEmailFailedEvent)(nil)).Elem() } type AlarmEvent struct { Event Alarm AlarmEventArgument `xml:"alarm"` } func init() { t["AlarmEvent"] = reflect.TypeOf((*AlarmEvent)(nil)).Elem() } type AlarmEventArgument struct { EntityEventArgument Alarm ManagedObjectReference `xml:"alarm"` } func init() { t["AlarmEventArgument"] = reflect.TypeOf((*AlarmEventArgument)(nil)).Elem() } type AlarmExpression struct { DynamicData } func init() { t["AlarmExpression"] = reflect.TypeOf((*AlarmExpression)(nil)).Elem() } type AlarmInfo struct { AlarmSpec Key string `xml:"key"` Alarm ManagedObjectReference `xml:"alarm"` Entity ManagedObjectReference `xml:"entity"` LastModifiedTime time.Time `xml:"lastModifiedTime"` LastModifiedUser string `xml:"lastModifiedUser"` CreationEventId int32 `xml:"creationEventId"` } func init() { t["AlarmInfo"] = reflect.TypeOf((*AlarmInfo)(nil)).Elem() } type AlarmReconfiguredEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["AlarmReconfiguredEvent"] = reflect.TypeOf((*AlarmReconfiguredEvent)(nil)).Elem() } type AlarmRemovedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` } func init() { t["AlarmRemovedEvent"] = reflect.TypeOf((*AlarmRemovedEvent)(nil)).Elem() } type AlarmScriptCompleteEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` Script string `xml:"script"` } func init() { t["AlarmScriptCompleteEvent"] = reflect.TypeOf((*AlarmScriptCompleteEvent)(nil)).Elem() } type AlarmScriptFailedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` Script string `xml:"script"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["AlarmScriptFailedEvent"] = reflect.TypeOf((*AlarmScriptFailedEvent)(nil)).Elem() } type AlarmSetting struct { DynamicData ToleranceRange int32 `xml:"toleranceRange"` ReportingFrequency int32 `xml:"reportingFrequency"` } func init() { t["AlarmSetting"] = reflect.TypeOf((*AlarmSetting)(nil)).Elem() } type AlarmSnmpCompletedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` } func init() { t["AlarmSnmpCompletedEvent"] = reflect.TypeOf((*AlarmSnmpCompletedEvent)(nil)).Elem() } type AlarmSnmpFailedEvent struct { AlarmEvent Entity ManagedEntityEventArgument `xml:"entity"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["AlarmSnmpFailedEvent"] = reflect.TypeOf((*AlarmSnmpFailedEvent)(nil)).Elem() } type AlarmSpec struct { DynamicData Name string `xml:"name"` SystemName string `xml:"systemName,omitempty"` Description string `xml:"description"` Enabled bool `xml:"enabled"` Expression BaseAlarmExpression `xml:"expression,typeattr"` Action BaseAlarmAction `xml:"action,omitempty,typeattr"` ActionFrequency int32 `xml:"actionFrequency,omitempty"` Setting *AlarmSetting `xml:"setting,omitempty"` } func init() { t["AlarmSpec"] = reflect.TypeOf((*AlarmSpec)(nil)).Elem() } type AlarmState struct { DynamicData Key string `xml:"key"` Entity ManagedObjectReference `xml:"entity"` Alarm ManagedObjectReference `xml:"alarm"` OverallStatus ManagedEntityStatus `xml:"overallStatus"` Time time.Time `xml:"time"` Acknowledged *bool `xml:"acknowledged"` AcknowledgedByUser string `xml:"acknowledgedByUser,omitempty"` AcknowledgedTime *time.Time `xml:"acknowledgedTime"` EventKey int32 `xml:"eventKey,omitempty"` } func init() { t["AlarmState"] = reflect.TypeOf((*AlarmState)(nil)).Elem() } type AlarmStatusChangedEvent struct { AlarmEvent Source ManagedEntityEventArgument `xml:"source"` Entity ManagedEntityEventArgument `xml:"entity"` From string `xml:"from"` To string `xml:"to"` } func init() { t["AlarmStatusChangedEvent"] = reflect.TypeOf((*AlarmStatusChangedEvent)(nil)).Elem() } type AlarmTriggeringAction struct { AlarmAction Action BaseAction `xml:"action,typeattr"` TransitionSpecs []AlarmTriggeringActionTransitionSpec `xml:"transitionSpecs,omitempty"` Green2yellow bool `xml:"green2yellow"` Yellow2red bool `xml:"yellow2red"` Red2yellow bool `xml:"red2yellow"` Yellow2green bool `xml:"yellow2green"` } func init() { t["AlarmTriggeringAction"] = reflect.TypeOf((*AlarmTriggeringAction)(nil)).Elem() } type AlarmTriggeringActionTransitionSpec struct { DynamicData StartState ManagedEntityStatus `xml:"startState"` FinalState ManagedEntityStatus `xml:"finalState"` Repeats bool `xml:"repeats"` } func init() { t["AlarmTriggeringActionTransitionSpec"] = reflect.TypeOf((*AlarmTriggeringActionTransitionSpec)(nil)).Elem() } type AllVirtualMachinesLicensedEvent struct { LicenseEvent } func init() { t["AllVirtualMachinesLicensedEvent"] = reflect.TypeOf((*AllVirtualMachinesLicensedEvent)(nil)).Elem() } type AllocateIpv4Address AllocateIpv4AddressRequestType func init() { t["AllocateIpv4Address"] = reflect.TypeOf((*AllocateIpv4Address)(nil)).Elem() } type AllocateIpv4AddressRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` PoolId int32 `xml:"poolId"` AllocationId string `xml:"allocationId"` } func init() { t["AllocateIpv4AddressRequestType"] = reflect.TypeOf((*AllocateIpv4AddressRequestType)(nil)).Elem() } type AllocateIpv4AddressResponse struct { Returnval string `xml:"returnval"` } type AllocateIpv6Address AllocateIpv6AddressRequestType func init() { t["AllocateIpv6Address"] = reflect.TypeOf((*AllocateIpv6Address)(nil)).Elem() } type AllocateIpv6AddressRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` PoolId int32 `xml:"poolId"` AllocationId string `xml:"allocationId"` } func init() { t["AllocateIpv6AddressRequestType"] = reflect.TypeOf((*AllocateIpv6AddressRequestType)(nil)).Elem() } type AllocateIpv6AddressResponse struct { Returnval string `xml:"returnval"` } type AlreadyAuthenticatedSessionEvent struct { SessionEvent } func init() { t["AlreadyAuthenticatedSessionEvent"] = reflect.TypeOf((*AlreadyAuthenticatedSessionEvent)(nil)).Elem() } type AlreadyBeingManaged struct { HostConnectFault IpAddress string `xml:"ipAddress"` } func init() { t["AlreadyBeingManaged"] = reflect.TypeOf((*AlreadyBeingManaged)(nil)).Elem() } type AlreadyBeingManagedFault AlreadyBeingManaged func init() { t["AlreadyBeingManagedFault"] = reflect.TypeOf((*AlreadyBeingManagedFault)(nil)).Elem() } type AlreadyConnected struct { HostConnectFault Name string `xml:"name"` } func init() { t["AlreadyConnected"] = reflect.TypeOf((*AlreadyConnected)(nil)).Elem() } type AlreadyConnectedFault AlreadyConnected func init() { t["AlreadyConnectedFault"] = reflect.TypeOf((*AlreadyConnectedFault)(nil)).Elem() } type AlreadyExists struct { VimFault Name string `xml:"name,omitempty"` } func init() { t["AlreadyExists"] = reflect.TypeOf((*AlreadyExists)(nil)).Elem() } type AlreadyExistsFault AlreadyExists func init() { t["AlreadyExistsFault"] = reflect.TypeOf((*AlreadyExistsFault)(nil)).Elem() } type AlreadyUpgraded struct { VimFault } func init() { t["AlreadyUpgraded"] = reflect.TypeOf((*AlreadyUpgraded)(nil)).Elem() } type AlreadyUpgradedFault AlreadyUpgraded func init() { t["AlreadyUpgradedFault"] = reflect.TypeOf((*AlreadyUpgradedFault)(nil)).Elem() } type AndAlarmExpression struct { AlarmExpression Expression []BaseAlarmExpression `xml:"expression,typeattr"` } func init() { t["AndAlarmExpression"] = reflect.TypeOf((*AndAlarmExpression)(nil)).Elem() } type AnswerFile struct { DynamicData UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"` CreatedTime time.Time `xml:"createdTime"` ModifiedTime time.Time `xml:"modifiedTime"` } func init() { t["AnswerFile"] = reflect.TypeOf((*AnswerFile)(nil)).Elem() } type AnswerFileCreateSpec struct { DynamicData Validating *bool `xml:"validating"` } func init() { t["AnswerFileCreateSpec"] = reflect.TypeOf((*AnswerFileCreateSpec)(nil)).Elem() } type AnswerFileOptionsCreateSpec struct { AnswerFileCreateSpec UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"` } func init() { t["AnswerFileOptionsCreateSpec"] = reflect.TypeOf((*AnswerFileOptionsCreateSpec)(nil)).Elem() } type AnswerFileSerializedCreateSpec struct { AnswerFileCreateSpec AnswerFileConfigString string `xml:"answerFileConfigString"` } func init() { t["AnswerFileSerializedCreateSpec"] = reflect.TypeOf((*AnswerFileSerializedCreateSpec)(nil)).Elem() } type AnswerFileStatusError struct { DynamicData UserInputPath ProfilePropertyPath `xml:"userInputPath"` ErrMsg LocalizableMessage `xml:"errMsg"` } func init() { t["AnswerFileStatusError"] = reflect.TypeOf((*AnswerFileStatusError)(nil)).Elem() } type AnswerFileStatusResult struct { DynamicData CheckedTime time.Time `xml:"checkedTime"` Host ManagedObjectReference `xml:"host"` Status string `xml:"status"` Error []AnswerFileStatusError `xml:"error,omitempty"` } func init() { t["AnswerFileStatusResult"] = reflect.TypeOf((*AnswerFileStatusResult)(nil)).Elem() } type AnswerFileUpdateFailed struct { VimFault Failure []AnswerFileUpdateFailure `xml:"failure"` } func init() { t["AnswerFileUpdateFailed"] = reflect.TypeOf((*AnswerFileUpdateFailed)(nil)).Elem() } type AnswerFileUpdateFailedFault AnswerFileUpdateFailed func init() { t["AnswerFileUpdateFailedFault"] = reflect.TypeOf((*AnswerFileUpdateFailedFault)(nil)).Elem() } type AnswerFileUpdateFailure struct { DynamicData UserInputPath ProfilePropertyPath `xml:"userInputPath"` ErrMsg LocalizableMessage `xml:"errMsg"` } func init() { t["AnswerFileUpdateFailure"] = reflect.TypeOf((*AnswerFileUpdateFailure)(nil)).Elem() } type AnswerVM AnswerVMRequestType func init() { t["AnswerVM"] = reflect.TypeOf((*AnswerVM)(nil)).Elem() } type AnswerVMRequestType struct { This ManagedObjectReference `xml:"_this"` QuestionId string `xml:"questionId"` AnswerChoice string `xml:"answerChoice"` } func init() { t["AnswerVMRequestType"] = reflect.TypeOf((*AnswerVMRequestType)(nil)).Elem() } type AnswerVMResponse struct { } type ApplicationQuiesceFault struct { SnapshotFault } func init() { t["ApplicationQuiesceFault"] = reflect.TypeOf((*ApplicationQuiesceFault)(nil)).Elem() } type ApplicationQuiesceFaultFault ApplicationQuiesceFault func init() { t["ApplicationQuiesceFaultFault"] = reflect.TypeOf((*ApplicationQuiesceFaultFault)(nil)).Elem() } type ApplyEntitiesConfigRequestType struct { This ManagedObjectReference `xml:"_this"` ApplyConfigSpecs []ApplyHostProfileConfigurationSpec `xml:"applyConfigSpecs,omitempty"` } func init() { t["ApplyEntitiesConfigRequestType"] = reflect.TypeOf((*ApplyEntitiesConfigRequestType)(nil)).Elem() } type ApplyEntitiesConfig_Task ApplyEntitiesConfigRequestType func init() { t["ApplyEntitiesConfig_Task"] = reflect.TypeOf((*ApplyEntitiesConfig_Task)(nil)).Elem() } type ApplyEntitiesConfig_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ApplyHostConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` ConfigSpec HostConfigSpec `xml:"configSpec"` UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"` } func init() { t["ApplyHostConfigRequestType"] = reflect.TypeOf((*ApplyHostConfigRequestType)(nil)).Elem() } type ApplyHostConfig_Task ApplyHostConfigRequestType func init() { t["ApplyHostConfig_Task"] = reflect.TypeOf((*ApplyHostConfig_Task)(nil)).Elem() } type ApplyHostConfig_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ApplyHostProfileConfigurationSpec struct { ProfileExecuteResult Host ManagedObjectReference `xml:"host"` TaskListRequirement []string `xml:"taskListRequirement,omitempty"` TaskDescription []LocalizableMessage `xml:"taskDescription,omitempty"` RebootStateless *bool `xml:"rebootStateless"` RebootHost *bool `xml:"rebootHost"` FaultData *LocalizedMethodFault `xml:"faultData,omitempty"` } func init() { t["ApplyHostProfileConfigurationSpec"] = reflect.TypeOf((*ApplyHostProfileConfigurationSpec)(nil)).Elem() } type ApplyProfile struct { DynamicData Enabled bool `xml:"enabled"` Policy []ProfilePolicy `xml:"policy,omitempty"` ProfileTypeName string `xml:"profileTypeName,omitempty"` ProfileVersion string `xml:"profileVersion,omitempty"` Property []ProfileApplyProfileProperty `xml:"property,omitempty"` Favorite *bool `xml:"favorite"` ToBeMerged *bool `xml:"toBeMerged"` ToReplaceWith *bool `xml:"toReplaceWith"` ToBeDeleted *bool `xml:"toBeDeleted"` CopyEnableStatus *bool `xml:"copyEnableStatus"` } func init() { t["ApplyProfile"] = reflect.TypeOf((*ApplyProfile)(nil)).Elem() } type ApplyRecommendation ApplyRecommendationRequestType func init() { t["ApplyRecommendation"] = reflect.TypeOf((*ApplyRecommendation)(nil)).Elem() } type ApplyRecommendationRequestType struct { This ManagedObjectReference `xml:"_this"` Key string `xml:"key"` } func init() { t["ApplyRecommendationRequestType"] = reflect.TypeOf((*ApplyRecommendationRequestType)(nil)).Elem() } type ApplyRecommendationResponse struct { } type ApplyStorageDrsRecommendationRequestType struct { This ManagedObjectReference `xml:"_this"` Key []string `xml:"key"` } func init() { t["ApplyStorageDrsRecommendationRequestType"] = reflect.TypeOf((*ApplyStorageDrsRecommendationRequestType)(nil)).Elem() } type ApplyStorageDrsRecommendationToPodRequestType struct { This ManagedObjectReference `xml:"_this"` Pod ManagedObjectReference `xml:"pod"` Key string `xml:"key"` } func init() { t["ApplyStorageDrsRecommendationToPodRequestType"] = reflect.TypeOf((*ApplyStorageDrsRecommendationToPodRequestType)(nil)).Elem() } type ApplyStorageDrsRecommendationToPod_Task ApplyStorageDrsRecommendationToPodRequestType func init() { t["ApplyStorageDrsRecommendationToPod_Task"] = reflect.TypeOf((*ApplyStorageDrsRecommendationToPod_Task)(nil)).Elem() } type ApplyStorageDrsRecommendationToPod_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ApplyStorageDrsRecommendation_Task ApplyStorageDrsRecommendationRequestType func init() { t["ApplyStorageDrsRecommendation_Task"] = reflect.TypeOf((*ApplyStorageDrsRecommendation_Task)(nil)).Elem() } type ApplyStorageDrsRecommendation_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ApplyStorageRecommendationResult struct { DynamicData Vm *ManagedObjectReference `xml:"vm,omitempty"` } func init() { t["ApplyStorageRecommendationResult"] = reflect.TypeOf((*ApplyStorageRecommendationResult)(nil)).Elem() } type AreAlarmActionsEnabled AreAlarmActionsEnabledRequestType func init() { t["AreAlarmActionsEnabled"] = reflect.TypeOf((*AreAlarmActionsEnabled)(nil)).Elem() } type AreAlarmActionsEnabledRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["AreAlarmActionsEnabledRequestType"] = reflect.TypeOf((*AreAlarmActionsEnabledRequestType)(nil)).Elem() } type AreAlarmActionsEnabledResponse struct { Returnval bool `xml:"returnval"` } type ArrayOfAlarmAction struct { AlarmAction []BaseAlarmAction `xml:"AlarmAction,omitempty,typeattr"` } func init() { t["ArrayOfAlarmAction"] = reflect.TypeOf((*ArrayOfAlarmAction)(nil)).Elem() } type ArrayOfAlarmExpression struct { AlarmExpression []BaseAlarmExpression `xml:"AlarmExpression,omitempty,typeattr"` } func init() { t["ArrayOfAlarmExpression"] = reflect.TypeOf((*ArrayOfAlarmExpression)(nil)).Elem() } type ArrayOfAlarmState struct { AlarmState []AlarmState `xml:"AlarmState,omitempty"` } func init() { t["ArrayOfAlarmState"] = reflect.TypeOf((*ArrayOfAlarmState)(nil)).Elem() } type ArrayOfAlarmTriggeringActionTransitionSpec struct { AlarmTriggeringActionTransitionSpec []AlarmTriggeringActionTransitionSpec `xml:"AlarmTriggeringActionTransitionSpec,omitempty"` } func init() { t["ArrayOfAlarmTriggeringActionTransitionSpec"] = reflect.TypeOf((*ArrayOfAlarmTriggeringActionTransitionSpec)(nil)).Elem() } type ArrayOfAnswerFileStatusError struct { AnswerFileStatusError []AnswerFileStatusError `xml:"AnswerFileStatusError,omitempty"` } func init() { t["ArrayOfAnswerFileStatusError"] = reflect.TypeOf((*ArrayOfAnswerFileStatusError)(nil)).Elem() } type ArrayOfAnswerFileStatusResult struct { AnswerFileStatusResult []AnswerFileStatusResult `xml:"AnswerFileStatusResult,omitempty"` } func init() { t["ArrayOfAnswerFileStatusResult"] = reflect.TypeOf((*ArrayOfAnswerFileStatusResult)(nil)).Elem() } type ArrayOfAnswerFileUpdateFailure struct { AnswerFileUpdateFailure []AnswerFileUpdateFailure `xml:"AnswerFileUpdateFailure,omitempty"` } func init() { t["ArrayOfAnswerFileUpdateFailure"] = reflect.TypeOf((*ArrayOfAnswerFileUpdateFailure)(nil)).Elem() } type ArrayOfAnyType struct { AnyType []AnyType `xml:"anyType,omitempty,typeattr"` } func init() { t["ArrayOfAnyType"] = reflect.TypeOf((*ArrayOfAnyType)(nil)).Elem() } type ArrayOfAnyURI struct { AnyURI []url.URL `xml:"anyURI,omitempty"` } func init() { t["ArrayOfAnyURI"] = reflect.TypeOf((*ArrayOfAnyURI)(nil)).Elem() } type ArrayOfApplyHostProfileConfigurationSpec struct { ApplyHostProfileConfigurationSpec []ApplyHostProfileConfigurationSpec `xml:"ApplyHostProfileConfigurationSpec,omitempty"` } func init() { t["ArrayOfApplyHostProfileConfigurationSpec"] = reflect.TypeOf((*ArrayOfApplyHostProfileConfigurationSpec)(nil)).Elem() } type ArrayOfApplyProfile struct { ApplyProfile []BaseApplyProfile `xml:"ApplyProfile,omitempty,typeattr"` } func init() { t["ArrayOfApplyProfile"] = reflect.TypeOf((*ArrayOfApplyProfile)(nil)).Elem() } type ArrayOfAuthorizationPrivilege struct { AuthorizationPrivilege []AuthorizationPrivilege `xml:"AuthorizationPrivilege,omitempty"` } func init() { t["ArrayOfAuthorizationPrivilege"] = reflect.TypeOf((*ArrayOfAuthorizationPrivilege)(nil)).Elem() } type ArrayOfAuthorizationRole struct { AuthorizationRole []AuthorizationRole `xml:"AuthorizationRole,omitempty"` } func init() { t["ArrayOfAuthorizationRole"] = reflect.TypeOf((*ArrayOfAuthorizationRole)(nil)).Elem() } type ArrayOfAutoStartPowerInfo struct { AutoStartPowerInfo []AutoStartPowerInfo `xml:"AutoStartPowerInfo,omitempty"` } func init() { t["ArrayOfAutoStartPowerInfo"] = reflect.TypeOf((*ArrayOfAutoStartPowerInfo)(nil)).Elem() } type ArrayOfBoolean struct { Boolean []bool `xml:"boolean,omitempty"` } func init() { t["ArrayOfBoolean"] = reflect.TypeOf((*ArrayOfBoolean)(nil)).Elem() } type ArrayOfByte struct { Byte []byte `xml:"byte,omitempty"` } func init() { t["ArrayOfByte"] = reflect.TypeOf((*ArrayOfByte)(nil)).Elem() } type ArrayOfChangesInfoEventArgument struct { ChangesInfoEventArgument []ChangesInfoEventArgument `xml:"ChangesInfoEventArgument,omitempty"` } func init() { t["ArrayOfChangesInfoEventArgument"] = reflect.TypeOf((*ArrayOfChangesInfoEventArgument)(nil)).Elem() } type ArrayOfCheckResult struct { CheckResult []CheckResult `xml:"CheckResult,omitempty"` } func init() { t["ArrayOfCheckResult"] = reflect.TypeOf((*ArrayOfCheckResult)(nil)).Elem() } type ArrayOfClusterAction struct { ClusterAction []BaseClusterAction `xml:"ClusterAction,omitempty,typeattr"` } func init() { t["ArrayOfClusterAction"] = reflect.TypeOf((*ArrayOfClusterAction)(nil)).Elem() } type ArrayOfClusterActionHistory struct { ClusterActionHistory []ClusterActionHistory `xml:"ClusterActionHistory,omitempty"` } func init() { t["ArrayOfClusterActionHistory"] = reflect.TypeOf((*ArrayOfClusterActionHistory)(nil)).Elem() } type ArrayOfClusterAttemptedVmInfo struct { ClusterAttemptedVmInfo []ClusterAttemptedVmInfo `xml:"ClusterAttemptedVmInfo,omitempty"` } func init() { t["ArrayOfClusterAttemptedVmInfo"] = reflect.TypeOf((*ArrayOfClusterAttemptedVmInfo)(nil)).Elem() } type ArrayOfClusterDasAamNodeState struct { ClusterDasAamNodeState []ClusterDasAamNodeState `xml:"ClusterDasAamNodeState,omitempty"` } func init() { t["ArrayOfClusterDasAamNodeState"] = reflect.TypeOf((*ArrayOfClusterDasAamNodeState)(nil)).Elem() } type ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots struct { ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots `xml:"ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots,omitempty"` } func init() { t["ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots"] = reflect.TypeOf((*ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots)(nil)).Elem() } type ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots struct { ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots `xml:"ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots,omitempty"` } func init() { t["ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots"] = reflect.TypeOf((*ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots)(nil)).Elem() } type ArrayOfClusterDasVmConfigInfo struct { ClusterDasVmConfigInfo []ClusterDasVmConfigInfo `xml:"ClusterDasVmConfigInfo,omitempty"` } func init() { t["ArrayOfClusterDasVmConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigInfo)(nil)).Elem() } type ArrayOfClusterDasVmConfigSpec struct { ClusterDasVmConfigSpec []ClusterDasVmConfigSpec `xml:"ClusterDasVmConfigSpec,omitempty"` } func init() { t["ArrayOfClusterDasVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigSpec)(nil)).Elem() } type ArrayOfClusterDpmHostConfigInfo struct { ClusterDpmHostConfigInfo []ClusterDpmHostConfigInfo `xml:"ClusterDpmHostConfigInfo,omitempty"` } func init() { t["ArrayOfClusterDpmHostConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDpmHostConfigInfo)(nil)).Elem() } type ArrayOfClusterDpmHostConfigSpec struct { ClusterDpmHostConfigSpec []ClusterDpmHostConfigSpec `xml:"ClusterDpmHostConfigSpec,omitempty"` } func init() { t["ArrayOfClusterDpmHostConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDpmHostConfigSpec)(nil)).Elem() } type ArrayOfClusterDrsFaults struct { ClusterDrsFaults []ClusterDrsFaults `xml:"ClusterDrsFaults,omitempty"` } func init() { t["ArrayOfClusterDrsFaults"] = reflect.TypeOf((*ArrayOfClusterDrsFaults)(nil)).Elem() } type ArrayOfClusterDrsFaultsFaultsByVm struct { ClusterDrsFaultsFaultsByVm []BaseClusterDrsFaultsFaultsByVm `xml:"ClusterDrsFaultsFaultsByVm,omitempty,typeattr"` } func init() { t["ArrayOfClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ArrayOfClusterDrsFaultsFaultsByVm)(nil)).Elem() } type ArrayOfClusterDrsMigration struct { ClusterDrsMigration []ClusterDrsMigration `xml:"ClusterDrsMigration,omitempty"` } func init() { t["ArrayOfClusterDrsMigration"] = reflect.TypeOf((*ArrayOfClusterDrsMigration)(nil)).Elem() } type ArrayOfClusterDrsRecommendation struct { ClusterDrsRecommendation []ClusterDrsRecommendation `xml:"ClusterDrsRecommendation,omitempty"` } func init() { t["ArrayOfClusterDrsRecommendation"] = reflect.TypeOf((*ArrayOfClusterDrsRecommendation)(nil)).Elem() } type ArrayOfClusterDrsVmConfigInfo struct { ClusterDrsVmConfigInfo []ClusterDrsVmConfigInfo `xml:"ClusterDrsVmConfigInfo,omitempty"` } func init() { t["ArrayOfClusterDrsVmConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDrsVmConfigInfo)(nil)).Elem() } type ArrayOfClusterDrsVmConfigSpec struct { ClusterDrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"ClusterDrsVmConfigSpec,omitempty"` } func init() { t["ArrayOfClusterDrsVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDrsVmConfigSpec)(nil)).Elem() } type ArrayOfClusterEVCManagerCheckResult struct { ClusterEVCManagerCheckResult []ClusterEVCManagerCheckResult `xml:"ClusterEVCManagerCheckResult,omitempty"` } func init() { t["ArrayOfClusterEVCManagerCheckResult"] = reflect.TypeOf((*ArrayOfClusterEVCManagerCheckResult)(nil)).Elem() } type ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus struct { ClusterFailoverHostAdmissionControlInfoHostStatus []ClusterFailoverHostAdmissionControlInfoHostStatus `xml:"ClusterFailoverHostAdmissionControlInfoHostStatus,omitempty"` } func init() { t["ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus"] = reflect.TypeOf((*ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus)(nil)).Elem() } type ArrayOfClusterGroupInfo struct { ClusterGroupInfo []BaseClusterGroupInfo `xml:"ClusterGroupInfo,omitempty,typeattr"` } func init() { t["ArrayOfClusterGroupInfo"] = reflect.TypeOf((*ArrayOfClusterGroupInfo)(nil)).Elem() } type ArrayOfClusterGroupSpec struct { ClusterGroupSpec []ClusterGroupSpec `xml:"ClusterGroupSpec,omitempty"` } func init() { t["ArrayOfClusterGroupSpec"] = reflect.TypeOf((*ArrayOfClusterGroupSpec)(nil)).Elem() } type ArrayOfClusterHostRecommendation struct { ClusterHostRecommendation []ClusterHostRecommendation `xml:"ClusterHostRecommendation,omitempty"` } func init() { t["ArrayOfClusterHostRecommendation"] = reflect.TypeOf((*ArrayOfClusterHostRecommendation)(nil)).Elem() } type ArrayOfClusterIoFilterInfo struct { ClusterIoFilterInfo []ClusterIoFilterInfo `xml:"ClusterIoFilterInfo,omitempty"` } func init() { t["ArrayOfClusterIoFilterInfo"] = reflect.TypeOf((*ArrayOfClusterIoFilterInfo)(nil)).Elem() } type ArrayOfClusterNotAttemptedVmInfo struct { ClusterNotAttemptedVmInfo []ClusterNotAttemptedVmInfo `xml:"ClusterNotAttemptedVmInfo,omitempty"` } func init() { t["ArrayOfClusterNotAttemptedVmInfo"] = reflect.TypeOf((*ArrayOfClusterNotAttemptedVmInfo)(nil)).Elem() } type ArrayOfClusterRecommendation struct { ClusterRecommendation []ClusterRecommendation `xml:"ClusterRecommendation,omitempty"` } func init() { t["ArrayOfClusterRecommendation"] = reflect.TypeOf((*ArrayOfClusterRecommendation)(nil)).Elem() } type ArrayOfClusterRuleInfo struct { ClusterRuleInfo []BaseClusterRuleInfo `xml:"ClusterRuleInfo,omitempty,typeattr"` } func init() { t["ArrayOfClusterRuleInfo"] = reflect.TypeOf((*ArrayOfClusterRuleInfo)(nil)).Elem() } type ArrayOfClusterRuleSpec struct { ClusterRuleSpec []ClusterRuleSpec `xml:"ClusterRuleSpec,omitempty"` } func init() { t["ArrayOfClusterRuleSpec"] = reflect.TypeOf((*ArrayOfClusterRuleSpec)(nil)).Elem() } type ArrayOfClusterVmOrchestrationInfo struct { ClusterVmOrchestrationInfo []ClusterVmOrchestrationInfo `xml:"ClusterVmOrchestrationInfo,omitempty"` } func init() { t["ArrayOfClusterVmOrchestrationInfo"] = reflect.TypeOf((*ArrayOfClusterVmOrchestrationInfo)(nil)).Elem() } type ArrayOfClusterVmOrchestrationSpec struct { ClusterVmOrchestrationSpec []ClusterVmOrchestrationSpec `xml:"ClusterVmOrchestrationSpec,omitempty"` } func init() { t["ArrayOfClusterVmOrchestrationSpec"] = reflect.TypeOf((*ArrayOfClusterVmOrchestrationSpec)(nil)).Elem() } type ArrayOfComplianceFailure struct { ComplianceFailure []ComplianceFailure `xml:"ComplianceFailure,omitempty"` } func init() { t["ArrayOfComplianceFailure"] = reflect.TypeOf((*ArrayOfComplianceFailure)(nil)).Elem() } type ArrayOfComplianceFailureComplianceFailureValues struct { ComplianceFailureComplianceFailureValues []ComplianceFailureComplianceFailureValues `xml:"ComplianceFailureComplianceFailureValues,omitempty"` } func init() { t["ArrayOfComplianceFailureComplianceFailureValues"] = reflect.TypeOf((*ArrayOfComplianceFailureComplianceFailureValues)(nil)).Elem() } type ArrayOfComplianceLocator struct { ComplianceLocator []ComplianceLocator `xml:"ComplianceLocator,omitempty"` } func init() { t["ArrayOfComplianceLocator"] = reflect.TypeOf((*ArrayOfComplianceLocator)(nil)).Elem() } type ArrayOfComplianceResult struct { ComplianceResult []ComplianceResult `xml:"ComplianceResult,omitempty"` } func init() { t["ArrayOfComplianceResult"] = reflect.TypeOf((*ArrayOfComplianceResult)(nil)).Elem() } type ArrayOfComputeResourceHostSPBMLicenseInfo struct { ComputeResourceHostSPBMLicenseInfo []ComputeResourceHostSPBMLicenseInfo `xml:"ComputeResourceHostSPBMLicenseInfo,omitempty"` } func init() { t["ArrayOfComputeResourceHostSPBMLicenseInfo"] = reflect.TypeOf((*ArrayOfComputeResourceHostSPBMLicenseInfo)(nil)).Elem() } type ArrayOfConflictingConfigurationConfig struct { ConflictingConfigurationConfig []ConflictingConfigurationConfig `xml:"ConflictingConfigurationConfig,omitempty"` } func init() { t["ArrayOfConflictingConfigurationConfig"] = reflect.TypeOf((*ArrayOfConflictingConfigurationConfig)(nil)).Elem() } type ArrayOfCryptoKeyId struct { CryptoKeyId []CryptoKeyId `xml:"CryptoKeyId,omitempty"` } func init() { t["ArrayOfCryptoKeyId"] = reflect.TypeOf((*ArrayOfCryptoKeyId)(nil)).Elem() } type ArrayOfCryptoKeyPlain struct { CryptoKeyPlain []CryptoKeyPlain `xml:"CryptoKeyPlain,omitempty"` } func init() { t["ArrayOfCryptoKeyPlain"] = reflect.TypeOf((*ArrayOfCryptoKeyPlain)(nil)).Elem() } type ArrayOfCryptoKeyResult struct { CryptoKeyResult []CryptoKeyResult `xml:"CryptoKeyResult,omitempty"` } func init() { t["ArrayOfCryptoKeyResult"] = reflect.TypeOf((*ArrayOfCryptoKeyResult)(nil)).Elem() } type ArrayOfCryptoManagerKmipClusterStatus struct { CryptoManagerKmipClusterStatus []CryptoManagerKmipClusterStatus `xml:"CryptoManagerKmipClusterStatus,omitempty"` } func init() { t["ArrayOfCryptoManagerKmipClusterStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipClusterStatus)(nil)).Elem() } type ArrayOfCryptoManagerKmipServerStatus struct { CryptoManagerKmipServerStatus []CryptoManagerKmipServerStatus `xml:"CryptoManagerKmipServerStatus,omitempty"` } func init() { t["ArrayOfCryptoManagerKmipServerStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipServerStatus)(nil)).Elem() } type ArrayOfCustomFieldDef struct { CustomFieldDef []CustomFieldDef `xml:"CustomFieldDef,omitempty"` } func init() { t["ArrayOfCustomFieldDef"] = reflect.TypeOf((*ArrayOfCustomFieldDef)(nil)).Elem() } type ArrayOfCustomFieldValue struct { CustomFieldValue []BaseCustomFieldValue `xml:"CustomFieldValue,omitempty,typeattr"` } func init() { t["ArrayOfCustomFieldValue"] = reflect.TypeOf((*ArrayOfCustomFieldValue)(nil)).Elem() } type ArrayOfCustomizationAdapterMapping struct { CustomizationAdapterMapping []CustomizationAdapterMapping `xml:"CustomizationAdapterMapping,omitempty"` } func init() { t["ArrayOfCustomizationAdapterMapping"] = reflect.TypeOf((*ArrayOfCustomizationAdapterMapping)(nil)).Elem() } type ArrayOfCustomizationIpV6Generator struct { CustomizationIpV6Generator []BaseCustomizationIpV6Generator `xml:"CustomizationIpV6Generator,omitempty,typeattr"` } func init() { t["ArrayOfCustomizationIpV6Generator"] = reflect.TypeOf((*ArrayOfCustomizationIpV6Generator)(nil)).Elem() } type ArrayOfCustomizationSpecInfo struct { CustomizationSpecInfo []CustomizationSpecInfo `xml:"CustomizationSpecInfo,omitempty"` } func init() { t["ArrayOfCustomizationSpecInfo"] = reflect.TypeOf((*ArrayOfCustomizationSpecInfo)(nil)).Elem() } type ArrayOfDVPortConfigSpec struct { DVPortConfigSpec []DVPortConfigSpec `xml:"DVPortConfigSpec,omitempty"` } func init() { t["ArrayOfDVPortConfigSpec"] = reflect.TypeOf((*ArrayOfDVPortConfigSpec)(nil)).Elem() } type ArrayOfDVPortgroupConfigSpec struct { DVPortgroupConfigSpec []DVPortgroupConfigSpec `xml:"DVPortgroupConfigSpec,omitempty"` } func init() { t["ArrayOfDVPortgroupConfigSpec"] = reflect.TypeOf((*ArrayOfDVPortgroupConfigSpec)(nil)).Elem() } type ArrayOfDVSHealthCheckConfig struct { DVSHealthCheckConfig []BaseDVSHealthCheckConfig `xml:"DVSHealthCheckConfig,omitempty,typeattr"` } func init() { t["ArrayOfDVSHealthCheckConfig"] = reflect.TypeOf((*ArrayOfDVSHealthCheckConfig)(nil)).Elem() } type ArrayOfDVSNetworkResourcePool struct { DVSNetworkResourcePool []DVSNetworkResourcePool `xml:"DVSNetworkResourcePool,omitempty"` } func init() { t["ArrayOfDVSNetworkResourcePool"] = reflect.TypeOf((*ArrayOfDVSNetworkResourcePool)(nil)).Elem() } type ArrayOfDVSNetworkResourcePoolConfigSpec struct { DVSNetworkResourcePoolConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"DVSNetworkResourcePoolConfigSpec,omitempty"` } func init() { t["ArrayOfDVSNetworkResourcePoolConfigSpec"] = reflect.TypeOf((*ArrayOfDVSNetworkResourcePoolConfigSpec)(nil)).Elem() } type ArrayOfDVSVmVnicNetworkResourcePool struct { DVSVmVnicNetworkResourcePool []DVSVmVnicNetworkResourcePool `xml:"DVSVmVnicNetworkResourcePool,omitempty"` } func init() { t["ArrayOfDVSVmVnicNetworkResourcePool"] = reflect.TypeOf((*ArrayOfDVSVmVnicNetworkResourcePool)(nil)).Elem() } type ArrayOfDasHeartbeatDatastoreInfo struct { DasHeartbeatDatastoreInfo []DasHeartbeatDatastoreInfo `xml:"DasHeartbeatDatastoreInfo,omitempty"` } func init() { t["ArrayOfDasHeartbeatDatastoreInfo"] = reflect.TypeOf((*ArrayOfDasHeartbeatDatastoreInfo)(nil)).Elem() } type ArrayOfDatacenterMismatchArgument struct { DatacenterMismatchArgument []DatacenterMismatchArgument `xml:"DatacenterMismatchArgument,omitempty"` } func init() { t["ArrayOfDatacenterMismatchArgument"] = reflect.TypeOf((*ArrayOfDatacenterMismatchArgument)(nil)).Elem() } type ArrayOfDatastoreHostMount struct { DatastoreHostMount []DatastoreHostMount `xml:"DatastoreHostMount,omitempty"` } func init() { t["ArrayOfDatastoreHostMount"] = reflect.TypeOf((*ArrayOfDatastoreHostMount)(nil)).Elem() } type ArrayOfDatastoreMountPathDatastorePair struct { DatastoreMountPathDatastorePair []DatastoreMountPathDatastorePair `xml:"DatastoreMountPathDatastorePair,omitempty"` } func init() { t["ArrayOfDatastoreMountPathDatastorePair"] = reflect.TypeOf((*ArrayOfDatastoreMountPathDatastorePair)(nil)).Elem() } type ArrayOfDatastoreVVolContainerFailoverPair struct { DatastoreVVolContainerFailoverPair []DatastoreVVolContainerFailoverPair `xml:"DatastoreVVolContainerFailoverPair,omitempty"` } func init() { t["ArrayOfDatastoreVVolContainerFailoverPair"] = reflect.TypeOf((*ArrayOfDatastoreVVolContainerFailoverPair)(nil)).Elem() } type ArrayOfDiagnosticManagerBundleInfo struct { DiagnosticManagerBundleInfo []DiagnosticManagerBundleInfo `xml:"DiagnosticManagerBundleInfo,omitempty"` } func init() { t["ArrayOfDiagnosticManagerBundleInfo"] = reflect.TypeOf((*ArrayOfDiagnosticManagerBundleInfo)(nil)).Elem() } type ArrayOfDiagnosticManagerLogDescriptor struct { DiagnosticManagerLogDescriptor []DiagnosticManagerLogDescriptor `xml:"DiagnosticManagerLogDescriptor,omitempty"` } func init() { t["ArrayOfDiagnosticManagerLogDescriptor"] = reflect.TypeOf((*ArrayOfDiagnosticManagerLogDescriptor)(nil)).Elem() } type ArrayOfDiskChangeExtent struct { DiskChangeExtent []DiskChangeExtent `xml:"DiskChangeExtent,omitempty"` } func init() { t["ArrayOfDiskChangeExtent"] = reflect.TypeOf((*ArrayOfDiskChangeExtent)(nil)).Elem() } type ArrayOfDistributedVirtualPort struct { DistributedVirtualPort []DistributedVirtualPort `xml:"DistributedVirtualPort,omitempty"` } func init() { t["ArrayOfDistributedVirtualPort"] = reflect.TypeOf((*ArrayOfDistributedVirtualPort)(nil)).Elem() } type ArrayOfDistributedVirtualPortgroupInfo struct { DistributedVirtualPortgroupInfo []DistributedVirtualPortgroupInfo `xml:"DistributedVirtualPortgroupInfo,omitempty"` } func init() { t["ArrayOfDistributedVirtualPortgroupInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualPortgroupInfo)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchHostMember struct { DistributedVirtualSwitchHostMember []DistributedVirtualSwitchHostMember `xml:"DistributedVirtualSwitchHostMember,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchHostMember"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMember)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchHostMemberConfigSpec struct { DistributedVirtualSwitchHostMemberConfigSpec []DistributedVirtualSwitchHostMemberConfigSpec `xml:"DistributedVirtualSwitchHostMemberConfigSpec,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchHostMemberConfigSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberConfigSpec)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchHostMemberPnicSpec struct { DistributedVirtualSwitchHostMemberPnicSpec []DistributedVirtualSwitchHostMemberPnicSpec `xml:"DistributedVirtualSwitchHostMemberPnicSpec,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchHostMemberPnicSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberPnicSpec)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchHostProductSpec struct { DistributedVirtualSwitchHostProductSpec []DistributedVirtualSwitchHostProductSpec `xml:"DistributedVirtualSwitchHostProductSpec,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchHostProductSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostProductSpec)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchInfo struct { DistributedVirtualSwitchInfo []DistributedVirtualSwitchInfo `xml:"DistributedVirtualSwitchInfo,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchInfo)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob struct { DistributedVirtualSwitchKeyedOpaqueBlob []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"DistributedVirtualSwitchKeyedOpaqueBlob,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchManagerCompatibilityResult struct { DistributedVirtualSwitchManagerCompatibilityResult []DistributedVirtualSwitchManagerCompatibilityResult `xml:"DistributedVirtualSwitchManagerCompatibilityResult,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchManagerCompatibilityResult"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchManagerCompatibilityResult)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec struct { DistributedVirtualSwitchManagerHostDvsFilterSpec []BaseDistributedVirtualSwitchManagerHostDvsFilterSpec `xml:"DistributedVirtualSwitchManagerHostDvsFilterSpec,omitempty,typeattr"` } func init() { t["ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem() } type ArrayOfDistributedVirtualSwitchProductSpec struct { DistributedVirtualSwitchProductSpec []DistributedVirtualSwitchProductSpec `xml:"DistributedVirtualSwitchProductSpec,omitempty"` } func init() { t["ArrayOfDistributedVirtualSwitchProductSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchProductSpec)(nil)).Elem() } type ArrayOfDouble struct { Double []float64 `xml:"double,omitempty"` } func init() { t["ArrayOfDouble"] = reflect.TypeOf((*ArrayOfDouble)(nil)).Elem() } type ArrayOfDvsApplyOperationFaultFaultOnObject struct { DvsApplyOperationFaultFaultOnObject []DvsApplyOperationFaultFaultOnObject `xml:"DvsApplyOperationFaultFaultOnObject,omitempty"` } func init() { t["ArrayOfDvsApplyOperationFaultFaultOnObject"] = reflect.TypeOf((*ArrayOfDvsApplyOperationFaultFaultOnObject)(nil)).Elem() } type ArrayOfDvsFilterConfig struct { DvsFilterConfig []BaseDvsFilterConfig `xml:"DvsFilterConfig,omitempty,typeattr"` } func init() { t["ArrayOfDvsFilterConfig"] = reflect.TypeOf((*ArrayOfDvsFilterConfig)(nil)).Elem() } type ArrayOfDvsHostInfrastructureTrafficResource struct { DvsHostInfrastructureTrafficResource []DvsHostInfrastructureTrafficResource `xml:"DvsHostInfrastructureTrafficResource,omitempty"` } func init() { t["ArrayOfDvsHostInfrastructureTrafficResource"] = reflect.TypeOf((*ArrayOfDvsHostInfrastructureTrafficResource)(nil)).Elem() } type ArrayOfDvsHostVNicProfile struct { DvsHostVNicProfile []DvsHostVNicProfile `xml:"DvsHostVNicProfile,omitempty"` } func init() { t["ArrayOfDvsHostVNicProfile"] = reflect.TypeOf((*ArrayOfDvsHostVNicProfile)(nil)).Elem() } type ArrayOfDvsNetworkRuleQualifier struct { DvsNetworkRuleQualifier []BaseDvsNetworkRuleQualifier `xml:"DvsNetworkRuleQualifier,omitempty,typeattr"` } func init() { t["ArrayOfDvsNetworkRuleQualifier"] = reflect.TypeOf((*ArrayOfDvsNetworkRuleQualifier)(nil)).Elem() } type ArrayOfDvsOperationBulkFaultFaultOnHost struct { DvsOperationBulkFaultFaultOnHost []DvsOperationBulkFaultFaultOnHost `xml:"DvsOperationBulkFaultFaultOnHost,omitempty"` } func init() { t["ArrayOfDvsOperationBulkFaultFaultOnHost"] = reflect.TypeOf((*ArrayOfDvsOperationBulkFaultFaultOnHost)(nil)).Elem() } type ArrayOfDvsOutOfSyncHostArgument struct { DvsOutOfSyncHostArgument []DvsOutOfSyncHostArgument `xml:"DvsOutOfSyncHostArgument,omitempty"` } func init() { t["ArrayOfDvsOutOfSyncHostArgument"] = reflect.TypeOf((*ArrayOfDvsOutOfSyncHostArgument)(nil)).Elem() } type ArrayOfDvsProfile struct { DvsProfile []DvsProfile `xml:"DvsProfile,omitempty"` } func init() { t["ArrayOfDvsProfile"] = reflect.TypeOf((*ArrayOfDvsProfile)(nil)).Elem() } type ArrayOfDvsServiceConsoleVNicProfile struct { DvsServiceConsoleVNicProfile []DvsServiceConsoleVNicProfile `xml:"DvsServiceConsoleVNicProfile,omitempty"` } func init() { t["ArrayOfDvsServiceConsoleVNicProfile"] = reflect.TypeOf((*ArrayOfDvsServiceConsoleVNicProfile)(nil)).Elem() } type ArrayOfDvsTrafficRule struct { DvsTrafficRule []DvsTrafficRule `xml:"DvsTrafficRule,omitempty"` } func init() { t["ArrayOfDvsTrafficRule"] = reflect.TypeOf((*ArrayOfDvsTrafficRule)(nil)).Elem() } type ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo struct { DvsVmVnicNetworkResourcePoolRuntimeInfo []DvsVmVnicNetworkResourcePoolRuntimeInfo `xml:"DvsVmVnicNetworkResourcePoolRuntimeInfo,omitempty"` } func init() { t["ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo"] = reflect.TypeOf((*ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo)(nil)).Elem() } type ArrayOfDvsVmVnicResourcePoolConfigSpec struct { DvsVmVnicResourcePoolConfigSpec []DvsVmVnicResourcePoolConfigSpec `xml:"DvsVmVnicResourcePoolConfigSpec,omitempty"` } func init() { t["ArrayOfDvsVmVnicResourcePoolConfigSpec"] = reflect.TypeOf((*ArrayOfDvsVmVnicResourcePoolConfigSpec)(nil)).Elem() } type ArrayOfDvsVnicAllocatedResource struct { DvsVnicAllocatedResource []DvsVnicAllocatedResource `xml:"DvsVnicAllocatedResource,omitempty"` } func init() { t["ArrayOfDvsVnicAllocatedResource"] = reflect.TypeOf((*ArrayOfDvsVnicAllocatedResource)(nil)).Elem() } type ArrayOfDynamicProperty struct { DynamicProperty []DynamicProperty `xml:"DynamicProperty,omitempty"` } func init() { t["ArrayOfDynamicProperty"] = reflect.TypeOf((*ArrayOfDynamicProperty)(nil)).Elem() } type ArrayOfEVCMode struct { EVCMode []EVCMode `xml:"EVCMode,omitempty"` } func init() { t["ArrayOfEVCMode"] = reflect.TypeOf((*ArrayOfEVCMode)(nil)).Elem() } type ArrayOfElementDescription struct { ElementDescription []BaseElementDescription `xml:"ElementDescription,omitempty,typeattr"` } func init() { t["ArrayOfElementDescription"] = reflect.TypeOf((*ArrayOfElementDescription)(nil)).Elem() } type ArrayOfEntityBackupConfig struct { EntityBackupConfig []EntityBackupConfig `xml:"EntityBackupConfig,omitempty"` } func init() { t["ArrayOfEntityBackupConfig"] = reflect.TypeOf((*ArrayOfEntityBackupConfig)(nil)).Elem() } type ArrayOfEntityPrivilege struct { EntityPrivilege []EntityPrivilege `xml:"EntityPrivilege,omitempty"` } func init() { t["ArrayOfEntityPrivilege"] = reflect.TypeOf((*ArrayOfEntityPrivilege)(nil)).Elem() } type ArrayOfEnumDescription struct { EnumDescription []EnumDescription `xml:"EnumDescription,omitempty"` } func init() { t["ArrayOfEnumDescription"] = reflect.TypeOf((*ArrayOfEnumDescription)(nil)).Elem() } type ArrayOfEvent struct { Event []BaseEvent `xml:"Event,omitempty,typeattr"` } func init() { t["ArrayOfEvent"] = reflect.TypeOf((*ArrayOfEvent)(nil)).Elem() } type ArrayOfEventAlarmExpressionComparison struct { EventAlarmExpressionComparison []EventAlarmExpressionComparison `xml:"EventAlarmExpressionComparison,omitempty"` } func init() { t["ArrayOfEventAlarmExpressionComparison"] = reflect.TypeOf((*ArrayOfEventAlarmExpressionComparison)(nil)).Elem() } type ArrayOfEventArgDesc struct { EventArgDesc []EventArgDesc `xml:"EventArgDesc,omitempty"` } func init() { t["ArrayOfEventArgDesc"] = reflect.TypeOf((*ArrayOfEventArgDesc)(nil)).Elem() } type ArrayOfEventDescriptionEventDetail struct { EventDescriptionEventDetail []EventDescriptionEventDetail `xml:"EventDescriptionEventDetail,omitempty"` } func init() { t["ArrayOfEventDescriptionEventDetail"] = reflect.TypeOf((*ArrayOfEventDescriptionEventDetail)(nil)).Elem() } type ArrayOfExtManagedEntityInfo struct { ExtManagedEntityInfo []ExtManagedEntityInfo `xml:"ExtManagedEntityInfo,omitempty"` } func init() { t["ArrayOfExtManagedEntityInfo"] = reflect.TypeOf((*ArrayOfExtManagedEntityInfo)(nil)).Elem() } type ArrayOfExtSolutionManagerInfoTabInfo struct { ExtSolutionManagerInfoTabInfo []ExtSolutionManagerInfoTabInfo `xml:"ExtSolutionManagerInfoTabInfo,omitempty"` } func init() { t["ArrayOfExtSolutionManagerInfoTabInfo"] = reflect.TypeOf((*ArrayOfExtSolutionManagerInfoTabInfo)(nil)).Elem() } type ArrayOfExtendedEventPair struct { ExtendedEventPair []ExtendedEventPair `xml:"ExtendedEventPair,omitempty"` } func init() { t["ArrayOfExtendedEventPair"] = reflect.TypeOf((*ArrayOfExtendedEventPair)(nil)).Elem() } type ArrayOfExtension struct { Extension []Extension `xml:"Extension,omitempty"` } func init() { t["ArrayOfExtension"] = reflect.TypeOf((*ArrayOfExtension)(nil)).Elem() } type ArrayOfExtensionClientInfo struct { ExtensionClientInfo []ExtensionClientInfo `xml:"ExtensionClientInfo,omitempty"` } func init() { t["ArrayOfExtensionClientInfo"] = reflect.TypeOf((*ArrayOfExtensionClientInfo)(nil)).Elem() } type ArrayOfExtensionEventTypeInfo struct { ExtensionEventTypeInfo []ExtensionEventTypeInfo `xml:"ExtensionEventTypeInfo,omitempty"` } func init() { t["ArrayOfExtensionEventTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionEventTypeInfo)(nil)).Elem() } type ArrayOfExtensionFaultTypeInfo struct { ExtensionFaultTypeInfo []ExtensionFaultTypeInfo `xml:"ExtensionFaultTypeInfo,omitempty"` } func init() { t["ArrayOfExtensionFaultTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionFaultTypeInfo)(nil)).Elem() } type ArrayOfExtensionManagerIpAllocationUsage struct { ExtensionManagerIpAllocationUsage []ExtensionManagerIpAllocationUsage `xml:"ExtensionManagerIpAllocationUsage,omitempty"` } func init() { t["ArrayOfExtensionManagerIpAllocationUsage"] = reflect.TypeOf((*ArrayOfExtensionManagerIpAllocationUsage)(nil)).Elem() } type ArrayOfExtensionPrivilegeInfo struct { ExtensionPrivilegeInfo []ExtensionPrivilegeInfo `xml:"ExtensionPrivilegeInfo,omitempty"` } func init() { t["ArrayOfExtensionPrivilegeInfo"] = reflect.TypeOf((*ArrayOfExtensionPrivilegeInfo)(nil)).Elem() } type ArrayOfExtensionResourceInfo struct { ExtensionResourceInfo []ExtensionResourceInfo `xml:"ExtensionResourceInfo,omitempty"` } func init() { t["ArrayOfExtensionResourceInfo"] = reflect.TypeOf((*ArrayOfExtensionResourceInfo)(nil)).Elem() } type ArrayOfExtensionServerInfo struct { ExtensionServerInfo []ExtensionServerInfo `xml:"ExtensionServerInfo,omitempty"` } func init() { t["ArrayOfExtensionServerInfo"] = reflect.TypeOf((*ArrayOfExtensionServerInfo)(nil)).Elem() } type ArrayOfExtensionTaskTypeInfo struct { ExtensionTaskTypeInfo []ExtensionTaskTypeInfo `xml:"ExtensionTaskTypeInfo,omitempty"` } func init() { t["ArrayOfExtensionTaskTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionTaskTypeInfo)(nil)).Elem() } type ArrayOfFaultToleranceDiskSpec struct { FaultToleranceDiskSpec []FaultToleranceDiskSpec `xml:"FaultToleranceDiskSpec,omitempty"` } func init() { t["ArrayOfFaultToleranceDiskSpec"] = reflect.TypeOf((*ArrayOfFaultToleranceDiskSpec)(nil)).Elem() } type ArrayOfFcoeConfigVlanRange struct { FcoeConfigVlanRange []FcoeConfigVlanRange `xml:"FcoeConfigVlanRange,omitempty"` } func init() { t["ArrayOfFcoeConfigVlanRange"] = reflect.TypeOf((*ArrayOfFcoeConfigVlanRange)(nil)).Elem() } type ArrayOfFileInfo struct { FileInfo []BaseFileInfo `xml:"FileInfo,omitempty,typeattr"` } func init() { t["ArrayOfFileInfo"] = reflect.TypeOf((*ArrayOfFileInfo)(nil)).Elem() } type ArrayOfFileQuery struct { FileQuery []BaseFileQuery `xml:"FileQuery,omitempty,typeattr"` } func init() { t["ArrayOfFileQuery"] = reflect.TypeOf((*ArrayOfFileQuery)(nil)).Elem() } type ArrayOfFirewallProfileRulesetProfile struct { FirewallProfileRulesetProfile []FirewallProfileRulesetProfile `xml:"FirewallProfileRulesetProfile,omitempty"` } func init() { t["ArrayOfFirewallProfileRulesetProfile"] = reflect.TypeOf((*ArrayOfFirewallProfileRulesetProfile)(nil)).Elem() } type ArrayOfGuestAliases struct { GuestAliases []GuestAliases `xml:"GuestAliases,omitempty"` } func init() { t["ArrayOfGuestAliases"] = reflect.TypeOf((*ArrayOfGuestAliases)(nil)).Elem() } type ArrayOfGuestAuthAliasInfo struct { GuestAuthAliasInfo []GuestAuthAliasInfo `xml:"GuestAuthAliasInfo,omitempty"` } func init() { t["ArrayOfGuestAuthAliasInfo"] = reflect.TypeOf((*ArrayOfGuestAuthAliasInfo)(nil)).Elem() } type ArrayOfGuestAuthSubject struct { GuestAuthSubject []BaseGuestAuthSubject `xml:"GuestAuthSubject,omitempty,typeattr"` } func init() { t["ArrayOfGuestAuthSubject"] = reflect.TypeOf((*ArrayOfGuestAuthSubject)(nil)).Elem() } type ArrayOfGuestDiskInfo struct { GuestDiskInfo []GuestDiskInfo `xml:"GuestDiskInfo,omitempty"` } func init() { t["ArrayOfGuestDiskInfo"] = reflect.TypeOf((*ArrayOfGuestDiskInfo)(nil)).Elem() } type ArrayOfGuestFileInfo struct { GuestFileInfo []GuestFileInfo `xml:"GuestFileInfo,omitempty"` } func init() { t["ArrayOfGuestFileInfo"] = reflect.TypeOf((*ArrayOfGuestFileInfo)(nil)).Elem() } type ArrayOfGuestInfoNamespaceGenerationInfo struct { GuestInfoNamespaceGenerationInfo []GuestInfoNamespaceGenerationInfo `xml:"GuestInfoNamespaceGenerationInfo,omitempty"` } func init() { t["ArrayOfGuestInfoNamespaceGenerationInfo"] = reflect.TypeOf((*ArrayOfGuestInfoNamespaceGenerationInfo)(nil)).Elem() } type ArrayOfGuestMappedAliases struct { GuestMappedAliases []GuestMappedAliases `xml:"GuestMappedAliases,omitempty"` } func init() { t["ArrayOfGuestMappedAliases"] = reflect.TypeOf((*ArrayOfGuestMappedAliases)(nil)).Elem() } type ArrayOfGuestNicInfo struct { GuestNicInfo []GuestNicInfo `xml:"GuestNicInfo,omitempty"` } func init() { t["ArrayOfGuestNicInfo"] = reflect.TypeOf((*ArrayOfGuestNicInfo)(nil)).Elem() } type ArrayOfGuestOsDescriptor struct { GuestOsDescriptor []GuestOsDescriptor `xml:"GuestOsDescriptor,omitempty"` } func init() { t["ArrayOfGuestOsDescriptor"] = reflect.TypeOf((*ArrayOfGuestOsDescriptor)(nil)).Elem() } type ArrayOfGuestProcessInfo struct { GuestProcessInfo []GuestProcessInfo `xml:"GuestProcessInfo,omitempty"` } func init() { t["ArrayOfGuestProcessInfo"] = reflect.TypeOf((*ArrayOfGuestProcessInfo)(nil)).Elem() } type ArrayOfGuestRegKeyRecordSpec struct { GuestRegKeyRecordSpec []GuestRegKeyRecordSpec `xml:"GuestRegKeyRecordSpec,omitempty"` } func init() { t["ArrayOfGuestRegKeyRecordSpec"] = reflect.TypeOf((*ArrayOfGuestRegKeyRecordSpec)(nil)).Elem() } type ArrayOfGuestRegValueSpec struct { GuestRegValueSpec []GuestRegValueSpec `xml:"GuestRegValueSpec,omitempty"` } func init() { t["ArrayOfGuestRegValueSpec"] = reflect.TypeOf((*ArrayOfGuestRegValueSpec)(nil)).Elem() } type ArrayOfGuestStackInfo struct { GuestStackInfo []GuestStackInfo `xml:"GuestStackInfo,omitempty"` } func init() { t["ArrayOfGuestStackInfo"] = reflect.TypeOf((*ArrayOfGuestStackInfo)(nil)).Elem() } type ArrayOfHbrManagerVmReplicationCapability struct { HbrManagerVmReplicationCapability []HbrManagerVmReplicationCapability `xml:"HbrManagerVmReplicationCapability,omitempty"` } func init() { t["ArrayOfHbrManagerVmReplicationCapability"] = reflect.TypeOf((*ArrayOfHbrManagerVmReplicationCapability)(nil)).Elem() } type ArrayOfHealthUpdate struct { HealthUpdate []HealthUpdate `xml:"HealthUpdate,omitempty"` } func init() { t["ArrayOfHealthUpdate"] = reflect.TypeOf((*ArrayOfHealthUpdate)(nil)).Elem() } type ArrayOfHealthUpdateInfo struct { HealthUpdateInfo []HealthUpdateInfo `xml:"HealthUpdateInfo,omitempty"` } func init() { t["ArrayOfHealthUpdateInfo"] = reflect.TypeOf((*ArrayOfHealthUpdateInfo)(nil)).Elem() } type ArrayOfHostAccessControlEntry struct { HostAccessControlEntry []HostAccessControlEntry `xml:"HostAccessControlEntry,omitempty"` } func init() { t["ArrayOfHostAccessControlEntry"] = reflect.TypeOf((*ArrayOfHostAccessControlEntry)(nil)).Elem() } type ArrayOfHostAccountSpec struct { HostAccountSpec []BaseHostAccountSpec `xml:"HostAccountSpec,omitempty,typeattr"` } func init() { t["ArrayOfHostAccountSpec"] = reflect.TypeOf((*ArrayOfHostAccountSpec)(nil)).Elem() } type ArrayOfHostActiveDirectory struct { HostActiveDirectory []HostActiveDirectory `xml:"HostActiveDirectory,omitempty"` } func init() { t["ArrayOfHostActiveDirectory"] = reflect.TypeOf((*ArrayOfHostActiveDirectory)(nil)).Elem() } type ArrayOfHostAuthenticationStoreInfo struct { HostAuthenticationStoreInfo []BaseHostAuthenticationStoreInfo `xml:"HostAuthenticationStoreInfo,omitempty,typeattr"` } func init() { t["ArrayOfHostAuthenticationStoreInfo"] = reflect.TypeOf((*ArrayOfHostAuthenticationStoreInfo)(nil)).Elem() } type ArrayOfHostBootDevice struct { HostBootDevice []HostBootDevice `xml:"HostBootDevice,omitempty"` } func init() { t["ArrayOfHostBootDevice"] = reflect.TypeOf((*ArrayOfHostBootDevice)(nil)).Elem() } type ArrayOfHostCacheConfigurationInfo struct { HostCacheConfigurationInfo []HostCacheConfigurationInfo `xml:"HostCacheConfigurationInfo,omitempty"` } func init() { t["ArrayOfHostCacheConfigurationInfo"] = reflect.TypeOf((*ArrayOfHostCacheConfigurationInfo)(nil)).Elem() } type ArrayOfHostConnectInfoNetworkInfo struct { HostConnectInfoNetworkInfo []BaseHostConnectInfoNetworkInfo `xml:"HostConnectInfoNetworkInfo,omitempty,typeattr"` } func init() { t["ArrayOfHostConnectInfoNetworkInfo"] = reflect.TypeOf((*ArrayOfHostConnectInfoNetworkInfo)(nil)).Elem() } type ArrayOfHostCpuIdInfo struct { HostCpuIdInfo []HostCpuIdInfo `xml:"HostCpuIdInfo,omitempty"` } func init() { t["ArrayOfHostCpuIdInfo"] = reflect.TypeOf((*ArrayOfHostCpuIdInfo)(nil)).Elem() } type ArrayOfHostCpuPackage struct { HostCpuPackage []HostCpuPackage `xml:"HostCpuPackage,omitempty"` } func init() { t["ArrayOfHostCpuPackage"] = reflect.TypeOf((*ArrayOfHostCpuPackage)(nil)).Elem() } type ArrayOfHostDatastoreBrowserSearchResults struct { HostDatastoreBrowserSearchResults []HostDatastoreBrowserSearchResults `xml:"HostDatastoreBrowserSearchResults,omitempty"` } func init() { t["ArrayOfHostDatastoreBrowserSearchResults"] = reflect.TypeOf((*ArrayOfHostDatastoreBrowserSearchResults)(nil)).Elem() } type ArrayOfHostDatastoreConnectInfo struct { HostDatastoreConnectInfo []BaseHostDatastoreConnectInfo `xml:"HostDatastoreConnectInfo,omitempty,typeattr"` } func init() { t["ArrayOfHostDatastoreConnectInfo"] = reflect.TypeOf((*ArrayOfHostDatastoreConnectInfo)(nil)).Elem() } type ArrayOfHostDatastoreSystemDatastoreResult struct { HostDatastoreSystemDatastoreResult []HostDatastoreSystemDatastoreResult `xml:"HostDatastoreSystemDatastoreResult,omitempty"` } func init() { t["ArrayOfHostDatastoreSystemDatastoreResult"] = reflect.TypeOf((*ArrayOfHostDatastoreSystemDatastoreResult)(nil)).Elem() } type ArrayOfHostDateTimeSystemTimeZone struct { HostDateTimeSystemTimeZone []HostDateTimeSystemTimeZone `xml:"HostDateTimeSystemTimeZone,omitempty"` } func init() { t["ArrayOfHostDateTimeSystemTimeZone"] = reflect.TypeOf((*ArrayOfHostDateTimeSystemTimeZone)(nil)).Elem() } type ArrayOfHostDhcpService struct { HostDhcpService []HostDhcpService `xml:"HostDhcpService,omitempty"` } func init() { t["ArrayOfHostDhcpService"] = reflect.TypeOf((*ArrayOfHostDhcpService)(nil)).Elem() } type ArrayOfHostDhcpServiceConfig struct { HostDhcpServiceConfig []HostDhcpServiceConfig `xml:"HostDhcpServiceConfig,omitempty"` } func init() { t["ArrayOfHostDhcpServiceConfig"] = reflect.TypeOf((*ArrayOfHostDhcpServiceConfig)(nil)).Elem() } type ArrayOfHostDiagnosticPartition struct { HostDiagnosticPartition []HostDiagnosticPartition `xml:"HostDiagnosticPartition,omitempty"` } func init() { t["ArrayOfHostDiagnosticPartition"] = reflect.TypeOf((*ArrayOfHostDiagnosticPartition)(nil)).Elem() } type ArrayOfHostDiagnosticPartitionCreateOption struct { HostDiagnosticPartitionCreateOption []HostDiagnosticPartitionCreateOption `xml:"HostDiagnosticPartitionCreateOption,omitempty"` } func init() { t["ArrayOfHostDiagnosticPartitionCreateOption"] = reflect.TypeOf((*ArrayOfHostDiagnosticPartitionCreateOption)(nil)).Elem() } type ArrayOfHostDiskConfigurationResult struct { HostDiskConfigurationResult []HostDiskConfigurationResult `xml:"HostDiskConfigurationResult,omitempty"` } func init() { t["ArrayOfHostDiskConfigurationResult"] = reflect.TypeOf((*ArrayOfHostDiskConfigurationResult)(nil)).Elem() } type ArrayOfHostDiskMappingPartitionOption struct { HostDiskMappingPartitionOption []HostDiskMappingPartitionOption `xml:"HostDiskMappingPartitionOption,omitempty"` } func init() { t["ArrayOfHostDiskMappingPartitionOption"] = reflect.TypeOf((*ArrayOfHostDiskMappingPartitionOption)(nil)).Elem() } type ArrayOfHostDiskPartitionAttributes struct { HostDiskPartitionAttributes []HostDiskPartitionAttributes `xml:"HostDiskPartitionAttributes,omitempty"` } func init() { t["ArrayOfHostDiskPartitionAttributes"] = reflect.TypeOf((*ArrayOfHostDiskPartitionAttributes)(nil)).Elem() } type ArrayOfHostDiskPartitionBlockRange struct { HostDiskPartitionBlockRange []HostDiskPartitionBlockRange `xml:"HostDiskPartitionBlockRange,omitempty"` } func init() { t["ArrayOfHostDiskPartitionBlockRange"] = reflect.TypeOf((*ArrayOfHostDiskPartitionBlockRange)(nil)).Elem() } type ArrayOfHostDiskPartitionInfo struct { HostDiskPartitionInfo []HostDiskPartitionInfo `xml:"HostDiskPartitionInfo,omitempty"` } func init() { t["ArrayOfHostDiskPartitionInfo"] = reflect.TypeOf((*ArrayOfHostDiskPartitionInfo)(nil)).Elem() } type ArrayOfHostEventArgument struct { HostEventArgument []HostEventArgument `xml:"HostEventArgument,omitempty"` } func init() { t["ArrayOfHostEventArgument"] = reflect.TypeOf((*ArrayOfHostEventArgument)(nil)).Elem() } type ArrayOfHostFeatureCapability struct { HostFeatureCapability []HostFeatureCapability `xml:"HostFeatureCapability,omitempty"` } func init() { t["ArrayOfHostFeatureCapability"] = reflect.TypeOf((*ArrayOfHostFeatureCapability)(nil)).Elem() } type ArrayOfHostFeatureMask struct { HostFeatureMask []HostFeatureMask `xml:"HostFeatureMask,omitempty"` } func init() { t["ArrayOfHostFeatureMask"] = reflect.TypeOf((*ArrayOfHostFeatureMask)(nil)).Elem() } type ArrayOfHostFeatureVersionInfo struct { HostFeatureVersionInfo []HostFeatureVersionInfo `xml:"HostFeatureVersionInfo,omitempty"` } func init() { t["ArrayOfHostFeatureVersionInfo"] = reflect.TypeOf((*ArrayOfHostFeatureVersionInfo)(nil)).Elem() } type ArrayOfHostFileSystemMountInfo struct { HostFileSystemMountInfo []HostFileSystemMountInfo `xml:"HostFileSystemMountInfo,omitempty"` } func init() { t["ArrayOfHostFileSystemMountInfo"] = reflect.TypeOf((*ArrayOfHostFileSystemMountInfo)(nil)).Elem() } type ArrayOfHostFirewallConfigRuleSetConfig struct { HostFirewallConfigRuleSetConfig []HostFirewallConfigRuleSetConfig `xml:"HostFirewallConfigRuleSetConfig,omitempty"` } func init() { t["ArrayOfHostFirewallConfigRuleSetConfig"] = reflect.TypeOf((*ArrayOfHostFirewallConfigRuleSetConfig)(nil)).Elem() } type ArrayOfHostFirewallRule struct { HostFirewallRule []HostFirewallRule `xml:"HostFirewallRule,omitempty"` } func init() { t["ArrayOfHostFirewallRule"] = reflect.TypeOf((*ArrayOfHostFirewallRule)(nil)).Elem() } type ArrayOfHostFirewallRuleset struct { HostFirewallRuleset []HostFirewallRuleset `xml:"HostFirewallRuleset,omitempty"` } func init() { t["ArrayOfHostFirewallRuleset"] = reflect.TypeOf((*ArrayOfHostFirewallRuleset)(nil)).Elem() } type ArrayOfHostFirewallRulesetIpNetwork struct { HostFirewallRulesetIpNetwork []HostFirewallRulesetIpNetwork `xml:"HostFirewallRulesetIpNetwork,omitempty"` } func init() { t["ArrayOfHostFirewallRulesetIpNetwork"] = reflect.TypeOf((*ArrayOfHostFirewallRulesetIpNetwork)(nil)).Elem() } type ArrayOfHostGraphicsConfigDeviceType struct { HostGraphicsConfigDeviceType []HostGraphicsConfigDeviceType `xml:"HostGraphicsConfigDeviceType,omitempty"` } func init() { t["ArrayOfHostGraphicsConfigDeviceType"] = reflect.TypeOf((*ArrayOfHostGraphicsConfigDeviceType)(nil)).Elem() } type ArrayOfHostGraphicsInfo struct { HostGraphicsInfo []HostGraphicsInfo `xml:"HostGraphicsInfo,omitempty"` } func init() { t["ArrayOfHostGraphicsInfo"] = reflect.TypeOf((*ArrayOfHostGraphicsInfo)(nil)).Elem() } type ArrayOfHostHardwareElementInfo struct { HostHardwareElementInfo []BaseHostHardwareElementInfo `xml:"HostHardwareElementInfo,omitempty,typeattr"` } func init() { t["ArrayOfHostHardwareElementInfo"] = reflect.TypeOf((*ArrayOfHostHardwareElementInfo)(nil)).Elem() } type ArrayOfHostHostBusAdapter struct { HostHostBusAdapter []BaseHostHostBusAdapter `xml:"HostHostBusAdapter,omitempty,typeattr"` } func init() { t["ArrayOfHostHostBusAdapter"] = reflect.TypeOf((*ArrayOfHostHostBusAdapter)(nil)).Elem() } type ArrayOfHostInternetScsiHbaIscsiIpv6Address struct { HostInternetScsiHbaIscsiIpv6Address []HostInternetScsiHbaIscsiIpv6Address `xml:"HostInternetScsiHbaIscsiIpv6Address,omitempty"` } func init() { t["ArrayOfHostInternetScsiHbaIscsiIpv6Address"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaIscsiIpv6Address)(nil)).Elem() } type ArrayOfHostInternetScsiHbaParamValue struct { HostInternetScsiHbaParamValue []HostInternetScsiHbaParamValue `xml:"HostInternetScsiHbaParamValue,omitempty"` } func init() { t["ArrayOfHostInternetScsiHbaParamValue"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaParamValue)(nil)).Elem() } type ArrayOfHostInternetScsiHbaSendTarget struct { HostInternetScsiHbaSendTarget []HostInternetScsiHbaSendTarget `xml:"HostInternetScsiHbaSendTarget,omitempty"` } func init() { t["ArrayOfHostInternetScsiHbaSendTarget"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaSendTarget)(nil)).Elem() } type ArrayOfHostInternetScsiHbaStaticTarget struct { HostInternetScsiHbaStaticTarget []HostInternetScsiHbaStaticTarget `xml:"HostInternetScsiHbaStaticTarget,omitempty"` } func init() { t["ArrayOfHostInternetScsiHbaStaticTarget"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaStaticTarget)(nil)).Elem() } type ArrayOfHostIoFilterInfo struct { HostIoFilterInfo []HostIoFilterInfo `xml:"HostIoFilterInfo,omitempty"` } func init() { t["ArrayOfHostIoFilterInfo"] = reflect.TypeOf((*ArrayOfHostIoFilterInfo)(nil)).Elem() } type ArrayOfHostIpConfigIpV6Address struct { HostIpConfigIpV6Address []HostIpConfigIpV6Address `xml:"HostIpConfigIpV6Address,omitempty"` } func init() { t["ArrayOfHostIpConfigIpV6Address"] = reflect.TypeOf((*ArrayOfHostIpConfigIpV6Address)(nil)).Elem() } type ArrayOfHostIpRouteEntry struct { HostIpRouteEntry []HostIpRouteEntry `xml:"HostIpRouteEntry,omitempty"` } func init() { t["ArrayOfHostIpRouteEntry"] = reflect.TypeOf((*ArrayOfHostIpRouteEntry)(nil)).Elem() } type ArrayOfHostIpRouteOp struct { HostIpRouteOp []HostIpRouteOp `xml:"HostIpRouteOp,omitempty"` } func init() { t["ArrayOfHostIpRouteOp"] = reflect.TypeOf((*ArrayOfHostIpRouteOp)(nil)).Elem() } type ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec struct { HostLowLevelProvisioningManagerDiskLayoutSpec []HostLowLevelProvisioningManagerDiskLayoutSpec `xml:"HostLowLevelProvisioningManagerDiskLayoutSpec,omitempty"` } func init() { t["ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec)(nil)).Elem() } type ArrayOfHostLowLevelProvisioningManagerFileDeleteResult struct { HostLowLevelProvisioningManagerFileDeleteResult []HostLowLevelProvisioningManagerFileDeleteResult `xml:"HostLowLevelProvisioningManagerFileDeleteResult,omitempty"` } func init() { t["ArrayOfHostLowLevelProvisioningManagerFileDeleteResult"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileDeleteResult)(nil)).Elem() } type ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec struct { HostLowLevelProvisioningManagerFileDeleteSpec []HostLowLevelProvisioningManagerFileDeleteSpec `xml:"HostLowLevelProvisioningManagerFileDeleteSpec,omitempty"` } func init() { t["ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec)(nil)).Elem() } type ArrayOfHostLowLevelProvisioningManagerFileReserveResult struct { HostLowLevelProvisioningManagerFileReserveResult []HostLowLevelProvisioningManagerFileReserveResult `xml:"HostLowLevelProvisioningManagerFileReserveResult,omitempty"` } func init() { t["ArrayOfHostLowLevelProvisioningManagerFileReserveResult"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileReserveResult)(nil)).Elem() } type ArrayOfHostLowLevelProvisioningManagerFileReserveSpec struct { HostLowLevelProvisioningManagerFileReserveSpec []HostLowLevelProvisioningManagerFileReserveSpec `xml:"HostLowLevelProvisioningManagerFileReserveSpec,omitempty"` } func init() { t["ArrayOfHostLowLevelProvisioningManagerFileReserveSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileReserveSpec)(nil)).Elem() } type ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec struct { HostLowLevelProvisioningManagerSnapshotLayoutSpec []HostLowLevelProvisioningManagerSnapshotLayoutSpec `xml:"HostLowLevelProvisioningManagerSnapshotLayoutSpec,omitempty"` } func init() { t["ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec)(nil)).Elem() } type ArrayOfHostMemberHealthCheckResult struct { HostMemberHealthCheckResult []BaseHostMemberHealthCheckResult `xml:"HostMemberHealthCheckResult,omitempty,typeattr"` } func init() { t["ArrayOfHostMemberHealthCheckResult"] = reflect.TypeOf((*ArrayOfHostMemberHealthCheckResult)(nil)).Elem() } type ArrayOfHostMemberRuntimeInfo struct { HostMemberRuntimeInfo []HostMemberRuntimeInfo `xml:"HostMemberRuntimeInfo,omitempty"` } func init() { t["ArrayOfHostMemberRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostMemberRuntimeInfo)(nil)).Elem() } type ArrayOfHostMultipathInfoLogicalUnit struct { HostMultipathInfoLogicalUnit []HostMultipathInfoLogicalUnit `xml:"HostMultipathInfoLogicalUnit,omitempty"` } func init() { t["ArrayOfHostMultipathInfoLogicalUnit"] = reflect.TypeOf((*ArrayOfHostMultipathInfoLogicalUnit)(nil)).Elem() } type ArrayOfHostMultipathInfoPath struct { HostMultipathInfoPath []HostMultipathInfoPath `xml:"HostMultipathInfoPath,omitempty"` } func init() { t["ArrayOfHostMultipathInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathInfoPath)(nil)).Elem() } type ArrayOfHostMultipathStateInfoPath struct { HostMultipathStateInfoPath []HostMultipathStateInfoPath `xml:"HostMultipathStateInfoPath,omitempty"` } func init() { t["ArrayOfHostMultipathStateInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathStateInfoPath)(nil)).Elem() } type ArrayOfHostNasVolumeConfig struct { HostNasVolumeConfig []HostNasVolumeConfig `xml:"HostNasVolumeConfig,omitempty"` } func init() { t["ArrayOfHostNasVolumeConfig"] = reflect.TypeOf((*ArrayOfHostNasVolumeConfig)(nil)).Elem() } type ArrayOfHostNatService struct { HostNatService []HostNatService `xml:"HostNatService,omitempty"` } func init() { t["ArrayOfHostNatService"] = reflect.TypeOf((*ArrayOfHostNatService)(nil)).Elem() } type ArrayOfHostNatServiceConfig struct { HostNatServiceConfig []HostNatServiceConfig `xml:"HostNatServiceConfig,omitempty"` } func init() { t["ArrayOfHostNatServiceConfig"] = reflect.TypeOf((*ArrayOfHostNatServiceConfig)(nil)).Elem() } type ArrayOfHostNatServicePortForwardSpec struct { HostNatServicePortForwardSpec []HostNatServicePortForwardSpec `xml:"HostNatServicePortForwardSpec,omitempty"` } func init() { t["ArrayOfHostNatServicePortForwardSpec"] = reflect.TypeOf((*ArrayOfHostNatServicePortForwardSpec)(nil)).Elem() } type ArrayOfHostNetStackInstance struct { HostNetStackInstance []HostNetStackInstance `xml:"HostNetStackInstance,omitempty"` } func init() { t["ArrayOfHostNetStackInstance"] = reflect.TypeOf((*ArrayOfHostNetStackInstance)(nil)).Elem() } type ArrayOfHostNetworkConfigNetStackSpec struct { HostNetworkConfigNetStackSpec []HostNetworkConfigNetStackSpec `xml:"HostNetworkConfigNetStackSpec,omitempty"` } func init() { t["ArrayOfHostNetworkConfigNetStackSpec"] = reflect.TypeOf((*ArrayOfHostNetworkConfigNetStackSpec)(nil)).Elem() } type ArrayOfHostNumaNode struct { HostNumaNode []HostNumaNode `xml:"HostNumaNode,omitempty"` } func init() { t["ArrayOfHostNumaNode"] = reflect.TypeOf((*ArrayOfHostNumaNode)(nil)).Elem() } type ArrayOfHostNumericSensorInfo struct { HostNumericSensorInfo []HostNumericSensorInfo `xml:"HostNumericSensorInfo,omitempty"` } func init() { t["ArrayOfHostNumericSensorInfo"] = reflect.TypeOf((*ArrayOfHostNumericSensorInfo)(nil)).Elem() } type ArrayOfHostOpaqueNetworkInfo struct { HostOpaqueNetworkInfo []HostOpaqueNetworkInfo `xml:"HostOpaqueNetworkInfo,omitempty"` } func init() { t["ArrayOfHostOpaqueNetworkInfo"] = reflect.TypeOf((*ArrayOfHostOpaqueNetworkInfo)(nil)).Elem() } type ArrayOfHostOpaqueSwitch struct { HostOpaqueSwitch []HostOpaqueSwitch `xml:"HostOpaqueSwitch,omitempty"` } func init() { t["ArrayOfHostOpaqueSwitch"] = reflect.TypeOf((*ArrayOfHostOpaqueSwitch)(nil)).Elem() } type ArrayOfHostOpaqueSwitchPhysicalNicZone struct { HostOpaqueSwitchPhysicalNicZone []HostOpaqueSwitchPhysicalNicZone `xml:"HostOpaqueSwitchPhysicalNicZone,omitempty"` } func init() { t["ArrayOfHostOpaqueSwitchPhysicalNicZone"] = reflect.TypeOf((*ArrayOfHostOpaqueSwitchPhysicalNicZone)(nil)).Elem() } type ArrayOfHostPatchManagerStatus struct { HostPatchManagerStatus []HostPatchManagerStatus `xml:"HostPatchManagerStatus,omitempty"` } func init() { t["ArrayOfHostPatchManagerStatus"] = reflect.TypeOf((*ArrayOfHostPatchManagerStatus)(nil)).Elem() } type ArrayOfHostPatchManagerStatusPrerequisitePatch struct { HostPatchManagerStatusPrerequisitePatch []HostPatchManagerStatusPrerequisitePatch `xml:"HostPatchManagerStatusPrerequisitePatch,omitempty"` } func init() { t["ArrayOfHostPatchManagerStatusPrerequisitePatch"] = reflect.TypeOf((*ArrayOfHostPatchManagerStatusPrerequisitePatch)(nil)).Elem() } type ArrayOfHostPathSelectionPolicyOption struct { HostPathSelectionPolicyOption []HostPathSelectionPolicyOption `xml:"HostPathSelectionPolicyOption,omitempty"` } func init() { t["ArrayOfHostPathSelectionPolicyOption"] = reflect.TypeOf((*ArrayOfHostPathSelectionPolicyOption)(nil)).Elem() } type ArrayOfHostPciDevice struct { HostPciDevice []HostPciDevice `xml:"HostPciDevice,omitempty"` } func init() { t["ArrayOfHostPciDevice"] = reflect.TypeOf((*ArrayOfHostPciDevice)(nil)).Elem() } type ArrayOfHostPciPassthruConfig struct { HostPciPassthruConfig []BaseHostPciPassthruConfig `xml:"HostPciPassthruConfig,omitempty,typeattr"` } func init() { t["ArrayOfHostPciPassthruConfig"] = reflect.TypeOf((*ArrayOfHostPciPassthruConfig)(nil)).Elem() } type ArrayOfHostPciPassthruInfo struct { HostPciPassthruInfo []BaseHostPciPassthruInfo `xml:"HostPciPassthruInfo,omitempty,typeattr"` } func init() { t["ArrayOfHostPciPassthruInfo"] = reflect.TypeOf((*ArrayOfHostPciPassthruInfo)(nil)).Elem() } type ArrayOfHostPlacedVirtualNicIdentifier struct { HostPlacedVirtualNicIdentifier []HostPlacedVirtualNicIdentifier `xml:"HostPlacedVirtualNicIdentifier,omitempty"` } func init() { t["ArrayOfHostPlacedVirtualNicIdentifier"] = reflect.TypeOf((*ArrayOfHostPlacedVirtualNicIdentifier)(nil)).Elem() } type ArrayOfHostPlugStoreTopologyAdapter struct { HostPlugStoreTopologyAdapter []HostPlugStoreTopologyAdapter `xml:"HostPlugStoreTopologyAdapter,omitempty"` } func init() { t["ArrayOfHostPlugStoreTopologyAdapter"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyAdapter)(nil)).Elem() } type ArrayOfHostPlugStoreTopologyDevice struct { HostPlugStoreTopologyDevice []HostPlugStoreTopologyDevice `xml:"HostPlugStoreTopologyDevice,omitempty"` } func init() { t["ArrayOfHostPlugStoreTopologyDevice"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyDevice)(nil)).Elem() } type ArrayOfHostPlugStoreTopologyPath struct { HostPlugStoreTopologyPath []HostPlugStoreTopologyPath `xml:"HostPlugStoreTopologyPath,omitempty"` } func init() { t["ArrayOfHostPlugStoreTopologyPath"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPath)(nil)).Elem() } type ArrayOfHostPlugStoreTopologyPlugin struct { HostPlugStoreTopologyPlugin []HostPlugStoreTopologyPlugin `xml:"HostPlugStoreTopologyPlugin,omitempty"` } func init() { t["ArrayOfHostPlugStoreTopologyPlugin"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPlugin)(nil)).Elem() } type ArrayOfHostPlugStoreTopologyTarget struct { HostPlugStoreTopologyTarget []HostPlugStoreTopologyTarget `xml:"HostPlugStoreTopologyTarget,omitempty"` } func init() { t["ArrayOfHostPlugStoreTopologyTarget"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyTarget)(nil)).Elem() } type ArrayOfHostPnicNetworkResourceInfo struct { HostPnicNetworkResourceInfo []HostPnicNetworkResourceInfo `xml:"HostPnicNetworkResourceInfo,omitempty"` } func init() { t["ArrayOfHostPnicNetworkResourceInfo"] = reflect.TypeOf((*ArrayOfHostPnicNetworkResourceInfo)(nil)).Elem() } type ArrayOfHostPortGroup struct { HostPortGroup []HostPortGroup `xml:"HostPortGroup,omitempty"` } func init() { t["ArrayOfHostPortGroup"] = reflect.TypeOf((*ArrayOfHostPortGroup)(nil)).Elem() } type ArrayOfHostPortGroupConfig struct { HostPortGroupConfig []HostPortGroupConfig `xml:"HostPortGroupConfig,omitempty"` } func init() { t["ArrayOfHostPortGroupConfig"] = reflect.TypeOf((*ArrayOfHostPortGroupConfig)(nil)).Elem() } type ArrayOfHostPortGroupPort struct { HostPortGroupPort []HostPortGroupPort `xml:"HostPortGroupPort,omitempty"` } func init() { t["ArrayOfHostPortGroupPort"] = reflect.TypeOf((*ArrayOfHostPortGroupPort)(nil)).Elem() } type ArrayOfHostPortGroupProfile struct { HostPortGroupProfile []HostPortGroupProfile `xml:"HostPortGroupProfile,omitempty"` } func init() { t["ArrayOfHostPortGroupProfile"] = reflect.TypeOf((*ArrayOfHostPortGroupProfile)(nil)).Elem() } type ArrayOfHostPowerPolicy struct { HostPowerPolicy []HostPowerPolicy `xml:"HostPowerPolicy,omitempty"` } func init() { t["ArrayOfHostPowerPolicy"] = reflect.TypeOf((*ArrayOfHostPowerPolicy)(nil)).Elem() } type ArrayOfHostProfileManagerCompositionValidationResultResultElement struct { HostProfileManagerCompositionValidationResultResultElement []HostProfileManagerCompositionValidationResultResultElement `xml:"HostProfileManagerCompositionValidationResultResultElement,omitempty"` } func init() { t["ArrayOfHostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*ArrayOfHostProfileManagerCompositionValidationResultResultElement)(nil)).Elem() } type ArrayOfHostProfileManagerHostToConfigSpecMap struct { HostProfileManagerHostToConfigSpecMap []HostProfileManagerHostToConfigSpecMap `xml:"HostProfileManagerHostToConfigSpecMap,omitempty"` } func init() { t["ArrayOfHostProfileManagerHostToConfigSpecMap"] = reflect.TypeOf((*ArrayOfHostProfileManagerHostToConfigSpecMap)(nil)).Elem() } type ArrayOfHostProfilesEntityCustomizations struct { HostProfilesEntityCustomizations []BaseHostProfilesEntityCustomizations `xml:"HostProfilesEntityCustomizations,omitempty,typeattr"` } func init() { t["ArrayOfHostProfilesEntityCustomizations"] = reflect.TypeOf((*ArrayOfHostProfilesEntityCustomizations)(nil)).Elem() } type ArrayOfHostProtocolEndpoint struct { HostProtocolEndpoint []HostProtocolEndpoint `xml:"HostProtocolEndpoint,omitempty"` } func init() { t["ArrayOfHostProtocolEndpoint"] = reflect.TypeOf((*ArrayOfHostProtocolEndpoint)(nil)).Elem() } type ArrayOfHostProxySwitch struct { HostProxySwitch []HostProxySwitch `xml:"HostProxySwitch,omitempty"` } func init() { t["ArrayOfHostProxySwitch"] = reflect.TypeOf((*ArrayOfHostProxySwitch)(nil)).Elem() } type ArrayOfHostProxySwitchConfig struct { HostProxySwitchConfig []HostProxySwitchConfig `xml:"HostProxySwitchConfig,omitempty"` } func init() { t["ArrayOfHostProxySwitchConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchConfig)(nil)).Elem() } type ArrayOfHostProxySwitchHostLagConfig struct { HostProxySwitchHostLagConfig []HostProxySwitchHostLagConfig `xml:"HostProxySwitchHostLagConfig,omitempty"` } func init() { t["ArrayOfHostProxySwitchHostLagConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchHostLagConfig)(nil)).Elem() } type ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo struct { HostRuntimeInfoNetStackInstanceRuntimeInfo []HostRuntimeInfoNetStackInstanceRuntimeInfo `xml:"HostRuntimeInfoNetStackInstanceRuntimeInfo,omitempty"` } func init() { t["ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo)(nil)).Elem() } type ArrayOfHostScsiDisk struct { HostScsiDisk []HostScsiDisk `xml:"HostScsiDisk,omitempty"` } func init() { t["ArrayOfHostScsiDisk"] = reflect.TypeOf((*ArrayOfHostScsiDisk)(nil)).Elem() } type ArrayOfHostScsiDiskPartition struct { HostScsiDiskPartition []HostScsiDiskPartition `xml:"HostScsiDiskPartition,omitempty"` } func init() { t["ArrayOfHostScsiDiskPartition"] = reflect.TypeOf((*ArrayOfHostScsiDiskPartition)(nil)).Elem() } type ArrayOfHostScsiTopologyInterface struct { HostScsiTopologyInterface []HostScsiTopologyInterface `xml:"HostScsiTopologyInterface,omitempty"` } func init() { t["ArrayOfHostScsiTopologyInterface"] = reflect.TypeOf((*ArrayOfHostScsiTopologyInterface)(nil)).Elem() } type ArrayOfHostScsiTopologyLun struct { HostScsiTopologyLun []HostScsiTopologyLun `xml:"HostScsiTopologyLun,omitempty"` } func init() { t["ArrayOfHostScsiTopologyLun"] = reflect.TypeOf((*ArrayOfHostScsiTopologyLun)(nil)).Elem() } type ArrayOfHostScsiTopologyTarget struct { HostScsiTopologyTarget []HostScsiTopologyTarget `xml:"HostScsiTopologyTarget,omitempty"` } func init() { t["ArrayOfHostScsiTopologyTarget"] = reflect.TypeOf((*ArrayOfHostScsiTopologyTarget)(nil)).Elem() } type ArrayOfHostService struct { HostService []HostService `xml:"HostService,omitempty"` } func init() { t["ArrayOfHostService"] = reflect.TypeOf((*ArrayOfHostService)(nil)).Elem() } type ArrayOfHostServiceConfig struct { HostServiceConfig []HostServiceConfig `xml:"HostServiceConfig,omitempty"` } func init() { t["ArrayOfHostServiceConfig"] = reflect.TypeOf((*ArrayOfHostServiceConfig)(nil)).Elem() } type ArrayOfHostSnmpDestination struct { HostSnmpDestination []HostSnmpDestination `xml:"HostSnmpDestination,omitempty"` } func init() { t["ArrayOfHostSnmpDestination"] = reflect.TypeOf((*ArrayOfHostSnmpDestination)(nil)).Elem() } type ArrayOfHostSriovDevicePoolInfo struct { HostSriovDevicePoolInfo []BaseHostSriovDevicePoolInfo `xml:"HostSriovDevicePoolInfo,omitempty,typeattr"` } func init() { t["ArrayOfHostSriovDevicePoolInfo"] = reflect.TypeOf((*ArrayOfHostSriovDevicePoolInfo)(nil)).Elem() } type ArrayOfHostSslThumbprintInfo struct { HostSslThumbprintInfo []HostSslThumbprintInfo `xml:"HostSslThumbprintInfo,omitempty"` } func init() { t["ArrayOfHostSslThumbprintInfo"] = reflect.TypeOf((*ArrayOfHostSslThumbprintInfo)(nil)).Elem() } type ArrayOfHostStorageArrayTypePolicyOption struct { HostStorageArrayTypePolicyOption []HostStorageArrayTypePolicyOption `xml:"HostStorageArrayTypePolicyOption,omitempty"` } func init() { t["ArrayOfHostStorageArrayTypePolicyOption"] = reflect.TypeOf((*ArrayOfHostStorageArrayTypePolicyOption)(nil)).Elem() } type ArrayOfHostStorageElementInfo struct { HostStorageElementInfo []HostStorageElementInfo `xml:"HostStorageElementInfo,omitempty"` } func init() { t["ArrayOfHostStorageElementInfo"] = reflect.TypeOf((*ArrayOfHostStorageElementInfo)(nil)).Elem() } type ArrayOfHostStorageOperationalInfo struct { HostStorageOperationalInfo []HostStorageOperationalInfo `xml:"HostStorageOperationalInfo,omitempty"` } func init() { t["ArrayOfHostStorageOperationalInfo"] = reflect.TypeOf((*ArrayOfHostStorageOperationalInfo)(nil)).Elem() } type ArrayOfHostStorageSystemDiskLocatorLedResult struct { HostStorageSystemDiskLocatorLedResult []HostStorageSystemDiskLocatorLedResult `xml:"HostStorageSystemDiskLocatorLedResult,omitempty"` } func init() { t["ArrayOfHostStorageSystemDiskLocatorLedResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemDiskLocatorLedResult)(nil)).Elem() } type ArrayOfHostStorageSystemScsiLunResult struct { HostStorageSystemScsiLunResult []HostStorageSystemScsiLunResult `xml:"HostStorageSystemScsiLunResult,omitempty"` } func init() { t["ArrayOfHostStorageSystemScsiLunResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemScsiLunResult)(nil)).Elem() } type ArrayOfHostStorageSystemVmfsVolumeResult struct { HostStorageSystemVmfsVolumeResult []HostStorageSystemVmfsVolumeResult `xml:"HostStorageSystemVmfsVolumeResult,omitempty"` } func init() { t["ArrayOfHostStorageSystemVmfsVolumeResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemVmfsVolumeResult)(nil)).Elem() } type ArrayOfHostSubSpecification struct { HostSubSpecification []HostSubSpecification `xml:"HostSubSpecification,omitempty"` } func init() { t["ArrayOfHostSubSpecification"] = reflect.TypeOf((*ArrayOfHostSubSpecification)(nil)).Elem() } type ArrayOfHostSystemIdentificationInfo struct { HostSystemIdentificationInfo []HostSystemIdentificationInfo `xml:"HostSystemIdentificationInfo,omitempty"` } func init() { t["ArrayOfHostSystemIdentificationInfo"] = reflect.TypeOf((*ArrayOfHostSystemIdentificationInfo)(nil)).Elem() } type ArrayOfHostSystemResourceInfo struct { HostSystemResourceInfo []HostSystemResourceInfo `xml:"HostSystemResourceInfo,omitempty"` } func init() { t["ArrayOfHostSystemResourceInfo"] = reflect.TypeOf((*ArrayOfHostSystemResourceInfo)(nil)).Elem() } type ArrayOfHostSystemSwapConfigurationSystemSwapOption struct { HostSystemSwapConfigurationSystemSwapOption []BaseHostSystemSwapConfigurationSystemSwapOption `xml:"HostSystemSwapConfigurationSystemSwapOption,omitempty,typeattr"` } func init() { t["ArrayOfHostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*ArrayOfHostSystemSwapConfigurationSystemSwapOption)(nil)).Elem() } type ArrayOfHostTpmDigestInfo struct { HostTpmDigestInfo []HostTpmDigestInfo `xml:"HostTpmDigestInfo,omitempty"` } func init() { t["ArrayOfHostTpmDigestInfo"] = reflect.TypeOf((*ArrayOfHostTpmDigestInfo)(nil)).Elem() } type ArrayOfHostTpmEventLogEntry struct { HostTpmEventLogEntry []HostTpmEventLogEntry `xml:"HostTpmEventLogEntry,omitempty"` } func init() { t["ArrayOfHostTpmEventLogEntry"] = reflect.TypeOf((*ArrayOfHostTpmEventLogEntry)(nil)).Elem() } type ArrayOfHostUnresolvedVmfsExtent struct { HostUnresolvedVmfsExtent []HostUnresolvedVmfsExtent `xml:"HostUnresolvedVmfsExtent,omitempty"` } func init() { t["ArrayOfHostUnresolvedVmfsExtent"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsExtent)(nil)).Elem() } type ArrayOfHostUnresolvedVmfsResolutionResult struct { HostUnresolvedVmfsResolutionResult []HostUnresolvedVmfsResolutionResult `xml:"HostUnresolvedVmfsResolutionResult,omitempty"` } func init() { t["ArrayOfHostUnresolvedVmfsResolutionResult"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsResolutionResult)(nil)).Elem() } type ArrayOfHostUnresolvedVmfsResolutionSpec struct { HostUnresolvedVmfsResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"HostUnresolvedVmfsResolutionSpec,omitempty"` } func init() { t["ArrayOfHostUnresolvedVmfsResolutionSpec"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsResolutionSpec)(nil)).Elem() } type ArrayOfHostUnresolvedVmfsVolume struct { HostUnresolvedVmfsVolume []HostUnresolvedVmfsVolume `xml:"HostUnresolvedVmfsVolume,omitempty"` } func init() { t["ArrayOfHostUnresolvedVmfsVolume"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsVolume)(nil)).Elem() } type ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption struct { HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption []HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption,omitempty"` } func init() { t["ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption"] = reflect.TypeOf((*ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption)(nil)).Elem() } type ArrayOfHostVMotionCompatibility struct { HostVMotionCompatibility []HostVMotionCompatibility `xml:"HostVMotionCompatibility,omitempty"` } func init() { t["ArrayOfHostVMotionCompatibility"] = reflect.TypeOf((*ArrayOfHostVMotionCompatibility)(nil)).Elem() } type ArrayOfHostVirtualNic struct { HostVirtualNic []HostVirtualNic `xml:"HostVirtualNic,omitempty"` } func init() { t["ArrayOfHostVirtualNic"] = reflect.TypeOf((*ArrayOfHostVirtualNic)(nil)).Elem() } type ArrayOfHostVirtualNicConfig struct { HostVirtualNicConfig []HostVirtualNicConfig `xml:"HostVirtualNicConfig,omitempty"` } func init() { t["ArrayOfHostVirtualNicConfig"] = reflect.TypeOf((*ArrayOfHostVirtualNicConfig)(nil)).Elem() } type ArrayOfHostVirtualNicManagerNicTypeSelection struct { HostVirtualNicManagerNicTypeSelection []HostVirtualNicManagerNicTypeSelection `xml:"HostVirtualNicManagerNicTypeSelection,omitempty"` } func init() { t["ArrayOfHostVirtualNicManagerNicTypeSelection"] = reflect.TypeOf((*ArrayOfHostVirtualNicManagerNicTypeSelection)(nil)).Elem() } type ArrayOfHostVirtualSwitch struct { HostVirtualSwitch []HostVirtualSwitch `xml:"HostVirtualSwitch,omitempty"` } func init() { t["ArrayOfHostVirtualSwitch"] = reflect.TypeOf((*ArrayOfHostVirtualSwitch)(nil)).Elem() } type ArrayOfHostVirtualSwitchConfig struct { HostVirtualSwitchConfig []HostVirtualSwitchConfig `xml:"HostVirtualSwitchConfig,omitempty"` } func init() { t["ArrayOfHostVirtualSwitchConfig"] = reflect.TypeOf((*ArrayOfHostVirtualSwitchConfig)(nil)).Elem() } type ArrayOfHostVmciAccessManagerAccessSpec struct { HostVmciAccessManagerAccessSpec []HostVmciAccessManagerAccessSpec `xml:"HostVmciAccessManagerAccessSpec,omitempty"` } func init() { t["ArrayOfHostVmciAccessManagerAccessSpec"] = reflect.TypeOf((*ArrayOfHostVmciAccessManagerAccessSpec)(nil)).Elem() } type ArrayOfHostVmfsRescanResult struct { HostVmfsRescanResult []HostVmfsRescanResult `xml:"HostVmfsRescanResult,omitempty"` } func init() { t["ArrayOfHostVmfsRescanResult"] = reflect.TypeOf((*ArrayOfHostVmfsRescanResult)(nil)).Elem() } type ArrayOfHostVsanInternalSystemCmmdsQuery struct { HostVsanInternalSystemCmmdsQuery []HostVsanInternalSystemCmmdsQuery `xml:"HostVsanInternalSystemCmmdsQuery,omitempty"` } func init() { t["ArrayOfHostVsanInternalSystemCmmdsQuery"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemCmmdsQuery)(nil)).Elem() } type ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult struct { HostVsanInternalSystemDeleteVsanObjectsResult []HostVsanInternalSystemDeleteVsanObjectsResult `xml:"HostVsanInternalSystemDeleteVsanObjectsResult,omitempty"` } func init() { t["ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult)(nil)).Elem() } type ArrayOfHostVsanInternalSystemVsanObjectOperationResult struct { HostVsanInternalSystemVsanObjectOperationResult []HostVsanInternalSystemVsanObjectOperationResult `xml:"HostVsanInternalSystemVsanObjectOperationResult,omitempty"` } func init() { t["ArrayOfHostVsanInternalSystemVsanObjectOperationResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemVsanObjectOperationResult)(nil)).Elem() } type ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult struct { HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult []HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult `xml:"HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult,omitempty"` } func init() { t["ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult)(nil)).Elem() } type ArrayOfHttpNfcLeaseDatastoreLeaseInfo struct { HttpNfcLeaseDatastoreLeaseInfo []HttpNfcLeaseDatastoreLeaseInfo `xml:"HttpNfcLeaseDatastoreLeaseInfo,omitempty"` } func init() { t["ArrayOfHttpNfcLeaseDatastoreLeaseInfo"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseDatastoreLeaseInfo)(nil)).Elem() } type ArrayOfHttpNfcLeaseDeviceUrl struct { HttpNfcLeaseDeviceUrl []HttpNfcLeaseDeviceUrl `xml:"HttpNfcLeaseDeviceUrl,omitempty"` } func init() { t["ArrayOfHttpNfcLeaseDeviceUrl"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseDeviceUrl)(nil)).Elem() } type ArrayOfHttpNfcLeaseHostInfo struct { HttpNfcLeaseHostInfo []HttpNfcLeaseHostInfo `xml:"HttpNfcLeaseHostInfo,omitempty"` } func init() { t["ArrayOfHttpNfcLeaseHostInfo"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseHostInfo)(nil)).Elem() } type ArrayOfHttpNfcLeaseManifestEntry struct { HttpNfcLeaseManifestEntry []HttpNfcLeaseManifestEntry `xml:"HttpNfcLeaseManifestEntry,omitempty"` } func init() { t["ArrayOfHttpNfcLeaseManifestEntry"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseManifestEntry)(nil)).Elem() } type ArrayOfID struct { ID []ID `xml:"ID,omitempty"` } func init() { t["ArrayOfID"] = reflect.TypeOf((*ArrayOfID)(nil)).Elem() } type ArrayOfImportOperationBulkFaultFaultOnImport struct { ImportOperationBulkFaultFaultOnImport []ImportOperationBulkFaultFaultOnImport `xml:"ImportOperationBulkFaultFaultOnImport,omitempty"` } func init() { t["ArrayOfImportOperationBulkFaultFaultOnImport"] = reflect.TypeOf((*ArrayOfImportOperationBulkFaultFaultOnImport)(nil)).Elem() } type ArrayOfImportSpec struct { ImportSpec []BaseImportSpec `xml:"ImportSpec,omitempty,typeattr"` } func init() { t["ArrayOfImportSpec"] = reflect.TypeOf((*ArrayOfImportSpec)(nil)).Elem() } type ArrayOfInt struct { Int []int32 `xml:"int,omitempty"` } func init() { t["ArrayOfInt"] = reflect.TypeOf((*ArrayOfInt)(nil)).Elem() } type ArrayOfIoFilterHostIssue struct { IoFilterHostIssue []IoFilterHostIssue `xml:"IoFilterHostIssue,omitempty"` } func init() { t["ArrayOfIoFilterHostIssue"] = reflect.TypeOf((*ArrayOfIoFilterHostIssue)(nil)).Elem() } type ArrayOfIpPool struct { IpPool []IpPool `xml:"IpPool,omitempty"` } func init() { t["ArrayOfIpPool"] = reflect.TypeOf((*ArrayOfIpPool)(nil)).Elem() } type ArrayOfIpPoolAssociation struct { IpPoolAssociation []IpPoolAssociation `xml:"IpPoolAssociation,omitempty"` } func init() { t["ArrayOfIpPoolAssociation"] = reflect.TypeOf((*ArrayOfIpPoolAssociation)(nil)).Elem() } type ArrayOfIpPoolManagerIpAllocation struct { IpPoolManagerIpAllocation []IpPoolManagerIpAllocation `xml:"IpPoolManagerIpAllocation,omitempty"` } func init() { t["ArrayOfIpPoolManagerIpAllocation"] = reflect.TypeOf((*ArrayOfIpPoolManagerIpAllocation)(nil)).Elem() } type ArrayOfIscsiDependencyEntity struct { IscsiDependencyEntity []IscsiDependencyEntity `xml:"IscsiDependencyEntity,omitempty"` } func init() { t["ArrayOfIscsiDependencyEntity"] = reflect.TypeOf((*ArrayOfIscsiDependencyEntity)(nil)).Elem() } type ArrayOfIscsiPortInfo struct { IscsiPortInfo []IscsiPortInfo `xml:"IscsiPortInfo,omitempty"` } func init() { t["ArrayOfIscsiPortInfo"] = reflect.TypeOf((*ArrayOfIscsiPortInfo)(nil)).Elem() } type ArrayOfKernelModuleInfo struct { KernelModuleInfo []KernelModuleInfo `xml:"KernelModuleInfo,omitempty"` } func init() { t["ArrayOfKernelModuleInfo"] = reflect.TypeOf((*ArrayOfKernelModuleInfo)(nil)).Elem() } type ArrayOfKeyAnyValue struct { KeyAnyValue []KeyAnyValue `xml:"KeyAnyValue,omitempty"` } func init() { t["ArrayOfKeyAnyValue"] = reflect.TypeOf((*ArrayOfKeyAnyValue)(nil)).Elem() } type ArrayOfKeyValue struct { KeyValue []KeyValue `xml:"KeyValue,omitempty"` } func init() { t["ArrayOfKeyValue"] = reflect.TypeOf((*ArrayOfKeyValue)(nil)).Elem() } type ArrayOfKmipClusterInfo struct { KmipClusterInfo []KmipClusterInfo `xml:"KmipClusterInfo,omitempty"` } func init() { t["ArrayOfKmipClusterInfo"] = reflect.TypeOf((*ArrayOfKmipClusterInfo)(nil)).Elem() } type ArrayOfKmipServerInfo struct { KmipServerInfo []KmipServerInfo `xml:"KmipServerInfo,omitempty"` } func init() { t["ArrayOfKmipServerInfo"] = reflect.TypeOf((*ArrayOfKmipServerInfo)(nil)).Elem() } type ArrayOfLicenseAssignmentManagerLicenseAssignment struct { LicenseAssignmentManagerLicenseAssignment []LicenseAssignmentManagerLicenseAssignment `xml:"LicenseAssignmentManagerLicenseAssignment,omitempty"` } func init() { t["ArrayOfLicenseAssignmentManagerLicenseAssignment"] = reflect.TypeOf((*ArrayOfLicenseAssignmentManagerLicenseAssignment)(nil)).Elem() } type ArrayOfLicenseAvailabilityInfo struct { LicenseAvailabilityInfo []LicenseAvailabilityInfo `xml:"LicenseAvailabilityInfo,omitempty"` } func init() { t["ArrayOfLicenseAvailabilityInfo"] = reflect.TypeOf((*ArrayOfLicenseAvailabilityInfo)(nil)).Elem() } type ArrayOfLicenseFeatureInfo struct { LicenseFeatureInfo []LicenseFeatureInfo `xml:"LicenseFeatureInfo,omitempty"` } func init() { t["ArrayOfLicenseFeatureInfo"] = reflect.TypeOf((*ArrayOfLicenseFeatureInfo)(nil)).Elem() } type ArrayOfLicenseManagerLicenseInfo struct { LicenseManagerLicenseInfo []LicenseManagerLicenseInfo `xml:"LicenseManagerLicenseInfo,omitempty"` } func init() { t["ArrayOfLicenseManagerLicenseInfo"] = reflect.TypeOf((*ArrayOfLicenseManagerLicenseInfo)(nil)).Elem() } type ArrayOfLicenseReservationInfo struct { LicenseReservationInfo []LicenseReservationInfo `xml:"LicenseReservationInfo,omitempty"` } func init() { t["ArrayOfLicenseReservationInfo"] = reflect.TypeOf((*ArrayOfLicenseReservationInfo)(nil)).Elem() } type ArrayOfLocalizableMessage struct { LocalizableMessage []LocalizableMessage `xml:"LocalizableMessage,omitempty"` } func init() { t["ArrayOfLocalizableMessage"] = reflect.TypeOf((*ArrayOfLocalizableMessage)(nil)).Elem() } type ArrayOfLocalizationManagerMessageCatalog struct { LocalizationManagerMessageCatalog []LocalizationManagerMessageCatalog `xml:"LocalizationManagerMessageCatalog,omitempty"` } func init() { t["ArrayOfLocalizationManagerMessageCatalog"] = reflect.TypeOf((*ArrayOfLocalizationManagerMessageCatalog)(nil)).Elem() } type ArrayOfLong struct { Long []int64 `xml:"long,omitempty"` } func init() { t["ArrayOfLong"] = reflect.TypeOf((*ArrayOfLong)(nil)).Elem() } type ArrayOfManagedObjectReference struct { ManagedObjectReference []ManagedObjectReference `xml:"ManagedObjectReference,omitempty"` } func init() { t["ArrayOfManagedObjectReference"] = reflect.TypeOf((*ArrayOfManagedObjectReference)(nil)).Elem() } type ArrayOfMethodActionArgument struct { MethodActionArgument []MethodActionArgument `xml:"MethodActionArgument,omitempty"` } func init() { t["ArrayOfMethodActionArgument"] = reflect.TypeOf((*ArrayOfMethodActionArgument)(nil)).Elem() } type ArrayOfMethodFault struct { MethodFault []BaseMethodFault `xml:"MethodFault,omitempty,typeattr"` } func init() { t["ArrayOfMethodFault"] = reflect.TypeOf((*ArrayOfMethodFault)(nil)).Elem() } type ArrayOfMissingObject struct { MissingObject []MissingObject `xml:"MissingObject,omitempty"` } func init() { t["ArrayOfMissingObject"] = reflect.TypeOf((*ArrayOfMissingObject)(nil)).Elem() } type ArrayOfMissingProperty struct { MissingProperty []MissingProperty `xml:"MissingProperty,omitempty"` } func init() { t["ArrayOfMissingProperty"] = reflect.TypeOf((*ArrayOfMissingProperty)(nil)).Elem() } type ArrayOfMultipleCertificatesVerifyFaultThumbprintData struct { MultipleCertificatesVerifyFaultThumbprintData []MultipleCertificatesVerifyFaultThumbprintData `xml:"MultipleCertificatesVerifyFaultThumbprintData,omitempty"` } func init() { t["ArrayOfMultipleCertificatesVerifyFaultThumbprintData"] = reflect.TypeOf((*ArrayOfMultipleCertificatesVerifyFaultThumbprintData)(nil)).Elem() } type ArrayOfNasStorageProfile struct { NasStorageProfile []NasStorageProfile `xml:"NasStorageProfile,omitempty"` } func init() { t["ArrayOfNasStorageProfile"] = reflect.TypeOf((*ArrayOfNasStorageProfile)(nil)).Elem() } type ArrayOfNetIpConfigInfoIpAddress struct { NetIpConfigInfoIpAddress []NetIpConfigInfoIpAddress `xml:"NetIpConfigInfoIpAddress,omitempty"` } func init() { t["ArrayOfNetIpConfigInfoIpAddress"] = reflect.TypeOf((*ArrayOfNetIpConfigInfoIpAddress)(nil)).Elem() } type ArrayOfNetIpConfigSpecIpAddressSpec struct { NetIpConfigSpecIpAddressSpec []NetIpConfigSpecIpAddressSpec `xml:"NetIpConfigSpecIpAddressSpec,omitempty"` } func init() { t["ArrayOfNetIpConfigSpecIpAddressSpec"] = reflect.TypeOf((*ArrayOfNetIpConfigSpecIpAddressSpec)(nil)).Elem() } type ArrayOfNetIpRouteConfigInfoIpRoute struct { NetIpRouteConfigInfoIpRoute []NetIpRouteConfigInfoIpRoute `xml:"NetIpRouteConfigInfoIpRoute,omitempty"` } func init() { t["ArrayOfNetIpRouteConfigInfoIpRoute"] = reflect.TypeOf((*ArrayOfNetIpRouteConfigInfoIpRoute)(nil)).Elem() } type ArrayOfNetIpRouteConfigSpecIpRouteSpec struct { NetIpRouteConfigSpecIpRouteSpec []NetIpRouteConfigSpecIpRouteSpec `xml:"NetIpRouteConfigSpecIpRouteSpec,omitempty"` } func init() { t["ArrayOfNetIpRouteConfigSpecIpRouteSpec"] = reflect.TypeOf((*ArrayOfNetIpRouteConfigSpecIpRouteSpec)(nil)).Elem() } type ArrayOfNetIpStackInfoDefaultRouter struct { NetIpStackInfoDefaultRouter []NetIpStackInfoDefaultRouter `xml:"NetIpStackInfoDefaultRouter,omitempty"` } func init() { t["ArrayOfNetIpStackInfoDefaultRouter"] = reflect.TypeOf((*ArrayOfNetIpStackInfoDefaultRouter)(nil)).Elem() } type ArrayOfNetIpStackInfoNetToMedia struct { NetIpStackInfoNetToMedia []NetIpStackInfoNetToMedia `xml:"NetIpStackInfoNetToMedia,omitempty"` } func init() { t["ArrayOfNetIpStackInfoNetToMedia"] = reflect.TypeOf((*ArrayOfNetIpStackInfoNetToMedia)(nil)).Elem() } type ArrayOfNetStackInstanceProfile struct { NetStackInstanceProfile []NetStackInstanceProfile `xml:"NetStackInstanceProfile,omitempty"` } func init() { t["ArrayOfNetStackInstanceProfile"] = reflect.TypeOf((*ArrayOfNetStackInstanceProfile)(nil)).Elem() } type ArrayOfNumericRange struct { NumericRange []NumericRange `xml:"NumericRange,omitempty"` } func init() { t["ArrayOfNumericRange"] = reflect.TypeOf((*ArrayOfNumericRange)(nil)).Elem() } type ArrayOfObjectContent struct { ObjectContent []ObjectContent `xml:"ObjectContent,omitempty"` } func init() { t["ArrayOfObjectContent"] = reflect.TypeOf((*ArrayOfObjectContent)(nil)).Elem() } type ArrayOfObjectSpec struct { ObjectSpec []ObjectSpec `xml:"ObjectSpec,omitempty"` } func init() { t["ArrayOfObjectSpec"] = reflect.TypeOf((*ArrayOfObjectSpec)(nil)).Elem() } type ArrayOfObjectUpdate struct { ObjectUpdate []ObjectUpdate `xml:"ObjectUpdate,omitempty"` } func init() { t["ArrayOfObjectUpdate"] = reflect.TypeOf((*ArrayOfObjectUpdate)(nil)).Elem() } type ArrayOfOpaqueNetworkTargetInfo struct { OpaqueNetworkTargetInfo []OpaqueNetworkTargetInfo `xml:"OpaqueNetworkTargetInfo,omitempty"` } func init() { t["ArrayOfOpaqueNetworkTargetInfo"] = reflect.TypeOf((*ArrayOfOpaqueNetworkTargetInfo)(nil)).Elem() } type ArrayOfOptionDef struct { OptionDef []OptionDef `xml:"OptionDef,omitempty"` } func init() { t["ArrayOfOptionDef"] = reflect.TypeOf((*ArrayOfOptionDef)(nil)).Elem() } type ArrayOfOptionProfile struct { OptionProfile []OptionProfile `xml:"OptionProfile,omitempty"` } func init() { t["ArrayOfOptionProfile"] = reflect.TypeOf((*ArrayOfOptionProfile)(nil)).Elem() } type ArrayOfOptionValue struct { OptionValue []BaseOptionValue `xml:"OptionValue,omitempty,typeattr"` } func init() { t["ArrayOfOptionValue"] = reflect.TypeOf((*ArrayOfOptionValue)(nil)).Elem() } type ArrayOfOvfConsumerOstNode struct { OvfConsumerOstNode []OvfConsumerOstNode `xml:"OvfConsumerOstNode,omitempty"` } func init() { t["ArrayOfOvfConsumerOstNode"] = reflect.TypeOf((*ArrayOfOvfConsumerOstNode)(nil)).Elem() } type ArrayOfOvfConsumerOvfSection struct { OvfConsumerOvfSection []OvfConsumerOvfSection `xml:"OvfConsumerOvfSection,omitempty"` } func init() { t["ArrayOfOvfConsumerOvfSection"] = reflect.TypeOf((*ArrayOfOvfConsumerOvfSection)(nil)).Elem() } type ArrayOfOvfDeploymentOption struct { OvfDeploymentOption []OvfDeploymentOption `xml:"OvfDeploymentOption,omitempty"` } func init() { t["ArrayOfOvfDeploymentOption"] = reflect.TypeOf((*ArrayOfOvfDeploymentOption)(nil)).Elem() } type ArrayOfOvfFile struct { OvfFile []OvfFile `xml:"OvfFile,omitempty"` } func init() { t["ArrayOfOvfFile"] = reflect.TypeOf((*ArrayOfOvfFile)(nil)).Elem() } type ArrayOfOvfFileItem struct { OvfFileItem []OvfFileItem `xml:"OvfFileItem,omitempty"` } func init() { t["ArrayOfOvfFileItem"] = reflect.TypeOf((*ArrayOfOvfFileItem)(nil)).Elem() } type ArrayOfOvfNetworkInfo struct { OvfNetworkInfo []OvfNetworkInfo `xml:"OvfNetworkInfo,omitempty"` } func init() { t["ArrayOfOvfNetworkInfo"] = reflect.TypeOf((*ArrayOfOvfNetworkInfo)(nil)).Elem() } type ArrayOfOvfNetworkMapping struct { OvfNetworkMapping []OvfNetworkMapping `xml:"OvfNetworkMapping,omitempty"` } func init() { t["ArrayOfOvfNetworkMapping"] = reflect.TypeOf((*ArrayOfOvfNetworkMapping)(nil)).Elem() } type ArrayOfOvfOptionInfo struct { OvfOptionInfo []OvfOptionInfo `xml:"OvfOptionInfo,omitempty"` } func init() { t["ArrayOfOvfOptionInfo"] = reflect.TypeOf((*ArrayOfOvfOptionInfo)(nil)).Elem() } type ArrayOfOvfResourceMap struct { OvfResourceMap []OvfResourceMap `xml:"OvfResourceMap,omitempty"` } func init() { t["ArrayOfOvfResourceMap"] = reflect.TypeOf((*ArrayOfOvfResourceMap)(nil)).Elem() } type ArrayOfPerfCounterInfo struct { PerfCounterInfo []PerfCounterInfo `xml:"PerfCounterInfo,omitempty"` } func init() { t["ArrayOfPerfCounterInfo"] = reflect.TypeOf((*ArrayOfPerfCounterInfo)(nil)).Elem() } type ArrayOfPerfEntityMetricBase struct { PerfEntityMetricBase []BasePerfEntityMetricBase `xml:"PerfEntityMetricBase,omitempty,typeattr"` } func init() { t["ArrayOfPerfEntityMetricBase"] = reflect.TypeOf((*ArrayOfPerfEntityMetricBase)(nil)).Elem() } type ArrayOfPerfInterval struct { PerfInterval []PerfInterval `xml:"PerfInterval,omitempty"` } func init() { t["ArrayOfPerfInterval"] = reflect.TypeOf((*ArrayOfPerfInterval)(nil)).Elem() } type ArrayOfPerfMetricId struct { PerfMetricId []PerfMetricId `xml:"PerfMetricId,omitempty"` } func init() { t["ArrayOfPerfMetricId"] = reflect.TypeOf((*ArrayOfPerfMetricId)(nil)).Elem() } type ArrayOfPerfMetricSeries struct { PerfMetricSeries []BasePerfMetricSeries `xml:"PerfMetricSeries,omitempty,typeattr"` } func init() { t["ArrayOfPerfMetricSeries"] = reflect.TypeOf((*ArrayOfPerfMetricSeries)(nil)).Elem() } type ArrayOfPerfMetricSeriesCSV struct { PerfMetricSeriesCSV []PerfMetricSeriesCSV `xml:"PerfMetricSeriesCSV,omitempty"` } func init() { t["ArrayOfPerfMetricSeriesCSV"] = reflect.TypeOf((*ArrayOfPerfMetricSeriesCSV)(nil)).Elem() } type ArrayOfPerfQuerySpec struct { PerfQuerySpec []PerfQuerySpec `xml:"PerfQuerySpec,omitempty"` } func init() { t["ArrayOfPerfQuerySpec"] = reflect.TypeOf((*ArrayOfPerfQuerySpec)(nil)).Elem() } type ArrayOfPerfSampleInfo struct { PerfSampleInfo []PerfSampleInfo `xml:"PerfSampleInfo,omitempty"` } func init() { t["ArrayOfPerfSampleInfo"] = reflect.TypeOf((*ArrayOfPerfSampleInfo)(nil)).Elem() } type ArrayOfPerformanceManagerCounterLevelMapping struct { PerformanceManagerCounterLevelMapping []PerformanceManagerCounterLevelMapping `xml:"PerformanceManagerCounterLevelMapping,omitempty"` } func init() { t["ArrayOfPerformanceManagerCounterLevelMapping"] = reflect.TypeOf((*ArrayOfPerformanceManagerCounterLevelMapping)(nil)).Elem() } type ArrayOfPermission struct { Permission []Permission `xml:"Permission,omitempty"` } func init() { t["ArrayOfPermission"] = reflect.TypeOf((*ArrayOfPermission)(nil)).Elem() } type ArrayOfPermissionProfile struct { PermissionProfile []PermissionProfile `xml:"PermissionProfile,omitempty"` } func init() { t["ArrayOfPermissionProfile"] = reflect.TypeOf((*ArrayOfPermissionProfile)(nil)).Elem() } type ArrayOfPhysicalNic struct { PhysicalNic []PhysicalNic `xml:"PhysicalNic,omitempty"` } func init() { t["ArrayOfPhysicalNic"] = reflect.TypeOf((*ArrayOfPhysicalNic)(nil)).Elem() } type ArrayOfPhysicalNicConfig struct { PhysicalNicConfig []PhysicalNicConfig `xml:"PhysicalNicConfig,omitempty"` } func init() { t["ArrayOfPhysicalNicConfig"] = reflect.TypeOf((*ArrayOfPhysicalNicConfig)(nil)).Elem() } type ArrayOfPhysicalNicHintInfo struct { PhysicalNicHintInfo []PhysicalNicHintInfo `xml:"PhysicalNicHintInfo,omitempty"` } func init() { t["ArrayOfPhysicalNicHintInfo"] = reflect.TypeOf((*ArrayOfPhysicalNicHintInfo)(nil)).Elem() } type ArrayOfPhysicalNicIpHint struct { PhysicalNicIpHint []PhysicalNicIpHint `xml:"PhysicalNicIpHint,omitempty"` } func init() { t["ArrayOfPhysicalNicIpHint"] = reflect.TypeOf((*ArrayOfPhysicalNicIpHint)(nil)).Elem() } type ArrayOfPhysicalNicLinkInfo struct { PhysicalNicLinkInfo []PhysicalNicLinkInfo `xml:"PhysicalNicLinkInfo,omitempty"` } func init() { t["ArrayOfPhysicalNicLinkInfo"] = reflect.TypeOf((*ArrayOfPhysicalNicLinkInfo)(nil)).Elem() } type ArrayOfPhysicalNicNameHint struct { PhysicalNicNameHint []PhysicalNicNameHint `xml:"PhysicalNicNameHint,omitempty"` } func init() { t["ArrayOfPhysicalNicNameHint"] = reflect.TypeOf((*ArrayOfPhysicalNicNameHint)(nil)).Elem() } type ArrayOfPhysicalNicProfile struct { PhysicalNicProfile []PhysicalNicProfile `xml:"PhysicalNicProfile,omitempty"` } func init() { t["ArrayOfPhysicalNicProfile"] = reflect.TypeOf((*ArrayOfPhysicalNicProfile)(nil)).Elem() } type ArrayOfPlacementAffinityRule struct { PlacementAffinityRule []PlacementAffinityRule `xml:"PlacementAffinityRule,omitempty"` } func init() { t["ArrayOfPlacementAffinityRule"] = reflect.TypeOf((*ArrayOfPlacementAffinityRule)(nil)).Elem() } type ArrayOfPlacementSpec struct { PlacementSpec []PlacementSpec `xml:"PlacementSpec,omitempty"` } func init() { t["ArrayOfPlacementSpec"] = reflect.TypeOf((*ArrayOfPlacementSpec)(nil)).Elem() } type ArrayOfPnicUplinkProfile struct { PnicUplinkProfile []PnicUplinkProfile `xml:"PnicUplinkProfile,omitempty"` } func init() { t["ArrayOfPnicUplinkProfile"] = reflect.TypeOf((*ArrayOfPnicUplinkProfile)(nil)).Elem() } type ArrayOfPodDiskLocator struct { PodDiskLocator []PodDiskLocator `xml:"PodDiskLocator,omitempty"` } func init() { t["ArrayOfPodDiskLocator"] = reflect.TypeOf((*ArrayOfPodDiskLocator)(nil)).Elem() } type ArrayOfPolicyOption struct { PolicyOption []BasePolicyOption `xml:"PolicyOption,omitempty,typeattr"` } func init() { t["ArrayOfPolicyOption"] = reflect.TypeOf((*ArrayOfPolicyOption)(nil)).Elem() } type ArrayOfPrivilegeAvailability struct { PrivilegeAvailability []PrivilegeAvailability `xml:"PrivilegeAvailability,omitempty"` } func init() { t["ArrayOfPrivilegeAvailability"] = reflect.TypeOf((*ArrayOfPrivilegeAvailability)(nil)).Elem() } type ArrayOfProductComponentInfo struct { ProductComponentInfo []ProductComponentInfo `xml:"ProductComponentInfo,omitempty"` } func init() { t["ArrayOfProductComponentInfo"] = reflect.TypeOf((*ArrayOfProductComponentInfo)(nil)).Elem() } type ArrayOfProfileApplyProfileProperty struct { ProfileApplyProfileProperty []ProfileApplyProfileProperty `xml:"ProfileApplyProfileProperty,omitempty"` } func init() { t["ArrayOfProfileApplyProfileProperty"] = reflect.TypeOf((*ArrayOfProfileApplyProfileProperty)(nil)).Elem() } type ArrayOfProfileDeferredPolicyOptionParameter struct { ProfileDeferredPolicyOptionParameter []ProfileDeferredPolicyOptionParameter `xml:"ProfileDeferredPolicyOptionParameter,omitempty"` } func init() { t["ArrayOfProfileDeferredPolicyOptionParameter"] = reflect.TypeOf((*ArrayOfProfileDeferredPolicyOptionParameter)(nil)).Elem() } type ArrayOfProfileDescriptionSection struct { ProfileDescriptionSection []ProfileDescriptionSection `xml:"ProfileDescriptionSection,omitempty"` } func init() { t["ArrayOfProfileDescriptionSection"] = reflect.TypeOf((*ArrayOfProfileDescriptionSection)(nil)).Elem() } type ArrayOfProfileExecuteError struct { ProfileExecuteError []ProfileExecuteError `xml:"ProfileExecuteError,omitempty"` } func init() { t["ArrayOfProfileExecuteError"] = reflect.TypeOf((*ArrayOfProfileExecuteError)(nil)).Elem() } type ArrayOfProfileExpression struct { ProfileExpression []BaseProfileExpression `xml:"ProfileExpression,omitempty,typeattr"` } func init() { t["ArrayOfProfileExpression"] = reflect.TypeOf((*ArrayOfProfileExpression)(nil)).Elem() } type ArrayOfProfileExpressionMetadata struct { ProfileExpressionMetadata []ProfileExpressionMetadata `xml:"ProfileExpressionMetadata,omitempty"` } func init() { t["ArrayOfProfileExpressionMetadata"] = reflect.TypeOf((*ArrayOfProfileExpressionMetadata)(nil)).Elem() } type ArrayOfProfileMetadata struct { ProfileMetadata []ProfileMetadata `xml:"ProfileMetadata,omitempty"` } func init() { t["ArrayOfProfileMetadata"] = reflect.TypeOf((*ArrayOfProfileMetadata)(nil)).Elem() } type ArrayOfProfileMetadataProfileSortSpec struct { ProfileMetadataProfileSortSpec []ProfileMetadataProfileSortSpec `xml:"ProfileMetadataProfileSortSpec,omitempty"` } func init() { t["ArrayOfProfileMetadataProfileSortSpec"] = reflect.TypeOf((*ArrayOfProfileMetadataProfileSortSpec)(nil)).Elem() } type ArrayOfProfileParameterMetadata struct { ProfileParameterMetadata []ProfileParameterMetadata `xml:"ProfileParameterMetadata,omitempty"` } func init() { t["ArrayOfProfileParameterMetadata"] = reflect.TypeOf((*ArrayOfProfileParameterMetadata)(nil)).Elem() } type ArrayOfProfilePolicy struct { ProfilePolicy []ProfilePolicy `xml:"ProfilePolicy,omitempty"` } func init() { t["ArrayOfProfilePolicy"] = reflect.TypeOf((*ArrayOfProfilePolicy)(nil)).Elem() } type ArrayOfProfilePolicyMetadata struct { ProfilePolicyMetadata []ProfilePolicyMetadata `xml:"ProfilePolicyMetadata,omitempty"` } func init() { t["ArrayOfProfilePolicyMetadata"] = reflect.TypeOf((*ArrayOfProfilePolicyMetadata)(nil)).Elem() } type ArrayOfProfilePolicyOptionMetadata struct { ProfilePolicyOptionMetadata []BaseProfilePolicyOptionMetadata `xml:"ProfilePolicyOptionMetadata,omitempty,typeattr"` } func init() { t["ArrayOfProfilePolicyOptionMetadata"] = reflect.TypeOf((*ArrayOfProfilePolicyOptionMetadata)(nil)).Elem() } type ArrayOfProfileProfileStructureProperty struct { ProfileProfileStructureProperty []ProfileProfileStructureProperty `xml:"ProfileProfileStructureProperty,omitempty"` } func init() { t["ArrayOfProfileProfileStructureProperty"] = reflect.TypeOf((*ArrayOfProfileProfileStructureProperty)(nil)).Elem() } type ArrayOfProfilePropertyPath struct { ProfilePropertyPath []ProfilePropertyPath `xml:"ProfilePropertyPath,omitempty"` } func init() { t["ArrayOfProfilePropertyPath"] = reflect.TypeOf((*ArrayOfProfilePropertyPath)(nil)).Elem() } type ArrayOfProfileUpdateFailedUpdateFailure struct { ProfileUpdateFailedUpdateFailure []ProfileUpdateFailedUpdateFailure `xml:"ProfileUpdateFailedUpdateFailure,omitempty"` } func init() { t["ArrayOfProfileUpdateFailedUpdateFailure"] = reflect.TypeOf((*ArrayOfProfileUpdateFailedUpdateFailure)(nil)).Elem() } type ArrayOfPropertyChange struct { PropertyChange []PropertyChange `xml:"PropertyChange,omitempty"` } func init() { t["ArrayOfPropertyChange"] = reflect.TypeOf((*ArrayOfPropertyChange)(nil)).Elem() } type ArrayOfPropertyFilterSpec struct { PropertyFilterSpec []PropertyFilterSpec `xml:"PropertyFilterSpec,omitempty"` } func init() { t["ArrayOfPropertyFilterSpec"] = reflect.TypeOf((*ArrayOfPropertyFilterSpec)(nil)).Elem() } type ArrayOfPropertyFilterUpdate struct { PropertyFilterUpdate []PropertyFilterUpdate `xml:"PropertyFilterUpdate,omitempty"` } func init() { t["ArrayOfPropertyFilterUpdate"] = reflect.TypeOf((*ArrayOfPropertyFilterUpdate)(nil)).Elem() } type ArrayOfPropertySpec struct { PropertySpec []PropertySpec `xml:"PropertySpec,omitempty"` } func init() { t["ArrayOfPropertySpec"] = reflect.TypeOf((*ArrayOfPropertySpec)(nil)).Elem() } type ArrayOfRelation struct { Relation []Relation `xml:"Relation,omitempty"` } func init() { t["ArrayOfRelation"] = reflect.TypeOf((*ArrayOfRelation)(nil)).Elem() } type ArrayOfReplicationInfoDiskSettings struct { ReplicationInfoDiskSettings []ReplicationInfoDiskSettings `xml:"ReplicationInfoDiskSettings,omitempty"` } func init() { t["ArrayOfReplicationInfoDiskSettings"] = reflect.TypeOf((*ArrayOfReplicationInfoDiskSettings)(nil)).Elem() } type ArrayOfResourceConfigSpec struct { ResourceConfigSpec []ResourceConfigSpec `xml:"ResourceConfigSpec,omitempty"` } func init() { t["ArrayOfResourceConfigSpec"] = reflect.TypeOf((*ArrayOfResourceConfigSpec)(nil)).Elem() } type ArrayOfScheduledTaskDetail struct { ScheduledTaskDetail []ScheduledTaskDetail `xml:"ScheduledTaskDetail,omitempty"` } func init() { t["ArrayOfScheduledTaskDetail"] = reflect.TypeOf((*ArrayOfScheduledTaskDetail)(nil)).Elem() } type ArrayOfScsiLun struct { ScsiLun []BaseScsiLun `xml:"ScsiLun,omitempty,typeattr"` } func init() { t["ArrayOfScsiLun"] = reflect.TypeOf((*ArrayOfScsiLun)(nil)).Elem() } type ArrayOfScsiLunDescriptor struct { ScsiLunDescriptor []ScsiLunDescriptor `xml:"ScsiLunDescriptor,omitempty"` } func init() { t["ArrayOfScsiLunDescriptor"] = reflect.TypeOf((*ArrayOfScsiLunDescriptor)(nil)).Elem() } type ArrayOfScsiLunDurableName struct { ScsiLunDurableName []ScsiLunDurableName `xml:"ScsiLunDurableName,omitempty"` } func init() { t["ArrayOfScsiLunDurableName"] = reflect.TypeOf((*ArrayOfScsiLunDurableName)(nil)).Elem() } type ArrayOfSelectionSet struct { SelectionSet []BaseSelectionSet `xml:"SelectionSet,omitempty,typeattr"` } func init() { t["ArrayOfSelectionSet"] = reflect.TypeOf((*ArrayOfSelectionSet)(nil)).Elem() } type ArrayOfSelectionSpec struct { SelectionSpec []BaseSelectionSpec `xml:"SelectionSpec,omitempty,typeattr"` } func init() { t["ArrayOfSelectionSpec"] = reflect.TypeOf((*ArrayOfSelectionSpec)(nil)).Elem() } type ArrayOfServiceConsolePortGroupProfile struct { ServiceConsolePortGroupProfile []ServiceConsolePortGroupProfile `xml:"ServiceConsolePortGroupProfile,omitempty"` } func init() { t["ArrayOfServiceConsolePortGroupProfile"] = reflect.TypeOf((*ArrayOfServiceConsolePortGroupProfile)(nil)).Elem() } type ArrayOfServiceLocator struct { ServiceLocator []ServiceLocator `xml:"ServiceLocator,omitempty"` } func init() { t["ArrayOfServiceLocator"] = reflect.TypeOf((*ArrayOfServiceLocator)(nil)).Elem() } type ArrayOfServiceManagerServiceInfo struct { ServiceManagerServiceInfo []ServiceManagerServiceInfo `xml:"ServiceManagerServiceInfo,omitempty"` } func init() { t["ArrayOfServiceManagerServiceInfo"] = reflect.TypeOf((*ArrayOfServiceManagerServiceInfo)(nil)).Elem() } type ArrayOfServiceProfile struct { ServiceProfile []ServiceProfile `xml:"ServiceProfile,omitempty"` } func init() { t["ArrayOfServiceProfile"] = reflect.TypeOf((*ArrayOfServiceProfile)(nil)).Elem() } type ArrayOfShort struct { Short []int16 `xml:"short,omitempty"` } func init() { t["ArrayOfShort"] = reflect.TypeOf((*ArrayOfShort)(nil)).Elem() } type ArrayOfSoftwarePackage struct { SoftwarePackage []SoftwarePackage `xml:"SoftwarePackage,omitempty"` } func init() { t["ArrayOfSoftwarePackage"] = reflect.TypeOf((*ArrayOfSoftwarePackage)(nil)).Elem() } type ArrayOfStaticRouteProfile struct { StaticRouteProfile []StaticRouteProfile `xml:"StaticRouteProfile,omitempty"` } func init() { t["ArrayOfStaticRouteProfile"] = reflect.TypeOf((*ArrayOfStaticRouteProfile)(nil)).Elem() } type ArrayOfStorageDrsOptionSpec struct { StorageDrsOptionSpec []StorageDrsOptionSpec `xml:"StorageDrsOptionSpec,omitempty"` } func init() { t["ArrayOfStorageDrsOptionSpec"] = reflect.TypeOf((*ArrayOfStorageDrsOptionSpec)(nil)).Elem() } type ArrayOfStorageDrsPlacementRankVmSpec struct { StorageDrsPlacementRankVmSpec []StorageDrsPlacementRankVmSpec `xml:"StorageDrsPlacementRankVmSpec,omitempty"` } func init() { t["ArrayOfStorageDrsPlacementRankVmSpec"] = reflect.TypeOf((*ArrayOfStorageDrsPlacementRankVmSpec)(nil)).Elem() } type ArrayOfStorageDrsVmConfigInfo struct { StorageDrsVmConfigInfo []StorageDrsVmConfigInfo `xml:"StorageDrsVmConfigInfo,omitempty"` } func init() { t["ArrayOfStorageDrsVmConfigInfo"] = reflect.TypeOf((*ArrayOfStorageDrsVmConfigInfo)(nil)).Elem() } type ArrayOfStorageDrsVmConfigSpec struct { StorageDrsVmConfigSpec []StorageDrsVmConfigSpec `xml:"StorageDrsVmConfigSpec,omitempty"` } func init() { t["ArrayOfStorageDrsVmConfigSpec"] = reflect.TypeOf((*ArrayOfStorageDrsVmConfigSpec)(nil)).Elem() } type ArrayOfStoragePerformanceSummary struct { StoragePerformanceSummary []StoragePerformanceSummary `xml:"StoragePerformanceSummary,omitempty"` } func init() { t["ArrayOfStoragePerformanceSummary"] = reflect.TypeOf((*ArrayOfStoragePerformanceSummary)(nil)).Elem() } type ArrayOfStorageRequirement struct { StorageRequirement []StorageRequirement `xml:"StorageRequirement,omitempty"` } func init() { t["ArrayOfStorageRequirement"] = reflect.TypeOf((*ArrayOfStorageRequirement)(nil)).Elem() } type ArrayOfString struct { String []string `xml:"string,omitempty"` } func init() { t["ArrayOfString"] = reflect.TypeOf((*ArrayOfString)(nil)).Elem() } type ArrayOfStructuredCustomizations struct { StructuredCustomizations []StructuredCustomizations `xml:"StructuredCustomizations,omitempty"` } func init() { t["ArrayOfStructuredCustomizations"] = reflect.TypeOf((*ArrayOfStructuredCustomizations)(nil)).Elem() } type ArrayOfSystemEventInfo struct { SystemEventInfo []SystemEventInfo `xml:"SystemEventInfo,omitempty"` } func init() { t["ArrayOfSystemEventInfo"] = reflect.TypeOf((*ArrayOfSystemEventInfo)(nil)).Elem() } type ArrayOfTag struct { Tag []Tag `xml:"Tag,omitempty"` } func init() { t["ArrayOfTag"] = reflect.TypeOf((*ArrayOfTag)(nil)).Elem() } type ArrayOfTaskInfo struct { TaskInfo []TaskInfo `xml:"TaskInfo,omitempty"` } func init() { t["ArrayOfTaskInfo"] = reflect.TypeOf((*ArrayOfTaskInfo)(nil)).Elem() } type ArrayOfTaskInfoState struct { TaskInfoState []TaskInfoState `xml:"TaskInfoState,omitempty"` } func init() { t["ArrayOfTaskInfoState"] = reflect.TypeOf((*ArrayOfTaskInfoState)(nil)).Elem() } type ArrayOfTypeDescription struct { TypeDescription []BaseTypeDescription `xml:"TypeDescription,omitempty,typeattr"` } func init() { t["ArrayOfTypeDescription"] = reflect.TypeOf((*ArrayOfTypeDescription)(nil)).Elem() } type ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo struct { UpdateVirtualMachineFilesResultFailedVmFileInfo []UpdateVirtualMachineFilesResultFailedVmFileInfo `xml:"UpdateVirtualMachineFilesResultFailedVmFileInfo,omitempty"` } func init() { t["ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo"] = reflect.TypeOf((*ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo)(nil)).Elem() } type ArrayOfUsbScanCodeSpecKeyEvent struct { UsbScanCodeSpecKeyEvent []UsbScanCodeSpecKeyEvent `xml:"UsbScanCodeSpecKeyEvent,omitempty"` } func init() { t["ArrayOfUsbScanCodeSpecKeyEvent"] = reflect.TypeOf((*ArrayOfUsbScanCodeSpecKeyEvent)(nil)).Elem() } type ArrayOfUserGroupProfile struct { UserGroupProfile []UserGroupProfile `xml:"UserGroupProfile,omitempty"` } func init() { t["ArrayOfUserGroupProfile"] = reflect.TypeOf((*ArrayOfUserGroupProfile)(nil)).Elem() } type ArrayOfUserPrivilegeResult struct { UserPrivilegeResult []UserPrivilegeResult `xml:"UserPrivilegeResult,omitempty"` } func init() { t["ArrayOfUserPrivilegeResult"] = reflect.TypeOf((*ArrayOfUserPrivilegeResult)(nil)).Elem() } type ArrayOfUserProfile struct { UserProfile []UserProfile `xml:"UserProfile,omitempty"` } func init() { t["ArrayOfUserProfile"] = reflect.TypeOf((*ArrayOfUserProfile)(nil)).Elem() } type ArrayOfUserSearchResult struct { UserSearchResult []BaseUserSearchResult `xml:"UserSearchResult,omitempty,typeattr"` } func init() { t["ArrayOfUserSearchResult"] = reflect.TypeOf((*ArrayOfUserSearchResult)(nil)).Elem() } type ArrayOfUserSession struct { UserSession []UserSession `xml:"UserSession,omitempty"` } func init() { t["ArrayOfUserSession"] = reflect.TypeOf((*ArrayOfUserSession)(nil)).Elem() } type ArrayOfVASAStorageArray struct { VASAStorageArray []VASAStorageArray `xml:"VASAStorageArray,omitempty"` } func init() { t["ArrayOfVASAStorageArray"] = reflect.TypeOf((*ArrayOfVASAStorageArray)(nil)).Elem() } type ArrayOfVAppCloneSpecNetworkMappingPair struct { VAppCloneSpecNetworkMappingPair []VAppCloneSpecNetworkMappingPair `xml:"VAppCloneSpecNetworkMappingPair,omitempty"` } func init() { t["ArrayOfVAppCloneSpecNetworkMappingPair"] = reflect.TypeOf((*ArrayOfVAppCloneSpecNetworkMappingPair)(nil)).Elem() } type ArrayOfVAppCloneSpecResourceMap struct { VAppCloneSpecResourceMap []VAppCloneSpecResourceMap `xml:"VAppCloneSpecResourceMap,omitempty"` } func init() { t["ArrayOfVAppCloneSpecResourceMap"] = reflect.TypeOf((*ArrayOfVAppCloneSpecResourceMap)(nil)).Elem() } type ArrayOfVAppEntityConfigInfo struct { VAppEntityConfigInfo []VAppEntityConfigInfo `xml:"VAppEntityConfigInfo,omitempty"` } func init() { t["ArrayOfVAppEntityConfigInfo"] = reflect.TypeOf((*ArrayOfVAppEntityConfigInfo)(nil)).Elem() } type ArrayOfVAppOvfSectionInfo struct { VAppOvfSectionInfo []VAppOvfSectionInfo `xml:"VAppOvfSectionInfo,omitempty"` } func init() { t["ArrayOfVAppOvfSectionInfo"] = reflect.TypeOf((*ArrayOfVAppOvfSectionInfo)(nil)).Elem() } type ArrayOfVAppOvfSectionSpec struct { VAppOvfSectionSpec []VAppOvfSectionSpec `xml:"VAppOvfSectionSpec,omitempty"` } func init() { t["ArrayOfVAppOvfSectionSpec"] = reflect.TypeOf((*ArrayOfVAppOvfSectionSpec)(nil)).Elem() } type ArrayOfVAppProductInfo struct { VAppProductInfo []VAppProductInfo `xml:"VAppProductInfo,omitempty"` } func init() { t["ArrayOfVAppProductInfo"] = reflect.TypeOf((*ArrayOfVAppProductInfo)(nil)).Elem() } type ArrayOfVAppProductSpec struct { VAppProductSpec []VAppProductSpec `xml:"VAppProductSpec,omitempty"` } func init() { t["ArrayOfVAppProductSpec"] = reflect.TypeOf((*ArrayOfVAppProductSpec)(nil)).Elem() } type ArrayOfVAppPropertyInfo struct { VAppPropertyInfo []VAppPropertyInfo `xml:"VAppPropertyInfo,omitempty"` } func init() { t["ArrayOfVAppPropertyInfo"] = reflect.TypeOf((*ArrayOfVAppPropertyInfo)(nil)).Elem() } type ArrayOfVAppPropertySpec struct { VAppPropertySpec []VAppPropertySpec `xml:"VAppPropertySpec,omitempty"` } func init() { t["ArrayOfVAppPropertySpec"] = reflect.TypeOf((*ArrayOfVAppPropertySpec)(nil)).Elem() } type ArrayOfVMwareDVSPvlanConfigSpec struct { VMwareDVSPvlanConfigSpec []VMwareDVSPvlanConfigSpec `xml:"VMwareDVSPvlanConfigSpec,omitempty"` } func init() { t["ArrayOfVMwareDVSPvlanConfigSpec"] = reflect.TypeOf((*ArrayOfVMwareDVSPvlanConfigSpec)(nil)).Elem() } type ArrayOfVMwareDVSPvlanMapEntry struct { VMwareDVSPvlanMapEntry []VMwareDVSPvlanMapEntry `xml:"VMwareDVSPvlanMapEntry,omitempty"` } func init() { t["ArrayOfVMwareDVSPvlanMapEntry"] = reflect.TypeOf((*ArrayOfVMwareDVSPvlanMapEntry)(nil)).Elem() } type ArrayOfVMwareDVSVspanConfigSpec struct { VMwareDVSVspanConfigSpec []VMwareDVSVspanConfigSpec `xml:"VMwareDVSVspanConfigSpec,omitempty"` } func init() { t["ArrayOfVMwareDVSVspanConfigSpec"] = reflect.TypeOf((*ArrayOfVMwareDVSVspanConfigSpec)(nil)).Elem() } type ArrayOfVMwareDvsLacpGroupConfig struct { VMwareDvsLacpGroupConfig []VMwareDvsLacpGroupConfig `xml:"VMwareDvsLacpGroupConfig,omitempty"` } func init() { t["ArrayOfVMwareDvsLacpGroupConfig"] = reflect.TypeOf((*ArrayOfVMwareDvsLacpGroupConfig)(nil)).Elem() } type ArrayOfVMwareDvsLacpGroupSpec struct { VMwareDvsLacpGroupSpec []VMwareDvsLacpGroupSpec `xml:"VMwareDvsLacpGroupSpec,omitempty"` } func init() { t["ArrayOfVMwareDvsLacpGroupSpec"] = reflect.TypeOf((*ArrayOfVMwareDvsLacpGroupSpec)(nil)).Elem() } type ArrayOfVMwareVspanSession struct { VMwareVspanSession []VMwareVspanSession `xml:"VMwareVspanSession,omitempty"` } func init() { t["ArrayOfVMwareVspanSession"] = reflect.TypeOf((*ArrayOfVMwareVspanSession)(nil)).Elem() } type ArrayOfVVolHostPE struct { VVolHostPE []VVolHostPE `xml:"VVolHostPE,omitempty"` } func init() { t["ArrayOfVVolHostPE"] = reflect.TypeOf((*ArrayOfVVolHostPE)(nil)).Elem() } type ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo struct { VVolVmConfigFileUpdateResultFailedVmConfigFileInfo []VVolVmConfigFileUpdateResultFailedVmConfigFileInfo `xml:"VVolVmConfigFileUpdateResultFailedVmConfigFileInfo,omitempty"` } func init() { t["ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo"] = reflect.TypeOf((*ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo)(nil)).Elem() } type ArrayOfVchaNodeRuntimeInfo struct { VchaNodeRuntimeInfo []VchaNodeRuntimeInfo `xml:"VchaNodeRuntimeInfo,omitempty"` } func init() { t["ArrayOfVchaNodeRuntimeInfo"] = reflect.TypeOf((*ArrayOfVchaNodeRuntimeInfo)(nil)).Elem() } type ArrayOfVimVasaProviderInfo struct { VimVasaProviderInfo []VimVasaProviderInfo `xml:"VimVasaProviderInfo,omitempty"` } func init() { t["ArrayOfVimVasaProviderInfo"] = reflect.TypeOf((*ArrayOfVimVasaProviderInfo)(nil)).Elem() } type ArrayOfVimVasaProviderStatePerArray struct { VimVasaProviderStatePerArray []VimVasaProviderStatePerArray `xml:"VimVasaProviderStatePerArray,omitempty"` } func init() { t["ArrayOfVimVasaProviderStatePerArray"] = reflect.TypeOf((*ArrayOfVimVasaProviderStatePerArray)(nil)).Elem() } type ArrayOfVirtualAppLinkInfo struct { VirtualAppLinkInfo []VirtualAppLinkInfo `xml:"VirtualAppLinkInfo,omitempty"` } func init() { t["ArrayOfVirtualAppLinkInfo"] = reflect.TypeOf((*ArrayOfVirtualAppLinkInfo)(nil)).Elem() } type ArrayOfVirtualDevice struct { VirtualDevice []BaseVirtualDevice `xml:"VirtualDevice,omitempty,typeattr"` } func init() { t["ArrayOfVirtualDevice"] = reflect.TypeOf((*ArrayOfVirtualDevice)(nil)).Elem() } type ArrayOfVirtualDeviceBackingOption struct { VirtualDeviceBackingOption []BaseVirtualDeviceBackingOption `xml:"VirtualDeviceBackingOption,omitempty,typeattr"` } func init() { t["ArrayOfVirtualDeviceBackingOption"] = reflect.TypeOf((*ArrayOfVirtualDeviceBackingOption)(nil)).Elem() } type ArrayOfVirtualDeviceConfigSpec struct { VirtualDeviceConfigSpec []BaseVirtualDeviceConfigSpec `xml:"VirtualDeviceConfigSpec,omitempty,typeattr"` } func init() { t["ArrayOfVirtualDeviceConfigSpec"] = reflect.TypeOf((*ArrayOfVirtualDeviceConfigSpec)(nil)).Elem() } type ArrayOfVirtualDeviceOption struct { VirtualDeviceOption []BaseVirtualDeviceOption `xml:"VirtualDeviceOption,omitempty,typeattr"` } func init() { t["ArrayOfVirtualDeviceOption"] = reflect.TypeOf((*ArrayOfVirtualDeviceOption)(nil)).Elem() } type ArrayOfVirtualDisk struct { VirtualDisk []VirtualDisk `xml:"VirtualDisk,omitempty"` } func init() { t["ArrayOfVirtualDisk"] = reflect.TypeOf((*ArrayOfVirtualDisk)(nil)).Elem() } type ArrayOfVirtualDiskDeltaDiskFormatsSupported struct { VirtualDiskDeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"VirtualDiskDeltaDiskFormatsSupported,omitempty"` } func init() { t["ArrayOfVirtualDiskDeltaDiskFormatsSupported"] = reflect.TypeOf((*ArrayOfVirtualDiskDeltaDiskFormatsSupported)(nil)).Elem() } type ArrayOfVirtualDiskId struct { VirtualDiskId []VirtualDiskId `xml:"VirtualDiskId,omitempty"` } func init() { t["ArrayOfVirtualDiskId"] = reflect.TypeOf((*ArrayOfVirtualDiskId)(nil)).Elem() } type ArrayOfVirtualMachineBootOptionsBootableDevice struct { VirtualMachineBootOptionsBootableDevice []BaseVirtualMachineBootOptionsBootableDevice `xml:"VirtualMachineBootOptionsBootableDevice,omitempty,typeattr"` } func init() { t["ArrayOfVirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*ArrayOfVirtualMachineBootOptionsBootableDevice)(nil)).Elem() } type ArrayOfVirtualMachineCdromInfo struct { VirtualMachineCdromInfo []VirtualMachineCdromInfo `xml:"VirtualMachineCdromInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineCdromInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineCdromInfo)(nil)).Elem() } type ArrayOfVirtualMachineConfigInfoDatastoreUrlPair struct { VirtualMachineConfigInfoDatastoreUrlPair []VirtualMachineConfigInfoDatastoreUrlPair `xml:"VirtualMachineConfigInfoDatastoreUrlPair,omitempty"` } func init() { t["ArrayOfVirtualMachineConfigInfoDatastoreUrlPair"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigInfoDatastoreUrlPair)(nil)).Elem() } type ArrayOfVirtualMachineConfigOptionDescriptor struct { VirtualMachineConfigOptionDescriptor []VirtualMachineConfigOptionDescriptor `xml:"VirtualMachineConfigOptionDescriptor,omitempty"` } func init() { t["ArrayOfVirtualMachineConfigOptionDescriptor"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigOptionDescriptor)(nil)).Elem() } type ArrayOfVirtualMachineCpuIdInfoSpec struct { VirtualMachineCpuIdInfoSpec []VirtualMachineCpuIdInfoSpec `xml:"VirtualMachineCpuIdInfoSpec,omitempty"` } func init() { t["ArrayOfVirtualMachineCpuIdInfoSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineCpuIdInfoSpec)(nil)).Elem() } type ArrayOfVirtualMachineDatastoreInfo struct { VirtualMachineDatastoreInfo []VirtualMachineDatastoreInfo `xml:"VirtualMachineDatastoreInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineDatastoreInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDatastoreInfo)(nil)).Elem() } type ArrayOfVirtualMachineDatastoreVolumeOption struct { VirtualMachineDatastoreVolumeOption []VirtualMachineDatastoreVolumeOption `xml:"VirtualMachineDatastoreVolumeOption,omitempty"` } func init() { t["ArrayOfVirtualMachineDatastoreVolumeOption"] = reflect.TypeOf((*ArrayOfVirtualMachineDatastoreVolumeOption)(nil)).Elem() } type ArrayOfVirtualMachineDeviceRuntimeInfo struct { VirtualMachineDeviceRuntimeInfo []VirtualMachineDeviceRuntimeInfo `xml:"VirtualMachineDeviceRuntimeInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineDeviceRuntimeInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDeviceRuntimeInfo)(nil)).Elem() } type ArrayOfVirtualMachineDisplayTopology struct { VirtualMachineDisplayTopology []VirtualMachineDisplayTopology `xml:"VirtualMachineDisplayTopology,omitempty"` } func init() { t["ArrayOfVirtualMachineDisplayTopology"] = reflect.TypeOf((*ArrayOfVirtualMachineDisplayTopology)(nil)).Elem() } type ArrayOfVirtualMachineFeatureRequirement struct { VirtualMachineFeatureRequirement []VirtualMachineFeatureRequirement `xml:"VirtualMachineFeatureRequirement,omitempty"` } func init() { t["ArrayOfVirtualMachineFeatureRequirement"] = reflect.TypeOf((*ArrayOfVirtualMachineFeatureRequirement)(nil)).Elem() } type ArrayOfVirtualMachineFileLayoutDiskLayout struct { VirtualMachineFileLayoutDiskLayout []VirtualMachineFileLayoutDiskLayout `xml:"VirtualMachineFileLayoutDiskLayout,omitempty"` } func init() { t["ArrayOfVirtualMachineFileLayoutDiskLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutDiskLayout)(nil)).Elem() } type ArrayOfVirtualMachineFileLayoutExDiskLayout struct { VirtualMachineFileLayoutExDiskLayout []VirtualMachineFileLayoutExDiskLayout `xml:"VirtualMachineFileLayoutExDiskLayout,omitempty"` } func init() { t["ArrayOfVirtualMachineFileLayoutExDiskLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExDiskLayout)(nil)).Elem() } type ArrayOfVirtualMachineFileLayoutExDiskUnit struct { VirtualMachineFileLayoutExDiskUnit []VirtualMachineFileLayoutExDiskUnit `xml:"VirtualMachineFileLayoutExDiskUnit,omitempty"` } func init() { t["ArrayOfVirtualMachineFileLayoutExDiskUnit"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExDiskUnit)(nil)).Elem() } type ArrayOfVirtualMachineFileLayoutExFileInfo struct { VirtualMachineFileLayoutExFileInfo []VirtualMachineFileLayoutExFileInfo `xml:"VirtualMachineFileLayoutExFileInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineFileLayoutExFileInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExFileInfo)(nil)).Elem() } type ArrayOfVirtualMachineFileLayoutExSnapshotLayout struct { VirtualMachineFileLayoutExSnapshotLayout []VirtualMachineFileLayoutExSnapshotLayout `xml:"VirtualMachineFileLayoutExSnapshotLayout,omitempty"` } func init() { t["ArrayOfVirtualMachineFileLayoutExSnapshotLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExSnapshotLayout)(nil)).Elem() } type ArrayOfVirtualMachineFileLayoutSnapshotLayout struct { VirtualMachineFileLayoutSnapshotLayout []VirtualMachineFileLayoutSnapshotLayout `xml:"VirtualMachineFileLayoutSnapshotLayout,omitempty"` } func init() { t["ArrayOfVirtualMachineFileLayoutSnapshotLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutSnapshotLayout)(nil)).Elem() } type ArrayOfVirtualMachineFloppyInfo struct { VirtualMachineFloppyInfo []VirtualMachineFloppyInfo `xml:"VirtualMachineFloppyInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineFloppyInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineFloppyInfo)(nil)).Elem() } type ArrayOfVirtualMachineIdeDiskDeviceInfo struct { VirtualMachineIdeDiskDeviceInfo []VirtualMachineIdeDiskDeviceInfo `xml:"VirtualMachineIdeDiskDeviceInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineIdeDiskDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineIdeDiskDeviceInfo)(nil)).Elem() } type ArrayOfVirtualMachineIdeDiskDevicePartitionInfo struct { VirtualMachineIdeDiskDevicePartitionInfo []VirtualMachineIdeDiskDevicePartitionInfo `xml:"VirtualMachineIdeDiskDevicePartitionInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineIdeDiskDevicePartitionInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineIdeDiskDevicePartitionInfo)(nil)).Elem() } type ArrayOfVirtualMachineLegacyNetworkSwitchInfo struct { VirtualMachineLegacyNetworkSwitchInfo []VirtualMachineLegacyNetworkSwitchInfo `xml:"VirtualMachineLegacyNetworkSwitchInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineLegacyNetworkSwitchInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineLegacyNetworkSwitchInfo)(nil)).Elem() } type ArrayOfVirtualMachineMessage struct { VirtualMachineMessage []VirtualMachineMessage `xml:"VirtualMachineMessage,omitempty"` } func init() { t["ArrayOfVirtualMachineMessage"] = reflect.TypeOf((*ArrayOfVirtualMachineMessage)(nil)).Elem() } type ArrayOfVirtualMachineMetadataManagerVmMetadataInput struct { VirtualMachineMetadataManagerVmMetadataInput []VirtualMachineMetadataManagerVmMetadataInput `xml:"VirtualMachineMetadataManagerVmMetadataInput,omitempty"` } func init() { t["ArrayOfVirtualMachineMetadataManagerVmMetadataInput"] = reflect.TypeOf((*ArrayOfVirtualMachineMetadataManagerVmMetadataInput)(nil)).Elem() } type ArrayOfVirtualMachineMetadataManagerVmMetadataResult struct { VirtualMachineMetadataManagerVmMetadataResult []VirtualMachineMetadataManagerVmMetadataResult `xml:"VirtualMachineMetadataManagerVmMetadataResult,omitempty"` } func init() { t["ArrayOfVirtualMachineMetadataManagerVmMetadataResult"] = reflect.TypeOf((*ArrayOfVirtualMachineMetadataManagerVmMetadataResult)(nil)).Elem() } type ArrayOfVirtualMachineNetworkInfo struct { VirtualMachineNetworkInfo []VirtualMachineNetworkInfo `xml:"VirtualMachineNetworkInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineNetworkInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineNetworkInfo)(nil)).Elem() } type ArrayOfVirtualMachineParallelInfo struct { VirtualMachineParallelInfo []VirtualMachineParallelInfo `xml:"VirtualMachineParallelInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineParallelInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineParallelInfo)(nil)).Elem() } type ArrayOfVirtualMachinePciPassthroughInfo struct { VirtualMachinePciPassthroughInfo []BaseVirtualMachinePciPassthroughInfo `xml:"VirtualMachinePciPassthroughInfo,omitempty,typeattr"` } func init() { t["ArrayOfVirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePciPassthroughInfo)(nil)).Elem() } type ArrayOfVirtualMachinePciSharedGpuPassthroughInfo struct { VirtualMachinePciSharedGpuPassthroughInfo []VirtualMachinePciSharedGpuPassthroughInfo `xml:"VirtualMachinePciSharedGpuPassthroughInfo,omitempty"` } func init() { t["ArrayOfVirtualMachinePciSharedGpuPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePciSharedGpuPassthroughInfo)(nil)).Elem() } type ArrayOfVirtualMachineProfileSpec struct { VirtualMachineProfileSpec []BaseVirtualMachineProfileSpec `xml:"VirtualMachineProfileSpec,omitempty,typeattr"` } func init() { t["ArrayOfVirtualMachineProfileSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineProfileSpec)(nil)).Elem() } type ArrayOfVirtualMachineRelocateSpecDiskLocator struct { VirtualMachineRelocateSpecDiskLocator []VirtualMachineRelocateSpecDiskLocator `xml:"VirtualMachineRelocateSpecDiskLocator,omitempty"` } func init() { t["ArrayOfVirtualMachineRelocateSpecDiskLocator"] = reflect.TypeOf((*ArrayOfVirtualMachineRelocateSpecDiskLocator)(nil)).Elem() } type ArrayOfVirtualMachineScsiDiskDeviceInfo struct { VirtualMachineScsiDiskDeviceInfo []VirtualMachineScsiDiskDeviceInfo `xml:"VirtualMachineScsiDiskDeviceInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineScsiDiskDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineScsiDiskDeviceInfo)(nil)).Elem() } type ArrayOfVirtualMachineScsiPassthroughInfo struct { VirtualMachineScsiPassthroughInfo []VirtualMachineScsiPassthroughInfo `xml:"VirtualMachineScsiPassthroughInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineScsiPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineScsiPassthroughInfo)(nil)).Elem() } type ArrayOfVirtualMachineSerialInfo struct { VirtualMachineSerialInfo []VirtualMachineSerialInfo `xml:"VirtualMachineSerialInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineSerialInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSerialInfo)(nil)).Elem() } type ArrayOfVirtualMachineSnapshotTree struct { VirtualMachineSnapshotTree []VirtualMachineSnapshotTree `xml:"VirtualMachineSnapshotTree,omitempty"` } func init() { t["ArrayOfVirtualMachineSnapshotTree"] = reflect.TypeOf((*ArrayOfVirtualMachineSnapshotTree)(nil)).Elem() } type ArrayOfVirtualMachineSoundInfo struct { VirtualMachineSoundInfo []VirtualMachineSoundInfo `xml:"VirtualMachineSoundInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineSoundInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSoundInfo)(nil)).Elem() } type ArrayOfVirtualMachineSriovInfo struct { VirtualMachineSriovInfo []VirtualMachineSriovInfo `xml:"VirtualMachineSriovInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineSriovInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSriovInfo)(nil)).Elem() } type ArrayOfVirtualMachineSummary struct { VirtualMachineSummary []VirtualMachineSummary `xml:"VirtualMachineSummary,omitempty"` } func init() { t["ArrayOfVirtualMachineSummary"] = reflect.TypeOf((*ArrayOfVirtualMachineSummary)(nil)).Elem() } type ArrayOfVirtualMachineUsageOnDatastore struct { VirtualMachineUsageOnDatastore []VirtualMachineUsageOnDatastore `xml:"VirtualMachineUsageOnDatastore,omitempty"` } func init() { t["ArrayOfVirtualMachineUsageOnDatastore"] = reflect.TypeOf((*ArrayOfVirtualMachineUsageOnDatastore)(nil)).Elem() } type ArrayOfVirtualMachineUsbInfo struct { VirtualMachineUsbInfo []VirtualMachineUsbInfo `xml:"VirtualMachineUsbInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineUsbInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineUsbInfo)(nil)).Elem() } type ArrayOfVirtualMachineVFlashModuleInfo struct { VirtualMachineVFlashModuleInfo []VirtualMachineVFlashModuleInfo `xml:"VirtualMachineVFlashModuleInfo,omitempty"` } func init() { t["ArrayOfVirtualMachineVFlashModuleInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVFlashModuleInfo)(nil)).Elem() } type ArrayOfVirtualMachineVMCIDeviceFilterSpec struct { VirtualMachineVMCIDeviceFilterSpec []VirtualMachineVMCIDeviceFilterSpec `xml:"VirtualMachineVMCIDeviceFilterSpec,omitempty"` } func init() { t["ArrayOfVirtualMachineVMCIDeviceFilterSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineVMCIDeviceFilterSpec)(nil)).Elem() } type ArrayOfVirtualNicManagerNetConfig struct { VirtualNicManagerNetConfig []VirtualNicManagerNetConfig `xml:"VirtualNicManagerNetConfig,omitempty"` } func init() { t["ArrayOfVirtualNicManagerNetConfig"] = reflect.TypeOf((*ArrayOfVirtualNicManagerNetConfig)(nil)).Elem() } type ArrayOfVirtualSCSISharing struct { VirtualSCSISharing []VirtualSCSISharing `xml:"VirtualSCSISharing,omitempty"` } func init() { t["ArrayOfVirtualSCSISharing"] = reflect.TypeOf((*ArrayOfVirtualSCSISharing)(nil)).Elem() } type ArrayOfVirtualSwitchProfile struct { VirtualSwitchProfile []VirtualSwitchProfile `xml:"VirtualSwitchProfile,omitempty"` } func init() { t["ArrayOfVirtualSwitchProfile"] = reflect.TypeOf((*ArrayOfVirtualSwitchProfile)(nil)).Elem() } type ArrayOfVmEventArgument struct { VmEventArgument []VmEventArgument `xml:"VmEventArgument,omitempty"` } func init() { t["ArrayOfVmEventArgument"] = reflect.TypeOf((*ArrayOfVmEventArgument)(nil)).Elem() } type ArrayOfVmPodConfigForPlacement struct { VmPodConfigForPlacement []VmPodConfigForPlacement `xml:"VmPodConfigForPlacement,omitempty"` } func init() { t["ArrayOfVmPodConfigForPlacement"] = reflect.TypeOf((*ArrayOfVmPodConfigForPlacement)(nil)).Elem() } type ArrayOfVmPortGroupProfile struct { VmPortGroupProfile []VmPortGroupProfile `xml:"VmPortGroupProfile,omitempty"` } func init() { t["ArrayOfVmPortGroupProfile"] = reflect.TypeOf((*ArrayOfVmPortGroupProfile)(nil)).Elem() } type ArrayOfVmfsConfigOption struct { VmfsConfigOption []VmfsConfigOption `xml:"VmfsConfigOption,omitempty"` } func init() { t["ArrayOfVmfsConfigOption"] = reflect.TypeOf((*ArrayOfVmfsConfigOption)(nil)).Elem() } type ArrayOfVmfsDatastoreOption struct { VmfsDatastoreOption []VmfsDatastoreOption `xml:"VmfsDatastoreOption,omitempty"` } func init() { t["ArrayOfVmfsDatastoreOption"] = reflect.TypeOf((*ArrayOfVmfsDatastoreOption)(nil)).Elem() } type ArrayOfVnicPortArgument struct { VnicPortArgument []VnicPortArgument `xml:"VnicPortArgument,omitempty"` } func init() { t["ArrayOfVnicPortArgument"] = reflect.TypeOf((*ArrayOfVnicPortArgument)(nil)).Elem() } type ArrayOfVsanHostConfigInfo struct { VsanHostConfigInfo []VsanHostConfigInfo `xml:"VsanHostConfigInfo,omitempty"` } func init() { t["ArrayOfVsanHostConfigInfo"] = reflect.TypeOf((*ArrayOfVsanHostConfigInfo)(nil)).Elem() } type ArrayOfVsanHostConfigInfoNetworkInfoPortConfig struct { VsanHostConfigInfoNetworkInfoPortConfig []VsanHostConfigInfoNetworkInfoPortConfig `xml:"VsanHostConfigInfoNetworkInfoPortConfig,omitempty"` } func init() { t["ArrayOfVsanHostConfigInfoNetworkInfoPortConfig"] = reflect.TypeOf((*ArrayOfVsanHostConfigInfoNetworkInfoPortConfig)(nil)).Elem() } type ArrayOfVsanHostDiskMapInfo struct { VsanHostDiskMapInfo []VsanHostDiskMapInfo `xml:"VsanHostDiskMapInfo,omitempty"` } func init() { t["ArrayOfVsanHostDiskMapInfo"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapInfo)(nil)).Elem() } type ArrayOfVsanHostDiskMapResult struct { VsanHostDiskMapResult []VsanHostDiskMapResult `xml:"VsanHostDiskMapResult,omitempty"` } func init() { t["ArrayOfVsanHostDiskMapResult"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapResult)(nil)).Elem() } type ArrayOfVsanHostDiskMapping struct { VsanHostDiskMapping []VsanHostDiskMapping `xml:"VsanHostDiskMapping,omitempty"` } func init() { t["ArrayOfVsanHostDiskMapping"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapping)(nil)).Elem() } type ArrayOfVsanHostDiskResult struct { VsanHostDiskResult []VsanHostDiskResult `xml:"VsanHostDiskResult,omitempty"` } func init() { t["ArrayOfVsanHostDiskResult"] = reflect.TypeOf((*ArrayOfVsanHostDiskResult)(nil)).Elem() } type ArrayOfVsanHostMembershipInfo struct { VsanHostMembershipInfo []VsanHostMembershipInfo `xml:"VsanHostMembershipInfo,omitempty"` } func init() { t["ArrayOfVsanHostMembershipInfo"] = reflect.TypeOf((*ArrayOfVsanHostMembershipInfo)(nil)).Elem() } type ArrayOfVsanHostRuntimeInfoDiskIssue struct { VsanHostRuntimeInfoDiskIssue []VsanHostRuntimeInfoDiskIssue `xml:"VsanHostRuntimeInfoDiskIssue,omitempty"` } func init() { t["ArrayOfVsanHostRuntimeInfoDiskIssue"] = reflect.TypeOf((*ArrayOfVsanHostRuntimeInfoDiskIssue)(nil)).Elem() } type ArrayOfVsanNewPolicyBatch struct { VsanNewPolicyBatch []VsanNewPolicyBatch `xml:"VsanNewPolicyBatch,omitempty"` } func init() { t["ArrayOfVsanNewPolicyBatch"] = reflect.TypeOf((*ArrayOfVsanNewPolicyBatch)(nil)).Elem() } type ArrayOfVsanPolicyChangeBatch struct { VsanPolicyChangeBatch []VsanPolicyChangeBatch `xml:"VsanPolicyChangeBatch,omitempty"` } func init() { t["ArrayOfVsanPolicyChangeBatch"] = reflect.TypeOf((*ArrayOfVsanPolicyChangeBatch)(nil)).Elem() } type ArrayOfVsanPolicySatisfiability struct { VsanPolicySatisfiability []VsanPolicySatisfiability `xml:"VsanPolicySatisfiability,omitempty"` } func init() { t["ArrayOfVsanPolicySatisfiability"] = reflect.TypeOf((*ArrayOfVsanPolicySatisfiability)(nil)).Elem() } type ArrayOfVsanUpgradeSystemNetworkPartitionInfo struct { VsanUpgradeSystemNetworkPartitionInfo []VsanUpgradeSystemNetworkPartitionInfo `xml:"VsanUpgradeSystemNetworkPartitionInfo,omitempty"` } func init() { t["ArrayOfVsanUpgradeSystemNetworkPartitionInfo"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemNetworkPartitionInfo)(nil)).Elem() } type ArrayOfVsanUpgradeSystemPreflightCheckIssue struct { VsanUpgradeSystemPreflightCheckIssue []BaseVsanUpgradeSystemPreflightCheckIssue `xml:"VsanUpgradeSystemPreflightCheckIssue,omitempty,typeattr"` } func init() { t["ArrayOfVsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemPreflightCheckIssue)(nil)).Elem() } type ArrayOfVsanUpgradeSystemUpgradeHistoryItem struct { VsanUpgradeSystemUpgradeHistoryItem []BaseVsanUpgradeSystemUpgradeHistoryItem `xml:"VsanUpgradeSystemUpgradeHistoryItem,omitempty,typeattr"` } func init() { t["ArrayOfVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem() } type ArrayOfVslmTagEntry struct { VslmTagEntry []VslmTagEntry `xml:"VslmTagEntry,omitempty"` } func init() { t["ArrayOfVslmTagEntry"] = reflect.TypeOf((*ArrayOfVslmTagEntry)(nil)).Elem() } type ArrayUpdateSpec struct { DynamicData Operation ArrayUpdateOperation `xml:"operation"` RemoveKey AnyType `xml:"removeKey,omitempty,typeattr"` } func init() { t["ArrayUpdateSpec"] = reflect.TypeOf((*ArrayUpdateSpec)(nil)).Elem() } type AssignUserToGroup AssignUserToGroupRequestType func init() { t["AssignUserToGroup"] = reflect.TypeOf((*AssignUserToGroup)(nil)).Elem() } type AssignUserToGroupRequestType struct { This ManagedObjectReference `xml:"_this"` User string `xml:"user"` Group string `xml:"group"` } func init() { t["AssignUserToGroupRequestType"] = reflect.TypeOf((*AssignUserToGroupRequestType)(nil)).Elem() } type AssignUserToGroupResponse struct { } type AssociateProfile AssociateProfileRequestType func init() { t["AssociateProfile"] = reflect.TypeOf((*AssociateProfile)(nil)).Elem() } type AssociateProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Entity []ManagedObjectReference `xml:"entity"` } func init() { t["AssociateProfileRequestType"] = reflect.TypeOf((*AssociateProfileRequestType)(nil)).Elem() } type AssociateProfileResponse struct { } type AttachDiskRequestType struct { This ManagedObjectReference `xml:"_this"` DiskId ID `xml:"diskId"` Datastore ManagedObjectReference `xml:"datastore"` ControllerKey int32 `xml:"controllerKey,omitempty"` UnitNumber *int32 `xml:"unitNumber"` } func init() { t["AttachDiskRequestType"] = reflect.TypeOf((*AttachDiskRequestType)(nil)).Elem() } type AttachDisk_Task AttachDiskRequestType func init() { t["AttachDisk_Task"] = reflect.TypeOf((*AttachDisk_Task)(nil)).Elem() } type AttachDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type AttachScsiLun AttachScsiLunRequestType func init() { t["AttachScsiLun"] = reflect.TypeOf((*AttachScsiLun)(nil)).Elem() } type AttachScsiLunExRequestType struct { This ManagedObjectReference `xml:"_this"` LunUuid []string `xml:"lunUuid"` } func init() { t["AttachScsiLunExRequestType"] = reflect.TypeOf((*AttachScsiLunExRequestType)(nil)).Elem() } type AttachScsiLunEx_Task AttachScsiLunExRequestType func init() { t["AttachScsiLunEx_Task"] = reflect.TypeOf((*AttachScsiLunEx_Task)(nil)).Elem() } type AttachScsiLunEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type AttachScsiLunRequestType struct { This ManagedObjectReference `xml:"_this"` LunUuid string `xml:"lunUuid"` } func init() { t["AttachScsiLunRequestType"] = reflect.TypeOf((*AttachScsiLunRequestType)(nil)).Elem() } type AttachScsiLunResponse struct { } type AttachTagToVStorageObject AttachTagToVStorageObjectRequestType func init() { t["AttachTagToVStorageObject"] = reflect.TypeOf((*AttachTagToVStorageObject)(nil)).Elem() } type AttachTagToVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Category string `xml:"category"` Tag string `xml:"tag"` } func init() { t["AttachTagToVStorageObjectRequestType"] = reflect.TypeOf((*AttachTagToVStorageObjectRequestType)(nil)).Elem() } type AttachTagToVStorageObjectResponse struct { } type AttachVmfsExtent AttachVmfsExtentRequestType func init() { t["AttachVmfsExtent"] = reflect.TypeOf((*AttachVmfsExtent)(nil)).Elem() } type AttachVmfsExtentRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsPath string `xml:"vmfsPath"` Extent HostScsiDiskPartition `xml:"extent"` } func init() { t["AttachVmfsExtentRequestType"] = reflect.TypeOf((*AttachVmfsExtentRequestType)(nil)).Elem() } type AttachVmfsExtentResponse struct { } type AuthMinimumAdminPermission struct { VimFault } func init() { t["AuthMinimumAdminPermission"] = reflect.TypeOf((*AuthMinimumAdminPermission)(nil)).Elem() } type AuthMinimumAdminPermissionFault AuthMinimumAdminPermission func init() { t["AuthMinimumAdminPermissionFault"] = reflect.TypeOf((*AuthMinimumAdminPermissionFault)(nil)).Elem() } type AuthenticationProfile struct { ApplyProfile ActiveDirectory *ActiveDirectoryProfile `xml:"activeDirectory,omitempty"` } func init() { t["AuthenticationProfile"] = reflect.TypeOf((*AuthenticationProfile)(nil)).Elem() } type AuthorizationDescription struct { DynamicData Privilege []BaseElementDescription `xml:"privilege,typeattr"` PrivilegeGroup []BaseElementDescription `xml:"privilegeGroup,typeattr"` } func init() { t["AuthorizationDescription"] = reflect.TypeOf((*AuthorizationDescription)(nil)).Elem() } type AuthorizationEvent struct { Event } func init() { t["AuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem() } type AuthorizationPrivilege struct { DynamicData PrivId string `xml:"privId"` OnParent bool `xml:"onParent"` Name string `xml:"name"` PrivGroupName string `xml:"privGroupName"` } func init() { t["AuthorizationPrivilege"] = reflect.TypeOf((*AuthorizationPrivilege)(nil)).Elem() } type AuthorizationRole struct { DynamicData RoleId int32 `xml:"roleId"` System bool `xml:"system"` Name string `xml:"name"` Info BaseDescription `xml:"info,typeattr"` Privilege []string `xml:"privilege,omitempty"` } func init() { t["AuthorizationRole"] = reflect.TypeOf((*AuthorizationRole)(nil)).Elem() } type AutoStartDefaults struct { DynamicData Enabled *bool `xml:"enabled"` StartDelay int32 `xml:"startDelay,omitempty"` StopDelay int32 `xml:"stopDelay,omitempty"` WaitForHeartbeat *bool `xml:"waitForHeartbeat"` StopAction string `xml:"stopAction,omitempty"` } func init() { t["AutoStartDefaults"] = reflect.TypeOf((*AutoStartDefaults)(nil)).Elem() } type AutoStartPowerInfo struct { DynamicData Key ManagedObjectReference `xml:"key"` StartOrder int32 `xml:"startOrder"` StartDelay int32 `xml:"startDelay"` WaitForHeartbeat AutoStartWaitHeartbeatSetting `xml:"waitForHeartbeat"` StartAction string `xml:"startAction"` StopDelay int32 `xml:"stopDelay"` StopAction string `xml:"stopAction"` } func init() { t["AutoStartPowerInfo"] = reflect.TypeOf((*AutoStartPowerInfo)(nil)).Elem() } type AutoStartPowerOff AutoStartPowerOffRequestType func init() { t["AutoStartPowerOff"] = reflect.TypeOf((*AutoStartPowerOff)(nil)).Elem() } type AutoStartPowerOffRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["AutoStartPowerOffRequestType"] = reflect.TypeOf((*AutoStartPowerOffRequestType)(nil)).Elem() } type AutoStartPowerOffResponse struct { } type AutoStartPowerOn AutoStartPowerOnRequestType func init() { t["AutoStartPowerOn"] = reflect.TypeOf((*AutoStartPowerOn)(nil)).Elem() } type AutoStartPowerOnRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["AutoStartPowerOnRequestType"] = reflect.TypeOf((*AutoStartPowerOnRequestType)(nil)).Elem() } type AutoStartPowerOnResponse struct { } type BackupBlobReadFailure struct { DvsFault EntityName string `xml:"entityName"` EntityType string `xml:"entityType"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["BackupBlobReadFailure"] = reflect.TypeOf((*BackupBlobReadFailure)(nil)).Elem() } type BackupBlobReadFailureFault BackupBlobReadFailure func init() { t["BackupBlobReadFailureFault"] = reflect.TypeOf((*BackupBlobReadFailureFault)(nil)).Elem() } type BackupBlobWriteFailure struct { DvsFault EntityName string `xml:"entityName"` EntityType string `xml:"entityType"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["BackupBlobWriteFailure"] = reflect.TypeOf((*BackupBlobWriteFailure)(nil)).Elem() } type BackupBlobWriteFailureFault BackupBlobWriteFailure func init() { t["BackupBlobWriteFailureFault"] = reflect.TypeOf((*BackupBlobWriteFailureFault)(nil)).Elem() } type BackupFirmwareConfiguration BackupFirmwareConfigurationRequestType func init() { t["BackupFirmwareConfiguration"] = reflect.TypeOf((*BackupFirmwareConfiguration)(nil)).Elem() } type BackupFirmwareConfigurationRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["BackupFirmwareConfigurationRequestType"] = reflect.TypeOf((*BackupFirmwareConfigurationRequestType)(nil)).Elem() } type BackupFirmwareConfigurationResponse struct { Returnval string `xml:"returnval"` } type BadUsernameSessionEvent struct { SessionEvent IpAddress string `xml:"ipAddress"` } func init() { t["BadUsernameSessionEvent"] = reflect.TypeOf((*BadUsernameSessionEvent)(nil)).Elem() } type BaseConfigInfo struct { DynamicData Id ID `xml:"id"` Name string `xml:"name"` CreateTime time.Time `xml:"createTime"` Backing BaseBaseConfigInfoBackingInfo `xml:"backing,typeattr"` } func init() { t["BaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem() } type BaseConfigInfoBackingInfo struct { DynamicData Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["BaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem() } type BaseConfigInfoDiskFileBackingInfo struct { BaseConfigInfoFileBackingInfo ProvisioningType string `xml:"provisioningType"` } func init() { t["BaseConfigInfoDiskFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfo)(nil)).Elem() } type BaseConfigInfoFileBackingInfo struct { BaseConfigInfoBackingInfo FilePath string `xml:"filePath"` BackingObjectId string `xml:"backingObjectId,omitempty"` Parent BaseBaseConfigInfoFileBackingInfo `xml:"parent,omitempty,typeattr"` DeltaSizeInMB int64 `xml:"deltaSizeInMB,omitempty"` } func init() { t["BaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem() } type BaseConfigInfoRawDiskMappingBackingInfo struct { BaseConfigInfoFileBackingInfo LunUuid string `xml:"lunUuid"` CompatibilityMode string `xml:"compatibilityMode"` } func init() { t["BaseConfigInfoRawDiskMappingBackingInfo"] = reflect.TypeOf((*BaseConfigInfoRawDiskMappingBackingInfo)(nil)).Elem() } type BatchResult struct { DynamicData Result string `xml:"result"` HostKey string `xml:"hostKey"` Ds *ManagedObjectReference `xml:"ds,omitempty"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["BatchResult"] = reflect.TypeOf((*BatchResult)(nil)).Elem() } type BindVnic BindVnicRequestType func init() { t["BindVnic"] = reflect.TypeOf((*BindVnic)(nil)).Elem() } type BindVnicRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaName string `xml:"iScsiHbaName"` VnicDevice string `xml:"vnicDevice"` } func init() { t["BindVnicRequestType"] = reflect.TypeOf((*BindVnicRequestType)(nil)).Elem() } type BindVnicResponse struct { } type BlockedByFirewall struct { HostConfigFault } func init() { t["BlockedByFirewall"] = reflect.TypeOf((*BlockedByFirewall)(nil)).Elem() } type BlockedByFirewallFault BlockedByFirewall func init() { t["BlockedByFirewallFault"] = reflect.TypeOf((*BlockedByFirewallFault)(nil)).Elem() } type BoolOption struct { OptionType Supported bool `xml:"supported"` DefaultValue bool `xml:"defaultValue"` } func init() { t["BoolOption"] = reflect.TypeOf((*BoolOption)(nil)).Elem() } type BoolPolicy struct { InheritablePolicy Value *bool `xml:"value"` } func init() { t["BoolPolicy"] = reflect.TypeOf((*BoolPolicy)(nil)).Elem() } type BrowseDiagnosticLog BrowseDiagnosticLogRequestType func init() { t["BrowseDiagnosticLog"] = reflect.TypeOf((*BrowseDiagnosticLog)(nil)).Elem() } type BrowseDiagnosticLogRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` Key string `xml:"key"` Start int32 `xml:"start,omitempty"` Lines int32 `xml:"lines,omitempty"` } func init() { t["BrowseDiagnosticLogRequestType"] = reflect.TypeOf((*BrowseDiagnosticLogRequestType)(nil)).Elem() } type BrowseDiagnosticLogResponse struct { Returnval DiagnosticManagerLogHeader `xml:"returnval"` } type CAMServerRefusedConnection struct { InvalidCAMServer } func init() { t["CAMServerRefusedConnection"] = reflect.TypeOf((*CAMServerRefusedConnection)(nil)).Elem() } type CAMServerRefusedConnectionFault CAMServerRefusedConnection func init() { t["CAMServerRefusedConnectionFault"] = reflect.TypeOf((*CAMServerRefusedConnectionFault)(nil)).Elem() } type CanProvisionObjects CanProvisionObjectsRequestType func init() { t["CanProvisionObjects"] = reflect.TypeOf((*CanProvisionObjects)(nil)).Elem() } type CanProvisionObjectsRequestType struct { This ManagedObjectReference `xml:"_this"` Npbs []VsanNewPolicyBatch `xml:"npbs"` IgnoreSatisfiability *bool `xml:"ignoreSatisfiability"` } func init() { t["CanProvisionObjectsRequestType"] = reflect.TypeOf((*CanProvisionObjectsRequestType)(nil)).Elem() } type CanProvisionObjectsResponse struct { Returnval []VsanPolicySatisfiability `xml:"returnval"` } type CancelRecommendation CancelRecommendationRequestType func init() { t["CancelRecommendation"] = reflect.TypeOf((*CancelRecommendation)(nil)).Elem() } type CancelRecommendationRequestType struct { This ManagedObjectReference `xml:"_this"` Key string `xml:"key"` } func init() { t["CancelRecommendationRequestType"] = reflect.TypeOf((*CancelRecommendationRequestType)(nil)).Elem() } type CancelRecommendationResponse struct { } type CancelRetrievePropertiesEx CancelRetrievePropertiesExRequestType func init() { t["CancelRetrievePropertiesEx"] = reflect.TypeOf((*CancelRetrievePropertiesEx)(nil)).Elem() } type CancelRetrievePropertiesExRequestType struct { This ManagedObjectReference `xml:"_this"` Token string `xml:"token"` } func init() { t["CancelRetrievePropertiesExRequestType"] = reflect.TypeOf((*CancelRetrievePropertiesExRequestType)(nil)).Elem() } type CancelRetrievePropertiesExResponse struct { } type CancelStorageDrsRecommendation CancelStorageDrsRecommendationRequestType func init() { t["CancelStorageDrsRecommendation"] = reflect.TypeOf((*CancelStorageDrsRecommendation)(nil)).Elem() } type CancelStorageDrsRecommendationRequestType struct { This ManagedObjectReference `xml:"_this"` Key []string `xml:"key"` } func init() { t["CancelStorageDrsRecommendationRequestType"] = reflect.TypeOf((*CancelStorageDrsRecommendationRequestType)(nil)).Elem() } type CancelStorageDrsRecommendationResponse struct { } type CancelTask CancelTaskRequestType func init() { t["CancelTask"] = reflect.TypeOf((*CancelTask)(nil)).Elem() } type CancelTaskRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["CancelTaskRequestType"] = reflect.TypeOf((*CancelTaskRequestType)(nil)).Elem() } type CancelTaskResponse struct { } type CancelWaitForUpdates CancelWaitForUpdatesRequestType func init() { t["CancelWaitForUpdates"] = reflect.TypeOf((*CancelWaitForUpdates)(nil)).Elem() } type CancelWaitForUpdatesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["CancelWaitForUpdatesRequestType"] = reflect.TypeOf((*CancelWaitForUpdatesRequestType)(nil)).Elem() } type CancelWaitForUpdatesResponse struct { } type CanceledHostOperationEvent struct { HostEvent } func init() { t["CanceledHostOperationEvent"] = reflect.TypeOf((*CanceledHostOperationEvent)(nil)).Elem() } type CannotAccessFile struct { FileFault } func init() { t["CannotAccessFile"] = reflect.TypeOf((*CannotAccessFile)(nil)).Elem() } type CannotAccessFileFault CannotAccessFile func init() { t["CannotAccessFileFault"] = reflect.TypeOf((*CannotAccessFileFault)(nil)).Elem() } type CannotAccessLocalSource struct { VimFault } func init() { t["CannotAccessLocalSource"] = reflect.TypeOf((*CannotAccessLocalSource)(nil)).Elem() } type CannotAccessLocalSourceFault CannotAccessLocalSource func init() { t["CannotAccessLocalSourceFault"] = reflect.TypeOf((*CannotAccessLocalSourceFault)(nil)).Elem() } type CannotAccessNetwork struct { CannotAccessVmDevice Network *ManagedObjectReference `xml:"network,omitempty"` } func init() { t["CannotAccessNetwork"] = reflect.TypeOf((*CannotAccessNetwork)(nil)).Elem() } type CannotAccessNetworkFault BaseCannotAccessNetwork func init() { t["CannotAccessNetworkFault"] = reflect.TypeOf((*CannotAccessNetworkFault)(nil)).Elem() } type CannotAccessVmComponent struct { VmConfigFault } func init() { t["CannotAccessVmComponent"] = reflect.TypeOf((*CannotAccessVmComponent)(nil)).Elem() } type CannotAccessVmComponentFault BaseCannotAccessVmComponent func init() { t["CannotAccessVmComponentFault"] = reflect.TypeOf((*CannotAccessVmComponentFault)(nil)).Elem() } type CannotAccessVmConfig struct { CannotAccessVmComponent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["CannotAccessVmConfig"] = reflect.TypeOf((*CannotAccessVmConfig)(nil)).Elem() } type CannotAccessVmConfigFault CannotAccessVmConfig func init() { t["CannotAccessVmConfigFault"] = reflect.TypeOf((*CannotAccessVmConfigFault)(nil)).Elem() } type CannotAccessVmDevice struct { CannotAccessVmComponent Device string `xml:"device"` Backing string `xml:"backing"` Connected bool `xml:"connected"` } func init() { t["CannotAccessVmDevice"] = reflect.TypeOf((*CannotAccessVmDevice)(nil)).Elem() } type CannotAccessVmDeviceFault BaseCannotAccessVmDevice func init() { t["CannotAccessVmDeviceFault"] = reflect.TypeOf((*CannotAccessVmDeviceFault)(nil)).Elem() } type CannotAccessVmDisk struct { CannotAccessVmDevice Fault LocalizedMethodFault `xml:"fault"` } func init() { t["CannotAccessVmDisk"] = reflect.TypeOf((*CannotAccessVmDisk)(nil)).Elem() } type CannotAccessVmDiskFault BaseCannotAccessVmDisk func init() { t["CannotAccessVmDiskFault"] = reflect.TypeOf((*CannotAccessVmDiskFault)(nil)).Elem() } type CannotAddHostWithFTVmAsStandalone struct { HostConnectFault } func init() { t["CannotAddHostWithFTVmAsStandalone"] = reflect.TypeOf((*CannotAddHostWithFTVmAsStandalone)(nil)).Elem() } type CannotAddHostWithFTVmAsStandaloneFault CannotAddHostWithFTVmAsStandalone func init() { t["CannotAddHostWithFTVmAsStandaloneFault"] = reflect.TypeOf((*CannotAddHostWithFTVmAsStandaloneFault)(nil)).Elem() } type CannotAddHostWithFTVmToDifferentCluster struct { HostConnectFault } func init() { t["CannotAddHostWithFTVmToDifferentCluster"] = reflect.TypeOf((*CannotAddHostWithFTVmToDifferentCluster)(nil)).Elem() } type CannotAddHostWithFTVmToDifferentClusterFault CannotAddHostWithFTVmToDifferentCluster func init() { t["CannotAddHostWithFTVmToDifferentClusterFault"] = reflect.TypeOf((*CannotAddHostWithFTVmToDifferentClusterFault)(nil)).Elem() } type CannotAddHostWithFTVmToNonHACluster struct { HostConnectFault } func init() { t["CannotAddHostWithFTVmToNonHACluster"] = reflect.TypeOf((*CannotAddHostWithFTVmToNonHACluster)(nil)).Elem() } type CannotAddHostWithFTVmToNonHAClusterFault CannotAddHostWithFTVmToNonHACluster func init() { t["CannotAddHostWithFTVmToNonHAClusterFault"] = reflect.TypeOf((*CannotAddHostWithFTVmToNonHAClusterFault)(nil)).Elem() } type CannotChangeDrsBehaviorForFtSecondary struct { VmFaultToleranceIssue Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["CannotChangeDrsBehaviorForFtSecondary"] = reflect.TypeOf((*CannotChangeDrsBehaviorForFtSecondary)(nil)).Elem() } type CannotChangeDrsBehaviorForFtSecondaryFault CannotChangeDrsBehaviorForFtSecondary func init() { t["CannotChangeDrsBehaviorForFtSecondaryFault"] = reflect.TypeOf((*CannotChangeDrsBehaviorForFtSecondaryFault)(nil)).Elem() } type CannotChangeHaSettingsForFtSecondary struct { VmFaultToleranceIssue Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["CannotChangeHaSettingsForFtSecondary"] = reflect.TypeOf((*CannotChangeHaSettingsForFtSecondary)(nil)).Elem() } type CannotChangeHaSettingsForFtSecondaryFault CannotChangeHaSettingsForFtSecondary func init() { t["CannotChangeHaSettingsForFtSecondaryFault"] = reflect.TypeOf((*CannotChangeHaSettingsForFtSecondaryFault)(nil)).Elem() } type CannotChangeVsanClusterUuid struct { VsanFault } func init() { t["CannotChangeVsanClusterUuid"] = reflect.TypeOf((*CannotChangeVsanClusterUuid)(nil)).Elem() } type CannotChangeVsanClusterUuidFault CannotChangeVsanClusterUuid func init() { t["CannotChangeVsanClusterUuidFault"] = reflect.TypeOf((*CannotChangeVsanClusterUuidFault)(nil)).Elem() } type CannotChangeVsanNodeUuid struct { VsanFault } func init() { t["CannotChangeVsanNodeUuid"] = reflect.TypeOf((*CannotChangeVsanNodeUuid)(nil)).Elem() } type CannotChangeVsanNodeUuidFault CannotChangeVsanNodeUuid func init() { t["CannotChangeVsanNodeUuidFault"] = reflect.TypeOf((*CannotChangeVsanNodeUuidFault)(nil)).Elem() } type CannotComputeFTCompatibleHosts struct { VmFaultToleranceIssue Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["CannotComputeFTCompatibleHosts"] = reflect.TypeOf((*CannotComputeFTCompatibleHosts)(nil)).Elem() } type CannotComputeFTCompatibleHostsFault CannotComputeFTCompatibleHosts func init() { t["CannotComputeFTCompatibleHostsFault"] = reflect.TypeOf((*CannotComputeFTCompatibleHostsFault)(nil)).Elem() } type CannotCreateFile struct { FileFault } func init() { t["CannotCreateFile"] = reflect.TypeOf((*CannotCreateFile)(nil)).Elem() } type CannotCreateFileFault CannotCreateFile func init() { t["CannotCreateFileFault"] = reflect.TypeOf((*CannotCreateFileFault)(nil)).Elem() } type CannotDecryptPasswords struct { CustomizationFault } func init() { t["CannotDecryptPasswords"] = reflect.TypeOf((*CannotDecryptPasswords)(nil)).Elem() } type CannotDecryptPasswordsFault CannotDecryptPasswords func init() { t["CannotDecryptPasswordsFault"] = reflect.TypeOf((*CannotDecryptPasswordsFault)(nil)).Elem() } type CannotDeleteFile struct { FileFault } func init() { t["CannotDeleteFile"] = reflect.TypeOf((*CannotDeleteFile)(nil)).Elem() } type CannotDeleteFileFault CannotDeleteFile func init() { t["CannotDeleteFileFault"] = reflect.TypeOf((*CannotDeleteFileFault)(nil)).Elem() } type CannotDisableDrsOnClustersWithVApps struct { RuntimeFault } func init() { t["CannotDisableDrsOnClustersWithVApps"] = reflect.TypeOf((*CannotDisableDrsOnClustersWithVApps)(nil)).Elem() } type CannotDisableDrsOnClustersWithVAppsFault CannotDisableDrsOnClustersWithVApps func init() { t["CannotDisableDrsOnClustersWithVAppsFault"] = reflect.TypeOf((*CannotDisableDrsOnClustersWithVAppsFault)(nil)).Elem() } type CannotDisableSnapshot struct { VmConfigFault } func init() { t["CannotDisableSnapshot"] = reflect.TypeOf((*CannotDisableSnapshot)(nil)).Elem() } type CannotDisableSnapshotFault CannotDisableSnapshot func init() { t["CannotDisableSnapshotFault"] = reflect.TypeOf((*CannotDisableSnapshotFault)(nil)).Elem() } type CannotDisconnectHostWithFaultToleranceVm struct { VimFault HostName string `xml:"hostName"` } func init() { t["CannotDisconnectHostWithFaultToleranceVm"] = reflect.TypeOf((*CannotDisconnectHostWithFaultToleranceVm)(nil)).Elem() } type CannotDisconnectHostWithFaultToleranceVmFault CannotDisconnectHostWithFaultToleranceVm func init() { t["CannotDisconnectHostWithFaultToleranceVmFault"] = reflect.TypeOf((*CannotDisconnectHostWithFaultToleranceVmFault)(nil)).Elem() } type CannotEnableVmcpForCluster struct { VimFault Host *ManagedObjectReference `xml:"host,omitempty"` HostName string `xml:"hostName,omitempty"` Reason string `xml:"reason,omitempty"` } func init() { t["CannotEnableVmcpForCluster"] = reflect.TypeOf((*CannotEnableVmcpForCluster)(nil)).Elem() } type CannotEnableVmcpForClusterFault CannotEnableVmcpForCluster func init() { t["CannotEnableVmcpForClusterFault"] = reflect.TypeOf((*CannotEnableVmcpForClusterFault)(nil)).Elem() } type CannotModifyConfigCpuRequirements struct { MigrationFault } func init() { t["CannotModifyConfigCpuRequirements"] = reflect.TypeOf((*CannotModifyConfigCpuRequirements)(nil)).Elem() } type CannotModifyConfigCpuRequirementsFault CannotModifyConfigCpuRequirements func init() { t["CannotModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*CannotModifyConfigCpuRequirementsFault)(nil)).Elem() } type CannotMoveFaultToleranceVm struct { VimFault MoveType string `xml:"moveType"` VmName string `xml:"vmName"` } func init() { t["CannotMoveFaultToleranceVm"] = reflect.TypeOf((*CannotMoveFaultToleranceVm)(nil)).Elem() } type CannotMoveFaultToleranceVmFault CannotMoveFaultToleranceVm func init() { t["CannotMoveFaultToleranceVmFault"] = reflect.TypeOf((*CannotMoveFaultToleranceVmFault)(nil)).Elem() } type CannotMoveHostWithFaultToleranceVm struct { VimFault } func init() { t["CannotMoveHostWithFaultToleranceVm"] = reflect.TypeOf((*CannotMoveHostWithFaultToleranceVm)(nil)).Elem() } type CannotMoveHostWithFaultToleranceVmFault CannotMoveHostWithFaultToleranceVm func init() { t["CannotMoveHostWithFaultToleranceVmFault"] = reflect.TypeOf((*CannotMoveHostWithFaultToleranceVmFault)(nil)).Elem() } type CannotMoveVmWithDeltaDisk struct { MigrationFault Device string `xml:"device"` } func init() { t["CannotMoveVmWithDeltaDisk"] = reflect.TypeOf((*CannotMoveVmWithDeltaDisk)(nil)).Elem() } type CannotMoveVmWithDeltaDiskFault CannotMoveVmWithDeltaDisk func init() { t["CannotMoveVmWithDeltaDiskFault"] = reflect.TypeOf((*CannotMoveVmWithDeltaDiskFault)(nil)).Elem() } type CannotMoveVmWithNativeDeltaDisk struct { MigrationFault } func init() { t["CannotMoveVmWithNativeDeltaDisk"] = reflect.TypeOf((*CannotMoveVmWithNativeDeltaDisk)(nil)).Elem() } type CannotMoveVmWithNativeDeltaDiskFault CannotMoveVmWithNativeDeltaDisk func init() { t["CannotMoveVmWithNativeDeltaDiskFault"] = reflect.TypeOf((*CannotMoveVmWithNativeDeltaDiskFault)(nil)).Elem() } type CannotMoveVsanEnabledHost struct { VsanFault } func init() { t["CannotMoveVsanEnabledHost"] = reflect.TypeOf((*CannotMoveVsanEnabledHost)(nil)).Elem() } type CannotMoveVsanEnabledHostFault BaseCannotMoveVsanEnabledHost func init() { t["CannotMoveVsanEnabledHostFault"] = reflect.TypeOf((*CannotMoveVsanEnabledHostFault)(nil)).Elem() } type CannotPlaceWithoutPrerequisiteMoves struct { VimFault } func init() { t["CannotPlaceWithoutPrerequisiteMoves"] = reflect.TypeOf((*CannotPlaceWithoutPrerequisiteMoves)(nil)).Elem() } type CannotPlaceWithoutPrerequisiteMovesFault CannotPlaceWithoutPrerequisiteMoves func init() { t["CannotPlaceWithoutPrerequisiteMovesFault"] = reflect.TypeOf((*CannotPlaceWithoutPrerequisiteMovesFault)(nil)).Elem() } type CannotPowerOffVmInCluster struct { InvalidState Operation string `xml:"operation"` Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["CannotPowerOffVmInCluster"] = reflect.TypeOf((*CannotPowerOffVmInCluster)(nil)).Elem() } type CannotPowerOffVmInClusterFault CannotPowerOffVmInCluster func init() { t["CannotPowerOffVmInClusterFault"] = reflect.TypeOf((*CannotPowerOffVmInClusterFault)(nil)).Elem() } type CannotReconfigureVsanWhenHaEnabled struct { VsanFault } func init() { t["CannotReconfigureVsanWhenHaEnabled"] = reflect.TypeOf((*CannotReconfigureVsanWhenHaEnabled)(nil)).Elem() } type CannotReconfigureVsanWhenHaEnabledFault CannotReconfigureVsanWhenHaEnabled func init() { t["CannotReconfigureVsanWhenHaEnabledFault"] = reflect.TypeOf((*CannotReconfigureVsanWhenHaEnabledFault)(nil)).Elem() } type CannotUseNetwork struct { VmConfigFault Device string `xml:"device"` Backing string `xml:"backing"` Connected bool `xml:"connected"` Reason string `xml:"reason"` Network *ManagedObjectReference `xml:"network,omitempty"` } func init() { t["CannotUseNetwork"] = reflect.TypeOf((*CannotUseNetwork)(nil)).Elem() } type CannotUseNetworkFault CannotUseNetwork func init() { t["CannotUseNetworkFault"] = reflect.TypeOf((*CannotUseNetworkFault)(nil)).Elem() } type Capability struct { DynamicData ProvisioningSupported bool `xml:"provisioningSupported"` MultiHostSupported bool `xml:"multiHostSupported"` UserShellAccessSupported bool `xml:"userShellAccessSupported"` SupportedEVCMode []EVCMode `xml:"supportedEVCMode,omitempty"` NetworkBackupAndRestoreSupported *bool `xml:"networkBackupAndRestoreSupported"` } func init() { t["Capability"] = reflect.TypeOf((*Capability)(nil)).Elem() } type CertMgrRefreshCACertificatesAndCRLsRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` } func init() { t["CertMgrRefreshCACertificatesAndCRLsRequestType"] = reflect.TypeOf((*CertMgrRefreshCACertificatesAndCRLsRequestType)(nil)).Elem() } type CertMgrRefreshCACertificatesAndCRLs_Task CertMgrRefreshCACertificatesAndCRLsRequestType func init() { t["CertMgrRefreshCACertificatesAndCRLs_Task"] = reflect.TypeOf((*CertMgrRefreshCACertificatesAndCRLs_Task)(nil)).Elem() } type CertMgrRefreshCACertificatesAndCRLs_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CertMgrRefreshCertificatesRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` } func init() { t["CertMgrRefreshCertificatesRequestType"] = reflect.TypeOf((*CertMgrRefreshCertificatesRequestType)(nil)).Elem() } type CertMgrRefreshCertificates_Task CertMgrRefreshCertificatesRequestType func init() { t["CertMgrRefreshCertificates_Task"] = reflect.TypeOf((*CertMgrRefreshCertificates_Task)(nil)).Elem() } type CertMgrRefreshCertificates_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CertMgrRevokeCertificatesRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` } func init() { t["CertMgrRevokeCertificatesRequestType"] = reflect.TypeOf((*CertMgrRevokeCertificatesRequestType)(nil)).Elem() } type CertMgrRevokeCertificates_Task CertMgrRevokeCertificatesRequestType func init() { t["CertMgrRevokeCertificates_Task"] = reflect.TypeOf((*CertMgrRevokeCertificates_Task)(nil)).Elem() } type CertMgrRevokeCertificates_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ChangeAccessMode ChangeAccessModeRequestType func init() { t["ChangeAccessMode"] = reflect.TypeOf((*ChangeAccessMode)(nil)).Elem() } type ChangeAccessModeRequestType struct { This ManagedObjectReference `xml:"_this"` Principal string `xml:"principal"` IsGroup bool `xml:"isGroup"` AccessMode HostAccessMode `xml:"accessMode"` } func init() { t["ChangeAccessModeRequestType"] = reflect.TypeOf((*ChangeAccessModeRequestType)(nil)).Elem() } type ChangeAccessModeResponse struct { } type ChangeFileAttributesInGuest ChangeFileAttributesInGuestRequestType func init() { t["ChangeFileAttributesInGuest"] = reflect.TypeOf((*ChangeFileAttributesInGuest)(nil)).Elem() } type ChangeFileAttributesInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` GuestFilePath string `xml:"guestFilePath"` FileAttributes BaseGuestFileAttributes `xml:"fileAttributes,typeattr"` } func init() { t["ChangeFileAttributesInGuestRequestType"] = reflect.TypeOf((*ChangeFileAttributesInGuestRequestType)(nil)).Elem() } type ChangeFileAttributesInGuestResponse struct { } type ChangeLockdownMode ChangeLockdownModeRequestType func init() { t["ChangeLockdownMode"] = reflect.TypeOf((*ChangeLockdownMode)(nil)).Elem() } type ChangeLockdownModeRequestType struct { This ManagedObjectReference `xml:"_this"` Mode HostLockdownMode `xml:"mode"` } func init() { t["ChangeLockdownModeRequestType"] = reflect.TypeOf((*ChangeLockdownModeRequestType)(nil)).Elem() } type ChangeLockdownModeResponse struct { } type ChangeNFSUserPassword ChangeNFSUserPasswordRequestType func init() { t["ChangeNFSUserPassword"] = reflect.TypeOf((*ChangeNFSUserPassword)(nil)).Elem() } type ChangeNFSUserPasswordRequestType struct { This ManagedObjectReference `xml:"_this"` Password string `xml:"password"` } func init() { t["ChangeNFSUserPasswordRequestType"] = reflect.TypeOf((*ChangeNFSUserPasswordRequestType)(nil)).Elem() } type ChangeNFSUserPasswordResponse struct { } type ChangeOwner ChangeOwnerRequestType func init() { t["ChangeOwner"] = reflect.TypeOf((*ChangeOwner)(nil)).Elem() } type ChangeOwnerRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Owner string `xml:"owner"` } func init() { t["ChangeOwnerRequestType"] = reflect.TypeOf((*ChangeOwnerRequestType)(nil)).Elem() } type ChangeOwnerResponse struct { } type ChangesInfoEventArgument struct { DynamicData Modified string `xml:"modified,omitempty"` Added string `xml:"added,omitempty"` Deleted string `xml:"deleted,omitempty"` } func init() { t["ChangesInfoEventArgument"] = reflect.TypeOf((*ChangesInfoEventArgument)(nil)).Elem() } type CheckAddHostEvcRequestType struct { This ManagedObjectReference `xml:"_this"` CnxSpec HostConnectSpec `xml:"cnxSpec"` } func init() { t["CheckAddHostEvcRequestType"] = reflect.TypeOf((*CheckAddHostEvcRequestType)(nil)).Elem() } type CheckAddHostEvc_Task CheckAddHostEvcRequestType func init() { t["CheckAddHostEvc_Task"] = reflect.TypeOf((*CheckAddHostEvc_Task)(nil)).Elem() } type CheckAddHostEvc_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckAnswerFileStatusRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` } func init() { t["CheckAnswerFileStatusRequestType"] = reflect.TypeOf((*CheckAnswerFileStatusRequestType)(nil)).Elem() } type CheckAnswerFileStatus_Task CheckAnswerFileStatusRequestType func init() { t["CheckAnswerFileStatus_Task"] = reflect.TypeOf((*CheckAnswerFileStatus_Task)(nil)).Elem() } type CheckAnswerFileStatus_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckCompatibilityRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Host *ManagedObjectReference `xml:"host,omitempty"` Pool *ManagedObjectReference `xml:"pool,omitempty"` TestType []string `xml:"testType,omitempty"` } func init() { t["CheckCompatibilityRequestType"] = reflect.TypeOf((*CheckCompatibilityRequestType)(nil)).Elem() } type CheckCompatibility_Task CheckCompatibilityRequestType func init() { t["CheckCompatibility_Task"] = reflect.TypeOf((*CheckCompatibility_Task)(nil)).Elem() } type CheckCompatibility_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckComplianceRequestType struct { This ManagedObjectReference `xml:"_this"` Profile []ManagedObjectReference `xml:"profile,omitempty"` Entity []ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["CheckComplianceRequestType"] = reflect.TypeOf((*CheckComplianceRequestType)(nil)).Elem() } type CheckCompliance_Task CheckComplianceRequestType func init() { t["CheckCompliance_Task"] = reflect.TypeOf((*CheckCompliance_Task)(nil)).Elem() } type CheckCompliance_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckConfigureEvcModeRequestType struct { This ManagedObjectReference `xml:"_this"` EvcModeKey string `xml:"evcModeKey"` } func init() { t["CheckConfigureEvcModeRequestType"] = reflect.TypeOf((*CheckConfigureEvcModeRequestType)(nil)).Elem() } type CheckConfigureEvcMode_Task CheckConfigureEvcModeRequestType func init() { t["CheckConfigureEvcMode_Task"] = reflect.TypeOf((*CheckConfigureEvcMode_Task)(nil)).Elem() } type CheckConfigureEvcMode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckCustomizationResources CheckCustomizationResourcesRequestType func init() { t["CheckCustomizationResources"] = reflect.TypeOf((*CheckCustomizationResources)(nil)).Elem() } type CheckCustomizationResourcesRequestType struct { This ManagedObjectReference `xml:"_this"` GuestOs string `xml:"guestOs"` } func init() { t["CheckCustomizationResourcesRequestType"] = reflect.TypeOf((*CheckCustomizationResourcesRequestType)(nil)).Elem() } type CheckCustomizationResourcesResponse struct { } type CheckCustomizationSpec CheckCustomizationSpecRequestType func init() { t["CheckCustomizationSpec"] = reflect.TypeOf((*CheckCustomizationSpec)(nil)).Elem() } type CheckCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Spec CustomizationSpec `xml:"spec"` } func init() { t["CheckCustomizationSpecRequestType"] = reflect.TypeOf((*CheckCustomizationSpecRequestType)(nil)).Elem() } type CheckCustomizationSpecResponse struct { } type CheckForUpdates CheckForUpdatesRequestType func init() { t["CheckForUpdates"] = reflect.TypeOf((*CheckForUpdates)(nil)).Elem() } type CheckForUpdatesRequestType struct { This ManagedObjectReference `xml:"_this"` Version string `xml:"version,omitempty"` } func init() { t["CheckForUpdatesRequestType"] = reflect.TypeOf((*CheckForUpdatesRequestType)(nil)).Elem() } type CheckForUpdatesResponse struct { Returnval *UpdateSet `xml:"returnval,omitempty"` } type CheckHostPatchRequestType struct { This ManagedObjectReference `xml:"_this"` MetaUrls []string `xml:"metaUrls,omitempty"` BundleUrls []string `xml:"bundleUrls,omitempty"` Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` } func init() { t["CheckHostPatchRequestType"] = reflect.TypeOf((*CheckHostPatchRequestType)(nil)).Elem() } type CheckHostPatch_Task CheckHostPatchRequestType func init() { t["CheckHostPatch_Task"] = reflect.TypeOf((*CheckHostPatch_Task)(nil)).Elem() } type CheckHostPatch_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckLicenseFeature CheckLicenseFeatureRequestType func init() { t["CheckLicenseFeature"] = reflect.TypeOf((*CheckLicenseFeature)(nil)).Elem() } type CheckLicenseFeatureRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` FeatureKey string `xml:"featureKey"` } func init() { t["CheckLicenseFeatureRequestType"] = reflect.TypeOf((*CheckLicenseFeatureRequestType)(nil)).Elem() } type CheckLicenseFeatureResponse struct { Returnval bool `xml:"returnval"` } type CheckMigrateRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Host *ManagedObjectReference `xml:"host,omitempty"` Pool *ManagedObjectReference `xml:"pool,omitempty"` State VirtualMachinePowerState `xml:"state,omitempty"` TestType []string `xml:"testType,omitempty"` } func init() { t["CheckMigrateRequestType"] = reflect.TypeOf((*CheckMigrateRequestType)(nil)).Elem() } type CheckMigrate_Task CheckMigrateRequestType func init() { t["CheckMigrate_Task"] = reflect.TypeOf((*CheckMigrate_Task)(nil)).Elem() } type CheckMigrate_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckProfileComplianceRequestType struct { This ManagedObjectReference `xml:"_this"` Entity []ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["CheckProfileComplianceRequestType"] = reflect.TypeOf((*CheckProfileComplianceRequestType)(nil)).Elem() } type CheckProfileCompliance_Task CheckProfileComplianceRequestType func init() { t["CheckProfileCompliance_Task"] = reflect.TypeOf((*CheckProfileCompliance_Task)(nil)).Elem() } type CheckProfileCompliance_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckRelocateRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Spec VirtualMachineRelocateSpec `xml:"spec"` TestType []string `xml:"testType,omitempty"` } func init() { t["CheckRelocateRequestType"] = reflect.TypeOf((*CheckRelocateRequestType)(nil)).Elem() } type CheckRelocate_Task CheckRelocateRequestType func init() { t["CheckRelocate_Task"] = reflect.TypeOf((*CheckRelocate_Task)(nil)).Elem() } type CheckRelocate_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CheckResult struct { DynamicData Vm *ManagedObjectReference `xml:"vm,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` Warning []LocalizedMethodFault `xml:"warning,omitempty"` Error []LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["CheckResult"] = reflect.TypeOf((*CheckResult)(nil)).Elem() } type ChoiceOption struct { OptionType ChoiceInfo []BaseElementDescription `xml:"choiceInfo,typeattr"` DefaultIndex int32 `xml:"defaultIndex,omitempty"` } func init() { t["ChoiceOption"] = reflect.TypeOf((*ChoiceOption)(nil)).Elem() } type ClearComplianceStatus ClearComplianceStatusRequestType func init() { t["ClearComplianceStatus"] = reflect.TypeOf((*ClearComplianceStatus)(nil)).Elem() } type ClearComplianceStatusRequestType struct { This ManagedObjectReference `xml:"_this"` Profile []ManagedObjectReference `xml:"profile,omitempty"` Entity []ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["ClearComplianceStatusRequestType"] = reflect.TypeOf((*ClearComplianceStatusRequestType)(nil)).Elem() } type ClearComplianceStatusResponse struct { } type ClearNFSUser ClearNFSUserRequestType func init() { t["ClearNFSUser"] = reflect.TypeOf((*ClearNFSUser)(nil)).Elem() } type ClearNFSUserRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ClearNFSUserRequestType"] = reflect.TypeOf((*ClearNFSUserRequestType)(nil)).Elem() } type ClearNFSUserResponse struct { } type ClearSystemEventLog ClearSystemEventLogRequestType func init() { t["ClearSystemEventLog"] = reflect.TypeOf((*ClearSystemEventLog)(nil)).Elem() } type ClearSystemEventLogRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ClearSystemEventLogRequestType"] = reflect.TypeOf((*ClearSystemEventLogRequestType)(nil)).Elem() } type ClearSystemEventLogResponse struct { } type ClockSkew struct { HostConfigFault } func init() { t["ClockSkew"] = reflect.TypeOf((*ClockSkew)(nil)).Elem() } type ClockSkewFault ClockSkew func init() { t["ClockSkewFault"] = reflect.TypeOf((*ClockSkewFault)(nil)).Elem() } type CloneFromSnapshotNotSupported struct { MigrationFault } func init() { t["CloneFromSnapshotNotSupported"] = reflect.TypeOf((*CloneFromSnapshotNotSupported)(nil)).Elem() } type CloneFromSnapshotNotSupportedFault CloneFromSnapshotNotSupported func init() { t["CloneFromSnapshotNotSupportedFault"] = reflect.TypeOf((*CloneFromSnapshotNotSupportedFault)(nil)).Elem() } type CloneSession CloneSessionRequestType func init() { t["CloneSession"] = reflect.TypeOf((*CloneSession)(nil)).Elem() } type CloneSessionRequestType struct { This ManagedObjectReference `xml:"_this"` CloneTicket string `xml:"cloneTicket"` } func init() { t["CloneSessionRequestType"] = reflect.TypeOf((*CloneSessionRequestType)(nil)).Elem() } type CloneSessionResponse struct { Returnval UserSession `xml:"returnval"` } type CloneVAppRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Target ManagedObjectReference `xml:"target"` Spec VAppCloneSpec `xml:"spec"` } func init() { t["CloneVAppRequestType"] = reflect.TypeOf((*CloneVAppRequestType)(nil)).Elem() } type CloneVApp_Task CloneVAppRequestType func init() { t["CloneVApp_Task"] = reflect.TypeOf((*CloneVApp_Task)(nil)).Elem() } type CloneVApp_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CloneVMRequestType struct { This ManagedObjectReference `xml:"_this"` Folder ManagedObjectReference `xml:"folder"` Name string `xml:"name"` Spec VirtualMachineCloneSpec `xml:"spec"` } func init() { t["CloneVMRequestType"] = reflect.TypeOf((*CloneVMRequestType)(nil)).Elem() } type CloneVM_Task CloneVMRequestType func init() { t["CloneVM_Task"] = reflect.TypeOf((*CloneVM_Task)(nil)).Elem() } type CloneVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CloneVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` Spec VslmCloneSpec `xml:"spec"` } func init() { t["CloneVStorageObjectRequestType"] = reflect.TypeOf((*CloneVStorageObjectRequestType)(nil)).Elem() } type CloneVStorageObject_Task CloneVStorageObjectRequestType func init() { t["CloneVStorageObject_Task"] = reflect.TypeOf((*CloneVStorageObject_Task)(nil)).Elem() } type CloneVStorageObject_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CloseInventoryViewFolder CloseInventoryViewFolderRequestType func init() { t["CloseInventoryViewFolder"] = reflect.TypeOf((*CloseInventoryViewFolder)(nil)).Elem() } type CloseInventoryViewFolderRequestType struct { This ManagedObjectReference `xml:"_this"` Entity []ManagedObjectReference `xml:"entity"` } func init() { t["CloseInventoryViewFolderRequestType"] = reflect.TypeOf((*CloseInventoryViewFolderRequestType)(nil)).Elem() } type CloseInventoryViewFolderResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type ClusterAction struct { DynamicData Type string `xml:"type"` Target *ManagedObjectReference `xml:"target,omitempty"` } func init() { t["ClusterAction"] = reflect.TypeOf((*ClusterAction)(nil)).Elem() } type ClusterActionHistory struct { DynamicData Action BaseClusterAction `xml:"action,typeattr"` Time time.Time `xml:"time"` } func init() { t["ClusterActionHistory"] = reflect.TypeOf((*ClusterActionHistory)(nil)).Elem() } type ClusterAffinityRuleSpec struct { ClusterRuleInfo Vm []ManagedObjectReference `xml:"vm"` } func init() { t["ClusterAffinityRuleSpec"] = reflect.TypeOf((*ClusterAffinityRuleSpec)(nil)).Elem() } type ClusterAntiAffinityRuleSpec struct { ClusterRuleInfo Vm []ManagedObjectReference `xml:"vm"` } func init() { t["ClusterAntiAffinityRuleSpec"] = reflect.TypeOf((*ClusterAntiAffinityRuleSpec)(nil)).Elem() } type ClusterAttemptedVmInfo struct { DynamicData Vm ManagedObjectReference `xml:"vm"` Task *ManagedObjectReference `xml:"task,omitempty"` } func init() { t["ClusterAttemptedVmInfo"] = reflect.TypeOf((*ClusterAttemptedVmInfo)(nil)).Elem() } type ClusterComplianceCheckedEvent struct { ClusterEvent Profile ProfileEventArgument `xml:"profile"` } func init() { t["ClusterComplianceCheckedEvent"] = reflect.TypeOf((*ClusterComplianceCheckedEvent)(nil)).Elem() } type ClusterComputeResourceSummary struct { ComputeResourceSummary CurrentFailoverLevel int32 `xml:"currentFailoverLevel"` AdmissionControlInfo BaseClusterDasAdmissionControlInfo `xml:"admissionControlInfo,omitempty,typeattr"` NumVmotions int32 `xml:"numVmotions"` TargetBalance int32 `xml:"targetBalance,omitempty"` CurrentBalance int32 `xml:"currentBalance,omitempty"` UsageSummary *ClusterUsageSummary `xml:"usageSummary,omitempty"` CurrentEVCModeKey string `xml:"currentEVCModeKey,omitempty"` DasData BaseClusterDasData `xml:"dasData,omitempty,typeattr"` } func init() { t["ClusterComputeResourceSummary"] = reflect.TypeOf((*ClusterComputeResourceSummary)(nil)).Elem() } type ClusterConfigInfo struct { DynamicData DasConfig ClusterDasConfigInfo `xml:"dasConfig"` DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"` DrsConfig ClusterDrsConfigInfo `xml:"drsConfig"` DrsVmConfig []ClusterDrsVmConfigInfo `xml:"drsVmConfig,omitempty"` Rule []BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` } func init() { t["ClusterConfigInfo"] = reflect.TypeOf((*ClusterConfigInfo)(nil)).Elem() } type ClusterConfigInfoEx struct { ComputeResourceConfigInfo DasConfig ClusterDasConfigInfo `xml:"dasConfig"` DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"` DrsConfig ClusterDrsConfigInfo `xml:"drsConfig"` DrsVmConfig []ClusterDrsVmConfigInfo `xml:"drsVmConfig,omitempty"` Rule []BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` Orchestration *ClusterOrchestrationInfo `xml:"orchestration,omitempty"` VmOrchestration []ClusterVmOrchestrationInfo `xml:"vmOrchestration,omitempty"` DpmConfigInfo *ClusterDpmConfigInfo `xml:"dpmConfigInfo,omitempty"` DpmHostConfig []ClusterDpmHostConfigInfo `xml:"dpmHostConfig,omitempty"` VsanConfigInfo *VsanClusterConfigInfo `xml:"vsanConfigInfo,omitempty"` VsanHostConfig []VsanHostConfigInfo `xml:"vsanHostConfig,omitempty"` Group []BaseClusterGroupInfo `xml:"group,omitempty,typeattr"` InfraUpdateHaConfig *ClusterInfraUpdateHaConfigInfo `xml:"infraUpdateHaConfig,omitempty"` ProactiveDrsConfig *ClusterProactiveDrsConfigInfo `xml:"proactiveDrsConfig,omitempty"` } func init() { t["ClusterConfigInfoEx"] = reflect.TypeOf((*ClusterConfigInfoEx)(nil)).Elem() } type ClusterConfigSpec struct { DynamicData DasConfig *ClusterDasConfigInfo `xml:"dasConfig,omitempty"` DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"` DrsConfig *ClusterDrsConfigInfo `xml:"drsConfig,omitempty"` DrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"drsVmConfigSpec,omitempty"` RulesSpec []ClusterRuleSpec `xml:"rulesSpec,omitempty"` } func init() { t["ClusterConfigSpec"] = reflect.TypeOf((*ClusterConfigSpec)(nil)).Elem() } type ClusterConfigSpecEx struct { ComputeResourceConfigSpec DasConfig *ClusterDasConfigInfo `xml:"dasConfig,omitempty"` DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"` DrsConfig *ClusterDrsConfigInfo `xml:"drsConfig,omitempty"` DrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"drsVmConfigSpec,omitempty"` RulesSpec []ClusterRuleSpec `xml:"rulesSpec,omitempty"` Orchestration *ClusterOrchestrationInfo `xml:"orchestration,omitempty"` VmOrchestrationSpec []ClusterVmOrchestrationSpec `xml:"vmOrchestrationSpec,omitempty"` DpmConfig *ClusterDpmConfigInfo `xml:"dpmConfig,omitempty"` DpmHostConfigSpec []ClusterDpmHostConfigSpec `xml:"dpmHostConfigSpec,omitempty"` VsanConfig *VsanClusterConfigInfo `xml:"vsanConfig,omitempty"` VsanHostConfigSpec []VsanHostConfigInfo `xml:"vsanHostConfigSpec,omitempty"` GroupSpec []ClusterGroupSpec `xml:"groupSpec,omitempty"` InfraUpdateHaConfig *ClusterInfraUpdateHaConfigInfo `xml:"infraUpdateHaConfig,omitempty"` ProactiveDrsConfig *ClusterProactiveDrsConfigInfo `xml:"proactiveDrsConfig,omitempty"` } func init() { t["ClusterConfigSpecEx"] = reflect.TypeOf((*ClusterConfigSpecEx)(nil)).Elem() } type ClusterCreatedEvent struct { ClusterEvent Parent FolderEventArgument `xml:"parent"` } func init() { t["ClusterCreatedEvent"] = reflect.TypeOf((*ClusterCreatedEvent)(nil)).Elem() } type ClusterDasAamHostInfo struct { ClusterDasHostInfo HostDasState []ClusterDasAamNodeState `xml:"hostDasState,omitempty"` PrimaryHosts []string `xml:"primaryHosts,omitempty"` } func init() { t["ClusterDasAamHostInfo"] = reflect.TypeOf((*ClusterDasAamHostInfo)(nil)).Elem() } type ClusterDasAamNodeState struct { DynamicData Host ManagedObjectReference `xml:"host"` Name string `xml:"name"` ConfigState string `xml:"configState"` RuntimeState string `xml:"runtimeState"` } func init() { t["ClusterDasAamNodeState"] = reflect.TypeOf((*ClusterDasAamNodeState)(nil)).Elem() } type ClusterDasAdmissionControlInfo struct { DynamicData } func init() { t["ClusterDasAdmissionControlInfo"] = reflect.TypeOf((*ClusterDasAdmissionControlInfo)(nil)).Elem() } type ClusterDasAdmissionControlPolicy struct { DynamicData ResourceReductionToToleratePercent int32 `xml:"resourceReductionToToleratePercent,omitempty"` } func init() { t["ClusterDasAdmissionControlPolicy"] = reflect.TypeOf((*ClusterDasAdmissionControlPolicy)(nil)).Elem() } type ClusterDasAdvancedRuntimeInfo struct { DynamicData DasHostInfo BaseClusterDasHostInfo `xml:"dasHostInfo,omitempty,typeattr"` VmcpSupported *ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo `xml:"vmcpSupported,omitempty"` HeartbeatDatastoreInfo []DasHeartbeatDatastoreInfo `xml:"heartbeatDatastoreInfo,omitempty"` } func init() { t["ClusterDasAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfo)(nil)).Elem() } type ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo struct { DynamicData StorageAPDSupported bool `xml:"storageAPDSupported"` StoragePDLSupported bool `xml:"storagePDLSupported"` } func init() { t["ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo)(nil)).Elem() } type ClusterDasConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` VmMonitoring string `xml:"vmMonitoring,omitempty"` HostMonitoring string `xml:"hostMonitoring,omitempty"` VmComponentProtecting string `xml:"vmComponentProtecting,omitempty"` FailoverLevel int32 `xml:"failoverLevel,omitempty"` AdmissionControlPolicy BaseClusterDasAdmissionControlPolicy `xml:"admissionControlPolicy,omitempty,typeattr"` AdmissionControlEnabled *bool `xml:"admissionControlEnabled"` DefaultVmSettings *ClusterDasVmSettings `xml:"defaultVmSettings,omitempty"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` HeartbeatDatastore []ManagedObjectReference `xml:"heartbeatDatastore,omitempty"` HBDatastoreCandidatePolicy string `xml:"hBDatastoreCandidatePolicy,omitempty"` } func init() { t["ClusterDasConfigInfo"] = reflect.TypeOf((*ClusterDasConfigInfo)(nil)).Elem() } type ClusterDasData struct { DynamicData } func init() { t["ClusterDasData"] = reflect.TypeOf((*ClusterDasData)(nil)).Elem() } type ClusterDasDataSummary struct { ClusterDasData HostListVersion int64 `xml:"hostListVersion"` ClusterConfigVersion int64 `xml:"clusterConfigVersion"` CompatListVersion int64 `xml:"compatListVersion"` } func init() { t["ClusterDasDataSummary"] = reflect.TypeOf((*ClusterDasDataSummary)(nil)).Elem() } type ClusterDasFailoverLevelAdvancedRuntimeInfo struct { ClusterDasAdvancedRuntimeInfo SlotInfo ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo `xml:"slotInfo"` TotalSlots int32 `xml:"totalSlots"` UsedSlots int32 `xml:"usedSlots"` UnreservedSlots int32 `xml:"unreservedSlots"` TotalVms int32 `xml:"totalVms"` TotalHosts int32 `xml:"totalHosts"` TotalGoodHosts int32 `xml:"totalGoodHosts"` HostSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots `xml:"hostSlots,omitempty"` VmsRequiringMultipleSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots `xml:"vmsRequiringMultipleSlots,omitempty"` } func init() { t["ClusterDasFailoverLevelAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfo)(nil)).Elem() } type ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots struct { DynamicData Host ManagedObjectReference `xml:"host"` Slots int32 `xml:"slots"` } func init() { t["ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots)(nil)).Elem() } type ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo struct { DynamicData NumVcpus int32 `xml:"numVcpus"` CpuMHz int32 `xml:"cpuMHz"` MemoryMB int32 `xml:"memoryMB"` } func init() { t["ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo)(nil)).Elem() } type ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots struct { DynamicData Vm ManagedObjectReference `xml:"vm"` Slots int32 `xml:"slots"` } func init() { t["ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots)(nil)).Elem() } type ClusterDasFdmHostState struct { DynamicData State string `xml:"state"` StateReporter *ManagedObjectReference `xml:"stateReporter,omitempty"` } func init() { t["ClusterDasFdmHostState"] = reflect.TypeOf((*ClusterDasFdmHostState)(nil)).Elem() } type ClusterDasHostInfo struct { DynamicData } func init() { t["ClusterDasHostInfo"] = reflect.TypeOf((*ClusterDasHostInfo)(nil)).Elem() } type ClusterDasHostRecommendation struct { DynamicData Host ManagedObjectReference `xml:"host"` DrsRating int32 `xml:"drsRating,omitempty"` } func init() { t["ClusterDasHostRecommendation"] = reflect.TypeOf((*ClusterDasHostRecommendation)(nil)).Elem() } type ClusterDasVmConfigInfo struct { DynamicData Key ManagedObjectReference `xml:"key"` RestartPriority DasVmPriority `xml:"restartPriority,omitempty"` PowerOffOnIsolation *bool `xml:"powerOffOnIsolation"` DasSettings *ClusterDasVmSettings `xml:"dasSettings,omitempty"` } func init() { t["ClusterDasVmConfigInfo"] = reflect.TypeOf((*ClusterDasVmConfigInfo)(nil)).Elem() } type ClusterDasVmConfigSpec struct { ArrayUpdateSpec Info *ClusterDasVmConfigInfo `xml:"info,omitempty"` } func init() { t["ClusterDasVmConfigSpec"] = reflect.TypeOf((*ClusterDasVmConfigSpec)(nil)).Elem() } type ClusterDasVmSettings struct { DynamicData RestartPriority string `xml:"restartPriority,omitempty"` RestartPriorityTimeout int32 `xml:"restartPriorityTimeout,omitempty"` IsolationResponse string `xml:"isolationResponse,omitempty"` VmToolsMonitoringSettings *ClusterVmToolsMonitoringSettings `xml:"vmToolsMonitoringSettings,omitempty"` VmComponentProtectionSettings *ClusterVmComponentProtectionSettings `xml:"vmComponentProtectionSettings,omitempty"` } func init() { t["ClusterDasVmSettings"] = reflect.TypeOf((*ClusterDasVmSettings)(nil)).Elem() } type ClusterDependencyRuleInfo struct { ClusterRuleInfo VmGroup string `xml:"vmGroup"` DependsOnVmGroup string `xml:"dependsOnVmGroup"` } func init() { t["ClusterDependencyRuleInfo"] = reflect.TypeOf((*ClusterDependencyRuleInfo)(nil)).Elem() } type ClusterDestroyedEvent struct { ClusterEvent } func init() { t["ClusterDestroyedEvent"] = reflect.TypeOf((*ClusterDestroyedEvent)(nil)).Elem() } type ClusterDpmConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` DefaultDpmBehavior DpmBehavior `xml:"defaultDpmBehavior,omitempty"` HostPowerActionRate int32 `xml:"hostPowerActionRate,omitempty"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` } func init() { t["ClusterDpmConfigInfo"] = reflect.TypeOf((*ClusterDpmConfigInfo)(nil)).Elem() } type ClusterDpmHostConfigInfo struct { DynamicData Key ManagedObjectReference `xml:"key"` Enabled *bool `xml:"enabled"` Behavior DpmBehavior `xml:"behavior,omitempty"` } func init() { t["ClusterDpmHostConfigInfo"] = reflect.TypeOf((*ClusterDpmHostConfigInfo)(nil)).Elem() } type ClusterDpmHostConfigSpec struct { ArrayUpdateSpec Info *ClusterDpmHostConfigInfo `xml:"info,omitempty"` } func init() { t["ClusterDpmHostConfigSpec"] = reflect.TypeOf((*ClusterDpmHostConfigSpec)(nil)).Elem() } type ClusterDrsConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` EnableVmBehaviorOverrides *bool `xml:"enableVmBehaviorOverrides"` DefaultVmBehavior DrsBehavior `xml:"defaultVmBehavior,omitempty"` VmotionRate int32 `xml:"vmotionRate,omitempty"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` } func init() { t["ClusterDrsConfigInfo"] = reflect.TypeOf((*ClusterDrsConfigInfo)(nil)).Elem() } type ClusterDrsFaults struct { DynamicData Reason string `xml:"reason"` FaultsByVm []BaseClusterDrsFaultsFaultsByVm `xml:"faultsByVm,typeattr"` } func init() { t["ClusterDrsFaults"] = reflect.TypeOf((*ClusterDrsFaults)(nil)).Elem() } type ClusterDrsFaultsFaultsByVirtualDisk struct { ClusterDrsFaultsFaultsByVm Disk *VirtualDiskId `xml:"disk,omitempty"` } func init() { t["ClusterDrsFaultsFaultsByVirtualDisk"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVirtualDisk)(nil)).Elem() } type ClusterDrsFaultsFaultsByVm struct { DynamicData Vm *ManagedObjectReference `xml:"vm,omitempty"` Fault []LocalizedMethodFault `xml:"fault"` } func init() { t["ClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVm)(nil)).Elem() } type ClusterDrsMigration struct { DynamicData Key string `xml:"key"` Time time.Time `xml:"time"` Vm ManagedObjectReference `xml:"vm"` CpuLoad int32 `xml:"cpuLoad,omitempty"` MemoryLoad int64 `xml:"memoryLoad,omitempty"` Source ManagedObjectReference `xml:"source"` SourceCpuLoad int32 `xml:"sourceCpuLoad,omitempty"` SourceMemoryLoad int64 `xml:"sourceMemoryLoad,omitempty"` Destination ManagedObjectReference `xml:"destination"` DestinationCpuLoad int32 `xml:"destinationCpuLoad,omitempty"` DestinationMemoryLoad int64 `xml:"destinationMemoryLoad,omitempty"` } func init() { t["ClusterDrsMigration"] = reflect.TypeOf((*ClusterDrsMigration)(nil)).Elem() } type ClusterDrsRecommendation struct { DynamicData Key string `xml:"key"` Rating int32 `xml:"rating"` Reason string `xml:"reason"` ReasonText string `xml:"reasonText"` MigrationList []ClusterDrsMigration `xml:"migrationList"` } func init() { t["ClusterDrsRecommendation"] = reflect.TypeOf((*ClusterDrsRecommendation)(nil)).Elem() } type ClusterDrsVmConfigInfo struct { DynamicData Key ManagedObjectReference `xml:"key"` Enabled *bool `xml:"enabled"` Behavior DrsBehavior `xml:"behavior,omitempty"` } func init() { t["ClusterDrsVmConfigInfo"] = reflect.TypeOf((*ClusterDrsVmConfigInfo)(nil)).Elem() } type ClusterDrsVmConfigSpec struct { ArrayUpdateSpec Info *ClusterDrsVmConfigInfo `xml:"info,omitempty"` } func init() { t["ClusterDrsVmConfigSpec"] = reflect.TypeOf((*ClusterDrsVmConfigSpec)(nil)).Elem() } type ClusterEVCManagerCheckResult struct { DynamicData EvcModeKey string `xml:"evcModeKey"` Error LocalizedMethodFault `xml:"error"` Host []ManagedObjectReference `xml:"host,omitempty"` } func init() { t["ClusterEVCManagerCheckResult"] = reflect.TypeOf((*ClusterEVCManagerCheckResult)(nil)).Elem() } type ClusterEVCManagerEVCState struct { DynamicData SupportedEVCMode []EVCMode `xml:"supportedEVCMode"` CurrentEVCModeKey string `xml:"currentEVCModeKey,omitempty"` GuaranteedCPUFeatures []HostCpuIdInfo `xml:"guaranteedCPUFeatures,omitempty"` FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` FeatureMask []HostFeatureMask `xml:"featureMask,omitempty"` FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` } func init() { t["ClusterEVCManagerEVCState"] = reflect.TypeOf((*ClusterEVCManagerEVCState)(nil)).Elem() } type ClusterEnterMaintenanceMode ClusterEnterMaintenanceModeRequestType func init() { t["ClusterEnterMaintenanceMode"] = reflect.TypeOf((*ClusterEnterMaintenanceMode)(nil)).Elem() } type ClusterEnterMaintenanceModeRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` } func init() { t["ClusterEnterMaintenanceModeRequestType"] = reflect.TypeOf((*ClusterEnterMaintenanceModeRequestType)(nil)).Elem() } type ClusterEnterMaintenanceModeResponse struct { Returnval ClusterEnterMaintenanceResult `xml:"returnval"` } type ClusterEnterMaintenanceResult struct { DynamicData Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` Fault *ClusterDrsFaults `xml:"fault,omitempty"` } func init() { t["ClusterEnterMaintenanceResult"] = reflect.TypeOf((*ClusterEnterMaintenanceResult)(nil)).Elem() } type ClusterEvent struct { Event } func init() { t["ClusterEvent"] = reflect.TypeOf((*ClusterEvent)(nil)).Elem() } type ClusterFailoverHostAdmissionControlInfo struct { ClusterDasAdmissionControlInfo HostStatus []ClusterFailoverHostAdmissionControlInfoHostStatus `xml:"hostStatus,omitempty"` } func init() { t["ClusterFailoverHostAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlInfo)(nil)).Elem() } type ClusterFailoverHostAdmissionControlInfoHostStatus struct { DynamicData Host ManagedObjectReference `xml:"host"` Status ManagedEntityStatus `xml:"status"` } func init() { t["ClusterFailoverHostAdmissionControlInfoHostStatus"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlInfoHostStatus)(nil)).Elem() } type ClusterFailoverHostAdmissionControlPolicy struct { ClusterDasAdmissionControlPolicy FailoverHosts []ManagedObjectReference `xml:"failoverHosts,omitempty"` FailoverLevel int32 `xml:"failoverLevel,omitempty"` } func init() { t["ClusterFailoverHostAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlPolicy)(nil)).Elem() } type ClusterFailoverLevelAdmissionControlInfo struct { ClusterDasAdmissionControlInfo CurrentFailoverLevel int32 `xml:"currentFailoverLevel"` } func init() { t["ClusterFailoverLevelAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverLevelAdmissionControlInfo)(nil)).Elem() } type ClusterFailoverLevelAdmissionControlPolicy struct { ClusterDasAdmissionControlPolicy FailoverLevel int32 `xml:"failoverLevel"` SlotPolicy BaseClusterSlotPolicy `xml:"slotPolicy,omitempty,typeattr"` } func init() { t["ClusterFailoverLevelAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverLevelAdmissionControlPolicy)(nil)).Elem() } type ClusterFailoverResourcesAdmissionControlInfo struct { ClusterDasAdmissionControlInfo CurrentCpuFailoverResourcesPercent int32 `xml:"currentCpuFailoverResourcesPercent"` CurrentMemoryFailoverResourcesPercent int32 `xml:"currentMemoryFailoverResourcesPercent"` } func init() { t["ClusterFailoverResourcesAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverResourcesAdmissionControlInfo)(nil)).Elem() } type ClusterFailoverResourcesAdmissionControlPolicy struct { ClusterDasAdmissionControlPolicy CpuFailoverResourcesPercent int32 `xml:"cpuFailoverResourcesPercent"` MemoryFailoverResourcesPercent int32 `xml:"memoryFailoverResourcesPercent"` FailoverLevel int32 `xml:"failoverLevel,omitempty"` AutoComputePercentages *bool `xml:"autoComputePercentages"` } func init() { t["ClusterFailoverResourcesAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverResourcesAdmissionControlPolicy)(nil)).Elem() } type ClusterFixedSizeSlotPolicy struct { ClusterSlotPolicy Cpu int32 `xml:"cpu"` Memory int32 `xml:"memory"` } func init() { t["ClusterFixedSizeSlotPolicy"] = reflect.TypeOf((*ClusterFixedSizeSlotPolicy)(nil)).Elem() } type ClusterGroupInfo struct { DynamicData Name string `xml:"name"` UserCreated *bool `xml:"userCreated"` UniqueID string `xml:"uniqueID,omitempty"` } func init() { t["ClusterGroupInfo"] = reflect.TypeOf((*ClusterGroupInfo)(nil)).Elem() } type ClusterGroupSpec struct { ArrayUpdateSpec Info BaseClusterGroupInfo `xml:"info,omitempty,typeattr"` } func init() { t["ClusterGroupSpec"] = reflect.TypeOf((*ClusterGroupSpec)(nil)).Elem() } type ClusterHostGroup struct { ClusterGroupInfo Host []ManagedObjectReference `xml:"host,omitempty"` } func init() { t["ClusterHostGroup"] = reflect.TypeOf((*ClusterHostGroup)(nil)).Elem() } type ClusterHostInfraUpdateHaModeAction struct { ClusterAction OperationType string `xml:"operationType"` } func init() { t["ClusterHostInfraUpdateHaModeAction"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeAction)(nil)).Elem() } type ClusterHostPowerAction struct { ClusterAction OperationType HostPowerOperationType `xml:"operationType"` PowerConsumptionWatt int32 `xml:"powerConsumptionWatt,omitempty"` CpuCapacityMHz int32 `xml:"cpuCapacityMHz,omitempty"` MemCapacityMB int32 `xml:"memCapacityMB,omitempty"` } func init() { t["ClusterHostPowerAction"] = reflect.TypeOf((*ClusterHostPowerAction)(nil)).Elem() } type ClusterHostRecommendation struct { DynamicData Host ManagedObjectReference `xml:"host"` Rating int32 `xml:"rating"` } func init() { t["ClusterHostRecommendation"] = reflect.TypeOf((*ClusterHostRecommendation)(nil)).Elem() } type ClusterInfraUpdateHaConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` Behavior string `xml:"behavior,omitempty"` ModerateRemediation string `xml:"moderateRemediation,omitempty"` SevereRemediation string `xml:"severeRemediation,omitempty"` Providers []string `xml:"providers,omitempty"` } func init() { t["ClusterInfraUpdateHaConfigInfo"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfo)(nil)).Elem() } type ClusterInitialPlacementAction struct { ClusterAction TargetHost ManagedObjectReference `xml:"targetHost"` Pool *ManagedObjectReference `xml:"pool,omitempty"` } func init() { t["ClusterInitialPlacementAction"] = reflect.TypeOf((*ClusterInitialPlacementAction)(nil)).Elem() } type ClusterIoFilterInfo struct { IoFilterInfo OpType string `xml:"opType"` VibUrl string `xml:"vibUrl,omitempty"` } func init() { t["ClusterIoFilterInfo"] = reflect.TypeOf((*ClusterIoFilterInfo)(nil)).Elem() } type ClusterMigrationAction struct { ClusterAction DrsMigration *ClusterDrsMigration `xml:"drsMigration,omitempty"` } func init() { t["ClusterMigrationAction"] = reflect.TypeOf((*ClusterMigrationAction)(nil)).Elem() } type ClusterNetworkConfigSpec struct { DynamicData NetworkPortGroup ManagedObjectReference `xml:"networkPortGroup"` IpSettings CustomizationIPSettings `xml:"ipSettings"` } func init() { t["ClusterNetworkConfigSpec"] = reflect.TypeOf((*ClusterNetworkConfigSpec)(nil)).Elem() } type ClusterNotAttemptedVmInfo struct { DynamicData Vm ManagedObjectReference `xml:"vm"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["ClusterNotAttemptedVmInfo"] = reflect.TypeOf((*ClusterNotAttemptedVmInfo)(nil)).Elem() } type ClusterOrchestrationInfo struct { DynamicData DefaultVmReadiness *ClusterVmReadiness `xml:"defaultVmReadiness,omitempty"` } func init() { t["ClusterOrchestrationInfo"] = reflect.TypeOf((*ClusterOrchestrationInfo)(nil)).Elem() } type ClusterOvercommittedEvent struct { ClusterEvent } func init() { t["ClusterOvercommittedEvent"] = reflect.TypeOf((*ClusterOvercommittedEvent)(nil)).Elem() } type ClusterPowerOnVmResult struct { DynamicData Attempted []ClusterAttemptedVmInfo `xml:"attempted,omitempty"` NotAttempted []ClusterNotAttemptedVmInfo `xml:"notAttempted,omitempty"` Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` } func init() { t["ClusterPowerOnVmResult"] = reflect.TypeOf((*ClusterPowerOnVmResult)(nil)).Elem() } type ClusterProactiveDrsConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` } func init() { t["ClusterProactiveDrsConfigInfo"] = reflect.TypeOf((*ClusterProactiveDrsConfigInfo)(nil)).Elem() } type ClusterProfileCompleteConfigSpec struct { ClusterProfileConfigSpec ComplyProfile *ComplianceProfile `xml:"complyProfile,omitempty"` } func init() { t["ClusterProfileCompleteConfigSpec"] = reflect.TypeOf((*ClusterProfileCompleteConfigSpec)(nil)).Elem() } type ClusterProfileConfigInfo struct { ProfileConfigInfo ComplyProfile *ComplianceProfile `xml:"complyProfile,omitempty"` } func init() { t["ClusterProfileConfigInfo"] = reflect.TypeOf((*ClusterProfileConfigInfo)(nil)).Elem() } type ClusterProfileConfigServiceCreateSpec struct { ClusterProfileConfigSpec ServiceType []string `xml:"serviceType,omitempty"` } func init() { t["ClusterProfileConfigServiceCreateSpec"] = reflect.TypeOf((*ClusterProfileConfigServiceCreateSpec)(nil)).Elem() } type ClusterProfileConfigSpec struct { ClusterProfileCreateSpec } func init() { t["ClusterProfileConfigSpec"] = reflect.TypeOf((*ClusterProfileConfigSpec)(nil)).Elem() } type ClusterProfileCreateSpec struct { ProfileCreateSpec } func init() { t["ClusterProfileCreateSpec"] = reflect.TypeOf((*ClusterProfileCreateSpec)(nil)).Elem() } type ClusterRecommendation struct { DynamicData Key string `xml:"key"` Type string `xml:"type"` Time time.Time `xml:"time"` Rating int32 `xml:"rating"` Reason string `xml:"reason"` ReasonText string `xml:"reasonText"` WarningText string `xml:"warningText,omitempty"` WarningDetails *LocalizableMessage `xml:"warningDetails,omitempty"` Prerequisite []string `xml:"prerequisite,omitempty"` Action []BaseClusterAction `xml:"action,omitempty,typeattr"` Target *ManagedObjectReference `xml:"target,omitempty"` } func init() { t["ClusterRecommendation"] = reflect.TypeOf((*ClusterRecommendation)(nil)).Elem() } type ClusterReconfiguredEvent struct { ClusterEvent ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["ClusterReconfiguredEvent"] = reflect.TypeOf((*ClusterReconfiguredEvent)(nil)).Elem() } type ClusterResourceUsageSummary struct { DynamicData CpuUsedMHz int32 `xml:"cpuUsedMHz"` CpuCapacityMHz int32 `xml:"cpuCapacityMHz"` MemUsedMB int32 `xml:"memUsedMB"` MemCapacityMB int32 `xml:"memCapacityMB"` StorageUsedMB int64 `xml:"storageUsedMB"` StorageCapacityMB int64 `xml:"storageCapacityMB"` } func init() { t["ClusterResourceUsageSummary"] = reflect.TypeOf((*ClusterResourceUsageSummary)(nil)).Elem() } type ClusterRuleInfo struct { DynamicData Key int32 `xml:"key,omitempty"` Status ManagedEntityStatus `xml:"status,omitempty"` Enabled *bool `xml:"enabled"` Name string `xml:"name,omitempty"` Mandatory *bool `xml:"mandatory"` UserCreated *bool `xml:"userCreated"` InCompliance *bool `xml:"inCompliance"` RuleUuid string `xml:"ruleUuid,omitempty"` } func init() { t["ClusterRuleInfo"] = reflect.TypeOf((*ClusterRuleInfo)(nil)).Elem() } type ClusterRuleSpec struct { ArrayUpdateSpec Info BaseClusterRuleInfo `xml:"info,omitempty,typeattr"` } func init() { t["ClusterRuleSpec"] = reflect.TypeOf((*ClusterRuleSpec)(nil)).Elem() } type ClusterSlotPolicy struct { DynamicData } func init() { t["ClusterSlotPolicy"] = reflect.TypeOf((*ClusterSlotPolicy)(nil)).Elem() } type ClusterStatusChangedEvent struct { ClusterEvent OldStatus string `xml:"oldStatus"` NewStatus string `xml:"newStatus"` } func init() { t["ClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem() } type ClusterUsageSummary struct { DynamicData TotalCpuCapacityMhz int32 `xml:"totalCpuCapacityMhz"` TotalMemCapacityMB int32 `xml:"totalMemCapacityMB"` CpuReservationMhz int32 `xml:"cpuReservationMhz"` MemReservationMB int32 `xml:"memReservationMB"` PoweredOffCpuReservationMhz int32 `xml:"poweredOffCpuReservationMhz,omitempty"` PoweredOffMemReservationMB int32 `xml:"poweredOffMemReservationMB,omitempty"` CpuDemandMhz int32 `xml:"cpuDemandMhz"` MemDemandMB int32 `xml:"memDemandMB"` StatsGenNumber int64 `xml:"statsGenNumber"` CpuEntitledMhz int32 `xml:"cpuEntitledMhz"` MemEntitledMB int32 `xml:"memEntitledMB"` PoweredOffVmCount int32 `xml:"poweredOffVmCount"` TotalVmCount int32 `xml:"totalVmCount"` } func init() { t["ClusterUsageSummary"] = reflect.TypeOf((*ClusterUsageSummary)(nil)).Elem() } type ClusterVmComponentProtectionSettings struct { DynamicData VmStorageProtectionForAPD string `xml:"vmStorageProtectionForAPD,omitempty"` EnableAPDTimeoutForHosts *bool `xml:"enableAPDTimeoutForHosts"` VmTerminateDelayForAPDSec int32 `xml:"vmTerminateDelayForAPDSec,omitempty"` VmReactionOnAPDCleared string `xml:"vmReactionOnAPDCleared,omitempty"` VmStorageProtectionForPDL string `xml:"vmStorageProtectionForPDL,omitempty"` } func init() { t["ClusterVmComponentProtectionSettings"] = reflect.TypeOf((*ClusterVmComponentProtectionSettings)(nil)).Elem() } type ClusterVmGroup struct { ClusterGroupInfo Vm []ManagedObjectReference `xml:"vm,omitempty"` } func init() { t["ClusterVmGroup"] = reflect.TypeOf((*ClusterVmGroup)(nil)).Elem() } type ClusterVmHostRuleInfo struct { ClusterRuleInfo VmGroupName string `xml:"vmGroupName,omitempty"` AffineHostGroupName string `xml:"affineHostGroupName,omitempty"` AntiAffineHostGroupName string `xml:"antiAffineHostGroupName,omitempty"` } func init() { t["ClusterVmHostRuleInfo"] = reflect.TypeOf((*ClusterVmHostRuleInfo)(nil)).Elem() } type ClusterVmOrchestrationInfo struct { DynamicData Vm ManagedObjectReference `xml:"vm"` VmReadiness ClusterVmReadiness `xml:"vmReadiness"` } func init() { t["ClusterVmOrchestrationInfo"] = reflect.TypeOf((*ClusterVmOrchestrationInfo)(nil)).Elem() } type ClusterVmOrchestrationSpec struct { ArrayUpdateSpec Info *ClusterVmOrchestrationInfo `xml:"info,omitempty"` } func init() { t["ClusterVmOrchestrationSpec"] = reflect.TypeOf((*ClusterVmOrchestrationSpec)(nil)).Elem() } type ClusterVmReadiness struct { DynamicData ReadyCondition string `xml:"readyCondition,omitempty"` PostReadyDelay int32 `xml:"postReadyDelay,omitempty"` } func init() { t["ClusterVmReadiness"] = reflect.TypeOf((*ClusterVmReadiness)(nil)).Elem() } type ClusterVmToolsMonitoringSettings struct { DynamicData Enabled *bool `xml:"enabled"` VmMonitoring string `xml:"vmMonitoring,omitempty"` ClusterSettings *bool `xml:"clusterSettings"` FailureInterval int32 `xml:"failureInterval,omitempty"` MinUpTime int32 `xml:"minUpTime,omitempty"` MaxFailures int32 `xml:"maxFailures,omitempty"` MaxFailureWindow int32 `xml:"maxFailureWindow,omitempty"` } func init() { t["ClusterVmToolsMonitoringSettings"] = reflect.TypeOf((*ClusterVmToolsMonitoringSettings)(nil)).Elem() } type CollectorAddressUnset struct { DvsFault } func init() { t["CollectorAddressUnset"] = reflect.TypeOf((*CollectorAddressUnset)(nil)).Elem() } type CollectorAddressUnsetFault CollectorAddressUnset func init() { t["CollectorAddressUnsetFault"] = reflect.TypeOf((*CollectorAddressUnsetFault)(nil)).Elem() } type ComplianceFailure struct { DynamicData FailureType string `xml:"failureType"` Message LocalizableMessage `xml:"message"` ExpressionName string `xml:"expressionName,omitempty"` FailureValues []ComplianceFailureComplianceFailureValues `xml:"failureValues,omitempty"` } func init() { t["ComplianceFailure"] = reflect.TypeOf((*ComplianceFailure)(nil)).Elem() } type ComplianceFailureComplianceFailureValues struct { DynamicData ComparisonIdentifier string `xml:"comparisonIdentifier"` ProfileInstance string `xml:"profileInstance,omitempty"` HostValue AnyType `xml:"hostValue,omitempty,typeattr"` ProfileValue AnyType `xml:"profileValue,omitempty,typeattr"` } func init() { t["ComplianceFailureComplianceFailureValues"] = reflect.TypeOf((*ComplianceFailureComplianceFailureValues)(nil)).Elem() } type ComplianceLocator struct { DynamicData ExpressionName string `xml:"expressionName"` ApplyPath ProfilePropertyPath `xml:"applyPath"` } func init() { t["ComplianceLocator"] = reflect.TypeOf((*ComplianceLocator)(nil)).Elem() } type ComplianceProfile struct { DynamicData Expression []BaseProfileExpression `xml:"expression,typeattr"` RootExpression string `xml:"rootExpression"` } func init() { t["ComplianceProfile"] = reflect.TypeOf((*ComplianceProfile)(nil)).Elem() } type ComplianceResult struct { DynamicData Profile *ManagedObjectReference `xml:"profile,omitempty"` ComplianceStatus string `xml:"complianceStatus"` Entity *ManagedObjectReference `xml:"entity,omitempty"` CheckTime *time.Time `xml:"checkTime"` Failure []ComplianceFailure `xml:"failure,omitempty"` } func init() { t["ComplianceResult"] = reflect.TypeOf((*ComplianceResult)(nil)).Elem() } type CompositePolicyOption struct { PolicyOption Option []BasePolicyOption `xml:"option,omitempty,typeattr"` } func init() { t["CompositePolicyOption"] = reflect.TypeOf((*CompositePolicyOption)(nil)).Elem() } type ComputeDiskPartitionInfo ComputeDiskPartitionInfoRequestType func init() { t["ComputeDiskPartitionInfo"] = reflect.TypeOf((*ComputeDiskPartitionInfo)(nil)).Elem() } type ComputeDiskPartitionInfoForResize ComputeDiskPartitionInfoForResizeRequestType func init() { t["ComputeDiskPartitionInfoForResize"] = reflect.TypeOf((*ComputeDiskPartitionInfoForResize)(nil)).Elem() } type ComputeDiskPartitionInfoForResizeRequestType struct { This ManagedObjectReference `xml:"_this"` Partition HostScsiDiskPartition `xml:"partition"` BlockRange HostDiskPartitionBlockRange `xml:"blockRange"` PartitionFormat string `xml:"partitionFormat,omitempty"` } func init() { t["ComputeDiskPartitionInfoForResizeRequestType"] = reflect.TypeOf((*ComputeDiskPartitionInfoForResizeRequestType)(nil)).Elem() } type ComputeDiskPartitionInfoForResizeResponse struct { Returnval HostDiskPartitionInfo `xml:"returnval"` } type ComputeDiskPartitionInfoRequestType struct { This ManagedObjectReference `xml:"_this"` DevicePath string `xml:"devicePath"` Layout HostDiskPartitionLayout `xml:"layout"` PartitionFormat string `xml:"partitionFormat,omitempty"` } func init() { t["ComputeDiskPartitionInfoRequestType"] = reflect.TypeOf((*ComputeDiskPartitionInfoRequestType)(nil)).Elem() } type ComputeDiskPartitionInfoResponse struct { Returnval HostDiskPartitionInfo `xml:"returnval"` } type ComputeResourceConfigInfo struct { DynamicData VmSwapPlacement string `xml:"vmSwapPlacement"` SpbmEnabled *bool `xml:"spbmEnabled"` DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` } func init() { t["ComputeResourceConfigInfo"] = reflect.TypeOf((*ComputeResourceConfigInfo)(nil)).Elem() } type ComputeResourceConfigSpec struct { DynamicData VmSwapPlacement string `xml:"vmSwapPlacement,omitempty"` SpbmEnabled *bool `xml:"spbmEnabled"` DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` } func init() { t["ComputeResourceConfigSpec"] = reflect.TypeOf((*ComputeResourceConfigSpec)(nil)).Elem() } type ComputeResourceEventArgument struct { EntityEventArgument ComputeResource ManagedObjectReference `xml:"computeResource"` } func init() { t["ComputeResourceEventArgument"] = reflect.TypeOf((*ComputeResourceEventArgument)(nil)).Elem() } type ComputeResourceHostSPBMLicenseInfo struct { DynamicData Host ManagedObjectReference `xml:"host"` LicenseState ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState `xml:"licenseState"` } func init() { t["ComputeResourceHostSPBMLicenseInfo"] = reflect.TypeOf((*ComputeResourceHostSPBMLicenseInfo)(nil)).Elem() } type ComputeResourceSummary struct { DynamicData TotalCpu int32 `xml:"totalCpu"` TotalMemory int64 `xml:"totalMemory"` NumCpuCores int16 `xml:"numCpuCores"` NumCpuThreads int16 `xml:"numCpuThreads"` EffectiveCpu int32 `xml:"effectiveCpu"` EffectiveMemory int64 `xml:"effectiveMemory"` NumHosts int32 `xml:"numHosts"` NumEffectiveHosts int32 `xml:"numEffectiveHosts"` OverallStatus ManagedEntityStatus `xml:"overallStatus"` } func init() { t["ComputeResourceSummary"] = reflect.TypeOf((*ComputeResourceSummary)(nil)).Elem() } type ConcurrentAccess struct { VimFault } func init() { t["ConcurrentAccess"] = reflect.TypeOf((*ConcurrentAccess)(nil)).Elem() } type ConcurrentAccessFault ConcurrentAccess func init() { t["ConcurrentAccessFault"] = reflect.TypeOf((*ConcurrentAccessFault)(nil)).Elem() } type ConfigTarget struct { DynamicData NumCpus int32 `xml:"numCpus"` NumCpuCores int32 `xml:"numCpuCores"` NumNumaNodes int32 `xml:"numNumaNodes"` SmcPresent *bool `xml:"smcPresent"` Datastore []VirtualMachineDatastoreInfo `xml:"datastore,omitempty"` Network []VirtualMachineNetworkInfo `xml:"network,omitempty"` OpaqueNetwork []OpaqueNetworkTargetInfo `xml:"opaqueNetwork,omitempty"` DistributedVirtualPortgroup []DistributedVirtualPortgroupInfo `xml:"distributedVirtualPortgroup,omitempty"` DistributedVirtualSwitch []DistributedVirtualSwitchInfo `xml:"distributedVirtualSwitch,omitempty"` CdRom []VirtualMachineCdromInfo `xml:"cdRom,omitempty"` Serial []VirtualMachineSerialInfo `xml:"serial,omitempty"` Parallel []VirtualMachineParallelInfo `xml:"parallel,omitempty"` Sound []VirtualMachineSoundInfo `xml:"sound,omitempty"` Usb []VirtualMachineUsbInfo `xml:"usb,omitempty"` Floppy []VirtualMachineFloppyInfo `xml:"floppy,omitempty"` LegacyNetworkInfo []VirtualMachineLegacyNetworkSwitchInfo `xml:"legacyNetworkInfo,omitempty"` ScsiPassthrough []VirtualMachineScsiPassthroughInfo `xml:"scsiPassthrough,omitempty"` ScsiDisk []VirtualMachineScsiDiskDeviceInfo `xml:"scsiDisk,omitempty"` IdeDisk []VirtualMachineIdeDiskDeviceInfo `xml:"ideDisk,omitempty"` MaxMemMBOptimalPerf int32 `xml:"maxMemMBOptimalPerf"` ResourcePool *ResourcePoolRuntimeInfo `xml:"resourcePool,omitempty"` AutoVmotion *bool `xml:"autoVmotion"` PciPassthrough []BaseVirtualMachinePciPassthroughInfo `xml:"pciPassthrough,omitempty,typeattr"` Sriov []VirtualMachineSriovInfo `xml:"sriov,omitempty"` VFlashModule []VirtualMachineVFlashModuleInfo `xml:"vFlashModule,omitempty"` SharedGpuPassthroughTypes []VirtualMachinePciSharedGpuPassthroughInfo `xml:"sharedGpuPassthroughTypes,omitempty"` } func init() { t["ConfigTarget"] = reflect.TypeOf((*ConfigTarget)(nil)).Elem() } type ConfigureCryptoKey ConfigureCryptoKeyRequestType func init() { t["ConfigureCryptoKey"] = reflect.TypeOf((*ConfigureCryptoKey)(nil)).Elem() } type ConfigureCryptoKeyRequestType struct { This ManagedObjectReference `xml:"_this"` KeyId *CryptoKeyId `xml:"keyId,omitempty"` } func init() { t["ConfigureCryptoKeyRequestType"] = reflect.TypeOf((*ConfigureCryptoKeyRequestType)(nil)).Elem() } type ConfigureCryptoKeyResponse struct { } type ConfigureDatastoreIORMRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` Spec StorageIORMConfigSpec `xml:"spec"` } func init() { t["ConfigureDatastoreIORMRequestType"] = reflect.TypeOf((*ConfigureDatastoreIORMRequestType)(nil)).Elem() } type ConfigureDatastoreIORM_Task ConfigureDatastoreIORMRequestType func init() { t["ConfigureDatastoreIORM_Task"] = reflect.TypeOf((*ConfigureDatastoreIORM_Task)(nil)).Elem() } type ConfigureDatastoreIORM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ConfigureDatastorePrincipal ConfigureDatastorePrincipalRequestType func init() { t["ConfigureDatastorePrincipal"] = reflect.TypeOf((*ConfigureDatastorePrincipal)(nil)).Elem() } type ConfigureDatastorePrincipalRequestType struct { This ManagedObjectReference `xml:"_this"` UserName string `xml:"userName"` Password string `xml:"password,omitempty"` } func init() { t["ConfigureDatastorePrincipalRequestType"] = reflect.TypeOf((*ConfigureDatastorePrincipalRequestType)(nil)).Elem() } type ConfigureDatastorePrincipalResponse struct { } type ConfigureEvcModeRequestType struct { This ManagedObjectReference `xml:"_this"` EvcModeKey string `xml:"evcModeKey"` } func init() { t["ConfigureEvcModeRequestType"] = reflect.TypeOf((*ConfigureEvcModeRequestType)(nil)).Elem() } type ConfigureEvcMode_Task ConfigureEvcModeRequestType func init() { t["ConfigureEvcMode_Task"] = reflect.TypeOf((*ConfigureEvcMode_Task)(nil)).Elem() } type ConfigureEvcMode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ConfigureHostCacheRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostCacheConfigurationSpec `xml:"spec"` } func init() { t["ConfigureHostCacheRequestType"] = reflect.TypeOf((*ConfigureHostCacheRequestType)(nil)).Elem() } type ConfigureHostCache_Task ConfigureHostCacheRequestType func init() { t["ConfigureHostCache_Task"] = reflect.TypeOf((*ConfigureHostCache_Task)(nil)).Elem() } type ConfigureHostCache_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ConfigureLicenseSource ConfigureLicenseSourceRequestType func init() { t["ConfigureLicenseSource"] = reflect.TypeOf((*ConfigureLicenseSource)(nil)).Elem() } type ConfigureLicenseSourceRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` LicenseSource BaseLicenseSource `xml:"licenseSource,typeattr"` } func init() { t["ConfigureLicenseSourceRequestType"] = reflect.TypeOf((*ConfigureLicenseSourceRequestType)(nil)).Elem() } type ConfigureLicenseSourceResponse struct { } type ConfigurePowerPolicy ConfigurePowerPolicyRequestType func init() { t["ConfigurePowerPolicy"] = reflect.TypeOf((*ConfigurePowerPolicy)(nil)).Elem() } type ConfigurePowerPolicyRequestType struct { This ManagedObjectReference `xml:"_this"` Key int32 `xml:"key"` } func init() { t["ConfigurePowerPolicyRequestType"] = reflect.TypeOf((*ConfigurePowerPolicyRequestType)(nil)).Elem() } type ConfigurePowerPolicyResponse struct { } type ConfigureStorageDrsForPodRequestType struct { This ManagedObjectReference `xml:"_this"` Pod ManagedObjectReference `xml:"pod"` Spec StorageDrsConfigSpec `xml:"spec"` Modify bool `xml:"modify"` } func init() { t["ConfigureStorageDrsForPodRequestType"] = reflect.TypeOf((*ConfigureStorageDrsForPodRequestType)(nil)).Elem() } type ConfigureStorageDrsForPod_Task ConfigureStorageDrsForPodRequestType func init() { t["ConfigureStorageDrsForPod_Task"] = reflect.TypeOf((*ConfigureStorageDrsForPod_Task)(nil)).Elem() } type ConfigureStorageDrsForPod_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ConfigureVFlashResourceExRequestType struct { This ManagedObjectReference `xml:"_this"` DevicePath []string `xml:"devicePath,omitempty"` } func init() { t["ConfigureVFlashResourceExRequestType"] = reflect.TypeOf((*ConfigureVFlashResourceExRequestType)(nil)).Elem() } type ConfigureVFlashResourceEx_Task ConfigureVFlashResourceExRequestType func init() { t["ConfigureVFlashResourceEx_Task"] = reflect.TypeOf((*ConfigureVFlashResourceEx_Task)(nil)).Elem() } type ConfigureVFlashResourceEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ConflictingConfiguration struct { DvsFault ConfigInConflict []ConflictingConfigurationConfig `xml:"configInConflict"` } func init() { t["ConflictingConfiguration"] = reflect.TypeOf((*ConflictingConfiguration)(nil)).Elem() } type ConflictingConfigurationConfig struct { DynamicData Entity *ManagedObjectReference `xml:"entity,omitempty"` PropertyPath string `xml:"propertyPath"` } func init() { t["ConflictingConfigurationConfig"] = reflect.TypeOf((*ConflictingConfigurationConfig)(nil)).Elem() } type ConflictingConfigurationFault ConflictingConfiguration func init() { t["ConflictingConfigurationFault"] = reflect.TypeOf((*ConflictingConfigurationFault)(nil)).Elem() } type ConflictingDatastoreFound struct { RuntimeFault Name string `xml:"name"` Url string `xml:"url"` } func init() { t["ConflictingDatastoreFound"] = reflect.TypeOf((*ConflictingDatastoreFound)(nil)).Elem() } type ConflictingDatastoreFoundFault ConflictingDatastoreFound func init() { t["ConflictingDatastoreFoundFault"] = reflect.TypeOf((*ConflictingDatastoreFoundFault)(nil)).Elem() } type ConnectedIso struct { OvfExport Cdrom VirtualCdrom `xml:"cdrom"` Filename string `xml:"filename"` } func init() { t["ConnectedIso"] = reflect.TypeOf((*ConnectedIso)(nil)).Elem() } type ConnectedIsoFault ConnectedIso func init() { t["ConnectedIsoFault"] = reflect.TypeOf((*ConnectedIsoFault)(nil)).Elem() } type ConsolidateVMDisksRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ConsolidateVMDisksRequestType"] = reflect.TypeOf((*ConsolidateVMDisksRequestType)(nil)).Elem() } type ConsolidateVMDisks_Task ConsolidateVMDisksRequestType func init() { t["ConsolidateVMDisks_Task"] = reflect.TypeOf((*ConsolidateVMDisks_Task)(nil)).Elem() } type ConsolidateVMDisks_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ContinueRetrievePropertiesEx ContinueRetrievePropertiesExRequestType func init() { t["ContinueRetrievePropertiesEx"] = reflect.TypeOf((*ContinueRetrievePropertiesEx)(nil)).Elem() } type ContinueRetrievePropertiesExRequestType struct { This ManagedObjectReference `xml:"_this"` Token string `xml:"token"` } func init() { t["ContinueRetrievePropertiesExRequestType"] = reflect.TypeOf((*ContinueRetrievePropertiesExRequestType)(nil)).Elem() } type ContinueRetrievePropertiesExResponse struct { Returnval RetrieveResult `xml:"returnval"` } type ConvertNamespacePathToUuidPath ConvertNamespacePathToUuidPathRequestType func init() { t["ConvertNamespacePathToUuidPath"] = reflect.TypeOf((*ConvertNamespacePathToUuidPath)(nil)).Elem() } type ConvertNamespacePathToUuidPathRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` NamespaceUrl string `xml:"namespaceUrl"` } func init() { t["ConvertNamespacePathToUuidPathRequestType"] = reflect.TypeOf((*ConvertNamespacePathToUuidPathRequestType)(nil)).Elem() } type ConvertNamespacePathToUuidPathResponse struct { Returnval string `xml:"returnval"` } type CopyDatastoreFileRequestType struct { This ManagedObjectReference `xml:"_this"` SourceName string `xml:"sourceName"` SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` DestinationName string `xml:"destinationName"` DestinationDatacenter *ManagedObjectReference `xml:"destinationDatacenter,omitempty"` Force *bool `xml:"force"` } func init() { t["CopyDatastoreFileRequestType"] = reflect.TypeOf((*CopyDatastoreFileRequestType)(nil)).Elem() } type CopyDatastoreFile_Task CopyDatastoreFileRequestType func init() { t["CopyDatastoreFile_Task"] = reflect.TypeOf((*CopyDatastoreFile_Task)(nil)).Elem() } type CopyDatastoreFile_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CopyVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` SourceName string `xml:"sourceName"` SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` DestName string `xml:"destName"` DestDatacenter *ManagedObjectReference `xml:"destDatacenter,omitempty"` DestSpec BaseVirtualDiskSpec `xml:"destSpec,omitempty,typeattr"` Force *bool `xml:"force"` } func init() { t["CopyVirtualDiskRequestType"] = reflect.TypeOf((*CopyVirtualDiskRequestType)(nil)).Elem() } type CopyVirtualDisk_Task CopyVirtualDiskRequestType func init() { t["CopyVirtualDisk_Task"] = reflect.TypeOf((*CopyVirtualDisk_Task)(nil)).Elem() } type CopyVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CpuCompatibilityUnknown struct { CpuIncompatible } func init() { t["CpuCompatibilityUnknown"] = reflect.TypeOf((*CpuCompatibilityUnknown)(nil)).Elem() } type CpuCompatibilityUnknownFault CpuCompatibilityUnknown func init() { t["CpuCompatibilityUnknownFault"] = reflect.TypeOf((*CpuCompatibilityUnknownFault)(nil)).Elem() } type CpuHotPlugNotSupported struct { VmConfigFault } func init() { t["CpuHotPlugNotSupported"] = reflect.TypeOf((*CpuHotPlugNotSupported)(nil)).Elem() } type CpuHotPlugNotSupportedFault CpuHotPlugNotSupported func init() { t["CpuHotPlugNotSupportedFault"] = reflect.TypeOf((*CpuHotPlugNotSupportedFault)(nil)).Elem() } type CpuIncompatible struct { VirtualHardwareCompatibilityIssue Level int32 `xml:"level"` RegisterName string `xml:"registerName"` RegisterBits string `xml:"registerBits,omitempty"` DesiredBits string `xml:"desiredBits,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["CpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem() } type CpuIncompatible1ECX struct { CpuIncompatible Sse3 bool `xml:"sse3"` Pclmulqdq *bool `xml:"pclmulqdq"` Ssse3 bool `xml:"ssse3"` Sse41 bool `xml:"sse41"` Sse42 bool `xml:"sse42"` Aes *bool `xml:"aes"` Other bool `xml:"other"` OtherOnly bool `xml:"otherOnly"` } func init() { t["CpuIncompatible1ECX"] = reflect.TypeOf((*CpuIncompatible1ECX)(nil)).Elem() } type CpuIncompatible1ECXFault CpuIncompatible1ECX func init() { t["CpuIncompatible1ECXFault"] = reflect.TypeOf((*CpuIncompatible1ECXFault)(nil)).Elem() } type CpuIncompatible81EDX struct { CpuIncompatible Nx bool `xml:"nx"` Ffxsr bool `xml:"ffxsr"` Rdtscp bool `xml:"rdtscp"` Lm bool `xml:"lm"` Other bool `xml:"other"` OtherOnly bool `xml:"otherOnly"` } func init() { t["CpuIncompatible81EDX"] = reflect.TypeOf((*CpuIncompatible81EDX)(nil)).Elem() } type CpuIncompatible81EDXFault CpuIncompatible81EDX func init() { t["CpuIncompatible81EDXFault"] = reflect.TypeOf((*CpuIncompatible81EDXFault)(nil)).Elem() } type CpuIncompatibleFault BaseCpuIncompatible func init() { t["CpuIncompatibleFault"] = reflect.TypeOf((*CpuIncompatibleFault)(nil)).Elem() } type CreateAlarm CreateAlarmRequestType func init() { t["CreateAlarm"] = reflect.TypeOf((*CreateAlarm)(nil)).Elem() } type CreateAlarmRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Spec BaseAlarmSpec `xml:"spec,typeattr"` } func init() { t["CreateAlarmRequestType"] = reflect.TypeOf((*CreateAlarmRequestType)(nil)).Elem() } type CreateAlarmResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateChildVMRequestType struct { This ManagedObjectReference `xml:"_this"` Config VirtualMachineConfigSpec `xml:"config"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["CreateChildVMRequestType"] = reflect.TypeOf((*CreateChildVMRequestType)(nil)).Elem() } type CreateChildVM_Task CreateChildVMRequestType func init() { t["CreateChildVM_Task"] = reflect.TypeOf((*CreateChildVM_Task)(nil)).Elem() } type CreateChildVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateCluster CreateClusterRequestType func init() { t["CreateCluster"] = reflect.TypeOf((*CreateCluster)(nil)).Elem() } type CreateClusterEx CreateClusterExRequestType func init() { t["CreateClusterEx"] = reflect.TypeOf((*CreateClusterEx)(nil)).Elem() } type CreateClusterExRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Spec ClusterConfigSpecEx `xml:"spec"` } func init() { t["CreateClusterExRequestType"] = reflect.TypeOf((*CreateClusterExRequestType)(nil)).Elem() } type CreateClusterExResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateClusterRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Spec ClusterConfigSpec `xml:"spec"` } func init() { t["CreateClusterRequestType"] = reflect.TypeOf((*CreateClusterRequestType)(nil)).Elem() } type CreateClusterResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateCollectorForEvents CreateCollectorForEventsRequestType func init() { t["CreateCollectorForEvents"] = reflect.TypeOf((*CreateCollectorForEvents)(nil)).Elem() } type CreateCollectorForEventsRequestType struct { This ManagedObjectReference `xml:"_this"` Filter EventFilterSpec `xml:"filter"` } func init() { t["CreateCollectorForEventsRequestType"] = reflect.TypeOf((*CreateCollectorForEventsRequestType)(nil)).Elem() } type CreateCollectorForEventsResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateCollectorForTasks CreateCollectorForTasksRequestType func init() { t["CreateCollectorForTasks"] = reflect.TypeOf((*CreateCollectorForTasks)(nil)).Elem() } type CreateCollectorForTasksRequestType struct { This ManagedObjectReference `xml:"_this"` Filter TaskFilterSpec `xml:"filter"` } func init() { t["CreateCollectorForTasksRequestType"] = reflect.TypeOf((*CreateCollectorForTasksRequestType)(nil)).Elem() } type CreateCollectorForTasksResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateContainerView CreateContainerViewRequestType func init() { t["CreateContainerView"] = reflect.TypeOf((*CreateContainerView)(nil)).Elem() } type CreateContainerViewRequestType struct { This ManagedObjectReference `xml:"_this"` Container ManagedObjectReference `xml:"container"` Type []string `xml:"type,omitempty"` Recursive bool `xml:"recursive"` } func init() { t["CreateContainerViewRequestType"] = reflect.TypeOf((*CreateContainerViewRequestType)(nil)).Elem() } type CreateContainerViewResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateCustomizationSpec CreateCustomizationSpecRequestType func init() { t["CreateCustomizationSpec"] = reflect.TypeOf((*CreateCustomizationSpec)(nil)).Elem() } type CreateCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Item CustomizationSpecItem `xml:"item"` } func init() { t["CreateCustomizationSpecRequestType"] = reflect.TypeOf((*CreateCustomizationSpecRequestType)(nil)).Elem() } type CreateCustomizationSpecResponse struct { } type CreateDVPortgroupRequestType struct { This ManagedObjectReference `xml:"_this"` Spec DVPortgroupConfigSpec `xml:"spec"` } func init() { t["CreateDVPortgroupRequestType"] = reflect.TypeOf((*CreateDVPortgroupRequestType)(nil)).Elem() } type CreateDVPortgroup_Task CreateDVPortgroupRequestType func init() { t["CreateDVPortgroup_Task"] = reflect.TypeOf((*CreateDVPortgroup_Task)(nil)).Elem() } type CreateDVPortgroup_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateDVSRequestType struct { This ManagedObjectReference `xml:"_this"` Spec DVSCreateSpec `xml:"spec"` } func init() { t["CreateDVSRequestType"] = reflect.TypeOf((*CreateDVSRequestType)(nil)).Elem() } type CreateDVS_Task CreateDVSRequestType func init() { t["CreateDVS_Task"] = reflect.TypeOf((*CreateDVS_Task)(nil)).Elem() } type CreateDVS_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateDatacenter CreateDatacenterRequestType func init() { t["CreateDatacenter"] = reflect.TypeOf((*CreateDatacenter)(nil)).Elem() } type CreateDatacenterRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["CreateDatacenterRequestType"] = reflect.TypeOf((*CreateDatacenterRequestType)(nil)).Elem() } type CreateDatacenterResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateDefaultProfile CreateDefaultProfileRequestType func init() { t["CreateDefaultProfile"] = reflect.TypeOf((*CreateDefaultProfile)(nil)).Elem() } type CreateDefaultProfileRequestType struct { This ManagedObjectReference `xml:"_this"` ProfileType string `xml:"profileType"` ProfileTypeName string `xml:"profileTypeName,omitempty"` Profile *ManagedObjectReference `xml:"profile,omitempty"` } func init() { t["CreateDefaultProfileRequestType"] = reflect.TypeOf((*CreateDefaultProfileRequestType)(nil)).Elem() } type CreateDefaultProfileResponse struct { Returnval BaseApplyProfile `xml:"returnval,typeattr"` } type CreateDescriptor CreateDescriptorRequestType func init() { t["CreateDescriptor"] = reflect.TypeOf((*CreateDescriptor)(nil)).Elem() } type CreateDescriptorRequestType struct { This ManagedObjectReference `xml:"_this"` Obj ManagedObjectReference `xml:"obj"` Cdp OvfCreateDescriptorParams `xml:"cdp"` } func init() { t["CreateDescriptorRequestType"] = reflect.TypeOf((*CreateDescriptorRequestType)(nil)).Elem() } type CreateDescriptorResponse struct { Returnval OvfCreateDescriptorResult `xml:"returnval"` } type CreateDiagnosticPartition CreateDiagnosticPartitionRequestType func init() { t["CreateDiagnosticPartition"] = reflect.TypeOf((*CreateDiagnosticPartition)(nil)).Elem() } type CreateDiagnosticPartitionRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostDiagnosticPartitionCreateSpec `xml:"spec"` } func init() { t["CreateDiagnosticPartitionRequestType"] = reflect.TypeOf((*CreateDiagnosticPartitionRequestType)(nil)).Elem() } type CreateDiagnosticPartitionResponse struct { } type CreateDirectory CreateDirectoryRequestType func init() { t["CreateDirectory"] = reflect.TypeOf((*CreateDirectory)(nil)).Elem() } type CreateDirectoryRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` DisplayName string `xml:"displayName,omitempty"` Policy string `xml:"policy,omitempty"` } func init() { t["CreateDirectoryRequestType"] = reflect.TypeOf((*CreateDirectoryRequestType)(nil)).Elem() } type CreateDirectoryResponse struct { Returnval string `xml:"returnval"` } type CreateDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VslmCreateSpec `xml:"spec"` } func init() { t["CreateDiskRequestType"] = reflect.TypeOf((*CreateDiskRequestType)(nil)).Elem() } type CreateDisk_Task CreateDiskRequestType func init() { t["CreateDisk_Task"] = reflect.TypeOf((*CreateDisk_Task)(nil)).Elem() } type CreateDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateFilter CreateFilterRequestType func init() { t["CreateFilter"] = reflect.TypeOf((*CreateFilter)(nil)).Elem() } type CreateFilterRequestType struct { This ManagedObjectReference `xml:"_this"` Spec PropertyFilterSpec `xml:"spec"` PartialUpdates bool `xml:"partialUpdates"` } func init() { t["CreateFilterRequestType"] = reflect.TypeOf((*CreateFilterRequestType)(nil)).Elem() } type CreateFilterResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateFolder CreateFolderRequestType func init() { t["CreateFolder"] = reflect.TypeOf((*CreateFolder)(nil)).Elem() } type CreateFolderRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["CreateFolderRequestType"] = reflect.TypeOf((*CreateFolderRequestType)(nil)).Elem() } type CreateFolderResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateGroup CreateGroupRequestType func init() { t["CreateGroup"] = reflect.TypeOf((*CreateGroup)(nil)).Elem() } type CreateGroupRequestType struct { This ManagedObjectReference `xml:"_this"` Group BaseHostAccountSpec `xml:"group,typeattr"` } func init() { t["CreateGroupRequestType"] = reflect.TypeOf((*CreateGroupRequestType)(nil)).Elem() } type CreateGroupResponse struct { } type CreateImportSpec CreateImportSpecRequestType func init() { t["CreateImportSpec"] = reflect.TypeOf((*CreateImportSpec)(nil)).Elem() } type CreateImportSpecRequestType struct { This ManagedObjectReference `xml:"_this"` OvfDescriptor string `xml:"ovfDescriptor"` ResourcePool ManagedObjectReference `xml:"resourcePool"` Datastore ManagedObjectReference `xml:"datastore"` Cisp OvfCreateImportSpecParams `xml:"cisp"` } func init() { t["CreateImportSpecRequestType"] = reflect.TypeOf((*CreateImportSpecRequestType)(nil)).Elem() } type CreateImportSpecResponse struct { Returnval OvfCreateImportSpecResult `xml:"returnval"` } type CreateInventoryView CreateInventoryViewRequestType func init() { t["CreateInventoryView"] = reflect.TypeOf((*CreateInventoryView)(nil)).Elem() } type CreateInventoryViewRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["CreateInventoryViewRequestType"] = reflect.TypeOf((*CreateInventoryViewRequestType)(nil)).Elem() } type CreateInventoryViewResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateIpPool CreateIpPoolRequestType func init() { t["CreateIpPool"] = reflect.TypeOf((*CreateIpPool)(nil)).Elem() } type CreateIpPoolRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` Pool IpPool `xml:"pool"` } func init() { t["CreateIpPoolRequestType"] = reflect.TypeOf((*CreateIpPoolRequestType)(nil)).Elem() } type CreateIpPoolResponse struct { Returnval int32 `xml:"returnval"` } type CreateListView CreateListViewRequestType func init() { t["CreateListView"] = reflect.TypeOf((*CreateListView)(nil)).Elem() } type CreateListViewFromView CreateListViewFromViewRequestType func init() { t["CreateListViewFromView"] = reflect.TypeOf((*CreateListViewFromView)(nil)).Elem() } type CreateListViewFromViewRequestType struct { This ManagedObjectReference `xml:"_this"` View ManagedObjectReference `xml:"view"` } func init() { t["CreateListViewFromViewRequestType"] = reflect.TypeOf((*CreateListViewFromViewRequestType)(nil)).Elem() } type CreateListViewFromViewResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateListViewRequestType struct { This ManagedObjectReference `xml:"_this"` Obj []ManagedObjectReference `xml:"obj,omitempty"` } func init() { t["CreateListViewRequestType"] = reflect.TypeOf((*CreateListViewRequestType)(nil)).Elem() } type CreateListViewResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateLocalDatastore CreateLocalDatastoreRequestType func init() { t["CreateLocalDatastore"] = reflect.TypeOf((*CreateLocalDatastore)(nil)).Elem() } type CreateLocalDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Path string `xml:"path"` } func init() { t["CreateLocalDatastoreRequestType"] = reflect.TypeOf((*CreateLocalDatastoreRequestType)(nil)).Elem() } type CreateLocalDatastoreResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateNasDatastore CreateNasDatastoreRequestType func init() { t["CreateNasDatastore"] = reflect.TypeOf((*CreateNasDatastore)(nil)).Elem() } type CreateNasDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostNasVolumeSpec `xml:"spec"` } func init() { t["CreateNasDatastoreRequestType"] = reflect.TypeOf((*CreateNasDatastoreRequestType)(nil)).Elem() } type CreateNasDatastoreResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateObjectScheduledTask CreateObjectScheduledTaskRequestType func init() { t["CreateObjectScheduledTask"] = reflect.TypeOf((*CreateObjectScheduledTask)(nil)).Elem() } type CreateObjectScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` Obj ManagedObjectReference `xml:"obj"` Spec BaseScheduledTaskSpec `xml:"spec,typeattr"` } func init() { t["CreateObjectScheduledTaskRequestType"] = reflect.TypeOf((*CreateObjectScheduledTaskRequestType)(nil)).Elem() } type CreateObjectScheduledTaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreatePerfInterval CreatePerfIntervalRequestType func init() { t["CreatePerfInterval"] = reflect.TypeOf((*CreatePerfInterval)(nil)).Elem() } type CreatePerfIntervalRequestType struct { This ManagedObjectReference `xml:"_this"` IntervalId PerfInterval `xml:"intervalId"` } func init() { t["CreatePerfIntervalRequestType"] = reflect.TypeOf((*CreatePerfIntervalRequestType)(nil)).Elem() } type CreatePerfIntervalResponse struct { } type CreateProfile CreateProfileRequestType func init() { t["CreateProfile"] = reflect.TypeOf((*CreateProfile)(nil)).Elem() } type CreateProfileRequestType struct { This ManagedObjectReference `xml:"_this"` CreateSpec BaseProfileCreateSpec `xml:"createSpec,typeattr"` } func init() { t["CreateProfileRequestType"] = reflect.TypeOf((*CreateProfileRequestType)(nil)).Elem() } type CreateProfileResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreatePropertyCollector CreatePropertyCollectorRequestType func init() { t["CreatePropertyCollector"] = reflect.TypeOf((*CreatePropertyCollector)(nil)).Elem() } type CreatePropertyCollectorRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["CreatePropertyCollectorRequestType"] = reflect.TypeOf((*CreatePropertyCollectorRequestType)(nil)).Elem() } type CreatePropertyCollectorResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateRegistryKeyInGuest CreateRegistryKeyInGuestRequestType func init() { t["CreateRegistryKeyInGuest"] = reflect.TypeOf((*CreateRegistryKeyInGuest)(nil)).Elem() } type CreateRegistryKeyInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` KeyName GuestRegKeyNameSpec `xml:"keyName"` IsVolatile bool `xml:"isVolatile"` ClassType string `xml:"classType,omitempty"` } func init() { t["CreateRegistryKeyInGuestRequestType"] = reflect.TypeOf((*CreateRegistryKeyInGuestRequestType)(nil)).Elem() } type CreateRegistryKeyInGuestResponse struct { } type CreateResourcePool CreateResourcePoolRequestType func init() { t["CreateResourcePool"] = reflect.TypeOf((*CreateResourcePool)(nil)).Elem() } type CreateResourcePoolRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Spec ResourceConfigSpec `xml:"spec"` } func init() { t["CreateResourcePoolRequestType"] = reflect.TypeOf((*CreateResourcePoolRequestType)(nil)).Elem() } type CreateResourcePoolResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateScheduledTask CreateScheduledTaskRequestType func init() { t["CreateScheduledTask"] = reflect.TypeOf((*CreateScheduledTask)(nil)).Elem() } type CreateScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Spec BaseScheduledTaskSpec `xml:"spec,typeattr"` } func init() { t["CreateScheduledTaskRequestType"] = reflect.TypeOf((*CreateScheduledTaskRequestType)(nil)).Elem() } type CreateScheduledTaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateScreenshotRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["CreateScreenshotRequestType"] = reflect.TypeOf((*CreateScreenshotRequestType)(nil)).Elem() } type CreateScreenshot_Task CreateScreenshotRequestType func init() { t["CreateScreenshot_Task"] = reflect.TypeOf((*CreateScreenshot_Task)(nil)).Elem() } type CreateScreenshot_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateSecondaryVMExRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` Spec *FaultToleranceConfigSpec `xml:"spec,omitempty"` } func init() { t["CreateSecondaryVMExRequestType"] = reflect.TypeOf((*CreateSecondaryVMExRequestType)(nil)).Elem() } type CreateSecondaryVMEx_Task CreateSecondaryVMExRequestType func init() { t["CreateSecondaryVMEx_Task"] = reflect.TypeOf((*CreateSecondaryVMEx_Task)(nil)).Elem() } type CreateSecondaryVMEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateSecondaryVMRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["CreateSecondaryVMRequestType"] = reflect.TypeOf((*CreateSecondaryVMRequestType)(nil)).Elem() } type CreateSecondaryVM_Task CreateSecondaryVMRequestType func init() { t["CreateSecondaryVM_Task"] = reflect.TypeOf((*CreateSecondaryVM_Task)(nil)).Elem() } type CreateSecondaryVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateSnapshotExRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Description string `xml:"description,omitempty"` Memory bool `xml:"memory"` QuiesceSpec BaseVirtualMachineGuestQuiesceSpec `xml:"quiesceSpec,omitempty,typeattr"` } func init() { t["CreateSnapshotExRequestType"] = reflect.TypeOf((*CreateSnapshotExRequestType)(nil)).Elem() } type CreateSnapshotEx_Task CreateSnapshotExRequestType func init() { t["CreateSnapshotEx_Task"] = reflect.TypeOf((*CreateSnapshotEx_Task)(nil)).Elem() } type CreateSnapshotEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Description string `xml:"description,omitempty"` Memory bool `xml:"memory"` Quiesce bool `xml:"quiesce"` } func init() { t["CreateSnapshotRequestType"] = reflect.TypeOf((*CreateSnapshotRequestType)(nil)).Elem() } type CreateSnapshot_Task CreateSnapshotRequestType func init() { t["CreateSnapshot_Task"] = reflect.TypeOf((*CreateSnapshot_Task)(nil)).Elem() } type CreateSnapshot_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateStoragePod CreateStoragePodRequestType func init() { t["CreateStoragePod"] = reflect.TypeOf((*CreateStoragePod)(nil)).Elem() } type CreateStoragePodRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["CreateStoragePodRequestType"] = reflect.TypeOf((*CreateStoragePodRequestType)(nil)).Elem() } type CreateStoragePodResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateTask CreateTaskRequestType func init() { t["CreateTask"] = reflect.TypeOf((*CreateTask)(nil)).Elem() } type CreateTaskAction struct { Action TaskTypeId string `xml:"taskTypeId"` Cancelable bool `xml:"cancelable"` } func init() { t["CreateTaskAction"] = reflect.TypeOf((*CreateTaskAction)(nil)).Elem() } type CreateTaskRequestType struct { This ManagedObjectReference `xml:"_this"` Obj ManagedObjectReference `xml:"obj"` TaskTypeId string `xml:"taskTypeId"` InitiatedBy string `xml:"initiatedBy,omitempty"` Cancelable bool `xml:"cancelable"` ParentTaskKey string `xml:"parentTaskKey,omitempty"` ActivationId string `xml:"activationId,omitempty"` } func init() { t["CreateTaskRequestType"] = reflect.TypeOf((*CreateTaskRequestType)(nil)).Elem() } type CreateTaskResponse struct { Returnval TaskInfo `xml:"returnval"` } type CreateTemporaryDirectoryInGuest CreateTemporaryDirectoryInGuestRequestType func init() { t["CreateTemporaryDirectoryInGuest"] = reflect.TypeOf((*CreateTemporaryDirectoryInGuest)(nil)).Elem() } type CreateTemporaryDirectoryInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Prefix string `xml:"prefix"` Suffix string `xml:"suffix"` DirectoryPath string `xml:"directoryPath,omitempty"` } func init() { t["CreateTemporaryDirectoryInGuestRequestType"] = reflect.TypeOf((*CreateTemporaryDirectoryInGuestRequestType)(nil)).Elem() } type CreateTemporaryDirectoryInGuestResponse struct { Returnval string `xml:"returnval"` } type CreateTemporaryFileInGuest CreateTemporaryFileInGuestRequestType func init() { t["CreateTemporaryFileInGuest"] = reflect.TypeOf((*CreateTemporaryFileInGuest)(nil)).Elem() } type CreateTemporaryFileInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Prefix string `xml:"prefix"` Suffix string `xml:"suffix"` DirectoryPath string `xml:"directoryPath,omitempty"` } func init() { t["CreateTemporaryFileInGuestRequestType"] = reflect.TypeOf((*CreateTemporaryFileInGuestRequestType)(nil)).Elem() } type CreateTemporaryFileInGuestResponse struct { Returnval string `xml:"returnval"` } type CreateUser CreateUserRequestType func init() { t["CreateUser"] = reflect.TypeOf((*CreateUser)(nil)).Elem() } type CreateUserRequestType struct { This ManagedObjectReference `xml:"_this"` User BaseHostAccountSpec `xml:"user,typeattr"` } func init() { t["CreateUserRequestType"] = reflect.TypeOf((*CreateUserRequestType)(nil)).Elem() } type CreateUserResponse struct { } type CreateVApp CreateVAppRequestType func init() { t["CreateVApp"] = reflect.TypeOf((*CreateVApp)(nil)).Elem() } type CreateVAppRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` ResSpec ResourceConfigSpec `xml:"resSpec"` ConfigSpec VAppConfigSpec `xml:"configSpec"` VmFolder *ManagedObjectReference `xml:"vmFolder,omitempty"` } func init() { t["CreateVAppRequestType"] = reflect.TypeOf((*CreateVAppRequestType)(nil)).Elem() } type CreateVAppResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateVMRequestType struct { This ManagedObjectReference `xml:"_this"` Config VirtualMachineConfigSpec `xml:"config"` Pool ManagedObjectReference `xml:"pool"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["CreateVMRequestType"] = reflect.TypeOf((*CreateVMRequestType)(nil)).Elem() } type CreateVM_Task CreateVMRequestType func init() { t["CreateVM_Task"] = reflect.TypeOf((*CreateVM_Task)(nil)).Elem() } type CreateVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Spec BaseVirtualDiskSpec `xml:"spec,typeattr"` } func init() { t["CreateVirtualDiskRequestType"] = reflect.TypeOf((*CreateVirtualDiskRequestType)(nil)).Elem() } type CreateVirtualDisk_Task CreateVirtualDiskRequestType func init() { t["CreateVirtualDisk_Task"] = reflect.TypeOf((*CreateVirtualDisk_Task)(nil)).Elem() } type CreateVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateVmfsDatastore CreateVmfsDatastoreRequestType func init() { t["CreateVmfsDatastore"] = reflect.TypeOf((*CreateVmfsDatastore)(nil)).Elem() } type CreateVmfsDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VmfsDatastoreCreateSpec `xml:"spec"` } func init() { t["CreateVmfsDatastoreRequestType"] = reflect.TypeOf((*CreateVmfsDatastoreRequestType)(nil)).Elem() } type CreateVmfsDatastoreResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CreateVvolDatastore CreateVvolDatastoreRequestType func init() { t["CreateVvolDatastore"] = reflect.TypeOf((*CreateVvolDatastore)(nil)).Elem() } type CreateVvolDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostDatastoreSystemVvolDatastoreSpec `xml:"spec"` } func init() { t["CreateVvolDatastoreRequestType"] = reflect.TypeOf((*CreateVvolDatastoreRequestType)(nil)).Elem() } type CreateVvolDatastoreResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type CryptoKeyId struct { DynamicData KeyId string `xml:"keyId"` ProviderId *KeyProviderId `xml:"providerId,omitempty"` } func init() { t["CryptoKeyId"] = reflect.TypeOf((*CryptoKeyId)(nil)).Elem() } type CryptoKeyPlain struct { DynamicData KeyId CryptoKeyId `xml:"keyId"` Algorithm string `xml:"algorithm"` KeyData string `xml:"keyData"` } func init() { t["CryptoKeyPlain"] = reflect.TypeOf((*CryptoKeyPlain)(nil)).Elem() } type CryptoKeyResult struct { DynamicData KeyId CryptoKeyId `xml:"keyId"` Success bool `xml:"success"` Reason string `xml:"reason,omitempty"` } func init() { t["CryptoKeyResult"] = reflect.TypeOf((*CryptoKeyResult)(nil)).Elem() } type CryptoManagerKmipCertificateInfo struct { DynamicData Subject string `xml:"subject"` Issuer string `xml:"issuer"` SerialNumber string `xml:"serialNumber"` NotBefore time.Time `xml:"notBefore"` NotAfter time.Time `xml:"notAfter"` Fingerprint string `xml:"fingerprint"` CheckTime time.Time `xml:"checkTime"` SecondsSinceValid int32 `xml:"secondsSinceValid,omitempty"` SecondsBeforeExpire int32 `xml:"secondsBeforeExpire,omitempty"` } func init() { t["CryptoManagerKmipCertificateInfo"] = reflect.TypeOf((*CryptoManagerKmipCertificateInfo)(nil)).Elem() } type CryptoManagerKmipClusterStatus struct { DynamicData ClusterId KeyProviderId `xml:"clusterId"` Servers []CryptoManagerKmipServerStatus `xml:"servers"` ClientCertInfo *CryptoManagerKmipCertificateInfo `xml:"clientCertInfo,omitempty"` } func init() { t["CryptoManagerKmipClusterStatus"] = reflect.TypeOf((*CryptoManagerKmipClusterStatus)(nil)).Elem() } type CryptoManagerKmipServerCertInfo struct { DynamicData Certificate string `xml:"certificate"` CertInfo *CryptoManagerKmipCertificateInfo `xml:"certInfo,omitempty"` ClientTrustServer *bool `xml:"clientTrustServer"` } func init() { t["CryptoManagerKmipServerCertInfo"] = reflect.TypeOf((*CryptoManagerKmipServerCertInfo)(nil)).Elem() } type CryptoManagerKmipServerStatus struct { DynamicData Name string `xml:"name"` Status ManagedEntityStatus `xml:"status"` ConnectionStatus string `xml:"connectionStatus"` CertInfo *CryptoManagerKmipCertificateInfo `xml:"certInfo,omitempty"` ClientTrustServer *bool `xml:"clientTrustServer"` ServerTrustClient *bool `xml:"serverTrustClient"` } func init() { t["CryptoManagerKmipServerStatus"] = reflect.TypeOf((*CryptoManagerKmipServerStatus)(nil)).Elem() } type CryptoSpec struct { DynamicData } func init() { t["CryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem() } type CryptoSpecDecrypt struct { CryptoSpec } func init() { t["CryptoSpecDecrypt"] = reflect.TypeOf((*CryptoSpecDecrypt)(nil)).Elem() } type CryptoSpecDeepRecrypt struct { CryptoSpec NewKeyId CryptoKeyId `xml:"newKeyId"` } func init() { t["CryptoSpecDeepRecrypt"] = reflect.TypeOf((*CryptoSpecDeepRecrypt)(nil)).Elem() } type CryptoSpecEncrypt struct { CryptoSpec CryptoKeyId CryptoKeyId `xml:"cryptoKeyId"` } func init() { t["CryptoSpecEncrypt"] = reflect.TypeOf((*CryptoSpecEncrypt)(nil)).Elem() } type CryptoSpecNoOp struct { CryptoSpec } func init() { t["CryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem() } type CryptoSpecRegister struct { CryptoSpecNoOp CryptoKeyId CryptoKeyId `xml:"cryptoKeyId"` } func init() { t["CryptoSpecRegister"] = reflect.TypeOf((*CryptoSpecRegister)(nil)).Elem() } type CryptoSpecShallowRecrypt struct { CryptoSpec NewKeyId CryptoKeyId `xml:"newKeyId"` } func init() { t["CryptoSpecShallowRecrypt"] = reflect.TypeOf((*CryptoSpecShallowRecrypt)(nil)).Elem() } type CurrentTime CurrentTimeRequestType func init() { t["CurrentTime"] = reflect.TypeOf((*CurrentTime)(nil)).Elem() } type CurrentTimeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["CurrentTimeRequestType"] = reflect.TypeOf((*CurrentTimeRequestType)(nil)).Elem() } type CurrentTimeResponse struct { Returnval time.Time `xml:"returnval"` } type CustomFieldDef struct { DynamicData Key int32 `xml:"key"` Name string `xml:"name"` Type string `xml:"type"` ManagedObjectType string `xml:"managedObjectType,omitempty"` FieldDefPrivileges *PrivilegePolicyDef `xml:"fieldDefPrivileges,omitempty"` FieldInstancePrivileges *PrivilegePolicyDef `xml:"fieldInstancePrivileges,omitempty"` } func init() { t["CustomFieldDef"] = reflect.TypeOf((*CustomFieldDef)(nil)).Elem() } type CustomFieldDefAddedEvent struct { CustomFieldDefEvent } func init() { t["CustomFieldDefAddedEvent"] = reflect.TypeOf((*CustomFieldDefAddedEvent)(nil)).Elem() } type CustomFieldDefEvent struct { CustomFieldEvent FieldKey int32 `xml:"fieldKey"` Name string `xml:"name"` } func init() { t["CustomFieldDefEvent"] = reflect.TypeOf((*CustomFieldDefEvent)(nil)).Elem() } type CustomFieldDefRemovedEvent struct { CustomFieldDefEvent } func init() { t["CustomFieldDefRemovedEvent"] = reflect.TypeOf((*CustomFieldDefRemovedEvent)(nil)).Elem() } type CustomFieldDefRenamedEvent struct { CustomFieldDefEvent NewName string `xml:"newName"` } func init() { t["CustomFieldDefRenamedEvent"] = reflect.TypeOf((*CustomFieldDefRenamedEvent)(nil)).Elem() } type CustomFieldEvent struct { Event } func init() { t["CustomFieldEvent"] = reflect.TypeOf((*CustomFieldEvent)(nil)).Elem() } type CustomFieldStringValue struct { CustomFieldValue Value string `xml:"value"` } func init() { t["CustomFieldStringValue"] = reflect.TypeOf((*CustomFieldStringValue)(nil)).Elem() } type CustomFieldValue struct { DynamicData Key int32 `xml:"key"` } func init() { t["CustomFieldValue"] = reflect.TypeOf((*CustomFieldValue)(nil)).Elem() } type CustomFieldValueChangedEvent struct { CustomFieldEvent Entity ManagedEntityEventArgument `xml:"entity"` FieldKey int32 `xml:"fieldKey"` Name string `xml:"name"` Value string `xml:"value"` PrevState string `xml:"prevState,omitempty"` } func init() { t["CustomFieldValueChangedEvent"] = reflect.TypeOf((*CustomFieldValueChangedEvent)(nil)).Elem() } type CustomizationAdapterMapping struct { DynamicData MacAddress string `xml:"macAddress,omitempty"` Adapter CustomizationIPSettings `xml:"adapter"` } func init() { t["CustomizationAdapterMapping"] = reflect.TypeOf((*CustomizationAdapterMapping)(nil)).Elem() } type CustomizationAutoIpV6Generator struct { CustomizationIpV6Generator } func init() { t["CustomizationAutoIpV6Generator"] = reflect.TypeOf((*CustomizationAutoIpV6Generator)(nil)).Elem() } type CustomizationCustomIpGenerator struct { CustomizationIpGenerator Argument string `xml:"argument,omitempty"` } func init() { t["CustomizationCustomIpGenerator"] = reflect.TypeOf((*CustomizationCustomIpGenerator)(nil)).Elem() } type CustomizationCustomIpV6Generator struct { CustomizationIpV6Generator Argument string `xml:"argument,omitempty"` } func init() { t["CustomizationCustomIpV6Generator"] = reflect.TypeOf((*CustomizationCustomIpV6Generator)(nil)).Elem() } type CustomizationCustomName struct { CustomizationName Argument string `xml:"argument,omitempty"` } func init() { t["CustomizationCustomName"] = reflect.TypeOf((*CustomizationCustomName)(nil)).Elem() } type CustomizationDhcpIpGenerator struct { CustomizationIpGenerator } func init() { t["CustomizationDhcpIpGenerator"] = reflect.TypeOf((*CustomizationDhcpIpGenerator)(nil)).Elem() } type CustomizationDhcpIpV6Generator struct { CustomizationIpV6Generator } func init() { t["CustomizationDhcpIpV6Generator"] = reflect.TypeOf((*CustomizationDhcpIpV6Generator)(nil)).Elem() } type CustomizationEvent struct { VmEvent LogLocation string `xml:"logLocation,omitempty"` } func init() { t["CustomizationEvent"] = reflect.TypeOf((*CustomizationEvent)(nil)).Elem() } type CustomizationFailed struct { CustomizationEvent } func init() { t["CustomizationFailed"] = reflect.TypeOf((*CustomizationFailed)(nil)).Elem() } type CustomizationFault struct { VimFault } func init() { t["CustomizationFault"] = reflect.TypeOf((*CustomizationFault)(nil)).Elem() } type CustomizationFaultFault BaseCustomizationFault func init() { t["CustomizationFaultFault"] = reflect.TypeOf((*CustomizationFaultFault)(nil)).Elem() } type CustomizationFixedIp struct { CustomizationIpGenerator IpAddress string `xml:"ipAddress"` } func init() { t["CustomizationFixedIp"] = reflect.TypeOf((*CustomizationFixedIp)(nil)).Elem() } type CustomizationFixedIpV6 struct { CustomizationIpV6Generator IpAddress string `xml:"ipAddress"` SubnetMask int32 `xml:"subnetMask"` } func init() { t["CustomizationFixedIpV6"] = reflect.TypeOf((*CustomizationFixedIpV6)(nil)).Elem() } type CustomizationFixedName struct { CustomizationName Name string `xml:"name"` } func init() { t["CustomizationFixedName"] = reflect.TypeOf((*CustomizationFixedName)(nil)).Elem() } type CustomizationGlobalIPSettings struct { DynamicData DnsSuffixList []string `xml:"dnsSuffixList,omitempty"` DnsServerList []string `xml:"dnsServerList,omitempty"` } func init() { t["CustomizationGlobalIPSettings"] = reflect.TypeOf((*CustomizationGlobalIPSettings)(nil)).Elem() } type CustomizationGuiRunOnce struct { DynamicData CommandList []string `xml:"commandList"` } func init() { t["CustomizationGuiRunOnce"] = reflect.TypeOf((*CustomizationGuiRunOnce)(nil)).Elem() } type CustomizationGuiUnattended struct { DynamicData Password *CustomizationPassword `xml:"password,omitempty"` TimeZone int32 `xml:"timeZone"` AutoLogon bool `xml:"autoLogon"` AutoLogonCount int32 `xml:"autoLogonCount"` } func init() { t["CustomizationGuiUnattended"] = reflect.TypeOf((*CustomizationGuiUnattended)(nil)).Elem() } type CustomizationIPSettings struct { DynamicData Ip BaseCustomizationIpGenerator `xml:"ip,typeattr"` SubnetMask string `xml:"subnetMask,omitempty"` Gateway []string `xml:"gateway,omitempty"` IpV6Spec *CustomizationIPSettingsIpV6AddressSpec `xml:"ipV6Spec,omitempty"` DnsServerList []string `xml:"dnsServerList,omitempty"` DnsDomain string `xml:"dnsDomain,omitempty"` PrimaryWINS string `xml:"primaryWINS,omitempty"` SecondaryWINS string `xml:"secondaryWINS,omitempty"` NetBIOS CustomizationNetBIOSMode `xml:"netBIOS,omitempty"` } func init() { t["CustomizationIPSettings"] = reflect.TypeOf((*CustomizationIPSettings)(nil)).Elem() } type CustomizationIPSettingsIpV6AddressSpec struct { DynamicData Ip []BaseCustomizationIpV6Generator `xml:"ip,typeattr"` Gateway []string `xml:"gateway,omitempty"` } func init() { t["CustomizationIPSettingsIpV6AddressSpec"] = reflect.TypeOf((*CustomizationIPSettingsIpV6AddressSpec)(nil)).Elem() } type CustomizationIdentification struct { DynamicData JoinWorkgroup string `xml:"joinWorkgroup,omitempty"` JoinDomain string `xml:"joinDomain,omitempty"` DomainAdmin string `xml:"domainAdmin,omitempty"` DomainAdminPassword *CustomizationPassword `xml:"domainAdminPassword,omitempty"` } func init() { t["CustomizationIdentification"] = reflect.TypeOf((*CustomizationIdentification)(nil)).Elem() } type CustomizationIdentitySettings struct { DynamicData } func init() { t["CustomizationIdentitySettings"] = reflect.TypeOf((*CustomizationIdentitySettings)(nil)).Elem() } type CustomizationIpGenerator struct { DynamicData } func init() { t["CustomizationIpGenerator"] = reflect.TypeOf((*CustomizationIpGenerator)(nil)).Elem() } type CustomizationIpV6Generator struct { DynamicData } func init() { t["CustomizationIpV6Generator"] = reflect.TypeOf((*CustomizationIpV6Generator)(nil)).Elem() } type CustomizationLicenseFilePrintData struct { DynamicData AutoMode CustomizationLicenseDataMode `xml:"autoMode"` AutoUsers int32 `xml:"autoUsers,omitempty"` } func init() { t["CustomizationLicenseFilePrintData"] = reflect.TypeOf((*CustomizationLicenseFilePrintData)(nil)).Elem() } type CustomizationLinuxIdentityFailed struct { CustomizationFailed } func init() { t["CustomizationLinuxIdentityFailed"] = reflect.TypeOf((*CustomizationLinuxIdentityFailed)(nil)).Elem() } type CustomizationLinuxOptions struct { CustomizationOptions } func init() { t["CustomizationLinuxOptions"] = reflect.TypeOf((*CustomizationLinuxOptions)(nil)).Elem() } type CustomizationLinuxPrep struct { CustomizationIdentitySettings HostName BaseCustomizationName `xml:"hostName,typeattr"` Domain string `xml:"domain"` TimeZone string `xml:"timeZone,omitempty"` HwClockUTC *bool `xml:"hwClockUTC"` } func init() { t["CustomizationLinuxPrep"] = reflect.TypeOf((*CustomizationLinuxPrep)(nil)).Elem() } type CustomizationName struct { DynamicData } func init() { t["CustomizationName"] = reflect.TypeOf((*CustomizationName)(nil)).Elem() } type CustomizationNetworkSetupFailed struct { CustomizationFailed } func init() { t["CustomizationNetworkSetupFailed"] = reflect.TypeOf((*CustomizationNetworkSetupFailed)(nil)).Elem() } type CustomizationOptions struct { DynamicData } func init() { t["CustomizationOptions"] = reflect.TypeOf((*CustomizationOptions)(nil)).Elem() } type CustomizationPassword struct { DynamicData Value string `xml:"value"` PlainText bool `xml:"plainText"` } func init() { t["CustomizationPassword"] = reflect.TypeOf((*CustomizationPassword)(nil)).Elem() } type CustomizationPending struct { CustomizationFault } func init() { t["CustomizationPending"] = reflect.TypeOf((*CustomizationPending)(nil)).Elem() } type CustomizationPendingFault CustomizationPending func init() { t["CustomizationPendingFault"] = reflect.TypeOf((*CustomizationPendingFault)(nil)).Elem() } type CustomizationPrefixName struct { CustomizationName Base string `xml:"base"` } func init() { t["CustomizationPrefixName"] = reflect.TypeOf((*CustomizationPrefixName)(nil)).Elem() } type CustomizationSpec struct { DynamicData Options BaseCustomizationOptions `xml:"options,omitempty,typeattr"` Identity BaseCustomizationIdentitySettings `xml:"identity,typeattr"` GlobalIPSettings CustomizationGlobalIPSettings `xml:"globalIPSettings"` NicSettingMap []CustomizationAdapterMapping `xml:"nicSettingMap,omitempty"` EncryptionKey []byte `xml:"encryptionKey,omitempty"` } func init() { t["CustomizationSpec"] = reflect.TypeOf((*CustomizationSpec)(nil)).Elem() } type CustomizationSpecInfo struct { DynamicData Name string `xml:"name"` Description string `xml:"description"` Type string `xml:"type"` ChangeVersion string `xml:"changeVersion,omitempty"` LastUpdateTime *time.Time `xml:"lastUpdateTime"` } func init() { t["CustomizationSpecInfo"] = reflect.TypeOf((*CustomizationSpecInfo)(nil)).Elem() } type CustomizationSpecItem struct { DynamicData Info CustomizationSpecInfo `xml:"info"` Spec CustomizationSpec `xml:"spec"` } func init() { t["CustomizationSpecItem"] = reflect.TypeOf((*CustomizationSpecItem)(nil)).Elem() } type CustomizationSpecItemToXml CustomizationSpecItemToXmlRequestType func init() { t["CustomizationSpecItemToXml"] = reflect.TypeOf((*CustomizationSpecItemToXml)(nil)).Elem() } type CustomizationSpecItemToXmlRequestType struct { This ManagedObjectReference `xml:"_this"` Item CustomizationSpecItem `xml:"item"` } func init() { t["CustomizationSpecItemToXmlRequestType"] = reflect.TypeOf((*CustomizationSpecItemToXmlRequestType)(nil)).Elem() } type CustomizationSpecItemToXmlResponse struct { Returnval string `xml:"returnval"` } type CustomizationStartedEvent struct { CustomizationEvent } func init() { t["CustomizationStartedEvent"] = reflect.TypeOf((*CustomizationStartedEvent)(nil)).Elem() } type CustomizationStatelessIpV6Generator struct { CustomizationIpV6Generator } func init() { t["CustomizationStatelessIpV6Generator"] = reflect.TypeOf((*CustomizationStatelessIpV6Generator)(nil)).Elem() } type CustomizationSucceeded struct { CustomizationEvent } func init() { t["CustomizationSucceeded"] = reflect.TypeOf((*CustomizationSucceeded)(nil)).Elem() } type CustomizationSysprep struct { CustomizationIdentitySettings GuiUnattended CustomizationGuiUnattended `xml:"guiUnattended"` UserData CustomizationUserData `xml:"userData"` GuiRunOnce *CustomizationGuiRunOnce `xml:"guiRunOnce,omitempty"` Identification CustomizationIdentification `xml:"identification"` LicenseFilePrintData *CustomizationLicenseFilePrintData `xml:"licenseFilePrintData,omitempty"` } func init() { t["CustomizationSysprep"] = reflect.TypeOf((*CustomizationSysprep)(nil)).Elem() } type CustomizationSysprepFailed struct { CustomizationFailed SysprepVersion string `xml:"sysprepVersion"` SystemVersion string `xml:"systemVersion"` } func init() { t["CustomizationSysprepFailed"] = reflect.TypeOf((*CustomizationSysprepFailed)(nil)).Elem() } type CustomizationSysprepText struct { CustomizationIdentitySettings Value string `xml:"value"` } func init() { t["CustomizationSysprepText"] = reflect.TypeOf((*CustomizationSysprepText)(nil)).Elem() } type CustomizationUnknownFailure struct { CustomizationFailed } func init() { t["CustomizationUnknownFailure"] = reflect.TypeOf((*CustomizationUnknownFailure)(nil)).Elem() } type CustomizationUnknownIpGenerator struct { CustomizationIpGenerator } func init() { t["CustomizationUnknownIpGenerator"] = reflect.TypeOf((*CustomizationUnknownIpGenerator)(nil)).Elem() } type CustomizationUnknownIpV6Generator struct { CustomizationIpV6Generator } func init() { t["CustomizationUnknownIpV6Generator"] = reflect.TypeOf((*CustomizationUnknownIpV6Generator)(nil)).Elem() } type CustomizationUnknownName struct { CustomizationName } func init() { t["CustomizationUnknownName"] = reflect.TypeOf((*CustomizationUnknownName)(nil)).Elem() } type CustomizationUserData struct { DynamicData FullName string `xml:"fullName"` OrgName string `xml:"orgName"` ComputerName BaseCustomizationName `xml:"computerName,typeattr"` ProductId string `xml:"productId"` } func init() { t["CustomizationUserData"] = reflect.TypeOf((*CustomizationUserData)(nil)).Elem() } type CustomizationVirtualMachineName struct { CustomizationName } func init() { t["CustomizationVirtualMachineName"] = reflect.TypeOf((*CustomizationVirtualMachineName)(nil)).Elem() } type CustomizationWinOptions struct { CustomizationOptions ChangeSID bool `xml:"changeSID"` DeleteAccounts bool `xml:"deleteAccounts"` Reboot CustomizationSysprepRebootOption `xml:"reboot,omitempty"` } func init() { t["CustomizationWinOptions"] = reflect.TypeOf((*CustomizationWinOptions)(nil)).Elem() } type CustomizeVMRequestType struct { This ManagedObjectReference `xml:"_this"` Spec CustomizationSpec `xml:"spec"` } func init() { t["CustomizeVMRequestType"] = reflect.TypeOf((*CustomizeVMRequestType)(nil)).Elem() } type CustomizeVM_Task CustomizeVMRequestType func init() { t["CustomizeVM_Task"] = reflect.TypeOf((*CustomizeVM_Task)(nil)).Elem() } type CustomizeVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DVPortConfigInfo struct { DynamicData Name string `xml:"name,omitempty"` Scope []ManagedObjectReference `xml:"scope,omitempty"` Description string `xml:"description,omitempty"` Setting BaseDVPortSetting `xml:"setting,omitempty,typeattr"` ConfigVersion string `xml:"configVersion"` } func init() { t["DVPortConfigInfo"] = reflect.TypeOf((*DVPortConfigInfo)(nil)).Elem() } type DVPortConfigSpec struct { DynamicData Operation string `xml:"operation"` Key string `xml:"key,omitempty"` Name string `xml:"name,omitempty"` Scope []ManagedObjectReference `xml:"scope,omitempty"` Description string `xml:"description,omitempty"` Setting BaseDVPortSetting `xml:"setting,omitempty,typeattr"` ConfigVersion string `xml:"configVersion,omitempty"` } func init() { t["DVPortConfigSpec"] = reflect.TypeOf((*DVPortConfigSpec)(nil)).Elem() } type DVPortNotSupported struct { DeviceBackingNotSupported } func init() { t["DVPortNotSupported"] = reflect.TypeOf((*DVPortNotSupported)(nil)).Elem() } type DVPortNotSupportedFault DVPortNotSupported func init() { t["DVPortNotSupportedFault"] = reflect.TypeOf((*DVPortNotSupportedFault)(nil)).Elem() } type DVPortSetting struct { DynamicData Blocked *BoolPolicy `xml:"blocked,omitempty"` VmDirectPathGen2Allowed *BoolPolicy `xml:"vmDirectPathGen2Allowed,omitempty"` InShapingPolicy *DVSTrafficShapingPolicy `xml:"inShapingPolicy,omitempty"` OutShapingPolicy *DVSTrafficShapingPolicy `xml:"outShapingPolicy,omitempty"` VendorSpecificConfig *DVSVendorSpecificConfig `xml:"vendorSpecificConfig,omitempty"` NetworkResourcePoolKey *StringPolicy `xml:"networkResourcePoolKey,omitempty"` FilterPolicy *DvsFilterPolicy `xml:"filterPolicy,omitempty"` } func init() { t["DVPortSetting"] = reflect.TypeOf((*DVPortSetting)(nil)).Elem() } type DVPortState struct { DynamicData RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` Stats DistributedVirtualSwitchPortStatistics `xml:"stats"` VendorSpecificState []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificState,omitempty"` } func init() { t["DVPortState"] = reflect.TypeOf((*DVPortState)(nil)).Elem() } type DVPortStatus struct { DynamicData LinkUp bool `xml:"linkUp"` Blocked bool `xml:"blocked"` VlanIds []NumericRange `xml:"vlanIds,omitempty"` TrunkingMode *bool `xml:"trunkingMode"` Mtu int32 `xml:"mtu,omitempty"` LinkPeer string `xml:"linkPeer,omitempty"` MacAddress string `xml:"macAddress,omitempty"` StatusDetail string `xml:"statusDetail,omitempty"` VmDirectPathGen2Active *bool `xml:"vmDirectPathGen2Active"` VmDirectPathGen2InactiveReasonNetwork []string `xml:"vmDirectPathGen2InactiveReasonNetwork,omitempty"` VmDirectPathGen2InactiveReasonOther []string `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"` VmDirectPathGen2InactiveReasonExtended string `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"` } func init() { t["DVPortStatus"] = reflect.TypeOf((*DVPortStatus)(nil)).Elem() } type DVPortgroupConfigInfo struct { DynamicData Key string `xml:"key"` Name string `xml:"name"` NumPorts int32 `xml:"numPorts"` DistributedVirtualSwitch *ManagedObjectReference `xml:"distributedVirtualSwitch,omitempty"` DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,omitempty,typeattr"` Description string `xml:"description,omitempty"` Type string `xml:"type"` Policy BaseDVPortgroupPolicy `xml:"policy,typeattr"` PortNameFormat string `xml:"portNameFormat,omitempty"` Scope []ManagedObjectReference `xml:"scope,omitempty"` VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` ConfigVersion string `xml:"configVersion,omitempty"` AutoExpand *bool `xml:"autoExpand"` VmVnicNetworkResourcePoolKey string `xml:"vmVnicNetworkResourcePoolKey,omitempty"` Uplink *bool `xml:"uplink"` } func init() { t["DVPortgroupConfigInfo"] = reflect.TypeOf((*DVPortgroupConfigInfo)(nil)).Elem() } type DVPortgroupConfigSpec struct { DynamicData ConfigVersion string `xml:"configVersion,omitempty"` Name string `xml:"name,omitempty"` NumPorts int32 `xml:"numPorts,omitempty"` PortNameFormat string `xml:"portNameFormat,omitempty"` DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,omitempty,typeattr"` Description string `xml:"description,omitempty"` Type string `xml:"type,omitempty"` Scope []ManagedObjectReference `xml:"scope,omitempty"` Policy BaseDVPortgroupPolicy `xml:"policy,omitempty,typeattr"` VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` AutoExpand *bool `xml:"autoExpand"` VmVnicNetworkResourcePoolKey string `xml:"vmVnicNetworkResourcePoolKey,omitempty"` } func init() { t["DVPortgroupConfigSpec"] = reflect.TypeOf((*DVPortgroupConfigSpec)(nil)).Elem() } type DVPortgroupCreatedEvent struct { DVPortgroupEvent } func init() { t["DVPortgroupCreatedEvent"] = reflect.TypeOf((*DVPortgroupCreatedEvent)(nil)).Elem() } type DVPortgroupDestroyedEvent struct { DVPortgroupEvent } func init() { t["DVPortgroupDestroyedEvent"] = reflect.TypeOf((*DVPortgroupDestroyedEvent)(nil)).Elem() } type DVPortgroupEvent struct { Event } func init() { t["DVPortgroupEvent"] = reflect.TypeOf((*DVPortgroupEvent)(nil)).Elem() } type DVPortgroupPolicy struct { DynamicData BlockOverrideAllowed bool `xml:"blockOverrideAllowed"` ShapingOverrideAllowed bool `xml:"shapingOverrideAllowed"` VendorConfigOverrideAllowed bool `xml:"vendorConfigOverrideAllowed"` LivePortMovingAllowed bool `xml:"livePortMovingAllowed"` PortConfigResetAtDisconnect bool `xml:"portConfigResetAtDisconnect"` NetworkResourcePoolOverrideAllowed *bool `xml:"networkResourcePoolOverrideAllowed"` TrafficFilterOverrideAllowed *bool `xml:"trafficFilterOverrideAllowed"` } func init() { t["DVPortgroupPolicy"] = reflect.TypeOf((*DVPortgroupPolicy)(nil)).Elem() } type DVPortgroupReconfiguredEvent struct { DVPortgroupEvent ConfigSpec DVPortgroupConfigSpec `xml:"configSpec"` ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["DVPortgroupReconfiguredEvent"] = reflect.TypeOf((*DVPortgroupReconfiguredEvent)(nil)).Elem() } type DVPortgroupRenamedEvent struct { DVPortgroupEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["DVPortgroupRenamedEvent"] = reflect.TypeOf((*DVPortgroupRenamedEvent)(nil)).Elem() } type DVPortgroupRollbackRequestType struct { This ManagedObjectReference `xml:"_this"` EntityBackup *EntityBackupConfig `xml:"entityBackup,omitempty"` } func init() { t["DVPortgroupRollbackRequestType"] = reflect.TypeOf((*DVPortgroupRollbackRequestType)(nil)).Elem() } type DVPortgroupRollback_Task DVPortgroupRollbackRequestType func init() { t["DVPortgroupRollback_Task"] = reflect.TypeOf((*DVPortgroupRollback_Task)(nil)).Elem() } type DVPortgroupRollback_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DVPortgroupSelection struct { SelectionSet DvsUuid string `xml:"dvsUuid"` PortgroupKey []string `xml:"portgroupKey"` } func init() { t["DVPortgroupSelection"] = reflect.TypeOf((*DVPortgroupSelection)(nil)).Elem() } type DVSBackupRestoreCapability struct { DynamicData BackupRestoreSupported bool `xml:"backupRestoreSupported"` } func init() { t["DVSBackupRestoreCapability"] = reflect.TypeOf((*DVSBackupRestoreCapability)(nil)).Elem() } type DVSCapability struct { DynamicData DvsOperationSupported *bool `xml:"dvsOperationSupported"` DvPortGroupOperationSupported *bool `xml:"dvPortGroupOperationSupported"` DvPortOperationSupported *bool `xml:"dvPortOperationSupported"` CompatibleHostComponentProductInfo []DistributedVirtualSwitchHostProductSpec `xml:"compatibleHostComponentProductInfo,omitempty"` FeaturesSupported BaseDVSFeatureCapability `xml:"featuresSupported,omitempty,typeattr"` } func init() { t["DVSCapability"] = reflect.TypeOf((*DVSCapability)(nil)).Elem() } type DVSConfigInfo struct { DynamicData Uuid string `xml:"uuid"` Name string `xml:"name"` NumStandalonePorts int32 `xml:"numStandalonePorts"` NumPorts int32 `xml:"numPorts"` MaxPorts int32 `xml:"maxPorts"` UplinkPortPolicy BaseDVSUplinkPortPolicy `xml:"uplinkPortPolicy,typeattr"` UplinkPortgroup []ManagedObjectReference `xml:"uplinkPortgroup,omitempty"` DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,typeattr"` Host []DistributedVirtualSwitchHostMember `xml:"host,omitempty"` ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` TargetInfo *DistributedVirtualSwitchProductSpec `xml:"targetInfo,omitempty"` ExtensionKey string `xml:"extensionKey,omitempty"` VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` Policy *DVSPolicy `xml:"policy,omitempty"` Description string `xml:"description,omitempty"` ConfigVersion string `xml:"configVersion"` Contact DVSContactInfo `xml:"contact"` SwitchIpAddress string `xml:"switchIpAddress,omitempty"` CreateTime time.Time `xml:"createTime"` NetworkResourceManagementEnabled *bool `xml:"networkResourceManagementEnabled"` DefaultProxySwitchMaxNumPorts int32 `xml:"defaultProxySwitchMaxNumPorts,omitempty"` HealthCheckConfig []BaseDVSHealthCheckConfig `xml:"healthCheckConfig,omitempty,typeattr"` InfrastructureTrafficResourceConfig []DvsHostInfrastructureTrafficResource `xml:"infrastructureTrafficResourceConfig,omitempty"` NetworkResourceControlVersion string `xml:"networkResourceControlVersion,omitempty"` VmVnicNetworkResourcePool []DVSVmVnicNetworkResourcePool `xml:"vmVnicNetworkResourcePool,omitempty"` PnicCapacityRatioForReservation int32 `xml:"pnicCapacityRatioForReservation,omitempty"` } func init() { t["DVSConfigInfo"] = reflect.TypeOf((*DVSConfigInfo)(nil)).Elem() } type DVSConfigSpec struct { DynamicData ConfigVersion string `xml:"configVersion,omitempty"` Name string `xml:"name,omitempty"` NumStandalonePorts int32 `xml:"numStandalonePorts,omitempty"` MaxPorts int32 `xml:"maxPorts,omitempty"` UplinkPortPolicy BaseDVSUplinkPortPolicy `xml:"uplinkPortPolicy,omitempty,typeattr"` UplinkPortgroup []ManagedObjectReference `xml:"uplinkPortgroup,omitempty"` DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,omitempty,typeattr"` Host []DistributedVirtualSwitchHostMemberConfigSpec `xml:"host,omitempty"` ExtensionKey string `xml:"extensionKey,omitempty"` Description string `xml:"description,omitempty"` Policy *DVSPolicy `xml:"policy,omitempty"` VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` Contact *DVSContactInfo `xml:"contact,omitempty"` SwitchIpAddress string `xml:"switchIpAddress,omitempty"` DefaultProxySwitchMaxNumPorts int32 `xml:"defaultProxySwitchMaxNumPorts,omitempty"` InfrastructureTrafficResourceConfig []DvsHostInfrastructureTrafficResource `xml:"infrastructureTrafficResourceConfig,omitempty"` NetworkResourceControlVersion string `xml:"networkResourceControlVersion,omitempty"` } func init() { t["DVSConfigSpec"] = reflect.TypeOf((*DVSConfigSpec)(nil)).Elem() } type DVSContactInfo struct { DynamicData Name string `xml:"name,omitempty"` Contact string `xml:"contact,omitempty"` } func init() { t["DVSContactInfo"] = reflect.TypeOf((*DVSContactInfo)(nil)).Elem() } type DVSCreateSpec struct { DynamicData ConfigSpec BaseDVSConfigSpec `xml:"configSpec,typeattr"` ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"` Capability *DVSCapability `xml:"capability,omitempty"` } func init() { t["DVSCreateSpec"] = reflect.TypeOf((*DVSCreateSpec)(nil)).Elem() } type DVSFailureCriteria struct { InheritablePolicy CheckSpeed *StringPolicy `xml:"checkSpeed,omitempty"` Speed *IntPolicy `xml:"speed,omitempty"` CheckDuplex *BoolPolicy `xml:"checkDuplex,omitempty"` FullDuplex *BoolPolicy `xml:"fullDuplex,omitempty"` CheckErrorPercent *BoolPolicy `xml:"checkErrorPercent,omitempty"` Percentage *IntPolicy `xml:"percentage,omitempty"` CheckBeacon *BoolPolicy `xml:"checkBeacon,omitempty"` } func init() { t["DVSFailureCriteria"] = reflect.TypeOf((*DVSFailureCriteria)(nil)).Elem() } type DVSFeatureCapability struct { DynamicData NetworkResourceManagementSupported bool `xml:"networkResourceManagementSupported"` VmDirectPathGen2Supported bool `xml:"vmDirectPathGen2Supported"` NicTeamingPolicy []string `xml:"nicTeamingPolicy,omitempty"` NetworkResourcePoolHighShareValue int32 `xml:"networkResourcePoolHighShareValue,omitempty"` NetworkResourceManagementCapability *DVSNetworkResourceManagementCapability `xml:"networkResourceManagementCapability,omitempty"` HealthCheckCapability BaseDVSHealthCheckCapability `xml:"healthCheckCapability,omitempty,typeattr"` RollbackCapability *DVSRollbackCapability `xml:"rollbackCapability,omitempty"` BackupRestoreCapability *DVSBackupRestoreCapability `xml:"backupRestoreCapability,omitempty"` NetworkFilterSupported *bool `xml:"networkFilterSupported"` } func init() { t["DVSFeatureCapability"] = reflect.TypeOf((*DVSFeatureCapability)(nil)).Elem() } type DVSHealthCheckCapability struct { DynamicData } func init() { t["DVSHealthCheckCapability"] = reflect.TypeOf((*DVSHealthCheckCapability)(nil)).Elem() } type DVSHealthCheckConfig struct { DynamicData Enable *bool `xml:"enable"` Interval int32 `xml:"interval,omitempty"` } func init() { t["DVSHealthCheckConfig"] = reflect.TypeOf((*DVSHealthCheckConfig)(nil)).Elem() } type DVSHostLocalPortInfo struct { DynamicData SwitchUuid string `xml:"switchUuid"` PortKey string `xml:"portKey"` Setting BaseDVPortSetting `xml:"setting,typeattr"` Vnic string `xml:"vnic"` } func init() { t["DVSHostLocalPortInfo"] = reflect.TypeOf((*DVSHostLocalPortInfo)(nil)).Elem() } type DVSManagerDvsConfigTarget struct { DynamicData DistributedVirtualPortgroup []DistributedVirtualPortgroupInfo `xml:"distributedVirtualPortgroup,omitempty"` DistributedVirtualSwitch []DistributedVirtualSwitchInfo `xml:"distributedVirtualSwitch,omitempty"` } func init() { t["DVSManagerDvsConfigTarget"] = reflect.TypeOf((*DVSManagerDvsConfigTarget)(nil)).Elem() } type DVSManagerExportEntityRequestType struct { This ManagedObjectReference `xml:"_this"` SelectionSet []BaseSelectionSet `xml:"selectionSet,typeattr"` } func init() { t["DVSManagerExportEntityRequestType"] = reflect.TypeOf((*DVSManagerExportEntityRequestType)(nil)).Elem() } type DVSManagerExportEntity_Task DVSManagerExportEntityRequestType func init() { t["DVSManagerExportEntity_Task"] = reflect.TypeOf((*DVSManagerExportEntity_Task)(nil)).Elem() } type DVSManagerExportEntity_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DVSManagerImportEntityRequestType struct { This ManagedObjectReference `xml:"_this"` EntityBackup []EntityBackupConfig `xml:"entityBackup"` ImportType string `xml:"importType"` } func init() { t["DVSManagerImportEntityRequestType"] = reflect.TypeOf((*DVSManagerImportEntityRequestType)(nil)).Elem() } type DVSManagerImportEntity_Task DVSManagerImportEntityRequestType func init() { t["DVSManagerImportEntity_Task"] = reflect.TypeOf((*DVSManagerImportEntity_Task)(nil)).Elem() } type DVSManagerImportEntity_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DVSManagerLookupDvPortGroup DVSManagerLookupDvPortGroupRequestType func init() { t["DVSManagerLookupDvPortGroup"] = reflect.TypeOf((*DVSManagerLookupDvPortGroup)(nil)).Elem() } type DVSManagerLookupDvPortGroupRequestType struct { This ManagedObjectReference `xml:"_this"` SwitchUuid string `xml:"switchUuid"` PortgroupKey string `xml:"portgroupKey"` } func init() { t["DVSManagerLookupDvPortGroupRequestType"] = reflect.TypeOf((*DVSManagerLookupDvPortGroupRequestType)(nil)).Elem() } type DVSManagerLookupDvPortGroupResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type DVSNameArrayUplinkPortPolicy struct { DVSUplinkPortPolicy UplinkPortName []string `xml:"uplinkPortName"` } func init() { t["DVSNameArrayUplinkPortPolicy"] = reflect.TypeOf((*DVSNameArrayUplinkPortPolicy)(nil)).Elem() } type DVSNetworkResourceManagementCapability struct { DynamicData NetworkResourceManagementSupported bool `xml:"networkResourceManagementSupported"` NetworkResourcePoolHighShareValue int32 `xml:"networkResourcePoolHighShareValue"` QosSupported bool `xml:"qosSupported"` UserDefinedNetworkResourcePoolsSupported bool `xml:"userDefinedNetworkResourcePoolsSupported"` NetworkResourceControlVersion3Supported *bool `xml:"networkResourceControlVersion3Supported"` } func init() { t["DVSNetworkResourceManagementCapability"] = reflect.TypeOf((*DVSNetworkResourceManagementCapability)(nil)).Elem() } type DVSNetworkResourcePool struct { DynamicData Key string `xml:"key"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` ConfigVersion string `xml:"configVersion"` AllocationInfo DVSNetworkResourcePoolAllocationInfo `xml:"allocationInfo"` } func init() { t["DVSNetworkResourcePool"] = reflect.TypeOf((*DVSNetworkResourcePool)(nil)).Elem() } type DVSNetworkResourcePoolAllocationInfo struct { DynamicData Limit int64 `xml:"limit,omitempty"` Shares *SharesInfo `xml:"shares,omitempty"` PriorityTag int32 `xml:"priorityTag,omitempty"` } func init() { t["DVSNetworkResourcePoolAllocationInfo"] = reflect.TypeOf((*DVSNetworkResourcePoolAllocationInfo)(nil)).Elem() } type DVSNetworkResourcePoolConfigSpec struct { DynamicData Key string `xml:"key"` ConfigVersion string `xml:"configVersion,omitempty"` AllocationInfo *DVSNetworkResourcePoolAllocationInfo `xml:"allocationInfo,omitempty"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` } func init() { t["DVSNetworkResourcePoolConfigSpec"] = reflect.TypeOf((*DVSNetworkResourcePoolConfigSpec)(nil)).Elem() } type DVSPolicy struct { DynamicData AutoPreInstallAllowed *bool `xml:"autoPreInstallAllowed"` AutoUpgradeAllowed *bool `xml:"autoUpgradeAllowed"` PartialUpgradeAllowed *bool `xml:"partialUpgradeAllowed"` } func init() { t["DVSPolicy"] = reflect.TypeOf((*DVSPolicy)(nil)).Elem() } type DVSRollbackCapability struct { DynamicData RollbackSupported bool `xml:"rollbackSupported"` } func init() { t["DVSRollbackCapability"] = reflect.TypeOf((*DVSRollbackCapability)(nil)).Elem() } type DVSRollbackRequestType struct { This ManagedObjectReference `xml:"_this"` EntityBackup *EntityBackupConfig `xml:"entityBackup,omitempty"` } func init() { t["DVSRollbackRequestType"] = reflect.TypeOf((*DVSRollbackRequestType)(nil)).Elem() } type DVSRollback_Task DVSRollbackRequestType func init() { t["DVSRollback_Task"] = reflect.TypeOf((*DVSRollback_Task)(nil)).Elem() } type DVSRollback_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DVSRuntimeInfo struct { DynamicData HostMemberRuntime []HostMemberRuntimeInfo `xml:"hostMemberRuntime,omitempty"` ResourceRuntimeInfo *DvsResourceRuntimeInfo `xml:"resourceRuntimeInfo,omitempty"` } func init() { t["DVSRuntimeInfo"] = reflect.TypeOf((*DVSRuntimeInfo)(nil)).Elem() } type DVSSecurityPolicy struct { InheritablePolicy AllowPromiscuous *BoolPolicy `xml:"allowPromiscuous,omitempty"` MacChanges *BoolPolicy `xml:"macChanges,omitempty"` ForgedTransmits *BoolPolicy `xml:"forgedTransmits,omitempty"` } func init() { t["DVSSecurityPolicy"] = reflect.TypeOf((*DVSSecurityPolicy)(nil)).Elem() } type DVSSelection struct { SelectionSet DvsUuid string `xml:"dvsUuid"` } func init() { t["DVSSelection"] = reflect.TypeOf((*DVSSelection)(nil)).Elem() } type DVSSummary struct { DynamicData Name string `xml:"name"` Uuid string `xml:"uuid"` NumPorts int32 `xml:"numPorts"` ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"` HostMember []ManagedObjectReference `xml:"hostMember,omitempty"` Vm []ManagedObjectReference `xml:"vm,omitempty"` Host []ManagedObjectReference `xml:"host,omitempty"` PortgroupName []string `xml:"portgroupName,omitempty"` Description string `xml:"description,omitempty"` Contact *DVSContactInfo `xml:"contact,omitempty"` NumHosts int32 `xml:"numHosts,omitempty"` } func init() { t["DVSSummary"] = reflect.TypeOf((*DVSSummary)(nil)).Elem() } type DVSTrafficShapingPolicy struct { InheritablePolicy Enabled *BoolPolicy `xml:"enabled,omitempty"` AverageBandwidth *LongPolicy `xml:"averageBandwidth,omitempty"` PeakBandwidth *LongPolicy `xml:"peakBandwidth,omitempty"` BurstSize *LongPolicy `xml:"burstSize,omitempty"` } func init() { t["DVSTrafficShapingPolicy"] = reflect.TypeOf((*DVSTrafficShapingPolicy)(nil)).Elem() } type DVSUplinkPortPolicy struct { DynamicData } func init() { t["DVSUplinkPortPolicy"] = reflect.TypeOf((*DVSUplinkPortPolicy)(nil)).Elem() } type DVSVendorSpecificConfig struct { InheritablePolicy KeyValue []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"keyValue,omitempty"` } func init() { t["DVSVendorSpecificConfig"] = reflect.TypeOf((*DVSVendorSpecificConfig)(nil)).Elem() } type DVSVmVnicNetworkResourcePool struct { DynamicData Key string `xml:"key"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` ConfigVersion string `xml:"configVersion"` AllocationInfo *DvsVmVnicResourceAllocation `xml:"allocationInfo,omitempty"` } func init() { t["DVSVmVnicNetworkResourcePool"] = reflect.TypeOf((*DVSVmVnicNetworkResourcePool)(nil)).Elem() } type DailyTaskScheduler struct { HourlyTaskScheduler Hour int32 `xml:"hour"` } func init() { t["DailyTaskScheduler"] = reflect.TypeOf((*DailyTaskScheduler)(nil)).Elem() } type DasAdmissionControlDisabledEvent struct { ClusterEvent } func init() { t["DasAdmissionControlDisabledEvent"] = reflect.TypeOf((*DasAdmissionControlDisabledEvent)(nil)).Elem() } type DasAdmissionControlEnabledEvent struct { ClusterEvent } func init() { t["DasAdmissionControlEnabledEvent"] = reflect.TypeOf((*DasAdmissionControlEnabledEvent)(nil)).Elem() } type DasAgentFoundEvent struct { ClusterEvent } func init() { t["DasAgentFoundEvent"] = reflect.TypeOf((*DasAgentFoundEvent)(nil)).Elem() } type DasAgentUnavailableEvent struct { ClusterEvent } func init() { t["DasAgentUnavailableEvent"] = reflect.TypeOf((*DasAgentUnavailableEvent)(nil)).Elem() } type DasClusterIsolatedEvent struct { ClusterEvent } func init() { t["DasClusterIsolatedEvent"] = reflect.TypeOf((*DasClusterIsolatedEvent)(nil)).Elem() } type DasConfigFault struct { VimFault Reason string `xml:"reason,omitempty"` Output string `xml:"output,omitempty"` Event []BaseEvent `xml:"event,omitempty,typeattr"` } func init() { t["DasConfigFault"] = reflect.TypeOf((*DasConfigFault)(nil)).Elem() } type DasConfigFaultFault DasConfigFault func init() { t["DasConfigFaultFault"] = reflect.TypeOf((*DasConfigFaultFault)(nil)).Elem() } type DasDisabledEvent struct { ClusterEvent } func init() { t["DasDisabledEvent"] = reflect.TypeOf((*DasDisabledEvent)(nil)).Elem() } type DasEnabledEvent struct { ClusterEvent } func init() { t["DasEnabledEvent"] = reflect.TypeOf((*DasEnabledEvent)(nil)).Elem() } type DasHeartbeatDatastoreInfo struct { DynamicData Datastore ManagedObjectReference `xml:"datastore"` Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["DasHeartbeatDatastoreInfo"] = reflect.TypeOf((*DasHeartbeatDatastoreInfo)(nil)).Elem() } type DasHostFailedEvent struct { ClusterEvent FailedHost HostEventArgument `xml:"failedHost"` } func init() { t["DasHostFailedEvent"] = reflect.TypeOf((*DasHostFailedEvent)(nil)).Elem() } type DasHostIsolatedEvent struct { ClusterEvent IsolatedHost HostEventArgument `xml:"isolatedHost"` } func init() { t["DasHostIsolatedEvent"] = reflect.TypeOf((*DasHostIsolatedEvent)(nil)).Elem() } type DatabaseError struct { RuntimeFault } func init() { t["DatabaseError"] = reflect.TypeOf((*DatabaseError)(nil)).Elem() } type DatabaseErrorFault DatabaseError func init() { t["DatabaseErrorFault"] = reflect.TypeOf((*DatabaseErrorFault)(nil)).Elem() } type DatabaseSizeEstimate struct { DynamicData Size int64 `xml:"size"` } func init() { t["DatabaseSizeEstimate"] = reflect.TypeOf((*DatabaseSizeEstimate)(nil)).Elem() } type DatabaseSizeParam struct { DynamicData InventoryDesc InventoryDescription `xml:"inventoryDesc"` PerfStatsDesc *PerformanceStatisticsDescription `xml:"perfStatsDesc,omitempty"` } func init() { t["DatabaseSizeParam"] = reflect.TypeOf((*DatabaseSizeParam)(nil)).Elem() } type DatacenterConfigInfo struct { DynamicData DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` } func init() { t["DatacenterConfigInfo"] = reflect.TypeOf((*DatacenterConfigInfo)(nil)).Elem() } type DatacenterConfigSpec struct { DynamicData DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` } func init() { t["DatacenterConfigSpec"] = reflect.TypeOf((*DatacenterConfigSpec)(nil)).Elem() } type DatacenterCreatedEvent struct { DatacenterEvent Parent FolderEventArgument `xml:"parent"` } func init() { t["DatacenterCreatedEvent"] = reflect.TypeOf((*DatacenterCreatedEvent)(nil)).Elem() } type DatacenterEvent struct { Event } func init() { t["DatacenterEvent"] = reflect.TypeOf((*DatacenterEvent)(nil)).Elem() } type DatacenterEventArgument struct { EntityEventArgument Datacenter ManagedObjectReference `xml:"datacenter"` } func init() { t["DatacenterEventArgument"] = reflect.TypeOf((*DatacenterEventArgument)(nil)).Elem() } type DatacenterMismatch struct { MigrationFault InvalidArgument []DatacenterMismatchArgument `xml:"invalidArgument"` ExpectedDatacenter ManagedObjectReference `xml:"expectedDatacenter"` } func init() { t["DatacenterMismatch"] = reflect.TypeOf((*DatacenterMismatch)(nil)).Elem() } type DatacenterMismatchArgument struct { DynamicData Entity ManagedObjectReference `xml:"entity"` InputDatacenter *ManagedObjectReference `xml:"inputDatacenter,omitempty"` } func init() { t["DatacenterMismatchArgument"] = reflect.TypeOf((*DatacenterMismatchArgument)(nil)).Elem() } type DatacenterMismatchFault DatacenterMismatch func init() { t["DatacenterMismatchFault"] = reflect.TypeOf((*DatacenterMismatchFault)(nil)).Elem() } type DatacenterRenamedEvent struct { DatacenterEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["DatacenterRenamedEvent"] = reflect.TypeOf((*DatacenterRenamedEvent)(nil)).Elem() } type DatastoreCapability struct { DynamicData DirectoryHierarchySupported bool `xml:"directoryHierarchySupported"` RawDiskMappingsSupported bool `xml:"rawDiskMappingsSupported"` PerFileThinProvisioningSupported bool `xml:"perFileThinProvisioningSupported"` StorageIORMSupported *bool `xml:"storageIORMSupported"` NativeSnapshotSupported *bool `xml:"nativeSnapshotSupported"` TopLevelDirectoryCreateSupported *bool `xml:"topLevelDirectoryCreateSupported"` SeSparseSupported *bool `xml:"seSparseSupported"` VmfsSparseSupported *bool `xml:"vmfsSparseSupported"` VsanSparseSupported *bool `xml:"vsanSparseSupported"` UpitSupported *bool `xml:"upitSupported"` } func init() { t["DatastoreCapability"] = reflect.TypeOf((*DatastoreCapability)(nil)).Elem() } type DatastoreCapacityIncreasedEvent struct { DatastoreEvent OldCapacity int64 `xml:"oldCapacity"` NewCapacity int64 `xml:"newCapacity"` } func init() { t["DatastoreCapacityIncreasedEvent"] = reflect.TypeOf((*DatastoreCapacityIncreasedEvent)(nil)).Elem() } type DatastoreDestroyedEvent struct { DatastoreEvent } func init() { t["DatastoreDestroyedEvent"] = reflect.TypeOf((*DatastoreDestroyedEvent)(nil)).Elem() } type DatastoreDiscoveredEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` } func init() { t["DatastoreDiscoveredEvent"] = reflect.TypeOf((*DatastoreDiscoveredEvent)(nil)).Elem() } type DatastoreDuplicatedEvent struct { DatastoreEvent } func init() { t["DatastoreDuplicatedEvent"] = reflect.TypeOf((*DatastoreDuplicatedEvent)(nil)).Elem() } type DatastoreEnterMaintenanceMode DatastoreEnterMaintenanceModeRequestType func init() { t["DatastoreEnterMaintenanceMode"] = reflect.TypeOf((*DatastoreEnterMaintenanceMode)(nil)).Elem() } type DatastoreEnterMaintenanceModeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DatastoreEnterMaintenanceModeRequestType"] = reflect.TypeOf((*DatastoreEnterMaintenanceModeRequestType)(nil)).Elem() } type DatastoreEnterMaintenanceModeResponse struct { Returnval StoragePlacementResult `xml:"returnval"` } type DatastoreEvent struct { Event Datastore *DatastoreEventArgument `xml:"datastore,omitempty"` } func init() { t["DatastoreEvent"] = reflect.TypeOf((*DatastoreEvent)(nil)).Elem() } type DatastoreEventArgument struct { EntityEventArgument Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["DatastoreEventArgument"] = reflect.TypeOf((*DatastoreEventArgument)(nil)).Elem() } type DatastoreExitMaintenanceModeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DatastoreExitMaintenanceModeRequestType"] = reflect.TypeOf((*DatastoreExitMaintenanceModeRequestType)(nil)).Elem() } type DatastoreExitMaintenanceMode_Task DatastoreExitMaintenanceModeRequestType func init() { t["DatastoreExitMaintenanceMode_Task"] = reflect.TypeOf((*DatastoreExitMaintenanceMode_Task)(nil)).Elem() } type DatastoreExitMaintenanceMode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DatastoreFileCopiedEvent struct { DatastoreFileEvent SourceDatastore DatastoreEventArgument `xml:"sourceDatastore"` SourceFile string `xml:"sourceFile"` } func init() { t["DatastoreFileCopiedEvent"] = reflect.TypeOf((*DatastoreFileCopiedEvent)(nil)).Elem() } type DatastoreFileDeletedEvent struct { DatastoreFileEvent } func init() { t["DatastoreFileDeletedEvent"] = reflect.TypeOf((*DatastoreFileDeletedEvent)(nil)).Elem() } type DatastoreFileEvent struct { DatastoreEvent TargetFile string `xml:"targetFile"` SourceOfOperation string `xml:"sourceOfOperation,omitempty"` Succeeded *bool `xml:"succeeded"` } func init() { t["DatastoreFileEvent"] = reflect.TypeOf((*DatastoreFileEvent)(nil)).Elem() } type DatastoreFileMovedEvent struct { DatastoreFileEvent SourceDatastore DatastoreEventArgument `xml:"sourceDatastore"` SourceFile string `xml:"sourceFile"` } func init() { t["DatastoreFileMovedEvent"] = reflect.TypeOf((*DatastoreFileMovedEvent)(nil)).Elem() } type DatastoreHostMount struct { DynamicData Key ManagedObjectReference `xml:"key"` MountInfo HostMountInfo `xml:"mountInfo"` } func init() { t["DatastoreHostMount"] = reflect.TypeOf((*DatastoreHostMount)(nil)).Elem() } type DatastoreIORMReconfiguredEvent struct { DatastoreEvent } func init() { t["DatastoreIORMReconfiguredEvent"] = reflect.TypeOf((*DatastoreIORMReconfiguredEvent)(nil)).Elem() } type DatastoreInfo struct { DynamicData Name string `xml:"name"` Url string `xml:"url"` FreeSpace int64 `xml:"freeSpace"` MaxFileSize int64 `xml:"maxFileSize"` MaxVirtualDiskCapacity int64 `xml:"maxVirtualDiskCapacity,omitempty"` MaxMemoryFileSize int64 `xml:"maxMemoryFileSize,omitempty"` Timestamp *time.Time `xml:"timestamp"` ContainerId string `xml:"containerId,omitempty"` } func init() { t["DatastoreInfo"] = reflect.TypeOf((*DatastoreInfo)(nil)).Elem() } type DatastoreMountPathDatastorePair struct { DynamicData OldMountPath string `xml:"oldMountPath"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["DatastoreMountPathDatastorePair"] = reflect.TypeOf((*DatastoreMountPathDatastorePair)(nil)).Elem() } type DatastoreNotWritableOnHost struct { InvalidDatastore Host ManagedObjectReference `xml:"host"` } func init() { t["DatastoreNotWritableOnHost"] = reflect.TypeOf((*DatastoreNotWritableOnHost)(nil)).Elem() } type DatastoreNotWritableOnHostFault BaseDatastoreNotWritableOnHost func init() { t["DatastoreNotWritableOnHostFault"] = reflect.TypeOf((*DatastoreNotWritableOnHostFault)(nil)).Elem() } type DatastoreOption struct { DynamicData UnsupportedVolumes []VirtualMachineDatastoreVolumeOption `xml:"unsupportedVolumes,omitempty"` } func init() { t["DatastoreOption"] = reflect.TypeOf((*DatastoreOption)(nil)).Elem() } type DatastorePrincipalConfigured struct { HostEvent DatastorePrincipal string `xml:"datastorePrincipal"` } func init() { t["DatastorePrincipalConfigured"] = reflect.TypeOf((*DatastorePrincipalConfigured)(nil)).Elem() } type DatastoreRemovedOnHostEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` } func init() { t["DatastoreRemovedOnHostEvent"] = reflect.TypeOf((*DatastoreRemovedOnHostEvent)(nil)).Elem() } type DatastoreRenamedEvent struct { DatastoreEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["DatastoreRenamedEvent"] = reflect.TypeOf((*DatastoreRenamedEvent)(nil)).Elem() } type DatastoreRenamedOnHostEvent struct { HostEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["DatastoreRenamedOnHostEvent"] = reflect.TypeOf((*DatastoreRenamedOnHostEvent)(nil)).Elem() } type DatastoreSummary struct { DynamicData Datastore *ManagedObjectReference `xml:"datastore,omitempty"` Name string `xml:"name"` Url string `xml:"url"` Capacity int64 `xml:"capacity"` FreeSpace int64 `xml:"freeSpace"` Uncommitted int64 `xml:"uncommitted,omitempty"` Accessible bool `xml:"accessible"` MultipleHostAccess *bool `xml:"multipleHostAccess"` Type string `xml:"type"` MaintenanceMode string `xml:"maintenanceMode,omitempty"` } func init() { t["DatastoreSummary"] = reflect.TypeOf((*DatastoreSummary)(nil)).Elem() } type DatastoreVVolContainerFailoverPair struct { DynamicData SrcContainer string `xml:"srcContainer,omitempty"` TgtContainer string `xml:"tgtContainer"` VvolMapping []KeyValue `xml:"vvolMapping,omitempty"` } func init() { t["DatastoreVVolContainerFailoverPair"] = reflect.TypeOf((*DatastoreVVolContainerFailoverPair)(nil)).Elem() } type DateTimeProfile struct { ApplyProfile } func init() { t["DateTimeProfile"] = reflect.TypeOf((*DateTimeProfile)(nil)).Elem() } type DecodeLicense DecodeLicenseRequestType func init() { t["DecodeLicense"] = reflect.TypeOf((*DecodeLicense)(nil)).Elem() } type DecodeLicenseRequestType struct { This ManagedObjectReference `xml:"_this"` LicenseKey string `xml:"licenseKey"` } func init() { t["DecodeLicenseRequestType"] = reflect.TypeOf((*DecodeLicenseRequestType)(nil)).Elem() } type DecodeLicenseResponse struct { Returnval LicenseManagerLicenseInfo `xml:"returnval"` } type DefragmentAllDisks DefragmentAllDisksRequestType func init() { t["DefragmentAllDisks"] = reflect.TypeOf((*DefragmentAllDisks)(nil)).Elem() } type DefragmentAllDisksRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DefragmentAllDisksRequestType"] = reflect.TypeOf((*DefragmentAllDisksRequestType)(nil)).Elem() } type DefragmentAllDisksResponse struct { } type DefragmentVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["DefragmentVirtualDiskRequestType"] = reflect.TypeOf((*DefragmentVirtualDiskRequestType)(nil)).Elem() } type DefragmentVirtualDisk_Task DefragmentVirtualDiskRequestType func init() { t["DefragmentVirtualDisk_Task"] = reflect.TypeOf((*DefragmentVirtualDisk_Task)(nil)).Elem() } type DefragmentVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DeleteCustomizationSpec DeleteCustomizationSpecRequestType func init() { t["DeleteCustomizationSpec"] = reflect.TypeOf((*DeleteCustomizationSpec)(nil)).Elem() } type DeleteCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["DeleteCustomizationSpecRequestType"] = reflect.TypeOf((*DeleteCustomizationSpecRequestType)(nil)).Elem() } type DeleteCustomizationSpecResponse struct { } type DeleteDatastoreFileRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["DeleteDatastoreFileRequestType"] = reflect.TypeOf((*DeleteDatastoreFileRequestType)(nil)).Elem() } type DeleteDatastoreFile_Task DeleteDatastoreFileRequestType func init() { t["DeleteDatastoreFile_Task"] = reflect.TypeOf((*DeleteDatastoreFile_Task)(nil)).Elem() } type DeleteDatastoreFile_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DeleteDirectory DeleteDirectoryRequestType func init() { t["DeleteDirectory"] = reflect.TypeOf((*DeleteDirectory)(nil)).Elem() } type DeleteDirectoryInGuest DeleteDirectoryInGuestRequestType func init() { t["DeleteDirectoryInGuest"] = reflect.TypeOf((*DeleteDirectoryInGuest)(nil)).Elem() } type DeleteDirectoryInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` DirectoryPath string `xml:"directoryPath"` Recursive bool `xml:"recursive"` } func init() { t["DeleteDirectoryInGuestRequestType"] = reflect.TypeOf((*DeleteDirectoryInGuestRequestType)(nil)).Elem() } type DeleteDirectoryInGuestResponse struct { } type DeleteDirectoryRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` DatastorePath string `xml:"datastorePath"` } func init() { t["DeleteDirectoryRequestType"] = reflect.TypeOf((*DeleteDirectoryRequestType)(nil)).Elem() } type DeleteDirectoryResponse struct { } type DeleteFile DeleteFileRequestType func init() { t["DeleteFile"] = reflect.TypeOf((*DeleteFile)(nil)).Elem() } type DeleteFileInGuest DeleteFileInGuestRequestType func init() { t["DeleteFileInGuest"] = reflect.TypeOf((*DeleteFileInGuest)(nil)).Elem() } type DeleteFileInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` FilePath string `xml:"filePath"` } func init() { t["DeleteFileInGuestRequestType"] = reflect.TypeOf((*DeleteFileInGuestRequestType)(nil)).Elem() } type DeleteFileInGuestResponse struct { } type DeleteFileRequestType struct { This ManagedObjectReference `xml:"_this"` DatastorePath string `xml:"datastorePath"` } func init() { t["DeleteFileRequestType"] = reflect.TypeOf((*DeleteFileRequestType)(nil)).Elem() } type DeleteFileResponse struct { } type DeleteHostSpecification DeleteHostSpecificationRequestType func init() { t["DeleteHostSpecification"] = reflect.TypeOf((*DeleteHostSpecification)(nil)).Elem() } type DeleteHostSpecificationRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` } func init() { t["DeleteHostSpecificationRequestType"] = reflect.TypeOf((*DeleteHostSpecificationRequestType)(nil)).Elem() } type DeleteHostSpecificationResponse struct { } type DeleteHostSubSpecification DeleteHostSubSpecificationRequestType func init() { t["DeleteHostSubSpecification"] = reflect.TypeOf((*DeleteHostSubSpecification)(nil)).Elem() } type DeleteHostSubSpecificationRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` SubSpecName string `xml:"subSpecName"` } func init() { t["DeleteHostSubSpecificationRequestType"] = reflect.TypeOf((*DeleteHostSubSpecificationRequestType)(nil)).Elem() } type DeleteHostSubSpecificationResponse struct { } type DeleteRegistryKeyInGuest DeleteRegistryKeyInGuestRequestType func init() { t["DeleteRegistryKeyInGuest"] = reflect.TypeOf((*DeleteRegistryKeyInGuest)(nil)).Elem() } type DeleteRegistryKeyInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` KeyName GuestRegKeyNameSpec `xml:"keyName"` Recursive bool `xml:"recursive"` } func init() { t["DeleteRegistryKeyInGuestRequestType"] = reflect.TypeOf((*DeleteRegistryKeyInGuestRequestType)(nil)).Elem() } type DeleteRegistryKeyInGuestResponse struct { } type DeleteRegistryValueInGuest DeleteRegistryValueInGuestRequestType func init() { t["DeleteRegistryValueInGuest"] = reflect.TypeOf((*DeleteRegistryValueInGuest)(nil)).Elem() } type DeleteRegistryValueInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` ValueName GuestRegValueNameSpec `xml:"valueName"` } func init() { t["DeleteRegistryValueInGuestRequestType"] = reflect.TypeOf((*DeleteRegistryValueInGuestRequestType)(nil)).Elem() } type DeleteRegistryValueInGuestResponse struct { } type DeleteScsiLunState DeleteScsiLunStateRequestType func init() { t["DeleteScsiLunState"] = reflect.TypeOf((*DeleteScsiLunState)(nil)).Elem() } type DeleteScsiLunStateRequestType struct { This ManagedObjectReference `xml:"_this"` LunCanonicalName string `xml:"lunCanonicalName"` } func init() { t["DeleteScsiLunStateRequestType"] = reflect.TypeOf((*DeleteScsiLunStateRequestType)(nil)).Elem() } type DeleteScsiLunStateResponse struct { } type DeleteVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["DeleteVStorageObjectRequestType"] = reflect.TypeOf((*DeleteVStorageObjectRequestType)(nil)).Elem() } type DeleteVStorageObject_Task DeleteVStorageObjectRequestType func init() { t["DeleteVStorageObject_Task"] = reflect.TypeOf((*DeleteVStorageObject_Task)(nil)).Elem() } type DeleteVStorageObject_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DeleteVffsVolumeState DeleteVffsVolumeStateRequestType func init() { t["DeleteVffsVolumeState"] = reflect.TypeOf((*DeleteVffsVolumeState)(nil)).Elem() } type DeleteVffsVolumeStateRequestType struct { This ManagedObjectReference `xml:"_this"` VffsUuid string `xml:"vffsUuid"` } func init() { t["DeleteVffsVolumeStateRequestType"] = reflect.TypeOf((*DeleteVffsVolumeStateRequestType)(nil)).Elem() } type DeleteVffsVolumeStateResponse struct { } type DeleteVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["DeleteVirtualDiskRequestType"] = reflect.TypeOf((*DeleteVirtualDiskRequestType)(nil)).Elem() } type DeleteVirtualDisk_Task DeleteVirtualDiskRequestType func init() { t["DeleteVirtualDisk_Task"] = reflect.TypeOf((*DeleteVirtualDisk_Task)(nil)).Elem() } type DeleteVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DeleteVmfsVolumeState DeleteVmfsVolumeStateRequestType func init() { t["DeleteVmfsVolumeState"] = reflect.TypeOf((*DeleteVmfsVolumeState)(nil)).Elem() } type DeleteVmfsVolumeStateRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid string `xml:"vmfsUuid"` } func init() { t["DeleteVmfsVolumeStateRequestType"] = reflect.TypeOf((*DeleteVmfsVolumeStateRequestType)(nil)).Elem() } type DeleteVmfsVolumeStateResponse struct { } type DeleteVsanObjects DeleteVsanObjectsRequestType func init() { t["DeleteVsanObjects"] = reflect.TypeOf((*DeleteVsanObjects)(nil)).Elem() } type DeleteVsanObjectsRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids"` Force *bool `xml:"force"` } func init() { t["DeleteVsanObjectsRequestType"] = reflect.TypeOf((*DeleteVsanObjectsRequestType)(nil)).Elem() } type DeleteVsanObjectsResponse struct { Returnval []HostVsanInternalSystemDeleteVsanObjectsResult `xml:"returnval"` } type DeltaDiskFormatNotSupported struct { VmConfigFault Datastore []ManagedObjectReference `xml:"datastore,omitempty"` DeltaDiskFormat string `xml:"deltaDiskFormat"` } func init() { t["DeltaDiskFormatNotSupported"] = reflect.TypeOf((*DeltaDiskFormatNotSupported)(nil)).Elem() } type DeltaDiskFormatNotSupportedFault DeltaDiskFormatNotSupported func init() { t["DeltaDiskFormatNotSupportedFault"] = reflect.TypeOf((*DeltaDiskFormatNotSupportedFault)(nil)).Elem() } type Description struct { DynamicData Label string `xml:"label"` Summary string `xml:"summary"` } func init() { t["Description"] = reflect.TypeOf((*Description)(nil)).Elem() } type DeselectVnic DeselectVnicRequestType func init() { t["DeselectVnic"] = reflect.TypeOf((*DeselectVnic)(nil)).Elem() } type DeselectVnicForNicType DeselectVnicForNicTypeRequestType func init() { t["DeselectVnicForNicType"] = reflect.TypeOf((*DeselectVnicForNicType)(nil)).Elem() } type DeselectVnicForNicTypeRequestType struct { This ManagedObjectReference `xml:"_this"` NicType string `xml:"nicType"` Device string `xml:"device"` } func init() { t["DeselectVnicForNicTypeRequestType"] = reflect.TypeOf((*DeselectVnicForNicTypeRequestType)(nil)).Elem() } type DeselectVnicForNicTypeResponse struct { } type DeselectVnicRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DeselectVnicRequestType"] = reflect.TypeOf((*DeselectVnicRequestType)(nil)).Elem() } type DeselectVnicResponse struct { } type DestinationSwitchFull struct { CannotAccessNetwork } func init() { t["DestinationSwitchFull"] = reflect.TypeOf((*DestinationSwitchFull)(nil)).Elem() } type DestinationSwitchFullFault DestinationSwitchFull func init() { t["DestinationSwitchFullFault"] = reflect.TypeOf((*DestinationSwitchFullFault)(nil)).Elem() } type DestinationVsanDisabled struct { CannotMoveVsanEnabledHost DestinationCluster string `xml:"destinationCluster"` } func init() { t["DestinationVsanDisabled"] = reflect.TypeOf((*DestinationVsanDisabled)(nil)).Elem() } type DestinationVsanDisabledFault DestinationVsanDisabled func init() { t["DestinationVsanDisabledFault"] = reflect.TypeOf((*DestinationVsanDisabledFault)(nil)).Elem() } type DestroyChildren DestroyChildrenRequestType func init() { t["DestroyChildren"] = reflect.TypeOf((*DestroyChildren)(nil)).Elem() } type DestroyChildrenRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyChildrenRequestType"] = reflect.TypeOf((*DestroyChildrenRequestType)(nil)).Elem() } type DestroyChildrenResponse struct { } type DestroyCollector DestroyCollectorRequestType func init() { t["DestroyCollector"] = reflect.TypeOf((*DestroyCollector)(nil)).Elem() } type DestroyCollectorRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyCollectorRequestType"] = reflect.TypeOf((*DestroyCollectorRequestType)(nil)).Elem() } type DestroyCollectorResponse struct { } type DestroyDatastore DestroyDatastoreRequestType func init() { t["DestroyDatastore"] = reflect.TypeOf((*DestroyDatastore)(nil)).Elem() } type DestroyDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyDatastoreRequestType"] = reflect.TypeOf((*DestroyDatastoreRequestType)(nil)).Elem() } type DestroyDatastoreResponse struct { } type DestroyIpPool DestroyIpPoolRequestType func init() { t["DestroyIpPool"] = reflect.TypeOf((*DestroyIpPool)(nil)).Elem() } type DestroyIpPoolRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` Id int32 `xml:"id"` Force bool `xml:"force"` } func init() { t["DestroyIpPoolRequestType"] = reflect.TypeOf((*DestroyIpPoolRequestType)(nil)).Elem() } type DestroyIpPoolResponse struct { } type DestroyNetwork DestroyNetworkRequestType func init() { t["DestroyNetwork"] = reflect.TypeOf((*DestroyNetwork)(nil)).Elem() } type DestroyNetworkRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyNetworkRequestType"] = reflect.TypeOf((*DestroyNetworkRequestType)(nil)).Elem() } type DestroyNetworkResponse struct { } type DestroyProfile DestroyProfileRequestType func init() { t["DestroyProfile"] = reflect.TypeOf((*DestroyProfile)(nil)).Elem() } type DestroyProfileRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyProfileRequestType"] = reflect.TypeOf((*DestroyProfileRequestType)(nil)).Elem() } type DestroyProfileResponse struct { } type DestroyPropertyCollector DestroyPropertyCollectorRequestType func init() { t["DestroyPropertyCollector"] = reflect.TypeOf((*DestroyPropertyCollector)(nil)).Elem() } type DestroyPropertyCollectorRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyPropertyCollectorRequestType"] = reflect.TypeOf((*DestroyPropertyCollectorRequestType)(nil)).Elem() } type DestroyPropertyCollectorResponse struct { } type DestroyPropertyFilter DestroyPropertyFilterRequestType func init() { t["DestroyPropertyFilter"] = reflect.TypeOf((*DestroyPropertyFilter)(nil)).Elem() } type DestroyPropertyFilterRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyPropertyFilterRequestType"] = reflect.TypeOf((*DestroyPropertyFilterRequestType)(nil)).Elem() } type DestroyPropertyFilterResponse struct { } type DestroyRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyRequestType"] = reflect.TypeOf((*DestroyRequestType)(nil)).Elem() } type DestroyVffs DestroyVffsRequestType func init() { t["DestroyVffs"] = reflect.TypeOf((*DestroyVffs)(nil)).Elem() } type DestroyVffsRequestType struct { This ManagedObjectReference `xml:"_this"` VffsPath string `xml:"vffsPath"` } func init() { t["DestroyVffsRequestType"] = reflect.TypeOf((*DestroyVffsRequestType)(nil)).Elem() } type DestroyVffsResponse struct { } type DestroyView DestroyViewRequestType func init() { t["DestroyView"] = reflect.TypeOf((*DestroyView)(nil)).Elem() } type DestroyViewRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DestroyViewRequestType"] = reflect.TypeOf((*DestroyViewRequestType)(nil)).Elem() } type DestroyViewResponse struct { } type Destroy_Task DestroyRequestType func init() { t["Destroy_Task"] = reflect.TypeOf((*Destroy_Task)(nil)).Elem() } type Destroy_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DetachDiskRequestType struct { This ManagedObjectReference `xml:"_this"` DiskId ID `xml:"diskId"` } func init() { t["DetachDiskRequestType"] = reflect.TypeOf((*DetachDiskRequestType)(nil)).Elem() } type DetachDisk_Task DetachDiskRequestType func init() { t["DetachDisk_Task"] = reflect.TypeOf((*DetachDisk_Task)(nil)).Elem() } type DetachDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DetachScsiLun DetachScsiLunRequestType func init() { t["DetachScsiLun"] = reflect.TypeOf((*DetachScsiLun)(nil)).Elem() } type DetachScsiLunExRequestType struct { This ManagedObjectReference `xml:"_this"` LunUuid []string `xml:"lunUuid"` } func init() { t["DetachScsiLunExRequestType"] = reflect.TypeOf((*DetachScsiLunExRequestType)(nil)).Elem() } type DetachScsiLunEx_Task DetachScsiLunExRequestType func init() { t["DetachScsiLunEx_Task"] = reflect.TypeOf((*DetachScsiLunEx_Task)(nil)).Elem() } type DetachScsiLunEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DetachScsiLunRequestType struct { This ManagedObjectReference `xml:"_this"` LunUuid string `xml:"lunUuid"` } func init() { t["DetachScsiLunRequestType"] = reflect.TypeOf((*DetachScsiLunRequestType)(nil)).Elem() } type DetachScsiLunResponse struct { } type DetachTagFromVStorageObject DetachTagFromVStorageObjectRequestType func init() { t["DetachTagFromVStorageObject"] = reflect.TypeOf((*DetachTagFromVStorageObject)(nil)).Elem() } type DetachTagFromVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Category string `xml:"category"` Tag string `xml:"tag"` } func init() { t["DetachTagFromVStorageObjectRequestType"] = reflect.TypeOf((*DetachTagFromVStorageObjectRequestType)(nil)).Elem() } type DetachTagFromVStorageObjectResponse struct { } type DeviceBackedVirtualDiskSpec struct { VirtualDiskSpec Device string `xml:"device"` } func init() { t["DeviceBackedVirtualDiskSpec"] = reflect.TypeOf((*DeviceBackedVirtualDiskSpec)(nil)).Elem() } type DeviceBackingNotSupported struct { DeviceNotSupported Backing string `xml:"backing"` } func init() { t["DeviceBackingNotSupported"] = reflect.TypeOf((*DeviceBackingNotSupported)(nil)).Elem() } type DeviceBackingNotSupportedFault BaseDeviceBackingNotSupported func init() { t["DeviceBackingNotSupportedFault"] = reflect.TypeOf((*DeviceBackingNotSupportedFault)(nil)).Elem() } type DeviceControllerNotSupported struct { DeviceNotSupported Controller string `xml:"controller"` } func init() { t["DeviceControllerNotSupported"] = reflect.TypeOf((*DeviceControllerNotSupported)(nil)).Elem() } type DeviceControllerNotSupportedFault DeviceControllerNotSupported func init() { t["DeviceControllerNotSupportedFault"] = reflect.TypeOf((*DeviceControllerNotSupportedFault)(nil)).Elem() } type DeviceGroupId struct { DynamicData Id string `xml:"id"` } func init() { t["DeviceGroupId"] = reflect.TypeOf((*DeviceGroupId)(nil)).Elem() } type DeviceHotPlugNotSupported struct { InvalidDeviceSpec } func init() { t["DeviceHotPlugNotSupported"] = reflect.TypeOf((*DeviceHotPlugNotSupported)(nil)).Elem() } type DeviceHotPlugNotSupportedFault DeviceHotPlugNotSupported func init() { t["DeviceHotPlugNotSupportedFault"] = reflect.TypeOf((*DeviceHotPlugNotSupportedFault)(nil)).Elem() } type DeviceNotFound struct { InvalidDeviceSpec } func init() { t["DeviceNotFound"] = reflect.TypeOf((*DeviceNotFound)(nil)).Elem() } type DeviceNotFoundFault DeviceNotFound func init() { t["DeviceNotFoundFault"] = reflect.TypeOf((*DeviceNotFoundFault)(nil)).Elem() } type DeviceNotSupported struct { VirtualHardwareCompatibilityIssue Device string `xml:"device"` Reason string `xml:"reason,omitempty"` } func init() { t["DeviceNotSupported"] = reflect.TypeOf((*DeviceNotSupported)(nil)).Elem() } type DeviceNotSupportedFault BaseDeviceNotSupported func init() { t["DeviceNotSupportedFault"] = reflect.TypeOf((*DeviceNotSupportedFault)(nil)).Elem() } type DeviceUnsupportedForVmPlatform struct { InvalidDeviceSpec } func init() { t["DeviceUnsupportedForVmPlatform"] = reflect.TypeOf((*DeviceUnsupportedForVmPlatform)(nil)).Elem() } type DeviceUnsupportedForVmPlatformFault DeviceUnsupportedForVmPlatform func init() { t["DeviceUnsupportedForVmPlatformFault"] = reflect.TypeOf((*DeviceUnsupportedForVmPlatformFault)(nil)).Elem() } type DeviceUnsupportedForVmVersion struct { InvalidDeviceSpec CurrentVersion string `xml:"currentVersion"` ExpectedVersion string `xml:"expectedVersion"` } func init() { t["DeviceUnsupportedForVmVersion"] = reflect.TypeOf((*DeviceUnsupportedForVmVersion)(nil)).Elem() } type DeviceUnsupportedForVmVersionFault DeviceUnsupportedForVmVersion func init() { t["DeviceUnsupportedForVmVersionFault"] = reflect.TypeOf((*DeviceUnsupportedForVmVersionFault)(nil)).Elem() } type DiagnosticManagerBundleInfo struct { DynamicData System *ManagedObjectReference `xml:"system,omitempty"` Url string `xml:"url"` } func init() { t["DiagnosticManagerBundleInfo"] = reflect.TypeOf((*DiagnosticManagerBundleInfo)(nil)).Elem() } type DiagnosticManagerLogDescriptor struct { DynamicData Key string `xml:"key"` FileName string `xml:"fileName"` Creator string `xml:"creator"` Format string `xml:"format"` MimeType string `xml:"mimeType"` Info BaseDescription `xml:"info,typeattr"` } func init() { t["DiagnosticManagerLogDescriptor"] = reflect.TypeOf((*DiagnosticManagerLogDescriptor)(nil)).Elem() } type DiagnosticManagerLogHeader struct { DynamicData LineStart int32 `xml:"lineStart"` LineEnd int32 `xml:"lineEnd"` LineText []string `xml:"lineText,omitempty"` } func init() { t["DiagnosticManagerLogHeader"] = reflect.TypeOf((*DiagnosticManagerLogHeader)(nil)).Elem() } type DigestNotSupported struct { DeviceNotSupported } func init() { t["DigestNotSupported"] = reflect.TypeOf((*DigestNotSupported)(nil)).Elem() } type DigestNotSupportedFault DigestNotSupported func init() { t["DigestNotSupportedFault"] = reflect.TypeOf((*DigestNotSupportedFault)(nil)).Elem() } type DirectoryNotEmpty struct { FileFault } func init() { t["DirectoryNotEmpty"] = reflect.TypeOf((*DirectoryNotEmpty)(nil)).Elem() } type DirectoryNotEmptyFault DirectoryNotEmpty func init() { t["DirectoryNotEmptyFault"] = reflect.TypeOf((*DirectoryNotEmptyFault)(nil)).Elem() } type DisableAdminNotSupported struct { HostConfigFault } func init() { t["DisableAdminNotSupported"] = reflect.TypeOf((*DisableAdminNotSupported)(nil)).Elem() } type DisableAdminNotSupportedFault DisableAdminNotSupported func init() { t["DisableAdminNotSupportedFault"] = reflect.TypeOf((*DisableAdminNotSupportedFault)(nil)).Elem() } type DisableEvcModeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DisableEvcModeRequestType"] = reflect.TypeOf((*DisableEvcModeRequestType)(nil)).Elem() } type DisableEvcMode_Task DisableEvcModeRequestType func init() { t["DisableEvcMode_Task"] = reflect.TypeOf((*DisableEvcMode_Task)(nil)).Elem() } type DisableEvcMode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DisableFeature DisableFeatureRequestType func init() { t["DisableFeature"] = reflect.TypeOf((*DisableFeature)(nil)).Elem() } type DisableFeatureRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` FeatureKey string `xml:"featureKey"` } func init() { t["DisableFeatureRequestType"] = reflect.TypeOf((*DisableFeatureRequestType)(nil)).Elem() } type DisableFeatureResponse struct { Returnval bool `xml:"returnval"` } type DisableHyperThreading DisableHyperThreadingRequestType func init() { t["DisableHyperThreading"] = reflect.TypeOf((*DisableHyperThreading)(nil)).Elem() } type DisableHyperThreadingRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DisableHyperThreadingRequestType"] = reflect.TypeOf((*DisableHyperThreadingRequestType)(nil)).Elem() } type DisableHyperThreadingResponse struct { } type DisableMultipathPath DisableMultipathPathRequestType func init() { t["DisableMultipathPath"] = reflect.TypeOf((*DisableMultipathPath)(nil)).Elem() } type DisableMultipathPathRequestType struct { This ManagedObjectReference `xml:"_this"` PathName string `xml:"pathName"` } func init() { t["DisableMultipathPathRequestType"] = reflect.TypeOf((*DisableMultipathPathRequestType)(nil)).Elem() } type DisableMultipathPathResponse struct { } type DisableRuleset DisableRulesetRequestType func init() { t["DisableRuleset"] = reflect.TypeOf((*DisableRuleset)(nil)).Elem() } type DisableRulesetRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["DisableRulesetRequestType"] = reflect.TypeOf((*DisableRulesetRequestType)(nil)).Elem() } type DisableRulesetResponse struct { } type DisableSecondaryVMRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` } func init() { t["DisableSecondaryVMRequestType"] = reflect.TypeOf((*DisableSecondaryVMRequestType)(nil)).Elem() } type DisableSecondaryVM_Task DisableSecondaryVMRequestType func init() { t["DisableSecondaryVM_Task"] = reflect.TypeOf((*DisableSecondaryVM_Task)(nil)).Elem() } type DisableSecondaryVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DisableSmartCardAuthentication DisableSmartCardAuthenticationRequestType func init() { t["DisableSmartCardAuthentication"] = reflect.TypeOf((*DisableSmartCardAuthentication)(nil)).Elem() } type DisableSmartCardAuthenticationRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DisableSmartCardAuthenticationRequestType"] = reflect.TypeOf((*DisableSmartCardAuthenticationRequestType)(nil)).Elem() } type DisableSmartCardAuthenticationResponse struct { } type DisallowedChangeByService struct { RuntimeFault ServiceName string `xml:"serviceName"` DisallowedChange string `xml:"disallowedChange,omitempty"` } func init() { t["DisallowedChangeByService"] = reflect.TypeOf((*DisallowedChangeByService)(nil)).Elem() } type DisallowedChangeByServiceFault DisallowedChangeByService func init() { t["DisallowedChangeByServiceFault"] = reflect.TypeOf((*DisallowedChangeByServiceFault)(nil)).Elem() } type DisallowedDiskModeChange struct { InvalidDeviceSpec } func init() { t["DisallowedDiskModeChange"] = reflect.TypeOf((*DisallowedDiskModeChange)(nil)).Elem() } type DisallowedDiskModeChangeFault DisallowedDiskModeChange func init() { t["DisallowedDiskModeChangeFault"] = reflect.TypeOf((*DisallowedDiskModeChangeFault)(nil)).Elem() } type DisallowedMigrationDeviceAttached struct { MigrationFault Fault LocalizedMethodFault `xml:"fault"` } func init() { t["DisallowedMigrationDeviceAttached"] = reflect.TypeOf((*DisallowedMigrationDeviceAttached)(nil)).Elem() } type DisallowedMigrationDeviceAttachedFault DisallowedMigrationDeviceAttached func init() { t["DisallowedMigrationDeviceAttachedFault"] = reflect.TypeOf((*DisallowedMigrationDeviceAttachedFault)(nil)).Elem() } type DisallowedOperationOnFailoverHost struct { RuntimeFault Host ManagedObjectReference `xml:"host"` Hostname string `xml:"hostname"` } func init() { t["DisallowedOperationOnFailoverHost"] = reflect.TypeOf((*DisallowedOperationOnFailoverHost)(nil)).Elem() } type DisallowedOperationOnFailoverHostFault DisallowedOperationOnFailoverHost func init() { t["DisallowedOperationOnFailoverHostFault"] = reflect.TypeOf((*DisallowedOperationOnFailoverHostFault)(nil)).Elem() } type DisconnectHostRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["DisconnectHostRequestType"] = reflect.TypeOf((*DisconnectHostRequestType)(nil)).Elem() } type DisconnectHost_Task DisconnectHostRequestType func init() { t["DisconnectHost_Task"] = reflect.TypeOf((*DisconnectHost_Task)(nil)).Elem() } type DisconnectHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DisconnectedHostsBlockingEVC struct { EVCConfigFault } func init() { t["DisconnectedHostsBlockingEVC"] = reflect.TypeOf((*DisconnectedHostsBlockingEVC)(nil)).Elem() } type DisconnectedHostsBlockingEVCFault DisconnectedHostsBlockingEVC func init() { t["DisconnectedHostsBlockingEVCFault"] = reflect.TypeOf((*DisconnectedHostsBlockingEVCFault)(nil)).Elem() } type DiscoverFcoeHbas DiscoverFcoeHbasRequestType func init() { t["DiscoverFcoeHbas"] = reflect.TypeOf((*DiscoverFcoeHbas)(nil)).Elem() } type DiscoverFcoeHbasRequestType struct { This ManagedObjectReference `xml:"_this"` FcoeSpec FcoeConfigFcoeSpecification `xml:"fcoeSpec"` } func init() { t["DiscoverFcoeHbasRequestType"] = reflect.TypeOf((*DiscoverFcoeHbasRequestType)(nil)).Elem() } type DiscoverFcoeHbasResponse struct { } type DiskChangeExtent struct { DynamicData Start int64 `xml:"start"` Length int64 `xml:"length"` } func init() { t["DiskChangeExtent"] = reflect.TypeOf((*DiskChangeExtent)(nil)).Elem() } type DiskChangeInfo struct { DynamicData StartOffset int64 `xml:"startOffset"` Length int64 `xml:"length"` ChangedArea []DiskChangeExtent `xml:"changedArea,omitempty"` } func init() { t["DiskChangeInfo"] = reflect.TypeOf((*DiskChangeInfo)(nil)).Elem() } type DiskHasPartitions struct { VsanDiskFault } func init() { t["DiskHasPartitions"] = reflect.TypeOf((*DiskHasPartitions)(nil)).Elem() } type DiskHasPartitionsFault DiskHasPartitions func init() { t["DiskHasPartitionsFault"] = reflect.TypeOf((*DiskHasPartitionsFault)(nil)).Elem() } type DiskIsLastRemainingNonSSD struct { VsanDiskFault } func init() { t["DiskIsLastRemainingNonSSD"] = reflect.TypeOf((*DiskIsLastRemainingNonSSD)(nil)).Elem() } type DiskIsLastRemainingNonSSDFault DiskIsLastRemainingNonSSD func init() { t["DiskIsLastRemainingNonSSDFault"] = reflect.TypeOf((*DiskIsLastRemainingNonSSDFault)(nil)).Elem() } type DiskIsNonLocal struct { VsanDiskFault } func init() { t["DiskIsNonLocal"] = reflect.TypeOf((*DiskIsNonLocal)(nil)).Elem() } type DiskIsNonLocalFault DiskIsNonLocal func init() { t["DiskIsNonLocalFault"] = reflect.TypeOf((*DiskIsNonLocalFault)(nil)).Elem() } type DiskIsUSB struct { VsanDiskFault } func init() { t["DiskIsUSB"] = reflect.TypeOf((*DiskIsUSB)(nil)).Elem() } type DiskIsUSBFault DiskIsUSB func init() { t["DiskIsUSBFault"] = reflect.TypeOf((*DiskIsUSBFault)(nil)).Elem() } type DiskMoveTypeNotSupported struct { MigrationFault } func init() { t["DiskMoveTypeNotSupported"] = reflect.TypeOf((*DiskMoveTypeNotSupported)(nil)).Elem() } type DiskMoveTypeNotSupportedFault DiskMoveTypeNotSupported func init() { t["DiskMoveTypeNotSupportedFault"] = reflect.TypeOf((*DiskMoveTypeNotSupportedFault)(nil)).Elem() } type DiskNotSupported struct { VirtualHardwareCompatibilityIssue Disk int32 `xml:"disk"` } func init() { t["DiskNotSupported"] = reflect.TypeOf((*DiskNotSupported)(nil)).Elem() } type DiskNotSupportedFault BaseDiskNotSupported func init() { t["DiskNotSupportedFault"] = reflect.TypeOf((*DiskNotSupportedFault)(nil)).Elem() } type DiskTooSmall struct { VsanDiskFault } func init() { t["DiskTooSmall"] = reflect.TypeOf((*DiskTooSmall)(nil)).Elem() } type DiskTooSmallFault DiskTooSmall func init() { t["DiskTooSmallFault"] = reflect.TypeOf((*DiskTooSmallFault)(nil)).Elem() } type DissociateProfile DissociateProfileRequestType func init() { t["DissociateProfile"] = reflect.TypeOf((*DissociateProfile)(nil)).Elem() } type DissociateProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Entity []ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["DissociateProfileRequestType"] = reflect.TypeOf((*DissociateProfileRequestType)(nil)).Elem() } type DissociateProfileResponse struct { } type DistributedVirtualPort struct { DynamicData Key string `xml:"key"` Config DVPortConfigInfo `xml:"config"` DvsUuid string `xml:"dvsUuid"` PortgroupKey string `xml:"portgroupKey,omitempty"` ProxyHost *ManagedObjectReference `xml:"proxyHost,omitempty"` Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"` Conflict bool `xml:"conflict"` ConflictPortKey string `xml:"conflictPortKey,omitempty"` State *DVPortState `xml:"state,omitempty"` ConnectionCookie int32 `xml:"connectionCookie,omitempty"` LastStatusChange time.Time `xml:"lastStatusChange"` HostLocalPort *bool `xml:"hostLocalPort"` } func init() { t["DistributedVirtualPort"] = reflect.TypeOf((*DistributedVirtualPort)(nil)).Elem() } type DistributedVirtualPortgroupInfo struct { DynamicData SwitchName string `xml:"switchName"` SwitchUuid string `xml:"switchUuid"` PortgroupName string `xml:"portgroupName"` PortgroupKey string `xml:"portgroupKey"` PortgroupType string `xml:"portgroupType"` UplinkPortgroup bool `xml:"uplinkPortgroup"` Portgroup ManagedObjectReference `xml:"portgroup"` NetworkReservationSupported *bool `xml:"networkReservationSupported"` } func init() { t["DistributedVirtualPortgroupInfo"] = reflect.TypeOf((*DistributedVirtualPortgroupInfo)(nil)).Elem() } type DistributedVirtualSwitchHostMember struct { DynamicData RuntimeState *DistributedVirtualSwitchHostMemberRuntimeState `xml:"runtimeState,omitempty"` Config DistributedVirtualSwitchHostMemberConfigInfo `xml:"config"` ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"` UplinkPortKey []string `xml:"uplinkPortKey,omitempty"` Status string `xml:"status"` StatusDetail string `xml:"statusDetail,omitempty"` } func init() { t["DistributedVirtualSwitchHostMember"] = reflect.TypeOf((*DistributedVirtualSwitchHostMember)(nil)).Elem() } type DistributedVirtualSwitchHostMemberBacking struct { DynamicData } func init() { t["DistributedVirtualSwitchHostMemberBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberBacking)(nil)).Elem() } type DistributedVirtualSwitchHostMemberConfigInfo struct { DynamicData Host *ManagedObjectReference `xml:"host,omitempty"` MaxProxySwitchPorts int32 `xml:"maxProxySwitchPorts"` VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,typeattr"` } func init() { t["DistributedVirtualSwitchHostMemberConfigInfo"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberConfigInfo)(nil)).Elem() } type DistributedVirtualSwitchHostMemberConfigSpec struct { DynamicData Operation string `xml:"operation"` Host ManagedObjectReference `xml:"host"` Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,omitempty,typeattr"` MaxProxySwitchPorts int32 `xml:"maxProxySwitchPorts,omitempty"` VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` } func init() { t["DistributedVirtualSwitchHostMemberConfigSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberConfigSpec)(nil)).Elem() } type DistributedVirtualSwitchHostMemberPnicBacking struct { DistributedVirtualSwitchHostMemberBacking PnicSpec []DistributedVirtualSwitchHostMemberPnicSpec `xml:"pnicSpec,omitempty"` } func init() { t["DistributedVirtualSwitchHostMemberPnicBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberPnicBacking)(nil)).Elem() } type DistributedVirtualSwitchHostMemberPnicSpec struct { DynamicData PnicDevice string `xml:"pnicDevice"` UplinkPortKey string `xml:"uplinkPortKey,omitempty"` UplinkPortgroupKey string `xml:"uplinkPortgroupKey,omitempty"` ConnectionCookie int32 `xml:"connectionCookie,omitempty"` } func init() { t["DistributedVirtualSwitchHostMemberPnicSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberPnicSpec)(nil)).Elem() } type DistributedVirtualSwitchHostMemberRuntimeState struct { DynamicData CurrentMaxProxySwitchPorts int32 `xml:"currentMaxProxySwitchPorts"` } func init() { t["DistributedVirtualSwitchHostMemberRuntimeState"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberRuntimeState)(nil)).Elem() } type DistributedVirtualSwitchHostProductSpec struct { DynamicData ProductLineId string `xml:"productLineId,omitempty"` Version string `xml:"version,omitempty"` } func init() { t["DistributedVirtualSwitchHostProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostProductSpec)(nil)).Elem() } type DistributedVirtualSwitchInfo struct { DynamicData SwitchName string `xml:"switchName"` SwitchUuid string `xml:"switchUuid"` DistributedVirtualSwitch ManagedObjectReference `xml:"distributedVirtualSwitch"` NetworkReservationSupported *bool `xml:"networkReservationSupported"` } func init() { t["DistributedVirtualSwitchInfo"] = reflect.TypeOf((*DistributedVirtualSwitchInfo)(nil)).Elem() } type DistributedVirtualSwitchKeyedOpaqueBlob struct { DynamicData Key string `xml:"key"` OpaqueData string `xml:"opaqueData"` } func init() { t["DistributedVirtualSwitchKeyedOpaqueBlob"] = reflect.TypeOf((*DistributedVirtualSwitchKeyedOpaqueBlob)(nil)).Elem() } type DistributedVirtualSwitchManagerCompatibilityResult struct { DynamicData Host ManagedObjectReference `xml:"host"` Error []LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["DistributedVirtualSwitchManagerCompatibilityResult"] = reflect.TypeOf((*DistributedVirtualSwitchManagerCompatibilityResult)(nil)).Elem() } type DistributedVirtualSwitchManagerDvsProductSpec struct { DynamicData NewSwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"newSwitchProductSpec,omitempty"` DistributedVirtualSwitch *ManagedObjectReference `xml:"distributedVirtualSwitch,omitempty"` } func init() { t["DistributedVirtualSwitchManagerDvsProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerDvsProductSpec)(nil)).Elem() } type DistributedVirtualSwitchManagerHostArrayFilter struct { DistributedVirtualSwitchManagerHostDvsFilterSpec Host []ManagedObjectReference `xml:"host"` } func init() { t["DistributedVirtualSwitchManagerHostArrayFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostArrayFilter)(nil)).Elem() } type DistributedVirtualSwitchManagerHostContainer struct { DynamicData Container ManagedObjectReference `xml:"container"` Recursive bool `xml:"recursive"` } func init() { t["DistributedVirtualSwitchManagerHostContainer"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostContainer)(nil)).Elem() } type DistributedVirtualSwitchManagerHostContainerFilter struct { DistributedVirtualSwitchManagerHostDvsFilterSpec HostContainer DistributedVirtualSwitchManagerHostContainer `xml:"hostContainer"` } func init() { t["DistributedVirtualSwitchManagerHostContainerFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostContainerFilter)(nil)).Elem() } type DistributedVirtualSwitchManagerHostDvsFilterSpec struct { DynamicData Inclusive bool `xml:"inclusive"` } func init() { t["DistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem() } type DistributedVirtualSwitchManagerHostDvsMembershipFilter struct { DistributedVirtualSwitchManagerHostDvsFilterSpec DistributedVirtualSwitch ManagedObjectReference `xml:"distributedVirtualSwitch"` } func init() { t["DistributedVirtualSwitchManagerHostDvsMembershipFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsMembershipFilter)(nil)).Elem() } type DistributedVirtualSwitchManagerImportResult struct { DynamicData DistributedVirtualSwitch []ManagedObjectReference `xml:"distributedVirtualSwitch,omitempty"` DistributedVirtualPortgroup []ManagedObjectReference `xml:"distributedVirtualPortgroup,omitempty"` ImportFault []ImportOperationBulkFaultFaultOnImport `xml:"importFault,omitempty"` } func init() { t["DistributedVirtualSwitchManagerImportResult"] = reflect.TypeOf((*DistributedVirtualSwitchManagerImportResult)(nil)).Elem() } type DistributedVirtualSwitchPortConnectee struct { DynamicData ConnectedEntity *ManagedObjectReference `xml:"connectedEntity,omitempty"` NicKey string `xml:"nicKey,omitempty"` Type string `xml:"type,omitempty"` AddressHint string `xml:"addressHint,omitempty"` } func init() { t["DistributedVirtualSwitchPortConnectee"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnectee)(nil)).Elem() } type DistributedVirtualSwitchPortConnection struct { DynamicData SwitchUuid string `xml:"switchUuid"` PortgroupKey string `xml:"portgroupKey,omitempty"` PortKey string `xml:"portKey,omitempty"` ConnectionCookie int32 `xml:"connectionCookie,omitempty"` } func init() { t["DistributedVirtualSwitchPortConnection"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnection)(nil)).Elem() } type DistributedVirtualSwitchPortCriteria struct { DynamicData Connected *bool `xml:"connected"` Active *bool `xml:"active"` UplinkPort *bool `xml:"uplinkPort"` Scope *ManagedObjectReference `xml:"scope,omitempty"` PortgroupKey []string `xml:"portgroupKey,omitempty"` Inside *bool `xml:"inside"` PortKey []string `xml:"portKey,omitempty"` Host []ManagedObjectReference `xml:"host,omitempty"` } func init() { t["DistributedVirtualSwitchPortCriteria"] = reflect.TypeOf((*DistributedVirtualSwitchPortCriteria)(nil)).Elem() } type DistributedVirtualSwitchPortStatistics struct { DynamicData PacketsInMulticast int64 `xml:"packetsInMulticast"` PacketsOutMulticast int64 `xml:"packetsOutMulticast"` BytesInMulticast int64 `xml:"bytesInMulticast"` BytesOutMulticast int64 `xml:"bytesOutMulticast"` PacketsInUnicast int64 `xml:"packetsInUnicast"` PacketsOutUnicast int64 `xml:"packetsOutUnicast"` BytesInUnicast int64 `xml:"bytesInUnicast"` BytesOutUnicast int64 `xml:"bytesOutUnicast"` PacketsInBroadcast int64 `xml:"packetsInBroadcast"` PacketsOutBroadcast int64 `xml:"packetsOutBroadcast"` BytesInBroadcast int64 `xml:"bytesInBroadcast"` BytesOutBroadcast int64 `xml:"bytesOutBroadcast"` PacketsInDropped int64 `xml:"packetsInDropped"` PacketsOutDropped int64 `xml:"packetsOutDropped"` PacketsInException int64 `xml:"packetsInException"` PacketsOutException int64 `xml:"packetsOutException"` BytesInFromPnic int64 `xml:"bytesInFromPnic,omitempty"` BytesOutToPnic int64 `xml:"bytesOutToPnic,omitempty"` } func init() { t["DistributedVirtualSwitchPortStatistics"] = reflect.TypeOf((*DistributedVirtualSwitchPortStatistics)(nil)).Elem() } type DistributedVirtualSwitchProductSpec struct { DynamicData Name string `xml:"name,omitempty"` Vendor string `xml:"vendor,omitempty"` Version string `xml:"version,omitempty"` Build string `xml:"build,omitempty"` ForwardingClass string `xml:"forwardingClass,omitempty"` BundleId string `xml:"bundleId,omitempty"` BundleUrl string `xml:"bundleUrl,omitempty"` } func init() { t["DistributedVirtualSwitchProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchProductSpec)(nil)).Elem() } type DoesCustomizationSpecExist DoesCustomizationSpecExistRequestType func init() { t["DoesCustomizationSpecExist"] = reflect.TypeOf((*DoesCustomizationSpecExist)(nil)).Elem() } type DoesCustomizationSpecExistRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["DoesCustomizationSpecExistRequestType"] = reflect.TypeOf((*DoesCustomizationSpecExistRequestType)(nil)).Elem() } type DoesCustomizationSpecExistResponse struct { Returnval bool `xml:"returnval"` } type DomainNotFound struct { ActiveDirectoryFault DomainName string `xml:"domainName"` } func init() { t["DomainNotFound"] = reflect.TypeOf((*DomainNotFound)(nil)).Elem() } type DomainNotFoundFault DomainNotFound func init() { t["DomainNotFoundFault"] = reflect.TypeOf((*DomainNotFoundFault)(nil)).Elem() } type DrsDisabledEvent struct { ClusterEvent } func init() { t["DrsDisabledEvent"] = reflect.TypeOf((*DrsDisabledEvent)(nil)).Elem() } type DrsDisabledOnVm struct { VimFault } func init() { t["DrsDisabledOnVm"] = reflect.TypeOf((*DrsDisabledOnVm)(nil)).Elem() } type DrsDisabledOnVmFault DrsDisabledOnVm func init() { t["DrsDisabledOnVmFault"] = reflect.TypeOf((*DrsDisabledOnVmFault)(nil)).Elem() } type DrsEnabledEvent struct { ClusterEvent Behavior string `xml:"behavior"` } func init() { t["DrsEnabledEvent"] = reflect.TypeOf((*DrsEnabledEvent)(nil)).Elem() } type DrsEnteredStandbyModeEvent struct { EnteredStandbyModeEvent } func init() { t["DrsEnteredStandbyModeEvent"] = reflect.TypeOf((*DrsEnteredStandbyModeEvent)(nil)).Elem() } type DrsEnteringStandbyModeEvent struct { EnteringStandbyModeEvent } func init() { t["DrsEnteringStandbyModeEvent"] = reflect.TypeOf((*DrsEnteringStandbyModeEvent)(nil)).Elem() } type DrsExitStandbyModeFailedEvent struct { ExitStandbyModeFailedEvent } func init() { t["DrsExitStandbyModeFailedEvent"] = reflect.TypeOf((*DrsExitStandbyModeFailedEvent)(nil)).Elem() } type DrsExitedStandbyModeEvent struct { ExitedStandbyModeEvent } func init() { t["DrsExitedStandbyModeEvent"] = reflect.TypeOf((*DrsExitedStandbyModeEvent)(nil)).Elem() } type DrsExitingStandbyModeEvent struct { ExitingStandbyModeEvent } func init() { t["DrsExitingStandbyModeEvent"] = reflect.TypeOf((*DrsExitingStandbyModeEvent)(nil)).Elem() } type DrsInvocationFailedEvent struct { ClusterEvent } func init() { t["DrsInvocationFailedEvent"] = reflect.TypeOf((*DrsInvocationFailedEvent)(nil)).Elem() } type DrsRecoveredFromFailureEvent struct { ClusterEvent } func init() { t["DrsRecoveredFromFailureEvent"] = reflect.TypeOf((*DrsRecoveredFromFailureEvent)(nil)).Elem() } type DrsResourceConfigureFailedEvent struct { HostEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["DrsResourceConfigureFailedEvent"] = reflect.TypeOf((*DrsResourceConfigureFailedEvent)(nil)).Elem() } type DrsResourceConfigureSyncedEvent struct { HostEvent } func init() { t["DrsResourceConfigureSyncedEvent"] = reflect.TypeOf((*DrsResourceConfigureSyncedEvent)(nil)).Elem() } type DrsRuleComplianceEvent struct { VmEvent } func init() { t["DrsRuleComplianceEvent"] = reflect.TypeOf((*DrsRuleComplianceEvent)(nil)).Elem() } type DrsRuleViolationEvent struct { VmEvent } func init() { t["DrsRuleViolationEvent"] = reflect.TypeOf((*DrsRuleViolationEvent)(nil)).Elem() } type DrsSoftRuleViolationEvent struct { VmEvent } func init() { t["DrsSoftRuleViolationEvent"] = reflect.TypeOf((*DrsSoftRuleViolationEvent)(nil)).Elem() } type DrsVmMigratedEvent struct { VmMigratedEvent } func init() { t["DrsVmMigratedEvent"] = reflect.TypeOf((*DrsVmMigratedEvent)(nil)).Elem() } type DrsVmPoweredOnEvent struct { VmPoweredOnEvent } func init() { t["DrsVmPoweredOnEvent"] = reflect.TypeOf((*DrsVmPoweredOnEvent)(nil)).Elem() } type DrsVmotionIncompatibleFault struct { VirtualHardwareCompatibilityIssue Host ManagedObjectReference `xml:"host"` } func init() { t["DrsVmotionIncompatibleFault"] = reflect.TypeOf((*DrsVmotionIncompatibleFault)(nil)).Elem() } type DrsVmotionIncompatibleFaultFault DrsVmotionIncompatibleFault func init() { t["DrsVmotionIncompatibleFaultFault"] = reflect.TypeOf((*DrsVmotionIncompatibleFaultFault)(nil)).Elem() } type DuplicateCustomizationSpec DuplicateCustomizationSpecRequestType func init() { t["DuplicateCustomizationSpec"] = reflect.TypeOf((*DuplicateCustomizationSpec)(nil)).Elem() } type DuplicateCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` NewName string `xml:"newName"` } func init() { t["DuplicateCustomizationSpecRequestType"] = reflect.TypeOf((*DuplicateCustomizationSpecRequestType)(nil)).Elem() } type DuplicateCustomizationSpecResponse struct { } type DuplicateDisks struct { VsanDiskFault } func init() { t["DuplicateDisks"] = reflect.TypeOf((*DuplicateDisks)(nil)).Elem() } type DuplicateDisksFault DuplicateDisks func init() { t["DuplicateDisksFault"] = reflect.TypeOf((*DuplicateDisksFault)(nil)).Elem() } type DuplicateIpDetectedEvent struct { HostEvent DuplicateIP string `xml:"duplicateIP"` MacAddress string `xml:"macAddress"` } func init() { t["DuplicateIpDetectedEvent"] = reflect.TypeOf((*DuplicateIpDetectedEvent)(nil)).Elem() } type DuplicateName struct { VimFault Name string `xml:"name"` Object ManagedObjectReference `xml:"object"` } func init() { t["DuplicateName"] = reflect.TypeOf((*DuplicateName)(nil)).Elem() } type DuplicateNameFault DuplicateName func init() { t["DuplicateNameFault"] = reflect.TypeOf((*DuplicateNameFault)(nil)).Elem() } type DuplicateVsanNetworkInterface struct { VsanFault Device string `xml:"device"` } func init() { t["DuplicateVsanNetworkInterface"] = reflect.TypeOf((*DuplicateVsanNetworkInterface)(nil)).Elem() } type DuplicateVsanNetworkInterfaceFault DuplicateVsanNetworkInterface func init() { t["DuplicateVsanNetworkInterfaceFault"] = reflect.TypeOf((*DuplicateVsanNetworkInterfaceFault)(nil)).Elem() } type DvpgImportEvent struct { DVPortgroupEvent ImportType string `xml:"importType"` } func init() { t["DvpgImportEvent"] = reflect.TypeOf((*DvpgImportEvent)(nil)).Elem() } type DvpgRestoreEvent struct { DVPortgroupEvent } func init() { t["DvpgRestoreEvent"] = reflect.TypeOf((*DvpgRestoreEvent)(nil)).Elem() } type DvsAcceptNetworkRuleAction struct { DvsNetworkRuleAction } func init() { t["DvsAcceptNetworkRuleAction"] = reflect.TypeOf((*DvsAcceptNetworkRuleAction)(nil)).Elem() } type DvsApplyOperationFault struct { DvsFault ObjectFault []DvsApplyOperationFaultFaultOnObject `xml:"objectFault"` } func init() { t["DvsApplyOperationFault"] = reflect.TypeOf((*DvsApplyOperationFault)(nil)).Elem() } type DvsApplyOperationFaultFault DvsApplyOperationFault func init() { t["DvsApplyOperationFaultFault"] = reflect.TypeOf((*DvsApplyOperationFaultFault)(nil)).Elem() } type DvsApplyOperationFaultFaultOnObject struct { DynamicData ObjectId string `xml:"objectId"` Type string `xml:"type"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["DvsApplyOperationFaultFaultOnObject"] = reflect.TypeOf((*DvsApplyOperationFaultFaultOnObject)(nil)).Elem() } type DvsCopyNetworkRuleAction struct { DvsNetworkRuleAction } func init() { t["DvsCopyNetworkRuleAction"] = reflect.TypeOf((*DvsCopyNetworkRuleAction)(nil)).Elem() } type DvsCreatedEvent struct { DvsEvent Parent FolderEventArgument `xml:"parent"` } func init() { t["DvsCreatedEvent"] = reflect.TypeOf((*DvsCreatedEvent)(nil)).Elem() } type DvsDestroyedEvent struct { DvsEvent } func init() { t["DvsDestroyedEvent"] = reflect.TypeOf((*DvsDestroyedEvent)(nil)).Elem() } type DvsDropNetworkRuleAction struct { DvsNetworkRuleAction } func init() { t["DvsDropNetworkRuleAction"] = reflect.TypeOf((*DvsDropNetworkRuleAction)(nil)).Elem() } type DvsEvent struct { Event } func init() { t["DvsEvent"] = reflect.TypeOf((*DvsEvent)(nil)).Elem() } type DvsEventArgument struct { EntityEventArgument Dvs ManagedObjectReference `xml:"dvs"` } func init() { t["DvsEventArgument"] = reflect.TypeOf((*DvsEventArgument)(nil)).Elem() } type DvsFault struct { VimFault } func init() { t["DvsFault"] = reflect.TypeOf((*DvsFault)(nil)).Elem() } type DvsFaultFault BaseDvsFault func init() { t["DvsFaultFault"] = reflect.TypeOf((*DvsFaultFault)(nil)).Elem() } type DvsFilterConfig struct { InheritablePolicy Key string `xml:"key,omitempty"` AgentName string `xml:"agentName,omitempty"` SlotNumber string `xml:"slotNumber,omitempty"` Parameters *DvsFilterParameter `xml:"parameters,omitempty"` OnFailure string `xml:"onFailure,omitempty"` } func init() { t["DvsFilterConfig"] = reflect.TypeOf((*DvsFilterConfig)(nil)).Elem() } type DvsFilterConfigSpec struct { DvsFilterConfig Operation string `xml:"operation"` } func init() { t["DvsFilterConfigSpec"] = reflect.TypeOf((*DvsFilterConfigSpec)(nil)).Elem() } type DvsFilterParameter struct { DynamicData Parameters []string `xml:"parameters,omitempty"` } func init() { t["DvsFilterParameter"] = reflect.TypeOf((*DvsFilterParameter)(nil)).Elem() } type DvsFilterPolicy struct { InheritablePolicy FilterConfig []BaseDvsFilterConfig `xml:"filterConfig,omitempty,typeattr"` } func init() { t["DvsFilterPolicy"] = reflect.TypeOf((*DvsFilterPolicy)(nil)).Elem() } type DvsGreEncapNetworkRuleAction struct { DvsNetworkRuleAction EncapsulationIp SingleIp `xml:"encapsulationIp"` } func init() { t["DvsGreEncapNetworkRuleAction"] = reflect.TypeOf((*DvsGreEncapNetworkRuleAction)(nil)).Elem() } type DvsHealthStatusChangeEvent struct { HostEvent SwitchUuid string `xml:"switchUuid"` HealthResult BaseHostMemberHealthCheckResult `xml:"healthResult,omitempty,typeattr"` } func init() { t["DvsHealthStatusChangeEvent"] = reflect.TypeOf((*DvsHealthStatusChangeEvent)(nil)).Elem() } type DvsHostBackInSyncEvent struct { DvsEvent HostBackInSync HostEventArgument `xml:"hostBackInSync"` } func init() { t["DvsHostBackInSyncEvent"] = reflect.TypeOf((*DvsHostBackInSyncEvent)(nil)).Elem() } type DvsHostInfrastructureTrafficResource struct { DynamicData Key string `xml:"key"` Description string `xml:"description,omitempty"` AllocationInfo DvsHostInfrastructureTrafficResourceAllocation `xml:"allocationInfo"` } func init() { t["DvsHostInfrastructureTrafficResource"] = reflect.TypeOf((*DvsHostInfrastructureTrafficResource)(nil)).Elem() } type DvsHostInfrastructureTrafficResourceAllocation struct { DynamicData Limit int64 `xml:"limit,omitempty"` Shares *SharesInfo `xml:"shares,omitempty"` Reservation int64 `xml:"reservation,omitempty"` } func init() { t["DvsHostInfrastructureTrafficResourceAllocation"] = reflect.TypeOf((*DvsHostInfrastructureTrafficResourceAllocation)(nil)).Elem() } type DvsHostJoinedEvent struct { DvsEvent HostJoined HostEventArgument `xml:"hostJoined"` } func init() { t["DvsHostJoinedEvent"] = reflect.TypeOf((*DvsHostJoinedEvent)(nil)).Elem() } type DvsHostLeftEvent struct { DvsEvent HostLeft HostEventArgument `xml:"hostLeft"` } func init() { t["DvsHostLeftEvent"] = reflect.TypeOf((*DvsHostLeftEvent)(nil)).Elem() } type DvsHostStatusUpdated struct { DvsEvent HostMember HostEventArgument `xml:"hostMember"` OldStatus string `xml:"oldStatus,omitempty"` NewStatus string `xml:"newStatus,omitempty"` OldStatusDetail string `xml:"oldStatusDetail,omitempty"` NewStatusDetail string `xml:"newStatusDetail,omitempty"` } func init() { t["DvsHostStatusUpdated"] = reflect.TypeOf((*DvsHostStatusUpdated)(nil)).Elem() } type DvsHostVNicProfile struct { DvsVNicProfile } func init() { t["DvsHostVNicProfile"] = reflect.TypeOf((*DvsHostVNicProfile)(nil)).Elem() } type DvsHostWentOutOfSyncEvent struct { DvsEvent HostOutOfSync DvsOutOfSyncHostArgument `xml:"hostOutOfSync"` } func init() { t["DvsHostWentOutOfSyncEvent"] = reflect.TypeOf((*DvsHostWentOutOfSyncEvent)(nil)).Elem() } type DvsImportEvent struct { DvsEvent ImportType string `xml:"importType"` } func init() { t["DvsImportEvent"] = reflect.TypeOf((*DvsImportEvent)(nil)).Elem() } type DvsIpNetworkRuleQualifier struct { DvsNetworkRuleQualifier SourceAddress BaseIpAddress `xml:"sourceAddress,omitempty,typeattr"` DestinationAddress BaseIpAddress `xml:"destinationAddress,omitempty,typeattr"` Protocol *IntExpression `xml:"protocol,omitempty"` SourceIpPort BaseDvsIpPort `xml:"sourceIpPort,omitempty,typeattr"` DestinationIpPort BaseDvsIpPort `xml:"destinationIpPort,omitempty,typeattr"` TcpFlags *IntExpression `xml:"tcpFlags,omitempty"` } func init() { t["DvsIpNetworkRuleQualifier"] = reflect.TypeOf((*DvsIpNetworkRuleQualifier)(nil)).Elem() } type DvsIpPort struct { NegatableExpression } func init() { t["DvsIpPort"] = reflect.TypeOf((*DvsIpPort)(nil)).Elem() } type DvsIpPortRange struct { DvsIpPort StartPortNumber int32 `xml:"startPortNumber"` EndPortNumber int32 `xml:"endPortNumber"` } func init() { t["DvsIpPortRange"] = reflect.TypeOf((*DvsIpPortRange)(nil)).Elem() } type DvsLogNetworkRuleAction struct { DvsNetworkRuleAction } func init() { t["DvsLogNetworkRuleAction"] = reflect.TypeOf((*DvsLogNetworkRuleAction)(nil)).Elem() } type DvsMacNetworkRuleQualifier struct { DvsNetworkRuleQualifier SourceAddress BaseMacAddress `xml:"sourceAddress,omitempty,typeattr"` DestinationAddress BaseMacAddress `xml:"destinationAddress,omitempty,typeattr"` Protocol *IntExpression `xml:"protocol,omitempty"` VlanId *IntExpression `xml:"vlanId,omitempty"` } func init() { t["DvsMacNetworkRuleQualifier"] = reflect.TypeOf((*DvsMacNetworkRuleQualifier)(nil)).Elem() } type DvsMacRewriteNetworkRuleAction struct { DvsNetworkRuleAction RewriteMac string `xml:"rewriteMac"` } func init() { t["DvsMacRewriteNetworkRuleAction"] = reflect.TypeOf((*DvsMacRewriteNetworkRuleAction)(nil)).Elem() } type DvsMergedEvent struct { DvsEvent SourceDvs DvsEventArgument `xml:"sourceDvs"` DestinationDvs DvsEventArgument `xml:"destinationDvs"` } func init() { t["DvsMergedEvent"] = reflect.TypeOf((*DvsMergedEvent)(nil)).Elem() } type DvsNetworkRuleAction struct { DynamicData } func init() { t["DvsNetworkRuleAction"] = reflect.TypeOf((*DvsNetworkRuleAction)(nil)).Elem() } type DvsNetworkRuleQualifier struct { DynamicData Key string `xml:"key,omitempty"` } func init() { t["DvsNetworkRuleQualifier"] = reflect.TypeOf((*DvsNetworkRuleQualifier)(nil)).Elem() } type DvsNotAuthorized struct { DvsFault SessionExtensionKey string `xml:"sessionExtensionKey,omitempty"` DvsExtensionKey string `xml:"dvsExtensionKey,omitempty"` } func init() { t["DvsNotAuthorized"] = reflect.TypeOf((*DvsNotAuthorized)(nil)).Elem() } type DvsNotAuthorizedFault DvsNotAuthorized func init() { t["DvsNotAuthorizedFault"] = reflect.TypeOf((*DvsNotAuthorizedFault)(nil)).Elem() } type DvsOperationBulkFault struct { DvsFault HostFault []DvsOperationBulkFaultFaultOnHost `xml:"hostFault"` } func init() { t["DvsOperationBulkFault"] = reflect.TypeOf((*DvsOperationBulkFault)(nil)).Elem() } type DvsOperationBulkFaultFault DvsOperationBulkFault func init() { t["DvsOperationBulkFaultFault"] = reflect.TypeOf((*DvsOperationBulkFaultFault)(nil)).Elem() } type DvsOperationBulkFaultFaultOnHost struct { DynamicData Host ManagedObjectReference `xml:"host"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["DvsOperationBulkFaultFaultOnHost"] = reflect.TypeOf((*DvsOperationBulkFaultFaultOnHost)(nil)).Elem() } type DvsOutOfSyncHostArgument struct { DynamicData OutOfSyncHost HostEventArgument `xml:"outOfSyncHost"` ConfigParamters []string `xml:"configParamters"` } func init() { t["DvsOutOfSyncHostArgument"] = reflect.TypeOf((*DvsOutOfSyncHostArgument)(nil)).Elem() } type DvsPortBlockedEvent struct { DvsEvent PortKey string `xml:"portKey"` StatusDetail string `xml:"statusDetail,omitempty"` RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` PrevBlockState string `xml:"prevBlockState,omitempty"` } func init() { t["DvsPortBlockedEvent"] = reflect.TypeOf((*DvsPortBlockedEvent)(nil)).Elem() } type DvsPortConnectedEvent struct { DvsEvent PortKey string `xml:"portKey"` Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"` } func init() { t["DvsPortConnectedEvent"] = reflect.TypeOf((*DvsPortConnectedEvent)(nil)).Elem() } type DvsPortCreatedEvent struct { DvsEvent PortKey []string `xml:"portKey"` } func init() { t["DvsPortCreatedEvent"] = reflect.TypeOf((*DvsPortCreatedEvent)(nil)).Elem() } type DvsPortDeletedEvent struct { DvsEvent PortKey []string `xml:"portKey"` } func init() { t["DvsPortDeletedEvent"] = reflect.TypeOf((*DvsPortDeletedEvent)(nil)).Elem() } type DvsPortDisconnectedEvent struct { DvsEvent PortKey string `xml:"portKey"` Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"` } func init() { t["DvsPortDisconnectedEvent"] = reflect.TypeOf((*DvsPortDisconnectedEvent)(nil)).Elem() } type DvsPortEnteredPassthruEvent struct { DvsEvent PortKey string `xml:"portKey"` RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` } func init() { t["DvsPortEnteredPassthruEvent"] = reflect.TypeOf((*DvsPortEnteredPassthruEvent)(nil)).Elem() } type DvsPortExitedPassthruEvent struct { DvsEvent PortKey string `xml:"portKey"` RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` } func init() { t["DvsPortExitedPassthruEvent"] = reflect.TypeOf((*DvsPortExitedPassthruEvent)(nil)).Elem() } type DvsPortJoinPortgroupEvent struct { DvsEvent PortKey string `xml:"portKey"` PortgroupKey string `xml:"portgroupKey"` PortgroupName string `xml:"portgroupName"` } func init() { t["DvsPortJoinPortgroupEvent"] = reflect.TypeOf((*DvsPortJoinPortgroupEvent)(nil)).Elem() } type DvsPortLeavePortgroupEvent struct { DvsEvent PortKey string `xml:"portKey"` PortgroupKey string `xml:"portgroupKey"` PortgroupName string `xml:"portgroupName"` } func init() { t["DvsPortLeavePortgroupEvent"] = reflect.TypeOf((*DvsPortLeavePortgroupEvent)(nil)).Elem() } type DvsPortLinkDownEvent struct { DvsEvent PortKey string `xml:"portKey"` RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` } func init() { t["DvsPortLinkDownEvent"] = reflect.TypeOf((*DvsPortLinkDownEvent)(nil)).Elem() } type DvsPortLinkUpEvent struct { DvsEvent PortKey string `xml:"portKey"` RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` } func init() { t["DvsPortLinkUpEvent"] = reflect.TypeOf((*DvsPortLinkUpEvent)(nil)).Elem() } type DvsPortReconfiguredEvent struct { DvsEvent PortKey []string `xml:"portKey"` ConfigChanges []ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["DvsPortReconfiguredEvent"] = reflect.TypeOf((*DvsPortReconfiguredEvent)(nil)).Elem() } type DvsPortRuntimeChangeEvent struct { DvsEvent PortKey string `xml:"portKey"` RuntimeInfo DVPortStatus `xml:"runtimeInfo"` } func init() { t["DvsPortRuntimeChangeEvent"] = reflect.TypeOf((*DvsPortRuntimeChangeEvent)(nil)).Elem() } type DvsPortUnblockedEvent struct { DvsEvent PortKey string `xml:"portKey"` RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` PrevBlockState string `xml:"prevBlockState,omitempty"` } func init() { t["DvsPortUnblockedEvent"] = reflect.TypeOf((*DvsPortUnblockedEvent)(nil)).Elem() } type DvsPortVendorSpecificStateChangeEvent struct { DvsEvent PortKey string `xml:"portKey"` } func init() { t["DvsPortVendorSpecificStateChangeEvent"] = reflect.TypeOf((*DvsPortVendorSpecificStateChangeEvent)(nil)).Elem() } type DvsProfile struct { ApplyProfile Key string `xml:"key"` Name string `xml:"name"` Uplink []PnicUplinkProfile `xml:"uplink,omitempty"` } func init() { t["DvsProfile"] = reflect.TypeOf((*DvsProfile)(nil)).Elem() } type DvsPuntNetworkRuleAction struct { DvsNetworkRuleAction } func init() { t["DvsPuntNetworkRuleAction"] = reflect.TypeOf((*DvsPuntNetworkRuleAction)(nil)).Elem() } type DvsRateLimitNetworkRuleAction struct { DvsNetworkRuleAction PacketsPerSecond int32 `xml:"packetsPerSecond"` } func init() { t["DvsRateLimitNetworkRuleAction"] = reflect.TypeOf((*DvsRateLimitNetworkRuleAction)(nil)).Elem() } type DvsReconfigureVmVnicNetworkResourcePoolRequestType struct { This ManagedObjectReference `xml:"_this"` ConfigSpec []DvsVmVnicResourcePoolConfigSpec `xml:"configSpec"` } func init() { t["DvsReconfigureVmVnicNetworkResourcePoolRequestType"] = reflect.TypeOf((*DvsReconfigureVmVnicNetworkResourcePoolRequestType)(nil)).Elem() } type DvsReconfigureVmVnicNetworkResourcePool_Task DvsReconfigureVmVnicNetworkResourcePoolRequestType func init() { t["DvsReconfigureVmVnicNetworkResourcePool_Task"] = reflect.TypeOf((*DvsReconfigureVmVnicNetworkResourcePool_Task)(nil)).Elem() } type DvsReconfigureVmVnicNetworkResourcePool_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type DvsReconfiguredEvent struct { DvsEvent ConfigSpec BaseDVSConfigSpec `xml:"configSpec,typeattr"` ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["DvsReconfiguredEvent"] = reflect.TypeOf((*DvsReconfiguredEvent)(nil)).Elem() } type DvsRenamedEvent struct { DvsEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["DvsRenamedEvent"] = reflect.TypeOf((*DvsRenamedEvent)(nil)).Elem() } type DvsResourceRuntimeInfo struct { DynamicData Capacity int32 `xml:"capacity,omitempty"` Usage int32 `xml:"usage,omitempty"` Available int32 `xml:"available,omitempty"` AllocatedResource []DvsVnicAllocatedResource `xml:"allocatedResource,omitempty"` VmVnicNetworkResourcePoolRuntime []DvsVmVnicNetworkResourcePoolRuntimeInfo `xml:"vmVnicNetworkResourcePoolRuntime,omitempty"` } func init() { t["DvsResourceRuntimeInfo"] = reflect.TypeOf((*DvsResourceRuntimeInfo)(nil)).Elem() } type DvsRestoreEvent struct { DvsEvent } func init() { t["DvsRestoreEvent"] = reflect.TypeOf((*DvsRestoreEvent)(nil)).Elem() } type DvsScopeViolated struct { DvsFault Scope []ManagedObjectReference `xml:"scope"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["DvsScopeViolated"] = reflect.TypeOf((*DvsScopeViolated)(nil)).Elem() } type DvsScopeViolatedFault DvsScopeViolated func init() { t["DvsScopeViolatedFault"] = reflect.TypeOf((*DvsScopeViolatedFault)(nil)).Elem() } type DvsServiceConsoleVNicProfile struct { DvsVNicProfile } func init() { t["DvsServiceConsoleVNicProfile"] = reflect.TypeOf((*DvsServiceConsoleVNicProfile)(nil)).Elem() } type DvsSingleIpPort struct { DvsIpPort PortNumber int32 `xml:"portNumber"` } func init() { t["DvsSingleIpPort"] = reflect.TypeOf((*DvsSingleIpPort)(nil)).Elem() } type DvsSystemTrafficNetworkRuleQualifier struct { DvsNetworkRuleQualifier TypeOfSystemTraffic *StringExpression `xml:"typeOfSystemTraffic,omitempty"` } func init() { t["DvsSystemTrafficNetworkRuleQualifier"] = reflect.TypeOf((*DvsSystemTrafficNetworkRuleQualifier)(nil)).Elem() } type DvsTrafficFilterConfig struct { DvsFilterConfig TrafficRuleset *DvsTrafficRuleset `xml:"trafficRuleset,omitempty"` } func init() { t["DvsTrafficFilterConfig"] = reflect.TypeOf((*DvsTrafficFilterConfig)(nil)).Elem() } type DvsTrafficFilterConfigSpec struct { DvsTrafficFilterConfig Operation string `xml:"operation"` } func init() { t["DvsTrafficFilterConfigSpec"] = reflect.TypeOf((*DvsTrafficFilterConfigSpec)(nil)).Elem() } type DvsTrafficRule struct { DynamicData Key string `xml:"key,omitempty"` Description string `xml:"description,omitempty"` Sequence int32 `xml:"sequence,omitempty"` Qualifier []BaseDvsNetworkRuleQualifier `xml:"qualifier,omitempty,typeattr"` Action BaseDvsNetworkRuleAction `xml:"action,omitempty,typeattr"` Direction string `xml:"direction,omitempty"` } func init() { t["DvsTrafficRule"] = reflect.TypeOf((*DvsTrafficRule)(nil)).Elem() } type DvsTrafficRuleset struct { DynamicData Key string `xml:"key,omitempty"` Enabled *bool `xml:"enabled"` Precedence int32 `xml:"precedence,omitempty"` Rules []DvsTrafficRule `xml:"rules,omitempty"` } func init() { t["DvsTrafficRuleset"] = reflect.TypeOf((*DvsTrafficRuleset)(nil)).Elem() } type DvsUpdateTagNetworkRuleAction struct { DvsNetworkRuleAction QosTag int32 `xml:"qosTag,omitempty"` DscpTag int32 `xml:"dscpTag,omitempty"` } func init() { t["DvsUpdateTagNetworkRuleAction"] = reflect.TypeOf((*DvsUpdateTagNetworkRuleAction)(nil)).Elem() } type DvsUpgradeAvailableEvent struct { DvsEvent ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` } func init() { t["DvsUpgradeAvailableEvent"] = reflect.TypeOf((*DvsUpgradeAvailableEvent)(nil)).Elem() } type DvsUpgradeInProgressEvent struct { DvsEvent ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` } func init() { t["DvsUpgradeInProgressEvent"] = reflect.TypeOf((*DvsUpgradeInProgressEvent)(nil)).Elem() } type DvsUpgradeRejectedEvent struct { DvsEvent ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` } func init() { t["DvsUpgradeRejectedEvent"] = reflect.TypeOf((*DvsUpgradeRejectedEvent)(nil)).Elem() } type DvsUpgradedEvent struct { DvsEvent ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` } func init() { t["DvsUpgradedEvent"] = reflect.TypeOf((*DvsUpgradedEvent)(nil)).Elem() } type DvsVNicProfile struct { ApplyProfile Key string `xml:"key"` IpConfig IpAddressProfile `xml:"ipConfig"` } func init() { t["DvsVNicProfile"] = reflect.TypeOf((*DvsVNicProfile)(nil)).Elem() } type DvsVmVnicNetworkResourcePoolRuntimeInfo struct { DynamicData Key string `xml:"key"` Name string `xml:"name,omitempty"` Capacity int32 `xml:"capacity,omitempty"` Usage int32 `xml:"usage,omitempty"` Available int32 `xml:"available,omitempty"` Status string `xml:"status"` AllocatedResource []DvsVnicAllocatedResource `xml:"allocatedResource,omitempty"` } func init() { t["DvsVmVnicNetworkResourcePoolRuntimeInfo"] = reflect.TypeOf((*DvsVmVnicNetworkResourcePoolRuntimeInfo)(nil)).Elem() } type DvsVmVnicResourceAllocation struct { DynamicData ReservationQuota int64 `xml:"reservationQuota,omitempty"` } func init() { t["DvsVmVnicResourceAllocation"] = reflect.TypeOf((*DvsVmVnicResourceAllocation)(nil)).Elem() } type DvsVmVnicResourcePoolConfigSpec struct { DynamicData Operation string `xml:"operation"` Key string `xml:"key,omitempty"` ConfigVersion string `xml:"configVersion,omitempty"` AllocationInfo *DvsVmVnicResourceAllocation `xml:"allocationInfo,omitempty"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` } func init() { t["DvsVmVnicResourcePoolConfigSpec"] = reflect.TypeOf((*DvsVmVnicResourcePoolConfigSpec)(nil)).Elem() } type DvsVnicAllocatedResource struct { DynamicData Vm ManagedObjectReference `xml:"vm"` VnicKey string `xml:"vnicKey"` Reservation int64 `xml:"reservation,omitempty"` } func init() { t["DvsVnicAllocatedResource"] = reflect.TypeOf((*DvsVnicAllocatedResource)(nil)).Elem() } type DynamicArray struct { Val []AnyType `xml:"val,typeattr"` } func init() { t["DynamicArray"] = reflect.TypeOf((*DynamicArray)(nil)).Elem() } type DynamicData struct { } func init() { t["DynamicData"] = reflect.TypeOf((*DynamicData)(nil)).Elem() } type DynamicProperty struct { Name string `xml:"name"` Val AnyType `xml:"val,typeattr"` } func init() { t["DynamicProperty"] = reflect.TypeOf((*DynamicProperty)(nil)).Elem() } type EVCAdmissionFailed struct { NotSupportedHostInCluster Faults []LocalizedMethodFault `xml:"faults,omitempty"` } func init() { t["EVCAdmissionFailed"] = reflect.TypeOf((*EVCAdmissionFailed)(nil)).Elem() } type EVCAdmissionFailedCPUFeaturesForMode struct { EVCAdmissionFailed CurrentEVCModeKey string `xml:"currentEVCModeKey"` } func init() { t["EVCAdmissionFailedCPUFeaturesForMode"] = reflect.TypeOf((*EVCAdmissionFailedCPUFeaturesForMode)(nil)).Elem() } type EVCAdmissionFailedCPUFeaturesForModeFault EVCAdmissionFailedCPUFeaturesForMode func init() { t["EVCAdmissionFailedCPUFeaturesForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUFeaturesForModeFault)(nil)).Elem() } type EVCAdmissionFailedCPUModel struct { EVCAdmissionFailed } func init() { t["EVCAdmissionFailedCPUModel"] = reflect.TypeOf((*EVCAdmissionFailedCPUModel)(nil)).Elem() } type EVCAdmissionFailedCPUModelFault EVCAdmissionFailedCPUModel func init() { t["EVCAdmissionFailedCPUModelFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelFault)(nil)).Elem() } type EVCAdmissionFailedCPUModelForMode struct { EVCAdmissionFailed CurrentEVCModeKey string `xml:"currentEVCModeKey"` } func init() { t["EVCAdmissionFailedCPUModelForMode"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelForMode)(nil)).Elem() } type EVCAdmissionFailedCPUModelForModeFault EVCAdmissionFailedCPUModelForMode func init() { t["EVCAdmissionFailedCPUModelForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelForModeFault)(nil)).Elem() } type EVCAdmissionFailedCPUVendor struct { EVCAdmissionFailed ClusterCPUVendor string `xml:"clusterCPUVendor"` HostCPUVendor string `xml:"hostCPUVendor"` } func init() { t["EVCAdmissionFailedCPUVendor"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendor)(nil)).Elem() } type EVCAdmissionFailedCPUVendorFault EVCAdmissionFailedCPUVendor func init() { t["EVCAdmissionFailedCPUVendorFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorFault)(nil)).Elem() } type EVCAdmissionFailedCPUVendorUnknown struct { EVCAdmissionFailed } func init() { t["EVCAdmissionFailedCPUVendorUnknown"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorUnknown)(nil)).Elem() } type EVCAdmissionFailedCPUVendorUnknownFault EVCAdmissionFailedCPUVendorUnknown func init() { t["EVCAdmissionFailedCPUVendorUnknownFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorUnknownFault)(nil)).Elem() } type EVCAdmissionFailedFault BaseEVCAdmissionFailed func init() { t["EVCAdmissionFailedFault"] = reflect.TypeOf((*EVCAdmissionFailedFault)(nil)).Elem() } type EVCAdmissionFailedHostDisconnected struct { EVCAdmissionFailed } func init() { t["EVCAdmissionFailedHostDisconnected"] = reflect.TypeOf((*EVCAdmissionFailedHostDisconnected)(nil)).Elem() } type EVCAdmissionFailedHostDisconnectedFault EVCAdmissionFailedHostDisconnected func init() { t["EVCAdmissionFailedHostDisconnectedFault"] = reflect.TypeOf((*EVCAdmissionFailedHostDisconnectedFault)(nil)).Elem() } type EVCAdmissionFailedHostSoftware struct { EVCAdmissionFailed } func init() { t["EVCAdmissionFailedHostSoftware"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftware)(nil)).Elem() } type EVCAdmissionFailedHostSoftwareFault EVCAdmissionFailedHostSoftware func init() { t["EVCAdmissionFailedHostSoftwareFault"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareFault)(nil)).Elem() } type EVCAdmissionFailedHostSoftwareForMode struct { EVCAdmissionFailed } func init() { t["EVCAdmissionFailedHostSoftwareForMode"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareForMode)(nil)).Elem() } type EVCAdmissionFailedHostSoftwareForModeFault EVCAdmissionFailedHostSoftwareForMode func init() { t["EVCAdmissionFailedHostSoftwareForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareForModeFault)(nil)).Elem() } type EVCAdmissionFailedVmActive struct { EVCAdmissionFailed } func init() { t["EVCAdmissionFailedVmActive"] = reflect.TypeOf((*EVCAdmissionFailedVmActive)(nil)).Elem() } type EVCAdmissionFailedVmActiveFault EVCAdmissionFailedVmActive func init() { t["EVCAdmissionFailedVmActiveFault"] = reflect.TypeOf((*EVCAdmissionFailedVmActiveFault)(nil)).Elem() } type EVCConfigFault struct { VimFault Faults []LocalizedMethodFault `xml:"faults,omitempty"` } func init() { t["EVCConfigFault"] = reflect.TypeOf((*EVCConfigFault)(nil)).Elem() } type EVCConfigFaultFault BaseEVCConfigFault func init() { t["EVCConfigFaultFault"] = reflect.TypeOf((*EVCConfigFaultFault)(nil)).Elem() } type EVCMode struct { ElementDescription GuaranteedCPUFeatures []HostCpuIdInfo `xml:"guaranteedCPUFeatures,omitempty"` FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` FeatureMask []HostFeatureMask `xml:"featureMask,omitempty"` FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` Vendor string `xml:"vendor"` Track []string `xml:"track,omitempty"` VendorTier int32 `xml:"vendorTier"` } func init() { t["EVCMode"] = reflect.TypeOf((*EVCMode)(nil)).Elem() } type EVCModeIllegalByVendor struct { EVCConfigFault ClusterCPUVendor string `xml:"clusterCPUVendor"` ModeCPUVendor string `xml:"modeCPUVendor"` } func init() { t["EVCModeIllegalByVendor"] = reflect.TypeOf((*EVCModeIllegalByVendor)(nil)).Elem() } type EVCModeIllegalByVendorFault EVCModeIllegalByVendor func init() { t["EVCModeIllegalByVendorFault"] = reflect.TypeOf((*EVCModeIllegalByVendorFault)(nil)).Elem() } type EVCModeUnsupportedByHosts struct { EVCConfigFault EvcMode string `xml:"evcMode,omitempty"` Host []ManagedObjectReference `xml:"host,omitempty"` HostName []string `xml:"hostName,omitempty"` } func init() { t["EVCModeUnsupportedByHosts"] = reflect.TypeOf((*EVCModeUnsupportedByHosts)(nil)).Elem() } type EVCModeUnsupportedByHostsFault EVCModeUnsupportedByHosts func init() { t["EVCModeUnsupportedByHostsFault"] = reflect.TypeOf((*EVCModeUnsupportedByHostsFault)(nil)).Elem() } type EVCUnsupportedByHostHardware struct { EVCConfigFault Host []ManagedObjectReference `xml:"host"` HostName []string `xml:"hostName"` } func init() { t["EVCUnsupportedByHostHardware"] = reflect.TypeOf((*EVCUnsupportedByHostHardware)(nil)).Elem() } type EVCUnsupportedByHostHardwareFault EVCUnsupportedByHostHardware func init() { t["EVCUnsupportedByHostHardwareFault"] = reflect.TypeOf((*EVCUnsupportedByHostHardwareFault)(nil)).Elem() } type EVCUnsupportedByHostSoftware struct { EVCConfigFault Host []ManagedObjectReference `xml:"host"` HostName []string `xml:"hostName"` } func init() { t["EVCUnsupportedByHostSoftware"] = reflect.TypeOf((*EVCUnsupportedByHostSoftware)(nil)).Elem() } type EVCUnsupportedByHostSoftwareFault EVCUnsupportedByHostSoftware func init() { t["EVCUnsupportedByHostSoftwareFault"] = reflect.TypeOf((*EVCUnsupportedByHostSoftwareFault)(nil)).Elem() } type EagerZeroVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["EagerZeroVirtualDiskRequestType"] = reflect.TypeOf((*EagerZeroVirtualDiskRequestType)(nil)).Elem() } type EagerZeroVirtualDisk_Task EagerZeroVirtualDiskRequestType func init() { t["EagerZeroVirtualDisk_Task"] = reflect.TypeOf((*EagerZeroVirtualDisk_Task)(nil)).Elem() } type EagerZeroVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type EightHostLimitViolated struct { VmConfigFault } func init() { t["EightHostLimitViolated"] = reflect.TypeOf((*EightHostLimitViolated)(nil)).Elem() } type EightHostLimitViolatedFault EightHostLimitViolated func init() { t["EightHostLimitViolatedFault"] = reflect.TypeOf((*EightHostLimitViolatedFault)(nil)).Elem() } type ElementDescription struct { Description Key string `xml:"key"` } func init() { t["ElementDescription"] = reflect.TypeOf((*ElementDescription)(nil)).Elem() } type EnableAlarmActions EnableAlarmActionsRequestType func init() { t["EnableAlarmActions"] = reflect.TypeOf((*EnableAlarmActions)(nil)).Elem() } type EnableAlarmActionsRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Enabled bool `xml:"enabled"` } func init() { t["EnableAlarmActionsRequestType"] = reflect.TypeOf((*EnableAlarmActionsRequestType)(nil)).Elem() } type EnableAlarmActionsResponse struct { } type EnableCrypto EnableCryptoRequestType func init() { t["EnableCrypto"] = reflect.TypeOf((*EnableCrypto)(nil)).Elem() } type EnableCryptoRequestType struct { This ManagedObjectReference `xml:"_this"` KeyPlain CryptoKeyPlain `xml:"keyPlain"` } func init() { t["EnableCryptoRequestType"] = reflect.TypeOf((*EnableCryptoRequestType)(nil)).Elem() } type EnableCryptoResponse struct { } type EnableFeature EnableFeatureRequestType func init() { t["EnableFeature"] = reflect.TypeOf((*EnableFeature)(nil)).Elem() } type EnableFeatureRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` FeatureKey string `xml:"featureKey"` } func init() { t["EnableFeatureRequestType"] = reflect.TypeOf((*EnableFeatureRequestType)(nil)).Elem() } type EnableFeatureResponse struct { Returnval bool `xml:"returnval"` } type EnableHyperThreading EnableHyperThreadingRequestType func init() { t["EnableHyperThreading"] = reflect.TypeOf((*EnableHyperThreading)(nil)).Elem() } type EnableHyperThreadingRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["EnableHyperThreadingRequestType"] = reflect.TypeOf((*EnableHyperThreadingRequestType)(nil)).Elem() } type EnableHyperThreadingResponse struct { } type EnableMultipathPath EnableMultipathPathRequestType func init() { t["EnableMultipathPath"] = reflect.TypeOf((*EnableMultipathPath)(nil)).Elem() } type EnableMultipathPathRequestType struct { This ManagedObjectReference `xml:"_this"` PathName string `xml:"pathName"` } func init() { t["EnableMultipathPathRequestType"] = reflect.TypeOf((*EnableMultipathPathRequestType)(nil)).Elem() } type EnableMultipathPathResponse struct { } type EnableNetworkResourceManagement EnableNetworkResourceManagementRequestType func init() { t["EnableNetworkResourceManagement"] = reflect.TypeOf((*EnableNetworkResourceManagement)(nil)).Elem() } type EnableNetworkResourceManagementRequestType struct { This ManagedObjectReference `xml:"_this"` Enable bool `xml:"enable"` } func init() { t["EnableNetworkResourceManagementRequestType"] = reflect.TypeOf((*EnableNetworkResourceManagementRequestType)(nil)).Elem() } type EnableNetworkResourceManagementResponse struct { } type EnableRuleset EnableRulesetRequestType func init() { t["EnableRuleset"] = reflect.TypeOf((*EnableRuleset)(nil)).Elem() } type EnableRulesetRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["EnableRulesetRequestType"] = reflect.TypeOf((*EnableRulesetRequestType)(nil)).Elem() } type EnableRulesetResponse struct { } type EnableSecondaryVMRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["EnableSecondaryVMRequestType"] = reflect.TypeOf((*EnableSecondaryVMRequestType)(nil)).Elem() } type EnableSecondaryVM_Task EnableSecondaryVMRequestType func init() { t["EnableSecondaryVM_Task"] = reflect.TypeOf((*EnableSecondaryVM_Task)(nil)).Elem() } type EnableSecondaryVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type EnableSmartCardAuthentication EnableSmartCardAuthenticationRequestType func init() { t["EnableSmartCardAuthentication"] = reflect.TypeOf((*EnableSmartCardAuthentication)(nil)).Elem() } type EnableSmartCardAuthenticationRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["EnableSmartCardAuthenticationRequestType"] = reflect.TypeOf((*EnableSmartCardAuthenticationRequestType)(nil)).Elem() } type EnableSmartCardAuthenticationResponse struct { } type EnterLockdownMode EnterLockdownModeRequestType func init() { t["EnterLockdownMode"] = reflect.TypeOf((*EnterLockdownMode)(nil)).Elem() } type EnterLockdownModeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["EnterLockdownModeRequestType"] = reflect.TypeOf((*EnterLockdownModeRequestType)(nil)).Elem() } type EnterLockdownModeResponse struct { } type EnterMaintenanceModeRequestType struct { This ManagedObjectReference `xml:"_this"` Timeout int32 `xml:"timeout"` EvacuatePoweredOffVms *bool `xml:"evacuatePoweredOffVms"` MaintenanceSpec *HostMaintenanceSpec `xml:"maintenanceSpec,omitempty"` } func init() { t["EnterMaintenanceModeRequestType"] = reflect.TypeOf((*EnterMaintenanceModeRequestType)(nil)).Elem() } type EnterMaintenanceMode_Task EnterMaintenanceModeRequestType func init() { t["EnterMaintenanceMode_Task"] = reflect.TypeOf((*EnterMaintenanceMode_Task)(nil)).Elem() } type EnterMaintenanceMode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type EnteredMaintenanceModeEvent struct { HostEvent } func init() { t["EnteredMaintenanceModeEvent"] = reflect.TypeOf((*EnteredMaintenanceModeEvent)(nil)).Elem() } type EnteredStandbyModeEvent struct { HostEvent } func init() { t["EnteredStandbyModeEvent"] = reflect.TypeOf((*EnteredStandbyModeEvent)(nil)).Elem() } type EnteringMaintenanceModeEvent struct { HostEvent } func init() { t["EnteringMaintenanceModeEvent"] = reflect.TypeOf((*EnteringMaintenanceModeEvent)(nil)).Elem() } type EnteringStandbyModeEvent struct { HostEvent } func init() { t["EnteringStandbyModeEvent"] = reflect.TypeOf((*EnteringStandbyModeEvent)(nil)).Elem() } type EntityBackup struct { DynamicData } func init() { t["EntityBackup"] = reflect.TypeOf((*EntityBackup)(nil)).Elem() } type EntityBackupConfig struct { DynamicData EntityType string `xml:"entityType"` ConfigBlob []byte `xml:"configBlob"` Key string `xml:"key,omitempty"` Name string `xml:"name,omitempty"` Container *ManagedObjectReference `xml:"container,omitempty"` ConfigVersion string `xml:"configVersion,omitempty"` } func init() { t["EntityBackupConfig"] = reflect.TypeOf((*EntityBackupConfig)(nil)).Elem() } type EntityEventArgument struct { EventArgument Name string `xml:"name"` } func init() { t["EntityEventArgument"] = reflect.TypeOf((*EntityEventArgument)(nil)).Elem() } type EntityPrivilege struct { DynamicData Entity ManagedObjectReference `xml:"entity"` PrivAvailability []PrivilegeAvailability `xml:"privAvailability"` } func init() { t["EntityPrivilege"] = reflect.TypeOf((*EntityPrivilege)(nil)).Elem() } type EnumDescription struct { DynamicData Key string `xml:"key"` Tags []BaseElementDescription `xml:"tags,typeattr"` } func init() { t["EnumDescription"] = reflect.TypeOf((*EnumDescription)(nil)).Elem() } type EnvironmentBrowserConfigOptionQuerySpec struct { DynamicData Key string `xml:"key,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` GuestId []string `xml:"guestId,omitempty"` } func init() { t["EnvironmentBrowserConfigOptionQuerySpec"] = reflect.TypeOf((*EnvironmentBrowserConfigOptionQuerySpec)(nil)).Elem() } type ErrorUpgradeEvent struct { UpgradeEvent } func init() { t["ErrorUpgradeEvent"] = reflect.TypeOf((*ErrorUpgradeEvent)(nil)).Elem() } type EstimateDatabaseSize EstimateDatabaseSizeRequestType func init() { t["EstimateDatabaseSize"] = reflect.TypeOf((*EstimateDatabaseSize)(nil)).Elem() } type EstimateDatabaseSizeRequestType struct { This ManagedObjectReference `xml:"_this"` DbSizeParam DatabaseSizeParam `xml:"dbSizeParam"` } func init() { t["EstimateDatabaseSizeRequestType"] = reflect.TypeOf((*EstimateDatabaseSizeRequestType)(nil)).Elem() } type EstimateDatabaseSizeResponse struct { Returnval DatabaseSizeEstimate `xml:"returnval"` } type EstimateStorageForConsolidateSnapshotsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["EstimateStorageForConsolidateSnapshotsRequestType"] = reflect.TypeOf((*EstimateStorageForConsolidateSnapshotsRequestType)(nil)).Elem() } type EstimateStorageForConsolidateSnapshots_Task EstimateStorageForConsolidateSnapshotsRequestType func init() { t["EstimateStorageForConsolidateSnapshots_Task"] = reflect.TypeOf((*EstimateStorageForConsolidateSnapshots_Task)(nil)).Elem() } type EstimateStorageForConsolidateSnapshots_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type EsxAgentHostManagerUpdateConfig EsxAgentHostManagerUpdateConfigRequestType func init() { t["EsxAgentHostManagerUpdateConfig"] = reflect.TypeOf((*EsxAgentHostManagerUpdateConfig)(nil)).Elem() } type EsxAgentHostManagerUpdateConfigRequestType struct { This ManagedObjectReference `xml:"_this"` ConfigInfo HostEsxAgentHostManagerConfigInfo `xml:"configInfo"` } func init() { t["EsxAgentHostManagerUpdateConfigRequestType"] = reflect.TypeOf((*EsxAgentHostManagerUpdateConfigRequestType)(nil)).Elem() } type EsxAgentHostManagerUpdateConfigResponse struct { } type EvacuateVsanNodeRequestType struct { This ManagedObjectReference `xml:"_this"` MaintenanceSpec HostMaintenanceSpec `xml:"maintenanceSpec"` Timeout int32 `xml:"timeout"` } func init() { t["EvacuateVsanNodeRequestType"] = reflect.TypeOf((*EvacuateVsanNodeRequestType)(nil)).Elem() } type EvacuateVsanNode_Task EvacuateVsanNodeRequestType func init() { t["EvacuateVsanNode_Task"] = reflect.TypeOf((*EvacuateVsanNode_Task)(nil)).Elem() } type EvacuateVsanNode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type EvaluationLicenseSource struct { LicenseSource RemainingHours int64 `xml:"remainingHours,omitempty"` } func init() { t["EvaluationLicenseSource"] = reflect.TypeOf((*EvaluationLicenseSource)(nil)).Elem() } type EvcManager EvcManagerRequestType func init() { t["EvcManager"] = reflect.TypeOf((*EvcManager)(nil)).Elem() } type EvcManagerRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["EvcManagerRequestType"] = reflect.TypeOf((*EvcManagerRequestType)(nil)).Elem() } type EvcManagerResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type Event struct { DynamicData Key int32 `xml:"key"` ChainId int32 `xml:"chainId"` CreatedTime time.Time `xml:"createdTime"` UserName string `xml:"userName"` Datacenter *DatacenterEventArgument `xml:"datacenter,omitempty"` ComputeResource *ComputeResourceEventArgument `xml:"computeResource,omitempty"` Host *HostEventArgument `xml:"host,omitempty"` Vm *VmEventArgument `xml:"vm,omitempty"` Ds *DatastoreEventArgument `xml:"ds,omitempty"` Net *NetworkEventArgument `xml:"net,omitempty"` Dvs *DvsEventArgument `xml:"dvs,omitempty"` FullFormattedMessage string `xml:"fullFormattedMessage,omitempty"` ChangeTag string `xml:"changeTag,omitempty"` } func init() { t["Event"] = reflect.TypeOf((*Event)(nil)).Elem() } type EventAlarmExpression struct { AlarmExpression Comparisons []EventAlarmExpressionComparison `xml:"comparisons,omitempty"` EventType string `xml:"eventType"` EventTypeId string `xml:"eventTypeId,omitempty"` ObjectType string `xml:"objectType,omitempty"` Status ManagedEntityStatus `xml:"status,omitempty"` } func init() { t["EventAlarmExpression"] = reflect.TypeOf((*EventAlarmExpression)(nil)).Elem() } type EventAlarmExpressionComparison struct { DynamicData AttributeName string `xml:"attributeName"` Operator string `xml:"operator"` Value string `xml:"value"` } func init() { t["EventAlarmExpressionComparison"] = reflect.TypeOf((*EventAlarmExpressionComparison)(nil)).Elem() } type EventArgDesc struct { DynamicData Name string `xml:"name"` Type string `xml:"type"` Description BaseElementDescription `xml:"description,omitempty,typeattr"` } func init() { t["EventArgDesc"] = reflect.TypeOf((*EventArgDesc)(nil)).Elem() } type EventArgument struct { DynamicData } func init() { t["EventArgument"] = reflect.TypeOf((*EventArgument)(nil)).Elem() } type EventDescription struct { DynamicData Category []BaseElementDescription `xml:"category,typeattr"` EventInfo []EventDescriptionEventDetail `xml:"eventInfo"` EnumeratedTypes []EnumDescription `xml:"enumeratedTypes,omitempty"` } func init() { t["EventDescription"] = reflect.TypeOf((*EventDescription)(nil)).Elem() } type EventDescriptionEventDetail struct { DynamicData Key string `xml:"key"` Description string `xml:"description,omitempty"` Category string `xml:"category"` FormatOnDatacenter string `xml:"formatOnDatacenter"` FormatOnComputeResource string `xml:"formatOnComputeResource"` FormatOnHost string `xml:"formatOnHost"` FormatOnVm string `xml:"formatOnVm"` FullFormat string `xml:"fullFormat"` LongDescription string `xml:"longDescription,omitempty"` } func init() { t["EventDescriptionEventDetail"] = reflect.TypeOf((*EventDescriptionEventDetail)(nil)).Elem() } type EventEx struct { Event EventTypeId string `xml:"eventTypeId"` Severity string `xml:"severity,omitempty"` Message string `xml:"message,omitempty"` Arguments []KeyAnyValue `xml:"arguments,omitempty"` ObjectId string `xml:"objectId,omitempty"` ObjectType string `xml:"objectType,omitempty"` ObjectName string `xml:"objectName,omitempty"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["EventEx"] = reflect.TypeOf((*EventEx)(nil)).Elem() } type EventFilterSpec struct { DynamicData Entity *EventFilterSpecByEntity `xml:"entity,omitempty"` Time *EventFilterSpecByTime `xml:"time,omitempty"` UserName *EventFilterSpecByUsername `xml:"userName,omitempty"` EventChainId int32 `xml:"eventChainId,omitempty"` Alarm *ManagedObjectReference `xml:"alarm,omitempty"` ScheduledTask *ManagedObjectReference `xml:"scheduledTask,omitempty"` DisableFullMessage *bool `xml:"disableFullMessage"` Category []string `xml:"category,omitempty"` Type []string `xml:"type,omitempty"` Tag []string `xml:"tag,omitempty"` EventTypeId []string `xml:"eventTypeId,omitempty"` MaxCount int32 `xml:"maxCount,omitempty"` } func init() { t["EventFilterSpec"] = reflect.TypeOf((*EventFilterSpec)(nil)).Elem() } type EventFilterSpecByEntity struct { DynamicData Entity ManagedObjectReference `xml:"entity"` Recursion EventFilterSpecRecursionOption `xml:"recursion"` } func init() { t["EventFilterSpecByEntity"] = reflect.TypeOf((*EventFilterSpecByEntity)(nil)).Elem() } type EventFilterSpecByTime struct { DynamicData BeginTime *time.Time `xml:"beginTime"` EndTime *time.Time `xml:"endTime"` } func init() { t["EventFilterSpecByTime"] = reflect.TypeOf((*EventFilterSpecByTime)(nil)).Elem() } type EventFilterSpecByUsername struct { DynamicData SystemUser bool `xml:"systemUser"` UserList []string `xml:"userList,omitempty"` } func init() { t["EventFilterSpecByUsername"] = reflect.TypeOf((*EventFilterSpecByUsername)(nil)).Elem() } type ExecuteHostProfile ExecuteHostProfileRequestType func init() { t["ExecuteHostProfile"] = reflect.TypeOf((*ExecuteHostProfile)(nil)).Elem() } type ExecuteHostProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` DeferredParam []ProfileDeferredPolicyOptionParameter `xml:"deferredParam,omitempty"` } func init() { t["ExecuteHostProfileRequestType"] = reflect.TypeOf((*ExecuteHostProfileRequestType)(nil)).Elem() } type ExecuteHostProfileResponse struct { Returnval BaseProfileExecuteResult `xml:"returnval,typeattr"` } type ExecuteSimpleCommand ExecuteSimpleCommandRequestType func init() { t["ExecuteSimpleCommand"] = reflect.TypeOf((*ExecuteSimpleCommand)(nil)).Elem() } type ExecuteSimpleCommandRequestType struct { This ManagedObjectReference `xml:"_this"` Arguments []string `xml:"arguments,omitempty"` } func init() { t["ExecuteSimpleCommandRequestType"] = reflect.TypeOf((*ExecuteSimpleCommandRequestType)(nil)).Elem() } type ExecuteSimpleCommandResponse struct { Returnval string `xml:"returnval"` } type ExitLockdownMode ExitLockdownModeRequestType func init() { t["ExitLockdownMode"] = reflect.TypeOf((*ExitLockdownMode)(nil)).Elem() } type ExitLockdownModeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ExitLockdownModeRequestType"] = reflect.TypeOf((*ExitLockdownModeRequestType)(nil)).Elem() } type ExitLockdownModeResponse struct { } type ExitMaintenanceModeEvent struct { HostEvent } func init() { t["ExitMaintenanceModeEvent"] = reflect.TypeOf((*ExitMaintenanceModeEvent)(nil)).Elem() } type ExitMaintenanceModeRequestType struct { This ManagedObjectReference `xml:"_this"` Timeout int32 `xml:"timeout"` } func init() { t["ExitMaintenanceModeRequestType"] = reflect.TypeOf((*ExitMaintenanceModeRequestType)(nil)).Elem() } type ExitMaintenanceMode_Task ExitMaintenanceModeRequestType func init() { t["ExitMaintenanceMode_Task"] = reflect.TypeOf((*ExitMaintenanceMode_Task)(nil)).Elem() } type ExitMaintenanceMode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExitStandbyModeFailedEvent struct { HostEvent } func init() { t["ExitStandbyModeFailedEvent"] = reflect.TypeOf((*ExitStandbyModeFailedEvent)(nil)).Elem() } type ExitedStandbyModeEvent struct { HostEvent } func init() { t["ExitedStandbyModeEvent"] = reflect.TypeOf((*ExitedStandbyModeEvent)(nil)).Elem() } type ExitingStandbyModeEvent struct { HostEvent } func init() { t["ExitingStandbyModeEvent"] = reflect.TypeOf((*ExitingStandbyModeEvent)(nil)).Elem() } type ExpandVmfsDatastore ExpandVmfsDatastoreRequestType func init() { t["ExpandVmfsDatastore"] = reflect.TypeOf((*ExpandVmfsDatastore)(nil)).Elem() } type ExpandVmfsDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` Spec VmfsDatastoreExpandSpec `xml:"spec"` } func init() { t["ExpandVmfsDatastoreRequestType"] = reflect.TypeOf((*ExpandVmfsDatastoreRequestType)(nil)).Elem() } type ExpandVmfsDatastoreResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExpandVmfsExtent ExpandVmfsExtentRequestType func init() { t["ExpandVmfsExtent"] = reflect.TypeOf((*ExpandVmfsExtent)(nil)).Elem() } type ExpandVmfsExtentRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsPath string `xml:"vmfsPath"` Extent HostScsiDiskPartition `xml:"extent"` } func init() { t["ExpandVmfsExtentRequestType"] = reflect.TypeOf((*ExpandVmfsExtentRequestType)(nil)).Elem() } type ExpandVmfsExtentResponse struct { } type ExpiredAddonLicense struct { ExpiredFeatureLicense } func init() { t["ExpiredAddonLicense"] = reflect.TypeOf((*ExpiredAddonLicense)(nil)).Elem() } type ExpiredAddonLicenseFault ExpiredAddonLicense func init() { t["ExpiredAddonLicenseFault"] = reflect.TypeOf((*ExpiredAddonLicenseFault)(nil)).Elem() } type ExpiredEditionLicense struct { ExpiredFeatureLicense } func init() { t["ExpiredEditionLicense"] = reflect.TypeOf((*ExpiredEditionLicense)(nil)).Elem() } type ExpiredEditionLicenseFault ExpiredEditionLicense func init() { t["ExpiredEditionLicenseFault"] = reflect.TypeOf((*ExpiredEditionLicenseFault)(nil)).Elem() } type ExpiredFeatureLicense struct { NotEnoughLicenses Feature string `xml:"feature"` Count int32 `xml:"count"` ExpirationDate time.Time `xml:"expirationDate"` } func init() { t["ExpiredFeatureLicense"] = reflect.TypeOf((*ExpiredFeatureLicense)(nil)).Elem() } type ExpiredFeatureLicenseFault BaseExpiredFeatureLicense func init() { t["ExpiredFeatureLicenseFault"] = reflect.TypeOf((*ExpiredFeatureLicenseFault)(nil)).Elem() } type ExportAnswerFileRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` } func init() { t["ExportAnswerFileRequestType"] = reflect.TypeOf((*ExportAnswerFileRequestType)(nil)).Elem() } type ExportAnswerFile_Task ExportAnswerFileRequestType func init() { t["ExportAnswerFile_Task"] = reflect.TypeOf((*ExportAnswerFile_Task)(nil)).Elem() } type ExportAnswerFile_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExportProfile ExportProfileRequestType func init() { t["ExportProfile"] = reflect.TypeOf((*ExportProfile)(nil)).Elem() } type ExportProfileRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ExportProfileRequestType"] = reflect.TypeOf((*ExportProfileRequestType)(nil)).Elem() } type ExportProfileResponse struct { Returnval string `xml:"returnval"` } type ExportSnapshot ExportSnapshotRequestType func init() { t["ExportSnapshot"] = reflect.TypeOf((*ExportSnapshot)(nil)).Elem() } type ExportSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ExportSnapshotRequestType"] = reflect.TypeOf((*ExportSnapshotRequestType)(nil)).Elem() } type ExportSnapshotResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExportVApp ExportVAppRequestType func init() { t["ExportVApp"] = reflect.TypeOf((*ExportVApp)(nil)).Elem() } type ExportVAppRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ExportVAppRequestType"] = reflect.TypeOf((*ExportVAppRequestType)(nil)).Elem() } type ExportVAppResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExportVm ExportVmRequestType func init() { t["ExportVm"] = reflect.TypeOf((*ExportVm)(nil)).Elem() } type ExportVmRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ExportVmRequestType"] = reflect.TypeOf((*ExportVmRequestType)(nil)).Elem() } type ExportVmResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExtExtendedProductInfo struct { DynamicData CompanyUrl string `xml:"companyUrl,omitempty"` ProductUrl string `xml:"productUrl,omitempty"` ManagementUrl string `xml:"managementUrl,omitempty"` Self *ManagedObjectReference `xml:"self,omitempty"` } func init() { t["ExtExtendedProductInfo"] = reflect.TypeOf((*ExtExtendedProductInfo)(nil)).Elem() } type ExtManagedEntityInfo struct { DynamicData Type string `xml:"type"` SmallIconUrl string `xml:"smallIconUrl,omitempty"` IconUrl string `xml:"iconUrl,omitempty"` Description string `xml:"description,omitempty"` } func init() { t["ExtManagedEntityInfo"] = reflect.TypeOf((*ExtManagedEntityInfo)(nil)).Elem() } type ExtSolutionManagerInfo struct { DynamicData Tab []ExtSolutionManagerInfoTabInfo `xml:"tab,omitempty"` SmallIconUrl string `xml:"smallIconUrl,omitempty"` } func init() { t["ExtSolutionManagerInfo"] = reflect.TypeOf((*ExtSolutionManagerInfo)(nil)).Elem() } type ExtSolutionManagerInfoTabInfo struct { DynamicData Label string `xml:"label"` Url string `xml:"url"` } func init() { t["ExtSolutionManagerInfoTabInfo"] = reflect.TypeOf((*ExtSolutionManagerInfoTabInfo)(nil)).Elem() } type ExtendDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` NewCapacityInMB int64 `xml:"newCapacityInMB"` } func init() { t["ExtendDiskRequestType"] = reflect.TypeOf((*ExtendDiskRequestType)(nil)).Elem() } type ExtendDisk_Task ExtendDiskRequestType func init() { t["ExtendDisk_Task"] = reflect.TypeOf((*ExtendDisk_Task)(nil)).Elem() } type ExtendDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExtendVffs ExtendVffsRequestType func init() { t["ExtendVffs"] = reflect.TypeOf((*ExtendVffs)(nil)).Elem() } type ExtendVffsRequestType struct { This ManagedObjectReference `xml:"_this"` VffsPath string `xml:"vffsPath"` DevicePath string `xml:"devicePath"` Spec *HostDiskPartitionSpec `xml:"spec,omitempty"` } func init() { t["ExtendVffsRequestType"] = reflect.TypeOf((*ExtendVffsRequestType)(nil)).Elem() } type ExtendVffsResponse struct { } type ExtendVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` NewCapacityKb int64 `xml:"newCapacityKb"` EagerZero *bool `xml:"eagerZero"` } func init() { t["ExtendVirtualDiskRequestType"] = reflect.TypeOf((*ExtendVirtualDiskRequestType)(nil)).Elem() } type ExtendVirtualDisk_Task ExtendVirtualDiskRequestType func init() { t["ExtendVirtualDisk_Task"] = reflect.TypeOf((*ExtendVirtualDisk_Task)(nil)).Elem() } type ExtendVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExtendVmfsDatastore ExtendVmfsDatastoreRequestType func init() { t["ExtendVmfsDatastore"] = reflect.TypeOf((*ExtendVmfsDatastore)(nil)).Elem() } type ExtendVmfsDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` Spec VmfsDatastoreExtendSpec `xml:"spec"` } func init() { t["ExtendVmfsDatastoreRequestType"] = reflect.TypeOf((*ExtendVmfsDatastoreRequestType)(nil)).Elem() } type ExtendVmfsDatastoreResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ExtendedDescription struct { Description MessageCatalogKeyPrefix string `xml:"messageCatalogKeyPrefix"` MessageArg []KeyAnyValue `xml:"messageArg,omitempty"` } func init() { t["ExtendedDescription"] = reflect.TypeOf((*ExtendedDescription)(nil)).Elem() } type ExtendedElementDescription struct { ElementDescription MessageCatalogKeyPrefix string `xml:"messageCatalogKeyPrefix"` MessageArg []KeyAnyValue `xml:"messageArg,omitempty"` } func init() { t["ExtendedElementDescription"] = reflect.TypeOf((*ExtendedElementDescription)(nil)).Elem() } type ExtendedEvent struct { GeneralEvent EventTypeId string `xml:"eventTypeId"` ManagedObject ManagedObjectReference `xml:"managedObject"` Data []ExtendedEventPair `xml:"data,omitempty"` } func init() { t["ExtendedEvent"] = reflect.TypeOf((*ExtendedEvent)(nil)).Elem() } type ExtendedEventPair struct { DynamicData Key string `xml:"key"` Value string `xml:"value"` } func init() { t["ExtendedEventPair"] = reflect.TypeOf((*ExtendedEventPair)(nil)).Elem() } type ExtendedFault struct { VimFault FaultTypeId string `xml:"faultTypeId"` Data []KeyValue `xml:"data,omitempty"` } func init() { t["ExtendedFault"] = reflect.TypeOf((*ExtendedFault)(nil)).Elem() } type ExtendedFaultFault ExtendedFault func init() { t["ExtendedFaultFault"] = reflect.TypeOf((*ExtendedFaultFault)(nil)).Elem() } type Extension struct { DynamicData Description BaseDescription `xml:"description,typeattr"` Key string `xml:"key"` Company string `xml:"company,omitempty"` Type string `xml:"type,omitempty"` Version string `xml:"version"` SubjectName string `xml:"subjectName,omitempty"` Server []ExtensionServerInfo `xml:"server,omitempty"` Client []ExtensionClientInfo `xml:"client,omitempty"` TaskList []ExtensionTaskTypeInfo `xml:"taskList,omitempty"` EventList []ExtensionEventTypeInfo `xml:"eventList,omitempty"` FaultList []ExtensionFaultTypeInfo `xml:"faultList,omitempty"` PrivilegeList []ExtensionPrivilegeInfo `xml:"privilegeList,omitempty"` ResourceList []ExtensionResourceInfo `xml:"resourceList,omitempty"` LastHeartbeatTime time.Time `xml:"lastHeartbeatTime"` HealthInfo *ExtensionHealthInfo `xml:"healthInfo,omitempty"` OvfConsumerInfo *ExtensionOvfConsumerInfo `xml:"ovfConsumerInfo,omitempty"` ExtendedProductInfo *ExtExtendedProductInfo `xml:"extendedProductInfo,omitempty"` ManagedEntityInfo []ExtManagedEntityInfo `xml:"managedEntityInfo,omitempty"` ShownInSolutionManager *bool `xml:"shownInSolutionManager"` SolutionManagerInfo *ExtSolutionManagerInfo `xml:"solutionManagerInfo,omitempty"` } func init() { t["Extension"] = reflect.TypeOf((*Extension)(nil)).Elem() } type ExtensionClientInfo struct { DynamicData Version string `xml:"version"` Description BaseDescription `xml:"description,typeattr"` Company string `xml:"company"` Type string `xml:"type"` Url string `xml:"url"` } func init() { t["ExtensionClientInfo"] = reflect.TypeOf((*ExtensionClientInfo)(nil)).Elem() } type ExtensionEventTypeInfo struct { DynamicData EventID string `xml:"eventID"` EventTypeSchema string `xml:"eventTypeSchema,omitempty"` } func init() { t["ExtensionEventTypeInfo"] = reflect.TypeOf((*ExtensionEventTypeInfo)(nil)).Elem() } type ExtensionFaultTypeInfo struct { DynamicData FaultID string `xml:"faultID"` } func init() { t["ExtensionFaultTypeInfo"] = reflect.TypeOf((*ExtensionFaultTypeInfo)(nil)).Elem() } type ExtensionHealthInfo struct { DynamicData Url string `xml:"url"` } func init() { t["ExtensionHealthInfo"] = reflect.TypeOf((*ExtensionHealthInfo)(nil)).Elem() } type ExtensionManagerIpAllocationUsage struct { DynamicData ExtensionKey string `xml:"extensionKey"` NumAddresses int32 `xml:"numAddresses"` } func init() { t["ExtensionManagerIpAllocationUsage"] = reflect.TypeOf((*ExtensionManagerIpAllocationUsage)(nil)).Elem() } type ExtensionOvfConsumerInfo struct { DynamicData CallbackUrl string `xml:"callbackUrl"` SectionType []string `xml:"sectionType"` } func init() { t["ExtensionOvfConsumerInfo"] = reflect.TypeOf((*ExtensionOvfConsumerInfo)(nil)).Elem() } type ExtensionPrivilegeInfo struct { DynamicData PrivID string `xml:"privID"` PrivGroupName string `xml:"privGroupName"` } func init() { t["ExtensionPrivilegeInfo"] = reflect.TypeOf((*ExtensionPrivilegeInfo)(nil)).Elem() } type ExtensionResourceInfo struct { DynamicData Locale string `xml:"locale"` Module string `xml:"module"` Data []KeyValue `xml:"data"` } func init() { t["ExtensionResourceInfo"] = reflect.TypeOf((*ExtensionResourceInfo)(nil)).Elem() } type ExtensionServerInfo struct { DynamicData Url string `xml:"url"` Description BaseDescription `xml:"description,typeattr"` Company string `xml:"company"` Type string `xml:"type"` AdminEmail []string `xml:"adminEmail"` ServerThumbprint string `xml:"serverThumbprint,omitempty"` } func init() { t["ExtensionServerInfo"] = reflect.TypeOf((*ExtensionServerInfo)(nil)).Elem() } type ExtensionTaskTypeInfo struct { DynamicData TaskID string `xml:"taskID"` } func init() { t["ExtensionTaskTypeInfo"] = reflect.TypeOf((*ExtensionTaskTypeInfo)(nil)).Elem() } type ExtractOvfEnvironment ExtractOvfEnvironmentRequestType func init() { t["ExtractOvfEnvironment"] = reflect.TypeOf((*ExtractOvfEnvironment)(nil)).Elem() } type ExtractOvfEnvironmentRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ExtractOvfEnvironmentRequestType"] = reflect.TypeOf((*ExtractOvfEnvironmentRequestType)(nil)).Elem() } type ExtractOvfEnvironmentResponse struct { Returnval string `xml:"returnval"` } type FailToEnableSPBM struct { NotEnoughLicenses Cs ManagedObjectReference `xml:"cs"` CsName string `xml:"csName"` HostLicenseStates []ComputeResourceHostSPBMLicenseInfo `xml:"hostLicenseStates"` } func init() { t["FailToEnableSPBM"] = reflect.TypeOf((*FailToEnableSPBM)(nil)).Elem() } type FailToEnableSPBMFault FailToEnableSPBM func init() { t["FailToEnableSPBMFault"] = reflect.TypeOf((*FailToEnableSPBMFault)(nil)).Elem() } type FailToLockFaultToleranceVMs struct { RuntimeFault VmName string `xml:"vmName"` Vm ManagedObjectReference `xml:"vm"` AlreadyLockedVm ManagedObjectReference `xml:"alreadyLockedVm"` } func init() { t["FailToLockFaultToleranceVMs"] = reflect.TypeOf((*FailToLockFaultToleranceVMs)(nil)).Elem() } type FailToLockFaultToleranceVMsFault FailToLockFaultToleranceVMs func init() { t["FailToLockFaultToleranceVMsFault"] = reflect.TypeOf((*FailToLockFaultToleranceVMsFault)(nil)).Elem() } type FailoverLevelRestored struct { ClusterEvent } func init() { t["FailoverLevelRestored"] = reflect.TypeOf((*FailoverLevelRestored)(nil)).Elem() } type FailoverNodeInfo struct { DynamicData ClusterIpSettings CustomizationIPSettings `xml:"clusterIpSettings"` FailoverIp *CustomizationIPSettings `xml:"failoverIp,omitempty"` BiosUuid string `xml:"biosUuid,omitempty"` } func init() { t["FailoverNodeInfo"] = reflect.TypeOf((*FailoverNodeInfo)(nil)).Elem() } type FaultDomainId struct { DynamicData Id string `xml:"id"` } func init() { t["FaultDomainId"] = reflect.TypeOf((*FaultDomainId)(nil)).Elem() } type FaultToleranceAntiAffinityViolated struct { MigrationFault HostName string `xml:"hostName"` Host ManagedObjectReference `xml:"host"` } func init() { t["FaultToleranceAntiAffinityViolated"] = reflect.TypeOf((*FaultToleranceAntiAffinityViolated)(nil)).Elem() } type FaultToleranceAntiAffinityViolatedFault FaultToleranceAntiAffinityViolated func init() { t["FaultToleranceAntiAffinityViolatedFault"] = reflect.TypeOf((*FaultToleranceAntiAffinityViolatedFault)(nil)).Elem() } type FaultToleranceCannotEditMem struct { VmConfigFault VmName string `xml:"vmName"` Vm ManagedObjectReference `xml:"vm"` } func init() { t["FaultToleranceCannotEditMem"] = reflect.TypeOf((*FaultToleranceCannotEditMem)(nil)).Elem() } type FaultToleranceCannotEditMemFault FaultToleranceCannotEditMem func init() { t["FaultToleranceCannotEditMemFault"] = reflect.TypeOf((*FaultToleranceCannotEditMemFault)(nil)).Elem() } type FaultToleranceConfigInfo struct { DynamicData Role int32 `xml:"role"` InstanceUuids []string `xml:"instanceUuids"` ConfigPaths []string `xml:"configPaths"` Orphaned *bool `xml:"orphaned"` } func init() { t["FaultToleranceConfigInfo"] = reflect.TypeOf((*FaultToleranceConfigInfo)(nil)).Elem() } type FaultToleranceConfigSpec struct { DynamicData MetaDataPath *FaultToleranceMetaSpec `xml:"metaDataPath,omitempty"` SecondaryVmSpec *FaultToleranceVMConfigSpec `xml:"secondaryVmSpec,omitempty"` } func init() { t["FaultToleranceConfigSpec"] = reflect.TypeOf((*FaultToleranceConfigSpec)(nil)).Elem() } type FaultToleranceCpuIncompatible struct { CpuIncompatible Model bool `xml:"model"` Family bool `xml:"family"` Stepping bool `xml:"stepping"` } func init() { t["FaultToleranceCpuIncompatible"] = reflect.TypeOf((*FaultToleranceCpuIncompatible)(nil)).Elem() } type FaultToleranceCpuIncompatibleFault FaultToleranceCpuIncompatible func init() { t["FaultToleranceCpuIncompatibleFault"] = reflect.TypeOf((*FaultToleranceCpuIncompatibleFault)(nil)).Elem() } type FaultToleranceDiskSpec struct { DynamicData Disk BaseVirtualDevice `xml:"disk,typeattr"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["FaultToleranceDiskSpec"] = reflect.TypeOf((*FaultToleranceDiskSpec)(nil)).Elem() } type FaultToleranceMetaSpec struct { DynamicData MetaDataDatastore ManagedObjectReference `xml:"metaDataDatastore"` } func init() { t["FaultToleranceMetaSpec"] = reflect.TypeOf((*FaultToleranceMetaSpec)(nil)).Elem() } type FaultToleranceNeedsThickDisk struct { MigrationFault VmName string `xml:"vmName"` } func init() { t["FaultToleranceNeedsThickDisk"] = reflect.TypeOf((*FaultToleranceNeedsThickDisk)(nil)).Elem() } type FaultToleranceNeedsThickDiskFault FaultToleranceNeedsThickDisk func init() { t["FaultToleranceNeedsThickDiskFault"] = reflect.TypeOf((*FaultToleranceNeedsThickDiskFault)(nil)).Elem() } type FaultToleranceNotLicensed struct { VmFaultToleranceIssue HostName string `xml:"hostName,omitempty"` } func init() { t["FaultToleranceNotLicensed"] = reflect.TypeOf((*FaultToleranceNotLicensed)(nil)).Elem() } type FaultToleranceNotLicensedFault FaultToleranceNotLicensed func init() { t["FaultToleranceNotLicensedFault"] = reflect.TypeOf((*FaultToleranceNotLicensedFault)(nil)).Elem() } type FaultToleranceNotSameBuild struct { MigrationFault Build string `xml:"build"` } func init() { t["FaultToleranceNotSameBuild"] = reflect.TypeOf((*FaultToleranceNotSameBuild)(nil)).Elem() } type FaultToleranceNotSameBuildFault FaultToleranceNotSameBuild func init() { t["FaultToleranceNotSameBuildFault"] = reflect.TypeOf((*FaultToleranceNotSameBuildFault)(nil)).Elem() } type FaultTolerancePrimaryConfigInfo struct { FaultToleranceConfigInfo Secondaries []ManagedObjectReference `xml:"secondaries"` } func init() { t["FaultTolerancePrimaryConfigInfo"] = reflect.TypeOf((*FaultTolerancePrimaryConfigInfo)(nil)).Elem() } type FaultTolerancePrimaryPowerOnNotAttempted struct { VmFaultToleranceIssue SecondaryVm ManagedObjectReference `xml:"secondaryVm"` PrimaryVm ManagedObjectReference `xml:"primaryVm"` } func init() { t["FaultTolerancePrimaryPowerOnNotAttempted"] = reflect.TypeOf((*FaultTolerancePrimaryPowerOnNotAttempted)(nil)).Elem() } type FaultTolerancePrimaryPowerOnNotAttemptedFault FaultTolerancePrimaryPowerOnNotAttempted func init() { t["FaultTolerancePrimaryPowerOnNotAttemptedFault"] = reflect.TypeOf((*FaultTolerancePrimaryPowerOnNotAttemptedFault)(nil)).Elem() } type FaultToleranceSecondaryConfigInfo struct { FaultToleranceConfigInfo PrimaryVM ManagedObjectReference `xml:"primaryVM"` } func init() { t["FaultToleranceSecondaryConfigInfo"] = reflect.TypeOf((*FaultToleranceSecondaryConfigInfo)(nil)).Elem() } type FaultToleranceSecondaryOpResult struct { DynamicData Vm ManagedObjectReference `xml:"vm"` PowerOnAttempted bool `xml:"powerOnAttempted"` PowerOnResult *ClusterPowerOnVmResult `xml:"powerOnResult,omitempty"` } func init() { t["FaultToleranceSecondaryOpResult"] = reflect.TypeOf((*FaultToleranceSecondaryOpResult)(nil)).Elem() } type FaultToleranceVMConfigSpec struct { DynamicData VmConfig *ManagedObjectReference `xml:"vmConfig,omitempty"` Disks []FaultToleranceDiskSpec `xml:"disks,omitempty"` } func init() { t["FaultToleranceVMConfigSpec"] = reflect.TypeOf((*FaultToleranceVMConfigSpec)(nil)).Elem() } type FaultToleranceVmNotDasProtected struct { VimFault Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["FaultToleranceVmNotDasProtected"] = reflect.TypeOf((*FaultToleranceVmNotDasProtected)(nil)).Elem() } type FaultToleranceVmNotDasProtectedFault FaultToleranceVmNotDasProtected func init() { t["FaultToleranceVmNotDasProtectedFault"] = reflect.TypeOf((*FaultToleranceVmNotDasProtectedFault)(nil)).Elem() } type FcoeConfig struct { DynamicData PriorityClass int32 `xml:"priorityClass"` SourceMac string `xml:"sourceMac"` VlanRange []FcoeConfigVlanRange `xml:"vlanRange"` Capabilities FcoeConfigFcoeCapabilities `xml:"capabilities"` FcoeActive bool `xml:"fcoeActive"` } func init() { t["FcoeConfig"] = reflect.TypeOf((*FcoeConfig)(nil)).Elem() } type FcoeConfigFcoeCapabilities struct { DynamicData PriorityClass bool `xml:"priorityClass"` SourceMacAddress bool `xml:"sourceMacAddress"` VlanRange bool `xml:"vlanRange"` } func init() { t["FcoeConfigFcoeCapabilities"] = reflect.TypeOf((*FcoeConfigFcoeCapabilities)(nil)).Elem() } type FcoeConfigFcoeSpecification struct { DynamicData UnderlyingPnic string `xml:"underlyingPnic"` PriorityClass int32 `xml:"priorityClass,omitempty"` SourceMac string `xml:"sourceMac,omitempty"` VlanRange []FcoeConfigVlanRange `xml:"vlanRange,omitempty"` } func init() { t["FcoeConfigFcoeSpecification"] = reflect.TypeOf((*FcoeConfigFcoeSpecification)(nil)).Elem() } type FcoeConfigVlanRange struct { DynamicData VlanLow int32 `xml:"vlanLow"` VlanHigh int32 `xml:"vlanHigh"` } func init() { t["FcoeConfigVlanRange"] = reflect.TypeOf((*FcoeConfigVlanRange)(nil)).Elem() } type FcoeFault struct { VimFault } func init() { t["FcoeFault"] = reflect.TypeOf((*FcoeFault)(nil)).Elem() } type FcoeFaultFault BaseFcoeFault func init() { t["FcoeFaultFault"] = reflect.TypeOf((*FcoeFaultFault)(nil)).Elem() } type FcoeFaultPnicHasNoPortSet struct { FcoeFault NicDevice string `xml:"nicDevice"` } func init() { t["FcoeFaultPnicHasNoPortSet"] = reflect.TypeOf((*FcoeFaultPnicHasNoPortSet)(nil)).Elem() } type FcoeFaultPnicHasNoPortSetFault FcoeFaultPnicHasNoPortSet func init() { t["FcoeFaultPnicHasNoPortSetFault"] = reflect.TypeOf((*FcoeFaultPnicHasNoPortSetFault)(nil)).Elem() } type FeatureRequirementsNotMet struct { VirtualHardwareCompatibilityIssue FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` Vm *ManagedObjectReference `xml:"vm,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["FeatureRequirementsNotMet"] = reflect.TypeOf((*FeatureRequirementsNotMet)(nil)).Elem() } type FeatureRequirementsNotMetFault FeatureRequirementsNotMet func init() { t["FeatureRequirementsNotMetFault"] = reflect.TypeOf((*FeatureRequirementsNotMetFault)(nil)).Elem() } type FetchDVPortKeys FetchDVPortKeysRequestType func init() { t["FetchDVPortKeys"] = reflect.TypeOf((*FetchDVPortKeys)(nil)).Elem() } type FetchDVPortKeysRequestType struct { This ManagedObjectReference `xml:"_this"` Criteria *DistributedVirtualSwitchPortCriteria `xml:"criteria,omitempty"` } func init() { t["FetchDVPortKeysRequestType"] = reflect.TypeOf((*FetchDVPortKeysRequestType)(nil)).Elem() } type FetchDVPortKeysResponse struct { Returnval []string `xml:"returnval,omitempty"` } type FetchDVPorts FetchDVPortsRequestType func init() { t["FetchDVPorts"] = reflect.TypeOf((*FetchDVPorts)(nil)).Elem() } type FetchDVPortsRequestType struct { This ManagedObjectReference `xml:"_this"` Criteria *DistributedVirtualSwitchPortCriteria `xml:"criteria,omitempty"` } func init() { t["FetchDVPortsRequestType"] = reflect.TypeOf((*FetchDVPortsRequestType)(nil)).Elem() } type FetchDVPortsResponse struct { Returnval []DistributedVirtualPort `xml:"returnval,omitempty"` } type FetchSystemEventLog FetchSystemEventLogRequestType func init() { t["FetchSystemEventLog"] = reflect.TypeOf((*FetchSystemEventLog)(nil)).Elem() } type FetchSystemEventLogRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["FetchSystemEventLogRequestType"] = reflect.TypeOf((*FetchSystemEventLogRequestType)(nil)).Elem() } type FetchSystemEventLogResponse struct { Returnval []SystemEventInfo `xml:"returnval,omitempty"` } type FetchUserPrivilegeOnEntities FetchUserPrivilegeOnEntitiesRequestType func init() { t["FetchUserPrivilegeOnEntities"] = reflect.TypeOf((*FetchUserPrivilegeOnEntities)(nil)).Elem() } type FetchUserPrivilegeOnEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` Entities []ManagedObjectReference `xml:"entities"` UserName string `xml:"userName"` } func init() { t["FetchUserPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*FetchUserPrivilegeOnEntitiesRequestType)(nil)).Elem() } type FetchUserPrivilegeOnEntitiesResponse struct { Returnval []UserPrivilegeResult `xml:"returnval,omitempty"` } type FileAlreadyExists struct { FileFault } func init() { t["FileAlreadyExists"] = reflect.TypeOf((*FileAlreadyExists)(nil)).Elem() } type FileAlreadyExistsFault FileAlreadyExists func init() { t["FileAlreadyExistsFault"] = reflect.TypeOf((*FileAlreadyExistsFault)(nil)).Elem() } type FileBackedPortNotSupported struct { DeviceNotSupported } func init() { t["FileBackedPortNotSupported"] = reflect.TypeOf((*FileBackedPortNotSupported)(nil)).Elem() } type FileBackedPortNotSupportedFault FileBackedPortNotSupported func init() { t["FileBackedPortNotSupportedFault"] = reflect.TypeOf((*FileBackedPortNotSupportedFault)(nil)).Elem() } type FileBackedVirtualDiskSpec struct { VirtualDiskSpec CapacityKb int64 `xml:"capacityKb"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` } func init() { t["FileBackedVirtualDiskSpec"] = reflect.TypeOf((*FileBackedVirtualDiskSpec)(nil)).Elem() } type FileFault struct { VimFault File string `xml:"file"` } func init() { t["FileFault"] = reflect.TypeOf((*FileFault)(nil)).Elem() } type FileFaultFault BaseFileFault func init() { t["FileFaultFault"] = reflect.TypeOf((*FileFaultFault)(nil)).Elem() } type FileInfo struct { DynamicData Path string `xml:"path"` FriendlyName string `xml:"friendlyName,omitempty"` FileSize int64 `xml:"fileSize,omitempty"` Modification *time.Time `xml:"modification"` Owner string `xml:"owner,omitempty"` } func init() { t["FileInfo"] = reflect.TypeOf((*FileInfo)(nil)).Elem() } type FileLocked struct { FileFault } func init() { t["FileLocked"] = reflect.TypeOf((*FileLocked)(nil)).Elem() } type FileLockedFault FileLocked func init() { t["FileLockedFault"] = reflect.TypeOf((*FileLockedFault)(nil)).Elem() } type FileNameTooLong struct { FileFault } func init() { t["FileNameTooLong"] = reflect.TypeOf((*FileNameTooLong)(nil)).Elem() } type FileNameTooLongFault FileNameTooLong func init() { t["FileNameTooLongFault"] = reflect.TypeOf((*FileNameTooLongFault)(nil)).Elem() } type FileNotFound struct { FileFault } func init() { t["FileNotFound"] = reflect.TypeOf((*FileNotFound)(nil)).Elem() } type FileNotFoundFault FileNotFound func init() { t["FileNotFoundFault"] = reflect.TypeOf((*FileNotFoundFault)(nil)).Elem() } type FileNotWritable struct { FileFault } func init() { t["FileNotWritable"] = reflect.TypeOf((*FileNotWritable)(nil)).Elem() } type FileNotWritableFault FileNotWritable func init() { t["FileNotWritableFault"] = reflect.TypeOf((*FileNotWritableFault)(nil)).Elem() } type FileQuery struct { DynamicData } func init() { t["FileQuery"] = reflect.TypeOf((*FileQuery)(nil)).Elem() } type FileQueryFlags struct { DynamicData FileType bool `xml:"fileType"` FileSize bool `xml:"fileSize"` Modification bool `xml:"modification"` FileOwner *bool `xml:"fileOwner"` } func init() { t["FileQueryFlags"] = reflect.TypeOf((*FileQueryFlags)(nil)).Elem() } type FileTooLarge struct { FileFault Datastore string `xml:"datastore"` FileSize int64 `xml:"fileSize"` MaxFileSize int64 `xml:"maxFileSize,omitempty"` } func init() { t["FileTooLarge"] = reflect.TypeOf((*FileTooLarge)(nil)).Elem() } type FileTooLargeFault FileTooLarge func init() { t["FileTooLargeFault"] = reflect.TypeOf((*FileTooLargeFault)(nil)).Elem() } type FileTransferInformation struct { DynamicData Attributes BaseGuestFileAttributes `xml:"attributes,typeattr"` Size int64 `xml:"size"` Url string `xml:"url"` } func init() { t["FileTransferInformation"] = reflect.TypeOf((*FileTransferInformation)(nil)).Elem() } type FilesystemQuiesceFault struct { SnapshotFault } func init() { t["FilesystemQuiesceFault"] = reflect.TypeOf((*FilesystemQuiesceFault)(nil)).Elem() } type FilesystemQuiesceFaultFault FilesystemQuiesceFault func init() { t["FilesystemQuiesceFaultFault"] = reflect.TypeOf((*FilesystemQuiesceFaultFault)(nil)).Elem() } type FilterInUse struct { ResourceInUse Disk []VirtualDiskId `xml:"disk,omitempty"` } func init() { t["FilterInUse"] = reflect.TypeOf((*FilterInUse)(nil)).Elem() } type FilterInUseFault FilterInUse func init() { t["FilterInUseFault"] = reflect.TypeOf((*FilterInUseFault)(nil)).Elem() } type FindAllByDnsName FindAllByDnsNameRequestType func init() { t["FindAllByDnsName"] = reflect.TypeOf((*FindAllByDnsName)(nil)).Elem() } type FindAllByDnsNameRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` DnsName string `xml:"dnsName"` VmSearch bool `xml:"vmSearch"` } func init() { t["FindAllByDnsNameRequestType"] = reflect.TypeOf((*FindAllByDnsNameRequestType)(nil)).Elem() } type FindAllByDnsNameResponse struct { Returnval []ManagedObjectReference `xml:"returnval"` } type FindAllByIp FindAllByIpRequestType func init() { t["FindAllByIp"] = reflect.TypeOf((*FindAllByIp)(nil)).Elem() } type FindAllByIpRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Ip string `xml:"ip"` VmSearch bool `xml:"vmSearch"` } func init() { t["FindAllByIpRequestType"] = reflect.TypeOf((*FindAllByIpRequestType)(nil)).Elem() } type FindAllByIpResponse struct { Returnval []ManagedObjectReference `xml:"returnval"` } type FindAllByUuid FindAllByUuidRequestType func init() { t["FindAllByUuid"] = reflect.TypeOf((*FindAllByUuid)(nil)).Elem() } type FindAllByUuidRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Uuid string `xml:"uuid"` VmSearch bool `xml:"vmSearch"` InstanceUuid *bool `xml:"instanceUuid"` } func init() { t["FindAllByUuidRequestType"] = reflect.TypeOf((*FindAllByUuidRequestType)(nil)).Elem() } type FindAllByUuidResponse struct { Returnval []ManagedObjectReference `xml:"returnval"` } type FindAssociatedProfile FindAssociatedProfileRequestType func init() { t["FindAssociatedProfile"] = reflect.TypeOf((*FindAssociatedProfile)(nil)).Elem() } type FindAssociatedProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["FindAssociatedProfileRequestType"] = reflect.TypeOf((*FindAssociatedProfileRequestType)(nil)).Elem() } type FindAssociatedProfileResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type FindByDatastorePath FindByDatastorePathRequestType func init() { t["FindByDatastorePath"] = reflect.TypeOf((*FindByDatastorePath)(nil)).Elem() } type FindByDatastorePathRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter ManagedObjectReference `xml:"datacenter"` Path string `xml:"path"` } func init() { t["FindByDatastorePathRequestType"] = reflect.TypeOf((*FindByDatastorePathRequestType)(nil)).Elem() } type FindByDatastorePathResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type FindByDnsName FindByDnsNameRequestType func init() { t["FindByDnsName"] = reflect.TypeOf((*FindByDnsName)(nil)).Elem() } type FindByDnsNameRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` DnsName string `xml:"dnsName"` VmSearch bool `xml:"vmSearch"` } func init() { t["FindByDnsNameRequestType"] = reflect.TypeOf((*FindByDnsNameRequestType)(nil)).Elem() } type FindByDnsNameResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type FindByInventoryPath FindByInventoryPathRequestType func init() { t["FindByInventoryPath"] = reflect.TypeOf((*FindByInventoryPath)(nil)).Elem() } type FindByInventoryPathRequestType struct { This ManagedObjectReference `xml:"_this"` InventoryPath string `xml:"inventoryPath"` } func init() { t["FindByInventoryPathRequestType"] = reflect.TypeOf((*FindByInventoryPathRequestType)(nil)).Elem() } type FindByInventoryPathResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type FindByIp FindByIpRequestType func init() { t["FindByIp"] = reflect.TypeOf((*FindByIp)(nil)).Elem() } type FindByIpRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Ip string `xml:"ip"` VmSearch bool `xml:"vmSearch"` } func init() { t["FindByIpRequestType"] = reflect.TypeOf((*FindByIpRequestType)(nil)).Elem() } type FindByIpResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type FindByUuid FindByUuidRequestType func init() { t["FindByUuid"] = reflect.TypeOf((*FindByUuid)(nil)).Elem() } type FindByUuidRequestType struct { This ManagedObjectReference `xml:"_this"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Uuid string `xml:"uuid"` VmSearch bool `xml:"vmSearch"` InstanceUuid *bool `xml:"instanceUuid"` } func init() { t["FindByUuidRequestType"] = reflect.TypeOf((*FindByUuidRequestType)(nil)).Elem() } type FindByUuidResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type FindChild FindChildRequestType func init() { t["FindChild"] = reflect.TypeOf((*FindChild)(nil)).Elem() } type FindChildRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Name string `xml:"name"` } func init() { t["FindChildRequestType"] = reflect.TypeOf((*FindChildRequestType)(nil)).Elem() } type FindChildResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type FindExtension FindExtensionRequestType func init() { t["FindExtension"] = reflect.TypeOf((*FindExtension)(nil)).Elem() } type FindExtensionRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` } func init() { t["FindExtensionRequestType"] = reflect.TypeOf((*FindExtensionRequestType)(nil)).Elem() } type FindExtensionResponse struct { Returnval *Extension `xml:"returnval,omitempty"` } type FindRulesForVm FindRulesForVmRequestType func init() { t["FindRulesForVm"] = reflect.TypeOf((*FindRulesForVm)(nil)).Elem() } type FindRulesForVmRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` } func init() { t["FindRulesForVmRequestType"] = reflect.TypeOf((*FindRulesForVmRequestType)(nil)).Elem() } type FindRulesForVmResponse struct { Returnval []BaseClusterRuleInfo `xml:"returnval,omitempty,typeattr"` } type FirewallProfile struct { ApplyProfile Ruleset []FirewallProfileRulesetProfile `xml:"ruleset,omitempty"` } func init() { t["FirewallProfile"] = reflect.TypeOf((*FirewallProfile)(nil)).Elem() } type FirewallProfileRulesetProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["FirewallProfileRulesetProfile"] = reflect.TypeOf((*FirewallProfileRulesetProfile)(nil)).Elem() } type FloatOption struct { OptionType Min float32 `xml:"min"` Max float32 `xml:"max"` DefaultValue float32 `xml:"defaultValue"` } func init() { t["FloatOption"] = reflect.TypeOf((*FloatOption)(nil)).Elem() } type FloppyImageFileInfo struct { FileInfo } func init() { t["FloppyImageFileInfo"] = reflect.TypeOf((*FloppyImageFileInfo)(nil)).Elem() } type FloppyImageFileQuery struct { FileQuery } func init() { t["FloppyImageFileQuery"] = reflect.TypeOf((*FloppyImageFileQuery)(nil)).Elem() } type FolderEventArgument struct { EntityEventArgument Folder ManagedObjectReference `xml:"folder"` } func init() { t["FolderEventArgument"] = reflect.TypeOf((*FolderEventArgument)(nil)).Elem() } type FolderFileInfo struct { FileInfo } func init() { t["FolderFileInfo"] = reflect.TypeOf((*FolderFileInfo)(nil)).Elem() } type FolderFileQuery struct { FileQuery } func init() { t["FolderFileQuery"] = reflect.TypeOf((*FolderFileQuery)(nil)).Elem() } type FormatVffs FormatVffsRequestType func init() { t["FormatVffs"] = reflect.TypeOf((*FormatVffs)(nil)).Elem() } type FormatVffsRequestType struct { This ManagedObjectReference `xml:"_this"` CreateSpec HostVffsSpec `xml:"createSpec"` } func init() { t["FormatVffsRequestType"] = reflect.TypeOf((*FormatVffsRequestType)(nil)).Elem() } type FormatVffsResponse struct { Returnval HostVffsVolume `xml:"returnval"` } type FormatVmfs FormatVmfsRequestType func init() { t["FormatVmfs"] = reflect.TypeOf((*FormatVmfs)(nil)).Elem() } type FormatVmfsRequestType struct { This ManagedObjectReference `xml:"_this"` CreateSpec HostVmfsSpec `xml:"createSpec"` } func init() { t["FormatVmfsRequestType"] = reflect.TypeOf((*FormatVmfsRequestType)(nil)).Elem() } type FormatVmfsResponse struct { Returnval HostVmfsVolume `xml:"returnval"` } type FtIssuesOnHost struct { VmFaultToleranceIssue Host ManagedObjectReference `xml:"host"` HostName string `xml:"hostName"` Errors []LocalizedMethodFault `xml:"errors,omitempty"` } func init() { t["FtIssuesOnHost"] = reflect.TypeOf((*FtIssuesOnHost)(nil)).Elem() } type FtIssuesOnHostFault FtIssuesOnHost func init() { t["FtIssuesOnHostFault"] = reflect.TypeOf((*FtIssuesOnHostFault)(nil)).Elem() } type FullStorageVMotionNotSupported struct { MigrationFeatureNotSupported } func init() { t["FullStorageVMotionNotSupported"] = reflect.TypeOf((*FullStorageVMotionNotSupported)(nil)).Elem() } type FullStorageVMotionNotSupportedFault FullStorageVMotionNotSupported func init() { t["FullStorageVMotionNotSupportedFault"] = reflect.TypeOf((*FullStorageVMotionNotSupportedFault)(nil)).Elem() } type GatewayConnectFault struct { HostConnectFault GatewayType string `xml:"gatewayType"` GatewayId string `xml:"gatewayId"` GatewayInfo string `xml:"gatewayInfo"` Details *LocalizableMessage `xml:"details,omitempty"` } func init() { t["GatewayConnectFault"] = reflect.TypeOf((*GatewayConnectFault)(nil)).Elem() } type GatewayConnectFaultFault BaseGatewayConnectFault func init() { t["GatewayConnectFaultFault"] = reflect.TypeOf((*GatewayConnectFaultFault)(nil)).Elem() } type GatewayHostNotReachable struct { GatewayToHostConnectFault } func init() { t["GatewayHostNotReachable"] = reflect.TypeOf((*GatewayHostNotReachable)(nil)).Elem() } type GatewayHostNotReachableFault GatewayHostNotReachable func init() { t["GatewayHostNotReachableFault"] = reflect.TypeOf((*GatewayHostNotReachableFault)(nil)).Elem() } type GatewayNotFound struct { GatewayConnectFault } func init() { t["GatewayNotFound"] = reflect.TypeOf((*GatewayNotFound)(nil)).Elem() } type GatewayNotFoundFault GatewayNotFound func init() { t["GatewayNotFoundFault"] = reflect.TypeOf((*GatewayNotFoundFault)(nil)).Elem() } type GatewayNotReachable struct { GatewayConnectFault } func init() { t["GatewayNotReachable"] = reflect.TypeOf((*GatewayNotReachable)(nil)).Elem() } type GatewayNotReachableFault GatewayNotReachable func init() { t["GatewayNotReachableFault"] = reflect.TypeOf((*GatewayNotReachableFault)(nil)).Elem() } type GatewayOperationRefused struct { GatewayConnectFault } func init() { t["GatewayOperationRefused"] = reflect.TypeOf((*GatewayOperationRefused)(nil)).Elem() } type GatewayOperationRefusedFault GatewayOperationRefused func init() { t["GatewayOperationRefusedFault"] = reflect.TypeOf((*GatewayOperationRefusedFault)(nil)).Elem() } type GatewayToHostAuthFault struct { GatewayToHostConnectFault InvalidProperties []string `xml:"invalidProperties"` MissingProperties []string `xml:"missingProperties"` } func init() { t["GatewayToHostAuthFault"] = reflect.TypeOf((*GatewayToHostAuthFault)(nil)).Elem() } type GatewayToHostAuthFaultFault GatewayToHostAuthFault func init() { t["GatewayToHostAuthFaultFault"] = reflect.TypeOf((*GatewayToHostAuthFaultFault)(nil)).Elem() } type GatewayToHostConnectFault struct { GatewayConnectFault Hostname string `xml:"hostname"` Port int32 `xml:"port,omitempty"` } func init() { t["GatewayToHostConnectFault"] = reflect.TypeOf((*GatewayToHostConnectFault)(nil)).Elem() } type GatewayToHostConnectFaultFault BaseGatewayToHostConnectFault func init() { t["GatewayToHostConnectFaultFault"] = reflect.TypeOf((*GatewayToHostConnectFaultFault)(nil)).Elem() } type GatewayToHostTrustVerifyFault struct { GatewayToHostConnectFault VerificationToken string `xml:"verificationToken"` PropertiesToVerify []KeyValue `xml:"propertiesToVerify"` } func init() { t["GatewayToHostTrustVerifyFault"] = reflect.TypeOf((*GatewayToHostTrustVerifyFault)(nil)).Elem() } type GatewayToHostTrustVerifyFaultFault GatewayToHostTrustVerifyFault func init() { t["GatewayToHostTrustVerifyFaultFault"] = reflect.TypeOf((*GatewayToHostTrustVerifyFaultFault)(nil)).Elem() } type GeneralEvent struct { Event Message string `xml:"message"` } func init() { t["GeneralEvent"] = reflect.TypeOf((*GeneralEvent)(nil)).Elem() } type GeneralHostErrorEvent struct { GeneralEvent } func init() { t["GeneralHostErrorEvent"] = reflect.TypeOf((*GeneralHostErrorEvent)(nil)).Elem() } type GeneralHostInfoEvent struct { GeneralEvent } func init() { t["GeneralHostInfoEvent"] = reflect.TypeOf((*GeneralHostInfoEvent)(nil)).Elem() } type GeneralHostWarningEvent struct { GeneralEvent } func init() { t["GeneralHostWarningEvent"] = reflect.TypeOf((*GeneralHostWarningEvent)(nil)).Elem() } type GeneralUserEvent struct { GeneralEvent Entity *ManagedEntityEventArgument `xml:"entity,omitempty"` } func init() { t["GeneralUserEvent"] = reflect.TypeOf((*GeneralUserEvent)(nil)).Elem() } type GeneralVmErrorEvent struct { GeneralEvent } func init() { t["GeneralVmErrorEvent"] = reflect.TypeOf((*GeneralVmErrorEvent)(nil)).Elem() } type GeneralVmInfoEvent struct { GeneralEvent } func init() { t["GeneralVmInfoEvent"] = reflect.TypeOf((*GeneralVmInfoEvent)(nil)).Elem() } type GeneralVmWarningEvent struct { GeneralEvent } func init() { t["GeneralVmWarningEvent"] = reflect.TypeOf((*GeneralVmWarningEvent)(nil)).Elem() } type GenerateCertificateSigningRequest GenerateCertificateSigningRequestRequestType func init() { t["GenerateCertificateSigningRequest"] = reflect.TypeOf((*GenerateCertificateSigningRequest)(nil)).Elem() } type GenerateCertificateSigningRequestByDn GenerateCertificateSigningRequestByDnRequestType func init() { t["GenerateCertificateSigningRequestByDn"] = reflect.TypeOf((*GenerateCertificateSigningRequestByDn)(nil)).Elem() } type GenerateCertificateSigningRequestByDnRequestType struct { This ManagedObjectReference `xml:"_this"` DistinguishedName string `xml:"distinguishedName"` } func init() { t["GenerateCertificateSigningRequestByDnRequestType"] = reflect.TypeOf((*GenerateCertificateSigningRequestByDnRequestType)(nil)).Elem() } type GenerateCertificateSigningRequestByDnResponse struct { Returnval string `xml:"returnval"` } type GenerateCertificateSigningRequestRequestType struct { This ManagedObjectReference `xml:"_this"` UseIpAddressAsCommonName bool `xml:"useIpAddressAsCommonName"` } func init() { t["GenerateCertificateSigningRequestRequestType"] = reflect.TypeOf((*GenerateCertificateSigningRequestRequestType)(nil)).Elem() } type GenerateCertificateSigningRequestResponse struct { Returnval string `xml:"returnval"` } type GenerateClientCsr GenerateClientCsrRequestType func init() { t["GenerateClientCsr"] = reflect.TypeOf((*GenerateClientCsr)(nil)).Elem() } type GenerateClientCsrRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` } func init() { t["GenerateClientCsrRequestType"] = reflect.TypeOf((*GenerateClientCsrRequestType)(nil)).Elem() } type GenerateClientCsrResponse struct { Returnval string `xml:"returnval"` } type GenerateConfigTaskList GenerateConfigTaskListRequestType func init() { t["GenerateConfigTaskList"] = reflect.TypeOf((*GenerateConfigTaskList)(nil)).Elem() } type GenerateConfigTaskListRequestType struct { This ManagedObjectReference `xml:"_this"` ConfigSpec HostConfigSpec `xml:"configSpec"` Host ManagedObjectReference `xml:"host"` } func init() { t["GenerateConfigTaskListRequestType"] = reflect.TypeOf((*GenerateConfigTaskListRequestType)(nil)).Elem() } type GenerateConfigTaskListResponse struct { Returnval HostProfileManagerConfigTaskList `xml:"returnval"` } type GenerateHostConfigTaskSpecRequestType struct { This ManagedObjectReference `xml:"_this"` HostsInfo []StructuredCustomizations `xml:"hostsInfo,omitempty"` } func init() { t["GenerateHostConfigTaskSpecRequestType"] = reflect.TypeOf((*GenerateHostConfigTaskSpecRequestType)(nil)).Elem() } type GenerateHostConfigTaskSpec_Task GenerateHostConfigTaskSpecRequestType func init() { t["GenerateHostConfigTaskSpec_Task"] = reflect.TypeOf((*GenerateHostConfigTaskSpec_Task)(nil)).Elem() } type GenerateHostConfigTaskSpec_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type GenerateHostProfileTaskListRequestType struct { This ManagedObjectReference `xml:"_this"` ConfigSpec HostConfigSpec `xml:"configSpec"` Host ManagedObjectReference `xml:"host"` } func init() { t["GenerateHostProfileTaskListRequestType"] = reflect.TypeOf((*GenerateHostProfileTaskListRequestType)(nil)).Elem() } type GenerateHostProfileTaskList_Task GenerateHostProfileTaskListRequestType func init() { t["GenerateHostProfileTaskList_Task"] = reflect.TypeOf((*GenerateHostProfileTaskList_Task)(nil)).Elem() } type GenerateHostProfileTaskList_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type GenerateKey GenerateKeyRequestType func init() { t["GenerateKey"] = reflect.TypeOf((*GenerateKey)(nil)).Elem() } type GenerateKeyRequestType struct { This ManagedObjectReference `xml:"_this"` KeyProvider *KeyProviderId `xml:"keyProvider,omitempty"` } func init() { t["GenerateKeyRequestType"] = reflect.TypeOf((*GenerateKeyRequestType)(nil)).Elem() } type GenerateKeyResponse struct { Returnval CryptoKeyResult `xml:"returnval"` } type GenerateLogBundlesRequestType struct { This ManagedObjectReference `xml:"_this"` IncludeDefault bool `xml:"includeDefault"` Host []ManagedObjectReference `xml:"host,omitempty"` } func init() { t["GenerateLogBundlesRequestType"] = reflect.TypeOf((*GenerateLogBundlesRequestType)(nil)).Elem() } type GenerateLogBundles_Task GenerateLogBundlesRequestType func init() { t["GenerateLogBundles_Task"] = reflect.TypeOf((*GenerateLogBundles_Task)(nil)).Elem() } type GenerateLogBundles_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type GenerateSelfSignedClientCert GenerateSelfSignedClientCertRequestType func init() { t["GenerateSelfSignedClientCert"] = reflect.TypeOf((*GenerateSelfSignedClientCert)(nil)).Elem() } type GenerateSelfSignedClientCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` } func init() { t["GenerateSelfSignedClientCertRequestType"] = reflect.TypeOf((*GenerateSelfSignedClientCertRequestType)(nil)).Elem() } type GenerateSelfSignedClientCertResponse struct { Returnval string `xml:"returnval"` } type GenericDrsFault struct { VimFault HostFaults []LocalizedMethodFault `xml:"hostFaults,omitempty"` } func init() { t["GenericDrsFault"] = reflect.TypeOf((*GenericDrsFault)(nil)).Elem() } type GenericDrsFaultFault GenericDrsFault func init() { t["GenericDrsFaultFault"] = reflect.TypeOf((*GenericDrsFaultFault)(nil)).Elem() } type GenericVmConfigFault struct { VmConfigFault Reason string `xml:"reason"` } func init() { t["GenericVmConfigFault"] = reflect.TypeOf((*GenericVmConfigFault)(nil)).Elem() } type GenericVmConfigFaultFault GenericVmConfigFault func init() { t["GenericVmConfigFaultFault"] = reflect.TypeOf((*GenericVmConfigFaultFault)(nil)).Elem() } type GetAlarm GetAlarmRequestType func init() { t["GetAlarm"] = reflect.TypeOf((*GetAlarm)(nil)).Elem() } type GetAlarmRequestType struct { This ManagedObjectReference `xml:"_this"` Entity *ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["GetAlarmRequestType"] = reflect.TypeOf((*GetAlarmRequestType)(nil)).Elem() } type GetAlarmResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type GetAlarmState GetAlarmStateRequestType func init() { t["GetAlarmState"] = reflect.TypeOf((*GetAlarmState)(nil)).Elem() } type GetAlarmStateRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["GetAlarmStateRequestType"] = reflect.TypeOf((*GetAlarmStateRequestType)(nil)).Elem() } type GetAlarmStateResponse struct { Returnval []AlarmState `xml:"returnval,omitempty"` } type GetCustomizationSpec GetCustomizationSpecRequestType func init() { t["GetCustomizationSpec"] = reflect.TypeOf((*GetCustomizationSpec)(nil)).Elem() } type GetCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["GetCustomizationSpecRequestType"] = reflect.TypeOf((*GetCustomizationSpecRequestType)(nil)).Elem() } type GetCustomizationSpecResponse struct { Returnval CustomizationSpecItem `xml:"returnval"` } type GetPublicKey GetPublicKeyRequestType func init() { t["GetPublicKey"] = reflect.TypeOf((*GetPublicKey)(nil)).Elem() } type GetPublicKeyRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["GetPublicKeyRequestType"] = reflect.TypeOf((*GetPublicKeyRequestType)(nil)).Elem() } type GetPublicKeyResponse struct { Returnval string `xml:"returnval"` } type GetResourceUsage GetResourceUsageRequestType func init() { t["GetResourceUsage"] = reflect.TypeOf((*GetResourceUsage)(nil)).Elem() } type GetResourceUsageRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["GetResourceUsageRequestType"] = reflect.TypeOf((*GetResourceUsageRequestType)(nil)).Elem() } type GetResourceUsageResponse struct { Returnval ClusterResourceUsageSummary `xml:"returnval"` } type GetVchaClusterHealth GetVchaClusterHealthRequestType func init() { t["GetVchaClusterHealth"] = reflect.TypeOf((*GetVchaClusterHealth)(nil)).Elem() } type GetVchaClusterHealthRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["GetVchaClusterHealthRequestType"] = reflect.TypeOf((*GetVchaClusterHealthRequestType)(nil)).Elem() } type GetVchaClusterHealthResponse struct { Returnval VchaClusterHealth `xml:"returnval"` } type GetVsanObjExtAttrs GetVsanObjExtAttrsRequestType func init() { t["GetVsanObjExtAttrs"] = reflect.TypeOf((*GetVsanObjExtAttrs)(nil)).Elem() } type GetVsanObjExtAttrsRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids"` } func init() { t["GetVsanObjExtAttrsRequestType"] = reflect.TypeOf((*GetVsanObjExtAttrsRequestType)(nil)).Elem() } type GetVsanObjExtAttrsResponse struct { Returnval string `xml:"returnval"` } type GhostDvsProxySwitchDetectedEvent struct { HostEvent SwitchUuid []string `xml:"switchUuid"` } func init() { t["GhostDvsProxySwitchDetectedEvent"] = reflect.TypeOf((*GhostDvsProxySwitchDetectedEvent)(nil)).Elem() } type GhostDvsProxySwitchRemovedEvent struct { HostEvent SwitchUuid []string `xml:"switchUuid"` } func init() { t["GhostDvsProxySwitchRemovedEvent"] = reflect.TypeOf((*GhostDvsProxySwitchRemovedEvent)(nil)).Elem() } type GlobalMessageChangedEvent struct { SessionEvent Message string `xml:"message"` PrevMessage string `xml:"prevMessage,omitempty"` } func init() { t["GlobalMessageChangedEvent"] = reflect.TypeOf((*GlobalMessageChangedEvent)(nil)).Elem() } type GroupAlarmAction struct { AlarmAction Action []BaseAlarmAction `xml:"action,typeattr"` } func init() { t["GroupAlarmAction"] = reflect.TypeOf((*GroupAlarmAction)(nil)).Elem() } type GuestAliases struct { DynamicData Base64Cert string `xml:"base64Cert"` Aliases []GuestAuthAliasInfo `xml:"aliases"` } func init() { t["GuestAliases"] = reflect.TypeOf((*GuestAliases)(nil)).Elem() } type GuestAuthAliasInfo struct { DynamicData Subject BaseGuestAuthSubject `xml:"subject,typeattr"` Comment string `xml:"comment"` } func init() { t["GuestAuthAliasInfo"] = reflect.TypeOf((*GuestAuthAliasInfo)(nil)).Elem() } type GuestAuthAnySubject struct { GuestAuthSubject } func init() { t["GuestAuthAnySubject"] = reflect.TypeOf((*GuestAuthAnySubject)(nil)).Elem() } type GuestAuthNamedSubject struct { GuestAuthSubject Name string `xml:"name"` } func init() { t["GuestAuthNamedSubject"] = reflect.TypeOf((*GuestAuthNamedSubject)(nil)).Elem() } type GuestAuthSubject struct { DynamicData } func init() { t["GuestAuthSubject"] = reflect.TypeOf((*GuestAuthSubject)(nil)).Elem() } type GuestAuthentication struct { DynamicData InteractiveSession bool `xml:"interactiveSession"` } func init() { t["GuestAuthentication"] = reflect.TypeOf((*GuestAuthentication)(nil)).Elem() } type GuestAuthenticationChallenge struct { GuestOperationsFault ServerChallenge BaseGuestAuthentication `xml:"serverChallenge,typeattr"` SessionID int64 `xml:"sessionID"` } func init() { t["GuestAuthenticationChallenge"] = reflect.TypeOf((*GuestAuthenticationChallenge)(nil)).Elem() } type GuestAuthenticationChallengeFault GuestAuthenticationChallenge func init() { t["GuestAuthenticationChallengeFault"] = reflect.TypeOf((*GuestAuthenticationChallengeFault)(nil)).Elem() } type GuestComponentsOutOfDate struct { GuestOperationsFault } func init() { t["GuestComponentsOutOfDate"] = reflect.TypeOf((*GuestComponentsOutOfDate)(nil)).Elem() } type GuestComponentsOutOfDateFault GuestComponentsOutOfDate func init() { t["GuestComponentsOutOfDateFault"] = reflect.TypeOf((*GuestComponentsOutOfDateFault)(nil)).Elem() } type GuestDiskInfo struct { DynamicData DiskPath string `xml:"diskPath,omitempty"` Capacity int64 `xml:"capacity,omitempty"` FreeSpace int64 `xml:"freeSpace,omitempty"` } func init() { t["GuestDiskInfo"] = reflect.TypeOf((*GuestDiskInfo)(nil)).Elem() } type GuestFileAttributes struct { DynamicData ModificationTime *time.Time `xml:"modificationTime"` AccessTime *time.Time `xml:"accessTime"` SymlinkTarget string `xml:"symlinkTarget,omitempty"` } func init() { t["GuestFileAttributes"] = reflect.TypeOf((*GuestFileAttributes)(nil)).Elem() } type GuestFileInfo struct { DynamicData Path string `xml:"path"` Type string `xml:"type"` Size int64 `xml:"size"` Attributes BaseGuestFileAttributes `xml:"attributes,typeattr"` } func init() { t["GuestFileInfo"] = reflect.TypeOf((*GuestFileInfo)(nil)).Elem() } type GuestInfo struct { DynamicData ToolsStatus VirtualMachineToolsStatus `xml:"toolsStatus,omitempty"` ToolsVersionStatus string `xml:"toolsVersionStatus,omitempty"` ToolsVersionStatus2 string `xml:"toolsVersionStatus2,omitempty"` ToolsRunningStatus string `xml:"toolsRunningStatus,omitempty"` ToolsVersion string `xml:"toolsVersion,omitempty"` ToolsInstallType string `xml:"toolsInstallType,omitempty"` GuestId string `xml:"guestId,omitempty"` GuestFamily string `xml:"guestFamily,omitempty"` GuestFullName string `xml:"guestFullName,omitempty"` HostName string `xml:"hostName,omitempty"` IpAddress string `xml:"ipAddress,omitempty"` Net []GuestNicInfo `xml:"net,omitempty"` IpStack []GuestStackInfo `xml:"ipStack,omitempty"` Disk []GuestDiskInfo `xml:"disk,omitempty"` Screen *GuestScreenInfo `xml:"screen,omitempty"` GuestState string `xml:"guestState"` AppHeartbeatStatus string `xml:"appHeartbeatStatus,omitempty"` GuestKernelCrashed *bool `xml:"guestKernelCrashed"` AppState string `xml:"appState,omitempty"` GuestOperationsReady *bool `xml:"guestOperationsReady"` InteractiveGuestOperationsReady *bool `xml:"interactiveGuestOperationsReady"` GuestStateChangeSupported *bool `xml:"guestStateChangeSupported"` GenerationInfo []GuestInfoNamespaceGenerationInfo `xml:"generationInfo,omitempty"` } func init() { t["GuestInfo"] = reflect.TypeOf((*GuestInfo)(nil)).Elem() } type GuestInfoNamespaceGenerationInfo struct { DynamicData Key string `xml:"key"` GenerationNo int32 `xml:"generationNo"` } func init() { t["GuestInfoNamespaceGenerationInfo"] = reflect.TypeOf((*GuestInfoNamespaceGenerationInfo)(nil)).Elem() } type GuestListFileInfo struct { DynamicData Files []GuestFileInfo `xml:"files,omitempty"` Remaining int32 `xml:"remaining"` } func init() { t["GuestListFileInfo"] = reflect.TypeOf((*GuestListFileInfo)(nil)).Elem() } type GuestMappedAliases struct { DynamicData Base64Cert string `xml:"base64Cert"` Username string `xml:"username"` Subjects []BaseGuestAuthSubject `xml:"subjects,typeattr"` } func init() { t["GuestMappedAliases"] = reflect.TypeOf((*GuestMappedAliases)(nil)).Elem() } type GuestMultipleMappings struct { GuestOperationsFault } func init() { t["GuestMultipleMappings"] = reflect.TypeOf((*GuestMultipleMappings)(nil)).Elem() } type GuestMultipleMappingsFault GuestMultipleMappings func init() { t["GuestMultipleMappingsFault"] = reflect.TypeOf((*GuestMultipleMappingsFault)(nil)).Elem() } type GuestNicInfo struct { DynamicData Network string `xml:"network,omitempty"` IpAddress []string `xml:"ipAddress,omitempty"` MacAddress string `xml:"macAddress,omitempty"` Connected bool `xml:"connected"` DeviceConfigId int32 `xml:"deviceConfigId"` DnsConfig *NetDnsConfigInfo `xml:"dnsConfig,omitempty"` IpConfig *NetIpConfigInfo `xml:"ipConfig,omitempty"` NetBIOSConfig BaseNetBIOSConfigInfo `xml:"netBIOSConfig,omitempty,typeattr"` } func init() { t["GuestNicInfo"] = reflect.TypeOf((*GuestNicInfo)(nil)).Elem() } type GuestOperationsFault struct { VimFault } func init() { t["GuestOperationsFault"] = reflect.TypeOf((*GuestOperationsFault)(nil)).Elem() } type GuestOperationsFaultFault BaseGuestOperationsFault func init() { t["GuestOperationsFaultFault"] = reflect.TypeOf((*GuestOperationsFaultFault)(nil)).Elem() } type GuestOperationsUnavailable struct { GuestOperationsFault } func init() { t["GuestOperationsUnavailable"] = reflect.TypeOf((*GuestOperationsUnavailable)(nil)).Elem() } type GuestOperationsUnavailableFault GuestOperationsUnavailable func init() { t["GuestOperationsUnavailableFault"] = reflect.TypeOf((*GuestOperationsUnavailableFault)(nil)).Elem() } type GuestOsDescriptor struct { DynamicData Id string `xml:"id"` Family string `xml:"family"` FullName string `xml:"fullName"` SupportedMaxCPUs int32 `xml:"supportedMaxCPUs"` NumSupportedPhysicalSockets int32 `xml:"numSupportedPhysicalSockets,omitempty"` NumSupportedCoresPerSocket int32 `xml:"numSupportedCoresPerSocket,omitempty"` SupportedMinMemMB int32 `xml:"supportedMinMemMB"` SupportedMaxMemMB int32 `xml:"supportedMaxMemMB"` RecommendedMemMB int32 `xml:"recommendedMemMB"` RecommendedColorDepth int32 `xml:"recommendedColorDepth"` SupportedDiskControllerList []string `xml:"supportedDiskControllerList"` RecommendedSCSIController string `xml:"recommendedSCSIController,omitempty"` RecommendedDiskController string `xml:"recommendedDiskController"` SupportedNumDisks int32 `xml:"supportedNumDisks"` RecommendedDiskSizeMB int32 `xml:"recommendedDiskSizeMB"` RecommendedCdromController string `xml:"recommendedCdromController,omitempty"` SupportedEthernetCard []string `xml:"supportedEthernetCard"` RecommendedEthernetCard string `xml:"recommendedEthernetCard,omitempty"` SupportsSlaveDisk *bool `xml:"supportsSlaveDisk"` CpuFeatureMask []HostCpuIdInfo `xml:"cpuFeatureMask,omitempty"` SmcRequired *bool `xml:"smcRequired"` SupportsWakeOnLan bool `xml:"supportsWakeOnLan"` SupportsVMI *bool `xml:"supportsVMI"` SupportsMemoryHotAdd *bool `xml:"supportsMemoryHotAdd"` SupportsCpuHotAdd *bool `xml:"supportsCpuHotAdd"` SupportsCpuHotRemove *bool `xml:"supportsCpuHotRemove"` SupportedFirmware []string `xml:"supportedFirmware,omitempty"` RecommendedFirmware string `xml:"recommendedFirmware,omitempty"` SupportedUSBControllerList []string `xml:"supportedUSBControllerList,omitempty"` RecommendedUSBController string `xml:"recommendedUSBController,omitempty"` Supports3D *bool `xml:"supports3D"` Recommended3D *bool `xml:"recommended3D"` SmcRecommended *bool `xml:"smcRecommended"` Ich7mRecommended *bool `xml:"ich7mRecommended"` UsbRecommended *bool `xml:"usbRecommended"` SupportLevel string `xml:"supportLevel,omitempty"` SupportedForCreate *bool `xml:"supportedForCreate"` VRAMSizeInKB *IntOption `xml:"vRAMSizeInKB,omitempty"` NumSupportedFloppyDevices int32 `xml:"numSupportedFloppyDevices,omitempty"` WakeOnLanEthernetCard []string `xml:"wakeOnLanEthernetCard,omitempty"` SupportsPvscsiControllerForBoot *bool `xml:"supportsPvscsiControllerForBoot"` DiskUuidEnabled *bool `xml:"diskUuidEnabled"` SupportsHotPlugPCI *bool `xml:"supportsHotPlugPCI"` SupportsSecureBoot *bool `xml:"supportsSecureBoot"` DefaultSecureBoot *bool `xml:"defaultSecureBoot"` } func init() { t["GuestOsDescriptor"] = reflect.TypeOf((*GuestOsDescriptor)(nil)).Elem() } type GuestPermissionDenied struct { GuestOperationsFault } func init() { t["GuestPermissionDenied"] = reflect.TypeOf((*GuestPermissionDenied)(nil)).Elem() } type GuestPermissionDeniedFault GuestPermissionDenied func init() { t["GuestPermissionDeniedFault"] = reflect.TypeOf((*GuestPermissionDeniedFault)(nil)).Elem() } type GuestPosixFileAttributes struct { GuestFileAttributes OwnerId *int32 `xml:"ownerId"` GroupId *int32 `xml:"groupId"` Permissions int64 `xml:"permissions,omitempty"` } func init() { t["GuestPosixFileAttributes"] = reflect.TypeOf((*GuestPosixFileAttributes)(nil)).Elem() } type GuestProcessInfo struct { DynamicData Name string `xml:"name"` Pid int64 `xml:"pid"` Owner string `xml:"owner"` CmdLine string `xml:"cmdLine"` StartTime time.Time `xml:"startTime"` EndTime *time.Time `xml:"endTime"` ExitCode int32 `xml:"exitCode,omitempty"` } func init() { t["GuestProcessInfo"] = reflect.TypeOf((*GuestProcessInfo)(nil)).Elem() } type GuestProcessNotFound struct { GuestOperationsFault Pid int64 `xml:"pid"` } func init() { t["GuestProcessNotFound"] = reflect.TypeOf((*GuestProcessNotFound)(nil)).Elem() } type GuestProcessNotFoundFault GuestProcessNotFound func init() { t["GuestProcessNotFoundFault"] = reflect.TypeOf((*GuestProcessNotFoundFault)(nil)).Elem() } type GuestProgramSpec struct { DynamicData ProgramPath string `xml:"programPath"` Arguments string `xml:"arguments"` WorkingDirectory string `xml:"workingDirectory,omitempty"` EnvVariables []string `xml:"envVariables,omitempty"` } func init() { t["GuestProgramSpec"] = reflect.TypeOf((*GuestProgramSpec)(nil)).Elem() } type GuestRegKeyNameSpec struct { DynamicData RegistryPath string `xml:"registryPath"` WowBitness string `xml:"wowBitness"` } func init() { t["GuestRegKeyNameSpec"] = reflect.TypeOf((*GuestRegKeyNameSpec)(nil)).Elem() } type GuestRegKeyRecordSpec struct { DynamicData Key GuestRegKeySpec `xml:"key"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["GuestRegKeyRecordSpec"] = reflect.TypeOf((*GuestRegKeyRecordSpec)(nil)).Elem() } type GuestRegKeySpec struct { DynamicData KeyName GuestRegKeyNameSpec `xml:"keyName"` ClassType string `xml:"classType"` LastWritten time.Time `xml:"lastWritten"` } func init() { t["GuestRegKeySpec"] = reflect.TypeOf((*GuestRegKeySpec)(nil)).Elem() } type GuestRegValueBinarySpec struct { GuestRegValueDataSpec Value []byte `xml:"value,omitempty"` } func init() { t["GuestRegValueBinarySpec"] = reflect.TypeOf((*GuestRegValueBinarySpec)(nil)).Elem() } type GuestRegValueDataSpec struct { DynamicData } func init() { t["GuestRegValueDataSpec"] = reflect.TypeOf((*GuestRegValueDataSpec)(nil)).Elem() } type GuestRegValueDwordSpec struct { GuestRegValueDataSpec Value int32 `xml:"value"` } func init() { t["GuestRegValueDwordSpec"] = reflect.TypeOf((*GuestRegValueDwordSpec)(nil)).Elem() } type GuestRegValueExpandStringSpec struct { GuestRegValueDataSpec Value string `xml:"value,omitempty"` } func init() { t["GuestRegValueExpandStringSpec"] = reflect.TypeOf((*GuestRegValueExpandStringSpec)(nil)).Elem() } type GuestRegValueMultiStringSpec struct { GuestRegValueDataSpec Value []string `xml:"value,omitempty"` } func init() { t["GuestRegValueMultiStringSpec"] = reflect.TypeOf((*GuestRegValueMultiStringSpec)(nil)).Elem() } type GuestRegValueNameSpec struct { DynamicData KeyName GuestRegKeyNameSpec `xml:"keyName"` Name string `xml:"name"` } func init() { t["GuestRegValueNameSpec"] = reflect.TypeOf((*GuestRegValueNameSpec)(nil)).Elem() } type GuestRegValueQwordSpec struct { GuestRegValueDataSpec Value int64 `xml:"value"` } func init() { t["GuestRegValueQwordSpec"] = reflect.TypeOf((*GuestRegValueQwordSpec)(nil)).Elem() } type GuestRegValueSpec struct { DynamicData Name GuestRegValueNameSpec `xml:"name"` Data BaseGuestRegValueDataSpec `xml:"data,typeattr"` } func init() { t["GuestRegValueSpec"] = reflect.TypeOf((*GuestRegValueSpec)(nil)).Elem() } type GuestRegValueStringSpec struct { GuestRegValueDataSpec Value string `xml:"value,omitempty"` } func init() { t["GuestRegValueStringSpec"] = reflect.TypeOf((*GuestRegValueStringSpec)(nil)).Elem() } type GuestRegistryFault struct { GuestOperationsFault WindowsSystemErrorCode int64 `xml:"windowsSystemErrorCode"` } func init() { t["GuestRegistryFault"] = reflect.TypeOf((*GuestRegistryFault)(nil)).Elem() } type GuestRegistryFaultFault BaseGuestRegistryFault func init() { t["GuestRegistryFaultFault"] = reflect.TypeOf((*GuestRegistryFaultFault)(nil)).Elem() } type GuestRegistryKeyAlreadyExists struct { GuestRegistryKeyFault } func init() { t["GuestRegistryKeyAlreadyExists"] = reflect.TypeOf((*GuestRegistryKeyAlreadyExists)(nil)).Elem() } type GuestRegistryKeyAlreadyExistsFault GuestRegistryKeyAlreadyExists func init() { t["GuestRegistryKeyAlreadyExistsFault"] = reflect.TypeOf((*GuestRegistryKeyAlreadyExistsFault)(nil)).Elem() } type GuestRegistryKeyFault struct { GuestRegistryFault KeyName string `xml:"keyName"` } func init() { t["GuestRegistryKeyFault"] = reflect.TypeOf((*GuestRegistryKeyFault)(nil)).Elem() } type GuestRegistryKeyFaultFault BaseGuestRegistryKeyFault func init() { t["GuestRegistryKeyFaultFault"] = reflect.TypeOf((*GuestRegistryKeyFaultFault)(nil)).Elem() } type GuestRegistryKeyHasSubkeys struct { GuestRegistryKeyFault } func init() { t["GuestRegistryKeyHasSubkeys"] = reflect.TypeOf((*GuestRegistryKeyHasSubkeys)(nil)).Elem() } type GuestRegistryKeyHasSubkeysFault GuestRegistryKeyHasSubkeys func init() { t["GuestRegistryKeyHasSubkeysFault"] = reflect.TypeOf((*GuestRegistryKeyHasSubkeysFault)(nil)).Elem() } type GuestRegistryKeyInvalid struct { GuestRegistryKeyFault } func init() { t["GuestRegistryKeyInvalid"] = reflect.TypeOf((*GuestRegistryKeyInvalid)(nil)).Elem() } type GuestRegistryKeyInvalidFault GuestRegistryKeyInvalid func init() { t["GuestRegistryKeyInvalidFault"] = reflect.TypeOf((*GuestRegistryKeyInvalidFault)(nil)).Elem() } type GuestRegistryKeyParentVolatile struct { GuestRegistryKeyFault } func init() { t["GuestRegistryKeyParentVolatile"] = reflect.TypeOf((*GuestRegistryKeyParentVolatile)(nil)).Elem() } type GuestRegistryKeyParentVolatileFault GuestRegistryKeyParentVolatile func init() { t["GuestRegistryKeyParentVolatileFault"] = reflect.TypeOf((*GuestRegistryKeyParentVolatileFault)(nil)).Elem() } type GuestRegistryValueFault struct { GuestRegistryFault KeyName string `xml:"keyName"` ValueName string `xml:"valueName"` } func init() { t["GuestRegistryValueFault"] = reflect.TypeOf((*GuestRegistryValueFault)(nil)).Elem() } type GuestRegistryValueFaultFault BaseGuestRegistryValueFault func init() { t["GuestRegistryValueFaultFault"] = reflect.TypeOf((*GuestRegistryValueFaultFault)(nil)).Elem() } type GuestRegistryValueNotFound struct { GuestRegistryValueFault } func init() { t["GuestRegistryValueNotFound"] = reflect.TypeOf((*GuestRegistryValueNotFound)(nil)).Elem() } type GuestRegistryValueNotFoundFault GuestRegistryValueNotFound func init() { t["GuestRegistryValueNotFoundFault"] = reflect.TypeOf((*GuestRegistryValueNotFoundFault)(nil)).Elem() } type GuestScreenInfo struct { DynamicData Width int32 `xml:"width"` Height int32 `xml:"height"` } func init() { t["GuestScreenInfo"] = reflect.TypeOf((*GuestScreenInfo)(nil)).Elem() } type GuestStackInfo struct { DynamicData DnsConfig *NetDnsConfigInfo `xml:"dnsConfig,omitempty"` IpRouteConfig *NetIpRouteConfigInfo `xml:"ipRouteConfig,omitempty"` IpStackConfig []KeyValue `xml:"ipStackConfig,omitempty"` DhcpConfig *NetDhcpConfigInfo `xml:"dhcpConfig,omitempty"` } func init() { t["GuestStackInfo"] = reflect.TypeOf((*GuestStackInfo)(nil)).Elem() } type GuestWindowsFileAttributes struct { GuestFileAttributes Hidden *bool `xml:"hidden"` ReadOnly *bool `xml:"readOnly"` CreateTime *time.Time `xml:"createTime"` } func init() { t["GuestWindowsFileAttributes"] = reflect.TypeOf((*GuestWindowsFileAttributes)(nil)).Elem() } type GuestWindowsProgramSpec struct { GuestProgramSpec StartMinimized bool `xml:"startMinimized"` } func init() { t["GuestWindowsProgramSpec"] = reflect.TypeOf((*GuestWindowsProgramSpec)(nil)).Elem() } type HAErrorsAtDest struct { MigrationFault } func init() { t["HAErrorsAtDest"] = reflect.TypeOf((*HAErrorsAtDest)(nil)).Elem() } type HAErrorsAtDestFault HAErrorsAtDest func init() { t["HAErrorsAtDestFault"] = reflect.TypeOf((*HAErrorsAtDestFault)(nil)).Elem() } type HasMonitoredEntity HasMonitoredEntityRequestType func init() { t["HasMonitoredEntity"] = reflect.TypeOf((*HasMonitoredEntity)(nil)).Elem() } type HasMonitoredEntityRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["HasMonitoredEntityRequestType"] = reflect.TypeOf((*HasMonitoredEntityRequestType)(nil)).Elem() } type HasMonitoredEntityResponse struct { Returnval bool `xml:"returnval"` } type HasPrivilegeOnEntities HasPrivilegeOnEntitiesRequestType func init() { t["HasPrivilegeOnEntities"] = reflect.TypeOf((*HasPrivilegeOnEntities)(nil)).Elem() } type HasPrivilegeOnEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` Entity []ManagedObjectReference `xml:"entity"` SessionId string `xml:"sessionId"` PrivId []string `xml:"privId,omitempty"` } func init() { t["HasPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*HasPrivilegeOnEntitiesRequestType)(nil)).Elem() } type HasPrivilegeOnEntitiesResponse struct { Returnval []EntityPrivilege `xml:"returnval,omitempty"` } type HasPrivilegeOnEntity HasPrivilegeOnEntityRequestType func init() { t["HasPrivilegeOnEntity"] = reflect.TypeOf((*HasPrivilegeOnEntity)(nil)).Elem() } type HasPrivilegeOnEntityRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` SessionId string `xml:"sessionId"` PrivId []string `xml:"privId,omitempty"` } func init() { t["HasPrivilegeOnEntityRequestType"] = reflect.TypeOf((*HasPrivilegeOnEntityRequestType)(nil)).Elem() } type HasPrivilegeOnEntityResponse struct { Returnval []bool `xml:"returnval,omitempty"` } type HasProvider HasProviderRequestType func init() { t["HasProvider"] = reflect.TypeOf((*HasProvider)(nil)).Elem() } type HasProviderRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["HasProviderRequestType"] = reflect.TypeOf((*HasProviderRequestType)(nil)).Elem() } type HasProviderResponse struct { Returnval bool `xml:"returnval"` } type HasUserPrivilegeOnEntities HasUserPrivilegeOnEntitiesRequestType func init() { t["HasUserPrivilegeOnEntities"] = reflect.TypeOf((*HasUserPrivilegeOnEntities)(nil)).Elem() } type HasUserPrivilegeOnEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` Entities []ManagedObjectReference `xml:"entities"` UserName string `xml:"userName"` PrivId []string `xml:"privId,omitempty"` } func init() { t["HasUserPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*HasUserPrivilegeOnEntitiesRequestType)(nil)).Elem() } type HasUserPrivilegeOnEntitiesResponse struct { Returnval []EntityPrivilege `xml:"returnval,omitempty"` } type HbrDiskMigrationAction struct { ClusterAction CollectionId string `xml:"collectionId"` CollectionName string `xml:"collectionName"` DiskIds []string `xml:"diskIds"` Source ManagedObjectReference `xml:"source"` Destination ManagedObjectReference `xml:"destination"` SizeTransferred int64 `xml:"sizeTransferred"` SpaceUtilSrcBefore float32 `xml:"spaceUtilSrcBefore,omitempty"` SpaceUtilDstBefore float32 `xml:"spaceUtilDstBefore,omitempty"` SpaceUtilSrcAfter float32 `xml:"spaceUtilSrcAfter,omitempty"` SpaceUtilDstAfter float32 `xml:"spaceUtilDstAfter,omitempty"` IoLatencySrcBefore float32 `xml:"ioLatencySrcBefore,omitempty"` IoLatencyDstBefore float32 `xml:"ioLatencyDstBefore,omitempty"` } func init() { t["HbrDiskMigrationAction"] = reflect.TypeOf((*HbrDiskMigrationAction)(nil)).Elem() } type HbrManagerReplicationVmInfo struct { DynamicData State string `xml:"state"` ProgressInfo *ReplicationVmProgressInfo `xml:"progressInfo,omitempty"` ImageId string `xml:"imageId,omitempty"` LastError *LocalizedMethodFault `xml:"lastError,omitempty"` } func init() { t["HbrManagerReplicationVmInfo"] = reflect.TypeOf((*HbrManagerReplicationVmInfo)(nil)).Elem() } type HbrManagerVmReplicationCapability struct { DynamicData Vm ManagedObjectReference `xml:"vm"` SupportedQuiesceMode string `xml:"supportedQuiesceMode"` CompressionSupported bool `xml:"compressionSupported"` MaxSupportedSourceDiskCapacity int64 `xml:"maxSupportedSourceDiskCapacity"` MinRpo int64 `xml:"minRpo,omitempty"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HbrManagerVmReplicationCapability"] = reflect.TypeOf((*HbrManagerVmReplicationCapability)(nil)).Elem() } type HealthStatusChangedEvent struct { Event ComponentId string `xml:"componentId"` OldStatus string `xml:"oldStatus"` NewStatus string `xml:"newStatus"` ComponentName string `xml:"componentName"` ServiceId string `xml:"serviceId,omitempty"` } func init() { t["HealthStatusChangedEvent"] = reflect.TypeOf((*HealthStatusChangedEvent)(nil)).Elem() } type HealthSystemRuntime struct { DynamicData SystemHealthInfo *HostSystemHealthInfo `xml:"systemHealthInfo,omitempty"` HardwareStatusInfo *HostHardwareStatusInfo `xml:"hardwareStatusInfo,omitempty"` } func init() { t["HealthSystemRuntime"] = reflect.TypeOf((*HealthSystemRuntime)(nil)).Elem() } type HealthUpdate struct { DynamicData Entity ManagedObjectReference `xml:"entity"` HealthUpdateInfoId string `xml:"healthUpdateInfoId"` Id string `xml:"id"` Status ManagedEntityStatus `xml:"status"` Remediation string `xml:"remediation"` } func init() { t["HealthUpdate"] = reflect.TypeOf((*HealthUpdate)(nil)).Elem() } type HealthUpdateInfo struct { DynamicData Id string `xml:"id"` ComponentType string `xml:"componentType"` Description string `xml:"description"` } func init() { t["HealthUpdateInfo"] = reflect.TypeOf((*HealthUpdateInfo)(nil)).Elem() } type HeterogenousHostsBlockingEVC struct { EVCConfigFault } func init() { t["HeterogenousHostsBlockingEVC"] = reflect.TypeOf((*HeterogenousHostsBlockingEVC)(nil)).Elem() } type HeterogenousHostsBlockingEVCFault HeterogenousHostsBlockingEVC func init() { t["HeterogenousHostsBlockingEVCFault"] = reflect.TypeOf((*HeterogenousHostsBlockingEVCFault)(nil)).Elem() } type HostAccessControlEntry struct { DynamicData Principal string `xml:"principal"` Group bool `xml:"group"` AccessMode HostAccessMode `xml:"accessMode"` } func init() { t["HostAccessControlEntry"] = reflect.TypeOf((*HostAccessControlEntry)(nil)).Elem() } type HostAccessRestrictedToManagementServer struct { NotSupported ManagementServer string `xml:"managementServer"` } func init() { t["HostAccessRestrictedToManagementServer"] = reflect.TypeOf((*HostAccessRestrictedToManagementServer)(nil)).Elem() } type HostAccessRestrictedToManagementServerFault HostAccessRestrictedToManagementServer func init() { t["HostAccessRestrictedToManagementServerFault"] = reflect.TypeOf((*HostAccessRestrictedToManagementServerFault)(nil)).Elem() } type HostAccountSpec struct { DynamicData Id string `xml:"id"` Password string `xml:"password,omitempty"` Description string `xml:"description,omitempty"` } func init() { t["HostAccountSpec"] = reflect.TypeOf((*HostAccountSpec)(nil)).Elem() } type HostActiveDirectory struct { DynamicData ChangeOperation string `xml:"changeOperation"` Spec *HostActiveDirectorySpec `xml:"spec,omitempty"` } func init() { t["HostActiveDirectory"] = reflect.TypeOf((*HostActiveDirectory)(nil)).Elem() } type HostActiveDirectoryInfo struct { HostDirectoryStoreInfo JoinedDomain string `xml:"joinedDomain,omitempty"` TrustedDomain []string `xml:"trustedDomain,omitempty"` DomainMembershipStatus string `xml:"domainMembershipStatus,omitempty"` SmartCardAuthenticationEnabled *bool `xml:"smartCardAuthenticationEnabled"` } func init() { t["HostActiveDirectoryInfo"] = reflect.TypeOf((*HostActiveDirectoryInfo)(nil)).Elem() } type HostActiveDirectorySpec struct { DynamicData DomainName string `xml:"domainName,omitempty"` UserName string `xml:"userName,omitempty"` Password string `xml:"password,omitempty"` CamServer string `xml:"camServer,omitempty"` Thumbprint string `xml:"thumbprint,omitempty"` SmartCardAuthenticationEnabled *bool `xml:"smartCardAuthenticationEnabled"` SmartCardTrustAnchors []string `xml:"smartCardTrustAnchors,omitempty"` } func init() { t["HostActiveDirectorySpec"] = reflect.TypeOf((*HostActiveDirectorySpec)(nil)).Elem() } type HostAddFailedEvent struct { HostEvent Hostname string `xml:"hostname"` } func init() { t["HostAddFailedEvent"] = reflect.TypeOf((*HostAddFailedEvent)(nil)).Elem() } type HostAddedEvent struct { HostEvent } func init() { t["HostAddedEvent"] = reflect.TypeOf((*HostAddedEvent)(nil)).Elem() } type HostAdminDisableEvent struct { HostEvent } func init() { t["HostAdminDisableEvent"] = reflect.TypeOf((*HostAdminDisableEvent)(nil)).Elem() } type HostAdminEnableEvent struct { HostEvent } func init() { t["HostAdminEnableEvent"] = reflect.TypeOf((*HostAdminEnableEvent)(nil)).Elem() } type HostApplyProfile struct { ApplyProfile Memory *HostMemoryProfile `xml:"memory,omitempty"` Storage *StorageProfile `xml:"storage,omitempty"` Network *NetworkProfile `xml:"network,omitempty"` Datetime *DateTimeProfile `xml:"datetime,omitempty"` Firewall *FirewallProfile `xml:"firewall,omitempty"` Security *SecurityProfile `xml:"security,omitempty"` Service []ServiceProfile `xml:"service,omitempty"` Option []OptionProfile `xml:"option,omitempty"` UserAccount []UserProfile `xml:"userAccount,omitempty"` UsergroupAccount []UserGroupProfile `xml:"usergroupAccount,omitempty"` Authentication *AuthenticationProfile `xml:"authentication,omitempty"` } func init() { t["HostApplyProfile"] = reflect.TypeOf((*HostApplyProfile)(nil)).Elem() } type HostAuthenticationManagerInfo struct { DynamicData AuthConfig []BaseHostAuthenticationStoreInfo `xml:"authConfig,typeattr"` } func init() { t["HostAuthenticationManagerInfo"] = reflect.TypeOf((*HostAuthenticationManagerInfo)(nil)).Elem() } type HostAuthenticationStoreInfo struct { DynamicData Enabled bool `xml:"enabled"` } func init() { t["HostAuthenticationStoreInfo"] = reflect.TypeOf((*HostAuthenticationStoreInfo)(nil)).Elem() } type HostAutoStartManagerConfig struct { DynamicData Defaults *AutoStartDefaults `xml:"defaults,omitempty"` PowerInfo []AutoStartPowerInfo `xml:"powerInfo,omitempty"` } func init() { t["HostAutoStartManagerConfig"] = reflect.TypeOf((*HostAutoStartManagerConfig)(nil)).Elem() } type HostBIOSInfo struct { DynamicData BiosVersion string `xml:"biosVersion,omitempty"` ReleaseDate *time.Time `xml:"releaseDate"` Vendor string `xml:"vendor,omitempty"` MajorRelease int32 `xml:"majorRelease,omitempty"` MinorRelease int32 `xml:"minorRelease,omitempty"` FirmwareMajorRelease int32 `xml:"firmwareMajorRelease,omitempty"` FirmwareMinorRelease int32 `xml:"firmwareMinorRelease,omitempty"` } func init() { t["HostBIOSInfo"] = reflect.TypeOf((*HostBIOSInfo)(nil)).Elem() } type HostBlockAdapterTargetTransport struct { HostTargetTransport } func init() { t["HostBlockAdapterTargetTransport"] = reflect.TypeOf((*HostBlockAdapterTargetTransport)(nil)).Elem() } type HostBlockHba struct { HostHostBusAdapter } func init() { t["HostBlockHba"] = reflect.TypeOf((*HostBlockHba)(nil)).Elem() } type HostBootDevice struct { DynamicData Key string `xml:"key"` Description string `xml:"description"` } func init() { t["HostBootDevice"] = reflect.TypeOf((*HostBootDevice)(nil)).Elem() } type HostBootDeviceInfo struct { DynamicData BootDevices []HostBootDevice `xml:"bootDevices,omitempty"` CurrentBootDeviceKey string `xml:"currentBootDeviceKey,omitempty"` } func init() { t["HostBootDeviceInfo"] = reflect.TypeOf((*HostBootDeviceInfo)(nil)).Elem() } type HostCacheConfigurationInfo struct { DynamicData Key ManagedObjectReference `xml:"key"` SwapSize int64 `xml:"swapSize"` } func init() { t["HostCacheConfigurationInfo"] = reflect.TypeOf((*HostCacheConfigurationInfo)(nil)).Elem() } type HostCacheConfigurationSpec struct { DynamicData Datastore ManagedObjectReference `xml:"datastore"` SwapSize int64 `xml:"swapSize"` } func init() { t["HostCacheConfigurationSpec"] = reflect.TypeOf((*HostCacheConfigurationSpec)(nil)).Elem() } type HostCapability struct { DynamicData RecursiveResourcePoolsSupported bool `xml:"recursiveResourcePoolsSupported"` CpuMemoryResourceConfigurationSupported bool `xml:"cpuMemoryResourceConfigurationSupported"` RebootSupported bool `xml:"rebootSupported"` ShutdownSupported bool `xml:"shutdownSupported"` VmotionSupported bool `xml:"vmotionSupported"` StandbySupported bool `xml:"standbySupported"` IpmiSupported *bool `xml:"ipmiSupported"` MaxSupportedVMs int32 `xml:"maxSupportedVMs,omitempty"` MaxRunningVMs int32 `xml:"maxRunningVMs,omitempty"` MaxSupportedVcpus int32 `xml:"maxSupportedVcpus,omitempty"` MaxRegisteredVMs int32 `xml:"maxRegisteredVMs,omitempty"` DatastorePrincipalSupported bool `xml:"datastorePrincipalSupported"` SanSupported bool `xml:"sanSupported"` NfsSupported bool `xml:"nfsSupported"` IscsiSupported bool `xml:"iscsiSupported"` VlanTaggingSupported bool `xml:"vlanTaggingSupported"` NicTeamingSupported bool `xml:"nicTeamingSupported"` HighGuestMemSupported bool `xml:"highGuestMemSupported"` MaintenanceModeSupported bool `xml:"maintenanceModeSupported"` SuspendedRelocateSupported bool `xml:"suspendedRelocateSupported"` RestrictedSnapshotRelocateSupported bool `xml:"restrictedSnapshotRelocateSupported"` PerVmSwapFiles bool `xml:"perVmSwapFiles"` LocalSwapDatastoreSupported bool `xml:"localSwapDatastoreSupported"` UnsharedSwapVMotionSupported bool `xml:"unsharedSwapVMotionSupported"` BackgroundSnapshotsSupported bool `xml:"backgroundSnapshotsSupported"` PreAssignedPCIUnitNumbersSupported bool `xml:"preAssignedPCIUnitNumbersSupported"` ScreenshotSupported bool `xml:"screenshotSupported"` ScaledScreenshotSupported bool `xml:"scaledScreenshotSupported"` StorageVMotionSupported *bool `xml:"storageVMotionSupported"` VmotionWithStorageVMotionSupported *bool `xml:"vmotionWithStorageVMotionSupported"` VmotionAcrossNetworkSupported *bool `xml:"vmotionAcrossNetworkSupported"` MaxNumDisksSVMotion int32 `xml:"maxNumDisksSVMotion,omitempty"` HbrNicSelectionSupported *bool `xml:"hbrNicSelectionSupported"` VrNfcNicSelectionSupported *bool `xml:"vrNfcNicSelectionSupported"` RecordReplaySupported *bool `xml:"recordReplaySupported"` FtSupported *bool `xml:"ftSupported"` ReplayUnsupportedReason string `xml:"replayUnsupportedReason,omitempty"` ReplayCompatibilityIssues []string `xml:"replayCompatibilityIssues,omitempty"` SmpFtSupported *bool `xml:"smpFtSupported"` FtCompatibilityIssues []string `xml:"ftCompatibilityIssues,omitempty"` SmpFtCompatibilityIssues []string `xml:"smpFtCompatibilityIssues,omitempty"` MaxVcpusPerFtVm int32 `xml:"maxVcpusPerFtVm,omitempty"` LoginBySSLThumbprintSupported *bool `xml:"loginBySSLThumbprintSupported"` CloneFromSnapshotSupported *bool `xml:"cloneFromSnapshotSupported"` DeltaDiskBackingsSupported *bool `xml:"deltaDiskBackingsSupported"` PerVMNetworkTrafficShapingSupported *bool `xml:"perVMNetworkTrafficShapingSupported"` TpmSupported *bool `xml:"tpmSupported"` SupportedCpuFeature []HostCpuIdInfo `xml:"supportedCpuFeature,omitempty"` VirtualExecUsageSupported *bool `xml:"virtualExecUsageSupported"` StorageIORMSupported *bool `xml:"storageIORMSupported"` VmDirectPathGen2Supported *bool `xml:"vmDirectPathGen2Supported"` VmDirectPathGen2UnsupportedReason []string `xml:"vmDirectPathGen2UnsupportedReason,omitempty"` VmDirectPathGen2UnsupportedReasonExtended string `xml:"vmDirectPathGen2UnsupportedReasonExtended,omitempty"` SupportedVmfsMajorVersion []int32 `xml:"supportedVmfsMajorVersion,omitempty"` VStorageCapable *bool `xml:"vStorageCapable"` SnapshotRelayoutSupported *bool `xml:"snapshotRelayoutSupported"` FirewallIpRulesSupported *bool `xml:"firewallIpRulesSupported"` ServicePackageInfoSupported *bool `xml:"servicePackageInfoSupported"` MaxHostRunningVms int32 `xml:"maxHostRunningVms,omitempty"` MaxHostSupportedVcpus int32 `xml:"maxHostSupportedVcpus,omitempty"` VmfsDatastoreMountCapable *bool `xml:"vmfsDatastoreMountCapable"` EightPlusHostVmfsSharedAccessSupported *bool `xml:"eightPlusHostVmfsSharedAccessSupported"` NestedHVSupported *bool `xml:"nestedHVSupported"` VPMCSupported *bool `xml:"vPMCSupported"` InterVMCommunicationThroughVMCISupported *bool `xml:"interVMCommunicationThroughVMCISupported"` ScheduledHardwareUpgradeSupported *bool `xml:"scheduledHardwareUpgradeSupported"` FeatureCapabilitiesSupported *bool `xml:"featureCapabilitiesSupported"` LatencySensitivitySupported *bool `xml:"latencySensitivitySupported"` StoragePolicySupported *bool `xml:"storagePolicySupported"` Accel3dSupported *bool `xml:"accel3dSupported"` ReliableMemoryAware *bool `xml:"reliableMemoryAware"` MultipleNetworkStackInstanceSupported *bool `xml:"multipleNetworkStackInstanceSupported"` MessageBusProxySupported *bool `xml:"messageBusProxySupported"` VsanSupported *bool `xml:"vsanSupported"` VFlashSupported *bool `xml:"vFlashSupported"` HostAccessManagerSupported *bool `xml:"hostAccessManagerSupported"` ProvisioningNicSelectionSupported *bool `xml:"provisioningNicSelectionSupported"` Nfs41Supported *bool `xml:"nfs41Supported"` Nfs41Krb5iSupported *bool `xml:"nfs41Krb5iSupported"` TurnDiskLocatorLedSupported *bool `xml:"turnDiskLocatorLedSupported"` VirtualVolumeDatastoreSupported *bool `xml:"virtualVolumeDatastoreSupported"` MarkAsSsdSupported *bool `xml:"markAsSsdSupported"` MarkAsLocalSupported *bool `xml:"markAsLocalSupported"` SmartCardAuthenticationSupported *bool `xml:"smartCardAuthenticationSupported"` CryptoSupported *bool `xml:"cryptoSupported"` OneKVolumeAPIsSupported *bool `xml:"oneKVolumeAPIsSupported"` GatewayOnNicSupported *bool `xml:"gatewayOnNicSupported"` UpitSupported *bool `xml:"upitSupported"` CpuHwMmuSupported *bool `xml:"cpuHwMmuSupported"` EncryptedVMotionSupported *bool `xml:"encryptedVMotionSupported"` EncryptionChangeOnAddRemoveSupported *bool `xml:"encryptionChangeOnAddRemoveSupported"` EncryptionHotOperationSupported *bool `xml:"encryptionHotOperationSupported"` EncryptionWithSnapshotsSupported *bool `xml:"encryptionWithSnapshotsSupported"` EncryptionFaultToleranceSupported *bool `xml:"encryptionFaultToleranceSupported"` EncryptionMemorySaveSupported *bool `xml:"encryptionMemorySaveSupported"` EncryptionRDMSupported *bool `xml:"encryptionRDMSupported"` EncryptionVFlashSupported *bool `xml:"encryptionVFlashSupported"` EncryptionCBRCSupported *bool `xml:"encryptionCBRCSupported"` EncryptionHBRSupported *bool `xml:"encryptionHBRSupported"` } func init() { t["HostCapability"] = reflect.TypeOf((*HostCapability)(nil)).Elem() } type HostCertificateManagerCertificateInfo struct { DynamicData Issuer string `xml:"issuer,omitempty"` NotBefore *time.Time `xml:"notBefore"` NotAfter *time.Time `xml:"notAfter"` Subject string `xml:"subject,omitempty"` Status string `xml:"status"` } func init() { t["HostCertificateManagerCertificateInfo"] = reflect.TypeOf((*HostCertificateManagerCertificateInfo)(nil)).Elem() } type HostCloneVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` Spec VslmCloneSpec `xml:"spec"` } func init() { t["HostCloneVStorageObjectRequestType"] = reflect.TypeOf((*HostCloneVStorageObjectRequestType)(nil)).Elem() } type HostCloneVStorageObject_Task HostCloneVStorageObjectRequestType func init() { t["HostCloneVStorageObject_Task"] = reflect.TypeOf((*HostCloneVStorageObject_Task)(nil)).Elem() } type HostCloneVStorageObject_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostCnxFailedAccountFailedEvent struct { HostEvent } func init() { t["HostCnxFailedAccountFailedEvent"] = reflect.TypeOf((*HostCnxFailedAccountFailedEvent)(nil)).Elem() } type HostCnxFailedAlreadyManagedEvent struct { HostEvent ServerName string `xml:"serverName"` } func init() { t["HostCnxFailedAlreadyManagedEvent"] = reflect.TypeOf((*HostCnxFailedAlreadyManagedEvent)(nil)).Elem() } type HostCnxFailedBadCcagentEvent struct { HostEvent } func init() { t["HostCnxFailedBadCcagentEvent"] = reflect.TypeOf((*HostCnxFailedBadCcagentEvent)(nil)).Elem() } type HostCnxFailedBadUsernameEvent struct { HostEvent } func init() { t["HostCnxFailedBadUsernameEvent"] = reflect.TypeOf((*HostCnxFailedBadUsernameEvent)(nil)).Elem() } type HostCnxFailedBadVersionEvent struct { HostEvent } func init() { t["HostCnxFailedBadVersionEvent"] = reflect.TypeOf((*HostCnxFailedBadVersionEvent)(nil)).Elem() } type HostCnxFailedCcagentUpgradeEvent struct { HostEvent } func init() { t["HostCnxFailedCcagentUpgradeEvent"] = reflect.TypeOf((*HostCnxFailedCcagentUpgradeEvent)(nil)).Elem() } type HostCnxFailedEvent struct { HostEvent } func init() { t["HostCnxFailedEvent"] = reflect.TypeOf((*HostCnxFailedEvent)(nil)).Elem() } type HostCnxFailedNetworkErrorEvent struct { HostEvent } func init() { t["HostCnxFailedNetworkErrorEvent"] = reflect.TypeOf((*HostCnxFailedNetworkErrorEvent)(nil)).Elem() } type HostCnxFailedNoAccessEvent struct { HostEvent } func init() { t["HostCnxFailedNoAccessEvent"] = reflect.TypeOf((*HostCnxFailedNoAccessEvent)(nil)).Elem() } type HostCnxFailedNoConnectionEvent struct { HostEvent } func init() { t["HostCnxFailedNoConnectionEvent"] = reflect.TypeOf((*HostCnxFailedNoConnectionEvent)(nil)).Elem() } type HostCnxFailedNoLicenseEvent struct { HostEvent } func init() { t["HostCnxFailedNoLicenseEvent"] = reflect.TypeOf((*HostCnxFailedNoLicenseEvent)(nil)).Elem() } type HostCnxFailedNotFoundEvent struct { HostEvent } func init() { t["HostCnxFailedNotFoundEvent"] = reflect.TypeOf((*HostCnxFailedNotFoundEvent)(nil)).Elem() } type HostCnxFailedTimeoutEvent struct { HostEvent } func init() { t["HostCnxFailedTimeoutEvent"] = reflect.TypeOf((*HostCnxFailedTimeoutEvent)(nil)).Elem() } type HostCommunication struct { RuntimeFault } func init() { t["HostCommunication"] = reflect.TypeOf((*HostCommunication)(nil)).Elem() } type HostCommunicationFault BaseHostCommunication func init() { t["HostCommunicationFault"] = reflect.TypeOf((*HostCommunicationFault)(nil)).Elem() } type HostComplianceCheckedEvent struct { HostEvent Profile ProfileEventArgument `xml:"profile"` } func init() { t["HostComplianceCheckedEvent"] = reflect.TypeOf((*HostComplianceCheckedEvent)(nil)).Elem() } type HostCompliantEvent struct { HostEvent } func init() { t["HostCompliantEvent"] = reflect.TypeOf((*HostCompliantEvent)(nil)).Elem() } type HostConfigAppliedEvent struct { HostEvent } func init() { t["HostConfigAppliedEvent"] = reflect.TypeOf((*HostConfigAppliedEvent)(nil)).Elem() } type HostConfigChange struct { DynamicData } func init() { t["HostConfigChange"] = reflect.TypeOf((*HostConfigChange)(nil)).Elem() } type HostConfigFailed struct { HostConfigFault Failure []LocalizedMethodFault `xml:"failure"` } func init() { t["HostConfigFailed"] = reflect.TypeOf((*HostConfigFailed)(nil)).Elem() } type HostConfigFailedFault HostConfigFailed func init() { t["HostConfigFailedFault"] = reflect.TypeOf((*HostConfigFailedFault)(nil)).Elem() } type HostConfigFault struct { VimFault } func init() { t["HostConfigFault"] = reflect.TypeOf((*HostConfigFault)(nil)).Elem() } type HostConfigFaultFault BaseHostConfigFault func init() { t["HostConfigFaultFault"] = reflect.TypeOf((*HostConfigFaultFault)(nil)).Elem() } type HostConfigInfo struct { DynamicData Host ManagedObjectReference `xml:"host"` Product AboutInfo `xml:"product"` DeploymentInfo *HostDeploymentInfo `xml:"deploymentInfo,omitempty"` HyperThread *HostHyperThreadScheduleInfo `xml:"hyperThread,omitempty"` ConsoleReservation *ServiceConsoleReservationInfo `xml:"consoleReservation,omitempty"` VirtualMachineReservation *VirtualMachineMemoryReservationInfo `xml:"virtualMachineReservation,omitempty"` StorageDevice *HostStorageDeviceInfo `xml:"storageDevice,omitempty"` MultipathState *HostMultipathStateInfo `xml:"multipathState,omitempty"` FileSystemVolume *HostFileSystemVolumeInfo `xml:"fileSystemVolume,omitempty"` SystemFile []string `xml:"systemFile,omitempty"` Network *HostNetworkInfo `xml:"network,omitempty"` Vmotion *HostVMotionInfo `xml:"vmotion,omitempty"` VirtualNicManagerInfo *HostVirtualNicManagerInfo `xml:"virtualNicManagerInfo,omitempty"` Capabilities *HostNetCapabilities `xml:"capabilities,omitempty"` DatastoreCapabilities *HostDatastoreSystemCapabilities `xml:"datastoreCapabilities,omitempty"` OffloadCapabilities *HostNetOffloadCapabilities `xml:"offloadCapabilities,omitempty"` Service *HostServiceInfo `xml:"service,omitempty"` Firewall *HostFirewallInfo `xml:"firewall,omitempty"` AutoStart *HostAutoStartManagerConfig `xml:"autoStart,omitempty"` ActiveDiagnosticPartition *HostDiagnosticPartition `xml:"activeDiagnosticPartition,omitempty"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` OptionDef []OptionDef `xml:"optionDef,omitempty"` DatastorePrincipal string `xml:"datastorePrincipal,omitempty"` LocalSwapDatastore *ManagedObjectReference `xml:"localSwapDatastore,omitempty"` SystemSwapConfiguration *HostSystemSwapConfiguration `xml:"systemSwapConfiguration,omitempty"` SystemResources *HostSystemResourceInfo `xml:"systemResources,omitempty"` DateTimeInfo *HostDateTimeInfo `xml:"dateTimeInfo,omitempty"` Flags *HostFlagInfo `xml:"flags,omitempty"` AdminDisabled *bool `xml:"adminDisabled"` LockdownMode HostLockdownMode `xml:"lockdownMode,omitempty"` Ipmi *HostIpmiInfo `xml:"ipmi,omitempty"` SslThumbprintInfo *HostSslThumbprintInfo `xml:"sslThumbprintInfo,omitempty"` SslThumbprintData []HostSslThumbprintInfo `xml:"sslThumbprintData,omitempty"` Certificate []byte `xml:"certificate,omitempty"` PciPassthruInfo []BaseHostPciPassthruInfo `xml:"pciPassthruInfo,omitempty,typeattr"` AuthenticationManagerInfo *HostAuthenticationManagerInfo `xml:"authenticationManagerInfo,omitempty"` FeatureVersion []HostFeatureVersionInfo `xml:"featureVersion,omitempty"` PowerSystemCapability *PowerSystemCapability `xml:"powerSystemCapability,omitempty"` PowerSystemInfo *PowerSystemInfo `xml:"powerSystemInfo,omitempty"` CacheConfigurationInfo []HostCacheConfigurationInfo `xml:"cacheConfigurationInfo,omitempty"` WakeOnLanCapable *bool `xml:"wakeOnLanCapable"` FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` MaskedFeatureCapability []HostFeatureCapability `xml:"maskedFeatureCapability,omitempty"` VFlashConfigInfo *HostVFlashManagerVFlashConfigInfo `xml:"vFlashConfigInfo,omitempty"` VsanHostConfig *VsanHostConfigInfo `xml:"vsanHostConfig,omitempty"` DomainList []string `xml:"domainList,omitempty"` ScriptCheckSum []byte `xml:"scriptCheckSum,omitempty"` HostConfigCheckSum []byte `xml:"hostConfigCheckSum,omitempty"` GraphicsInfo []HostGraphicsInfo `xml:"graphicsInfo,omitempty"` SharedPassthruGpuTypes []string `xml:"sharedPassthruGpuTypes,omitempty"` GraphicsConfig *HostGraphicsConfig `xml:"graphicsConfig,omitempty"` IoFilterInfo []HostIoFilterInfo `xml:"ioFilterInfo,omitempty"` SriovDevicePool []BaseHostSriovDevicePoolInfo `xml:"sriovDevicePool,omitempty,typeattr"` } func init() { t["HostConfigInfo"] = reflect.TypeOf((*HostConfigInfo)(nil)).Elem() } type HostConfigManager struct { DynamicData CpuScheduler *ManagedObjectReference `xml:"cpuScheduler,omitempty"` DatastoreSystem *ManagedObjectReference `xml:"datastoreSystem,omitempty"` MemoryManager *ManagedObjectReference `xml:"memoryManager,omitempty"` StorageSystem *ManagedObjectReference `xml:"storageSystem,omitempty"` NetworkSystem *ManagedObjectReference `xml:"networkSystem,omitempty"` VmotionSystem *ManagedObjectReference `xml:"vmotionSystem,omitempty"` VirtualNicManager *ManagedObjectReference `xml:"virtualNicManager,omitempty"` ServiceSystem *ManagedObjectReference `xml:"serviceSystem,omitempty"` FirewallSystem *ManagedObjectReference `xml:"firewallSystem,omitempty"` AdvancedOption *ManagedObjectReference `xml:"advancedOption,omitempty"` DiagnosticSystem *ManagedObjectReference `xml:"diagnosticSystem,omitempty"` AutoStartManager *ManagedObjectReference `xml:"autoStartManager,omitempty"` SnmpSystem *ManagedObjectReference `xml:"snmpSystem,omitempty"` DateTimeSystem *ManagedObjectReference `xml:"dateTimeSystem,omitempty"` PatchManager *ManagedObjectReference `xml:"patchManager,omitempty"` ImageConfigManager *ManagedObjectReference `xml:"imageConfigManager,omitempty"` BootDeviceSystem *ManagedObjectReference `xml:"bootDeviceSystem,omitempty"` FirmwareSystem *ManagedObjectReference `xml:"firmwareSystem,omitempty"` HealthStatusSystem *ManagedObjectReference `xml:"healthStatusSystem,omitempty"` PciPassthruSystem *ManagedObjectReference `xml:"pciPassthruSystem,omitempty"` LicenseManager *ManagedObjectReference `xml:"licenseManager,omitempty"` KernelModuleSystem *ManagedObjectReference `xml:"kernelModuleSystem,omitempty"` AuthenticationManager *ManagedObjectReference `xml:"authenticationManager,omitempty"` PowerSystem *ManagedObjectReference `xml:"powerSystem,omitempty"` CacheConfigurationManager *ManagedObjectReference `xml:"cacheConfigurationManager,omitempty"` EsxAgentHostManager *ManagedObjectReference `xml:"esxAgentHostManager,omitempty"` IscsiManager *ManagedObjectReference `xml:"iscsiManager,omitempty"` VFlashManager *ManagedObjectReference `xml:"vFlashManager,omitempty"` VsanSystem *ManagedObjectReference `xml:"vsanSystem,omitempty"` MessageBusProxy *ManagedObjectReference `xml:"messageBusProxy,omitempty"` UserDirectory *ManagedObjectReference `xml:"userDirectory,omitempty"` AccountManager *ManagedObjectReference `xml:"accountManager,omitempty"` HostAccessManager *ManagedObjectReference `xml:"hostAccessManager,omitempty"` GraphicsManager *ManagedObjectReference `xml:"graphicsManager,omitempty"` VsanInternalSystem *ManagedObjectReference `xml:"vsanInternalSystem,omitempty"` CertificateManager *ManagedObjectReference `xml:"certificateManager,omitempty"` CryptoManager *ManagedObjectReference `xml:"cryptoManager,omitempty"` } func init() { t["HostConfigManager"] = reflect.TypeOf((*HostConfigManager)(nil)).Elem() } type HostConfigSpec struct { DynamicData NasDatastore []HostNasVolumeConfig `xml:"nasDatastore,omitempty"` Network *HostNetworkConfig `xml:"network,omitempty"` NicTypeSelection []HostVirtualNicManagerNicTypeSelection `xml:"nicTypeSelection,omitempty"` Service []HostServiceConfig `xml:"service,omitempty"` Firewall *HostFirewallConfig `xml:"firewall,omitempty"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` DatastorePrincipal string `xml:"datastorePrincipal,omitempty"` DatastorePrincipalPasswd string `xml:"datastorePrincipalPasswd,omitempty"` Datetime *HostDateTimeConfig `xml:"datetime,omitempty"` StorageDevice *HostStorageDeviceInfo `xml:"storageDevice,omitempty"` License *HostLicenseSpec `xml:"license,omitempty"` Security *HostSecuritySpec `xml:"security,omitempty"` UserAccount []BaseHostAccountSpec `xml:"userAccount,omitempty,typeattr"` UsergroupAccount []BaseHostAccountSpec `xml:"usergroupAccount,omitempty,typeattr"` Memory *HostMemorySpec `xml:"memory,omitempty"` ActiveDirectory []HostActiveDirectory `xml:"activeDirectory,omitempty"` GenericConfig []KeyAnyValue `xml:"genericConfig,omitempty"` GraphicsConfig *HostGraphicsConfig `xml:"graphicsConfig,omitempty"` } func init() { t["HostConfigSpec"] = reflect.TypeOf((*HostConfigSpec)(nil)).Elem() } type HostConfigSummary struct { DynamicData Name string `xml:"name"` Port int32 `xml:"port"` SslThumbprint string `xml:"sslThumbprint,omitempty"` Product *AboutInfo `xml:"product,omitempty"` VmotionEnabled bool `xml:"vmotionEnabled"` FaultToleranceEnabled *bool `xml:"faultToleranceEnabled"` FeatureVersion []HostFeatureVersionInfo `xml:"featureVersion,omitempty"` AgentVmDatastore *ManagedObjectReference `xml:"agentVmDatastore,omitempty"` AgentVmNetwork *ManagedObjectReference `xml:"agentVmNetwork,omitempty"` } func init() { t["HostConfigSummary"] = reflect.TypeOf((*HostConfigSummary)(nil)).Elem() } type HostConfigVFlashCache HostConfigVFlashCacheRequestType func init() { t["HostConfigVFlashCache"] = reflect.TypeOf((*HostConfigVFlashCache)(nil)).Elem() } type HostConfigVFlashCacheRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostVFlashManagerVFlashCacheConfigSpec `xml:"spec"` } func init() { t["HostConfigVFlashCacheRequestType"] = reflect.TypeOf((*HostConfigVFlashCacheRequestType)(nil)).Elem() } type HostConfigVFlashCacheResponse struct { } type HostConfigureVFlashResource HostConfigureVFlashResourceRequestType func init() { t["HostConfigureVFlashResource"] = reflect.TypeOf((*HostConfigureVFlashResource)(nil)).Elem() } type HostConfigureVFlashResourceRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostVFlashManagerVFlashResourceConfigSpec `xml:"spec"` } func init() { t["HostConfigureVFlashResourceRequestType"] = reflect.TypeOf((*HostConfigureVFlashResourceRequestType)(nil)).Elem() } type HostConfigureVFlashResourceResponse struct { } type HostConnectFault struct { VimFault } func init() { t["HostConnectFault"] = reflect.TypeOf((*HostConnectFault)(nil)).Elem() } type HostConnectFaultFault BaseHostConnectFault func init() { t["HostConnectFaultFault"] = reflect.TypeOf((*HostConnectFaultFault)(nil)).Elem() } type HostConnectInfo struct { DynamicData ServerIp string `xml:"serverIp,omitempty"` InDasCluster *bool `xml:"inDasCluster"` Host HostListSummary `xml:"host"` Vm []VirtualMachineSummary `xml:"vm,omitempty"` VimAccountNameRequired *bool `xml:"vimAccountNameRequired"` ClusterSupported *bool `xml:"clusterSupported"` Network []BaseHostConnectInfoNetworkInfo `xml:"network,omitempty,typeattr"` Datastore []BaseHostDatastoreConnectInfo `xml:"datastore,omitempty,typeattr"` License *HostLicenseConnectInfo `xml:"license,omitempty"` Capability *HostCapability `xml:"capability,omitempty"` } func init() { t["HostConnectInfo"] = reflect.TypeOf((*HostConnectInfo)(nil)).Elem() } type HostConnectInfoNetworkInfo struct { DynamicData Summary BaseNetworkSummary `xml:"summary,typeattr"` } func init() { t["HostConnectInfoNetworkInfo"] = reflect.TypeOf((*HostConnectInfoNetworkInfo)(nil)).Elem() } type HostConnectSpec struct { DynamicData HostName string `xml:"hostName,omitempty"` Port int32 `xml:"port,omitempty"` SslThumbprint string `xml:"sslThumbprint,omitempty"` UserName string `xml:"userName,omitempty"` Password string `xml:"password,omitempty"` VmFolder *ManagedObjectReference `xml:"vmFolder,omitempty"` Force bool `xml:"force"` VimAccountName string `xml:"vimAccountName,omitempty"` VimAccountPassword string `xml:"vimAccountPassword,omitempty"` ManagementIp string `xml:"managementIp,omitempty"` LockdownMode HostLockdownMode `xml:"lockdownMode,omitempty"` HostGateway *HostGatewaySpec `xml:"hostGateway,omitempty"` } func init() { t["HostConnectSpec"] = reflect.TypeOf((*HostConnectSpec)(nil)).Elem() } type HostConnectedEvent struct { HostEvent } func init() { t["HostConnectedEvent"] = reflect.TypeOf((*HostConnectedEvent)(nil)).Elem() } type HostConnectionLostEvent struct { HostEvent } func init() { t["HostConnectionLostEvent"] = reflect.TypeOf((*HostConnectionLostEvent)(nil)).Elem() } type HostCpuIdInfo struct { DynamicData Level int32 `xml:"level"` Vendor string `xml:"vendor,omitempty"` Eax string `xml:"eax,omitempty"` Ebx string `xml:"ebx,omitempty"` Ecx string `xml:"ecx,omitempty"` Edx string `xml:"edx,omitempty"` } func init() { t["HostCpuIdInfo"] = reflect.TypeOf((*HostCpuIdInfo)(nil)).Elem() } type HostCpuInfo struct { DynamicData NumCpuPackages int16 `xml:"numCpuPackages"` NumCpuCores int16 `xml:"numCpuCores"` NumCpuThreads int16 `xml:"numCpuThreads"` Hz int64 `xml:"hz"` } func init() { t["HostCpuInfo"] = reflect.TypeOf((*HostCpuInfo)(nil)).Elem() } type HostCpuPackage struct { DynamicData Index int16 `xml:"index"` Vendor string `xml:"vendor"` Hz int64 `xml:"hz"` BusHz int64 `xml:"busHz"` Description string `xml:"description"` ThreadId []int16 `xml:"threadId"` CpuFeature []HostCpuIdInfo `xml:"cpuFeature,omitempty"` } func init() { t["HostCpuPackage"] = reflect.TypeOf((*HostCpuPackage)(nil)).Elem() } type HostCpuPowerManagementInfo struct { DynamicData CurrentPolicy string `xml:"currentPolicy,omitempty"` HardwareSupport string `xml:"hardwareSupport,omitempty"` } func init() { t["HostCpuPowerManagementInfo"] = reflect.TypeOf((*HostCpuPowerManagementInfo)(nil)).Elem() } type HostCreateDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VslmCreateSpec `xml:"spec"` } func init() { t["HostCreateDiskRequestType"] = reflect.TypeOf((*HostCreateDiskRequestType)(nil)).Elem() } type HostCreateDisk_Task HostCreateDiskRequestType func init() { t["HostCreateDisk_Task"] = reflect.TypeOf((*HostCreateDisk_Task)(nil)).Elem() } type HostCreateDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostDasDisabledEvent struct { HostEvent } func init() { t["HostDasDisabledEvent"] = reflect.TypeOf((*HostDasDisabledEvent)(nil)).Elem() } type HostDasDisablingEvent struct { HostEvent } func init() { t["HostDasDisablingEvent"] = reflect.TypeOf((*HostDasDisablingEvent)(nil)).Elem() } type HostDasEnabledEvent struct { HostEvent } func init() { t["HostDasEnabledEvent"] = reflect.TypeOf((*HostDasEnabledEvent)(nil)).Elem() } type HostDasEnablingEvent struct { HostEvent } func init() { t["HostDasEnablingEvent"] = reflect.TypeOf((*HostDasEnablingEvent)(nil)).Elem() } type HostDasErrorEvent struct { HostEvent Message string `xml:"message,omitempty"` Reason string `xml:"reason,omitempty"` } func init() { t["HostDasErrorEvent"] = reflect.TypeOf((*HostDasErrorEvent)(nil)).Elem() } type HostDasEvent struct { HostEvent } func init() { t["HostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem() } type HostDasOkEvent struct { HostEvent } func init() { t["HostDasOkEvent"] = reflect.TypeOf((*HostDasOkEvent)(nil)).Elem() } type HostDatastoreBrowserSearchResults struct { DynamicData Datastore *ManagedObjectReference `xml:"datastore,omitempty"` FolderPath string `xml:"folderPath,omitempty"` File []BaseFileInfo `xml:"file,omitempty,typeattr"` } func init() { t["HostDatastoreBrowserSearchResults"] = reflect.TypeOf((*HostDatastoreBrowserSearchResults)(nil)).Elem() } type HostDatastoreBrowserSearchSpec struct { DynamicData Query []BaseFileQuery `xml:"query,omitempty,typeattr"` Details *FileQueryFlags `xml:"details,omitempty"` SearchCaseInsensitive *bool `xml:"searchCaseInsensitive"` MatchPattern []string `xml:"matchPattern,omitempty"` SortFoldersFirst *bool `xml:"sortFoldersFirst"` } func init() { t["HostDatastoreBrowserSearchSpec"] = reflect.TypeOf((*HostDatastoreBrowserSearchSpec)(nil)).Elem() } type HostDatastoreConnectInfo struct { DynamicData Summary DatastoreSummary `xml:"summary"` } func init() { t["HostDatastoreConnectInfo"] = reflect.TypeOf((*HostDatastoreConnectInfo)(nil)).Elem() } type HostDatastoreExistsConnectInfo struct { HostDatastoreConnectInfo NewDatastoreName string `xml:"newDatastoreName"` } func init() { t["HostDatastoreExistsConnectInfo"] = reflect.TypeOf((*HostDatastoreExistsConnectInfo)(nil)).Elem() } type HostDatastoreNameConflictConnectInfo struct { HostDatastoreConnectInfo NewDatastoreName string `xml:"newDatastoreName"` } func init() { t["HostDatastoreNameConflictConnectInfo"] = reflect.TypeOf((*HostDatastoreNameConflictConnectInfo)(nil)).Elem() } type HostDatastoreSystemCapabilities struct { DynamicData NfsMountCreationRequired bool `xml:"nfsMountCreationRequired"` NfsMountCreationSupported bool `xml:"nfsMountCreationSupported"` LocalDatastoreSupported bool `xml:"localDatastoreSupported"` VmfsExtentExpansionSupported *bool `xml:"vmfsExtentExpansionSupported"` } func init() { t["HostDatastoreSystemCapabilities"] = reflect.TypeOf((*HostDatastoreSystemCapabilities)(nil)).Elem() } type HostDatastoreSystemDatastoreResult struct { DynamicData Key ManagedObjectReference `xml:"key"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HostDatastoreSystemDatastoreResult"] = reflect.TypeOf((*HostDatastoreSystemDatastoreResult)(nil)).Elem() } type HostDatastoreSystemVvolDatastoreSpec struct { DynamicData Name string `xml:"name"` ScId string `xml:"scId"` } func init() { t["HostDatastoreSystemVvolDatastoreSpec"] = reflect.TypeOf((*HostDatastoreSystemVvolDatastoreSpec)(nil)).Elem() } type HostDateTimeConfig struct { DynamicData TimeZone string `xml:"timeZone,omitempty"` NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"` } func init() { t["HostDateTimeConfig"] = reflect.TypeOf((*HostDateTimeConfig)(nil)).Elem() } type HostDateTimeInfo struct { DynamicData TimeZone HostDateTimeSystemTimeZone `xml:"timeZone"` NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"` } func init() { t["HostDateTimeInfo"] = reflect.TypeOf((*HostDateTimeInfo)(nil)).Elem() } type HostDateTimeSystemTimeZone struct { DynamicData Key string `xml:"key"` Name string `xml:"name"` Description string `xml:"description"` GmtOffset int32 `xml:"gmtOffset"` } func init() { t["HostDateTimeSystemTimeZone"] = reflect.TypeOf((*HostDateTimeSystemTimeZone)(nil)).Elem() } type HostDeleteVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostDeleteVStorageObjectRequestType"] = reflect.TypeOf((*HostDeleteVStorageObjectRequestType)(nil)).Elem() } type HostDeleteVStorageObject_Task HostDeleteVStorageObjectRequestType func init() { t["HostDeleteVStorageObject_Task"] = reflect.TypeOf((*HostDeleteVStorageObject_Task)(nil)).Elem() } type HostDeleteVStorageObject_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostDeploymentInfo struct { DynamicData BootedFromStatelessCache *bool `xml:"bootedFromStatelessCache"` } func init() { t["HostDeploymentInfo"] = reflect.TypeOf((*HostDeploymentInfo)(nil)).Elem() } type HostDevice struct { DynamicData DeviceName string `xml:"deviceName"` DeviceType string `xml:"deviceType"` } func init() { t["HostDevice"] = reflect.TypeOf((*HostDevice)(nil)).Elem() } type HostDhcpService struct { DynamicData Key string `xml:"key"` Spec HostDhcpServiceSpec `xml:"spec"` } func init() { t["HostDhcpService"] = reflect.TypeOf((*HostDhcpService)(nil)).Elem() } type HostDhcpServiceConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Key string `xml:"key"` Spec HostDhcpServiceSpec `xml:"spec"` } func init() { t["HostDhcpServiceConfig"] = reflect.TypeOf((*HostDhcpServiceConfig)(nil)).Elem() } type HostDhcpServiceSpec struct { DynamicData VirtualSwitch string `xml:"virtualSwitch"` DefaultLeaseDuration int32 `xml:"defaultLeaseDuration"` LeaseBeginIp string `xml:"leaseBeginIp"` LeaseEndIp string `xml:"leaseEndIp"` MaxLeaseDuration int32 `xml:"maxLeaseDuration"` UnlimitedLease bool `xml:"unlimitedLease"` IpSubnetAddr string `xml:"ipSubnetAddr"` IpSubnetMask string `xml:"ipSubnetMask"` } func init() { t["HostDhcpServiceSpec"] = reflect.TypeOf((*HostDhcpServiceSpec)(nil)).Elem() } type HostDiagnosticPartition struct { DynamicData StorageType string `xml:"storageType"` DiagnosticType string `xml:"diagnosticType"` Slots int32 `xml:"slots"` Id HostScsiDiskPartition `xml:"id"` } func init() { t["HostDiagnosticPartition"] = reflect.TypeOf((*HostDiagnosticPartition)(nil)).Elem() } type HostDiagnosticPartitionCreateDescription struct { DynamicData Layout HostDiskPartitionLayout `xml:"layout"` DiskUuid string `xml:"diskUuid"` Spec HostDiagnosticPartitionCreateSpec `xml:"spec"` } func init() { t["HostDiagnosticPartitionCreateDescription"] = reflect.TypeOf((*HostDiagnosticPartitionCreateDescription)(nil)).Elem() } type HostDiagnosticPartitionCreateOption struct { DynamicData StorageType string `xml:"storageType"` DiagnosticType string `xml:"diagnosticType"` Disk HostScsiDisk `xml:"disk"` } func init() { t["HostDiagnosticPartitionCreateOption"] = reflect.TypeOf((*HostDiagnosticPartitionCreateOption)(nil)).Elem() } type HostDiagnosticPartitionCreateSpec struct { DynamicData StorageType string `xml:"storageType"` DiagnosticType string `xml:"diagnosticType"` Id HostScsiDiskPartition `xml:"id"` Partition HostDiskPartitionSpec `xml:"partition"` Active *bool `xml:"active"` } func init() { t["HostDiagnosticPartitionCreateSpec"] = reflect.TypeOf((*HostDiagnosticPartitionCreateSpec)(nil)).Elem() } type HostDigestInfo struct { DynamicData DigestMethod string `xml:"digestMethod"` DigestValue []byte `xml:"digestValue"` ObjectName string `xml:"objectName,omitempty"` } func init() { t["HostDigestInfo"] = reflect.TypeOf((*HostDigestInfo)(nil)).Elem() } type HostDirectoryStoreInfo struct { HostAuthenticationStoreInfo } func init() { t["HostDirectoryStoreInfo"] = reflect.TypeOf((*HostDirectoryStoreInfo)(nil)).Elem() } type HostDisconnectedEvent struct { HostEvent Reason string `xml:"reason,omitempty"` } func init() { t["HostDisconnectedEvent"] = reflect.TypeOf((*HostDisconnectedEvent)(nil)).Elem() } type HostDiskConfigurationResult struct { DynamicData DevicePath string `xml:"devicePath,omitempty"` Success *bool `xml:"success"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HostDiskConfigurationResult"] = reflect.TypeOf((*HostDiskConfigurationResult)(nil)).Elem() } type HostDiskDimensions struct { DynamicData } func init() { t["HostDiskDimensions"] = reflect.TypeOf((*HostDiskDimensions)(nil)).Elem() } type HostDiskDimensionsChs struct { DynamicData Cylinder int64 `xml:"cylinder"` Head int32 `xml:"head"` Sector int32 `xml:"sector"` } func init() { t["HostDiskDimensionsChs"] = reflect.TypeOf((*HostDiskDimensionsChs)(nil)).Elem() } type HostDiskDimensionsLba struct { DynamicData BlockSize int32 `xml:"blockSize"` Block int64 `xml:"block"` } func init() { t["HostDiskDimensionsLba"] = reflect.TypeOf((*HostDiskDimensionsLba)(nil)).Elem() } type HostDiskMappingInfo struct { DynamicData PhysicalPartition *HostDiskMappingPartitionInfo `xml:"physicalPartition,omitempty"` Name string `xml:"name"` Exclusive *bool `xml:"exclusive"` } func init() { t["HostDiskMappingInfo"] = reflect.TypeOf((*HostDiskMappingInfo)(nil)).Elem() } type HostDiskMappingOption struct { DynamicData PhysicalPartition []HostDiskMappingPartitionOption `xml:"physicalPartition,omitempty"` Name string `xml:"name"` } func init() { t["HostDiskMappingOption"] = reflect.TypeOf((*HostDiskMappingOption)(nil)).Elem() } type HostDiskMappingPartitionInfo struct { DynamicData Name string `xml:"name"` FileSystem string `xml:"fileSystem"` CapacityInKb int64 `xml:"capacityInKb"` } func init() { t["HostDiskMappingPartitionInfo"] = reflect.TypeOf((*HostDiskMappingPartitionInfo)(nil)).Elem() } type HostDiskMappingPartitionOption struct { DynamicData Name string `xml:"name"` FileSystem string `xml:"fileSystem"` CapacityInKb int64 `xml:"capacityInKb"` } func init() { t["HostDiskMappingPartitionOption"] = reflect.TypeOf((*HostDiskMappingPartitionOption)(nil)).Elem() } type HostDiskPartitionAttributes struct { DynamicData Partition int32 `xml:"partition"` StartSector int64 `xml:"startSector"` EndSector int64 `xml:"endSector"` Type string `xml:"type"` Guid string `xml:"guid,omitempty"` Logical bool `xml:"logical"` Attributes byte `xml:"attributes"` PartitionAlignment int64 `xml:"partitionAlignment,omitempty"` } func init() { t["HostDiskPartitionAttributes"] = reflect.TypeOf((*HostDiskPartitionAttributes)(nil)).Elem() } type HostDiskPartitionBlockRange struct { DynamicData Partition int32 `xml:"partition,omitempty"` Type string `xml:"type"` Start HostDiskDimensionsLba `xml:"start"` End HostDiskDimensionsLba `xml:"end"` } func init() { t["HostDiskPartitionBlockRange"] = reflect.TypeOf((*HostDiskPartitionBlockRange)(nil)).Elem() } type HostDiskPartitionInfo struct { DynamicData DeviceName string `xml:"deviceName"` Spec HostDiskPartitionSpec `xml:"spec"` Layout HostDiskPartitionLayout `xml:"layout"` } func init() { t["HostDiskPartitionInfo"] = reflect.TypeOf((*HostDiskPartitionInfo)(nil)).Elem() } type HostDiskPartitionLayout struct { DynamicData Total *HostDiskDimensionsLba `xml:"total,omitempty"` Partition []HostDiskPartitionBlockRange `xml:"partition"` } func init() { t["HostDiskPartitionLayout"] = reflect.TypeOf((*HostDiskPartitionLayout)(nil)).Elem() } type HostDiskPartitionSpec struct { DynamicData PartitionFormat string `xml:"partitionFormat,omitempty"` Chs *HostDiskDimensionsChs `xml:"chs,omitempty"` TotalSectors int64 `xml:"totalSectors,omitempty"` Partition []HostDiskPartitionAttributes `xml:"partition,omitempty"` } func init() { t["HostDiskPartitionSpec"] = reflect.TypeOf((*HostDiskPartitionSpec)(nil)).Elem() } type HostDnsConfig struct { DynamicData Dhcp bool `xml:"dhcp"` VirtualNicDevice string `xml:"virtualNicDevice,omitempty"` HostName string `xml:"hostName"` DomainName string `xml:"domainName"` Address []string `xml:"address,omitempty"` SearchDomain []string `xml:"searchDomain,omitempty"` } func init() { t["HostDnsConfig"] = reflect.TypeOf((*HostDnsConfig)(nil)).Elem() } type HostDnsConfigSpec struct { HostDnsConfig VirtualNicConnection *HostVirtualNicConnection `xml:"virtualNicConnection,omitempty"` } func init() { t["HostDnsConfigSpec"] = reflect.TypeOf((*HostDnsConfigSpec)(nil)).Elem() } type HostEnableAdminFailedEvent struct { HostEvent Permissions []Permission `xml:"permissions"` } func init() { t["HostEnableAdminFailedEvent"] = reflect.TypeOf((*HostEnableAdminFailedEvent)(nil)).Elem() } type HostEsxAgentHostManagerConfigInfo struct { DynamicData AgentVmDatastore *ManagedObjectReference `xml:"agentVmDatastore,omitempty"` AgentVmNetwork *ManagedObjectReference `xml:"agentVmNetwork,omitempty"` } func init() { t["HostEsxAgentHostManagerConfigInfo"] = reflect.TypeOf((*HostEsxAgentHostManagerConfigInfo)(nil)).Elem() } type HostEvent struct { Event } func init() { t["HostEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem() } type HostEventArgument struct { EntityEventArgument Host ManagedObjectReference `xml:"host"` } func init() { t["HostEventArgument"] = reflect.TypeOf((*HostEventArgument)(nil)).Elem() } type HostExtendDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` NewCapacityInMB int64 `xml:"newCapacityInMB"` } func init() { t["HostExtendDiskRequestType"] = reflect.TypeOf((*HostExtendDiskRequestType)(nil)).Elem() } type HostExtendDisk_Task HostExtendDiskRequestType func init() { t["HostExtendDisk_Task"] = reflect.TypeOf((*HostExtendDisk_Task)(nil)).Elem() } type HostExtendDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostExtraNetworksEvent struct { HostDasEvent Ips string `xml:"ips,omitempty"` } func init() { t["HostExtraNetworksEvent"] = reflect.TypeOf((*HostExtraNetworksEvent)(nil)).Elem() } type HostFaultToleranceManagerComponentHealthInfo struct { DynamicData IsStorageHealthy bool `xml:"isStorageHealthy"` IsNetworkHealthy bool `xml:"isNetworkHealthy"` } func init() { t["HostFaultToleranceManagerComponentHealthInfo"] = reflect.TypeOf((*HostFaultToleranceManagerComponentHealthInfo)(nil)).Elem() } type HostFeatureCapability struct { DynamicData Key string `xml:"key"` FeatureName string `xml:"featureName"` Value string `xml:"value"` } func init() { t["HostFeatureCapability"] = reflect.TypeOf((*HostFeatureCapability)(nil)).Elem() } type HostFeatureMask struct { DynamicData Key string `xml:"key"` FeatureName string `xml:"featureName"` Value string `xml:"value"` } func init() { t["HostFeatureMask"] = reflect.TypeOf((*HostFeatureMask)(nil)).Elem() } type HostFeatureVersionInfo struct { DynamicData Key string `xml:"key"` Value string `xml:"value"` } func init() { t["HostFeatureVersionInfo"] = reflect.TypeOf((*HostFeatureVersionInfo)(nil)).Elem() } type HostFibreChannelHba struct { HostHostBusAdapter PortWorldWideName int64 `xml:"portWorldWideName"` NodeWorldWideName int64 `xml:"nodeWorldWideName"` PortType FibreChannelPortType `xml:"portType"` Speed int64 `xml:"speed"` } func init() { t["HostFibreChannelHba"] = reflect.TypeOf((*HostFibreChannelHba)(nil)).Elem() } type HostFibreChannelOverEthernetHba struct { HostFibreChannelHba UnderlyingNic string `xml:"underlyingNic"` LinkInfo HostFibreChannelOverEthernetHbaLinkInfo `xml:"linkInfo"` IsSoftwareFcoe bool `xml:"isSoftwareFcoe"` MarkedForRemoval bool `xml:"markedForRemoval"` } func init() { t["HostFibreChannelOverEthernetHba"] = reflect.TypeOf((*HostFibreChannelOverEthernetHba)(nil)).Elem() } type HostFibreChannelOverEthernetHbaLinkInfo struct { DynamicData VnportMac string `xml:"vnportMac"` FcfMac string `xml:"fcfMac"` VlanId int32 `xml:"vlanId"` } func init() { t["HostFibreChannelOverEthernetHbaLinkInfo"] = reflect.TypeOf((*HostFibreChannelOverEthernetHbaLinkInfo)(nil)).Elem() } type HostFibreChannelOverEthernetTargetTransport struct { HostFibreChannelTargetTransport VnportMac string `xml:"vnportMac"` FcfMac string `xml:"fcfMac"` VlanId int32 `xml:"vlanId"` } func init() { t["HostFibreChannelOverEthernetTargetTransport"] = reflect.TypeOf((*HostFibreChannelOverEthernetTargetTransport)(nil)).Elem() } type HostFibreChannelTargetTransport struct { HostTargetTransport PortWorldWideName int64 `xml:"portWorldWideName"` NodeWorldWideName int64 `xml:"nodeWorldWideName"` } func init() { t["HostFibreChannelTargetTransport"] = reflect.TypeOf((*HostFibreChannelTargetTransport)(nil)).Elem() } type HostFileAccess struct { DynamicData Who string `xml:"who"` What string `xml:"what"` } func init() { t["HostFileAccess"] = reflect.TypeOf((*HostFileAccess)(nil)).Elem() } type HostFileSystemMountInfo struct { DynamicData MountInfo HostMountInfo `xml:"mountInfo"` Volume BaseHostFileSystemVolume `xml:"volume,typeattr"` VStorageSupport string `xml:"vStorageSupport,omitempty"` } func init() { t["HostFileSystemMountInfo"] = reflect.TypeOf((*HostFileSystemMountInfo)(nil)).Elem() } type HostFileSystemVolume struct { DynamicData Type string `xml:"type"` Name string `xml:"name"` Capacity int64 `xml:"capacity"` } func init() { t["HostFileSystemVolume"] = reflect.TypeOf((*HostFileSystemVolume)(nil)).Elem() } type HostFileSystemVolumeInfo struct { DynamicData VolumeTypeList []string `xml:"volumeTypeList,omitempty"` MountInfo []HostFileSystemMountInfo `xml:"mountInfo,omitempty"` } func init() { t["HostFileSystemVolumeInfo"] = reflect.TypeOf((*HostFileSystemVolumeInfo)(nil)).Elem() } type HostFirewallConfig struct { DynamicData Rule []HostFirewallConfigRuleSetConfig `xml:"rule,omitempty"` DefaultBlockingPolicy HostFirewallDefaultPolicy `xml:"defaultBlockingPolicy"` } func init() { t["HostFirewallConfig"] = reflect.TypeOf((*HostFirewallConfig)(nil)).Elem() } type HostFirewallConfigRuleSetConfig struct { DynamicData RulesetId string `xml:"rulesetId"` Enabled bool `xml:"enabled"` AllowedHosts *HostFirewallRulesetIpList `xml:"allowedHosts,omitempty"` } func init() { t["HostFirewallConfigRuleSetConfig"] = reflect.TypeOf((*HostFirewallConfigRuleSetConfig)(nil)).Elem() } type HostFirewallDefaultPolicy struct { DynamicData IncomingBlocked *bool `xml:"incomingBlocked"` OutgoingBlocked *bool `xml:"outgoingBlocked"` } func init() { t["HostFirewallDefaultPolicy"] = reflect.TypeOf((*HostFirewallDefaultPolicy)(nil)).Elem() } type HostFirewallInfo struct { DynamicData DefaultPolicy HostFirewallDefaultPolicy `xml:"defaultPolicy"` Ruleset []HostFirewallRuleset `xml:"ruleset,omitempty"` } func init() { t["HostFirewallInfo"] = reflect.TypeOf((*HostFirewallInfo)(nil)).Elem() } type HostFirewallRule struct { DynamicData Port int32 `xml:"port"` EndPort int32 `xml:"endPort,omitempty"` Direction HostFirewallRuleDirection `xml:"direction"` PortType HostFirewallRulePortType `xml:"portType,omitempty"` Protocol string `xml:"protocol"` } func init() { t["HostFirewallRule"] = reflect.TypeOf((*HostFirewallRule)(nil)).Elem() } type HostFirewallRuleset struct { DynamicData Key string `xml:"key"` Label string `xml:"label"` Required bool `xml:"required"` Rule []HostFirewallRule `xml:"rule"` Service string `xml:"service,omitempty"` Enabled bool `xml:"enabled"` AllowedHosts *HostFirewallRulesetIpList `xml:"allowedHosts,omitempty"` } func init() { t["HostFirewallRuleset"] = reflect.TypeOf((*HostFirewallRuleset)(nil)).Elem() } type HostFirewallRulesetIpList struct { DynamicData IpAddress []string `xml:"ipAddress,omitempty"` IpNetwork []HostFirewallRulesetIpNetwork `xml:"ipNetwork,omitempty"` AllIp bool `xml:"allIp"` } func init() { t["HostFirewallRulesetIpList"] = reflect.TypeOf((*HostFirewallRulesetIpList)(nil)).Elem() } type HostFirewallRulesetIpNetwork struct { DynamicData Network string `xml:"network"` PrefixLength int32 `xml:"prefixLength"` } func init() { t["HostFirewallRulesetIpNetwork"] = reflect.TypeOf((*HostFirewallRulesetIpNetwork)(nil)).Elem() } type HostFirewallRulesetRulesetSpec struct { DynamicData AllowedHosts HostFirewallRulesetIpList `xml:"allowedHosts"` } func init() { t["HostFirewallRulesetRulesetSpec"] = reflect.TypeOf((*HostFirewallRulesetRulesetSpec)(nil)).Elem() } type HostFlagInfo struct { DynamicData BackgroundSnapshotsEnabled *bool `xml:"backgroundSnapshotsEnabled"` } func init() { t["HostFlagInfo"] = reflect.TypeOf((*HostFlagInfo)(nil)).Elem() } type HostForceMountedInfo struct { DynamicData Persist bool `xml:"persist"` Mounted bool `xml:"mounted"` } func init() { t["HostForceMountedInfo"] = reflect.TypeOf((*HostForceMountedInfo)(nil)).Elem() } type HostGatewaySpec struct { DynamicData GatewayType string `xml:"gatewayType"` GatewayId string `xml:"gatewayId,omitempty"` TrustVerificationToken string `xml:"trustVerificationToken,omitempty"` HostAuthParams []KeyValue `xml:"hostAuthParams,omitempty"` } func init() { t["HostGatewaySpec"] = reflect.TypeOf((*HostGatewaySpec)(nil)).Elem() } type HostGetShortNameFailedEvent struct { HostEvent } func init() { t["HostGetShortNameFailedEvent"] = reflect.TypeOf((*HostGetShortNameFailedEvent)(nil)).Elem() } type HostGetVFlashModuleDefaultConfig HostGetVFlashModuleDefaultConfigRequestType func init() { t["HostGetVFlashModuleDefaultConfig"] = reflect.TypeOf((*HostGetVFlashModuleDefaultConfig)(nil)).Elem() } type HostGetVFlashModuleDefaultConfigRequestType struct { This ManagedObjectReference `xml:"_this"` VFlashModule string `xml:"vFlashModule"` } func init() { t["HostGetVFlashModuleDefaultConfigRequestType"] = reflect.TypeOf((*HostGetVFlashModuleDefaultConfigRequestType)(nil)).Elem() } type HostGetVFlashModuleDefaultConfigResponse struct { Returnval VirtualDiskVFlashCacheConfigInfo `xml:"returnval"` } type HostGraphicsConfig struct { DynamicData HostDefaultGraphicsType string `xml:"hostDefaultGraphicsType"` SharedPassthruAssignmentPolicy string `xml:"sharedPassthruAssignmentPolicy"` DeviceType []HostGraphicsConfigDeviceType `xml:"deviceType,omitempty"` } func init() { t["HostGraphicsConfig"] = reflect.TypeOf((*HostGraphicsConfig)(nil)).Elem() } type HostGraphicsConfigDeviceType struct { DynamicData DeviceId string `xml:"deviceId"` GraphicsType string `xml:"graphicsType"` } func init() { t["HostGraphicsConfigDeviceType"] = reflect.TypeOf((*HostGraphicsConfigDeviceType)(nil)).Elem() } type HostGraphicsInfo struct { DynamicData DeviceName string `xml:"deviceName"` VendorName string `xml:"vendorName"` PciId string `xml:"pciId"` GraphicsType string `xml:"graphicsType"` MemorySizeInKB int64 `xml:"memorySizeInKB"` Vm []ManagedObjectReference `xml:"vm,omitempty"` } func init() { t["HostGraphicsInfo"] = reflect.TypeOf((*HostGraphicsInfo)(nil)).Elem() } type HostHardwareElementInfo struct { DynamicData Name string `xml:"name"` Status BaseElementDescription `xml:"status,typeattr"` } func init() { t["HostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem() } type HostHardwareInfo struct { DynamicData SystemInfo HostSystemInfo `xml:"systemInfo"` CpuPowerManagementInfo *HostCpuPowerManagementInfo `xml:"cpuPowerManagementInfo,omitempty"` CpuInfo HostCpuInfo `xml:"cpuInfo"` CpuPkg []HostCpuPackage `xml:"cpuPkg"` MemorySize int64 `xml:"memorySize"` NumaInfo *HostNumaInfo `xml:"numaInfo,omitempty"` SmcPresent *bool `xml:"smcPresent"` PciDevice []HostPciDevice `xml:"pciDevice,omitempty"` CpuFeature []HostCpuIdInfo `xml:"cpuFeature,omitempty"` BiosInfo *HostBIOSInfo `xml:"biosInfo,omitempty"` ReliableMemoryInfo *HostReliableMemoryInfo `xml:"reliableMemoryInfo,omitempty"` } func init() { t["HostHardwareInfo"] = reflect.TypeOf((*HostHardwareInfo)(nil)).Elem() } type HostHardwareStatusInfo struct { DynamicData MemoryStatusInfo []BaseHostHardwareElementInfo `xml:"memoryStatusInfo,omitempty,typeattr"` CpuStatusInfo []BaseHostHardwareElementInfo `xml:"cpuStatusInfo,omitempty,typeattr"` StorageStatusInfo []HostStorageElementInfo `xml:"storageStatusInfo,omitempty"` } func init() { t["HostHardwareStatusInfo"] = reflect.TypeOf((*HostHardwareStatusInfo)(nil)).Elem() } type HostHardwareSummary struct { DynamicData Vendor string `xml:"vendor"` Model string `xml:"model"` Uuid string `xml:"uuid"` OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"` MemorySize int64 `xml:"memorySize"` CpuModel string `xml:"cpuModel"` CpuMhz int32 `xml:"cpuMhz"` NumCpuPkgs int16 `xml:"numCpuPkgs"` NumCpuCores int16 `xml:"numCpuCores"` NumCpuThreads int16 `xml:"numCpuThreads"` NumNics int32 `xml:"numNics"` NumHBAs int32 `xml:"numHBAs"` } func init() { t["HostHardwareSummary"] = reflect.TypeOf((*HostHardwareSummary)(nil)).Elem() } type HostHasComponentFailure struct { VimFault HostName string `xml:"hostName"` ComponentType string `xml:"componentType"` ComponentName string `xml:"componentName"` } func init() { t["HostHasComponentFailure"] = reflect.TypeOf((*HostHasComponentFailure)(nil)).Elem() } type HostHasComponentFailureFault HostHasComponentFailure func init() { t["HostHasComponentFailureFault"] = reflect.TypeOf((*HostHasComponentFailureFault)(nil)).Elem() } type HostHostBusAdapter struct { DynamicData Key string `xml:"key,omitempty"` Device string `xml:"device"` Bus int32 `xml:"bus"` Status string `xml:"status"` Model string `xml:"model"` Driver string `xml:"driver,omitempty"` Pci string `xml:"pci,omitempty"` } func init() { t["HostHostBusAdapter"] = reflect.TypeOf((*HostHostBusAdapter)(nil)).Elem() } type HostHyperThreadScheduleInfo struct { DynamicData Available bool `xml:"available"` Active bool `xml:"active"` Config bool `xml:"config"` } func init() { t["HostHyperThreadScheduleInfo"] = reflect.TypeOf((*HostHyperThreadScheduleInfo)(nil)).Elem() } type HostImageConfigGetAcceptance HostImageConfigGetAcceptanceRequestType func init() { t["HostImageConfigGetAcceptance"] = reflect.TypeOf((*HostImageConfigGetAcceptance)(nil)).Elem() } type HostImageConfigGetAcceptanceRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["HostImageConfigGetAcceptanceRequestType"] = reflect.TypeOf((*HostImageConfigGetAcceptanceRequestType)(nil)).Elem() } type HostImageConfigGetAcceptanceResponse struct { Returnval string `xml:"returnval"` } type HostImageConfigGetProfile HostImageConfigGetProfileRequestType func init() { t["HostImageConfigGetProfile"] = reflect.TypeOf((*HostImageConfigGetProfile)(nil)).Elem() } type HostImageConfigGetProfileRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["HostImageConfigGetProfileRequestType"] = reflect.TypeOf((*HostImageConfigGetProfileRequestType)(nil)).Elem() } type HostImageConfigGetProfileResponse struct { Returnval HostImageProfileSummary `xml:"returnval"` } type HostImageProfileSummary struct { DynamicData Name string `xml:"name"` Vendor string `xml:"vendor"` } func init() { t["HostImageProfileSummary"] = reflect.TypeOf((*HostImageProfileSummary)(nil)).Elem() } type HostInAuditModeEvent struct { HostEvent } func init() { t["HostInAuditModeEvent"] = reflect.TypeOf((*HostInAuditModeEvent)(nil)).Elem() } type HostInDomain struct { HostConfigFault } func init() { t["HostInDomain"] = reflect.TypeOf((*HostInDomain)(nil)).Elem() } type HostInDomainFault HostInDomain func init() { t["HostInDomainFault"] = reflect.TypeOf((*HostInDomainFault)(nil)).Elem() } type HostIncompatibleForFaultTolerance struct { VmFaultToleranceIssue HostName string `xml:"hostName,omitempty"` Reason string `xml:"reason,omitempty"` } func init() { t["HostIncompatibleForFaultTolerance"] = reflect.TypeOf((*HostIncompatibleForFaultTolerance)(nil)).Elem() } type HostIncompatibleForFaultToleranceFault HostIncompatibleForFaultTolerance func init() { t["HostIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*HostIncompatibleForFaultToleranceFault)(nil)).Elem() } type HostIncompatibleForRecordReplay struct { VimFault HostName string `xml:"hostName,omitempty"` Reason string `xml:"reason,omitempty"` } func init() { t["HostIncompatibleForRecordReplay"] = reflect.TypeOf((*HostIncompatibleForRecordReplay)(nil)).Elem() } type HostIncompatibleForRecordReplayFault HostIncompatibleForRecordReplay func init() { t["HostIncompatibleForRecordReplayFault"] = reflect.TypeOf((*HostIncompatibleForRecordReplayFault)(nil)).Elem() } type HostInflateDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostInflateDiskRequestType"] = reflect.TypeOf((*HostInflateDiskRequestType)(nil)).Elem() } type HostInflateDisk_Task HostInflateDiskRequestType func init() { t["HostInflateDisk_Task"] = reflect.TypeOf((*HostInflateDisk_Task)(nil)).Elem() } type HostInflateDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostInternetScsiHba struct { HostHostBusAdapter IsSoftwareBased bool `xml:"isSoftwareBased"` CanBeDisabled *bool `xml:"canBeDisabled"` NetworkBindingSupport HostInternetScsiHbaNetworkBindingSupportType `xml:"networkBindingSupport,omitempty"` DiscoveryCapabilities HostInternetScsiHbaDiscoveryCapabilities `xml:"discoveryCapabilities"` DiscoveryProperties HostInternetScsiHbaDiscoveryProperties `xml:"discoveryProperties"` AuthenticationCapabilities HostInternetScsiHbaAuthenticationCapabilities `xml:"authenticationCapabilities"` AuthenticationProperties HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties"` DigestCapabilities *HostInternetScsiHbaDigestCapabilities `xml:"digestCapabilities,omitempty"` DigestProperties *HostInternetScsiHbaDigestProperties `xml:"digestProperties,omitempty"` IpCapabilities HostInternetScsiHbaIPCapabilities `xml:"ipCapabilities"` IpProperties HostInternetScsiHbaIPProperties `xml:"ipProperties"` SupportedAdvancedOptions []OptionDef `xml:"supportedAdvancedOptions,omitempty"` AdvancedOptions []HostInternetScsiHbaParamValue `xml:"advancedOptions,omitempty"` IScsiName string `xml:"iScsiName"` IScsiAlias string `xml:"iScsiAlias,omitempty"` ConfiguredSendTarget []HostInternetScsiHbaSendTarget `xml:"configuredSendTarget,omitempty"` ConfiguredStaticTarget []HostInternetScsiHbaStaticTarget `xml:"configuredStaticTarget,omitempty"` MaxSpeedMb int32 `xml:"maxSpeedMb,omitempty"` CurrentSpeedMb int32 `xml:"currentSpeedMb,omitempty"` } func init() { t["HostInternetScsiHba"] = reflect.TypeOf((*HostInternetScsiHba)(nil)).Elem() } type HostInternetScsiHbaAuthenticationCapabilities struct { DynamicData ChapAuthSettable bool `xml:"chapAuthSettable"` Krb5AuthSettable bool `xml:"krb5AuthSettable"` SrpAuthSettable bool `xml:"srpAuthSettable"` SpkmAuthSettable bool `xml:"spkmAuthSettable"` MutualChapSettable *bool `xml:"mutualChapSettable"` TargetChapSettable *bool `xml:"targetChapSettable"` TargetMutualChapSettable *bool `xml:"targetMutualChapSettable"` } func init() { t["HostInternetScsiHbaAuthenticationCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaAuthenticationCapabilities)(nil)).Elem() } type HostInternetScsiHbaAuthenticationProperties struct { DynamicData ChapAuthEnabled bool `xml:"chapAuthEnabled"` ChapName string `xml:"chapName,omitempty"` ChapSecret string `xml:"chapSecret,omitempty"` ChapAuthenticationType string `xml:"chapAuthenticationType,omitempty"` ChapInherited *bool `xml:"chapInherited"` MutualChapName string `xml:"mutualChapName,omitempty"` MutualChapSecret string `xml:"mutualChapSecret,omitempty"` MutualChapAuthenticationType string `xml:"mutualChapAuthenticationType,omitempty"` MutualChapInherited *bool `xml:"mutualChapInherited"` } func init() { t["HostInternetScsiHbaAuthenticationProperties"] = reflect.TypeOf((*HostInternetScsiHbaAuthenticationProperties)(nil)).Elem() } type HostInternetScsiHbaDigestCapabilities struct { DynamicData HeaderDigestSettable *bool `xml:"headerDigestSettable"` DataDigestSettable *bool `xml:"dataDigestSettable"` TargetHeaderDigestSettable *bool `xml:"targetHeaderDigestSettable"` TargetDataDigestSettable *bool `xml:"targetDataDigestSettable"` } func init() { t["HostInternetScsiHbaDigestCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaDigestCapabilities)(nil)).Elem() } type HostInternetScsiHbaDigestProperties struct { DynamicData HeaderDigestType string `xml:"headerDigestType,omitempty"` HeaderDigestInherited *bool `xml:"headerDigestInherited"` DataDigestType string `xml:"dataDigestType,omitempty"` DataDigestInherited *bool `xml:"dataDigestInherited"` } func init() { t["HostInternetScsiHbaDigestProperties"] = reflect.TypeOf((*HostInternetScsiHbaDigestProperties)(nil)).Elem() } type HostInternetScsiHbaDiscoveryCapabilities struct { DynamicData ISnsDiscoverySettable bool `xml:"iSnsDiscoverySettable"` SlpDiscoverySettable bool `xml:"slpDiscoverySettable"` StaticTargetDiscoverySettable bool `xml:"staticTargetDiscoverySettable"` SendTargetsDiscoverySettable bool `xml:"sendTargetsDiscoverySettable"` } func init() { t["HostInternetScsiHbaDiscoveryCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaDiscoveryCapabilities)(nil)).Elem() } type HostInternetScsiHbaDiscoveryProperties struct { DynamicData ISnsDiscoveryEnabled bool `xml:"iSnsDiscoveryEnabled"` ISnsDiscoveryMethod string `xml:"iSnsDiscoveryMethod,omitempty"` ISnsHost string `xml:"iSnsHost,omitempty"` SlpDiscoveryEnabled bool `xml:"slpDiscoveryEnabled"` SlpDiscoveryMethod string `xml:"slpDiscoveryMethod,omitempty"` SlpHost string `xml:"slpHost,omitempty"` StaticTargetDiscoveryEnabled bool `xml:"staticTargetDiscoveryEnabled"` SendTargetsDiscoveryEnabled bool `xml:"sendTargetsDiscoveryEnabled"` } func init() { t["HostInternetScsiHbaDiscoveryProperties"] = reflect.TypeOf((*HostInternetScsiHbaDiscoveryProperties)(nil)).Elem() } type HostInternetScsiHbaIPCapabilities struct { DynamicData AddressSettable bool `xml:"addressSettable"` IpConfigurationMethodSettable bool `xml:"ipConfigurationMethodSettable"` SubnetMaskSettable bool `xml:"subnetMaskSettable"` DefaultGatewaySettable bool `xml:"defaultGatewaySettable"` PrimaryDnsServerAddressSettable bool `xml:"primaryDnsServerAddressSettable"` AlternateDnsServerAddressSettable bool `xml:"alternateDnsServerAddressSettable"` Ipv6Supported *bool `xml:"ipv6Supported"` ArpRedirectSettable *bool `xml:"arpRedirectSettable"` MtuSettable *bool `xml:"mtuSettable"` HostNameAsTargetAddress *bool `xml:"hostNameAsTargetAddress"` NameAliasSettable *bool `xml:"nameAliasSettable"` Ipv4EnableSettable *bool `xml:"ipv4EnableSettable"` Ipv6EnableSettable *bool `xml:"ipv6EnableSettable"` Ipv6PrefixLengthSettable *bool `xml:"ipv6PrefixLengthSettable"` Ipv6PrefixLength int32 `xml:"ipv6PrefixLength,omitempty"` Ipv6DhcpConfigurationSettable *bool `xml:"ipv6DhcpConfigurationSettable"` Ipv6LinkLocalAutoConfigurationSettable *bool `xml:"ipv6LinkLocalAutoConfigurationSettable"` Ipv6RouterAdvertisementConfigurationSettable *bool `xml:"ipv6RouterAdvertisementConfigurationSettable"` Ipv6DefaultGatewaySettable *bool `xml:"ipv6DefaultGatewaySettable"` Ipv6MaxStaticAddressesSupported int32 `xml:"ipv6MaxStaticAddressesSupported,omitempty"` } func init() { t["HostInternetScsiHbaIPCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaIPCapabilities)(nil)).Elem() } type HostInternetScsiHbaIPProperties struct { DynamicData Mac string `xml:"mac,omitempty"` Address string `xml:"address,omitempty"` DhcpConfigurationEnabled bool `xml:"dhcpConfigurationEnabled"` SubnetMask string `xml:"subnetMask,omitempty"` DefaultGateway string `xml:"defaultGateway,omitempty"` PrimaryDnsServerAddress string `xml:"primaryDnsServerAddress,omitempty"` AlternateDnsServerAddress string `xml:"alternateDnsServerAddress,omitempty"` Ipv6Address string `xml:"ipv6Address,omitempty"` Ipv6SubnetMask string `xml:"ipv6SubnetMask,omitempty"` Ipv6DefaultGateway string `xml:"ipv6DefaultGateway,omitempty"` ArpRedirectEnabled *bool `xml:"arpRedirectEnabled"` Mtu int32 `xml:"mtu,omitempty"` JumboFramesEnabled *bool `xml:"jumboFramesEnabled"` Ipv4Enabled *bool `xml:"ipv4Enabled"` Ipv6Enabled *bool `xml:"ipv6Enabled"` Ipv6properties *HostInternetScsiHbaIPv6Properties `xml:"ipv6properties,omitempty"` } func init() { t["HostInternetScsiHbaIPProperties"] = reflect.TypeOf((*HostInternetScsiHbaIPProperties)(nil)).Elem() } type HostInternetScsiHbaIPv6Properties struct { DynamicData IscsiIpv6Address []HostInternetScsiHbaIscsiIpv6Address `xml:"iscsiIpv6Address,omitempty"` Ipv6DhcpConfigurationEnabled *bool `xml:"ipv6DhcpConfigurationEnabled"` Ipv6LinkLocalAutoConfigurationEnabled *bool `xml:"ipv6LinkLocalAutoConfigurationEnabled"` Ipv6RouterAdvertisementConfigurationEnabled *bool `xml:"ipv6RouterAdvertisementConfigurationEnabled"` Ipv6DefaultGateway string `xml:"ipv6DefaultGateway,omitempty"` } func init() { t["HostInternetScsiHbaIPv6Properties"] = reflect.TypeOf((*HostInternetScsiHbaIPv6Properties)(nil)).Elem() } type HostInternetScsiHbaIscsiIpv6Address struct { DynamicData Address string `xml:"address"` PrefixLength int32 `xml:"prefixLength"` Origin string `xml:"origin"` Operation string `xml:"operation,omitempty"` } func init() { t["HostInternetScsiHbaIscsiIpv6Address"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6Address)(nil)).Elem() } type HostInternetScsiHbaParamValue struct { OptionValue IsInherited *bool `xml:"isInherited"` } func init() { t["HostInternetScsiHbaParamValue"] = reflect.TypeOf((*HostInternetScsiHbaParamValue)(nil)).Elem() } type HostInternetScsiHbaSendTarget struct { DynamicData Address string `xml:"address"` Port int32 `xml:"port,omitempty"` AuthenticationProperties *HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties,omitempty"` DigestProperties *HostInternetScsiHbaDigestProperties `xml:"digestProperties,omitempty"` SupportedAdvancedOptions []OptionDef `xml:"supportedAdvancedOptions,omitempty"` AdvancedOptions []HostInternetScsiHbaParamValue `xml:"advancedOptions,omitempty"` Parent string `xml:"parent,omitempty"` } func init() { t["HostInternetScsiHbaSendTarget"] = reflect.TypeOf((*HostInternetScsiHbaSendTarget)(nil)).Elem() } type HostInternetScsiHbaStaticTarget struct { DynamicData Address string `xml:"address"` Port int32 `xml:"port,omitempty"` IScsiName string `xml:"iScsiName"` DiscoveryMethod string `xml:"discoveryMethod,omitempty"` AuthenticationProperties *HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties,omitempty"` DigestProperties *HostInternetScsiHbaDigestProperties `xml:"digestProperties,omitempty"` SupportedAdvancedOptions []OptionDef `xml:"supportedAdvancedOptions,omitempty"` AdvancedOptions []HostInternetScsiHbaParamValue `xml:"advancedOptions,omitempty"` Parent string `xml:"parent,omitempty"` } func init() { t["HostInternetScsiHbaStaticTarget"] = reflect.TypeOf((*HostInternetScsiHbaStaticTarget)(nil)).Elem() } type HostInternetScsiHbaTargetSet struct { DynamicData StaticTargets []HostInternetScsiHbaStaticTarget `xml:"staticTargets,omitempty"` SendTargets []HostInternetScsiHbaSendTarget `xml:"sendTargets,omitempty"` } func init() { t["HostInternetScsiHbaTargetSet"] = reflect.TypeOf((*HostInternetScsiHbaTargetSet)(nil)).Elem() } type HostInternetScsiTargetTransport struct { HostTargetTransport IScsiName string `xml:"iScsiName"` IScsiAlias string `xml:"iScsiAlias"` Address []string `xml:"address,omitempty"` } func init() { t["HostInternetScsiTargetTransport"] = reflect.TypeOf((*HostInternetScsiTargetTransport)(nil)).Elem() } type HostInventoryFull struct { NotEnoughLicenses Capacity int32 `xml:"capacity"` } func init() { t["HostInventoryFull"] = reflect.TypeOf((*HostInventoryFull)(nil)).Elem() } type HostInventoryFullEvent struct { LicenseEvent Capacity int32 `xml:"capacity"` } func init() { t["HostInventoryFullEvent"] = reflect.TypeOf((*HostInventoryFullEvent)(nil)).Elem() } type HostInventoryFullFault HostInventoryFull func init() { t["HostInventoryFullFault"] = reflect.TypeOf((*HostInventoryFullFault)(nil)).Elem() } type HostInventoryUnreadableEvent struct { Event } func init() { t["HostInventoryUnreadableEvent"] = reflect.TypeOf((*HostInventoryUnreadableEvent)(nil)).Elem() } type HostIoFilterInfo struct { IoFilterInfo Available bool `xml:"available"` } func init() { t["HostIoFilterInfo"] = reflect.TypeOf((*HostIoFilterInfo)(nil)).Elem() } type HostIpChangedEvent struct { HostEvent OldIP string `xml:"oldIP"` NewIP string `xml:"newIP"` } func init() { t["HostIpChangedEvent"] = reflect.TypeOf((*HostIpChangedEvent)(nil)).Elem() } type HostIpConfig struct { DynamicData Dhcp bool `xml:"dhcp"` IpAddress string `xml:"ipAddress,omitempty"` SubnetMask string `xml:"subnetMask,omitempty"` IpV6Config *HostIpConfigIpV6AddressConfiguration `xml:"ipV6Config,omitempty"` } func init() { t["HostIpConfig"] = reflect.TypeOf((*HostIpConfig)(nil)).Elem() } type HostIpConfigIpV6Address struct { DynamicData IpAddress string `xml:"ipAddress"` PrefixLength int32 `xml:"prefixLength"` Origin string `xml:"origin,omitempty"` DadState string `xml:"dadState,omitempty"` Lifetime *time.Time `xml:"lifetime"` Operation string `xml:"operation,omitempty"` } func init() { t["HostIpConfigIpV6Address"] = reflect.TypeOf((*HostIpConfigIpV6Address)(nil)).Elem() } type HostIpConfigIpV6AddressConfiguration struct { DynamicData IpV6Address []HostIpConfigIpV6Address `xml:"ipV6Address,omitempty"` AutoConfigurationEnabled *bool `xml:"autoConfigurationEnabled"` DhcpV6Enabled *bool `xml:"dhcpV6Enabled"` } func init() { t["HostIpConfigIpV6AddressConfiguration"] = reflect.TypeOf((*HostIpConfigIpV6AddressConfiguration)(nil)).Elem() } type HostIpInconsistentEvent struct { HostEvent IpAddress string `xml:"ipAddress"` IpAddress2 string `xml:"ipAddress2"` } func init() { t["HostIpInconsistentEvent"] = reflect.TypeOf((*HostIpInconsistentEvent)(nil)).Elem() } type HostIpRouteConfig struct { DynamicData DefaultGateway string `xml:"defaultGateway,omitempty"` GatewayDevice string `xml:"gatewayDevice,omitempty"` IpV6DefaultGateway string `xml:"ipV6DefaultGateway,omitempty"` IpV6GatewayDevice string `xml:"ipV6GatewayDevice,omitempty"` } func init() { t["HostIpRouteConfig"] = reflect.TypeOf((*HostIpRouteConfig)(nil)).Elem() } type HostIpRouteConfigSpec struct { HostIpRouteConfig GatewayDeviceConnection *HostVirtualNicConnection `xml:"gatewayDeviceConnection,omitempty"` IpV6GatewayDeviceConnection *HostVirtualNicConnection `xml:"ipV6GatewayDeviceConnection,omitempty"` } func init() { t["HostIpRouteConfigSpec"] = reflect.TypeOf((*HostIpRouteConfigSpec)(nil)).Elem() } type HostIpRouteEntry struct { DynamicData Network string `xml:"network"` PrefixLength int32 `xml:"prefixLength"` Gateway string `xml:"gateway"` DeviceName string `xml:"deviceName,omitempty"` } func init() { t["HostIpRouteEntry"] = reflect.TypeOf((*HostIpRouteEntry)(nil)).Elem() } type HostIpRouteOp struct { DynamicData ChangeOperation string `xml:"changeOperation"` Route HostIpRouteEntry `xml:"route"` } func init() { t["HostIpRouteOp"] = reflect.TypeOf((*HostIpRouteOp)(nil)).Elem() } type HostIpRouteTableConfig struct { DynamicData IpRoute []HostIpRouteOp `xml:"ipRoute,omitempty"` Ipv6Route []HostIpRouteOp `xml:"ipv6Route,omitempty"` } func init() { t["HostIpRouteTableConfig"] = reflect.TypeOf((*HostIpRouteTableConfig)(nil)).Elem() } type HostIpRouteTableInfo struct { DynamicData IpRoute []HostIpRouteEntry `xml:"ipRoute,omitempty"` Ipv6Route []HostIpRouteEntry `xml:"ipv6Route,omitempty"` } func init() { t["HostIpRouteTableInfo"] = reflect.TypeOf((*HostIpRouteTableInfo)(nil)).Elem() } type HostIpToShortNameFailedEvent struct { HostEvent } func init() { t["HostIpToShortNameFailedEvent"] = reflect.TypeOf((*HostIpToShortNameFailedEvent)(nil)).Elem() } type HostIpmiInfo struct { DynamicData BmcIpAddress string `xml:"bmcIpAddress,omitempty"` BmcMacAddress string `xml:"bmcMacAddress,omitempty"` Login string `xml:"login,omitempty"` Password string `xml:"password,omitempty"` } func init() { t["HostIpmiInfo"] = reflect.TypeOf((*HostIpmiInfo)(nil)).Elem() } type HostIsolationIpPingFailedEvent struct { HostDasEvent IsolationIp string `xml:"isolationIp"` } func init() { t["HostIsolationIpPingFailedEvent"] = reflect.TypeOf((*HostIsolationIpPingFailedEvent)(nil)).Elem() } type HostLicensableResourceInfo struct { DynamicData Resource []KeyAnyValue `xml:"resource"` } func init() { t["HostLicensableResourceInfo"] = reflect.TypeOf((*HostLicensableResourceInfo)(nil)).Elem() } type HostLicenseConnectInfo struct { DynamicData License LicenseManagerLicenseInfo `xml:"license"` Evaluation LicenseManagerEvaluationInfo `xml:"evaluation"` Resource *HostLicensableResourceInfo `xml:"resource,omitempty"` } func init() { t["HostLicenseConnectInfo"] = reflect.TypeOf((*HostLicenseConnectInfo)(nil)).Elem() } type HostLicenseExpiredEvent struct { LicenseEvent } func init() { t["HostLicenseExpiredEvent"] = reflect.TypeOf((*HostLicenseExpiredEvent)(nil)).Elem() } type HostLicenseSpec struct { DynamicData Source BaseLicenseSource `xml:"source,omitempty,typeattr"` EditionKey string `xml:"editionKey,omitempty"` DisabledFeatureKey []string `xml:"disabledFeatureKey,omitempty"` EnabledFeatureKey []string `xml:"enabledFeatureKey,omitempty"` } func init() { t["HostLicenseSpec"] = reflect.TypeOf((*HostLicenseSpec)(nil)).Elem() } type HostListSummary struct { DynamicData Host *ManagedObjectReference `xml:"host,omitempty"` Hardware *HostHardwareSummary `xml:"hardware,omitempty"` Runtime *HostRuntimeInfo `xml:"runtime,omitempty"` Config HostConfigSummary `xml:"config"` QuickStats HostListSummaryQuickStats `xml:"quickStats"` OverallStatus ManagedEntityStatus `xml:"overallStatus"` RebootRequired bool `xml:"rebootRequired"` CustomValue []BaseCustomFieldValue `xml:"customValue,omitempty,typeattr"` ManagementServerIp string `xml:"managementServerIp,omitempty"` MaxEVCModeKey string `xml:"maxEVCModeKey,omitempty"` CurrentEVCModeKey string `xml:"currentEVCModeKey,omitempty"` Gateway *HostListSummaryGatewaySummary `xml:"gateway,omitempty"` } func init() { t["HostListSummary"] = reflect.TypeOf((*HostListSummary)(nil)).Elem() } type HostListSummaryGatewaySummary struct { DynamicData GatewayType string `xml:"gatewayType"` GatewayId string `xml:"gatewayId"` } func init() { t["HostListSummaryGatewaySummary"] = reflect.TypeOf((*HostListSummaryGatewaySummary)(nil)).Elem() } type HostListSummaryQuickStats struct { DynamicData OverallCpuUsage int32 `xml:"overallCpuUsage,omitempty"` OverallMemoryUsage int32 `xml:"overallMemoryUsage,omitempty"` DistributedCpuFairness int32 `xml:"distributedCpuFairness,omitempty"` DistributedMemoryFairness int32 `xml:"distributedMemoryFairness,omitempty"` Uptime int32 `xml:"uptime,omitempty"` } func init() { t["HostListSummaryQuickStats"] = reflect.TypeOf((*HostListSummaryQuickStats)(nil)).Elem() } type HostListVStorageObject HostListVStorageObjectRequestType func init() { t["HostListVStorageObject"] = reflect.TypeOf((*HostListVStorageObject)(nil)).Elem() } type HostListVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostListVStorageObjectRequestType"] = reflect.TypeOf((*HostListVStorageObjectRequestType)(nil)).Elem() } type HostListVStorageObjectResponse struct { Returnval []ID `xml:"returnval,omitempty"` } type HostLocalAuthenticationInfo struct { HostAuthenticationStoreInfo } func init() { t["HostLocalAuthenticationInfo"] = reflect.TypeOf((*HostLocalAuthenticationInfo)(nil)).Elem() } type HostLocalFileSystemVolume struct { HostFileSystemVolume Device string `xml:"device"` } func init() { t["HostLocalFileSystemVolume"] = reflect.TypeOf((*HostLocalFileSystemVolume)(nil)).Elem() } type HostLocalFileSystemVolumeSpec struct { DynamicData Device string `xml:"device"` LocalPath string `xml:"localPath"` } func init() { t["HostLocalFileSystemVolumeSpec"] = reflect.TypeOf((*HostLocalFileSystemVolumeSpec)(nil)).Elem() } type HostLocalPortCreatedEvent struct { DvsEvent HostLocalPort DVSHostLocalPortInfo `xml:"hostLocalPort"` } func init() { t["HostLocalPortCreatedEvent"] = reflect.TypeOf((*HostLocalPortCreatedEvent)(nil)).Elem() } type HostLowLevelProvisioningManagerDiskLayoutSpec struct { DynamicData ControllerType string `xml:"controllerType"` BusNumber int32 `xml:"busNumber"` UnitNumber *int32 `xml:"unitNumber"` SrcFilename string `xml:"srcFilename"` DstFilename string `xml:"dstFilename"` } func init() { t["HostLowLevelProvisioningManagerDiskLayoutSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerDiskLayoutSpec)(nil)).Elem() } type HostLowLevelProvisioningManagerFileDeleteResult struct { DynamicData FileName string `xml:"fileName"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["HostLowLevelProvisioningManagerFileDeleteResult"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileDeleteResult)(nil)).Elem() } type HostLowLevelProvisioningManagerFileDeleteSpec struct { DynamicData FileName string `xml:"fileName"` FileType string `xml:"fileType"` } func init() { t["HostLowLevelProvisioningManagerFileDeleteSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileDeleteSpec)(nil)).Elem() } type HostLowLevelProvisioningManagerFileReserveResult struct { DynamicData BaseName string `xml:"baseName"` ParentDir string `xml:"parentDir"` ReservedName string `xml:"reservedName"` } func init() { t["HostLowLevelProvisioningManagerFileReserveResult"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileReserveResult)(nil)).Elem() } type HostLowLevelProvisioningManagerFileReserveSpec struct { DynamicData BaseName string `xml:"baseName"` ParentDir string `xml:"parentDir"` FileType string `xml:"fileType"` StorageProfile string `xml:"storageProfile"` } func init() { t["HostLowLevelProvisioningManagerFileReserveSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileReserveSpec)(nil)).Elem() } type HostLowLevelProvisioningManagerSnapshotLayoutSpec struct { DynamicData Id int32 `xml:"id"` SrcFilename string `xml:"srcFilename"` DstFilename string `xml:"dstFilename"` Disk []HostLowLevelProvisioningManagerDiskLayoutSpec `xml:"disk,omitempty"` } func init() { t["HostLowLevelProvisioningManagerSnapshotLayoutSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerSnapshotLayoutSpec)(nil)).Elem() } type HostLowLevelProvisioningManagerVmMigrationStatus struct { DynamicData MigrationId int64 `xml:"migrationId"` Type string `xml:"type"` Source bool `xml:"source"` ConsideredSuccessful bool `xml:"consideredSuccessful"` } func init() { t["HostLowLevelProvisioningManagerVmMigrationStatus"] = reflect.TypeOf((*HostLowLevelProvisioningManagerVmMigrationStatus)(nil)).Elem() } type HostLowLevelProvisioningManagerVmRecoveryInfo struct { DynamicData Version string `xml:"version"` BiosUUID string `xml:"biosUUID"` InstanceUUID string `xml:"instanceUUID"` FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` } func init() { t["HostLowLevelProvisioningManagerVmRecoveryInfo"] = reflect.TypeOf((*HostLowLevelProvisioningManagerVmRecoveryInfo)(nil)).Elem() } type HostMaintenanceSpec struct { DynamicData VsanMode *VsanHostDecommissionMode `xml:"vsanMode,omitempty"` } func init() { t["HostMaintenanceSpec"] = reflect.TypeOf((*HostMaintenanceSpec)(nil)).Elem() } type HostMemberHealthCheckResult struct { DynamicData Summary string `xml:"summary,omitempty"` } func init() { t["HostMemberHealthCheckResult"] = reflect.TypeOf((*HostMemberHealthCheckResult)(nil)).Elem() } type HostMemberRuntimeInfo struct { DynamicData Host ManagedObjectReference `xml:"host"` Status string `xml:"status,omitempty"` StatusDetail string `xml:"statusDetail,omitempty"` HealthCheckResult []BaseHostMemberHealthCheckResult `xml:"healthCheckResult,omitempty,typeattr"` } func init() { t["HostMemberRuntimeInfo"] = reflect.TypeOf((*HostMemberRuntimeInfo)(nil)).Elem() } type HostMemberUplinkHealthCheckResult struct { HostMemberHealthCheckResult UplinkPortKey string `xml:"uplinkPortKey"` } func init() { t["HostMemberUplinkHealthCheckResult"] = reflect.TypeOf((*HostMemberUplinkHealthCheckResult)(nil)).Elem() } type HostMemoryProfile struct { ApplyProfile } func init() { t["HostMemoryProfile"] = reflect.TypeOf((*HostMemoryProfile)(nil)).Elem() } type HostMemorySpec struct { DynamicData ServiceConsoleReservation int64 `xml:"serviceConsoleReservation,omitempty"` } func init() { t["HostMemorySpec"] = reflect.TypeOf((*HostMemorySpec)(nil)).Elem() } type HostMissingNetworksEvent struct { HostDasEvent Ips string `xml:"ips,omitempty"` } func init() { t["HostMissingNetworksEvent"] = reflect.TypeOf((*HostMissingNetworksEvent)(nil)).Elem() } type HostMonitoringStateChangedEvent struct { ClusterEvent State string `xml:"state"` PrevState string `xml:"prevState,omitempty"` } func init() { t["HostMonitoringStateChangedEvent"] = reflect.TypeOf((*HostMonitoringStateChangedEvent)(nil)).Elem() } type HostMountInfo struct { DynamicData Path string `xml:"path,omitempty"` AccessMode string `xml:"accessMode"` Mounted *bool `xml:"mounted"` Accessible *bool `xml:"accessible"` InaccessibleReason string `xml:"inaccessibleReason,omitempty"` } func init() { t["HostMountInfo"] = reflect.TypeOf((*HostMountInfo)(nil)).Elem() } type HostMultipathInfo struct { DynamicData Lun []HostMultipathInfoLogicalUnit `xml:"lun,omitempty"` } func init() { t["HostMultipathInfo"] = reflect.TypeOf((*HostMultipathInfo)(nil)).Elem() } type HostMultipathInfoFixedLogicalUnitPolicy struct { HostMultipathInfoLogicalUnitPolicy Prefer string `xml:"prefer"` } func init() { t["HostMultipathInfoFixedLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoFixedLogicalUnitPolicy)(nil)).Elem() } type HostMultipathInfoLogicalUnit struct { DynamicData Key string `xml:"key"` Id string `xml:"id"` Lun string `xml:"lun"` Path []HostMultipathInfoPath `xml:"path"` Policy BaseHostMultipathInfoLogicalUnitPolicy `xml:"policy,typeattr"` StorageArrayTypePolicy *HostMultipathInfoLogicalUnitStorageArrayTypePolicy `xml:"storageArrayTypePolicy,omitempty"` } func init() { t["HostMultipathInfoLogicalUnit"] = reflect.TypeOf((*HostMultipathInfoLogicalUnit)(nil)).Elem() } type HostMultipathInfoLogicalUnitPolicy struct { DynamicData Policy string `xml:"policy"` } func init() { t["HostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem() } type HostMultipathInfoLogicalUnitStorageArrayTypePolicy struct { DynamicData Policy string `xml:"policy"` } func init() { t["HostMultipathInfoLogicalUnitStorageArrayTypePolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitStorageArrayTypePolicy)(nil)).Elem() } type HostMultipathInfoPath struct { DynamicData Key string `xml:"key"` Name string `xml:"name"` PathState string `xml:"pathState"` State string `xml:"state,omitempty"` IsWorkingPath *bool `xml:"isWorkingPath"` Adapter string `xml:"adapter"` Lun string `xml:"lun"` Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"` } func init() { t["HostMultipathInfoPath"] = reflect.TypeOf((*HostMultipathInfoPath)(nil)).Elem() } type HostMultipathStateInfo struct { DynamicData Path []HostMultipathStateInfoPath `xml:"path,omitempty"` } func init() { t["HostMultipathStateInfo"] = reflect.TypeOf((*HostMultipathStateInfo)(nil)).Elem() } type HostMultipathStateInfoPath struct { DynamicData Name string `xml:"name"` PathState string `xml:"pathState"` } func init() { t["HostMultipathStateInfoPath"] = reflect.TypeOf((*HostMultipathStateInfoPath)(nil)).Elem() } type HostNasVolume struct { HostFileSystemVolume RemoteHost string `xml:"remoteHost"` RemotePath string `xml:"remotePath"` UserName string `xml:"userName,omitempty"` RemoteHostNames []string `xml:"remoteHostNames,omitempty"` SecurityType string `xml:"securityType,omitempty"` ProtocolEndpoint *bool `xml:"protocolEndpoint"` } func init() { t["HostNasVolume"] = reflect.TypeOf((*HostNasVolume)(nil)).Elem() } type HostNasVolumeConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Spec *HostNasVolumeSpec `xml:"spec,omitempty"` } func init() { t["HostNasVolumeConfig"] = reflect.TypeOf((*HostNasVolumeConfig)(nil)).Elem() } type HostNasVolumeSpec struct { DynamicData RemoteHost string `xml:"remoteHost"` RemotePath string `xml:"remotePath"` LocalPath string `xml:"localPath"` AccessMode string `xml:"accessMode"` Type string `xml:"type,omitempty"` UserName string `xml:"userName,omitempty"` Password string `xml:"password,omitempty"` RemoteHostNames []string `xml:"remoteHostNames,omitempty"` SecurityType string `xml:"securityType,omitempty"` } func init() { t["HostNasVolumeSpec"] = reflect.TypeOf((*HostNasVolumeSpec)(nil)).Elem() } type HostNasVolumeUserInfo struct { DynamicData User string `xml:"user"` } func init() { t["HostNasVolumeUserInfo"] = reflect.TypeOf((*HostNasVolumeUserInfo)(nil)).Elem() } type HostNatService struct { DynamicData Key string `xml:"key"` Spec HostNatServiceSpec `xml:"spec"` } func init() { t["HostNatService"] = reflect.TypeOf((*HostNatService)(nil)).Elem() } type HostNatServiceConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Key string `xml:"key"` Spec HostNatServiceSpec `xml:"spec"` } func init() { t["HostNatServiceConfig"] = reflect.TypeOf((*HostNatServiceConfig)(nil)).Elem() } type HostNatServiceNameServiceSpec struct { DynamicData DnsAutoDetect bool `xml:"dnsAutoDetect"` DnsPolicy string `xml:"dnsPolicy"` DnsRetries int32 `xml:"dnsRetries"` DnsTimeout int32 `xml:"dnsTimeout"` DnsNameServer []string `xml:"dnsNameServer,omitempty"` NbdsTimeout int32 `xml:"nbdsTimeout"` NbnsRetries int32 `xml:"nbnsRetries"` NbnsTimeout int32 `xml:"nbnsTimeout"` } func init() { t["HostNatServiceNameServiceSpec"] = reflect.TypeOf((*HostNatServiceNameServiceSpec)(nil)).Elem() } type HostNatServicePortForwardSpec struct { DynamicData Type string `xml:"type"` Name string `xml:"name"` HostPort int32 `xml:"hostPort"` GuestPort int32 `xml:"guestPort"` GuestIpAddress string `xml:"guestIpAddress"` } func init() { t["HostNatServicePortForwardSpec"] = reflect.TypeOf((*HostNatServicePortForwardSpec)(nil)).Elem() } type HostNatServiceSpec struct { DynamicData VirtualSwitch string `xml:"virtualSwitch"` ActiveFtp bool `xml:"activeFtp"` AllowAnyOui bool `xml:"allowAnyOui"` ConfigPort bool `xml:"configPort"` IpGatewayAddress string `xml:"ipGatewayAddress"` UdpTimeout int32 `xml:"udpTimeout"` PortForward []HostNatServicePortForwardSpec `xml:"portForward,omitempty"` NameService *HostNatServiceNameServiceSpec `xml:"nameService,omitempty"` } func init() { t["HostNatServiceSpec"] = reflect.TypeOf((*HostNatServiceSpec)(nil)).Elem() } type HostNetCapabilities struct { DynamicData CanSetPhysicalNicLinkSpeed bool `xml:"canSetPhysicalNicLinkSpeed"` SupportsNicTeaming bool `xml:"supportsNicTeaming"` NicTeamingPolicy []string `xml:"nicTeamingPolicy,omitempty"` SupportsVlan bool `xml:"supportsVlan"` UsesServiceConsoleNic bool `xml:"usesServiceConsoleNic"` SupportsNetworkHints bool `xml:"supportsNetworkHints"` MaxPortGroupsPerVswitch int32 `xml:"maxPortGroupsPerVswitch,omitempty"` VswitchConfigSupported bool `xml:"vswitchConfigSupported"` VnicConfigSupported bool `xml:"vnicConfigSupported"` IpRouteConfigSupported bool `xml:"ipRouteConfigSupported"` DnsConfigSupported bool `xml:"dnsConfigSupported"` DhcpOnVnicSupported bool `xml:"dhcpOnVnicSupported"` IpV6Supported *bool `xml:"ipV6Supported"` } func init() { t["HostNetCapabilities"] = reflect.TypeOf((*HostNetCapabilities)(nil)).Elem() } type HostNetOffloadCapabilities struct { DynamicData CsumOffload *bool `xml:"csumOffload"` TcpSegmentation *bool `xml:"tcpSegmentation"` ZeroCopyXmit *bool `xml:"zeroCopyXmit"` } func init() { t["HostNetOffloadCapabilities"] = reflect.TypeOf((*HostNetOffloadCapabilities)(nil)).Elem() } type HostNetStackInstance struct { DynamicData Key string `xml:"key,omitempty"` Name string `xml:"name,omitempty"` DnsConfig BaseHostDnsConfig `xml:"dnsConfig,omitempty,typeattr"` IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` RequestedMaxNumberOfConnections int32 `xml:"requestedMaxNumberOfConnections,omitempty"` CongestionControlAlgorithm string `xml:"congestionControlAlgorithm,omitempty"` IpV6Enabled *bool `xml:"ipV6Enabled"` RouteTableConfig *HostIpRouteTableConfig `xml:"routeTableConfig,omitempty"` } func init() { t["HostNetStackInstance"] = reflect.TypeOf((*HostNetStackInstance)(nil)).Elem() } type HostNetworkConfig struct { DynamicData Vswitch []HostVirtualSwitchConfig `xml:"vswitch,omitempty"` ProxySwitch []HostProxySwitchConfig `xml:"proxySwitch,omitempty"` Portgroup []HostPortGroupConfig `xml:"portgroup,omitempty"` Pnic []PhysicalNicConfig `xml:"pnic,omitempty"` Vnic []HostVirtualNicConfig `xml:"vnic,omitempty"` ConsoleVnic []HostVirtualNicConfig `xml:"consoleVnic,omitempty"` DnsConfig BaseHostDnsConfig `xml:"dnsConfig,omitempty,typeattr"` IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` ConsoleIpRouteConfig BaseHostIpRouteConfig `xml:"consoleIpRouteConfig,omitempty,typeattr"` RouteTableConfig *HostIpRouteTableConfig `xml:"routeTableConfig,omitempty"` Dhcp []HostDhcpServiceConfig `xml:"dhcp,omitempty"` Nat []HostNatServiceConfig `xml:"nat,omitempty"` IpV6Enabled *bool `xml:"ipV6Enabled"` NetStackSpec []HostNetworkConfigNetStackSpec `xml:"netStackSpec,omitempty"` } func init() { t["HostNetworkConfig"] = reflect.TypeOf((*HostNetworkConfig)(nil)).Elem() } type HostNetworkConfigNetStackSpec struct { DynamicData NetStackInstance HostNetStackInstance `xml:"netStackInstance"` Operation string `xml:"operation,omitempty"` } func init() { t["HostNetworkConfigNetStackSpec"] = reflect.TypeOf((*HostNetworkConfigNetStackSpec)(nil)).Elem() } type HostNetworkConfigResult struct { DynamicData VnicDevice []string `xml:"vnicDevice,omitempty"` ConsoleVnicDevice []string `xml:"consoleVnicDevice,omitempty"` } func init() { t["HostNetworkConfigResult"] = reflect.TypeOf((*HostNetworkConfigResult)(nil)).Elem() } type HostNetworkInfo struct { DynamicData Vswitch []HostVirtualSwitch `xml:"vswitch,omitempty"` ProxySwitch []HostProxySwitch `xml:"proxySwitch,omitempty"` Portgroup []HostPortGroup `xml:"portgroup,omitempty"` Pnic []PhysicalNic `xml:"pnic,omitempty"` Vnic []HostVirtualNic `xml:"vnic,omitempty"` ConsoleVnic []HostVirtualNic `xml:"consoleVnic,omitempty"` DnsConfig BaseHostDnsConfig `xml:"dnsConfig,omitempty,typeattr"` IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` ConsoleIpRouteConfig BaseHostIpRouteConfig `xml:"consoleIpRouteConfig,omitempty,typeattr"` RouteTableInfo *HostIpRouteTableInfo `xml:"routeTableInfo,omitempty"` Dhcp []HostDhcpService `xml:"dhcp,omitempty"` Nat []HostNatService `xml:"nat,omitempty"` IpV6Enabled *bool `xml:"ipV6Enabled"` AtBootIpV6Enabled *bool `xml:"atBootIpV6Enabled"` NetStackInstance []HostNetStackInstance `xml:"netStackInstance,omitempty"` OpaqueSwitch []HostOpaqueSwitch `xml:"opaqueSwitch,omitempty"` OpaqueNetwork []HostOpaqueNetworkInfo `xml:"opaqueNetwork,omitempty"` } func init() { t["HostNetworkInfo"] = reflect.TypeOf((*HostNetworkInfo)(nil)).Elem() } type HostNetworkPolicy struct { DynamicData Security *HostNetworkSecurityPolicy `xml:"security,omitempty"` NicTeaming *HostNicTeamingPolicy `xml:"nicTeaming,omitempty"` OffloadPolicy *HostNetOffloadCapabilities `xml:"offloadPolicy,omitempty"` ShapingPolicy *HostNetworkTrafficShapingPolicy `xml:"shapingPolicy,omitempty"` } func init() { t["HostNetworkPolicy"] = reflect.TypeOf((*HostNetworkPolicy)(nil)).Elem() } type HostNetworkResourceRuntime struct { DynamicData PnicResourceInfo []HostPnicNetworkResourceInfo `xml:"pnicResourceInfo"` } func init() { t["HostNetworkResourceRuntime"] = reflect.TypeOf((*HostNetworkResourceRuntime)(nil)).Elem() } type HostNetworkSecurityPolicy struct { DynamicData AllowPromiscuous *bool `xml:"allowPromiscuous"` MacChanges *bool `xml:"macChanges"` ForgedTransmits *bool `xml:"forgedTransmits"` } func init() { t["HostNetworkSecurityPolicy"] = reflect.TypeOf((*HostNetworkSecurityPolicy)(nil)).Elem() } type HostNetworkTrafficShapingPolicy struct { DynamicData Enabled *bool `xml:"enabled"` AverageBandwidth int64 `xml:"averageBandwidth,omitempty"` PeakBandwidth int64 `xml:"peakBandwidth,omitempty"` BurstSize int64 `xml:"burstSize,omitempty"` } func init() { t["HostNetworkTrafficShapingPolicy"] = reflect.TypeOf((*HostNetworkTrafficShapingPolicy)(nil)).Elem() } type HostNewNetworkConnectInfo struct { HostConnectInfoNetworkInfo } func init() { t["HostNewNetworkConnectInfo"] = reflect.TypeOf((*HostNewNetworkConnectInfo)(nil)).Elem() } type HostNicFailureCriteria struct { DynamicData CheckSpeed string `xml:"checkSpeed,omitempty"` Speed int32 `xml:"speed,omitempty"` CheckDuplex *bool `xml:"checkDuplex"` FullDuplex *bool `xml:"fullDuplex"` CheckErrorPercent *bool `xml:"checkErrorPercent"` Percentage int32 `xml:"percentage,omitempty"` CheckBeacon *bool `xml:"checkBeacon"` } func init() { t["HostNicFailureCriteria"] = reflect.TypeOf((*HostNicFailureCriteria)(nil)).Elem() } type HostNicOrderPolicy struct { DynamicData ActiveNic []string `xml:"activeNic,omitempty"` StandbyNic []string `xml:"standbyNic,omitempty"` } func init() { t["HostNicOrderPolicy"] = reflect.TypeOf((*HostNicOrderPolicy)(nil)).Elem() } type HostNicTeamingPolicy struct { DynamicData Policy string `xml:"policy,omitempty"` ReversePolicy *bool `xml:"reversePolicy"` NotifySwitches *bool `xml:"notifySwitches"` RollingOrder *bool `xml:"rollingOrder"` FailureCriteria *HostNicFailureCriteria `xml:"failureCriteria,omitempty"` NicOrder *HostNicOrderPolicy `xml:"nicOrder,omitempty"` } func init() { t["HostNicTeamingPolicy"] = reflect.TypeOf((*HostNicTeamingPolicy)(nil)).Elem() } type HostNoAvailableNetworksEvent struct { HostDasEvent Ips string `xml:"ips,omitempty"` } func init() { t["HostNoAvailableNetworksEvent"] = reflect.TypeOf((*HostNoAvailableNetworksEvent)(nil)).Elem() } type HostNoHAEnabledPortGroupsEvent struct { HostDasEvent } func init() { t["HostNoHAEnabledPortGroupsEvent"] = reflect.TypeOf((*HostNoHAEnabledPortGroupsEvent)(nil)).Elem() } type HostNoRedundantManagementNetworkEvent struct { HostDasEvent } func init() { t["HostNoRedundantManagementNetworkEvent"] = reflect.TypeOf((*HostNoRedundantManagementNetworkEvent)(nil)).Elem() } type HostNonCompliantEvent struct { HostEvent } func init() { t["HostNonCompliantEvent"] = reflect.TypeOf((*HostNonCompliantEvent)(nil)).Elem() } type HostNotConnected struct { HostCommunication } func init() { t["HostNotConnected"] = reflect.TypeOf((*HostNotConnected)(nil)).Elem() } type HostNotConnectedFault HostNotConnected func init() { t["HostNotConnectedFault"] = reflect.TypeOf((*HostNotConnectedFault)(nil)).Elem() } type HostNotInClusterEvent struct { HostDasEvent } func init() { t["HostNotInClusterEvent"] = reflect.TypeOf((*HostNotInClusterEvent)(nil)).Elem() } type HostNotReachable struct { HostCommunication } func init() { t["HostNotReachable"] = reflect.TypeOf((*HostNotReachable)(nil)).Elem() } type HostNotReachableFault HostNotReachable func init() { t["HostNotReachableFault"] = reflect.TypeOf((*HostNotReachableFault)(nil)).Elem() } type HostNtpConfig struct { DynamicData Server []string `xml:"server,omitempty"` ConfigFile []string `xml:"configFile,omitempty"` } func init() { t["HostNtpConfig"] = reflect.TypeOf((*HostNtpConfig)(nil)).Elem() } type HostNumaInfo struct { DynamicData Type string `xml:"type"` NumNodes int32 `xml:"numNodes"` NumaNode []HostNumaNode `xml:"numaNode,omitempty"` } func init() { t["HostNumaInfo"] = reflect.TypeOf((*HostNumaInfo)(nil)).Elem() } type HostNumaNode struct { DynamicData TypeId byte `xml:"typeId"` CpuID []int16 `xml:"cpuID"` MemoryRangeBegin int64 `xml:"memoryRangeBegin"` MemoryRangeLength int64 `xml:"memoryRangeLength"` } func init() { t["HostNumaNode"] = reflect.TypeOf((*HostNumaNode)(nil)).Elem() } type HostNumericSensorInfo struct { DynamicData Name string `xml:"name"` HealthState BaseElementDescription `xml:"healthState,omitempty,typeattr"` CurrentReading int64 `xml:"currentReading"` UnitModifier int32 `xml:"unitModifier"` BaseUnits string `xml:"baseUnits"` RateUnits string `xml:"rateUnits,omitempty"` SensorType string `xml:"sensorType"` Id string `xml:"id,omitempty"` TimeStamp string `xml:"timeStamp,omitempty"` } func init() { t["HostNumericSensorInfo"] = reflect.TypeOf((*HostNumericSensorInfo)(nil)).Elem() } type HostOpaqueNetworkInfo struct { DynamicData OpaqueNetworkId string `xml:"opaqueNetworkId"` OpaqueNetworkName string `xml:"opaqueNetworkName"` OpaqueNetworkType string `xml:"opaqueNetworkType"` PnicZone []string `xml:"pnicZone,omitempty"` Capability *OpaqueNetworkCapability `xml:"capability,omitempty"` ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` } func init() { t["HostOpaqueNetworkInfo"] = reflect.TypeOf((*HostOpaqueNetworkInfo)(nil)).Elem() } type HostOpaqueSwitch struct { DynamicData Key string `xml:"key"` Name string `xml:"name,omitempty"` Pnic []string `xml:"pnic,omitempty"` PnicZone []HostOpaqueSwitchPhysicalNicZone `xml:"pnicZone,omitempty"` Status string `xml:"status,omitempty"` Vtep []HostVirtualNic `xml:"vtep,omitempty"` ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` } func init() { t["HostOpaqueSwitch"] = reflect.TypeOf((*HostOpaqueSwitch)(nil)).Elem() } type HostOpaqueSwitchPhysicalNicZone struct { DynamicData Key string `xml:"key"` PnicDevice []string `xml:"pnicDevice,omitempty"` } func init() { t["HostOpaqueSwitchPhysicalNicZone"] = reflect.TypeOf((*HostOpaqueSwitchPhysicalNicZone)(nil)).Elem() } type HostOvercommittedEvent struct { ClusterOvercommittedEvent } func init() { t["HostOvercommittedEvent"] = reflect.TypeOf((*HostOvercommittedEvent)(nil)).Elem() } type HostParallelScsiHba struct { HostHostBusAdapter } func init() { t["HostParallelScsiHba"] = reflect.TypeOf((*HostParallelScsiHba)(nil)).Elem() } type HostParallelScsiTargetTransport struct { HostTargetTransport } func init() { t["HostParallelScsiTargetTransport"] = reflect.TypeOf((*HostParallelScsiTargetTransport)(nil)).Elem() } type HostPatchManagerLocator struct { DynamicData Url string `xml:"url"` Proxy string `xml:"proxy,omitempty"` } func init() { t["HostPatchManagerLocator"] = reflect.TypeOf((*HostPatchManagerLocator)(nil)).Elem() } type HostPatchManagerPatchManagerOperationSpec struct { DynamicData Proxy string `xml:"proxy,omitempty"` Port int32 `xml:"port,omitempty"` UserName string `xml:"userName,omitempty"` Password string `xml:"password,omitempty"` CmdOption string `xml:"cmdOption,omitempty"` } func init() { t["HostPatchManagerPatchManagerOperationSpec"] = reflect.TypeOf((*HostPatchManagerPatchManagerOperationSpec)(nil)).Elem() } type HostPatchManagerResult struct { DynamicData Version string `xml:"version"` Status []HostPatchManagerStatus `xml:"status,omitempty"` XmlResult string `xml:"xmlResult,omitempty"` } func init() { t["HostPatchManagerResult"] = reflect.TypeOf((*HostPatchManagerResult)(nil)).Elem() } type HostPatchManagerStatus struct { DynamicData Id string `xml:"id"` Applicable bool `xml:"applicable"` Reason []string `xml:"reason,omitempty"` Integrity string `xml:"integrity,omitempty"` Installed bool `xml:"installed"` InstallState []string `xml:"installState,omitempty"` PrerequisitePatch []HostPatchManagerStatusPrerequisitePatch `xml:"prerequisitePatch,omitempty"` RestartRequired bool `xml:"restartRequired"` ReconnectRequired bool `xml:"reconnectRequired"` VmOffRequired bool `xml:"vmOffRequired"` SupersededPatchIds []string `xml:"supersededPatchIds,omitempty"` } func init() { t["HostPatchManagerStatus"] = reflect.TypeOf((*HostPatchManagerStatus)(nil)).Elem() } type HostPatchManagerStatusPrerequisitePatch struct { DynamicData Id string `xml:"id"` InstallState []string `xml:"installState,omitempty"` } func init() { t["HostPatchManagerStatusPrerequisitePatch"] = reflect.TypeOf((*HostPatchManagerStatusPrerequisitePatch)(nil)).Elem() } type HostPathSelectionPolicyOption struct { DynamicData Policy BaseElementDescription `xml:"policy,typeattr"` } func init() { t["HostPathSelectionPolicyOption"] = reflect.TypeOf((*HostPathSelectionPolicyOption)(nil)).Elem() } type HostPciDevice struct { DynamicData Id string `xml:"id"` ClassId int16 `xml:"classId"` Bus byte `xml:"bus"` Slot byte `xml:"slot"` Function byte `xml:"function"` VendorId int16 `xml:"vendorId"` SubVendorId int16 `xml:"subVendorId"` VendorName string `xml:"vendorName"` DeviceId int16 `xml:"deviceId"` SubDeviceId int16 `xml:"subDeviceId"` ParentBridge string `xml:"parentBridge,omitempty"` DeviceName string `xml:"deviceName"` } func init() { t["HostPciDevice"] = reflect.TypeOf((*HostPciDevice)(nil)).Elem() } type HostPciPassthruConfig struct { DynamicData Id string `xml:"id"` PassthruEnabled bool `xml:"passthruEnabled"` } func init() { t["HostPciPassthruConfig"] = reflect.TypeOf((*HostPciPassthruConfig)(nil)).Elem() } type HostPciPassthruInfo struct { DynamicData Id string `xml:"id"` DependentDevice string `xml:"dependentDevice"` PassthruEnabled bool `xml:"passthruEnabled"` PassthruCapable bool `xml:"passthruCapable"` PassthruActive bool `xml:"passthruActive"` } func init() { t["HostPciPassthruInfo"] = reflect.TypeOf((*HostPciPassthruInfo)(nil)).Elem() } type HostPlacedVirtualNicIdentifier struct { DynamicData Vm ManagedObjectReference `xml:"vm"` VnicKey string `xml:"vnicKey"` Reservation int32 `xml:"reservation,omitempty"` } func init() { t["HostPlacedVirtualNicIdentifier"] = reflect.TypeOf((*HostPlacedVirtualNicIdentifier)(nil)).Elem() } type HostPlugStoreTopology struct { DynamicData Adapter []HostPlugStoreTopologyAdapter `xml:"adapter,omitempty"` Path []HostPlugStoreTopologyPath `xml:"path,omitempty"` Target []HostPlugStoreTopologyTarget `xml:"target,omitempty"` Device []HostPlugStoreTopologyDevice `xml:"device,omitempty"` Plugin []HostPlugStoreTopologyPlugin `xml:"plugin,omitempty"` } func init() { t["HostPlugStoreTopology"] = reflect.TypeOf((*HostPlugStoreTopology)(nil)).Elem() } type HostPlugStoreTopologyAdapter struct { DynamicData Key string `xml:"key"` Adapter string `xml:"adapter"` Path []string `xml:"path,omitempty"` } func init() { t["HostPlugStoreTopologyAdapter"] = reflect.TypeOf((*HostPlugStoreTopologyAdapter)(nil)).Elem() } type HostPlugStoreTopologyDevice struct { DynamicData Key string `xml:"key"` Lun string `xml:"lun"` Path []string `xml:"path,omitempty"` } func init() { t["HostPlugStoreTopologyDevice"] = reflect.TypeOf((*HostPlugStoreTopologyDevice)(nil)).Elem() } type HostPlugStoreTopologyPath struct { DynamicData Key string `xml:"key"` Name string `xml:"name"` ChannelNumber int32 `xml:"channelNumber,omitempty"` TargetNumber int32 `xml:"targetNumber,omitempty"` LunNumber int32 `xml:"lunNumber,omitempty"` Adapter string `xml:"adapter,omitempty"` Target string `xml:"target,omitempty"` Device string `xml:"device,omitempty"` } func init() { t["HostPlugStoreTopologyPath"] = reflect.TypeOf((*HostPlugStoreTopologyPath)(nil)).Elem() } type HostPlugStoreTopologyPlugin struct { DynamicData Key string `xml:"key"` Name string `xml:"name"` Device []string `xml:"device,omitempty"` ClaimedPath []string `xml:"claimedPath,omitempty"` } func init() { t["HostPlugStoreTopologyPlugin"] = reflect.TypeOf((*HostPlugStoreTopologyPlugin)(nil)).Elem() } type HostPlugStoreTopologyTarget struct { DynamicData Key string `xml:"key"` Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"` } func init() { t["HostPlugStoreTopologyTarget"] = reflect.TypeOf((*HostPlugStoreTopologyTarget)(nil)).Elem() } type HostPnicNetworkResourceInfo struct { DynamicData PnicDevice string `xml:"pnicDevice"` AvailableBandwidthForVMTraffic int64 `xml:"availableBandwidthForVMTraffic,omitempty"` UnusedBandwidthForVMTraffic int64 `xml:"unusedBandwidthForVMTraffic,omitempty"` PlacedVirtualNics []HostPlacedVirtualNicIdentifier `xml:"placedVirtualNics,omitempty"` } func init() { t["HostPnicNetworkResourceInfo"] = reflect.TypeOf((*HostPnicNetworkResourceInfo)(nil)).Elem() } type HostPortGroup struct { DynamicData Key string `xml:"key,omitempty"` Port []HostPortGroupPort `xml:"port,omitempty"` Vswitch string `xml:"vswitch,omitempty"` ComputedPolicy HostNetworkPolicy `xml:"computedPolicy"` Spec HostPortGroupSpec `xml:"spec"` } func init() { t["HostPortGroup"] = reflect.TypeOf((*HostPortGroup)(nil)).Elem() } type HostPortGroupConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Spec *HostPortGroupSpec `xml:"spec,omitempty"` } func init() { t["HostPortGroupConfig"] = reflect.TypeOf((*HostPortGroupConfig)(nil)).Elem() } type HostPortGroupPort struct { DynamicData Key string `xml:"key,omitempty"` Mac []string `xml:"mac,omitempty"` Type string `xml:"type"` } func init() { t["HostPortGroupPort"] = reflect.TypeOf((*HostPortGroupPort)(nil)).Elem() } type HostPortGroupProfile struct { PortGroupProfile IpConfig IpAddressProfile `xml:"ipConfig"` } func init() { t["HostPortGroupProfile"] = reflect.TypeOf((*HostPortGroupProfile)(nil)).Elem() } type HostPortGroupSpec struct { DynamicData Name string `xml:"name"` VlanId int32 `xml:"vlanId"` VswitchName string `xml:"vswitchName"` Policy HostNetworkPolicy `xml:"policy"` } func init() { t["HostPortGroupSpec"] = reflect.TypeOf((*HostPortGroupSpec)(nil)).Elem() } type HostPosixAccountSpec struct { HostAccountSpec PosixId int32 `xml:"posixId,omitempty"` ShellAccess *bool `xml:"shellAccess"` } func init() { t["HostPosixAccountSpec"] = reflect.TypeOf((*HostPosixAccountSpec)(nil)).Elem() } type HostPowerOpFailed struct { VimFault } func init() { t["HostPowerOpFailed"] = reflect.TypeOf((*HostPowerOpFailed)(nil)).Elem() } type HostPowerOpFailedFault BaseHostPowerOpFailed func init() { t["HostPowerOpFailedFault"] = reflect.TypeOf((*HostPowerOpFailedFault)(nil)).Elem() } type HostPowerPolicy struct { DynamicData Key int32 `xml:"key"` Name string `xml:"name"` ShortName string `xml:"shortName"` Description string `xml:"description"` } func init() { t["HostPowerPolicy"] = reflect.TypeOf((*HostPowerPolicy)(nil)).Elem() } type HostPrimaryAgentNotShortNameEvent struct { HostDasEvent PrimaryAgent string `xml:"primaryAgent"` } func init() { t["HostPrimaryAgentNotShortNameEvent"] = reflect.TypeOf((*HostPrimaryAgentNotShortNameEvent)(nil)).Elem() } type HostProfileAppliedEvent struct { HostEvent Profile ProfileEventArgument `xml:"profile"` } func init() { t["HostProfileAppliedEvent"] = reflect.TypeOf((*HostProfileAppliedEvent)(nil)).Elem() } type HostProfileCompleteConfigSpec struct { HostProfileConfigSpec ApplyProfile *HostApplyProfile `xml:"applyProfile,omitempty"` CustomComplyProfile *ComplianceProfile `xml:"customComplyProfile,omitempty"` DisabledExpressionListChanged bool `xml:"disabledExpressionListChanged"` DisabledExpressionList []string `xml:"disabledExpressionList,omitempty"` ValidatorHost *ManagedObjectReference `xml:"validatorHost,omitempty"` Validating *bool `xml:"validating"` HostConfig *HostProfileConfigInfo `xml:"hostConfig,omitempty"` } func init() { t["HostProfileCompleteConfigSpec"] = reflect.TypeOf((*HostProfileCompleteConfigSpec)(nil)).Elem() } type HostProfileConfigInfo struct { ProfileConfigInfo ApplyProfile *HostApplyProfile `xml:"applyProfile,omitempty"` DefaultComplyProfile *ComplianceProfile `xml:"defaultComplyProfile,omitempty"` DefaultComplyLocator []ComplianceLocator `xml:"defaultComplyLocator,omitempty"` CustomComplyProfile *ComplianceProfile `xml:"customComplyProfile,omitempty"` DisabledExpressionList []string `xml:"disabledExpressionList,omitempty"` Description *ProfileDescription `xml:"description,omitempty"` } func init() { t["HostProfileConfigInfo"] = reflect.TypeOf((*HostProfileConfigInfo)(nil)).Elem() } type HostProfileConfigSpec struct { ProfileCreateSpec } func init() { t["HostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem() } type HostProfileHostBasedConfigSpec struct { HostProfileConfigSpec Host ManagedObjectReference `xml:"host"` UseHostProfileEngine *bool `xml:"useHostProfileEngine"` } func init() { t["HostProfileHostBasedConfigSpec"] = reflect.TypeOf((*HostProfileHostBasedConfigSpec)(nil)).Elem() } type HostProfileManagerCompositionValidationResultResultElement struct { DynamicData Target ManagedObjectReference `xml:"target"` Status string `xml:"status"` Errors []LocalizableMessage `xml:"errors,omitempty"` SourceDiffForToBeMerged *HostApplyProfile `xml:"sourceDiffForToBeMerged,omitempty"` TargetDiffForToBeMerged *HostApplyProfile `xml:"targetDiffForToBeMerged,omitempty"` ToBeAdded *HostApplyProfile `xml:"toBeAdded,omitempty"` ToBeDeleted *HostApplyProfile `xml:"toBeDeleted,omitempty"` ToBeDisabled *HostApplyProfile `xml:"toBeDisabled,omitempty"` ToBeEnabled *HostApplyProfile `xml:"toBeEnabled,omitempty"` ToBeReenableCC *HostApplyProfile `xml:"toBeReenableCC,omitempty"` } func init() { t["HostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResultResultElement)(nil)).Elem() } type HostProfileManagerConfigTaskList struct { DynamicData ConfigSpec *HostConfigSpec `xml:"configSpec,omitempty"` TaskDescription []LocalizableMessage `xml:"taskDescription,omitempty"` TaskListRequirement []string `xml:"taskListRequirement,omitempty"` } func init() { t["HostProfileManagerConfigTaskList"] = reflect.TypeOf((*HostProfileManagerConfigTaskList)(nil)).Elem() } type HostProfileManagerHostToConfigSpecMap struct { DynamicData Host ManagedObjectReference `xml:"host"` ConfigSpec BaseAnswerFileCreateSpec `xml:"configSpec,typeattr"` } func init() { t["HostProfileManagerHostToConfigSpecMap"] = reflect.TypeOf((*HostProfileManagerHostToConfigSpecMap)(nil)).Elem() } type HostProfileSerializedHostProfileSpec struct { ProfileSerializedCreateSpec ValidatorHost *ManagedObjectReference `xml:"validatorHost,omitempty"` Validating *bool `xml:"validating"` } func init() { t["HostProfileSerializedHostProfileSpec"] = reflect.TypeOf((*HostProfileSerializedHostProfileSpec)(nil)).Elem() } type HostProfilesEntityCustomizations struct { DynamicData } func init() { t["HostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem() } type HostProtocolEndpoint struct { DynamicData PeType string `xml:"peType"` Type string `xml:"type,omitempty"` Uuid string `xml:"uuid"` HostKey []ManagedObjectReference `xml:"hostKey,omitempty"` StorageArray string `xml:"storageArray,omitempty"` NfsServer string `xml:"nfsServer,omitempty"` NfsDir string `xml:"nfsDir,omitempty"` NfsServerScope string `xml:"nfsServerScope,omitempty"` NfsServerMajor string `xml:"nfsServerMajor,omitempty"` NfsServerAuthType string `xml:"nfsServerAuthType,omitempty"` NfsServerUser string `xml:"nfsServerUser,omitempty"` DeviceId string `xml:"deviceId,omitempty"` } func init() { t["HostProtocolEndpoint"] = reflect.TypeOf((*HostProtocolEndpoint)(nil)).Elem() } type HostProxySwitch struct { DynamicData DvsUuid string `xml:"dvsUuid"` DvsName string `xml:"dvsName"` Key string `xml:"key"` NumPorts int32 `xml:"numPorts"` ConfigNumPorts int32 `xml:"configNumPorts,omitempty"` NumPortsAvailable int32 `xml:"numPortsAvailable"` UplinkPort []KeyValue `xml:"uplinkPort,omitempty"` Mtu int32 `xml:"mtu,omitempty"` Pnic []string `xml:"pnic,omitempty"` Spec HostProxySwitchSpec `xml:"spec"` HostLag []HostProxySwitchHostLagConfig `xml:"hostLag,omitempty"` NetworkReservationSupported *bool `xml:"networkReservationSupported"` } func init() { t["HostProxySwitch"] = reflect.TypeOf((*HostProxySwitch)(nil)).Elem() } type HostProxySwitchConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Uuid string `xml:"uuid"` Spec *HostProxySwitchSpec `xml:"spec,omitempty"` } func init() { t["HostProxySwitchConfig"] = reflect.TypeOf((*HostProxySwitchConfig)(nil)).Elem() } type HostProxySwitchHostLagConfig struct { DynamicData LagKey string `xml:"lagKey"` LagName string `xml:"lagName,omitempty"` UplinkPort []KeyValue `xml:"uplinkPort,omitempty"` } func init() { t["HostProxySwitchHostLagConfig"] = reflect.TypeOf((*HostProxySwitchHostLagConfig)(nil)).Elem() } type HostProxySwitchSpec struct { DynamicData Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,omitempty,typeattr"` } func init() { t["HostProxySwitchSpec"] = reflect.TypeOf((*HostProxySwitchSpec)(nil)).Elem() } type HostReconcileDatastoreInventoryRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*HostReconcileDatastoreInventoryRequestType)(nil)).Elem() } type HostReconcileDatastoreInventory_Task HostReconcileDatastoreInventoryRequestType func init() { t["HostReconcileDatastoreInventory_Task"] = reflect.TypeOf((*HostReconcileDatastoreInventory_Task)(nil)).Elem() } type HostReconcileDatastoreInventory_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostReconnectionFailedEvent struct { HostEvent } func init() { t["HostReconnectionFailedEvent"] = reflect.TypeOf((*HostReconnectionFailedEvent)(nil)).Elem() } type HostRegisterDisk HostRegisterDiskRequestType func init() { t["HostRegisterDisk"] = reflect.TypeOf((*HostRegisterDisk)(nil)).Elem() } type HostRegisterDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Path string `xml:"path"` Name string `xml:"name,omitempty"` } func init() { t["HostRegisterDiskRequestType"] = reflect.TypeOf((*HostRegisterDiskRequestType)(nil)).Elem() } type HostRegisterDiskResponse struct { Returnval VStorageObject `xml:"returnval"` } type HostReliableMemoryInfo struct { DynamicData MemorySize int64 `xml:"memorySize"` } func init() { t["HostReliableMemoryInfo"] = reflect.TypeOf((*HostReliableMemoryInfo)(nil)).Elem() } type HostRelocateVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` Spec VslmRelocateSpec `xml:"spec"` } func init() { t["HostRelocateVStorageObjectRequestType"] = reflect.TypeOf((*HostRelocateVStorageObjectRequestType)(nil)).Elem() } type HostRelocateVStorageObject_Task HostRelocateVStorageObjectRequestType func init() { t["HostRelocateVStorageObject_Task"] = reflect.TypeOf((*HostRelocateVStorageObject_Task)(nil)).Elem() } type HostRelocateVStorageObject_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type HostRemoveVFlashResource HostRemoveVFlashResourceRequestType func init() { t["HostRemoveVFlashResource"] = reflect.TypeOf((*HostRemoveVFlashResource)(nil)).Elem() } type HostRemoveVFlashResourceRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["HostRemoveVFlashResourceRequestType"] = reflect.TypeOf((*HostRemoveVFlashResourceRequestType)(nil)).Elem() } type HostRemoveVFlashResourceResponse struct { } type HostRemovedEvent struct { HostEvent } func init() { t["HostRemovedEvent"] = reflect.TypeOf((*HostRemovedEvent)(nil)).Elem() } type HostRenameVStorageObject HostRenameVStorageObjectRequestType func init() { t["HostRenameVStorageObject"] = reflect.TypeOf((*HostRenameVStorageObject)(nil)).Elem() } type HostRenameVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` Name string `xml:"name"` } func init() { t["HostRenameVStorageObjectRequestType"] = reflect.TypeOf((*HostRenameVStorageObjectRequestType)(nil)).Elem() } type HostRenameVStorageObjectResponse struct { } type HostResignatureRescanResult struct { DynamicData Rescan []HostVmfsRescanResult `xml:"rescan,omitempty"` Result ManagedObjectReference `xml:"result"` } func init() { t["HostResignatureRescanResult"] = reflect.TypeOf((*HostResignatureRescanResult)(nil)).Elem() } type HostRetrieveVStorageObject HostRetrieveVStorageObjectRequestType func init() { t["HostRetrieveVStorageObject"] = reflect.TypeOf((*HostRetrieveVStorageObject)(nil)).Elem() } type HostRetrieveVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostRetrieveVStorageObjectRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectRequestType)(nil)).Elem() } type HostRetrieveVStorageObjectResponse struct { Returnval VStorageObject `xml:"returnval"` } type HostRetrieveVStorageObjectState HostRetrieveVStorageObjectStateRequestType func init() { t["HostRetrieveVStorageObjectState"] = reflect.TypeOf((*HostRetrieveVStorageObjectState)(nil)).Elem() } type HostRetrieveVStorageObjectStateRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostRetrieveVStorageObjectStateRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectStateRequestType)(nil)).Elem() } type HostRetrieveVStorageObjectStateResponse struct { Returnval VStorageObjectStateInfo `xml:"returnval"` } type HostRuntimeInfo struct { DynamicData ConnectionState HostSystemConnectionState `xml:"connectionState"` PowerState HostSystemPowerState `xml:"powerState"` StandbyMode string `xml:"standbyMode,omitempty"` InMaintenanceMode bool `xml:"inMaintenanceMode"` InQuarantineMode *bool `xml:"inQuarantineMode"` BootTime *time.Time `xml:"bootTime"` HealthSystemRuntime *HealthSystemRuntime `xml:"healthSystemRuntime,omitempty"` DasHostState *ClusterDasFdmHostState `xml:"dasHostState,omitempty"` TpmPcrValues []HostTpmDigestInfo `xml:"tpmPcrValues,omitempty"` VsanRuntimeInfo *VsanHostRuntimeInfo `xml:"vsanRuntimeInfo,omitempty"` NetworkRuntimeInfo *HostRuntimeInfoNetworkRuntimeInfo `xml:"networkRuntimeInfo,omitempty"` VFlashResourceRuntimeInfo *HostVFlashManagerVFlashResourceRunTimeInfo `xml:"vFlashResourceRuntimeInfo,omitempty"` HostMaxVirtualDiskCapacity int64 `xml:"hostMaxVirtualDiskCapacity,omitempty"` CryptoState string `xml:"cryptoState,omitempty"` CryptoKeyId *CryptoKeyId `xml:"cryptoKeyId,omitempty"` } func init() { t["HostRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfo)(nil)).Elem() } type HostRuntimeInfoNetStackInstanceRuntimeInfo struct { DynamicData NetStackInstanceKey string `xml:"netStackInstanceKey"` State string `xml:"state,omitempty"` VmknicKeys []string `xml:"vmknicKeys,omitempty"` MaxNumberOfConnections int32 `xml:"maxNumberOfConnections,omitempty"` CurrentIpV6Enabled *bool `xml:"currentIpV6Enabled"` } func init() { t["HostRuntimeInfoNetStackInstanceRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfo)(nil)).Elem() } type HostRuntimeInfoNetworkRuntimeInfo struct { DynamicData NetStackInstanceRuntimeInfo []HostRuntimeInfoNetStackInstanceRuntimeInfo `xml:"netStackInstanceRuntimeInfo,omitempty"` NetworkResourceRuntime *HostNetworkResourceRuntime `xml:"networkResourceRuntime,omitempty"` } func init() { t["HostRuntimeInfoNetworkRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetworkRuntimeInfo)(nil)).Elem() } type HostScheduleReconcileDatastoreInventory HostScheduleReconcileDatastoreInventoryRequestType func init() { t["HostScheduleReconcileDatastoreInventory"] = reflect.TypeOf((*HostScheduleReconcileDatastoreInventory)(nil)).Elem() } type HostScheduleReconcileDatastoreInventoryRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["HostScheduleReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*HostScheduleReconcileDatastoreInventoryRequestType)(nil)).Elem() } type HostScheduleReconcileDatastoreInventoryResponse struct { } type HostScsiDisk struct { ScsiLun Capacity HostDiskDimensionsLba `xml:"capacity"` DevicePath string `xml:"devicePath"` Ssd *bool `xml:"ssd"` LocalDisk *bool `xml:"localDisk"` PhysicalLocation []string `xml:"physicalLocation,omitempty"` EmulatedDIXDIFEnabled *bool `xml:"emulatedDIXDIFEnabled"` VsanDiskInfo *VsanHostVsanDiskInfo `xml:"vsanDiskInfo,omitempty"` ScsiDiskType string `xml:"scsiDiskType,omitempty"` } func init() { t["HostScsiDisk"] = reflect.TypeOf((*HostScsiDisk)(nil)).Elem() } type HostScsiDiskPartition struct { DynamicData DiskName string `xml:"diskName"` Partition int32 `xml:"partition"` } func init() { t["HostScsiDiskPartition"] = reflect.TypeOf((*HostScsiDiskPartition)(nil)).Elem() } type HostScsiTopology struct { DynamicData Adapter []HostScsiTopologyInterface `xml:"adapter,omitempty"` } func init() { t["HostScsiTopology"] = reflect.TypeOf((*HostScsiTopology)(nil)).Elem() } type HostScsiTopologyInterface struct { DynamicData Key string `xml:"key"` Adapter string `xml:"adapter"` Target []HostScsiTopologyTarget `xml:"target,omitempty"` } func init() { t["HostScsiTopologyInterface"] = reflect.TypeOf((*HostScsiTopologyInterface)(nil)).Elem() } type HostScsiTopologyLun struct { DynamicData Key string `xml:"key"` Lun int32 `xml:"lun"` ScsiLun string `xml:"scsiLun"` } func init() { t["HostScsiTopologyLun"] = reflect.TypeOf((*HostScsiTopologyLun)(nil)).Elem() } type HostScsiTopologyTarget struct { DynamicData Key string `xml:"key"` Target int32 `xml:"target"` Lun []HostScsiTopologyLun `xml:"lun,omitempty"` Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"` } func init() { t["HostScsiTopologyTarget"] = reflect.TypeOf((*HostScsiTopologyTarget)(nil)).Elem() } type HostSecuritySpec struct { DynamicData AdminPassword string `xml:"adminPassword,omitempty"` RemovePermission []Permission `xml:"removePermission,omitempty"` AddPermission []Permission `xml:"addPermission,omitempty"` } func init() { t["HostSecuritySpec"] = reflect.TypeOf((*HostSecuritySpec)(nil)).Elem() } type HostSerialAttachedHba struct { HostHostBusAdapter NodeWorldWideName string `xml:"nodeWorldWideName"` } func init() { t["HostSerialAttachedHba"] = reflect.TypeOf((*HostSerialAttachedHba)(nil)).Elem() } type HostSerialAttachedTargetTransport struct { HostTargetTransport } func init() { t["HostSerialAttachedTargetTransport"] = reflect.TypeOf((*HostSerialAttachedTargetTransport)(nil)).Elem() } type HostService struct { DynamicData Key string `xml:"key"` Label string `xml:"label"` Required bool `xml:"required"` Uninstallable bool `xml:"uninstallable"` Running bool `xml:"running"` Ruleset []string `xml:"ruleset,omitempty"` Policy string `xml:"policy"` SourcePackage *HostServiceSourcePackage `xml:"sourcePackage,omitempty"` } func init() { t["HostService"] = reflect.TypeOf((*HostService)(nil)).Elem() } type HostServiceConfig struct { DynamicData ServiceId string `xml:"serviceId"` StartupPolicy string `xml:"startupPolicy"` } func init() { t["HostServiceConfig"] = reflect.TypeOf((*HostServiceConfig)(nil)).Elem() } type HostServiceInfo struct { DynamicData Service []HostService `xml:"service,omitempty"` } func init() { t["HostServiceInfo"] = reflect.TypeOf((*HostServiceInfo)(nil)).Elem() } type HostServiceSourcePackage struct { DynamicData SourcePackageName string `xml:"sourcePackageName"` Description string `xml:"description"` } func init() { t["HostServiceSourcePackage"] = reflect.TypeOf((*HostServiceSourcePackage)(nil)).Elem() } type HostServiceTicket struct { DynamicData Host string `xml:"host,omitempty"` Port int32 `xml:"port,omitempty"` SslThumbprint string `xml:"sslThumbprint,omitempty"` Service string `xml:"service"` ServiceVersion string `xml:"serviceVersion"` SessionId string `xml:"sessionId"` } func init() { t["HostServiceTicket"] = reflect.TypeOf((*HostServiceTicket)(nil)).Elem() } type HostShortNameInconsistentEvent struct { HostDasEvent ShortName string `xml:"shortName"` ShortName2 string `xml:"shortName2"` } func init() { t["HostShortNameInconsistentEvent"] = reflect.TypeOf((*HostShortNameInconsistentEvent)(nil)).Elem() } type HostShortNameToIpFailedEvent struct { HostEvent ShortName string `xml:"shortName"` } func init() { t["HostShortNameToIpFailedEvent"] = reflect.TypeOf((*HostShortNameToIpFailedEvent)(nil)).Elem() } type HostShutdownEvent struct { HostEvent Reason string `xml:"reason"` } func init() { t["HostShutdownEvent"] = reflect.TypeOf((*HostShutdownEvent)(nil)).Elem() } type HostSnmpConfigSpec struct { DynamicData Enabled *bool `xml:"enabled"` Port int32 `xml:"port,omitempty"` ReadOnlyCommunities []string `xml:"readOnlyCommunities,omitempty"` TrapTargets []HostSnmpDestination `xml:"trapTargets,omitempty"` Option []KeyValue `xml:"option,omitempty"` } func init() { t["HostSnmpConfigSpec"] = reflect.TypeOf((*HostSnmpConfigSpec)(nil)).Elem() } type HostSnmpDestination struct { DynamicData HostName string `xml:"hostName"` Port int32 `xml:"port"` Community string `xml:"community"` } func init() { t["HostSnmpDestination"] = reflect.TypeOf((*HostSnmpDestination)(nil)).Elem() } type HostSnmpSystemAgentLimits struct { DynamicData MaxReadOnlyCommunities int32 `xml:"maxReadOnlyCommunities"` MaxTrapDestinations int32 `xml:"maxTrapDestinations"` MaxCommunityLength int32 `xml:"maxCommunityLength"` MaxBufferSize int32 `xml:"maxBufferSize"` Capability HostSnmpAgentCapability `xml:"capability,omitempty"` } func init() { t["HostSnmpSystemAgentLimits"] = reflect.TypeOf((*HostSnmpSystemAgentLimits)(nil)).Elem() } type HostSpecGetUpdatedHosts HostSpecGetUpdatedHostsRequestType func init() { t["HostSpecGetUpdatedHosts"] = reflect.TypeOf((*HostSpecGetUpdatedHosts)(nil)).Elem() } type HostSpecGetUpdatedHostsRequestType struct { This ManagedObjectReference `xml:"_this"` StartChangeID string `xml:"startChangeID,omitempty"` EndChangeID string `xml:"endChangeID,omitempty"` } func init() { t["HostSpecGetUpdatedHostsRequestType"] = reflect.TypeOf((*HostSpecGetUpdatedHostsRequestType)(nil)).Elem() } type HostSpecGetUpdatedHostsResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type HostSpecification struct { DynamicData CreatedTime time.Time `xml:"createdTime"` LastModified *time.Time `xml:"lastModified"` Host ManagedObjectReference `xml:"host"` SubSpecs []HostSubSpecification `xml:"subSpecs,omitempty"` ChangeID string `xml:"changeID,omitempty"` } func init() { t["HostSpecification"] = reflect.TypeOf((*HostSpecification)(nil)).Elem() } type HostSpecificationOperationFailed struct { VimFault Host ManagedObjectReference `xml:"host"` } func init() { t["HostSpecificationOperationFailed"] = reflect.TypeOf((*HostSpecificationOperationFailed)(nil)).Elem() } type HostSpecificationOperationFailedFault HostSpecificationOperationFailed func init() { t["HostSpecificationOperationFailedFault"] = reflect.TypeOf((*HostSpecificationOperationFailedFault)(nil)).Elem() } type HostSriovConfig struct { HostPciPassthruConfig SriovEnabled bool `xml:"sriovEnabled"` NumVirtualFunction int32 `xml:"numVirtualFunction"` } func init() { t["HostSriovConfig"] = reflect.TypeOf((*HostSriovConfig)(nil)).Elem() } type HostSriovDevicePoolInfo struct { DynamicData Key string `xml:"key"` } func init() { t["HostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem() } type HostSriovInfo struct { HostPciPassthruInfo SriovEnabled bool `xml:"sriovEnabled"` SriovCapable bool `xml:"sriovCapable"` SriovActive bool `xml:"sriovActive"` NumVirtualFunctionRequested int32 `xml:"numVirtualFunctionRequested"` NumVirtualFunction int32 `xml:"numVirtualFunction"` MaxVirtualFunctionSupported int32 `xml:"maxVirtualFunctionSupported"` } func init() { t["HostSriovInfo"] = reflect.TypeOf((*HostSriovInfo)(nil)).Elem() } type HostSriovNetworkDevicePoolInfo struct { HostSriovDevicePoolInfo SwitchKey string `xml:"switchKey,omitempty"` SwitchUuid string `xml:"switchUuid,omitempty"` Pnic []PhysicalNic `xml:"pnic,omitempty"` } func init() { t["HostSriovNetworkDevicePoolInfo"] = reflect.TypeOf((*HostSriovNetworkDevicePoolInfo)(nil)).Elem() } type HostSslThumbprintInfo struct { DynamicData Principal string `xml:"principal"` OwnerTag string `xml:"ownerTag,omitempty"` SslThumbprints []string `xml:"sslThumbprints,omitempty"` } func init() { t["HostSslThumbprintInfo"] = reflect.TypeOf((*HostSslThumbprintInfo)(nil)).Elem() } type HostStatusChangedEvent struct { ClusterStatusChangedEvent } func init() { t["HostStatusChangedEvent"] = reflect.TypeOf((*HostStatusChangedEvent)(nil)).Elem() } type HostStorageArrayTypePolicyOption struct { DynamicData Policy BaseElementDescription `xml:"policy,typeattr"` } func init() { t["HostStorageArrayTypePolicyOption"] = reflect.TypeOf((*HostStorageArrayTypePolicyOption)(nil)).Elem() } type HostStorageDeviceInfo struct { DynamicData HostBusAdapter []BaseHostHostBusAdapter `xml:"hostBusAdapter,omitempty,typeattr"` ScsiLun []BaseScsiLun `xml:"scsiLun,omitempty,typeattr"` ScsiTopology *HostScsiTopology `xml:"scsiTopology,omitempty"` MultipathInfo *HostMultipathInfo `xml:"multipathInfo,omitempty"` PlugStoreTopology *HostPlugStoreTopology `xml:"plugStoreTopology,omitempty"` SoftwareInternetScsiEnabled bool `xml:"softwareInternetScsiEnabled"` } func init() { t["HostStorageDeviceInfo"] = reflect.TypeOf((*HostStorageDeviceInfo)(nil)).Elem() } type HostStorageElementInfo struct { HostHardwareElementInfo OperationalInfo []HostStorageOperationalInfo `xml:"operationalInfo,omitempty"` } func init() { t["HostStorageElementInfo"] = reflect.TypeOf((*HostStorageElementInfo)(nil)).Elem() } type HostStorageOperationalInfo struct { DynamicData Property string `xml:"property"` Value string `xml:"value"` } func init() { t["HostStorageOperationalInfo"] = reflect.TypeOf((*HostStorageOperationalInfo)(nil)).Elem() } type HostStorageSystemDiskLocatorLedResult struct { DynamicData Key string `xml:"key"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["HostStorageSystemDiskLocatorLedResult"] = reflect.TypeOf((*HostStorageSystemDiskLocatorLedResult)(nil)).Elem() } type HostStorageSystemScsiLunResult struct { DynamicData Key string `xml:"key"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HostStorageSystemScsiLunResult"] = reflect.TypeOf((*HostStorageSystemScsiLunResult)(nil)).Elem() } type HostStorageSystemVmfsVolumeResult struct { DynamicData Key string `xml:"key"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HostStorageSystemVmfsVolumeResult"] = reflect.TypeOf((*HostStorageSystemVmfsVolumeResult)(nil)).Elem() } type HostSubSpecification struct { DynamicData Name string `xml:"name"` CreatedTime time.Time `xml:"createdTime"` Data []byte `xml:"data,omitempty"` } func init() { t["HostSubSpecification"] = reflect.TypeOf((*HostSubSpecification)(nil)).Elem() } type HostSyncFailedEvent struct { HostEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["HostSyncFailedEvent"] = reflect.TypeOf((*HostSyncFailedEvent)(nil)).Elem() } type HostSystemHealthInfo struct { DynamicData NumericSensorInfo []HostNumericSensorInfo `xml:"numericSensorInfo,omitempty"` } func init() { t["HostSystemHealthInfo"] = reflect.TypeOf((*HostSystemHealthInfo)(nil)).Elem() } type HostSystemIdentificationInfo struct { DynamicData IdentifierValue string `xml:"identifierValue"` IdentifierType BaseElementDescription `xml:"identifierType,typeattr"` } func init() { t["HostSystemIdentificationInfo"] = reflect.TypeOf((*HostSystemIdentificationInfo)(nil)).Elem() } type HostSystemInfo struct { DynamicData Vendor string `xml:"vendor"` Model string `xml:"model"` Uuid string `xml:"uuid"` OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"` } func init() { t["HostSystemInfo"] = reflect.TypeOf((*HostSystemInfo)(nil)).Elem() } type HostSystemReconnectSpec struct { DynamicData SyncState *bool `xml:"syncState"` } func init() { t["HostSystemReconnectSpec"] = reflect.TypeOf((*HostSystemReconnectSpec)(nil)).Elem() } type HostSystemResourceInfo struct { DynamicData Key string `xml:"key"` Config *ResourceConfigSpec `xml:"config,omitempty"` Child []HostSystemResourceInfo `xml:"child,omitempty"` } func init() { t["HostSystemResourceInfo"] = reflect.TypeOf((*HostSystemResourceInfo)(nil)).Elem() } type HostSystemSwapConfiguration struct { DynamicData Option []BaseHostSystemSwapConfigurationSystemSwapOption `xml:"option,omitempty,typeattr"` } func init() { t["HostSystemSwapConfiguration"] = reflect.TypeOf((*HostSystemSwapConfiguration)(nil)).Elem() } type HostSystemSwapConfigurationDatastoreOption struct { HostSystemSwapConfigurationSystemSwapOption Datastore string `xml:"datastore"` } func init() { t["HostSystemSwapConfigurationDatastoreOption"] = reflect.TypeOf((*HostSystemSwapConfigurationDatastoreOption)(nil)).Elem() } type HostSystemSwapConfigurationDisabledOption struct { HostSystemSwapConfigurationSystemSwapOption } func init() { t["HostSystemSwapConfigurationDisabledOption"] = reflect.TypeOf((*HostSystemSwapConfigurationDisabledOption)(nil)).Elem() } type HostSystemSwapConfigurationHostCacheOption struct { HostSystemSwapConfigurationSystemSwapOption } func init() { t["HostSystemSwapConfigurationHostCacheOption"] = reflect.TypeOf((*HostSystemSwapConfigurationHostCacheOption)(nil)).Elem() } type HostSystemSwapConfigurationHostLocalSwapOption struct { HostSystemSwapConfigurationSystemSwapOption } func init() { t["HostSystemSwapConfigurationHostLocalSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationHostLocalSwapOption)(nil)).Elem() } type HostSystemSwapConfigurationSystemSwapOption struct { DynamicData Key int32 `xml:"key"` } func init() { t["HostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationSystemSwapOption)(nil)).Elem() } type HostTargetTransport struct { DynamicData } func init() { t["HostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem() } type HostTpmAttestationReport struct { DynamicData TpmPcrValues []HostTpmDigestInfo `xml:"tpmPcrValues"` TpmEvents []HostTpmEventLogEntry `xml:"tpmEvents"` TpmLogReliable bool `xml:"tpmLogReliable"` } func init() { t["HostTpmAttestationReport"] = reflect.TypeOf((*HostTpmAttestationReport)(nil)).Elem() } type HostTpmBootSecurityOptionEventDetails struct { HostTpmEventDetails BootSecurityOption string `xml:"bootSecurityOption"` } func init() { t["HostTpmBootSecurityOptionEventDetails"] = reflect.TypeOf((*HostTpmBootSecurityOptionEventDetails)(nil)).Elem() } type HostTpmCommandEventDetails struct { HostTpmEventDetails CommandLine string `xml:"commandLine"` } func init() { t["HostTpmCommandEventDetails"] = reflect.TypeOf((*HostTpmCommandEventDetails)(nil)).Elem() } type HostTpmDigestInfo struct { HostDigestInfo PcrNumber int32 `xml:"pcrNumber"` } func init() { t["HostTpmDigestInfo"] = reflect.TypeOf((*HostTpmDigestInfo)(nil)).Elem() } type HostTpmEventDetails struct { DynamicData DataHash []byte `xml:"dataHash"` } func init() { t["HostTpmEventDetails"] = reflect.TypeOf((*HostTpmEventDetails)(nil)).Elem() } type HostTpmEventLogEntry struct { DynamicData PcrIndex int32 `xml:"pcrIndex"` EventDetails BaseHostTpmEventDetails `xml:"eventDetails,typeattr"` } func init() { t["HostTpmEventLogEntry"] = reflect.TypeOf((*HostTpmEventLogEntry)(nil)).Elem() } type HostTpmOptionEventDetails struct { HostTpmEventDetails OptionsFileName string `xml:"optionsFileName"` BootOptions []byte `xml:"bootOptions,omitempty"` } func init() { t["HostTpmOptionEventDetails"] = reflect.TypeOf((*HostTpmOptionEventDetails)(nil)).Elem() } type HostTpmSoftwareComponentEventDetails struct { HostTpmEventDetails ComponentName string `xml:"componentName"` VibName string `xml:"vibName"` VibVersion string `xml:"vibVersion"` VibVendor string `xml:"vibVendor"` } func init() { t["HostTpmSoftwareComponentEventDetails"] = reflect.TypeOf((*HostTpmSoftwareComponentEventDetails)(nil)).Elem() } type HostUnresolvedVmfsExtent struct { DynamicData Device HostScsiDiskPartition `xml:"device"` DevicePath string `xml:"devicePath"` VmfsUuid string `xml:"vmfsUuid"` IsHeadExtent bool `xml:"isHeadExtent"` Ordinal int32 `xml:"ordinal"` StartBlock int32 `xml:"startBlock"` EndBlock int32 `xml:"endBlock"` Reason string `xml:"reason"` } func init() { t["HostUnresolvedVmfsExtent"] = reflect.TypeOf((*HostUnresolvedVmfsExtent)(nil)).Elem() } type HostUnresolvedVmfsResignatureSpec struct { DynamicData ExtentDevicePath []string `xml:"extentDevicePath"` } func init() { t["HostUnresolvedVmfsResignatureSpec"] = reflect.TypeOf((*HostUnresolvedVmfsResignatureSpec)(nil)).Elem() } type HostUnresolvedVmfsResolutionResult struct { DynamicData Spec HostUnresolvedVmfsResolutionSpec `xml:"spec"` Vmfs *HostVmfsVolume `xml:"vmfs,omitempty"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HostUnresolvedVmfsResolutionResult"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionResult)(nil)).Elem() } type HostUnresolvedVmfsResolutionSpec struct { DynamicData ExtentDevicePath []string `xml:"extentDevicePath"` UuidResolution string `xml:"uuidResolution"` } func init() { t["HostUnresolvedVmfsResolutionSpec"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionSpec)(nil)).Elem() } type HostUnresolvedVmfsVolume struct { DynamicData Extent []HostUnresolvedVmfsExtent `xml:"extent"` VmfsLabel string `xml:"vmfsLabel"` VmfsUuid string `xml:"vmfsUuid"` TotalBlocks int32 `xml:"totalBlocks"` ResolveStatus HostUnresolvedVmfsVolumeResolveStatus `xml:"resolveStatus"` } func init() { t["HostUnresolvedVmfsVolume"] = reflect.TypeOf((*HostUnresolvedVmfsVolume)(nil)).Elem() } type HostUnresolvedVmfsVolumeResolveStatus struct { DynamicData Resolvable bool `xml:"resolvable"` IncompleteExtents *bool `xml:"incompleteExtents"` MultipleCopies *bool `xml:"multipleCopies"` } func init() { t["HostUnresolvedVmfsVolumeResolveStatus"] = reflect.TypeOf((*HostUnresolvedVmfsVolumeResolveStatus)(nil)).Elem() } type HostUpgradeFailedEvent struct { HostEvent } func init() { t["HostUpgradeFailedEvent"] = reflect.TypeOf((*HostUpgradeFailedEvent)(nil)).Elem() } type HostUserWorldSwapNotEnabledEvent struct { HostEvent } func init() { t["HostUserWorldSwapNotEnabledEvent"] = reflect.TypeOf((*HostUserWorldSwapNotEnabledEvent)(nil)).Elem() } type HostVFlashManagerVFlashCacheConfigInfo struct { DynamicData VFlashModuleConfigOption []HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"vFlashModuleConfigOption,omitempty"` DefaultVFlashModule string `xml:"defaultVFlashModule,omitempty"` SwapCacheReservationInGB int64 `xml:"swapCacheReservationInGB,omitempty"` } func init() { t["HostVFlashManagerVFlashCacheConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigInfo)(nil)).Elem() } type HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption struct { DynamicData VFlashModule string `xml:"vFlashModule"` VFlashModuleVersion string `xml:"vFlashModuleVersion"` MinSupportedModuleVersion string `xml:"minSupportedModuleVersion"` CacheConsistencyType ChoiceOption `xml:"cacheConsistencyType"` CacheMode ChoiceOption `xml:"cacheMode"` BlockSizeInKBOption LongOption `xml:"blockSizeInKBOption"` ReservationInMBOption LongOption `xml:"reservationInMBOption"` MaxDiskSizeInKB int64 `xml:"maxDiskSizeInKB"` } func init() { t["HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption)(nil)).Elem() } type HostVFlashManagerVFlashCacheConfigSpec struct { DynamicData DefaultVFlashModule string `xml:"defaultVFlashModule"` SwapCacheReservationInGB int64 `xml:"swapCacheReservationInGB"` } func init() { t["HostVFlashManagerVFlashCacheConfigSpec"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigSpec)(nil)).Elem() } type HostVFlashManagerVFlashConfigInfo struct { DynamicData VFlashResourceConfigInfo *HostVFlashManagerVFlashResourceConfigInfo `xml:"vFlashResourceConfigInfo,omitempty"` VFlashCacheConfigInfo *HostVFlashManagerVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"` } func init() { t["HostVFlashManagerVFlashConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashConfigInfo)(nil)).Elem() } type HostVFlashManagerVFlashResourceConfigInfo struct { DynamicData Vffs *HostVffsVolume `xml:"vffs,omitempty"` Capacity int64 `xml:"capacity"` } func init() { t["HostVFlashManagerVFlashResourceConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceConfigInfo)(nil)).Elem() } type HostVFlashManagerVFlashResourceConfigSpec struct { DynamicData VffsUuid string `xml:"vffsUuid"` } func init() { t["HostVFlashManagerVFlashResourceConfigSpec"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceConfigSpec)(nil)).Elem() } type HostVFlashManagerVFlashResourceRunTimeInfo struct { DynamicData Usage int64 `xml:"usage"` Capacity int64 `xml:"capacity"` Accessible bool `xml:"accessible"` CapacityForVmCache int64 `xml:"capacityForVmCache"` FreeForVmCache int64 `xml:"freeForVmCache"` } func init() { t["HostVFlashManagerVFlashResourceRunTimeInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceRunTimeInfo)(nil)).Elem() } type HostVFlashResourceConfigurationResult struct { DynamicData DevicePath []string `xml:"devicePath,omitempty"` Vffs *HostVffsVolume `xml:"vffs,omitempty"` DiskConfigurationResult []HostDiskConfigurationResult `xml:"diskConfigurationResult,omitempty"` } func init() { t["HostVFlashResourceConfigurationResult"] = reflect.TypeOf((*HostVFlashResourceConfigurationResult)(nil)).Elem() } type HostVMotionCompatibility struct { DynamicData Host ManagedObjectReference `xml:"host"` Compatibility []string `xml:"compatibility,omitempty"` } func init() { t["HostVMotionCompatibility"] = reflect.TypeOf((*HostVMotionCompatibility)(nil)).Elem() } type HostVMotionConfig struct { DynamicData VmotionNicKey string `xml:"vmotionNicKey,omitempty"` Enabled bool `xml:"enabled"` } func init() { t["HostVMotionConfig"] = reflect.TypeOf((*HostVMotionConfig)(nil)).Elem() } type HostVMotionInfo struct { DynamicData NetConfig *HostVMotionNetConfig `xml:"netConfig,omitempty"` IpConfig *HostIpConfig `xml:"ipConfig,omitempty"` } func init() { t["HostVMotionInfo"] = reflect.TypeOf((*HostVMotionInfo)(nil)).Elem() } type HostVMotionNetConfig struct { DynamicData CandidateVnic []HostVirtualNic `xml:"candidateVnic,omitempty"` SelectedVnic string `xml:"selectedVnic,omitempty"` } func init() { t["HostVMotionNetConfig"] = reflect.TypeOf((*HostVMotionNetConfig)(nil)).Elem() } type HostVfatVolume struct { HostFileSystemVolume } func init() { t["HostVfatVolume"] = reflect.TypeOf((*HostVfatVolume)(nil)).Elem() } type HostVffsSpec struct { DynamicData DevicePath string `xml:"devicePath"` Partition *HostDiskPartitionSpec `xml:"partition,omitempty"` MajorVersion int32 `xml:"majorVersion"` VolumeName string `xml:"volumeName"` } func init() { t["HostVffsSpec"] = reflect.TypeOf((*HostVffsSpec)(nil)).Elem() } type HostVffsVolume struct { HostFileSystemVolume MajorVersion int32 `xml:"majorVersion"` Version string `xml:"version"` Uuid string `xml:"uuid"` Extent []HostScsiDiskPartition `xml:"extent"` } func init() { t["HostVffsVolume"] = reflect.TypeOf((*HostVffsVolume)(nil)).Elem() } type HostVirtualNic struct { DynamicData Device string `xml:"device"` Key string `xml:"key"` Portgroup string `xml:"portgroup"` Spec HostVirtualNicSpec `xml:"spec"` Port string `xml:"port,omitempty"` } func init() { t["HostVirtualNic"] = reflect.TypeOf((*HostVirtualNic)(nil)).Elem() } type HostVirtualNicConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Device string `xml:"device,omitempty"` Portgroup string `xml:"portgroup"` Spec *HostVirtualNicSpec `xml:"spec,omitempty"` } func init() { t["HostVirtualNicConfig"] = reflect.TypeOf((*HostVirtualNicConfig)(nil)).Elem() } type HostVirtualNicConnection struct { DynamicData Portgroup string `xml:"portgroup,omitempty"` DvPort *DistributedVirtualSwitchPortConnection `xml:"dvPort,omitempty"` } func init() { t["HostVirtualNicConnection"] = reflect.TypeOf((*HostVirtualNicConnection)(nil)).Elem() } type HostVirtualNicIpRouteSpec struct { DynamicData IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` } func init() { t["HostVirtualNicIpRouteSpec"] = reflect.TypeOf((*HostVirtualNicIpRouteSpec)(nil)).Elem() } type HostVirtualNicManagerInfo struct { DynamicData NetConfig []VirtualNicManagerNetConfig `xml:"netConfig,omitempty"` } func init() { t["HostVirtualNicManagerInfo"] = reflect.TypeOf((*HostVirtualNicManagerInfo)(nil)).Elem() } type HostVirtualNicManagerNicTypeSelection struct { DynamicData Vnic HostVirtualNicConnection `xml:"vnic"` NicType []string `xml:"nicType,omitempty"` } func init() { t["HostVirtualNicManagerNicTypeSelection"] = reflect.TypeOf((*HostVirtualNicManagerNicTypeSelection)(nil)).Elem() } type HostVirtualNicOpaqueNetworkSpec struct { DynamicData OpaqueNetworkId string `xml:"opaqueNetworkId"` OpaqueNetworkType string `xml:"opaqueNetworkType"` } func init() { t["HostVirtualNicOpaqueNetworkSpec"] = reflect.TypeOf((*HostVirtualNicOpaqueNetworkSpec)(nil)).Elem() } type HostVirtualNicSpec struct { DynamicData Ip *HostIpConfig `xml:"ip,omitempty"` Mac string `xml:"mac,omitempty"` DistributedVirtualPort *DistributedVirtualSwitchPortConnection `xml:"distributedVirtualPort,omitempty"` Portgroup string `xml:"portgroup,omitempty"` Mtu int32 `xml:"mtu,omitempty"` TsoEnabled *bool `xml:"tsoEnabled"` NetStackInstanceKey string `xml:"netStackInstanceKey,omitempty"` OpaqueNetwork *HostVirtualNicOpaqueNetworkSpec `xml:"opaqueNetwork,omitempty"` ExternalId string `xml:"externalId,omitempty"` PinnedPnic string `xml:"pinnedPnic,omitempty"` IpRouteSpec *HostVirtualNicIpRouteSpec `xml:"ipRouteSpec,omitempty"` } func init() { t["HostVirtualNicSpec"] = reflect.TypeOf((*HostVirtualNicSpec)(nil)).Elem() } type HostVirtualSwitch struct { DynamicData Name string `xml:"name"` Key string `xml:"key"` NumPorts int32 `xml:"numPorts"` NumPortsAvailable int32 `xml:"numPortsAvailable"` Mtu int32 `xml:"mtu,omitempty"` Portgroup []string `xml:"portgroup,omitempty"` Pnic []string `xml:"pnic,omitempty"` Spec HostVirtualSwitchSpec `xml:"spec"` } func init() { t["HostVirtualSwitch"] = reflect.TypeOf((*HostVirtualSwitch)(nil)).Elem() } type HostVirtualSwitchAutoBridge struct { HostVirtualSwitchBridge ExcludedNicDevice []string `xml:"excludedNicDevice,omitempty"` } func init() { t["HostVirtualSwitchAutoBridge"] = reflect.TypeOf((*HostVirtualSwitchAutoBridge)(nil)).Elem() } type HostVirtualSwitchBeaconConfig struct { DynamicData Interval int32 `xml:"interval"` } func init() { t["HostVirtualSwitchBeaconConfig"] = reflect.TypeOf((*HostVirtualSwitchBeaconConfig)(nil)).Elem() } type HostVirtualSwitchBondBridge struct { HostVirtualSwitchBridge NicDevice []string `xml:"nicDevice"` Beacon *HostVirtualSwitchBeaconConfig `xml:"beacon,omitempty"` LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"` } func init() { t["HostVirtualSwitchBondBridge"] = reflect.TypeOf((*HostVirtualSwitchBondBridge)(nil)).Elem() } type HostVirtualSwitchBridge struct { DynamicData } func init() { t["HostVirtualSwitchBridge"] = reflect.TypeOf((*HostVirtualSwitchBridge)(nil)).Elem() } type HostVirtualSwitchConfig struct { DynamicData ChangeOperation string `xml:"changeOperation,omitempty"` Name string `xml:"name"` Spec *HostVirtualSwitchSpec `xml:"spec,omitempty"` } func init() { t["HostVirtualSwitchConfig"] = reflect.TypeOf((*HostVirtualSwitchConfig)(nil)).Elem() } type HostVirtualSwitchSimpleBridge struct { HostVirtualSwitchBridge NicDevice string `xml:"nicDevice"` } func init() { t["HostVirtualSwitchSimpleBridge"] = reflect.TypeOf((*HostVirtualSwitchSimpleBridge)(nil)).Elem() } type HostVirtualSwitchSpec struct { DynamicData NumPorts int32 `xml:"numPorts"` Bridge BaseHostVirtualSwitchBridge `xml:"bridge,omitempty,typeattr"` Policy *HostNetworkPolicy `xml:"policy,omitempty"` Mtu int32 `xml:"mtu,omitempty"` } func init() { t["HostVirtualSwitchSpec"] = reflect.TypeOf((*HostVirtualSwitchSpec)(nil)).Elem() } type HostVmciAccessManagerAccessSpec struct { DynamicData Vm ManagedObjectReference `xml:"vm"` Services []string `xml:"services,omitempty"` Mode string `xml:"mode"` } func init() { t["HostVmciAccessManagerAccessSpec"] = reflect.TypeOf((*HostVmciAccessManagerAccessSpec)(nil)).Elem() } type HostVmfsRescanResult struct { DynamicData Host ManagedObjectReference `xml:"host"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HostVmfsRescanResult"] = reflect.TypeOf((*HostVmfsRescanResult)(nil)).Elem() } type HostVmfsSpec struct { DynamicData Extent HostScsiDiskPartition `xml:"extent"` BlockSizeMb int32 `xml:"blockSizeMb,omitempty"` MajorVersion int32 `xml:"majorVersion"` VolumeName string `xml:"volumeName"` BlockSize int32 `xml:"blockSize,omitempty"` UnmapGranularity int32 `xml:"unmapGranularity,omitempty"` UnmapPriority string `xml:"unmapPriority,omitempty"` } func init() { t["HostVmfsSpec"] = reflect.TypeOf((*HostVmfsSpec)(nil)).Elem() } type HostVmfsVolume struct { HostFileSystemVolume BlockSizeMb int32 `xml:"blockSizeMb"` BlockSize int32 `xml:"blockSize,omitempty"` UnmapGranularity int32 `xml:"unmapGranularity,omitempty"` UnmapPriority string `xml:"unmapPriority,omitempty"` MaxBlocks int32 `xml:"maxBlocks"` MajorVersion int32 `xml:"majorVersion"` Version string `xml:"version"` Uuid string `xml:"uuid"` Extent []HostScsiDiskPartition `xml:"extent"` VmfsUpgradable bool `xml:"vmfsUpgradable"` ForceMountedInfo *HostForceMountedInfo `xml:"forceMountedInfo,omitempty"` Ssd *bool `xml:"ssd"` Local *bool `xml:"local"` ScsiDiskType string `xml:"scsiDiskType,omitempty"` } func init() { t["HostVmfsVolume"] = reflect.TypeOf((*HostVmfsVolume)(nil)).Elem() } type HostVnicConnectedToCustomizedDVPortEvent struct { HostEvent Vnic VnicPortArgument `xml:"vnic"` PrevPortKey string `xml:"prevPortKey,omitempty"` } func init() { t["HostVnicConnectedToCustomizedDVPortEvent"] = reflect.TypeOf((*HostVnicConnectedToCustomizedDVPortEvent)(nil)).Elem() } type HostVsanInternalSystemCmmdsQuery struct { DynamicData Type string `xml:"type,omitempty"` Uuid string `xml:"uuid,omitempty"` Owner string `xml:"owner,omitempty"` } func init() { t["HostVsanInternalSystemCmmdsQuery"] = reflect.TypeOf((*HostVsanInternalSystemCmmdsQuery)(nil)).Elem() } type HostVsanInternalSystemDeleteVsanObjectsResult struct { DynamicData Uuid string `xml:"uuid"` Success bool `xml:"success"` FailureReason []LocalizableMessage `xml:"failureReason,omitempty"` } func init() { t["HostVsanInternalSystemDeleteVsanObjectsResult"] = reflect.TypeOf((*HostVsanInternalSystemDeleteVsanObjectsResult)(nil)).Elem() } type HostVsanInternalSystemVsanObjectOperationResult struct { DynamicData Uuid string `xml:"uuid"` FailureReason []LocalizableMessage `xml:"failureReason,omitempty"` } func init() { t["HostVsanInternalSystemVsanObjectOperationResult"] = reflect.TypeOf((*HostVsanInternalSystemVsanObjectOperationResult)(nil)).Elem() } type HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult struct { DynamicData DiskUuid string `xml:"diskUuid"` Success bool `xml:"success"` FailureReason string `xml:"failureReason,omitempty"` } func init() { t["HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult"] = reflect.TypeOf((*HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult)(nil)).Elem() } type HostVvolVolume struct { HostFileSystemVolume ScId string `xml:"scId"` HostPE []VVolHostPE `xml:"hostPE,omitempty"` VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"` StorageArray []VASAStorageArray `xml:"storageArray,omitempty"` } func init() { t["HostVvolVolume"] = reflect.TypeOf((*HostVvolVolume)(nil)).Elem() } type HostVvolVolumeSpecification struct { DynamicData MaxSizeInMB int64 `xml:"maxSizeInMB"` VolumeName string `xml:"volumeName"` VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"` StorageArray []VASAStorageArray `xml:"storageArray,omitempty"` Uuid string `xml:"uuid"` } func init() { t["HostVvolVolumeSpecification"] = reflect.TypeOf((*HostVvolVolumeSpecification)(nil)).Elem() } type HostWwnChangedEvent struct { HostEvent OldNodeWwns []int64 `xml:"oldNodeWwns,omitempty"` OldPortWwns []int64 `xml:"oldPortWwns,omitempty"` NewNodeWwns []int64 `xml:"newNodeWwns,omitempty"` NewPortWwns []int64 `xml:"newPortWwns,omitempty"` } func init() { t["HostWwnChangedEvent"] = reflect.TypeOf((*HostWwnChangedEvent)(nil)).Elem() } type HostWwnConflictEvent struct { HostEvent ConflictedVms []VmEventArgument `xml:"conflictedVms,omitempty"` ConflictedHosts []HostEventArgument `xml:"conflictedHosts,omitempty"` Wwn int64 `xml:"wwn"` } func init() { t["HostWwnConflictEvent"] = reflect.TypeOf((*HostWwnConflictEvent)(nil)).Elem() } type HotSnapshotMoveNotSupported struct { SnapshotCopyNotSupported } func init() { t["HotSnapshotMoveNotSupported"] = reflect.TypeOf((*HotSnapshotMoveNotSupported)(nil)).Elem() } type HotSnapshotMoveNotSupportedFault HotSnapshotMoveNotSupported func init() { t["HotSnapshotMoveNotSupportedFault"] = reflect.TypeOf((*HotSnapshotMoveNotSupportedFault)(nil)).Elem() } type HourlyTaskScheduler struct { RecurrentTaskScheduler Minute int32 `xml:"minute"` } func init() { t["HourlyTaskScheduler"] = reflect.TypeOf((*HourlyTaskScheduler)(nil)).Elem() } type HttpNfcLeaseAbort HttpNfcLeaseAbortRequestType func init() { t["HttpNfcLeaseAbort"] = reflect.TypeOf((*HttpNfcLeaseAbort)(nil)).Elem() } type HttpNfcLeaseAbortRequestType struct { This ManagedObjectReference `xml:"_this"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["HttpNfcLeaseAbortRequestType"] = reflect.TypeOf((*HttpNfcLeaseAbortRequestType)(nil)).Elem() } type HttpNfcLeaseAbortResponse struct { } type HttpNfcLeaseComplete HttpNfcLeaseCompleteRequestType func init() { t["HttpNfcLeaseComplete"] = reflect.TypeOf((*HttpNfcLeaseComplete)(nil)).Elem() } type HttpNfcLeaseCompleteRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["HttpNfcLeaseCompleteRequestType"] = reflect.TypeOf((*HttpNfcLeaseCompleteRequestType)(nil)).Elem() } type HttpNfcLeaseCompleteResponse struct { } type HttpNfcLeaseDatastoreLeaseInfo struct { DynamicData DatastoreKey string `xml:"datastoreKey"` Hosts []HttpNfcLeaseHostInfo `xml:"hosts"` } func init() { t["HttpNfcLeaseDatastoreLeaseInfo"] = reflect.TypeOf((*HttpNfcLeaseDatastoreLeaseInfo)(nil)).Elem() } type HttpNfcLeaseDeviceUrl struct { DynamicData Key string `xml:"key"` ImportKey string `xml:"importKey"` Url string `xml:"url"` SslThumbprint string `xml:"sslThumbprint"` Disk *bool `xml:"disk"` TargetId string `xml:"targetId,omitempty"` DatastoreKey string `xml:"datastoreKey,omitempty"` FileSize int64 `xml:"fileSize,omitempty"` } func init() { t["HttpNfcLeaseDeviceUrl"] = reflect.TypeOf((*HttpNfcLeaseDeviceUrl)(nil)).Elem() } type HttpNfcLeaseGetManifest HttpNfcLeaseGetManifestRequestType func init() { t["HttpNfcLeaseGetManifest"] = reflect.TypeOf((*HttpNfcLeaseGetManifest)(nil)).Elem() } type HttpNfcLeaseGetManifestRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["HttpNfcLeaseGetManifestRequestType"] = reflect.TypeOf((*HttpNfcLeaseGetManifestRequestType)(nil)).Elem() } type HttpNfcLeaseGetManifestResponse struct { Returnval []HttpNfcLeaseManifestEntry `xml:"returnval,omitempty"` } type HttpNfcLeaseHostInfo struct { DynamicData Url string `xml:"url"` SslThumbprint string `xml:"sslThumbprint"` } func init() { t["HttpNfcLeaseHostInfo"] = reflect.TypeOf((*HttpNfcLeaseHostInfo)(nil)).Elem() } type HttpNfcLeaseInfo struct { DynamicData Lease ManagedObjectReference `xml:"lease"` Entity ManagedObjectReference `xml:"entity"` DeviceUrl []HttpNfcLeaseDeviceUrl `xml:"deviceUrl,omitempty"` TotalDiskCapacityInKB int64 `xml:"totalDiskCapacityInKB"` LeaseTimeout int32 `xml:"leaseTimeout"` HostMap []HttpNfcLeaseDatastoreLeaseInfo `xml:"hostMap,omitempty"` } func init() { t["HttpNfcLeaseInfo"] = reflect.TypeOf((*HttpNfcLeaseInfo)(nil)).Elem() } type HttpNfcLeaseManifestEntry struct { DynamicData Key string `xml:"key"` Sha1 string `xml:"sha1"` Size int64 `xml:"size"` Disk bool `xml:"disk"` Capacity int64 `xml:"capacity,omitempty"` PopulatedSize int64 `xml:"populatedSize,omitempty"` } func init() { t["HttpNfcLeaseManifestEntry"] = reflect.TypeOf((*HttpNfcLeaseManifestEntry)(nil)).Elem() } type HttpNfcLeaseProgress HttpNfcLeaseProgressRequestType func init() { t["HttpNfcLeaseProgress"] = reflect.TypeOf((*HttpNfcLeaseProgress)(nil)).Elem() } type HttpNfcLeaseProgressRequestType struct { This ManagedObjectReference `xml:"_this"` Percent int32 `xml:"percent"` } func init() { t["HttpNfcLeaseProgressRequestType"] = reflect.TypeOf((*HttpNfcLeaseProgressRequestType)(nil)).Elem() } type HttpNfcLeaseProgressResponse struct { } type ID struct { DynamicData Id string `xml:"id"` } func init() { t["ID"] = reflect.TypeOf((*ID)(nil)).Elem() } type IDEDiskNotSupported struct { DiskNotSupported } func init() { t["IDEDiskNotSupported"] = reflect.TypeOf((*IDEDiskNotSupported)(nil)).Elem() } type IDEDiskNotSupportedFault IDEDiskNotSupported func init() { t["IDEDiskNotSupportedFault"] = reflect.TypeOf((*IDEDiskNotSupportedFault)(nil)).Elem() } type IORMNotSupportedHostOnDatastore struct { VimFault Datastore ManagedObjectReference `xml:"datastore"` DatastoreName string `xml:"datastoreName"` Host []ManagedObjectReference `xml:"host,omitempty"` } func init() { t["IORMNotSupportedHostOnDatastore"] = reflect.TypeOf((*IORMNotSupportedHostOnDatastore)(nil)).Elem() } type IORMNotSupportedHostOnDatastoreFault IORMNotSupportedHostOnDatastore func init() { t["IORMNotSupportedHostOnDatastoreFault"] = reflect.TypeOf((*IORMNotSupportedHostOnDatastoreFault)(nil)).Elem() } type IScsiBootFailureEvent struct { HostEvent } func init() { t["IScsiBootFailureEvent"] = reflect.TypeOf((*IScsiBootFailureEvent)(nil)).Elem() } type ImpersonateUser ImpersonateUserRequestType func init() { t["ImpersonateUser"] = reflect.TypeOf((*ImpersonateUser)(nil)).Elem() } type ImpersonateUserRequestType struct { This ManagedObjectReference `xml:"_this"` UserName string `xml:"userName"` Locale string `xml:"locale,omitempty"` } func init() { t["ImpersonateUserRequestType"] = reflect.TypeOf((*ImpersonateUserRequestType)(nil)).Elem() } type ImpersonateUserResponse struct { Returnval UserSession `xml:"returnval"` } type ImportCertificateForCAMRequestType struct { This ManagedObjectReference `xml:"_this"` CertPath string `xml:"certPath"` CamServer string `xml:"camServer"` } func init() { t["ImportCertificateForCAMRequestType"] = reflect.TypeOf((*ImportCertificateForCAMRequestType)(nil)).Elem() } type ImportCertificateForCAM_Task ImportCertificateForCAMRequestType func init() { t["ImportCertificateForCAM_Task"] = reflect.TypeOf((*ImportCertificateForCAM_Task)(nil)).Elem() } type ImportCertificateForCAM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ImportHostAddFailure struct { DvsFault HostIp []string `xml:"hostIp"` } func init() { t["ImportHostAddFailure"] = reflect.TypeOf((*ImportHostAddFailure)(nil)).Elem() } type ImportHostAddFailureFault ImportHostAddFailure func init() { t["ImportHostAddFailureFault"] = reflect.TypeOf((*ImportHostAddFailureFault)(nil)).Elem() } type ImportOperationBulkFault struct { DvsFault ImportFaults []ImportOperationBulkFaultFaultOnImport `xml:"importFaults"` } func init() { t["ImportOperationBulkFault"] = reflect.TypeOf((*ImportOperationBulkFault)(nil)).Elem() } type ImportOperationBulkFaultFault ImportOperationBulkFault func init() { t["ImportOperationBulkFaultFault"] = reflect.TypeOf((*ImportOperationBulkFaultFault)(nil)).Elem() } type ImportOperationBulkFaultFaultOnImport struct { DynamicData EntityType string `xml:"entityType,omitempty"` Key string `xml:"key,omitempty"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["ImportOperationBulkFaultFaultOnImport"] = reflect.TypeOf((*ImportOperationBulkFaultFaultOnImport)(nil)).Elem() } type ImportSpec struct { DynamicData EntityConfig *VAppEntityConfigInfo `xml:"entityConfig,omitempty"` InstantiationOst *OvfConsumerOstNode `xml:"instantiationOst,omitempty"` } func init() { t["ImportSpec"] = reflect.TypeOf((*ImportSpec)(nil)).Elem() } type ImportUnmanagedSnapshot ImportUnmanagedSnapshotRequestType func init() { t["ImportUnmanagedSnapshot"] = reflect.TypeOf((*ImportUnmanagedSnapshot)(nil)).Elem() } type ImportUnmanagedSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` Vdisk string `xml:"vdisk"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` VvolId string `xml:"vvolId"` } func init() { t["ImportUnmanagedSnapshotRequestType"] = reflect.TypeOf((*ImportUnmanagedSnapshotRequestType)(nil)).Elem() } type ImportUnmanagedSnapshotResponse struct { } type ImportVApp ImportVAppRequestType func init() { t["ImportVApp"] = reflect.TypeOf((*ImportVApp)(nil)).Elem() } type ImportVAppRequestType struct { This ManagedObjectReference `xml:"_this"` Spec BaseImportSpec `xml:"spec,typeattr"` Folder *ManagedObjectReference `xml:"folder,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["ImportVAppRequestType"] = reflect.TypeOf((*ImportVAppRequestType)(nil)).Elem() } type ImportVAppResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InUseFeatureManipulationDisallowed struct { NotEnoughLicenses } func init() { t["InUseFeatureManipulationDisallowed"] = reflect.TypeOf((*InUseFeatureManipulationDisallowed)(nil)).Elem() } type InUseFeatureManipulationDisallowedFault InUseFeatureManipulationDisallowed func init() { t["InUseFeatureManipulationDisallowedFault"] = reflect.TypeOf((*InUseFeatureManipulationDisallowedFault)(nil)).Elem() } type InaccessibleDatastore struct { InvalidDatastore Detail string `xml:"detail,omitempty"` } func init() { t["InaccessibleDatastore"] = reflect.TypeOf((*InaccessibleDatastore)(nil)).Elem() } type InaccessibleDatastoreFault BaseInaccessibleDatastore func init() { t["InaccessibleDatastoreFault"] = reflect.TypeOf((*InaccessibleDatastoreFault)(nil)).Elem() } type InaccessibleFTMetadataDatastore struct { InaccessibleDatastore } func init() { t["InaccessibleFTMetadataDatastore"] = reflect.TypeOf((*InaccessibleFTMetadataDatastore)(nil)).Elem() } type InaccessibleFTMetadataDatastoreFault InaccessibleFTMetadataDatastore func init() { t["InaccessibleFTMetadataDatastoreFault"] = reflect.TypeOf((*InaccessibleFTMetadataDatastoreFault)(nil)).Elem() } type InaccessibleVFlashSource struct { VimFault HostName string `xml:"hostName"` } func init() { t["InaccessibleVFlashSource"] = reflect.TypeOf((*InaccessibleVFlashSource)(nil)).Elem() } type InaccessibleVFlashSourceFault InaccessibleVFlashSource func init() { t["InaccessibleVFlashSourceFault"] = reflect.TypeOf((*InaccessibleVFlashSourceFault)(nil)).Elem() } type IncompatibleDefaultDevice struct { MigrationFault Device string `xml:"device"` } func init() { t["IncompatibleDefaultDevice"] = reflect.TypeOf((*IncompatibleDefaultDevice)(nil)).Elem() } type IncompatibleDefaultDeviceFault IncompatibleDefaultDevice func init() { t["IncompatibleDefaultDeviceFault"] = reflect.TypeOf((*IncompatibleDefaultDeviceFault)(nil)).Elem() } type IncompatibleHostForFtSecondary struct { VmFaultToleranceIssue Host ManagedObjectReference `xml:"host"` Error []LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["IncompatibleHostForFtSecondary"] = reflect.TypeOf((*IncompatibleHostForFtSecondary)(nil)).Elem() } type IncompatibleHostForFtSecondaryFault IncompatibleHostForFtSecondary func init() { t["IncompatibleHostForFtSecondaryFault"] = reflect.TypeOf((*IncompatibleHostForFtSecondaryFault)(nil)).Elem() } type IncompatibleHostForVmReplication struct { ReplicationFault VmName string `xml:"vmName"` HostName string `xml:"hostName"` Reason string `xml:"reason"` } func init() { t["IncompatibleHostForVmReplication"] = reflect.TypeOf((*IncompatibleHostForVmReplication)(nil)).Elem() } type IncompatibleHostForVmReplicationFault IncompatibleHostForVmReplication func init() { t["IncompatibleHostForVmReplicationFault"] = reflect.TypeOf((*IncompatibleHostForVmReplicationFault)(nil)).Elem() } type IncompatibleSetting struct { InvalidArgument ConflictingProperty string `xml:"conflictingProperty"` } func init() { t["IncompatibleSetting"] = reflect.TypeOf((*IncompatibleSetting)(nil)).Elem() } type IncompatibleSettingFault IncompatibleSetting func init() { t["IncompatibleSettingFault"] = reflect.TypeOf((*IncompatibleSettingFault)(nil)).Elem() } type IncorrectFileType struct { FileFault } func init() { t["IncorrectFileType"] = reflect.TypeOf((*IncorrectFileType)(nil)).Elem() } type IncorrectFileTypeFault IncorrectFileType func init() { t["IncorrectFileTypeFault"] = reflect.TypeOf((*IncorrectFileTypeFault)(nil)).Elem() } type IncorrectHostInformation struct { NotEnoughLicenses } func init() { t["IncorrectHostInformation"] = reflect.TypeOf((*IncorrectHostInformation)(nil)).Elem() } type IncorrectHostInformationEvent struct { LicenseEvent } func init() { t["IncorrectHostInformationEvent"] = reflect.TypeOf((*IncorrectHostInformationEvent)(nil)).Elem() } type IncorrectHostInformationFault IncorrectHostInformation func init() { t["IncorrectHostInformationFault"] = reflect.TypeOf((*IncorrectHostInformationFault)(nil)).Elem() } type IndependentDiskVMotionNotSupported struct { MigrationFeatureNotSupported } func init() { t["IndependentDiskVMotionNotSupported"] = reflect.TypeOf((*IndependentDiskVMotionNotSupported)(nil)).Elem() } type IndependentDiskVMotionNotSupportedFault IndependentDiskVMotionNotSupported func init() { t["IndependentDiskVMotionNotSupportedFault"] = reflect.TypeOf((*IndependentDiskVMotionNotSupportedFault)(nil)).Elem() } type InflateDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["InflateDiskRequestType"] = reflect.TypeOf((*InflateDiskRequestType)(nil)).Elem() } type InflateDisk_Task InflateDiskRequestType func init() { t["InflateDisk_Task"] = reflect.TypeOf((*InflateDisk_Task)(nil)).Elem() } type InflateDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InflateVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["InflateVirtualDiskRequestType"] = reflect.TypeOf((*InflateVirtualDiskRequestType)(nil)).Elem() } type InflateVirtualDisk_Task InflateVirtualDiskRequestType func init() { t["InflateVirtualDisk_Task"] = reflect.TypeOf((*InflateVirtualDisk_Task)(nil)).Elem() } type InflateVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InfoUpgradeEvent struct { UpgradeEvent } func init() { t["InfoUpgradeEvent"] = reflect.TypeOf((*InfoUpgradeEvent)(nil)).Elem() } type InheritablePolicy struct { DynamicData Inherited bool `xml:"inherited"` } func init() { t["InheritablePolicy"] = reflect.TypeOf((*InheritablePolicy)(nil)).Elem() } type InitializeDisksRequestType struct { This ManagedObjectReference `xml:"_this"` Mapping []VsanHostDiskMapping `xml:"mapping"` } func init() { t["InitializeDisksRequestType"] = reflect.TypeOf((*InitializeDisksRequestType)(nil)).Elem() } type InitializeDisks_Task InitializeDisksRequestType func init() { t["InitializeDisks_Task"] = reflect.TypeOf((*InitializeDisks_Task)(nil)).Elem() } type InitializeDisks_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InitiateFileTransferFromGuest InitiateFileTransferFromGuestRequestType func init() { t["InitiateFileTransferFromGuest"] = reflect.TypeOf((*InitiateFileTransferFromGuest)(nil)).Elem() } type InitiateFileTransferFromGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` GuestFilePath string `xml:"guestFilePath"` } func init() { t["InitiateFileTransferFromGuestRequestType"] = reflect.TypeOf((*InitiateFileTransferFromGuestRequestType)(nil)).Elem() } type InitiateFileTransferFromGuestResponse struct { Returnval FileTransferInformation `xml:"returnval"` } type InitiateFileTransferToGuest InitiateFileTransferToGuestRequestType func init() { t["InitiateFileTransferToGuest"] = reflect.TypeOf((*InitiateFileTransferToGuest)(nil)).Elem() } type InitiateFileTransferToGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` GuestFilePath string `xml:"guestFilePath"` FileAttributes BaseGuestFileAttributes `xml:"fileAttributes,typeattr"` FileSize int64 `xml:"fileSize"` Overwrite bool `xml:"overwrite"` } func init() { t["InitiateFileTransferToGuestRequestType"] = reflect.TypeOf((*InitiateFileTransferToGuestRequestType)(nil)).Elem() } type InitiateFileTransferToGuestResponse struct { Returnval string `xml:"returnval"` } type InstallHostPatchRequestType struct { This ManagedObjectReference `xml:"_this"` Repository HostPatchManagerLocator `xml:"repository"` UpdateID string `xml:"updateID"` Force *bool `xml:"force"` } func init() { t["InstallHostPatchRequestType"] = reflect.TypeOf((*InstallHostPatchRequestType)(nil)).Elem() } type InstallHostPatchV2RequestType struct { This ManagedObjectReference `xml:"_this"` MetaUrls []string `xml:"metaUrls,omitempty"` BundleUrls []string `xml:"bundleUrls,omitempty"` VibUrls []string `xml:"vibUrls,omitempty"` Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` } func init() { t["InstallHostPatchV2RequestType"] = reflect.TypeOf((*InstallHostPatchV2RequestType)(nil)).Elem() } type InstallHostPatchV2_Task InstallHostPatchV2RequestType func init() { t["InstallHostPatchV2_Task"] = reflect.TypeOf((*InstallHostPatchV2_Task)(nil)).Elem() } type InstallHostPatchV2_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InstallHostPatch_Task InstallHostPatchRequestType func init() { t["InstallHostPatch_Task"] = reflect.TypeOf((*InstallHostPatch_Task)(nil)).Elem() } type InstallHostPatch_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InstallIoFilterRequestType struct { This ManagedObjectReference `xml:"_this"` VibUrl string `xml:"vibUrl"` CompRes ManagedObjectReference `xml:"compRes"` } func init() { t["InstallIoFilterRequestType"] = reflect.TypeOf((*InstallIoFilterRequestType)(nil)).Elem() } type InstallIoFilter_Task InstallIoFilterRequestType func init() { t["InstallIoFilter_Task"] = reflect.TypeOf((*InstallIoFilter_Task)(nil)).Elem() } type InstallIoFilter_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type InstallServerCertificate InstallServerCertificateRequestType func init() { t["InstallServerCertificate"] = reflect.TypeOf((*InstallServerCertificate)(nil)).Elem() } type InstallServerCertificateRequestType struct { This ManagedObjectReference `xml:"_this"` Cert string `xml:"cert"` } func init() { t["InstallServerCertificateRequestType"] = reflect.TypeOf((*InstallServerCertificateRequestType)(nil)).Elem() } type InstallServerCertificateResponse struct { } type InstallSmartCardTrustAnchor InstallSmartCardTrustAnchorRequestType func init() { t["InstallSmartCardTrustAnchor"] = reflect.TypeOf((*InstallSmartCardTrustAnchor)(nil)).Elem() } type InstallSmartCardTrustAnchorRequestType struct { This ManagedObjectReference `xml:"_this"` Cert string `xml:"cert"` } func init() { t["InstallSmartCardTrustAnchorRequestType"] = reflect.TypeOf((*InstallSmartCardTrustAnchorRequestType)(nil)).Elem() } type InstallSmartCardTrustAnchorResponse struct { } type InsufficientAgentVmsDeployed struct { InsufficientResourcesFault HostName string `xml:"hostName"` RequiredNumAgentVms int32 `xml:"requiredNumAgentVms"` CurrentNumAgentVms int32 `xml:"currentNumAgentVms"` } func init() { t["InsufficientAgentVmsDeployed"] = reflect.TypeOf((*InsufficientAgentVmsDeployed)(nil)).Elem() } type InsufficientAgentVmsDeployedFault InsufficientAgentVmsDeployed func init() { t["InsufficientAgentVmsDeployedFault"] = reflect.TypeOf((*InsufficientAgentVmsDeployedFault)(nil)).Elem() } type InsufficientCpuResourcesFault struct { InsufficientResourcesFault Unreserved int64 `xml:"unreserved"` Requested int64 `xml:"requested"` } func init() { t["InsufficientCpuResourcesFault"] = reflect.TypeOf((*InsufficientCpuResourcesFault)(nil)).Elem() } type InsufficientCpuResourcesFaultFault InsufficientCpuResourcesFault func init() { t["InsufficientCpuResourcesFaultFault"] = reflect.TypeOf((*InsufficientCpuResourcesFaultFault)(nil)).Elem() } type InsufficientDisks struct { VsanDiskFault } func init() { t["InsufficientDisks"] = reflect.TypeOf((*InsufficientDisks)(nil)).Elem() } type InsufficientDisksFault InsufficientDisks func init() { t["InsufficientDisksFault"] = reflect.TypeOf((*InsufficientDisksFault)(nil)).Elem() } type InsufficientFailoverResourcesEvent struct { ClusterEvent } func init() { t["InsufficientFailoverResourcesEvent"] = reflect.TypeOf((*InsufficientFailoverResourcesEvent)(nil)).Elem() } type InsufficientFailoverResourcesFault struct { InsufficientResourcesFault } func init() { t["InsufficientFailoverResourcesFault"] = reflect.TypeOf((*InsufficientFailoverResourcesFault)(nil)).Elem() } type InsufficientFailoverResourcesFaultFault InsufficientFailoverResourcesFault func init() { t["InsufficientFailoverResourcesFaultFault"] = reflect.TypeOf((*InsufficientFailoverResourcesFaultFault)(nil)).Elem() } type InsufficientGraphicsResourcesFault struct { InsufficientResourcesFault } func init() { t["InsufficientGraphicsResourcesFault"] = reflect.TypeOf((*InsufficientGraphicsResourcesFault)(nil)).Elem() } type InsufficientGraphicsResourcesFaultFault InsufficientGraphicsResourcesFault func init() { t["InsufficientGraphicsResourcesFaultFault"] = reflect.TypeOf((*InsufficientGraphicsResourcesFaultFault)(nil)).Elem() } type InsufficientHostCapacityFault struct { InsufficientResourcesFault Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["InsufficientHostCapacityFault"] = reflect.TypeOf((*InsufficientHostCapacityFault)(nil)).Elem() } type InsufficientHostCapacityFaultFault BaseInsufficientHostCapacityFault func init() { t["InsufficientHostCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostCapacityFaultFault)(nil)).Elem() } type InsufficientHostCpuCapacityFault struct { InsufficientHostCapacityFault Unreserved int64 `xml:"unreserved"` Requested int64 `xml:"requested"` } func init() { t["InsufficientHostCpuCapacityFault"] = reflect.TypeOf((*InsufficientHostCpuCapacityFault)(nil)).Elem() } type InsufficientHostCpuCapacityFaultFault InsufficientHostCpuCapacityFault func init() { t["InsufficientHostCpuCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostCpuCapacityFaultFault)(nil)).Elem() } type InsufficientHostMemoryCapacityFault struct { InsufficientHostCapacityFault Unreserved int64 `xml:"unreserved"` Requested int64 `xml:"requested"` } func init() { t["InsufficientHostMemoryCapacityFault"] = reflect.TypeOf((*InsufficientHostMemoryCapacityFault)(nil)).Elem() } type InsufficientHostMemoryCapacityFaultFault InsufficientHostMemoryCapacityFault func init() { t["InsufficientHostMemoryCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostMemoryCapacityFaultFault)(nil)).Elem() } type InsufficientMemoryResourcesFault struct { InsufficientResourcesFault Unreserved int64 `xml:"unreserved"` Requested int64 `xml:"requested"` } func init() { t["InsufficientMemoryResourcesFault"] = reflect.TypeOf((*InsufficientMemoryResourcesFault)(nil)).Elem() } type InsufficientMemoryResourcesFaultFault InsufficientMemoryResourcesFault func init() { t["InsufficientMemoryResourcesFaultFault"] = reflect.TypeOf((*InsufficientMemoryResourcesFaultFault)(nil)).Elem() } type InsufficientNetworkCapacity struct { InsufficientResourcesFault } func init() { t["InsufficientNetworkCapacity"] = reflect.TypeOf((*InsufficientNetworkCapacity)(nil)).Elem() } type InsufficientNetworkCapacityFault InsufficientNetworkCapacity func init() { t["InsufficientNetworkCapacityFault"] = reflect.TypeOf((*InsufficientNetworkCapacityFault)(nil)).Elem() } type InsufficientNetworkResourcePoolCapacity struct { InsufficientResourcesFault DvsName string `xml:"dvsName"` DvsUuid string `xml:"dvsUuid"` ResourcePoolKey string `xml:"resourcePoolKey"` Available int64 `xml:"available"` Requested int64 `xml:"requested"` Device []string `xml:"device"` } func init() { t["InsufficientNetworkResourcePoolCapacity"] = reflect.TypeOf((*InsufficientNetworkResourcePoolCapacity)(nil)).Elem() } type InsufficientNetworkResourcePoolCapacityFault InsufficientNetworkResourcePoolCapacity func init() { t["InsufficientNetworkResourcePoolCapacityFault"] = reflect.TypeOf((*InsufficientNetworkResourcePoolCapacityFault)(nil)).Elem() } type InsufficientPerCpuCapacity struct { InsufficientHostCapacityFault } func init() { t["InsufficientPerCpuCapacity"] = reflect.TypeOf((*InsufficientPerCpuCapacity)(nil)).Elem() } type InsufficientPerCpuCapacityFault InsufficientPerCpuCapacity func init() { t["InsufficientPerCpuCapacityFault"] = reflect.TypeOf((*InsufficientPerCpuCapacityFault)(nil)).Elem() } type InsufficientResourcesFault struct { VimFault } func init() { t["InsufficientResourcesFault"] = reflect.TypeOf((*InsufficientResourcesFault)(nil)).Elem() } type InsufficientResourcesFaultFault BaseInsufficientResourcesFault func init() { t["InsufficientResourcesFaultFault"] = reflect.TypeOf((*InsufficientResourcesFaultFault)(nil)).Elem() } type InsufficientStandbyCpuResource struct { InsufficientStandbyResource Available int64 `xml:"available"` Requested int64 `xml:"requested"` } func init() { t["InsufficientStandbyCpuResource"] = reflect.TypeOf((*InsufficientStandbyCpuResource)(nil)).Elem() } type InsufficientStandbyCpuResourceFault InsufficientStandbyCpuResource func init() { t["InsufficientStandbyCpuResourceFault"] = reflect.TypeOf((*InsufficientStandbyCpuResourceFault)(nil)).Elem() } type InsufficientStandbyMemoryResource struct { InsufficientStandbyResource Available int64 `xml:"available"` Requested int64 `xml:"requested"` } func init() { t["InsufficientStandbyMemoryResource"] = reflect.TypeOf((*InsufficientStandbyMemoryResource)(nil)).Elem() } type InsufficientStandbyMemoryResourceFault InsufficientStandbyMemoryResource func init() { t["InsufficientStandbyMemoryResourceFault"] = reflect.TypeOf((*InsufficientStandbyMemoryResourceFault)(nil)).Elem() } type InsufficientStandbyResource struct { InsufficientResourcesFault } func init() { t["InsufficientStandbyResource"] = reflect.TypeOf((*InsufficientStandbyResource)(nil)).Elem() } type InsufficientStandbyResourceFault BaseInsufficientStandbyResource func init() { t["InsufficientStandbyResourceFault"] = reflect.TypeOf((*InsufficientStandbyResourceFault)(nil)).Elem() } type InsufficientStorageIops struct { VimFault UnreservedIops int64 `xml:"unreservedIops"` RequestedIops int64 `xml:"requestedIops"` DatastoreName string `xml:"datastoreName"` } func init() { t["InsufficientStorageIops"] = reflect.TypeOf((*InsufficientStorageIops)(nil)).Elem() } type InsufficientStorageIopsFault InsufficientStorageIops func init() { t["InsufficientStorageIopsFault"] = reflect.TypeOf((*InsufficientStorageIopsFault)(nil)).Elem() } type InsufficientStorageSpace struct { InsufficientResourcesFault } func init() { t["InsufficientStorageSpace"] = reflect.TypeOf((*InsufficientStorageSpace)(nil)).Elem() } type InsufficientStorageSpaceFault InsufficientStorageSpace func init() { t["InsufficientStorageSpaceFault"] = reflect.TypeOf((*InsufficientStorageSpaceFault)(nil)).Elem() } type InsufficientVFlashResourcesFault struct { InsufficientResourcesFault FreeSpaceInMB int64 `xml:"freeSpaceInMB,omitempty"` FreeSpace int64 `xml:"freeSpace"` RequestedSpaceInMB int64 `xml:"requestedSpaceInMB,omitempty"` RequestedSpace int64 `xml:"requestedSpace"` } func init() { t["InsufficientVFlashResourcesFault"] = reflect.TypeOf((*InsufficientVFlashResourcesFault)(nil)).Elem() } type InsufficientVFlashResourcesFaultFault InsufficientVFlashResourcesFault func init() { t["InsufficientVFlashResourcesFaultFault"] = reflect.TypeOf((*InsufficientVFlashResourcesFaultFault)(nil)).Elem() } type IntExpression struct { NegatableExpression Value int32 `xml:"value,omitempty"` } func init() { t["IntExpression"] = reflect.TypeOf((*IntExpression)(nil)).Elem() } type IntOption struct { OptionType Min int32 `xml:"min"` Max int32 `xml:"max"` DefaultValue int32 `xml:"defaultValue"` } func init() { t["IntOption"] = reflect.TypeOf((*IntOption)(nil)).Elem() } type IntPolicy struct { InheritablePolicy Value int32 `xml:"value,omitempty"` } func init() { t["IntPolicy"] = reflect.TypeOf((*IntPolicy)(nil)).Elem() } type InvalidAffinitySettingFault struct { VimFault } func init() { t["InvalidAffinitySettingFault"] = reflect.TypeOf((*InvalidAffinitySettingFault)(nil)).Elem() } type InvalidAffinitySettingFaultFault InvalidAffinitySettingFault func init() { t["InvalidAffinitySettingFaultFault"] = reflect.TypeOf((*InvalidAffinitySettingFaultFault)(nil)).Elem() } type InvalidArgument struct { RuntimeFault InvalidProperty string `xml:"invalidProperty,omitempty"` } func init() { t["InvalidArgument"] = reflect.TypeOf((*InvalidArgument)(nil)).Elem() } type InvalidArgumentFault BaseInvalidArgument func init() { t["InvalidArgumentFault"] = reflect.TypeOf((*InvalidArgumentFault)(nil)).Elem() } type InvalidBmcRole struct { VimFault } func init() { t["InvalidBmcRole"] = reflect.TypeOf((*InvalidBmcRole)(nil)).Elem() } type InvalidBmcRoleFault InvalidBmcRole func init() { t["InvalidBmcRoleFault"] = reflect.TypeOf((*InvalidBmcRoleFault)(nil)).Elem() } type InvalidBundle struct { PlatformConfigFault } func init() { t["InvalidBundle"] = reflect.TypeOf((*InvalidBundle)(nil)).Elem() } type InvalidBundleFault InvalidBundle func init() { t["InvalidBundleFault"] = reflect.TypeOf((*InvalidBundleFault)(nil)).Elem() } type InvalidCAMCertificate struct { InvalidCAMServer } func init() { t["InvalidCAMCertificate"] = reflect.TypeOf((*InvalidCAMCertificate)(nil)).Elem() } type InvalidCAMCertificateFault InvalidCAMCertificate func init() { t["InvalidCAMCertificateFault"] = reflect.TypeOf((*InvalidCAMCertificateFault)(nil)).Elem() } type InvalidCAMServer struct { ActiveDirectoryFault CamServer string `xml:"camServer"` } func init() { t["InvalidCAMServer"] = reflect.TypeOf((*InvalidCAMServer)(nil)).Elem() } type InvalidCAMServerFault BaseInvalidCAMServer func init() { t["InvalidCAMServerFault"] = reflect.TypeOf((*InvalidCAMServerFault)(nil)).Elem() } type InvalidClientCertificate struct { InvalidLogin } func init() { t["InvalidClientCertificate"] = reflect.TypeOf((*InvalidClientCertificate)(nil)).Elem() } type InvalidClientCertificateFault InvalidClientCertificate func init() { t["InvalidClientCertificateFault"] = reflect.TypeOf((*InvalidClientCertificateFault)(nil)).Elem() } type InvalidCollectorVersion struct { MethodFault } func init() { t["InvalidCollectorVersion"] = reflect.TypeOf((*InvalidCollectorVersion)(nil)).Elem() } type InvalidCollectorVersionFault InvalidCollectorVersion func init() { t["InvalidCollectorVersionFault"] = reflect.TypeOf((*InvalidCollectorVersionFault)(nil)).Elem() } type InvalidController struct { InvalidDeviceSpec ControllerKey int32 `xml:"controllerKey"` } func init() { t["InvalidController"] = reflect.TypeOf((*InvalidController)(nil)).Elem() } type InvalidControllerFault InvalidController func init() { t["InvalidControllerFault"] = reflect.TypeOf((*InvalidControllerFault)(nil)).Elem() } type InvalidDasConfigArgument struct { InvalidArgument Entry string `xml:"entry,omitempty"` ClusterName string `xml:"clusterName,omitempty"` } func init() { t["InvalidDasConfigArgument"] = reflect.TypeOf((*InvalidDasConfigArgument)(nil)).Elem() } type InvalidDasConfigArgumentFault InvalidDasConfigArgument func init() { t["InvalidDasConfigArgumentFault"] = reflect.TypeOf((*InvalidDasConfigArgumentFault)(nil)).Elem() } type InvalidDasRestartPriorityForFtVm struct { InvalidArgument Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["InvalidDasRestartPriorityForFtVm"] = reflect.TypeOf((*InvalidDasRestartPriorityForFtVm)(nil)).Elem() } type InvalidDasRestartPriorityForFtVmFault InvalidDasRestartPriorityForFtVm func init() { t["InvalidDasRestartPriorityForFtVmFault"] = reflect.TypeOf((*InvalidDasRestartPriorityForFtVmFault)(nil)).Elem() } type InvalidDatastore struct { VimFault Datastore *ManagedObjectReference `xml:"datastore,omitempty"` Name string `xml:"name,omitempty"` } func init() { t["InvalidDatastore"] = reflect.TypeOf((*InvalidDatastore)(nil)).Elem() } type InvalidDatastoreFault BaseInvalidDatastore func init() { t["InvalidDatastoreFault"] = reflect.TypeOf((*InvalidDatastoreFault)(nil)).Elem() } type InvalidDatastorePath struct { InvalidDatastore DatastorePath string `xml:"datastorePath"` } func init() { t["InvalidDatastorePath"] = reflect.TypeOf((*InvalidDatastorePath)(nil)).Elem() } type InvalidDatastorePathFault InvalidDatastorePath func init() { t["InvalidDatastorePathFault"] = reflect.TypeOf((*InvalidDatastorePathFault)(nil)).Elem() } type InvalidDatastoreState struct { InvalidState DatastoreName string `xml:"datastoreName,omitempty"` } func init() { t["InvalidDatastoreState"] = reflect.TypeOf((*InvalidDatastoreState)(nil)).Elem() } type InvalidDatastoreStateFault InvalidDatastoreState func init() { t["InvalidDatastoreStateFault"] = reflect.TypeOf((*InvalidDatastoreStateFault)(nil)).Elem() } type InvalidDeviceBacking struct { InvalidDeviceSpec } func init() { t["InvalidDeviceBacking"] = reflect.TypeOf((*InvalidDeviceBacking)(nil)).Elem() } type InvalidDeviceBackingFault InvalidDeviceBacking func init() { t["InvalidDeviceBackingFault"] = reflect.TypeOf((*InvalidDeviceBackingFault)(nil)).Elem() } type InvalidDeviceOperation struct { InvalidDeviceSpec BadOp VirtualDeviceConfigSpecOperation `xml:"badOp,omitempty"` BadFileOp VirtualDeviceConfigSpecFileOperation `xml:"badFileOp,omitempty"` } func init() { t["InvalidDeviceOperation"] = reflect.TypeOf((*InvalidDeviceOperation)(nil)).Elem() } type InvalidDeviceOperationFault InvalidDeviceOperation func init() { t["InvalidDeviceOperationFault"] = reflect.TypeOf((*InvalidDeviceOperationFault)(nil)).Elem() } type InvalidDeviceSpec struct { InvalidVmConfig DeviceIndex int32 `xml:"deviceIndex"` } func init() { t["InvalidDeviceSpec"] = reflect.TypeOf((*InvalidDeviceSpec)(nil)).Elem() } type InvalidDeviceSpecFault BaseInvalidDeviceSpec func init() { t["InvalidDeviceSpecFault"] = reflect.TypeOf((*InvalidDeviceSpecFault)(nil)).Elem() } type InvalidDiskFormat struct { InvalidFormat } func init() { t["InvalidDiskFormat"] = reflect.TypeOf((*InvalidDiskFormat)(nil)).Elem() } type InvalidDiskFormatFault InvalidDiskFormat func init() { t["InvalidDiskFormatFault"] = reflect.TypeOf((*InvalidDiskFormatFault)(nil)).Elem() } type InvalidDrsBehaviorForFtVm struct { InvalidArgument Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["InvalidDrsBehaviorForFtVm"] = reflect.TypeOf((*InvalidDrsBehaviorForFtVm)(nil)).Elem() } type InvalidDrsBehaviorForFtVmFault InvalidDrsBehaviorForFtVm func init() { t["InvalidDrsBehaviorForFtVmFault"] = reflect.TypeOf((*InvalidDrsBehaviorForFtVmFault)(nil)).Elem() } type InvalidEditionEvent struct { LicenseEvent Feature string `xml:"feature"` } func init() { t["InvalidEditionEvent"] = reflect.TypeOf((*InvalidEditionEvent)(nil)).Elem() } type InvalidEditionLicense struct { NotEnoughLicenses Feature string `xml:"feature"` } func init() { t["InvalidEditionLicense"] = reflect.TypeOf((*InvalidEditionLicense)(nil)).Elem() } type InvalidEditionLicenseFault InvalidEditionLicense func init() { t["InvalidEditionLicenseFault"] = reflect.TypeOf((*InvalidEditionLicenseFault)(nil)).Elem() } type InvalidEvent struct { VimFault } func init() { t["InvalidEvent"] = reflect.TypeOf((*InvalidEvent)(nil)).Elem() } type InvalidEventFault InvalidEvent func init() { t["InvalidEventFault"] = reflect.TypeOf((*InvalidEventFault)(nil)).Elem() } type InvalidFolder struct { VimFault Target ManagedObjectReference `xml:"target"` } func init() { t["InvalidFolder"] = reflect.TypeOf((*InvalidFolder)(nil)).Elem() } type InvalidFolderFault BaseInvalidFolder func init() { t["InvalidFolderFault"] = reflect.TypeOf((*InvalidFolderFault)(nil)).Elem() } type InvalidFormat struct { VmConfigFault } func init() { t["InvalidFormat"] = reflect.TypeOf((*InvalidFormat)(nil)).Elem() } type InvalidFormatFault BaseInvalidFormat func init() { t["InvalidFormatFault"] = reflect.TypeOf((*InvalidFormatFault)(nil)).Elem() } type InvalidGuestLogin struct { GuestOperationsFault } func init() { t["InvalidGuestLogin"] = reflect.TypeOf((*InvalidGuestLogin)(nil)).Elem() } type InvalidGuestLoginFault InvalidGuestLogin func init() { t["InvalidGuestLoginFault"] = reflect.TypeOf((*InvalidGuestLoginFault)(nil)).Elem() } type InvalidHostConnectionState struct { InvalidHostState } func init() { t["InvalidHostConnectionState"] = reflect.TypeOf((*InvalidHostConnectionState)(nil)).Elem() } type InvalidHostConnectionStateFault InvalidHostConnectionState func init() { t["InvalidHostConnectionStateFault"] = reflect.TypeOf((*InvalidHostConnectionStateFault)(nil)).Elem() } type InvalidHostName struct { HostConfigFault } func init() { t["InvalidHostName"] = reflect.TypeOf((*InvalidHostName)(nil)).Elem() } type InvalidHostNameFault InvalidHostName func init() { t["InvalidHostNameFault"] = reflect.TypeOf((*InvalidHostNameFault)(nil)).Elem() } type InvalidHostState struct { InvalidState Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["InvalidHostState"] = reflect.TypeOf((*InvalidHostState)(nil)).Elem() } type InvalidHostStateFault BaseInvalidHostState func init() { t["InvalidHostStateFault"] = reflect.TypeOf((*InvalidHostStateFault)(nil)).Elem() } type InvalidIndexArgument struct { InvalidArgument Key string `xml:"key"` } func init() { t["InvalidIndexArgument"] = reflect.TypeOf((*InvalidIndexArgument)(nil)).Elem() } type InvalidIndexArgumentFault InvalidIndexArgument func init() { t["InvalidIndexArgumentFault"] = reflect.TypeOf((*InvalidIndexArgumentFault)(nil)).Elem() } type InvalidIpfixConfig struct { DvsFault Property string `xml:"property,omitempty"` } func init() { t["InvalidIpfixConfig"] = reflect.TypeOf((*InvalidIpfixConfig)(nil)).Elem() } type InvalidIpfixConfigFault InvalidIpfixConfig func init() { t["InvalidIpfixConfigFault"] = reflect.TypeOf((*InvalidIpfixConfigFault)(nil)).Elem() } type InvalidIpmiLoginInfo struct { VimFault } func init() { t["InvalidIpmiLoginInfo"] = reflect.TypeOf((*InvalidIpmiLoginInfo)(nil)).Elem() } type InvalidIpmiLoginInfoFault InvalidIpmiLoginInfo func init() { t["InvalidIpmiLoginInfoFault"] = reflect.TypeOf((*InvalidIpmiLoginInfoFault)(nil)).Elem() } type InvalidIpmiMacAddress struct { VimFault UserProvidedMacAddress string `xml:"userProvidedMacAddress"` ObservedMacAddress string `xml:"observedMacAddress"` } func init() { t["InvalidIpmiMacAddress"] = reflect.TypeOf((*InvalidIpmiMacAddress)(nil)).Elem() } type InvalidIpmiMacAddressFault InvalidIpmiMacAddress func init() { t["InvalidIpmiMacAddressFault"] = reflect.TypeOf((*InvalidIpmiMacAddressFault)(nil)).Elem() } type InvalidLicense struct { VimFault LicenseContent string `xml:"licenseContent"` } func init() { t["InvalidLicense"] = reflect.TypeOf((*InvalidLicense)(nil)).Elem() } type InvalidLicenseFault InvalidLicense func init() { t["InvalidLicenseFault"] = reflect.TypeOf((*InvalidLicenseFault)(nil)).Elem() } type InvalidLocale struct { VimFault } func init() { t["InvalidLocale"] = reflect.TypeOf((*InvalidLocale)(nil)).Elem() } type InvalidLocaleFault InvalidLocale func init() { t["InvalidLocaleFault"] = reflect.TypeOf((*InvalidLocaleFault)(nil)).Elem() } type InvalidLogin struct { VimFault } func init() { t["InvalidLogin"] = reflect.TypeOf((*InvalidLogin)(nil)).Elem() } type InvalidLoginFault BaseInvalidLogin func init() { t["InvalidLoginFault"] = reflect.TypeOf((*InvalidLoginFault)(nil)).Elem() } type InvalidName struct { VimFault Name string `xml:"name"` Entity *ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["InvalidName"] = reflect.TypeOf((*InvalidName)(nil)).Elem() } type InvalidNameFault InvalidName func init() { t["InvalidNameFault"] = reflect.TypeOf((*InvalidNameFault)(nil)).Elem() } type InvalidNasCredentials struct { NasConfigFault UserName string `xml:"userName"` } func init() { t["InvalidNasCredentials"] = reflect.TypeOf((*InvalidNasCredentials)(nil)).Elem() } type InvalidNasCredentialsFault InvalidNasCredentials func init() { t["InvalidNasCredentialsFault"] = reflect.TypeOf((*InvalidNasCredentialsFault)(nil)).Elem() } type InvalidNetworkInType struct { VAppPropertyFault } func init() { t["InvalidNetworkInType"] = reflect.TypeOf((*InvalidNetworkInType)(nil)).Elem() } type InvalidNetworkInTypeFault InvalidNetworkInType func init() { t["InvalidNetworkInTypeFault"] = reflect.TypeOf((*InvalidNetworkInTypeFault)(nil)).Elem() } type InvalidNetworkResource struct { NasConfigFault RemoteHost string `xml:"remoteHost"` RemotePath string `xml:"remotePath"` } func init() { t["InvalidNetworkResource"] = reflect.TypeOf((*InvalidNetworkResource)(nil)).Elem() } type InvalidNetworkResourceFault InvalidNetworkResource func init() { t["InvalidNetworkResourceFault"] = reflect.TypeOf((*InvalidNetworkResourceFault)(nil)).Elem() } type InvalidOperationOnSecondaryVm struct { VmFaultToleranceIssue InstanceUuid string `xml:"instanceUuid,omitempty"` } func init() { t["InvalidOperationOnSecondaryVm"] = reflect.TypeOf((*InvalidOperationOnSecondaryVm)(nil)).Elem() } type InvalidOperationOnSecondaryVmFault InvalidOperationOnSecondaryVm func init() { t["InvalidOperationOnSecondaryVmFault"] = reflect.TypeOf((*InvalidOperationOnSecondaryVmFault)(nil)).Elem() } type InvalidPowerState struct { InvalidState RequestedState VirtualMachinePowerState `xml:"requestedState,omitempty"` ExistingState VirtualMachinePowerState `xml:"existingState"` } func init() { t["InvalidPowerState"] = reflect.TypeOf((*InvalidPowerState)(nil)).Elem() } type InvalidPowerStateFault InvalidPowerState func init() { t["InvalidPowerStateFault"] = reflect.TypeOf((*InvalidPowerStateFault)(nil)).Elem() } type InvalidPrivilege struct { VimFault Privilege string `xml:"privilege"` } func init() { t["InvalidPrivilege"] = reflect.TypeOf((*InvalidPrivilege)(nil)).Elem() } type InvalidPrivilegeFault InvalidPrivilege func init() { t["InvalidPrivilegeFault"] = reflect.TypeOf((*InvalidPrivilegeFault)(nil)).Elem() } type InvalidProfileReferenceHost struct { RuntimeFault Reason string `xml:"reason,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` Profile *ManagedObjectReference `xml:"profile,omitempty"` ProfileName string `xml:"profileName,omitempty"` } func init() { t["InvalidProfileReferenceHost"] = reflect.TypeOf((*InvalidProfileReferenceHost)(nil)).Elem() } type InvalidProfileReferenceHostFault InvalidProfileReferenceHost func init() { t["InvalidProfileReferenceHostFault"] = reflect.TypeOf((*InvalidProfileReferenceHostFault)(nil)).Elem() } type InvalidProperty struct { MethodFault Name string `xml:"name"` } func init() { t["InvalidProperty"] = reflect.TypeOf((*InvalidProperty)(nil)).Elem() } type InvalidPropertyFault InvalidProperty func init() { t["InvalidPropertyFault"] = reflect.TypeOf((*InvalidPropertyFault)(nil)).Elem() } type InvalidPropertyType struct { VAppPropertyFault } func init() { t["InvalidPropertyType"] = reflect.TypeOf((*InvalidPropertyType)(nil)).Elem() } type InvalidPropertyTypeFault InvalidPropertyType func init() { t["InvalidPropertyTypeFault"] = reflect.TypeOf((*InvalidPropertyTypeFault)(nil)).Elem() } type InvalidPropertyValue struct { VAppPropertyFault } func init() { t["InvalidPropertyValue"] = reflect.TypeOf((*InvalidPropertyValue)(nil)).Elem() } type InvalidPropertyValueFault BaseInvalidPropertyValue func init() { t["InvalidPropertyValueFault"] = reflect.TypeOf((*InvalidPropertyValueFault)(nil)).Elem() } type InvalidRequest struct { RuntimeFault } func init() { t["InvalidRequest"] = reflect.TypeOf((*InvalidRequest)(nil)).Elem() } type InvalidRequestFault BaseInvalidRequest func init() { t["InvalidRequestFault"] = reflect.TypeOf((*InvalidRequestFault)(nil)).Elem() } type InvalidResourcePoolStructureFault struct { InsufficientResourcesFault } func init() { t["InvalidResourcePoolStructureFault"] = reflect.TypeOf((*InvalidResourcePoolStructureFault)(nil)).Elem() } type InvalidResourcePoolStructureFaultFault InvalidResourcePoolStructureFault func init() { t["InvalidResourcePoolStructureFaultFault"] = reflect.TypeOf((*InvalidResourcePoolStructureFaultFault)(nil)).Elem() } type InvalidSnapshotFormat struct { InvalidFormat } func init() { t["InvalidSnapshotFormat"] = reflect.TypeOf((*InvalidSnapshotFormat)(nil)).Elem() } type InvalidSnapshotFormatFault InvalidSnapshotFormat func init() { t["InvalidSnapshotFormatFault"] = reflect.TypeOf((*InvalidSnapshotFormatFault)(nil)).Elem() } type InvalidState struct { VimFault } func init() { t["InvalidState"] = reflect.TypeOf((*InvalidState)(nil)).Elem() } type InvalidStateFault BaseInvalidState func init() { t["InvalidStateFault"] = reflect.TypeOf((*InvalidStateFault)(nil)).Elem() } type InvalidType struct { InvalidRequest Argument string `xml:"argument,omitempty"` } func init() { t["InvalidType"] = reflect.TypeOf((*InvalidType)(nil)).Elem() } type InvalidTypeFault InvalidType func init() { t["InvalidTypeFault"] = reflect.TypeOf((*InvalidTypeFault)(nil)).Elem() } type InvalidVmConfig struct { VmConfigFault Property string `xml:"property,omitempty"` } func init() { t["InvalidVmConfig"] = reflect.TypeOf((*InvalidVmConfig)(nil)).Elem() } type InvalidVmConfigFault BaseInvalidVmConfig func init() { t["InvalidVmConfigFault"] = reflect.TypeOf((*InvalidVmConfigFault)(nil)).Elem() } type InvalidVmState struct { InvalidState Vm ManagedObjectReference `xml:"vm"` } func init() { t["InvalidVmState"] = reflect.TypeOf((*InvalidVmState)(nil)).Elem() } type InvalidVmStateFault InvalidVmState func init() { t["InvalidVmStateFault"] = reflect.TypeOf((*InvalidVmStateFault)(nil)).Elem() } type InventoryDescription struct { DynamicData NumHosts int32 `xml:"numHosts"` NumVirtualMachines int32 `xml:"numVirtualMachines"` NumResourcePools int32 `xml:"numResourcePools,omitempty"` NumClusters int32 `xml:"numClusters,omitempty"` NumCpuDev int32 `xml:"numCpuDev,omitempty"` NumNetDev int32 `xml:"numNetDev,omitempty"` NumDiskDev int32 `xml:"numDiskDev,omitempty"` NumvCpuDev int32 `xml:"numvCpuDev,omitempty"` NumvNetDev int32 `xml:"numvNetDev,omitempty"` NumvDiskDev int32 `xml:"numvDiskDev,omitempty"` } func init() { t["InventoryDescription"] = reflect.TypeOf((*InventoryDescription)(nil)).Elem() } type InventoryHasStandardAloneHosts struct { NotEnoughLicenses Hosts []string `xml:"hosts"` } func init() { t["InventoryHasStandardAloneHosts"] = reflect.TypeOf((*InventoryHasStandardAloneHosts)(nil)).Elem() } type InventoryHasStandardAloneHostsFault InventoryHasStandardAloneHosts func init() { t["InventoryHasStandardAloneHostsFault"] = reflect.TypeOf((*InventoryHasStandardAloneHostsFault)(nil)).Elem() } type IoFilterHostIssue struct { DynamicData Host ManagedObjectReference `xml:"host"` Issue []LocalizedMethodFault `xml:"issue"` } func init() { t["IoFilterHostIssue"] = reflect.TypeOf((*IoFilterHostIssue)(nil)).Elem() } type IoFilterInfo struct { DynamicData Id string `xml:"id"` Name string `xml:"name"` Vendor string `xml:"vendor"` Version string `xml:"version"` Type string `xml:"type,omitempty"` Summary string `xml:"summary,omitempty"` ReleaseDate string `xml:"releaseDate,omitempty"` } func init() { t["IoFilterInfo"] = reflect.TypeOf((*IoFilterInfo)(nil)).Elem() } type IoFilterQueryIssueResult struct { DynamicData OpType string `xml:"opType"` HostIssue []IoFilterHostIssue `xml:"hostIssue,omitempty"` } func init() { t["IoFilterQueryIssueResult"] = reflect.TypeOf((*IoFilterQueryIssueResult)(nil)).Elem() } type IpAddress struct { NegatableExpression } func init() { t["IpAddress"] = reflect.TypeOf((*IpAddress)(nil)).Elem() } type IpAddressProfile struct { ApplyProfile } func init() { t["IpAddressProfile"] = reflect.TypeOf((*IpAddressProfile)(nil)).Elem() } type IpHostnameGeneratorError struct { CustomizationFault } func init() { t["IpHostnameGeneratorError"] = reflect.TypeOf((*IpHostnameGeneratorError)(nil)).Elem() } type IpHostnameGeneratorErrorFault IpHostnameGeneratorError func init() { t["IpHostnameGeneratorErrorFault"] = reflect.TypeOf((*IpHostnameGeneratorErrorFault)(nil)).Elem() } type IpPool struct { DynamicData Id int32 `xml:"id,omitempty"` Name string `xml:"name,omitempty"` Ipv4Config *IpPoolIpPoolConfigInfo `xml:"ipv4Config,omitempty"` Ipv6Config *IpPoolIpPoolConfigInfo `xml:"ipv6Config,omitempty"` DnsDomain string `xml:"dnsDomain,omitempty"` DnsSearchPath string `xml:"dnsSearchPath,omitempty"` HostPrefix string `xml:"hostPrefix,omitempty"` HttpProxy string `xml:"httpProxy,omitempty"` NetworkAssociation []IpPoolAssociation `xml:"networkAssociation,omitempty"` AvailableIpv4Addresses int32 `xml:"availableIpv4Addresses,omitempty"` AvailableIpv6Addresses int32 `xml:"availableIpv6Addresses,omitempty"` AllocatedIpv4Addresses int32 `xml:"allocatedIpv4Addresses,omitempty"` AllocatedIpv6Addresses int32 `xml:"allocatedIpv6Addresses,omitempty"` } func init() { t["IpPool"] = reflect.TypeOf((*IpPool)(nil)).Elem() } type IpPoolAssociation struct { DynamicData Network *ManagedObjectReference `xml:"network,omitempty"` NetworkName string `xml:"networkName"` } func init() { t["IpPoolAssociation"] = reflect.TypeOf((*IpPoolAssociation)(nil)).Elem() } type IpPoolIpPoolConfigInfo struct { DynamicData SubnetAddress string `xml:"subnetAddress,omitempty"` Netmask string `xml:"netmask,omitempty"` Gateway string `xml:"gateway,omitempty"` Range string `xml:"range,omitempty"` Dns []string `xml:"dns,omitempty"` DhcpServerAvailable *bool `xml:"dhcpServerAvailable"` IpPoolEnabled *bool `xml:"ipPoolEnabled"` } func init() { t["IpPoolIpPoolConfigInfo"] = reflect.TypeOf((*IpPoolIpPoolConfigInfo)(nil)).Elem() } type IpPoolManagerIpAllocation struct { DynamicData IpAddress string `xml:"ipAddress"` AllocationId string `xml:"allocationId"` } func init() { t["IpPoolManagerIpAllocation"] = reflect.TypeOf((*IpPoolManagerIpAllocation)(nil)).Elem() } type IpRange struct { IpAddress AddressPrefix string `xml:"addressPrefix"` PrefixLength int32 `xml:"prefixLength,omitempty"` } func init() { t["IpRange"] = reflect.TypeOf((*IpRange)(nil)).Elem() } type IpRouteProfile struct { ApplyProfile StaticRoute []StaticRouteProfile `xml:"staticRoute,omitempty"` } func init() { t["IpRouteProfile"] = reflect.TypeOf((*IpRouteProfile)(nil)).Elem() } type IsSharedGraphicsActive IsSharedGraphicsActiveRequestType func init() { t["IsSharedGraphicsActive"] = reflect.TypeOf((*IsSharedGraphicsActive)(nil)).Elem() } type IsSharedGraphicsActiveRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["IsSharedGraphicsActiveRequestType"] = reflect.TypeOf((*IsSharedGraphicsActiveRequestType)(nil)).Elem() } type IsSharedGraphicsActiveResponse struct { Returnval bool `xml:"returnval"` } type IscsiDependencyEntity struct { DynamicData PnicDevice string `xml:"pnicDevice"` VnicDevice string `xml:"vnicDevice"` VmhbaName string `xml:"vmhbaName"` } func init() { t["IscsiDependencyEntity"] = reflect.TypeOf((*IscsiDependencyEntity)(nil)).Elem() } type IscsiFault struct { VimFault } func init() { t["IscsiFault"] = reflect.TypeOf((*IscsiFault)(nil)).Elem() } type IscsiFaultFault BaseIscsiFault func init() { t["IscsiFaultFault"] = reflect.TypeOf((*IscsiFaultFault)(nil)).Elem() } type IscsiFaultInvalidVnic struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultInvalidVnic"] = reflect.TypeOf((*IscsiFaultInvalidVnic)(nil)).Elem() } type IscsiFaultInvalidVnicFault IscsiFaultInvalidVnic func init() { t["IscsiFaultInvalidVnicFault"] = reflect.TypeOf((*IscsiFaultInvalidVnicFault)(nil)).Elem() } type IscsiFaultPnicInUse struct { IscsiFault PnicDevice string `xml:"pnicDevice"` } func init() { t["IscsiFaultPnicInUse"] = reflect.TypeOf((*IscsiFaultPnicInUse)(nil)).Elem() } type IscsiFaultPnicInUseFault IscsiFaultPnicInUse func init() { t["IscsiFaultPnicInUseFault"] = reflect.TypeOf((*IscsiFaultPnicInUseFault)(nil)).Elem() } type IscsiFaultVnicAlreadyBound struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicAlreadyBound"] = reflect.TypeOf((*IscsiFaultVnicAlreadyBound)(nil)).Elem() } type IscsiFaultVnicAlreadyBoundFault IscsiFaultVnicAlreadyBound func init() { t["IscsiFaultVnicAlreadyBoundFault"] = reflect.TypeOf((*IscsiFaultVnicAlreadyBoundFault)(nil)).Elem() } type IscsiFaultVnicHasActivePaths struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicHasActivePaths"] = reflect.TypeOf((*IscsiFaultVnicHasActivePaths)(nil)).Elem() } type IscsiFaultVnicHasActivePathsFault IscsiFaultVnicHasActivePaths func init() { t["IscsiFaultVnicHasActivePathsFault"] = reflect.TypeOf((*IscsiFaultVnicHasActivePathsFault)(nil)).Elem() } type IscsiFaultVnicHasMultipleUplinks struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicHasMultipleUplinks"] = reflect.TypeOf((*IscsiFaultVnicHasMultipleUplinks)(nil)).Elem() } type IscsiFaultVnicHasMultipleUplinksFault IscsiFaultVnicHasMultipleUplinks func init() { t["IscsiFaultVnicHasMultipleUplinksFault"] = reflect.TypeOf((*IscsiFaultVnicHasMultipleUplinksFault)(nil)).Elem() } type IscsiFaultVnicHasNoUplinks struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicHasNoUplinks"] = reflect.TypeOf((*IscsiFaultVnicHasNoUplinks)(nil)).Elem() } type IscsiFaultVnicHasNoUplinksFault IscsiFaultVnicHasNoUplinks func init() { t["IscsiFaultVnicHasNoUplinksFault"] = reflect.TypeOf((*IscsiFaultVnicHasNoUplinksFault)(nil)).Elem() } type IscsiFaultVnicHasWrongUplink struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicHasWrongUplink"] = reflect.TypeOf((*IscsiFaultVnicHasWrongUplink)(nil)).Elem() } type IscsiFaultVnicHasWrongUplinkFault IscsiFaultVnicHasWrongUplink func init() { t["IscsiFaultVnicHasWrongUplinkFault"] = reflect.TypeOf((*IscsiFaultVnicHasWrongUplinkFault)(nil)).Elem() } type IscsiFaultVnicInUse struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicInUse"] = reflect.TypeOf((*IscsiFaultVnicInUse)(nil)).Elem() } type IscsiFaultVnicInUseFault IscsiFaultVnicInUse func init() { t["IscsiFaultVnicInUseFault"] = reflect.TypeOf((*IscsiFaultVnicInUseFault)(nil)).Elem() } type IscsiFaultVnicIsLastPath struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicIsLastPath"] = reflect.TypeOf((*IscsiFaultVnicIsLastPath)(nil)).Elem() } type IscsiFaultVnicIsLastPathFault IscsiFaultVnicIsLastPath func init() { t["IscsiFaultVnicIsLastPathFault"] = reflect.TypeOf((*IscsiFaultVnicIsLastPathFault)(nil)).Elem() } type IscsiFaultVnicNotBound struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicNotBound"] = reflect.TypeOf((*IscsiFaultVnicNotBound)(nil)).Elem() } type IscsiFaultVnicNotBoundFault IscsiFaultVnicNotBound func init() { t["IscsiFaultVnicNotBoundFault"] = reflect.TypeOf((*IscsiFaultVnicNotBoundFault)(nil)).Elem() } type IscsiFaultVnicNotFound struct { IscsiFault VnicDevice string `xml:"vnicDevice"` } func init() { t["IscsiFaultVnicNotFound"] = reflect.TypeOf((*IscsiFaultVnicNotFound)(nil)).Elem() } type IscsiFaultVnicNotFoundFault IscsiFaultVnicNotFound func init() { t["IscsiFaultVnicNotFoundFault"] = reflect.TypeOf((*IscsiFaultVnicNotFoundFault)(nil)).Elem() } type IscsiMigrationDependency struct { DynamicData MigrationAllowed bool `xml:"migrationAllowed"` DisallowReason *IscsiStatus `xml:"disallowReason,omitempty"` Dependency []IscsiDependencyEntity `xml:"dependency,omitempty"` } func init() { t["IscsiMigrationDependency"] = reflect.TypeOf((*IscsiMigrationDependency)(nil)).Elem() } type IscsiPortInfo struct { DynamicData VnicDevice string `xml:"vnicDevice,omitempty"` Vnic *HostVirtualNic `xml:"vnic,omitempty"` PnicDevice string `xml:"pnicDevice,omitempty"` Pnic *PhysicalNic `xml:"pnic,omitempty"` SwitchName string `xml:"switchName,omitempty"` SwitchUuid string `xml:"switchUuid,omitempty"` PortgroupName string `xml:"portgroupName,omitempty"` PortgroupKey string `xml:"portgroupKey,omitempty"` PortKey string `xml:"portKey,omitempty"` OpaqueNetworkId string `xml:"opaqueNetworkId,omitempty"` OpaqueNetworkType string `xml:"opaqueNetworkType,omitempty"` OpaqueNetworkName string `xml:"opaqueNetworkName,omitempty"` ExternalId string `xml:"externalId,omitempty"` ComplianceStatus *IscsiStatus `xml:"complianceStatus,omitempty"` PathStatus string `xml:"pathStatus,omitempty"` } func init() { t["IscsiPortInfo"] = reflect.TypeOf((*IscsiPortInfo)(nil)).Elem() } type IscsiStatus struct { DynamicData Reason []LocalizedMethodFault `xml:"reason,omitempty"` } func init() { t["IscsiStatus"] = reflect.TypeOf((*IscsiStatus)(nil)).Elem() } type IsoImageFileInfo struct { FileInfo } func init() { t["IsoImageFileInfo"] = reflect.TypeOf((*IsoImageFileInfo)(nil)).Elem() } type IsoImageFileQuery struct { FileQuery } func init() { t["IsoImageFileQuery"] = reflect.TypeOf((*IsoImageFileQuery)(nil)).Elem() } type JoinDomainRequestType struct { This ManagedObjectReference `xml:"_this"` DomainName string `xml:"domainName"` UserName string `xml:"userName"` Password string `xml:"password"` } func init() { t["JoinDomainRequestType"] = reflect.TypeOf((*JoinDomainRequestType)(nil)).Elem() } type JoinDomainWithCAMRequestType struct { This ManagedObjectReference `xml:"_this"` DomainName string `xml:"domainName"` CamServer string `xml:"camServer"` } func init() { t["JoinDomainWithCAMRequestType"] = reflect.TypeOf((*JoinDomainWithCAMRequestType)(nil)).Elem() } type JoinDomainWithCAM_Task JoinDomainWithCAMRequestType func init() { t["JoinDomainWithCAM_Task"] = reflect.TypeOf((*JoinDomainWithCAM_Task)(nil)).Elem() } type JoinDomainWithCAM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type JoinDomain_Task JoinDomainRequestType func init() { t["JoinDomain_Task"] = reflect.TypeOf((*JoinDomain_Task)(nil)).Elem() } type JoinDomain_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type KernelModuleInfo struct { DynamicData Id int32 `xml:"id"` Name string `xml:"name"` Version string `xml:"version"` Filename string `xml:"filename"` OptionString string `xml:"optionString"` Loaded bool `xml:"loaded"` Enabled bool `xml:"enabled"` UseCount int32 `xml:"useCount"` ReadOnlySection KernelModuleSectionInfo `xml:"readOnlySection"` WritableSection KernelModuleSectionInfo `xml:"writableSection"` TextSection KernelModuleSectionInfo `xml:"textSection"` DataSection KernelModuleSectionInfo `xml:"dataSection"` BssSection KernelModuleSectionInfo `xml:"bssSection"` } func init() { t["KernelModuleInfo"] = reflect.TypeOf((*KernelModuleInfo)(nil)).Elem() } type KernelModuleSectionInfo struct { DynamicData Address int64 `xml:"address"` Length int32 `xml:"length,omitempty"` } func init() { t["KernelModuleSectionInfo"] = reflect.TypeOf((*KernelModuleSectionInfo)(nil)).Elem() } type KeyAnyValue struct { DynamicData Key string `xml:"key"` Value AnyType `xml:"value,typeattr"` } func init() { t["KeyAnyValue"] = reflect.TypeOf((*KeyAnyValue)(nil)).Elem() } type KeyProviderId struct { DynamicData Id string `xml:"id"` } func init() { t["KeyProviderId"] = reflect.TypeOf((*KeyProviderId)(nil)).Elem() } type KeyValue struct { DynamicData Key string `xml:"key"` Value string `xml:"value"` } func init() { t["KeyValue"] = reflect.TypeOf((*KeyValue)(nil)).Elem() } type KmipClusterInfo struct { DynamicData ClusterId KeyProviderId `xml:"clusterId"` Servers []KmipServerInfo `xml:"servers,omitempty"` UseAsDefault bool `xml:"useAsDefault"` } func init() { t["KmipClusterInfo"] = reflect.TypeOf((*KmipClusterInfo)(nil)).Elem() } type KmipServerInfo struct { DynamicData Name string `xml:"name"` Address string `xml:"address"` Port int32 `xml:"port"` ProxyAddress string `xml:"proxyAddress,omitempty"` ProxyPort int32 `xml:"proxyPort,omitempty"` Reconnect int32 `xml:"reconnect,omitempty"` Protocol string `xml:"protocol,omitempty"` Nbio int32 `xml:"nbio,omitempty"` Timeout int32 `xml:"timeout,omitempty"` UserName string `xml:"userName,omitempty"` } func init() { t["KmipServerInfo"] = reflect.TypeOf((*KmipServerInfo)(nil)).Elem() } type KmipServerSpec struct { DynamicData ClusterId KeyProviderId `xml:"clusterId"` Info KmipServerInfo `xml:"info"` Password string `xml:"password,omitempty"` } func init() { t["KmipServerSpec"] = reflect.TypeOf((*KmipServerSpec)(nil)).Elem() } type KmipServerStatus struct { DynamicData ClusterId KeyProviderId `xml:"clusterId"` Name string `xml:"name"` Status ManagedEntityStatus `xml:"status"` Description string `xml:"description"` } func init() { t["KmipServerStatus"] = reflect.TypeOf((*KmipServerStatus)(nil)).Elem() } type LargeRDMConversionNotSupported struct { MigrationFault Device string `xml:"device"` } func init() { t["LargeRDMConversionNotSupported"] = reflect.TypeOf((*LargeRDMConversionNotSupported)(nil)).Elem() } type LargeRDMConversionNotSupportedFault LargeRDMConversionNotSupported func init() { t["LargeRDMConversionNotSupportedFault"] = reflect.TypeOf((*LargeRDMConversionNotSupportedFault)(nil)).Elem() } type LargeRDMNotSupportedOnDatastore struct { VmConfigFault Device string `xml:"device"` Datastore ManagedObjectReference `xml:"datastore"` DatastoreName string `xml:"datastoreName"` } func init() { t["LargeRDMNotSupportedOnDatastore"] = reflect.TypeOf((*LargeRDMNotSupportedOnDatastore)(nil)).Elem() } type LargeRDMNotSupportedOnDatastoreFault LargeRDMNotSupportedOnDatastore func init() { t["LargeRDMNotSupportedOnDatastoreFault"] = reflect.TypeOf((*LargeRDMNotSupportedOnDatastoreFault)(nil)).Elem() } type LatencySensitivity struct { DynamicData Level LatencySensitivitySensitivityLevel `xml:"level"` Sensitivity int32 `xml:"sensitivity,omitempty"` } func init() { t["LatencySensitivity"] = reflect.TypeOf((*LatencySensitivity)(nil)).Elem() } type LeaveCurrentDomainRequestType struct { This ManagedObjectReference `xml:"_this"` Force bool `xml:"force"` } func init() { t["LeaveCurrentDomainRequestType"] = reflect.TypeOf((*LeaveCurrentDomainRequestType)(nil)).Elem() } type LeaveCurrentDomain_Task LeaveCurrentDomainRequestType func init() { t["LeaveCurrentDomain_Task"] = reflect.TypeOf((*LeaveCurrentDomain_Task)(nil)).Elem() } type LeaveCurrentDomain_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type LegacyNetworkInterfaceInUse struct { CannotAccessNetwork } func init() { t["LegacyNetworkInterfaceInUse"] = reflect.TypeOf((*LegacyNetworkInterfaceInUse)(nil)).Elem() } type LegacyNetworkInterfaceInUseFault LegacyNetworkInterfaceInUse func init() { t["LegacyNetworkInterfaceInUseFault"] = reflect.TypeOf((*LegacyNetworkInterfaceInUseFault)(nil)).Elem() } type LicenseAssignmentFailed struct { RuntimeFault Reason string `xml:"reason,omitempty"` } func init() { t["LicenseAssignmentFailed"] = reflect.TypeOf((*LicenseAssignmentFailed)(nil)).Elem() } type LicenseAssignmentFailedFault LicenseAssignmentFailed func init() { t["LicenseAssignmentFailedFault"] = reflect.TypeOf((*LicenseAssignmentFailedFault)(nil)).Elem() } type LicenseAssignmentManagerLicenseAssignment struct { DynamicData EntityId string `xml:"entityId"` Scope string `xml:"scope,omitempty"` EntityDisplayName string `xml:"entityDisplayName,omitempty"` AssignedLicense LicenseManagerLicenseInfo `xml:"assignedLicense"` Properties []KeyAnyValue `xml:"properties,omitempty"` } func init() { t["LicenseAssignmentManagerLicenseAssignment"] = reflect.TypeOf((*LicenseAssignmentManagerLicenseAssignment)(nil)).Elem() } type LicenseAvailabilityInfo struct { DynamicData Feature LicenseFeatureInfo `xml:"feature"` Total int32 `xml:"total"` Available int32 `xml:"available"` } func init() { t["LicenseAvailabilityInfo"] = reflect.TypeOf((*LicenseAvailabilityInfo)(nil)).Elem() } type LicenseDiagnostics struct { DynamicData SourceLastChanged time.Time `xml:"sourceLastChanged"` SourceLost string `xml:"sourceLost"` SourceLatency float32 `xml:"sourceLatency"` LicenseRequests string `xml:"licenseRequests"` LicenseRequestFailures string `xml:"licenseRequestFailures"` LicenseFeatureUnknowns string `xml:"licenseFeatureUnknowns"` OpState LicenseManagerState `xml:"opState"` LastStatusUpdate time.Time `xml:"lastStatusUpdate"` OpFailureMessage string `xml:"opFailureMessage"` } func init() { t["LicenseDiagnostics"] = reflect.TypeOf((*LicenseDiagnostics)(nil)).Elem() } type LicenseDowngradeDisallowed struct { NotEnoughLicenses Edition string `xml:"edition"` EntityId string `xml:"entityId"` Features []KeyAnyValue `xml:"features"` } func init() { t["LicenseDowngradeDisallowed"] = reflect.TypeOf((*LicenseDowngradeDisallowed)(nil)).Elem() } type LicenseDowngradeDisallowedFault LicenseDowngradeDisallowed func init() { t["LicenseDowngradeDisallowedFault"] = reflect.TypeOf((*LicenseDowngradeDisallowedFault)(nil)).Elem() } type LicenseEntityNotFound struct { VimFault EntityId string `xml:"entityId"` } func init() { t["LicenseEntityNotFound"] = reflect.TypeOf((*LicenseEntityNotFound)(nil)).Elem() } type LicenseEntityNotFoundFault LicenseEntityNotFound func init() { t["LicenseEntityNotFoundFault"] = reflect.TypeOf((*LicenseEntityNotFoundFault)(nil)).Elem() } type LicenseEvent struct { Event } func init() { t["LicenseEvent"] = reflect.TypeOf((*LicenseEvent)(nil)).Elem() } type LicenseExpired struct { NotEnoughLicenses LicenseKey string `xml:"licenseKey"` } func init() { t["LicenseExpired"] = reflect.TypeOf((*LicenseExpired)(nil)).Elem() } type LicenseExpiredEvent struct { Event Feature LicenseFeatureInfo `xml:"feature"` } func init() { t["LicenseExpiredEvent"] = reflect.TypeOf((*LicenseExpiredEvent)(nil)).Elem() } type LicenseExpiredFault LicenseExpired func init() { t["LicenseExpiredFault"] = reflect.TypeOf((*LicenseExpiredFault)(nil)).Elem() } type LicenseFeatureInfo struct { DynamicData Key string `xml:"key"` FeatureName string `xml:"featureName"` FeatureDescription string `xml:"featureDescription,omitempty"` State LicenseFeatureInfoState `xml:"state,omitempty"` CostUnit string `xml:"costUnit"` SourceRestriction string `xml:"sourceRestriction,omitempty"` DependentKey []string `xml:"dependentKey,omitempty"` Edition *bool `xml:"edition"` ExpiresOn *time.Time `xml:"expiresOn"` } func init() { t["LicenseFeatureInfo"] = reflect.TypeOf((*LicenseFeatureInfo)(nil)).Elem() } type LicenseKeyEntityMismatch struct { NotEnoughLicenses } func init() { t["LicenseKeyEntityMismatch"] = reflect.TypeOf((*LicenseKeyEntityMismatch)(nil)).Elem() } type LicenseKeyEntityMismatchFault LicenseKeyEntityMismatch func init() { t["LicenseKeyEntityMismatchFault"] = reflect.TypeOf((*LicenseKeyEntityMismatchFault)(nil)).Elem() } type LicenseManagerEvaluationInfo struct { DynamicData Properties []KeyAnyValue `xml:"properties"` } func init() { t["LicenseManagerEvaluationInfo"] = reflect.TypeOf((*LicenseManagerEvaluationInfo)(nil)).Elem() } type LicenseManagerLicenseInfo struct { DynamicData LicenseKey string `xml:"licenseKey"` EditionKey string `xml:"editionKey"` Name string `xml:"name"` Total int32 `xml:"total"` Used int32 `xml:"used,omitempty"` CostUnit string `xml:"costUnit"` Properties []KeyAnyValue `xml:"properties,omitempty"` Labels []KeyValue `xml:"labels,omitempty"` } func init() { t["LicenseManagerLicenseInfo"] = reflect.TypeOf((*LicenseManagerLicenseInfo)(nil)).Elem() } type LicenseNonComplianceEvent struct { LicenseEvent Url string `xml:"url"` } func init() { t["LicenseNonComplianceEvent"] = reflect.TypeOf((*LicenseNonComplianceEvent)(nil)).Elem() } type LicenseReservationInfo struct { DynamicData Key string `xml:"key"` State LicenseReservationInfoState `xml:"state"` Required int32 `xml:"required"` } func init() { t["LicenseReservationInfo"] = reflect.TypeOf((*LicenseReservationInfo)(nil)).Elem() } type LicenseRestricted struct { NotEnoughLicenses } func init() { t["LicenseRestricted"] = reflect.TypeOf((*LicenseRestricted)(nil)).Elem() } type LicenseRestrictedEvent struct { LicenseEvent } func init() { t["LicenseRestrictedEvent"] = reflect.TypeOf((*LicenseRestrictedEvent)(nil)).Elem() } type LicenseRestrictedFault LicenseRestricted func init() { t["LicenseRestrictedFault"] = reflect.TypeOf((*LicenseRestrictedFault)(nil)).Elem() } type LicenseServerAvailableEvent struct { LicenseEvent LicenseServer string `xml:"licenseServer"` } func init() { t["LicenseServerAvailableEvent"] = reflect.TypeOf((*LicenseServerAvailableEvent)(nil)).Elem() } type LicenseServerSource struct { LicenseSource LicenseServer string `xml:"licenseServer"` } func init() { t["LicenseServerSource"] = reflect.TypeOf((*LicenseServerSource)(nil)).Elem() } type LicenseServerUnavailable struct { VimFault LicenseServer string `xml:"licenseServer"` } func init() { t["LicenseServerUnavailable"] = reflect.TypeOf((*LicenseServerUnavailable)(nil)).Elem() } type LicenseServerUnavailableEvent struct { LicenseEvent LicenseServer string `xml:"licenseServer"` } func init() { t["LicenseServerUnavailableEvent"] = reflect.TypeOf((*LicenseServerUnavailableEvent)(nil)).Elem() } type LicenseServerUnavailableFault LicenseServerUnavailable func init() { t["LicenseServerUnavailableFault"] = reflect.TypeOf((*LicenseServerUnavailableFault)(nil)).Elem() } type LicenseSource struct { DynamicData } func init() { t["LicenseSource"] = reflect.TypeOf((*LicenseSource)(nil)).Elem() } type LicenseSourceUnavailable struct { NotEnoughLicenses LicenseSource BaseLicenseSource `xml:"licenseSource,typeattr"` } func init() { t["LicenseSourceUnavailable"] = reflect.TypeOf((*LicenseSourceUnavailable)(nil)).Elem() } type LicenseSourceUnavailableFault LicenseSourceUnavailable func init() { t["LicenseSourceUnavailableFault"] = reflect.TypeOf((*LicenseSourceUnavailableFault)(nil)).Elem() } type LicenseUsageInfo struct { DynamicData Source BaseLicenseSource `xml:"source,typeattr"` SourceAvailable bool `xml:"sourceAvailable"` ReservationInfo []LicenseReservationInfo `xml:"reservationInfo,omitempty"` FeatureInfo []LicenseFeatureInfo `xml:"featureInfo,omitempty"` } func init() { t["LicenseUsageInfo"] = reflect.TypeOf((*LicenseUsageInfo)(nil)).Elem() } type LimitExceeded struct { VimFault Property string `xml:"property,omitempty"` Limit int32 `xml:"limit,omitempty"` } func init() { t["LimitExceeded"] = reflect.TypeOf((*LimitExceeded)(nil)).Elem() } type LimitExceededFault LimitExceeded func init() { t["LimitExceededFault"] = reflect.TypeOf((*LimitExceededFault)(nil)).Elem() } type LinkDiscoveryProtocolConfig struct { DynamicData Protocol string `xml:"protocol"` Operation string `xml:"operation"` } func init() { t["LinkDiscoveryProtocolConfig"] = reflect.TypeOf((*LinkDiscoveryProtocolConfig)(nil)).Elem() } type LinkLayerDiscoveryProtocolInfo struct { DynamicData ChassisId string `xml:"chassisId"` PortId string `xml:"portId"` TimeToLive int32 `xml:"timeToLive"` Parameter []KeyAnyValue `xml:"parameter,omitempty"` } func init() { t["LinkLayerDiscoveryProtocolInfo"] = reflect.TypeOf((*LinkLayerDiscoveryProtocolInfo)(nil)).Elem() } type LinkProfile struct { ApplyProfile } func init() { t["LinkProfile"] = reflect.TypeOf((*LinkProfile)(nil)).Elem() } type LinuxVolumeNotClean struct { CustomizationFault } func init() { t["LinuxVolumeNotClean"] = reflect.TypeOf((*LinuxVolumeNotClean)(nil)).Elem() } type LinuxVolumeNotCleanFault LinuxVolumeNotClean func init() { t["LinuxVolumeNotCleanFault"] = reflect.TypeOf((*LinuxVolumeNotCleanFault)(nil)).Elem() } type ListCACertificateRevocationLists ListCACertificateRevocationListsRequestType func init() { t["ListCACertificateRevocationLists"] = reflect.TypeOf((*ListCACertificateRevocationLists)(nil)).Elem() } type ListCACertificateRevocationListsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ListCACertificateRevocationListsRequestType"] = reflect.TypeOf((*ListCACertificateRevocationListsRequestType)(nil)).Elem() } type ListCACertificateRevocationListsResponse struct { Returnval []string `xml:"returnval,omitempty"` } type ListCACertificates ListCACertificatesRequestType func init() { t["ListCACertificates"] = reflect.TypeOf((*ListCACertificates)(nil)).Elem() } type ListCACertificatesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ListCACertificatesRequestType"] = reflect.TypeOf((*ListCACertificatesRequestType)(nil)).Elem() } type ListCACertificatesResponse struct { Returnval []string `xml:"returnval,omitempty"` } type ListFilesInGuest ListFilesInGuestRequestType func init() { t["ListFilesInGuest"] = reflect.TypeOf((*ListFilesInGuest)(nil)).Elem() } type ListFilesInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` FilePath string `xml:"filePath"` Index int32 `xml:"index,omitempty"` MaxResults int32 `xml:"maxResults,omitempty"` MatchPattern string `xml:"matchPattern,omitempty"` } func init() { t["ListFilesInGuestRequestType"] = reflect.TypeOf((*ListFilesInGuestRequestType)(nil)).Elem() } type ListFilesInGuestResponse struct { Returnval GuestListFileInfo `xml:"returnval"` } type ListGuestAliases ListGuestAliasesRequestType func init() { t["ListGuestAliases"] = reflect.TypeOf((*ListGuestAliases)(nil)).Elem() } type ListGuestAliasesRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Username string `xml:"username"` } func init() { t["ListGuestAliasesRequestType"] = reflect.TypeOf((*ListGuestAliasesRequestType)(nil)).Elem() } type ListGuestAliasesResponse struct { Returnval []GuestAliases `xml:"returnval,omitempty"` } type ListGuestMappedAliases ListGuestMappedAliasesRequestType func init() { t["ListGuestMappedAliases"] = reflect.TypeOf((*ListGuestMappedAliases)(nil)).Elem() } type ListGuestMappedAliasesRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` } func init() { t["ListGuestMappedAliasesRequestType"] = reflect.TypeOf((*ListGuestMappedAliasesRequestType)(nil)).Elem() } type ListGuestMappedAliasesResponse struct { Returnval []GuestMappedAliases `xml:"returnval,omitempty"` } type ListKeys ListKeysRequestType func init() { t["ListKeys"] = reflect.TypeOf((*ListKeys)(nil)).Elem() } type ListKeysRequestType struct { This ManagedObjectReference `xml:"_this"` Limit int32 `xml:"limit,omitempty"` } func init() { t["ListKeysRequestType"] = reflect.TypeOf((*ListKeysRequestType)(nil)).Elem() } type ListKeysResponse struct { Returnval []CryptoKeyId `xml:"returnval,omitempty"` } type ListKmipServers ListKmipServersRequestType func init() { t["ListKmipServers"] = reflect.TypeOf((*ListKmipServers)(nil)).Elem() } type ListKmipServersRequestType struct { This ManagedObjectReference `xml:"_this"` Limit int32 `xml:"limit,omitempty"` } func init() { t["ListKmipServersRequestType"] = reflect.TypeOf((*ListKmipServersRequestType)(nil)).Elem() } type ListKmipServersResponse struct { Returnval []KmipClusterInfo `xml:"returnval,omitempty"` } type ListProcessesInGuest ListProcessesInGuestRequestType func init() { t["ListProcessesInGuest"] = reflect.TypeOf((*ListProcessesInGuest)(nil)).Elem() } type ListProcessesInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Pids []int64 `xml:"pids,omitempty"` } func init() { t["ListProcessesInGuestRequestType"] = reflect.TypeOf((*ListProcessesInGuestRequestType)(nil)).Elem() } type ListProcessesInGuestResponse struct { Returnval []GuestProcessInfo `xml:"returnval,omitempty"` } type ListRegistryKeysInGuest ListRegistryKeysInGuestRequestType func init() { t["ListRegistryKeysInGuest"] = reflect.TypeOf((*ListRegistryKeysInGuest)(nil)).Elem() } type ListRegistryKeysInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` KeyName GuestRegKeyNameSpec `xml:"keyName"` Recursive bool `xml:"recursive"` MatchPattern string `xml:"matchPattern,omitempty"` } func init() { t["ListRegistryKeysInGuestRequestType"] = reflect.TypeOf((*ListRegistryKeysInGuestRequestType)(nil)).Elem() } type ListRegistryKeysInGuestResponse struct { Returnval []GuestRegKeyRecordSpec `xml:"returnval,omitempty"` } type ListRegistryValuesInGuest ListRegistryValuesInGuestRequestType func init() { t["ListRegistryValuesInGuest"] = reflect.TypeOf((*ListRegistryValuesInGuest)(nil)).Elem() } type ListRegistryValuesInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` KeyName GuestRegKeyNameSpec `xml:"keyName"` ExpandStrings bool `xml:"expandStrings"` MatchPattern string `xml:"matchPattern,omitempty"` } func init() { t["ListRegistryValuesInGuestRequestType"] = reflect.TypeOf((*ListRegistryValuesInGuestRequestType)(nil)).Elem() } type ListRegistryValuesInGuestResponse struct { Returnval []GuestRegValueSpec `xml:"returnval,omitempty"` } type ListSmartCardTrustAnchors ListSmartCardTrustAnchorsRequestType func init() { t["ListSmartCardTrustAnchors"] = reflect.TypeOf((*ListSmartCardTrustAnchors)(nil)).Elem() } type ListSmartCardTrustAnchorsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ListSmartCardTrustAnchorsRequestType"] = reflect.TypeOf((*ListSmartCardTrustAnchorsRequestType)(nil)).Elem() } type ListSmartCardTrustAnchorsResponse struct { Returnval []string `xml:"returnval,omitempty"` } type ListTagsAttachedToVStorageObject ListTagsAttachedToVStorageObjectRequestType func init() { t["ListTagsAttachedToVStorageObject"] = reflect.TypeOf((*ListTagsAttachedToVStorageObject)(nil)).Elem() } type ListTagsAttachedToVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` } func init() { t["ListTagsAttachedToVStorageObjectRequestType"] = reflect.TypeOf((*ListTagsAttachedToVStorageObjectRequestType)(nil)).Elem() } type ListTagsAttachedToVStorageObjectResponse struct { Returnval []VslmTagEntry `xml:"returnval,omitempty"` } type ListVStorageObject ListVStorageObjectRequestType func init() { t["ListVStorageObject"] = reflect.TypeOf((*ListVStorageObject)(nil)).Elem() } type ListVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["ListVStorageObjectRequestType"] = reflect.TypeOf((*ListVStorageObjectRequestType)(nil)).Elem() } type ListVStorageObjectResponse struct { Returnval []ID `xml:"returnval,omitempty"` } type ListVStorageObjectsAttachedToTag ListVStorageObjectsAttachedToTagRequestType func init() { t["ListVStorageObjectsAttachedToTag"] = reflect.TypeOf((*ListVStorageObjectsAttachedToTag)(nil)).Elem() } type ListVStorageObjectsAttachedToTagRequestType struct { This ManagedObjectReference `xml:"_this"` Category string `xml:"category"` Tag string `xml:"tag"` } func init() { t["ListVStorageObjectsAttachedToTagRequestType"] = reflect.TypeOf((*ListVStorageObjectsAttachedToTagRequestType)(nil)).Elem() } type ListVStorageObjectsAttachedToTagResponse struct { Returnval []ID `xml:"returnval,omitempty"` } type LocalDatastoreCreatedEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` DatastoreUrl string `xml:"datastoreUrl,omitempty"` } func init() { t["LocalDatastoreCreatedEvent"] = reflect.TypeOf((*LocalDatastoreCreatedEvent)(nil)).Elem() } type LocalDatastoreInfo struct { DatastoreInfo Path string `xml:"path,omitempty"` } func init() { t["LocalDatastoreInfo"] = reflect.TypeOf((*LocalDatastoreInfo)(nil)).Elem() } type LocalLicenseSource struct { LicenseSource LicenseKeys string `xml:"licenseKeys"` } func init() { t["LocalLicenseSource"] = reflect.TypeOf((*LocalLicenseSource)(nil)).Elem() } type LocalTSMEnabledEvent struct { HostEvent } func init() { t["LocalTSMEnabledEvent"] = reflect.TypeOf((*LocalTSMEnabledEvent)(nil)).Elem() } type LocalizableMessage struct { DynamicData Key string `xml:"key"` Arg []KeyAnyValue `xml:"arg,omitempty"` Message string `xml:"message,omitempty"` } func init() { t["LocalizableMessage"] = reflect.TypeOf((*LocalizableMessage)(nil)).Elem() } type LocalizationManagerMessageCatalog struct { DynamicData ModuleName string `xml:"moduleName"` CatalogName string `xml:"catalogName"` Locale string `xml:"locale"` CatalogUri string `xml:"catalogUri"` LastModified *time.Time `xml:"lastModified"` Md5sum string `xml:"md5sum,omitempty"` Version string `xml:"version,omitempty"` } func init() { t["LocalizationManagerMessageCatalog"] = reflect.TypeOf((*LocalizationManagerMessageCatalog)(nil)).Elem() } type LocalizedMethodFault struct { DynamicData Fault BaseMethodFault `xml:"fault,typeattr"` LocalizedMessage string `xml:"localizedMessage,omitempty"` } func init() { t["LocalizedMethodFault"] = reflect.TypeOf((*LocalizedMethodFault)(nil)).Elem() } type LockerMisconfiguredEvent struct { Event Datastore DatastoreEventArgument `xml:"datastore"` } func init() { t["LockerMisconfiguredEvent"] = reflect.TypeOf((*LockerMisconfiguredEvent)(nil)).Elem() } type LockerReconfiguredEvent struct { Event OldDatastore *DatastoreEventArgument `xml:"oldDatastore,omitempty"` NewDatastore *DatastoreEventArgument `xml:"newDatastore,omitempty"` } func init() { t["LockerReconfiguredEvent"] = reflect.TypeOf((*LockerReconfiguredEvent)(nil)).Elem() } type LogBundlingFailed struct { VimFault } func init() { t["LogBundlingFailed"] = reflect.TypeOf((*LogBundlingFailed)(nil)).Elem() } type LogBundlingFailedFault LogBundlingFailed func init() { t["LogBundlingFailedFault"] = reflect.TypeOf((*LogBundlingFailedFault)(nil)).Elem() } type LogUserEvent LogUserEventRequestType func init() { t["LogUserEvent"] = reflect.TypeOf((*LogUserEvent)(nil)).Elem() } type LogUserEventRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Msg string `xml:"msg"` } func init() { t["LogUserEventRequestType"] = reflect.TypeOf((*LogUserEventRequestType)(nil)).Elem() } type LogUserEventResponse struct { } type Login LoginRequestType func init() { t["Login"] = reflect.TypeOf((*Login)(nil)).Elem() } type LoginBySSPI LoginBySSPIRequestType func init() { t["LoginBySSPI"] = reflect.TypeOf((*LoginBySSPI)(nil)).Elem() } type LoginBySSPIRequestType struct { This ManagedObjectReference `xml:"_this"` Base64Token string `xml:"base64Token"` Locale string `xml:"locale,omitempty"` } func init() { t["LoginBySSPIRequestType"] = reflect.TypeOf((*LoginBySSPIRequestType)(nil)).Elem() } type LoginBySSPIResponse struct { Returnval UserSession `xml:"returnval"` } type LoginByToken LoginByTokenRequestType func init() { t["LoginByToken"] = reflect.TypeOf((*LoginByToken)(nil)).Elem() } type LoginByTokenRequestType struct { This ManagedObjectReference `xml:"_this"` Locale string `xml:"locale,omitempty"` } func init() { t["LoginByTokenRequestType"] = reflect.TypeOf((*LoginByTokenRequestType)(nil)).Elem() } type LoginByTokenResponse struct { Returnval UserSession `xml:"returnval"` } type LoginExtensionByCertificate LoginExtensionByCertificateRequestType func init() { t["LoginExtensionByCertificate"] = reflect.TypeOf((*LoginExtensionByCertificate)(nil)).Elem() } type LoginExtensionByCertificateRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` Locale string `xml:"locale,omitempty"` } func init() { t["LoginExtensionByCertificateRequestType"] = reflect.TypeOf((*LoginExtensionByCertificateRequestType)(nil)).Elem() } type LoginExtensionByCertificateResponse struct { Returnval UserSession `xml:"returnval"` } type LoginExtensionBySubjectName LoginExtensionBySubjectNameRequestType func init() { t["LoginExtensionBySubjectName"] = reflect.TypeOf((*LoginExtensionBySubjectName)(nil)).Elem() } type LoginExtensionBySubjectNameRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` Locale string `xml:"locale,omitempty"` } func init() { t["LoginExtensionBySubjectNameRequestType"] = reflect.TypeOf((*LoginExtensionBySubjectNameRequestType)(nil)).Elem() } type LoginExtensionBySubjectNameResponse struct { Returnval UserSession `xml:"returnval"` } type LoginRequestType struct { This ManagedObjectReference `xml:"_this"` UserName string `xml:"userName"` Password string `xml:"password"` Locale string `xml:"locale,omitempty"` } func init() { t["LoginRequestType"] = reflect.TypeOf((*LoginRequestType)(nil)).Elem() } type LoginResponse struct { Returnval UserSession `xml:"returnval"` } type Logout LogoutRequestType func init() { t["Logout"] = reflect.TypeOf((*Logout)(nil)).Elem() } type LogoutRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["LogoutRequestType"] = reflect.TypeOf((*LogoutRequestType)(nil)).Elem() } type LogoutResponse struct { } type LongOption struct { OptionType Min int64 `xml:"min"` Max int64 `xml:"max"` DefaultValue int64 `xml:"defaultValue"` } func init() { t["LongOption"] = reflect.TypeOf((*LongOption)(nil)).Elem() } type LongPolicy struct { InheritablePolicy Value int64 `xml:"value,omitempty"` } func init() { t["LongPolicy"] = reflect.TypeOf((*LongPolicy)(nil)).Elem() } type LookupDvPortGroup LookupDvPortGroupRequestType func init() { t["LookupDvPortGroup"] = reflect.TypeOf((*LookupDvPortGroup)(nil)).Elem() } type LookupDvPortGroupRequestType struct { This ManagedObjectReference `xml:"_this"` PortgroupKey string `xml:"portgroupKey"` } func init() { t["LookupDvPortGroupRequestType"] = reflect.TypeOf((*LookupDvPortGroupRequestType)(nil)).Elem() } type LookupDvPortGroupResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type LookupVmOverheadMemory LookupVmOverheadMemoryRequestType func init() { t["LookupVmOverheadMemory"] = reflect.TypeOf((*LookupVmOverheadMemory)(nil)).Elem() } type LookupVmOverheadMemoryRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Host ManagedObjectReference `xml:"host"` } func init() { t["LookupVmOverheadMemoryRequestType"] = reflect.TypeOf((*LookupVmOverheadMemoryRequestType)(nil)).Elem() } type LookupVmOverheadMemoryResponse struct { Returnval int64 `xml:"returnval"` } type MacAddress struct { NegatableExpression } func init() { t["MacAddress"] = reflect.TypeOf((*MacAddress)(nil)).Elem() } type MacRange struct { MacAddress Address string `xml:"address"` Mask string `xml:"mask"` } func init() { t["MacRange"] = reflect.TypeOf((*MacRange)(nil)).Elem() } type MaintenanceModeFileMove struct { MigrationFault } func init() { t["MaintenanceModeFileMove"] = reflect.TypeOf((*MaintenanceModeFileMove)(nil)).Elem() } type MaintenanceModeFileMoveFault MaintenanceModeFileMove func init() { t["MaintenanceModeFileMoveFault"] = reflect.TypeOf((*MaintenanceModeFileMoveFault)(nil)).Elem() } type MakeDirectory MakeDirectoryRequestType func init() { t["MakeDirectory"] = reflect.TypeOf((*MakeDirectory)(nil)).Elem() } type MakeDirectoryInGuest MakeDirectoryInGuestRequestType func init() { t["MakeDirectoryInGuest"] = reflect.TypeOf((*MakeDirectoryInGuest)(nil)).Elem() } type MakeDirectoryInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` DirectoryPath string `xml:"directoryPath"` CreateParentDirectories bool `xml:"createParentDirectories"` } func init() { t["MakeDirectoryInGuestRequestType"] = reflect.TypeOf((*MakeDirectoryInGuestRequestType)(nil)).Elem() } type MakeDirectoryInGuestResponse struct { } type MakeDirectoryRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` CreateParentDirectories *bool `xml:"createParentDirectories"` } func init() { t["MakeDirectoryRequestType"] = reflect.TypeOf((*MakeDirectoryRequestType)(nil)).Elem() } type MakeDirectoryResponse struct { } type MakePrimaryVMRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` } func init() { t["MakePrimaryVMRequestType"] = reflect.TypeOf((*MakePrimaryVMRequestType)(nil)).Elem() } type MakePrimaryVM_Task MakePrimaryVMRequestType func init() { t["MakePrimaryVM_Task"] = reflect.TypeOf((*MakePrimaryVM_Task)(nil)).Elem() } type MakePrimaryVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ManagedByInfo struct { DynamicData ExtensionKey string `xml:"extensionKey"` Type string `xml:"type"` } func init() { t["ManagedByInfo"] = reflect.TypeOf((*ManagedByInfo)(nil)).Elem() } type ManagedEntityEventArgument struct { EntityEventArgument Entity ManagedObjectReference `xml:"entity"` } func init() { t["ManagedEntityEventArgument"] = reflect.TypeOf((*ManagedEntityEventArgument)(nil)).Elem() } type ManagedObjectNotFound struct { RuntimeFault Obj ManagedObjectReference `xml:"obj"` } func init() { t["ManagedObjectNotFound"] = reflect.TypeOf((*ManagedObjectNotFound)(nil)).Elem() } type ManagedObjectNotFoundFault ManagedObjectNotFound func init() { t["ManagedObjectNotFoundFault"] = reflect.TypeOf((*ManagedObjectNotFoundFault)(nil)).Elem() } type ManagedObjectReference struct { Type string `xml:"type,attr"` Value string `xml:",chardata"` } func init() { t["ManagedObjectReference"] = reflect.TypeOf((*ManagedObjectReference)(nil)).Elem() } type MarkAsLocalRequestType struct { This ManagedObjectReference `xml:"_this"` ScsiDiskUuid string `xml:"scsiDiskUuid"` } func init() { t["MarkAsLocalRequestType"] = reflect.TypeOf((*MarkAsLocalRequestType)(nil)).Elem() } type MarkAsLocal_Task MarkAsLocalRequestType func init() { t["MarkAsLocal_Task"] = reflect.TypeOf((*MarkAsLocal_Task)(nil)).Elem() } type MarkAsLocal_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MarkAsNonLocalRequestType struct { This ManagedObjectReference `xml:"_this"` ScsiDiskUuid string `xml:"scsiDiskUuid"` } func init() { t["MarkAsNonLocalRequestType"] = reflect.TypeOf((*MarkAsNonLocalRequestType)(nil)).Elem() } type MarkAsNonLocal_Task MarkAsNonLocalRequestType func init() { t["MarkAsNonLocal_Task"] = reflect.TypeOf((*MarkAsNonLocal_Task)(nil)).Elem() } type MarkAsNonLocal_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MarkAsNonSsdRequestType struct { This ManagedObjectReference `xml:"_this"` ScsiDiskUuid string `xml:"scsiDiskUuid"` } func init() { t["MarkAsNonSsdRequestType"] = reflect.TypeOf((*MarkAsNonSsdRequestType)(nil)).Elem() } type MarkAsNonSsd_Task MarkAsNonSsdRequestType func init() { t["MarkAsNonSsd_Task"] = reflect.TypeOf((*MarkAsNonSsd_Task)(nil)).Elem() } type MarkAsNonSsd_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MarkAsSsdRequestType struct { This ManagedObjectReference `xml:"_this"` ScsiDiskUuid string `xml:"scsiDiskUuid"` } func init() { t["MarkAsSsdRequestType"] = reflect.TypeOf((*MarkAsSsdRequestType)(nil)).Elem() } type MarkAsSsd_Task MarkAsSsdRequestType func init() { t["MarkAsSsd_Task"] = reflect.TypeOf((*MarkAsSsd_Task)(nil)).Elem() } type MarkAsSsd_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MarkAsTemplate MarkAsTemplateRequestType func init() { t["MarkAsTemplate"] = reflect.TypeOf((*MarkAsTemplate)(nil)).Elem() } type MarkAsTemplateRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["MarkAsTemplateRequestType"] = reflect.TypeOf((*MarkAsTemplateRequestType)(nil)).Elem() } type MarkAsTemplateResponse struct { } type MarkAsVirtualMachine MarkAsVirtualMachineRequestType func init() { t["MarkAsVirtualMachine"] = reflect.TypeOf((*MarkAsVirtualMachine)(nil)).Elem() } type MarkAsVirtualMachineRequestType struct { This ManagedObjectReference `xml:"_this"` Pool ManagedObjectReference `xml:"pool"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["MarkAsVirtualMachineRequestType"] = reflect.TypeOf((*MarkAsVirtualMachineRequestType)(nil)).Elem() } type MarkAsVirtualMachineResponse struct { } type MarkDefault MarkDefaultRequestType func init() { t["MarkDefault"] = reflect.TypeOf((*MarkDefault)(nil)).Elem() } type MarkDefaultRequestType struct { This ManagedObjectReference `xml:"_this"` ClusterId KeyProviderId `xml:"clusterId"` } func init() { t["MarkDefaultRequestType"] = reflect.TypeOf((*MarkDefaultRequestType)(nil)).Elem() } type MarkDefaultResponse struct { } type MarkForRemoval MarkForRemovalRequestType func init() { t["MarkForRemoval"] = reflect.TypeOf((*MarkForRemoval)(nil)).Elem() } type MarkForRemovalRequestType struct { This ManagedObjectReference `xml:"_this"` HbaName string `xml:"hbaName"` Remove bool `xml:"remove"` } func init() { t["MarkForRemovalRequestType"] = reflect.TypeOf((*MarkForRemovalRequestType)(nil)).Elem() } type MarkForRemovalResponse struct { } type MemoryFileFormatNotSupportedByDatastore struct { UnsupportedDatastore DatastoreName string `xml:"datastoreName"` Type string `xml:"type"` } func init() { t["MemoryFileFormatNotSupportedByDatastore"] = reflect.TypeOf((*MemoryFileFormatNotSupportedByDatastore)(nil)).Elem() } type MemoryFileFormatNotSupportedByDatastoreFault MemoryFileFormatNotSupportedByDatastore func init() { t["MemoryFileFormatNotSupportedByDatastoreFault"] = reflect.TypeOf((*MemoryFileFormatNotSupportedByDatastoreFault)(nil)).Elem() } type MemoryHotPlugNotSupported struct { VmConfigFault } func init() { t["MemoryHotPlugNotSupported"] = reflect.TypeOf((*MemoryHotPlugNotSupported)(nil)).Elem() } type MemoryHotPlugNotSupportedFault MemoryHotPlugNotSupported func init() { t["MemoryHotPlugNotSupportedFault"] = reflect.TypeOf((*MemoryHotPlugNotSupportedFault)(nil)).Elem() } type MemorySizeNotRecommended struct { VirtualHardwareCompatibilityIssue MemorySizeMB int32 `xml:"memorySizeMB"` MinMemorySizeMB int32 `xml:"minMemorySizeMB"` MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"` } func init() { t["MemorySizeNotRecommended"] = reflect.TypeOf((*MemorySizeNotRecommended)(nil)).Elem() } type MemorySizeNotRecommendedFault MemorySizeNotRecommended func init() { t["MemorySizeNotRecommendedFault"] = reflect.TypeOf((*MemorySizeNotRecommendedFault)(nil)).Elem() } type MemorySizeNotSupported struct { VirtualHardwareCompatibilityIssue MemorySizeMB int32 `xml:"memorySizeMB"` MinMemorySizeMB int32 `xml:"minMemorySizeMB"` MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"` } func init() { t["MemorySizeNotSupported"] = reflect.TypeOf((*MemorySizeNotSupported)(nil)).Elem() } type MemorySizeNotSupportedByDatastore struct { VirtualHardwareCompatibilityIssue Datastore ManagedObjectReference `xml:"datastore"` MemorySizeMB int32 `xml:"memorySizeMB"` MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"` } func init() { t["MemorySizeNotSupportedByDatastore"] = reflect.TypeOf((*MemorySizeNotSupportedByDatastore)(nil)).Elem() } type MemorySizeNotSupportedByDatastoreFault MemorySizeNotSupportedByDatastore func init() { t["MemorySizeNotSupportedByDatastoreFault"] = reflect.TypeOf((*MemorySizeNotSupportedByDatastoreFault)(nil)).Elem() } type MemorySizeNotSupportedFault MemorySizeNotSupported func init() { t["MemorySizeNotSupportedFault"] = reflect.TypeOf((*MemorySizeNotSupportedFault)(nil)).Elem() } type MemorySnapshotOnIndependentDisk struct { SnapshotFault } func init() { t["MemorySnapshotOnIndependentDisk"] = reflect.TypeOf((*MemorySnapshotOnIndependentDisk)(nil)).Elem() } type MemorySnapshotOnIndependentDiskFault MemorySnapshotOnIndependentDisk func init() { t["MemorySnapshotOnIndependentDiskFault"] = reflect.TypeOf((*MemorySnapshotOnIndependentDiskFault)(nil)).Elem() } type MergeDvsRequestType struct { This ManagedObjectReference `xml:"_this"` Dvs ManagedObjectReference `xml:"dvs"` } func init() { t["MergeDvsRequestType"] = reflect.TypeOf((*MergeDvsRequestType)(nil)).Elem() } type MergeDvs_Task MergeDvsRequestType func init() { t["MergeDvs_Task"] = reflect.TypeOf((*MergeDvs_Task)(nil)).Elem() } type MergeDvs_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MergePermissions MergePermissionsRequestType func init() { t["MergePermissions"] = reflect.TypeOf((*MergePermissions)(nil)).Elem() } type MergePermissionsRequestType struct { This ManagedObjectReference `xml:"_this"` SrcRoleId int32 `xml:"srcRoleId"` DstRoleId int32 `xml:"dstRoleId"` } func init() { t["MergePermissionsRequestType"] = reflect.TypeOf((*MergePermissionsRequestType)(nil)).Elem() } type MergePermissionsResponse struct { } type MethodAction struct { Action Name string `xml:"name"` Argument []MethodActionArgument `xml:"argument,omitempty"` } func init() { t["MethodAction"] = reflect.TypeOf((*MethodAction)(nil)).Elem() } type MethodActionArgument struct { DynamicData Value AnyType `xml:"value,typeattr"` } func init() { t["MethodActionArgument"] = reflect.TypeOf((*MethodActionArgument)(nil)).Elem() } type MethodAlreadyDisabledFault struct { RuntimeFault SourceId string `xml:"sourceId"` } func init() { t["MethodAlreadyDisabledFault"] = reflect.TypeOf((*MethodAlreadyDisabledFault)(nil)).Elem() } type MethodAlreadyDisabledFaultFault MethodAlreadyDisabledFault func init() { t["MethodAlreadyDisabledFaultFault"] = reflect.TypeOf((*MethodAlreadyDisabledFaultFault)(nil)).Elem() } type MethodDescription struct { Description Key string `xml:"key"` } func init() { t["MethodDescription"] = reflect.TypeOf((*MethodDescription)(nil)).Elem() } type MethodDisabled struct { RuntimeFault Source string `xml:"source,omitempty"` } func init() { t["MethodDisabled"] = reflect.TypeOf((*MethodDisabled)(nil)).Elem() } type MethodDisabledFault MethodDisabled func init() { t["MethodDisabledFault"] = reflect.TypeOf((*MethodDisabledFault)(nil)).Elem() } type MethodFault struct { FaultCause *LocalizedMethodFault `xml:"faultCause,omitempty"` FaultMessage []LocalizableMessage `xml:"faultMessage,omitempty"` } func init() { t["MethodFault"] = reflect.TypeOf((*MethodFault)(nil)).Elem() } type MethodFaultFault BaseMethodFault func init() { t["MethodFaultFault"] = reflect.TypeOf((*MethodFaultFault)(nil)).Elem() } type MethodNotFound struct { InvalidRequest Receiver ManagedObjectReference `xml:"receiver"` Method string `xml:"method"` } func init() { t["MethodNotFound"] = reflect.TypeOf((*MethodNotFound)(nil)).Elem() } type MethodNotFoundFault MethodNotFound func init() { t["MethodNotFoundFault"] = reflect.TypeOf((*MethodNotFoundFault)(nil)).Elem() } type MetricAlarmExpression struct { AlarmExpression Operator MetricAlarmOperator `xml:"operator"` Type string `xml:"type"` Metric PerfMetricId `xml:"metric"` Yellow int32 `xml:"yellow,omitempty"` YellowInterval int32 `xml:"yellowInterval,omitempty"` Red int32 `xml:"red,omitempty"` RedInterval int32 `xml:"redInterval,omitempty"` } func init() { t["MetricAlarmExpression"] = reflect.TypeOf((*MetricAlarmExpression)(nil)).Elem() } type MigrateVMRequestType struct { This ManagedObjectReference `xml:"_this"` Pool *ManagedObjectReference `xml:"pool,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` Priority VirtualMachineMovePriority `xml:"priority"` State VirtualMachinePowerState `xml:"state,omitempty"` } func init() { t["MigrateVMRequestType"] = reflect.TypeOf((*MigrateVMRequestType)(nil)).Elem() } type MigrateVM_Task MigrateVMRequestType func init() { t["MigrateVM_Task"] = reflect.TypeOf((*MigrateVM_Task)(nil)).Elem() } type MigrateVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MigrationDisabled struct { MigrationFault } func init() { t["MigrationDisabled"] = reflect.TypeOf((*MigrationDisabled)(nil)).Elem() } type MigrationDisabledFault MigrationDisabled func init() { t["MigrationDisabledFault"] = reflect.TypeOf((*MigrationDisabledFault)(nil)).Elem() } type MigrationErrorEvent struct { MigrationEvent } func init() { t["MigrationErrorEvent"] = reflect.TypeOf((*MigrationErrorEvent)(nil)).Elem() } type MigrationEvent struct { VmEvent Fault LocalizedMethodFault `xml:"fault"` } func init() { t["MigrationEvent"] = reflect.TypeOf((*MigrationEvent)(nil)).Elem() } type MigrationFault struct { VimFault } func init() { t["MigrationFault"] = reflect.TypeOf((*MigrationFault)(nil)).Elem() } type MigrationFaultFault BaseMigrationFault func init() { t["MigrationFaultFault"] = reflect.TypeOf((*MigrationFaultFault)(nil)).Elem() } type MigrationFeatureNotSupported struct { MigrationFault AtSourceHost bool `xml:"atSourceHost"` FailedHostName string `xml:"failedHostName"` FailedHost ManagedObjectReference `xml:"failedHost"` } func init() { t["MigrationFeatureNotSupported"] = reflect.TypeOf((*MigrationFeatureNotSupported)(nil)).Elem() } type MigrationFeatureNotSupportedFault BaseMigrationFeatureNotSupported func init() { t["MigrationFeatureNotSupportedFault"] = reflect.TypeOf((*MigrationFeatureNotSupportedFault)(nil)).Elem() } type MigrationHostErrorEvent struct { MigrationEvent DstHost HostEventArgument `xml:"dstHost"` } func init() { t["MigrationHostErrorEvent"] = reflect.TypeOf((*MigrationHostErrorEvent)(nil)).Elem() } type MigrationHostWarningEvent struct { MigrationEvent DstHost HostEventArgument `xml:"dstHost"` } func init() { t["MigrationHostWarningEvent"] = reflect.TypeOf((*MigrationHostWarningEvent)(nil)).Elem() } type MigrationNotReady struct { MigrationFault Reason string `xml:"reason"` } func init() { t["MigrationNotReady"] = reflect.TypeOf((*MigrationNotReady)(nil)).Elem() } type MigrationNotReadyFault MigrationNotReady func init() { t["MigrationNotReadyFault"] = reflect.TypeOf((*MigrationNotReadyFault)(nil)).Elem() } type MigrationResourceErrorEvent struct { MigrationEvent DstPool ResourcePoolEventArgument `xml:"dstPool"` DstHost HostEventArgument `xml:"dstHost"` } func init() { t["MigrationResourceErrorEvent"] = reflect.TypeOf((*MigrationResourceErrorEvent)(nil)).Elem() } type MigrationResourceWarningEvent struct { MigrationEvent DstPool ResourcePoolEventArgument `xml:"dstPool"` DstHost HostEventArgument `xml:"dstHost"` } func init() { t["MigrationResourceWarningEvent"] = reflect.TypeOf((*MigrationResourceWarningEvent)(nil)).Elem() } type MigrationWarningEvent struct { MigrationEvent } func init() { t["MigrationWarningEvent"] = reflect.TypeOf((*MigrationWarningEvent)(nil)).Elem() } type MismatchedBundle struct { VimFault BundleUuid string `xml:"bundleUuid"` HostUuid string `xml:"hostUuid"` BundleBuildNumber int32 `xml:"bundleBuildNumber"` HostBuildNumber int32 `xml:"hostBuildNumber"` } func init() { t["MismatchedBundle"] = reflect.TypeOf((*MismatchedBundle)(nil)).Elem() } type MismatchedBundleFault MismatchedBundle func init() { t["MismatchedBundleFault"] = reflect.TypeOf((*MismatchedBundleFault)(nil)).Elem() } type MismatchedNetworkPolicies struct { MigrationFault Device string `xml:"device"` Backing string `xml:"backing"` Connected bool `xml:"connected"` } func init() { t["MismatchedNetworkPolicies"] = reflect.TypeOf((*MismatchedNetworkPolicies)(nil)).Elem() } type MismatchedNetworkPoliciesFault MismatchedNetworkPolicies func init() { t["MismatchedNetworkPoliciesFault"] = reflect.TypeOf((*MismatchedNetworkPoliciesFault)(nil)).Elem() } type MismatchedVMotionNetworkNames struct { MigrationFault SourceNetwork string `xml:"sourceNetwork"` DestNetwork string `xml:"destNetwork"` } func init() { t["MismatchedVMotionNetworkNames"] = reflect.TypeOf((*MismatchedVMotionNetworkNames)(nil)).Elem() } type MismatchedVMotionNetworkNamesFault MismatchedVMotionNetworkNames func init() { t["MismatchedVMotionNetworkNamesFault"] = reflect.TypeOf((*MismatchedVMotionNetworkNamesFault)(nil)).Elem() } type MissingBmcSupport struct { VimFault } func init() { t["MissingBmcSupport"] = reflect.TypeOf((*MissingBmcSupport)(nil)).Elem() } type MissingBmcSupportFault MissingBmcSupport func init() { t["MissingBmcSupportFault"] = reflect.TypeOf((*MissingBmcSupportFault)(nil)).Elem() } type MissingController struct { InvalidDeviceSpec } func init() { t["MissingController"] = reflect.TypeOf((*MissingController)(nil)).Elem() } type MissingControllerFault MissingController func init() { t["MissingControllerFault"] = reflect.TypeOf((*MissingControllerFault)(nil)).Elem() } type MissingIpPool struct { VAppPropertyFault } func init() { t["MissingIpPool"] = reflect.TypeOf((*MissingIpPool)(nil)).Elem() } type MissingIpPoolFault MissingIpPool func init() { t["MissingIpPoolFault"] = reflect.TypeOf((*MissingIpPoolFault)(nil)).Elem() } type MissingLinuxCustResources struct { CustomizationFault } func init() { t["MissingLinuxCustResources"] = reflect.TypeOf((*MissingLinuxCustResources)(nil)).Elem() } type MissingLinuxCustResourcesFault MissingLinuxCustResources func init() { t["MissingLinuxCustResourcesFault"] = reflect.TypeOf((*MissingLinuxCustResourcesFault)(nil)).Elem() } type MissingNetworkIpConfig struct { VAppPropertyFault } func init() { t["MissingNetworkIpConfig"] = reflect.TypeOf((*MissingNetworkIpConfig)(nil)).Elem() } type MissingNetworkIpConfigFault MissingNetworkIpConfig func init() { t["MissingNetworkIpConfigFault"] = reflect.TypeOf((*MissingNetworkIpConfigFault)(nil)).Elem() } type MissingObject struct { DynamicData Obj ManagedObjectReference `xml:"obj"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["MissingObject"] = reflect.TypeOf((*MissingObject)(nil)).Elem() } type MissingPowerOffConfiguration struct { VAppConfigFault } func init() { t["MissingPowerOffConfiguration"] = reflect.TypeOf((*MissingPowerOffConfiguration)(nil)).Elem() } type MissingPowerOffConfigurationFault MissingPowerOffConfiguration func init() { t["MissingPowerOffConfigurationFault"] = reflect.TypeOf((*MissingPowerOffConfigurationFault)(nil)).Elem() } type MissingPowerOnConfiguration struct { VAppConfigFault } func init() { t["MissingPowerOnConfiguration"] = reflect.TypeOf((*MissingPowerOnConfiguration)(nil)).Elem() } type MissingPowerOnConfigurationFault MissingPowerOnConfiguration func init() { t["MissingPowerOnConfigurationFault"] = reflect.TypeOf((*MissingPowerOnConfigurationFault)(nil)).Elem() } type MissingProperty struct { DynamicData Path string `xml:"path"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["MissingProperty"] = reflect.TypeOf((*MissingProperty)(nil)).Elem() } type MissingWindowsCustResources struct { CustomizationFault } func init() { t["MissingWindowsCustResources"] = reflect.TypeOf((*MissingWindowsCustResources)(nil)).Elem() } type MissingWindowsCustResourcesFault MissingWindowsCustResources func init() { t["MissingWindowsCustResourcesFault"] = reflect.TypeOf((*MissingWindowsCustResourcesFault)(nil)).Elem() } type MksConnectionLimitReached struct { InvalidState ConnectionLimit int32 `xml:"connectionLimit"` } func init() { t["MksConnectionLimitReached"] = reflect.TypeOf((*MksConnectionLimitReached)(nil)).Elem() } type MksConnectionLimitReachedFault MksConnectionLimitReached func init() { t["MksConnectionLimitReachedFault"] = reflect.TypeOf((*MksConnectionLimitReachedFault)(nil)).Elem() } type ModeInfo struct { DynamicData Browse string `xml:"browse,omitempty"` Read string `xml:"read"` Modify string `xml:"modify"` Use string `xml:"use"` Admin string `xml:"admin,omitempty"` Full string `xml:"full"` } func init() { t["ModeInfo"] = reflect.TypeOf((*ModeInfo)(nil)).Elem() } type ModifyListView ModifyListViewRequestType func init() { t["ModifyListView"] = reflect.TypeOf((*ModifyListView)(nil)).Elem() } type ModifyListViewRequestType struct { This ManagedObjectReference `xml:"_this"` Add []ManagedObjectReference `xml:"add,omitempty"` Remove []ManagedObjectReference `xml:"remove,omitempty"` } func init() { t["ModifyListViewRequestType"] = reflect.TypeOf((*ModifyListViewRequestType)(nil)).Elem() } type ModifyListViewResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type MonthlyByDayTaskScheduler struct { MonthlyTaskScheduler Day int32 `xml:"day"` } func init() { t["MonthlyByDayTaskScheduler"] = reflect.TypeOf((*MonthlyByDayTaskScheduler)(nil)).Elem() } type MonthlyByWeekdayTaskScheduler struct { MonthlyTaskScheduler Offset WeekOfMonth `xml:"offset"` Weekday DayOfWeek `xml:"weekday"` } func init() { t["MonthlyByWeekdayTaskScheduler"] = reflect.TypeOf((*MonthlyByWeekdayTaskScheduler)(nil)).Elem() } type MonthlyTaskScheduler struct { DailyTaskScheduler } func init() { t["MonthlyTaskScheduler"] = reflect.TypeOf((*MonthlyTaskScheduler)(nil)).Elem() } type MountError struct { CustomizationFault Vm ManagedObjectReference `xml:"vm"` DiskIndex int32 `xml:"diskIndex"` } func init() { t["MountError"] = reflect.TypeOf((*MountError)(nil)).Elem() } type MountErrorFault MountError func init() { t["MountErrorFault"] = reflect.TypeOf((*MountErrorFault)(nil)).Elem() } type MountToolsInstaller MountToolsInstallerRequestType func init() { t["MountToolsInstaller"] = reflect.TypeOf((*MountToolsInstaller)(nil)).Elem() } type MountToolsInstallerRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["MountToolsInstallerRequestType"] = reflect.TypeOf((*MountToolsInstallerRequestType)(nil)).Elem() } type MountToolsInstallerResponse struct { } type MountVffsVolume MountVffsVolumeRequestType func init() { t["MountVffsVolume"] = reflect.TypeOf((*MountVffsVolume)(nil)).Elem() } type MountVffsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` VffsUuid string `xml:"vffsUuid"` } func init() { t["MountVffsVolumeRequestType"] = reflect.TypeOf((*MountVffsVolumeRequestType)(nil)).Elem() } type MountVffsVolumeResponse struct { } type MountVmfsVolume MountVmfsVolumeRequestType func init() { t["MountVmfsVolume"] = reflect.TypeOf((*MountVmfsVolume)(nil)).Elem() } type MountVmfsVolumeExRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid []string `xml:"vmfsUuid"` } func init() { t["MountVmfsVolumeExRequestType"] = reflect.TypeOf((*MountVmfsVolumeExRequestType)(nil)).Elem() } type MountVmfsVolumeEx_Task MountVmfsVolumeExRequestType func init() { t["MountVmfsVolumeEx_Task"] = reflect.TypeOf((*MountVmfsVolumeEx_Task)(nil)).Elem() } type MountVmfsVolumeEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MountVmfsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid string `xml:"vmfsUuid"` } func init() { t["MountVmfsVolumeRequestType"] = reflect.TypeOf((*MountVmfsVolumeRequestType)(nil)).Elem() } type MountVmfsVolumeResponse struct { } type MoveDVPortRequestType struct { This ManagedObjectReference `xml:"_this"` PortKey []string `xml:"portKey"` DestinationPortgroupKey string `xml:"destinationPortgroupKey,omitempty"` } func init() { t["MoveDVPortRequestType"] = reflect.TypeOf((*MoveDVPortRequestType)(nil)).Elem() } type MoveDVPort_Task MoveDVPortRequestType func init() { t["MoveDVPort_Task"] = reflect.TypeOf((*MoveDVPort_Task)(nil)).Elem() } type MoveDVPort_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MoveDatastoreFileRequestType struct { This ManagedObjectReference `xml:"_this"` SourceName string `xml:"sourceName"` SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` DestinationName string `xml:"destinationName"` DestinationDatacenter *ManagedObjectReference `xml:"destinationDatacenter,omitempty"` Force *bool `xml:"force"` } func init() { t["MoveDatastoreFileRequestType"] = reflect.TypeOf((*MoveDatastoreFileRequestType)(nil)).Elem() } type MoveDatastoreFile_Task MoveDatastoreFileRequestType func init() { t["MoveDatastoreFile_Task"] = reflect.TypeOf((*MoveDatastoreFile_Task)(nil)).Elem() } type MoveDatastoreFile_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MoveDirectoryInGuest MoveDirectoryInGuestRequestType func init() { t["MoveDirectoryInGuest"] = reflect.TypeOf((*MoveDirectoryInGuest)(nil)).Elem() } type MoveDirectoryInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` SrcDirectoryPath string `xml:"srcDirectoryPath"` DstDirectoryPath string `xml:"dstDirectoryPath"` } func init() { t["MoveDirectoryInGuestRequestType"] = reflect.TypeOf((*MoveDirectoryInGuestRequestType)(nil)).Elem() } type MoveDirectoryInGuestResponse struct { } type MoveFileInGuest MoveFileInGuestRequestType func init() { t["MoveFileInGuest"] = reflect.TypeOf((*MoveFileInGuest)(nil)).Elem() } type MoveFileInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` SrcFilePath string `xml:"srcFilePath"` DstFilePath string `xml:"dstFilePath"` Overwrite bool `xml:"overwrite"` } func init() { t["MoveFileInGuestRequestType"] = reflect.TypeOf((*MoveFileInGuestRequestType)(nil)).Elem() } type MoveFileInGuestResponse struct { } type MoveHostIntoRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` } func init() { t["MoveHostIntoRequestType"] = reflect.TypeOf((*MoveHostIntoRequestType)(nil)).Elem() } type MoveHostInto_Task MoveHostIntoRequestType func init() { t["MoveHostInto_Task"] = reflect.TypeOf((*MoveHostInto_Task)(nil)).Elem() } type MoveHostInto_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MoveIntoFolderRequestType struct { This ManagedObjectReference `xml:"_this"` List []ManagedObjectReference `xml:"list"` } func init() { t["MoveIntoFolderRequestType"] = reflect.TypeOf((*MoveIntoFolderRequestType)(nil)).Elem() } type MoveIntoFolder_Task MoveIntoFolderRequestType func init() { t["MoveIntoFolder_Task"] = reflect.TypeOf((*MoveIntoFolder_Task)(nil)).Elem() } type MoveIntoFolder_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MoveIntoRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` } func init() { t["MoveIntoRequestType"] = reflect.TypeOf((*MoveIntoRequestType)(nil)).Elem() } type MoveIntoResourcePool MoveIntoResourcePoolRequestType func init() { t["MoveIntoResourcePool"] = reflect.TypeOf((*MoveIntoResourcePool)(nil)).Elem() } type MoveIntoResourcePoolRequestType struct { This ManagedObjectReference `xml:"_this"` List []ManagedObjectReference `xml:"list"` } func init() { t["MoveIntoResourcePoolRequestType"] = reflect.TypeOf((*MoveIntoResourcePoolRequestType)(nil)).Elem() } type MoveIntoResourcePoolResponse struct { } type MoveInto_Task MoveIntoRequestType func init() { t["MoveInto_Task"] = reflect.TypeOf((*MoveInto_Task)(nil)).Elem() } type MoveInto_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MoveVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` SourceName string `xml:"sourceName"` SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` DestName string `xml:"destName"` DestDatacenter *ManagedObjectReference `xml:"destDatacenter,omitempty"` Force *bool `xml:"force"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` } func init() { t["MoveVirtualDiskRequestType"] = reflect.TypeOf((*MoveVirtualDiskRequestType)(nil)).Elem() } type MoveVirtualDisk_Task MoveVirtualDiskRequestType func init() { t["MoveVirtualDisk_Task"] = reflect.TypeOf((*MoveVirtualDisk_Task)(nil)).Elem() } type MoveVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type MtuMatchEvent struct { DvsHealthStatusChangeEvent } func init() { t["MtuMatchEvent"] = reflect.TypeOf((*MtuMatchEvent)(nil)).Elem() } type MtuMismatchEvent struct { DvsHealthStatusChangeEvent } func init() { t["MtuMismatchEvent"] = reflect.TypeOf((*MtuMismatchEvent)(nil)).Elem() } type MultiWriterNotSupported struct { DeviceNotSupported } func init() { t["MultiWriterNotSupported"] = reflect.TypeOf((*MultiWriterNotSupported)(nil)).Elem() } type MultiWriterNotSupportedFault MultiWriterNotSupported func init() { t["MultiWriterNotSupportedFault"] = reflect.TypeOf((*MultiWriterNotSupportedFault)(nil)).Elem() } type MultipleCertificatesVerifyFault struct { HostConnectFault ThumbprintData []MultipleCertificatesVerifyFaultThumbprintData `xml:"thumbprintData"` } func init() { t["MultipleCertificatesVerifyFault"] = reflect.TypeOf((*MultipleCertificatesVerifyFault)(nil)).Elem() } type MultipleCertificatesVerifyFaultFault MultipleCertificatesVerifyFault func init() { t["MultipleCertificatesVerifyFaultFault"] = reflect.TypeOf((*MultipleCertificatesVerifyFaultFault)(nil)).Elem() } type MultipleCertificatesVerifyFaultThumbprintData struct { DynamicData Port int32 `xml:"port"` Thumbprint string `xml:"thumbprint"` } func init() { t["MultipleCertificatesVerifyFaultThumbprintData"] = reflect.TypeOf((*MultipleCertificatesVerifyFaultThumbprintData)(nil)).Elem() } type MultipleSnapshotsNotSupported struct { SnapshotFault } func init() { t["MultipleSnapshotsNotSupported"] = reflect.TypeOf((*MultipleSnapshotsNotSupported)(nil)).Elem() } type MultipleSnapshotsNotSupportedFault MultipleSnapshotsNotSupported func init() { t["MultipleSnapshotsNotSupportedFault"] = reflect.TypeOf((*MultipleSnapshotsNotSupportedFault)(nil)).Elem() } type NASDatastoreCreatedEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` DatastoreUrl string `xml:"datastoreUrl,omitempty"` } func init() { t["NASDatastoreCreatedEvent"] = reflect.TypeOf((*NASDatastoreCreatedEvent)(nil)).Elem() } type NamePasswordAuthentication struct { GuestAuthentication Username string `xml:"username"` Password string `xml:"password"` } func init() { t["NamePasswordAuthentication"] = reflect.TypeOf((*NamePasswordAuthentication)(nil)).Elem() } type NamespaceFull struct { VimFault Name string `xml:"name"` CurrentMaxSize int64 `xml:"currentMaxSize"` RequiredSize int64 `xml:"requiredSize,omitempty"` } func init() { t["NamespaceFull"] = reflect.TypeOf((*NamespaceFull)(nil)).Elem() } type NamespaceFullFault NamespaceFull func init() { t["NamespaceFullFault"] = reflect.TypeOf((*NamespaceFullFault)(nil)).Elem() } type NamespaceLimitReached struct { VimFault Limit int32 `xml:"limit,omitempty"` } func init() { t["NamespaceLimitReached"] = reflect.TypeOf((*NamespaceLimitReached)(nil)).Elem() } type NamespaceLimitReachedFault NamespaceLimitReached func init() { t["NamespaceLimitReachedFault"] = reflect.TypeOf((*NamespaceLimitReachedFault)(nil)).Elem() } type NamespaceWriteProtected struct { VimFault Name string `xml:"name"` } func init() { t["NamespaceWriteProtected"] = reflect.TypeOf((*NamespaceWriteProtected)(nil)).Elem() } type NamespaceWriteProtectedFault NamespaceWriteProtected func init() { t["NamespaceWriteProtectedFault"] = reflect.TypeOf((*NamespaceWriteProtectedFault)(nil)).Elem() } type NasConfigFault struct { HostConfigFault Name string `xml:"name"` } func init() { t["NasConfigFault"] = reflect.TypeOf((*NasConfigFault)(nil)).Elem() } type NasConfigFaultFault BaseNasConfigFault func init() { t["NasConfigFaultFault"] = reflect.TypeOf((*NasConfigFaultFault)(nil)).Elem() } type NasConnectionLimitReached struct { NasConfigFault RemoteHost string `xml:"remoteHost"` RemotePath string `xml:"remotePath"` } func init() { t["NasConnectionLimitReached"] = reflect.TypeOf((*NasConnectionLimitReached)(nil)).Elem() } type NasConnectionLimitReachedFault NasConnectionLimitReached func init() { t["NasConnectionLimitReachedFault"] = reflect.TypeOf((*NasConnectionLimitReachedFault)(nil)).Elem() } type NasDatastoreInfo struct { DatastoreInfo Nas *HostNasVolume `xml:"nas,omitempty"` } func init() { t["NasDatastoreInfo"] = reflect.TypeOf((*NasDatastoreInfo)(nil)).Elem() } type NasSessionCredentialConflict struct { NasConfigFault RemoteHost string `xml:"remoteHost"` RemotePath string `xml:"remotePath"` UserName string `xml:"userName"` } func init() { t["NasSessionCredentialConflict"] = reflect.TypeOf((*NasSessionCredentialConflict)(nil)).Elem() } type NasSessionCredentialConflictFault NasSessionCredentialConflict func init() { t["NasSessionCredentialConflictFault"] = reflect.TypeOf((*NasSessionCredentialConflictFault)(nil)).Elem() } type NasStorageProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["NasStorageProfile"] = reflect.TypeOf((*NasStorageProfile)(nil)).Elem() } type NasVolumeNotMounted struct { NasConfigFault RemoteHost string `xml:"remoteHost"` RemotePath string `xml:"remotePath"` } func init() { t["NasVolumeNotMounted"] = reflect.TypeOf((*NasVolumeNotMounted)(nil)).Elem() } type NasVolumeNotMountedFault NasVolumeNotMounted func init() { t["NasVolumeNotMountedFault"] = reflect.TypeOf((*NasVolumeNotMountedFault)(nil)).Elem() } type NegatableExpression struct { DynamicData Negate *bool `xml:"negate"` } func init() { t["NegatableExpression"] = reflect.TypeOf((*NegatableExpression)(nil)).Elem() } type NetBIOSConfigInfo struct { DynamicData Mode string `xml:"mode"` } func init() { t["NetBIOSConfigInfo"] = reflect.TypeOf((*NetBIOSConfigInfo)(nil)).Elem() } type NetDhcpConfigInfo struct { DynamicData Ipv6 *NetDhcpConfigInfoDhcpOptions `xml:"ipv6,omitempty"` Ipv4 *NetDhcpConfigInfoDhcpOptions `xml:"ipv4,omitempty"` } func init() { t["NetDhcpConfigInfo"] = reflect.TypeOf((*NetDhcpConfigInfo)(nil)).Elem() } type NetDhcpConfigInfoDhcpOptions struct { DynamicData Enable bool `xml:"enable"` Config []KeyValue `xml:"config,omitempty"` } func init() { t["NetDhcpConfigInfoDhcpOptions"] = reflect.TypeOf((*NetDhcpConfigInfoDhcpOptions)(nil)).Elem() } type NetDhcpConfigSpec struct { DynamicData Ipv6 *NetDhcpConfigSpecDhcpOptionsSpec `xml:"ipv6,omitempty"` Ipv4 *NetDhcpConfigSpecDhcpOptionsSpec `xml:"ipv4,omitempty"` } func init() { t["NetDhcpConfigSpec"] = reflect.TypeOf((*NetDhcpConfigSpec)(nil)).Elem() } type NetDhcpConfigSpecDhcpOptionsSpec struct { DynamicData Enable *bool `xml:"enable"` Config []KeyValue `xml:"config"` Operation string `xml:"operation"` } func init() { t["NetDhcpConfigSpecDhcpOptionsSpec"] = reflect.TypeOf((*NetDhcpConfigSpecDhcpOptionsSpec)(nil)).Elem() } type NetDnsConfigInfo struct { DynamicData Dhcp bool `xml:"dhcp"` HostName string `xml:"hostName"` DomainName string `xml:"domainName"` IpAddress []string `xml:"ipAddress,omitempty"` SearchDomain []string `xml:"searchDomain,omitempty"` } func init() { t["NetDnsConfigInfo"] = reflect.TypeOf((*NetDnsConfigInfo)(nil)).Elem() } type NetDnsConfigSpec struct { DynamicData Dhcp *bool `xml:"dhcp"` HostName string `xml:"hostName,omitempty"` DomainName string `xml:"domainName,omitempty"` IpAddress []string `xml:"ipAddress,omitempty"` SearchDomain []string `xml:"searchDomain,omitempty"` } func init() { t["NetDnsConfigSpec"] = reflect.TypeOf((*NetDnsConfigSpec)(nil)).Elem() } type NetIpConfigInfo struct { DynamicData IpAddress []NetIpConfigInfoIpAddress `xml:"ipAddress,omitempty"` Dhcp *NetDhcpConfigInfo `xml:"dhcp,omitempty"` AutoConfigurationEnabled *bool `xml:"autoConfigurationEnabled"` } func init() { t["NetIpConfigInfo"] = reflect.TypeOf((*NetIpConfigInfo)(nil)).Elem() } type NetIpConfigInfoIpAddress struct { DynamicData IpAddress string `xml:"ipAddress"` PrefixLength int32 `xml:"prefixLength"` Origin string `xml:"origin,omitempty"` State string `xml:"state,omitempty"` Lifetime *time.Time `xml:"lifetime"` } func init() { t["NetIpConfigInfoIpAddress"] = reflect.TypeOf((*NetIpConfigInfoIpAddress)(nil)).Elem() } type NetIpConfigSpec struct { DynamicData IpAddress []NetIpConfigSpecIpAddressSpec `xml:"ipAddress,omitempty"` Dhcp *NetDhcpConfigSpec `xml:"dhcp,omitempty"` AutoConfigurationEnabled *bool `xml:"autoConfigurationEnabled"` } func init() { t["NetIpConfigSpec"] = reflect.TypeOf((*NetIpConfigSpec)(nil)).Elem() } type NetIpConfigSpecIpAddressSpec struct { DynamicData IpAddress string `xml:"ipAddress"` PrefixLength int32 `xml:"prefixLength"` Operation string `xml:"operation"` } func init() { t["NetIpConfigSpecIpAddressSpec"] = reflect.TypeOf((*NetIpConfigSpecIpAddressSpec)(nil)).Elem() } type NetIpRouteConfigInfo struct { DynamicData IpRoute []NetIpRouteConfigInfoIpRoute `xml:"ipRoute,omitempty"` } func init() { t["NetIpRouteConfigInfo"] = reflect.TypeOf((*NetIpRouteConfigInfo)(nil)).Elem() } type NetIpRouteConfigInfoGateway struct { DynamicData IpAddress string `xml:"ipAddress,omitempty"` Device string `xml:"device,omitempty"` } func init() { t["NetIpRouteConfigInfoGateway"] = reflect.TypeOf((*NetIpRouteConfigInfoGateway)(nil)).Elem() } type NetIpRouteConfigInfoIpRoute struct { DynamicData Network string `xml:"network"` PrefixLength int32 `xml:"prefixLength"` Gateway NetIpRouteConfigInfoGateway `xml:"gateway"` } func init() { t["NetIpRouteConfigInfoIpRoute"] = reflect.TypeOf((*NetIpRouteConfigInfoIpRoute)(nil)).Elem() } type NetIpRouteConfigSpec struct { DynamicData IpRoute []NetIpRouteConfigSpecIpRouteSpec `xml:"ipRoute,omitempty"` } func init() { t["NetIpRouteConfigSpec"] = reflect.TypeOf((*NetIpRouteConfigSpec)(nil)).Elem() } type NetIpRouteConfigSpecGatewaySpec struct { DynamicData IpAddress string `xml:"ipAddress,omitempty"` Device string `xml:"device,omitempty"` } func init() { t["NetIpRouteConfigSpecGatewaySpec"] = reflect.TypeOf((*NetIpRouteConfigSpecGatewaySpec)(nil)).Elem() } type NetIpRouteConfigSpecIpRouteSpec struct { DynamicData Network string `xml:"network"` PrefixLength int32 `xml:"prefixLength"` Gateway NetIpRouteConfigSpecGatewaySpec `xml:"gateway"` Operation string `xml:"operation"` } func init() { t["NetIpRouteConfigSpecIpRouteSpec"] = reflect.TypeOf((*NetIpRouteConfigSpecIpRouteSpec)(nil)).Elem() } type NetIpStackInfo struct { DynamicData Neighbor []NetIpStackInfoNetToMedia `xml:"neighbor,omitempty"` DefaultRouter []NetIpStackInfoDefaultRouter `xml:"defaultRouter,omitempty"` } func init() { t["NetIpStackInfo"] = reflect.TypeOf((*NetIpStackInfo)(nil)).Elem() } type NetIpStackInfoDefaultRouter struct { DynamicData IpAddress string `xml:"ipAddress"` Device string `xml:"device"` Lifetime time.Time `xml:"lifetime"` Preference string `xml:"preference"` } func init() { t["NetIpStackInfoDefaultRouter"] = reflect.TypeOf((*NetIpStackInfoDefaultRouter)(nil)).Elem() } type NetIpStackInfoNetToMedia struct { DynamicData IpAddress string `xml:"ipAddress"` PhysicalAddress string `xml:"physicalAddress"` Device string `xml:"device"` Type string `xml:"type"` } func init() { t["NetIpStackInfoNetToMedia"] = reflect.TypeOf((*NetIpStackInfoNetToMedia)(nil)).Elem() } type NetStackInstanceProfile struct { ApplyProfile Key string `xml:"key"` DnsConfig NetworkProfileDnsConfigProfile `xml:"dnsConfig"` IpRouteConfig IpRouteProfile `xml:"ipRouteConfig"` } func init() { t["NetStackInstanceProfile"] = reflect.TypeOf((*NetStackInstanceProfile)(nil)).Elem() } type NetworkCopyFault struct { FileFault } func init() { t["NetworkCopyFault"] = reflect.TypeOf((*NetworkCopyFault)(nil)).Elem() } type NetworkCopyFaultFault NetworkCopyFault func init() { t["NetworkCopyFaultFault"] = reflect.TypeOf((*NetworkCopyFaultFault)(nil)).Elem() } type NetworkDisruptedAndConfigRolledBack struct { VimFault Host string `xml:"host"` } func init() { t["NetworkDisruptedAndConfigRolledBack"] = reflect.TypeOf((*NetworkDisruptedAndConfigRolledBack)(nil)).Elem() } type NetworkDisruptedAndConfigRolledBackFault NetworkDisruptedAndConfigRolledBack func init() { t["NetworkDisruptedAndConfigRolledBackFault"] = reflect.TypeOf((*NetworkDisruptedAndConfigRolledBackFault)(nil)).Elem() } type NetworkEventArgument struct { EntityEventArgument Network ManagedObjectReference `xml:"network"` } func init() { t["NetworkEventArgument"] = reflect.TypeOf((*NetworkEventArgument)(nil)).Elem() } type NetworkInaccessible struct { NasConfigFault } func init() { t["NetworkInaccessible"] = reflect.TypeOf((*NetworkInaccessible)(nil)).Elem() } type NetworkInaccessibleFault NetworkInaccessible func init() { t["NetworkInaccessibleFault"] = reflect.TypeOf((*NetworkInaccessibleFault)(nil)).Elem() } type NetworkPolicyProfile struct { ApplyProfile } func init() { t["NetworkPolicyProfile"] = reflect.TypeOf((*NetworkPolicyProfile)(nil)).Elem() } type NetworkProfile struct { ApplyProfile Vswitch []VirtualSwitchProfile `xml:"vswitch,omitempty"` VmPortGroup []VmPortGroupProfile `xml:"vmPortGroup,omitempty"` HostPortGroup []HostPortGroupProfile `xml:"hostPortGroup,omitempty"` ServiceConsolePortGroup []ServiceConsolePortGroupProfile `xml:"serviceConsolePortGroup,omitempty"` DnsConfig *NetworkProfileDnsConfigProfile `xml:"dnsConfig,omitempty"` IpRouteConfig *IpRouteProfile `xml:"ipRouteConfig,omitempty"` ConsoleIpRouteConfig *IpRouteProfile `xml:"consoleIpRouteConfig,omitempty"` Pnic []PhysicalNicProfile `xml:"pnic,omitempty"` Dvswitch []DvsProfile `xml:"dvswitch,omitempty"` DvsServiceConsoleNic []DvsServiceConsoleVNicProfile `xml:"dvsServiceConsoleNic,omitempty"` DvsHostNic []DvsHostVNicProfile `xml:"dvsHostNic,omitempty"` NetStackInstance []NetStackInstanceProfile `xml:"netStackInstance,omitempty"` } func init() { t["NetworkProfile"] = reflect.TypeOf((*NetworkProfile)(nil)).Elem() } type NetworkProfileDnsConfigProfile struct { ApplyProfile } func init() { t["NetworkProfileDnsConfigProfile"] = reflect.TypeOf((*NetworkProfileDnsConfigProfile)(nil)).Elem() } type NetworkRollbackEvent struct { Event MethodName string `xml:"methodName"` TransactionId string `xml:"transactionId"` } func init() { t["NetworkRollbackEvent"] = reflect.TypeOf((*NetworkRollbackEvent)(nil)).Elem() } type NetworkSummary struct { DynamicData Network *ManagedObjectReference `xml:"network,omitempty"` Name string `xml:"name"` Accessible bool `xml:"accessible"` IpPoolName string `xml:"ipPoolName,omitempty"` IpPoolId int32 `xml:"ipPoolId,omitempty"` } func init() { t["NetworkSummary"] = reflect.TypeOf((*NetworkSummary)(nil)).Elem() } type NetworksMayNotBeTheSame struct { MigrationFault Name string `xml:"name,omitempty"` } func init() { t["NetworksMayNotBeTheSame"] = reflect.TypeOf((*NetworksMayNotBeTheSame)(nil)).Elem() } type NetworksMayNotBeTheSameFault NetworksMayNotBeTheSame func init() { t["NetworksMayNotBeTheSameFault"] = reflect.TypeOf((*NetworksMayNotBeTheSameFault)(nil)).Elem() } type NicSettingMismatch struct { CustomizationFault NumberOfNicsInSpec int32 `xml:"numberOfNicsInSpec"` NumberOfNicsInVM int32 `xml:"numberOfNicsInVM"` } func init() { t["NicSettingMismatch"] = reflect.TypeOf((*NicSettingMismatch)(nil)).Elem() } type NicSettingMismatchFault NicSettingMismatch func init() { t["NicSettingMismatchFault"] = reflect.TypeOf((*NicSettingMismatchFault)(nil)).Elem() } type NoAccessUserEvent struct { SessionEvent IpAddress string `xml:"ipAddress"` } func init() { t["NoAccessUserEvent"] = reflect.TypeOf((*NoAccessUserEvent)(nil)).Elem() } type NoActiveHostInCluster struct { InvalidState ComputeResource ManagedObjectReference `xml:"computeResource"` } func init() { t["NoActiveHostInCluster"] = reflect.TypeOf((*NoActiveHostInCluster)(nil)).Elem() } type NoActiveHostInClusterFault NoActiveHostInCluster func init() { t["NoActiveHostInClusterFault"] = reflect.TypeOf((*NoActiveHostInClusterFault)(nil)).Elem() } type NoAvailableIp struct { VAppPropertyFault Network ManagedObjectReference `xml:"network"` } func init() { t["NoAvailableIp"] = reflect.TypeOf((*NoAvailableIp)(nil)).Elem() } type NoAvailableIpFault NoAvailableIp func init() { t["NoAvailableIpFault"] = reflect.TypeOf((*NoAvailableIpFault)(nil)).Elem() } type NoClientCertificate struct { VimFault } func init() { t["NoClientCertificate"] = reflect.TypeOf((*NoClientCertificate)(nil)).Elem() } type NoClientCertificateFault NoClientCertificate func init() { t["NoClientCertificateFault"] = reflect.TypeOf((*NoClientCertificateFault)(nil)).Elem() } type NoCompatibleDatastore struct { VimFault } func init() { t["NoCompatibleDatastore"] = reflect.TypeOf((*NoCompatibleDatastore)(nil)).Elem() } type NoCompatibleDatastoreFault NoCompatibleDatastore func init() { t["NoCompatibleDatastoreFault"] = reflect.TypeOf((*NoCompatibleDatastoreFault)(nil)).Elem() } type NoCompatibleHardAffinityHost struct { VmConfigFault VmName string `xml:"vmName"` } func init() { t["NoCompatibleHardAffinityHost"] = reflect.TypeOf((*NoCompatibleHardAffinityHost)(nil)).Elem() } type NoCompatibleHardAffinityHostFault NoCompatibleHardAffinityHost func init() { t["NoCompatibleHardAffinityHostFault"] = reflect.TypeOf((*NoCompatibleHardAffinityHostFault)(nil)).Elem() } type NoCompatibleHost struct { VimFault Host []ManagedObjectReference `xml:"host,omitempty"` Error []LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["NoCompatibleHost"] = reflect.TypeOf((*NoCompatibleHost)(nil)).Elem() } type NoCompatibleHostFault BaseNoCompatibleHost func init() { t["NoCompatibleHostFault"] = reflect.TypeOf((*NoCompatibleHostFault)(nil)).Elem() } type NoCompatibleHostWithAccessToDevice struct { NoCompatibleHost } func init() { t["NoCompatibleHostWithAccessToDevice"] = reflect.TypeOf((*NoCompatibleHostWithAccessToDevice)(nil)).Elem() } type NoCompatibleHostWithAccessToDeviceFault NoCompatibleHostWithAccessToDevice func init() { t["NoCompatibleHostWithAccessToDeviceFault"] = reflect.TypeOf((*NoCompatibleHostWithAccessToDeviceFault)(nil)).Elem() } type NoCompatibleSoftAffinityHost struct { VmConfigFault VmName string `xml:"vmName"` } func init() { t["NoCompatibleSoftAffinityHost"] = reflect.TypeOf((*NoCompatibleSoftAffinityHost)(nil)).Elem() } type NoCompatibleSoftAffinityHostFault NoCompatibleSoftAffinityHost func init() { t["NoCompatibleSoftAffinityHostFault"] = reflect.TypeOf((*NoCompatibleSoftAffinityHostFault)(nil)).Elem() } type NoConnectedDatastore struct { VimFault } func init() { t["NoConnectedDatastore"] = reflect.TypeOf((*NoConnectedDatastore)(nil)).Elem() } type NoConnectedDatastoreFault NoConnectedDatastore func init() { t["NoConnectedDatastoreFault"] = reflect.TypeOf((*NoConnectedDatastoreFault)(nil)).Elem() } type NoDatastoresConfiguredEvent struct { HostEvent } func init() { t["NoDatastoresConfiguredEvent"] = reflect.TypeOf((*NoDatastoresConfiguredEvent)(nil)).Elem() } type NoDiskFound struct { VimFault } func init() { t["NoDiskFound"] = reflect.TypeOf((*NoDiskFound)(nil)).Elem() } type NoDiskFoundFault NoDiskFound func init() { t["NoDiskFoundFault"] = reflect.TypeOf((*NoDiskFoundFault)(nil)).Elem() } type NoDiskSpace struct { FileFault Datastore string `xml:"datastore"` } func init() { t["NoDiskSpace"] = reflect.TypeOf((*NoDiskSpace)(nil)).Elem() } type NoDiskSpaceFault NoDiskSpace func init() { t["NoDiskSpaceFault"] = reflect.TypeOf((*NoDiskSpaceFault)(nil)).Elem() } type NoDisksToCustomize struct { CustomizationFault } func init() { t["NoDisksToCustomize"] = reflect.TypeOf((*NoDisksToCustomize)(nil)).Elem() } type NoDisksToCustomizeFault NoDisksToCustomize func init() { t["NoDisksToCustomizeFault"] = reflect.TypeOf((*NoDisksToCustomizeFault)(nil)).Elem() } type NoGateway struct { HostConfigFault } func init() { t["NoGateway"] = reflect.TypeOf((*NoGateway)(nil)).Elem() } type NoGatewayFault NoGateway func init() { t["NoGatewayFault"] = reflect.TypeOf((*NoGatewayFault)(nil)).Elem() } type NoGuestHeartbeat struct { MigrationFault } func init() { t["NoGuestHeartbeat"] = reflect.TypeOf((*NoGuestHeartbeat)(nil)).Elem() } type NoGuestHeartbeatFault NoGuestHeartbeat func init() { t["NoGuestHeartbeatFault"] = reflect.TypeOf((*NoGuestHeartbeatFault)(nil)).Elem() } type NoHost struct { HostConnectFault Name string `xml:"name,omitempty"` } func init() { t["NoHost"] = reflect.TypeOf((*NoHost)(nil)).Elem() } type NoHostFault NoHost func init() { t["NoHostFault"] = reflect.TypeOf((*NoHostFault)(nil)).Elem() } type NoHostSuitableForFtSecondary struct { VmFaultToleranceIssue Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` } func init() { t["NoHostSuitableForFtSecondary"] = reflect.TypeOf((*NoHostSuitableForFtSecondary)(nil)).Elem() } type NoHostSuitableForFtSecondaryFault NoHostSuitableForFtSecondary func init() { t["NoHostSuitableForFtSecondaryFault"] = reflect.TypeOf((*NoHostSuitableForFtSecondaryFault)(nil)).Elem() } type NoLicenseEvent struct { LicenseEvent Feature LicenseFeatureInfo `xml:"feature"` } func init() { t["NoLicenseEvent"] = reflect.TypeOf((*NoLicenseEvent)(nil)).Elem() } type NoLicenseServerConfigured struct { NotEnoughLicenses } func init() { t["NoLicenseServerConfigured"] = reflect.TypeOf((*NoLicenseServerConfigured)(nil)).Elem() } type NoLicenseServerConfiguredFault NoLicenseServerConfigured func init() { t["NoLicenseServerConfiguredFault"] = reflect.TypeOf((*NoLicenseServerConfiguredFault)(nil)).Elem() } type NoMaintenanceModeDrsRecommendationForVM struct { VmEvent } func init() { t["NoMaintenanceModeDrsRecommendationForVM"] = reflect.TypeOf((*NoMaintenanceModeDrsRecommendationForVM)(nil)).Elem() } type NoPeerHostFound struct { HostPowerOpFailed } func init() { t["NoPeerHostFound"] = reflect.TypeOf((*NoPeerHostFound)(nil)).Elem() } type NoPeerHostFoundFault NoPeerHostFound func init() { t["NoPeerHostFoundFault"] = reflect.TypeOf((*NoPeerHostFoundFault)(nil)).Elem() } type NoPermission struct { SecurityError Object ManagedObjectReference `xml:"object"` PrivilegeId string `xml:"privilegeId"` } func init() { t["NoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem() } type NoPermissionFault BaseNoPermission func init() { t["NoPermissionFault"] = reflect.TypeOf((*NoPermissionFault)(nil)).Elem() } type NoPermissionOnAD struct { ActiveDirectoryFault } func init() { t["NoPermissionOnAD"] = reflect.TypeOf((*NoPermissionOnAD)(nil)).Elem() } type NoPermissionOnADFault NoPermissionOnAD func init() { t["NoPermissionOnADFault"] = reflect.TypeOf((*NoPermissionOnADFault)(nil)).Elem() } type NoPermissionOnHost struct { HostConnectFault } func init() { t["NoPermissionOnHost"] = reflect.TypeOf((*NoPermissionOnHost)(nil)).Elem() } type NoPermissionOnHostFault NoPermissionOnHost func init() { t["NoPermissionOnHostFault"] = reflect.TypeOf((*NoPermissionOnHostFault)(nil)).Elem() } type NoPermissionOnNasVolume struct { NasConfigFault UserName string `xml:"userName,omitempty"` } func init() { t["NoPermissionOnNasVolume"] = reflect.TypeOf((*NoPermissionOnNasVolume)(nil)).Elem() } type NoPermissionOnNasVolumeFault NoPermissionOnNasVolume func init() { t["NoPermissionOnNasVolumeFault"] = reflect.TypeOf((*NoPermissionOnNasVolumeFault)(nil)).Elem() } type NoSubjectName struct { VimFault } func init() { t["NoSubjectName"] = reflect.TypeOf((*NoSubjectName)(nil)).Elem() } type NoSubjectNameFault NoSubjectName func init() { t["NoSubjectNameFault"] = reflect.TypeOf((*NoSubjectNameFault)(nil)).Elem() } type NoVcManagedIpConfigured struct { VAppPropertyFault } func init() { t["NoVcManagedIpConfigured"] = reflect.TypeOf((*NoVcManagedIpConfigured)(nil)).Elem() } type NoVcManagedIpConfiguredFault NoVcManagedIpConfigured func init() { t["NoVcManagedIpConfiguredFault"] = reflect.TypeOf((*NoVcManagedIpConfiguredFault)(nil)).Elem() } type NoVirtualNic struct { HostConfigFault } func init() { t["NoVirtualNic"] = reflect.TypeOf((*NoVirtualNic)(nil)).Elem() } type NoVirtualNicFault NoVirtualNic func init() { t["NoVirtualNicFault"] = reflect.TypeOf((*NoVirtualNicFault)(nil)).Elem() } type NoVmInVApp struct { VAppConfigFault } func init() { t["NoVmInVApp"] = reflect.TypeOf((*NoVmInVApp)(nil)).Elem() } type NoVmInVAppFault NoVmInVApp func init() { t["NoVmInVAppFault"] = reflect.TypeOf((*NoVmInVAppFault)(nil)).Elem() } type NodeDeploymentSpec struct { DynamicData EsxHost *ManagedObjectReference `xml:"esxHost,omitempty"` Datastore *ManagedObjectReference `xml:"datastore,omitempty"` PublicNetworkPortGroup *ManagedObjectReference `xml:"publicNetworkPortGroup,omitempty"` ClusterNetworkPortGroup *ManagedObjectReference `xml:"clusterNetworkPortGroup,omitempty"` Folder ManagedObjectReference `xml:"folder"` ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` ManagementVc *ServiceLocator `xml:"managementVc,omitempty"` NodeName string `xml:"nodeName"` IpSettings CustomizationIPSettings `xml:"ipSettings"` } func init() { t["NodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem() } type NodeNetworkSpec struct { DynamicData IpSettings CustomizationIPSettings `xml:"ipSettings"` } func init() { t["NodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem() } type NonADUserRequired struct { ActiveDirectoryFault } func init() { t["NonADUserRequired"] = reflect.TypeOf((*NonADUserRequired)(nil)).Elem() } type NonADUserRequiredFault NonADUserRequired func init() { t["NonADUserRequiredFault"] = reflect.TypeOf((*NonADUserRequiredFault)(nil)).Elem() } type NonHomeRDMVMotionNotSupported struct { MigrationFeatureNotSupported Device string `xml:"device"` } func init() { t["NonHomeRDMVMotionNotSupported"] = reflect.TypeOf((*NonHomeRDMVMotionNotSupported)(nil)).Elem() } type NonHomeRDMVMotionNotSupportedFault NonHomeRDMVMotionNotSupported func init() { t["NonHomeRDMVMotionNotSupportedFault"] = reflect.TypeOf((*NonHomeRDMVMotionNotSupportedFault)(nil)).Elem() } type NonPersistentDisksNotSupported struct { DeviceNotSupported } func init() { t["NonPersistentDisksNotSupported"] = reflect.TypeOf((*NonPersistentDisksNotSupported)(nil)).Elem() } type NonPersistentDisksNotSupportedFault NonPersistentDisksNotSupported func init() { t["NonPersistentDisksNotSupportedFault"] = reflect.TypeOf((*NonPersistentDisksNotSupportedFault)(nil)).Elem() } type NonVIWorkloadDetectedOnDatastoreEvent struct { DatastoreEvent } func init() { t["NonVIWorkloadDetectedOnDatastoreEvent"] = reflect.TypeOf((*NonVIWorkloadDetectedOnDatastoreEvent)(nil)).Elem() } type NonVmwareOuiMacNotSupportedHost struct { NotSupportedHost HostName string `xml:"hostName"` } func init() { t["NonVmwareOuiMacNotSupportedHost"] = reflect.TypeOf((*NonVmwareOuiMacNotSupportedHost)(nil)).Elem() } type NonVmwareOuiMacNotSupportedHostFault NonVmwareOuiMacNotSupportedHost func init() { t["NonVmwareOuiMacNotSupportedHostFault"] = reflect.TypeOf((*NonVmwareOuiMacNotSupportedHostFault)(nil)).Elem() } type NotADirectory struct { FileFault } func init() { t["NotADirectory"] = reflect.TypeOf((*NotADirectory)(nil)).Elem() } type NotADirectoryFault NotADirectory func init() { t["NotADirectoryFault"] = reflect.TypeOf((*NotADirectoryFault)(nil)).Elem() } type NotAFile struct { FileFault } func init() { t["NotAFile"] = reflect.TypeOf((*NotAFile)(nil)).Elem() } type NotAFileFault NotAFile func init() { t["NotAFileFault"] = reflect.TypeOf((*NotAFileFault)(nil)).Elem() } type NotAuthenticated struct { NoPermission } func init() { t["NotAuthenticated"] = reflect.TypeOf((*NotAuthenticated)(nil)).Elem() } type NotAuthenticatedFault NotAuthenticated func init() { t["NotAuthenticatedFault"] = reflect.TypeOf((*NotAuthenticatedFault)(nil)).Elem() } type NotEnoughCpus struct { VirtualHardwareCompatibilityIssue NumCpuDest int32 `xml:"numCpuDest"` NumCpuVm int32 `xml:"numCpuVm"` } func init() { t["NotEnoughCpus"] = reflect.TypeOf((*NotEnoughCpus)(nil)).Elem() } type NotEnoughCpusFault BaseNotEnoughCpus func init() { t["NotEnoughCpusFault"] = reflect.TypeOf((*NotEnoughCpusFault)(nil)).Elem() } type NotEnoughLicenses struct { RuntimeFault } func init() { t["NotEnoughLicenses"] = reflect.TypeOf((*NotEnoughLicenses)(nil)).Elem() } type NotEnoughLicensesFault BaseNotEnoughLicenses func init() { t["NotEnoughLicensesFault"] = reflect.TypeOf((*NotEnoughLicensesFault)(nil)).Elem() } type NotEnoughLogicalCpus struct { NotEnoughCpus Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["NotEnoughLogicalCpus"] = reflect.TypeOf((*NotEnoughLogicalCpus)(nil)).Elem() } type NotEnoughLogicalCpusFault NotEnoughLogicalCpus func init() { t["NotEnoughLogicalCpusFault"] = reflect.TypeOf((*NotEnoughLogicalCpusFault)(nil)).Elem() } type NotEnoughResourcesToStartVmEvent struct { VmEvent Reason string `xml:"reason,omitempty"` } func init() { t["NotEnoughResourcesToStartVmEvent"] = reflect.TypeOf((*NotEnoughResourcesToStartVmEvent)(nil)).Elem() } type NotFound struct { VimFault } func init() { t["NotFound"] = reflect.TypeOf((*NotFound)(nil)).Elem() } type NotFoundFault NotFound func init() { t["NotFoundFault"] = reflect.TypeOf((*NotFoundFault)(nil)).Elem() } type NotImplemented struct { RuntimeFault } func init() { t["NotImplemented"] = reflect.TypeOf((*NotImplemented)(nil)).Elem() } type NotImplementedFault NotImplemented func init() { t["NotImplementedFault"] = reflect.TypeOf((*NotImplementedFault)(nil)).Elem() } type NotSupported struct { RuntimeFault } func init() { t["NotSupported"] = reflect.TypeOf((*NotSupported)(nil)).Elem() } type NotSupportedDeviceForFT struct { VmFaultToleranceIssue Host ManagedObjectReference `xml:"host"` HostName string `xml:"hostName,omitempty"` Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName,omitempty"` DeviceType string `xml:"deviceType"` DeviceLabel string `xml:"deviceLabel,omitempty"` } func init() { t["NotSupportedDeviceForFT"] = reflect.TypeOf((*NotSupportedDeviceForFT)(nil)).Elem() } type NotSupportedDeviceForFTFault NotSupportedDeviceForFT func init() { t["NotSupportedDeviceForFTFault"] = reflect.TypeOf((*NotSupportedDeviceForFTFault)(nil)).Elem() } type NotSupportedFault BaseNotSupported func init() { t["NotSupportedFault"] = reflect.TypeOf((*NotSupportedFault)(nil)).Elem() } type NotSupportedHost struct { HostConnectFault ProductName string `xml:"productName,omitempty"` ProductVersion string `xml:"productVersion,omitempty"` } func init() { t["NotSupportedHost"] = reflect.TypeOf((*NotSupportedHost)(nil)).Elem() } type NotSupportedHostFault BaseNotSupportedHost func init() { t["NotSupportedHostFault"] = reflect.TypeOf((*NotSupportedHostFault)(nil)).Elem() } type NotSupportedHostForChecksum struct { VimFault } func init() { t["NotSupportedHostForChecksum"] = reflect.TypeOf((*NotSupportedHostForChecksum)(nil)).Elem() } type NotSupportedHostForChecksumFault NotSupportedHostForChecksum func init() { t["NotSupportedHostForChecksumFault"] = reflect.TypeOf((*NotSupportedHostForChecksumFault)(nil)).Elem() } type NotSupportedHostForVFlash struct { NotSupportedHost HostName string `xml:"hostName"` } func init() { t["NotSupportedHostForVFlash"] = reflect.TypeOf((*NotSupportedHostForVFlash)(nil)).Elem() } type NotSupportedHostForVFlashFault NotSupportedHostForVFlash func init() { t["NotSupportedHostForVFlashFault"] = reflect.TypeOf((*NotSupportedHostForVFlashFault)(nil)).Elem() } type NotSupportedHostForVmcp struct { NotSupportedHost HostName string `xml:"hostName"` } func init() { t["NotSupportedHostForVmcp"] = reflect.TypeOf((*NotSupportedHostForVmcp)(nil)).Elem() } type NotSupportedHostForVmcpFault NotSupportedHostForVmcp func init() { t["NotSupportedHostForVmcpFault"] = reflect.TypeOf((*NotSupportedHostForVmcpFault)(nil)).Elem() } type NotSupportedHostForVmemFile struct { NotSupportedHost HostName string `xml:"hostName"` } func init() { t["NotSupportedHostForVmemFile"] = reflect.TypeOf((*NotSupportedHostForVmemFile)(nil)).Elem() } type NotSupportedHostForVmemFileFault NotSupportedHostForVmemFile func init() { t["NotSupportedHostForVmemFileFault"] = reflect.TypeOf((*NotSupportedHostForVmemFileFault)(nil)).Elem() } type NotSupportedHostForVsan struct { NotSupportedHost HostName string `xml:"hostName"` } func init() { t["NotSupportedHostForVsan"] = reflect.TypeOf((*NotSupportedHostForVsan)(nil)).Elem() } type NotSupportedHostForVsanFault NotSupportedHostForVsan func init() { t["NotSupportedHostForVsanFault"] = reflect.TypeOf((*NotSupportedHostForVsanFault)(nil)).Elem() } type NotSupportedHostInCluster struct { NotSupportedHost } func init() { t["NotSupportedHostInCluster"] = reflect.TypeOf((*NotSupportedHostInCluster)(nil)).Elem() } type NotSupportedHostInClusterFault BaseNotSupportedHostInCluster func init() { t["NotSupportedHostInClusterFault"] = reflect.TypeOf((*NotSupportedHostInClusterFault)(nil)).Elem() } type NotSupportedHostInDvs struct { NotSupportedHost SwitchProductSpec DistributedVirtualSwitchProductSpec `xml:"switchProductSpec"` } func init() { t["NotSupportedHostInDvs"] = reflect.TypeOf((*NotSupportedHostInDvs)(nil)).Elem() } type NotSupportedHostInDvsFault NotSupportedHostInDvs func init() { t["NotSupportedHostInDvsFault"] = reflect.TypeOf((*NotSupportedHostInDvsFault)(nil)).Elem() } type NotSupportedHostInHACluster struct { NotSupportedHost HostName string `xml:"hostName"` Build string `xml:"build"` } func init() { t["NotSupportedHostInHACluster"] = reflect.TypeOf((*NotSupportedHostInHACluster)(nil)).Elem() } type NotSupportedHostInHAClusterFault NotSupportedHostInHACluster func init() { t["NotSupportedHostInHAClusterFault"] = reflect.TypeOf((*NotSupportedHostInHAClusterFault)(nil)).Elem() } type NotUserConfigurableProperty struct { VAppPropertyFault } func init() { t["NotUserConfigurableProperty"] = reflect.TypeOf((*NotUserConfigurableProperty)(nil)).Elem() } type NotUserConfigurablePropertyFault NotUserConfigurableProperty func init() { t["NotUserConfigurablePropertyFault"] = reflect.TypeOf((*NotUserConfigurablePropertyFault)(nil)).Elem() } type NumPortsProfile struct { ApplyProfile } func init() { t["NumPortsProfile"] = reflect.TypeOf((*NumPortsProfile)(nil)).Elem() } type NumVirtualCoresPerSocketNotSupported struct { VirtualHardwareCompatibilityIssue MaxSupportedCoresPerSocketDest int32 `xml:"maxSupportedCoresPerSocketDest"` NumCoresPerSocketVm int32 `xml:"numCoresPerSocketVm"` } func init() { t["NumVirtualCoresPerSocketNotSupported"] = reflect.TypeOf((*NumVirtualCoresPerSocketNotSupported)(nil)).Elem() } type NumVirtualCoresPerSocketNotSupportedFault NumVirtualCoresPerSocketNotSupported func init() { t["NumVirtualCoresPerSocketNotSupportedFault"] = reflect.TypeOf((*NumVirtualCoresPerSocketNotSupportedFault)(nil)).Elem() } type NumVirtualCpusExceedsLimit struct { InsufficientResourcesFault MaxSupportedVcpus int32 `xml:"maxSupportedVcpus"` } func init() { t["NumVirtualCpusExceedsLimit"] = reflect.TypeOf((*NumVirtualCpusExceedsLimit)(nil)).Elem() } type NumVirtualCpusExceedsLimitFault NumVirtualCpusExceedsLimit func init() { t["NumVirtualCpusExceedsLimitFault"] = reflect.TypeOf((*NumVirtualCpusExceedsLimitFault)(nil)).Elem() } type NumVirtualCpusIncompatible struct { VmConfigFault Reason string `xml:"reason"` NumCpu int32 `xml:"numCpu"` } func init() { t["NumVirtualCpusIncompatible"] = reflect.TypeOf((*NumVirtualCpusIncompatible)(nil)).Elem() } type NumVirtualCpusIncompatibleFault NumVirtualCpusIncompatible func init() { t["NumVirtualCpusIncompatibleFault"] = reflect.TypeOf((*NumVirtualCpusIncompatibleFault)(nil)).Elem() } type NumVirtualCpusNotSupported struct { VirtualHardwareCompatibilityIssue MaxSupportedVcpusDest int32 `xml:"maxSupportedVcpusDest"` NumCpuVm int32 `xml:"numCpuVm"` } func init() { t["NumVirtualCpusNotSupported"] = reflect.TypeOf((*NumVirtualCpusNotSupported)(nil)).Elem() } type NumVirtualCpusNotSupportedFault NumVirtualCpusNotSupported func init() { t["NumVirtualCpusNotSupportedFault"] = reflect.TypeOf((*NumVirtualCpusNotSupportedFault)(nil)).Elem() } type NumericRange struct { DynamicData Start int32 `xml:"start"` End int32 `xml:"end"` } func init() { t["NumericRange"] = reflect.TypeOf((*NumericRange)(nil)).Elem() } type ObjectContent struct { DynamicData Obj ManagedObjectReference `xml:"obj"` PropSet []DynamicProperty `xml:"propSet,omitempty"` MissingSet []MissingProperty `xml:"missingSet,omitempty"` } func init() { t["ObjectContent"] = reflect.TypeOf((*ObjectContent)(nil)).Elem() } type ObjectSpec struct { DynamicData Obj ManagedObjectReference `xml:"obj"` Skip *bool `xml:"skip"` SelectSet []BaseSelectionSpec `xml:"selectSet,omitempty,typeattr"` } func init() { t["ObjectSpec"] = reflect.TypeOf((*ObjectSpec)(nil)).Elem() } type ObjectUpdate struct { DynamicData Kind ObjectUpdateKind `xml:"kind"` Obj ManagedObjectReference `xml:"obj"` ChangeSet []PropertyChange `xml:"changeSet,omitempty"` MissingSet []MissingProperty `xml:"missingSet,omitempty"` } func init() { t["ObjectUpdate"] = reflect.TypeOf((*ObjectUpdate)(nil)).Elem() } type OnceTaskScheduler struct { TaskScheduler RunAt *time.Time `xml:"runAt"` } func init() { t["OnceTaskScheduler"] = reflect.TypeOf((*OnceTaskScheduler)(nil)).Elem() } type OpaqueNetworkCapability struct { DynamicData NetworkReservationSupported bool `xml:"networkReservationSupported"` } func init() { t["OpaqueNetworkCapability"] = reflect.TypeOf((*OpaqueNetworkCapability)(nil)).Elem() } type OpaqueNetworkSummary struct { NetworkSummary OpaqueNetworkId string `xml:"opaqueNetworkId"` OpaqueNetworkType string `xml:"opaqueNetworkType"` } func init() { t["OpaqueNetworkSummary"] = reflect.TypeOf((*OpaqueNetworkSummary)(nil)).Elem() } type OpaqueNetworkTargetInfo struct { VirtualMachineTargetInfo Network OpaqueNetworkSummary `xml:"network"` NetworkReservationSupported *bool `xml:"networkReservationSupported"` } func init() { t["OpaqueNetworkTargetInfo"] = reflect.TypeOf((*OpaqueNetworkTargetInfo)(nil)).Elem() } type OpenInventoryViewFolder OpenInventoryViewFolderRequestType func init() { t["OpenInventoryViewFolder"] = reflect.TypeOf((*OpenInventoryViewFolder)(nil)).Elem() } type OpenInventoryViewFolderRequestType struct { This ManagedObjectReference `xml:"_this"` Entity []ManagedObjectReference `xml:"entity"` } func init() { t["OpenInventoryViewFolderRequestType"] = reflect.TypeOf((*OpenInventoryViewFolderRequestType)(nil)).Elem() } type OpenInventoryViewFolderResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type OperationDisabledByGuest struct { GuestOperationsFault } func init() { t["OperationDisabledByGuest"] = reflect.TypeOf((*OperationDisabledByGuest)(nil)).Elem() } type OperationDisabledByGuestFault OperationDisabledByGuest func init() { t["OperationDisabledByGuestFault"] = reflect.TypeOf((*OperationDisabledByGuestFault)(nil)).Elem() } type OperationDisallowedOnHost struct { RuntimeFault } func init() { t["OperationDisallowedOnHost"] = reflect.TypeOf((*OperationDisallowedOnHost)(nil)).Elem() } type OperationDisallowedOnHostFault OperationDisallowedOnHost func init() { t["OperationDisallowedOnHostFault"] = reflect.TypeOf((*OperationDisallowedOnHostFault)(nil)).Elem() } type OperationNotSupportedByGuest struct { GuestOperationsFault } func init() { t["OperationNotSupportedByGuest"] = reflect.TypeOf((*OperationNotSupportedByGuest)(nil)).Elem() } type OperationNotSupportedByGuestFault OperationNotSupportedByGuest func init() { t["OperationNotSupportedByGuestFault"] = reflect.TypeOf((*OperationNotSupportedByGuestFault)(nil)).Elem() } type OptionDef struct { ElementDescription OptionType BaseOptionType `xml:"optionType,typeattr"` } func init() { t["OptionDef"] = reflect.TypeOf((*OptionDef)(nil)).Elem() } type OptionProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["OptionProfile"] = reflect.TypeOf((*OptionProfile)(nil)).Elem() } type OptionType struct { DynamicData ValueIsReadonly *bool `xml:"valueIsReadonly"` } func init() { t["OptionType"] = reflect.TypeOf((*OptionType)(nil)).Elem() } type OptionValue struct { DynamicData Key string `xml:"key"` Value AnyType `xml:"value,typeattr"` } func init() { t["OptionValue"] = reflect.TypeOf((*OptionValue)(nil)).Elem() } type OrAlarmExpression struct { AlarmExpression Expression []BaseAlarmExpression `xml:"expression,typeattr"` } func init() { t["OrAlarmExpression"] = reflect.TypeOf((*OrAlarmExpression)(nil)).Elem() } type OutOfBounds struct { VimFault ArgumentName string `xml:"argumentName"` } func init() { t["OutOfBounds"] = reflect.TypeOf((*OutOfBounds)(nil)).Elem() } type OutOfBoundsFault OutOfBounds func init() { t["OutOfBoundsFault"] = reflect.TypeOf((*OutOfBoundsFault)(nil)).Elem() } type OutOfSyncDvsHost struct { DvsEvent HostOutOfSync []DvsOutOfSyncHostArgument `xml:"hostOutOfSync"` } func init() { t["OutOfSyncDvsHost"] = reflect.TypeOf((*OutOfSyncDvsHost)(nil)).Elem() } type OverwriteCustomizationSpec OverwriteCustomizationSpecRequestType func init() { t["OverwriteCustomizationSpec"] = reflect.TypeOf((*OverwriteCustomizationSpec)(nil)).Elem() } type OverwriteCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Item CustomizationSpecItem `xml:"item"` } func init() { t["OverwriteCustomizationSpecRequestType"] = reflect.TypeOf((*OverwriteCustomizationSpecRequestType)(nil)).Elem() } type OverwriteCustomizationSpecResponse struct { } type OvfAttribute struct { OvfInvalidPackage ElementName string `xml:"elementName"` AttributeName string `xml:"attributeName"` } func init() { t["OvfAttribute"] = reflect.TypeOf((*OvfAttribute)(nil)).Elem() } type OvfAttributeFault BaseOvfAttribute func init() { t["OvfAttributeFault"] = reflect.TypeOf((*OvfAttributeFault)(nil)).Elem() } type OvfConnectedDevice struct { OvfHardwareExport } func init() { t["OvfConnectedDevice"] = reflect.TypeOf((*OvfConnectedDevice)(nil)).Elem() } type OvfConnectedDeviceFault BaseOvfConnectedDevice func init() { t["OvfConnectedDeviceFault"] = reflect.TypeOf((*OvfConnectedDeviceFault)(nil)).Elem() } type OvfConnectedDeviceFloppy struct { OvfConnectedDevice Filename string `xml:"filename"` } func init() { t["OvfConnectedDeviceFloppy"] = reflect.TypeOf((*OvfConnectedDeviceFloppy)(nil)).Elem() } type OvfConnectedDeviceFloppyFault OvfConnectedDeviceFloppy func init() { t["OvfConnectedDeviceFloppyFault"] = reflect.TypeOf((*OvfConnectedDeviceFloppyFault)(nil)).Elem() } type OvfConnectedDeviceIso struct { OvfConnectedDevice Filename string `xml:"filename"` } func init() { t["OvfConnectedDeviceIso"] = reflect.TypeOf((*OvfConnectedDeviceIso)(nil)).Elem() } type OvfConnectedDeviceIsoFault OvfConnectedDeviceIso func init() { t["OvfConnectedDeviceIsoFault"] = reflect.TypeOf((*OvfConnectedDeviceIsoFault)(nil)).Elem() } type OvfConstraint struct { OvfInvalidPackage Name string `xml:"name"` } func init() { t["OvfConstraint"] = reflect.TypeOf((*OvfConstraint)(nil)).Elem() } type OvfConstraintFault BaseOvfConstraint func init() { t["OvfConstraintFault"] = reflect.TypeOf((*OvfConstraintFault)(nil)).Elem() } type OvfConsumerCallbackFault struct { OvfFault ExtensionKey string `xml:"extensionKey"` ExtensionName string `xml:"extensionName"` } func init() { t["OvfConsumerCallbackFault"] = reflect.TypeOf((*OvfConsumerCallbackFault)(nil)).Elem() } type OvfConsumerCallbackFaultFault BaseOvfConsumerCallbackFault func init() { t["OvfConsumerCallbackFaultFault"] = reflect.TypeOf((*OvfConsumerCallbackFaultFault)(nil)).Elem() } type OvfConsumerCommunicationError struct { OvfConsumerCallbackFault Description string `xml:"description"` } func init() { t["OvfConsumerCommunicationError"] = reflect.TypeOf((*OvfConsumerCommunicationError)(nil)).Elem() } type OvfConsumerCommunicationErrorFault OvfConsumerCommunicationError func init() { t["OvfConsumerCommunicationErrorFault"] = reflect.TypeOf((*OvfConsumerCommunicationErrorFault)(nil)).Elem() } type OvfConsumerFault struct { OvfConsumerCallbackFault ErrorKey string `xml:"errorKey"` Message string `xml:"message"` Params []KeyValue `xml:"params,omitempty"` } func init() { t["OvfConsumerFault"] = reflect.TypeOf((*OvfConsumerFault)(nil)).Elem() } type OvfConsumerFaultFault OvfConsumerFault func init() { t["OvfConsumerFaultFault"] = reflect.TypeOf((*OvfConsumerFaultFault)(nil)).Elem() } type OvfConsumerInvalidSection struct { OvfConsumerCallbackFault LineNumber int32 `xml:"lineNumber"` Description string `xml:"description"` } func init() { t["OvfConsumerInvalidSection"] = reflect.TypeOf((*OvfConsumerInvalidSection)(nil)).Elem() } type OvfConsumerInvalidSectionFault OvfConsumerInvalidSection func init() { t["OvfConsumerInvalidSectionFault"] = reflect.TypeOf((*OvfConsumerInvalidSectionFault)(nil)).Elem() } type OvfConsumerOstNode struct { DynamicData Id string `xml:"id"` Type string `xml:"type"` Section []OvfConsumerOvfSection `xml:"section,omitempty"` Child []OvfConsumerOstNode `xml:"child,omitempty"` Entity *ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["OvfConsumerOstNode"] = reflect.TypeOf((*OvfConsumerOstNode)(nil)).Elem() } type OvfConsumerOvfSection struct { DynamicData LineNumber int32 `xml:"lineNumber"` Xml string `xml:"xml"` } func init() { t["OvfConsumerOvfSection"] = reflect.TypeOf((*OvfConsumerOvfSection)(nil)).Elem() } type OvfConsumerPowerOnFault struct { InvalidState ExtensionKey string `xml:"extensionKey"` ExtensionName string `xml:"extensionName"` Description string `xml:"description"` } func init() { t["OvfConsumerPowerOnFault"] = reflect.TypeOf((*OvfConsumerPowerOnFault)(nil)).Elem() } type OvfConsumerPowerOnFaultFault OvfConsumerPowerOnFault func init() { t["OvfConsumerPowerOnFaultFault"] = reflect.TypeOf((*OvfConsumerPowerOnFaultFault)(nil)).Elem() } type OvfConsumerUndeclaredSection struct { OvfConsumerCallbackFault QualifiedSectionType string `xml:"qualifiedSectionType"` } func init() { t["OvfConsumerUndeclaredSection"] = reflect.TypeOf((*OvfConsumerUndeclaredSection)(nil)).Elem() } type OvfConsumerUndeclaredSectionFault OvfConsumerUndeclaredSection func init() { t["OvfConsumerUndeclaredSectionFault"] = reflect.TypeOf((*OvfConsumerUndeclaredSectionFault)(nil)).Elem() } type OvfConsumerUndefinedPrefix struct { OvfConsumerCallbackFault Prefix string `xml:"prefix"` } func init() { t["OvfConsumerUndefinedPrefix"] = reflect.TypeOf((*OvfConsumerUndefinedPrefix)(nil)).Elem() } type OvfConsumerUndefinedPrefixFault OvfConsumerUndefinedPrefix func init() { t["OvfConsumerUndefinedPrefixFault"] = reflect.TypeOf((*OvfConsumerUndefinedPrefixFault)(nil)).Elem() } type OvfConsumerValidationFault struct { VmConfigFault ExtensionKey string `xml:"extensionKey"` ExtensionName string `xml:"extensionName"` Message string `xml:"message"` } func init() { t["OvfConsumerValidationFault"] = reflect.TypeOf((*OvfConsumerValidationFault)(nil)).Elem() } type OvfConsumerValidationFaultFault OvfConsumerValidationFault func init() { t["OvfConsumerValidationFaultFault"] = reflect.TypeOf((*OvfConsumerValidationFaultFault)(nil)).Elem() } type OvfCpuCompatibility struct { OvfImport RegisterName string `xml:"registerName"` Level int32 `xml:"level"` RegisterValue string `xml:"registerValue"` DesiredRegisterValue string `xml:"desiredRegisterValue"` } func init() { t["OvfCpuCompatibility"] = reflect.TypeOf((*OvfCpuCompatibility)(nil)).Elem() } type OvfCpuCompatibilityCheckNotSupported struct { OvfImport } func init() { t["OvfCpuCompatibilityCheckNotSupported"] = reflect.TypeOf((*OvfCpuCompatibilityCheckNotSupported)(nil)).Elem() } type OvfCpuCompatibilityCheckNotSupportedFault OvfCpuCompatibilityCheckNotSupported func init() { t["OvfCpuCompatibilityCheckNotSupportedFault"] = reflect.TypeOf((*OvfCpuCompatibilityCheckNotSupportedFault)(nil)).Elem() } type OvfCpuCompatibilityFault OvfCpuCompatibility func init() { t["OvfCpuCompatibilityFault"] = reflect.TypeOf((*OvfCpuCompatibilityFault)(nil)).Elem() } type OvfCreateDescriptorParams struct { DynamicData OvfFiles []OvfFile `xml:"ovfFiles,omitempty"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` IncludeImageFiles *bool `xml:"includeImageFiles"` ExportOption []string `xml:"exportOption,omitempty"` Snapshot *ManagedObjectReference `xml:"snapshot,omitempty"` } func init() { t["OvfCreateDescriptorParams"] = reflect.TypeOf((*OvfCreateDescriptorParams)(nil)).Elem() } type OvfCreateDescriptorResult struct { DynamicData OvfDescriptor string `xml:"ovfDescriptor"` Error []LocalizedMethodFault `xml:"error,omitempty"` Warning []LocalizedMethodFault `xml:"warning,omitempty"` IncludeImageFiles *bool `xml:"includeImageFiles"` } func init() { t["OvfCreateDescriptorResult"] = reflect.TypeOf((*OvfCreateDescriptorResult)(nil)).Elem() } type OvfCreateImportSpecParams struct { OvfManagerCommonParams EntityName string `xml:"entityName"` HostSystem *ManagedObjectReference `xml:"hostSystem,omitempty"` NetworkMapping []OvfNetworkMapping `xml:"networkMapping,omitempty"` IpAllocationPolicy string `xml:"ipAllocationPolicy,omitempty"` IpProtocol string `xml:"ipProtocol,omitempty"` PropertyMapping []KeyValue `xml:"propertyMapping,omitempty"` ResourceMapping []OvfResourceMap `xml:"resourceMapping,omitempty"` DiskProvisioning string `xml:"diskProvisioning,omitempty"` InstantiationOst *OvfConsumerOstNode `xml:"instantiationOst,omitempty"` } func init() { t["OvfCreateImportSpecParams"] = reflect.TypeOf((*OvfCreateImportSpecParams)(nil)).Elem() } type OvfCreateImportSpecResult struct { DynamicData ImportSpec BaseImportSpec `xml:"importSpec,omitempty,typeattr"` FileItem []OvfFileItem `xml:"fileItem,omitempty"` Warning []LocalizedMethodFault `xml:"warning,omitempty"` Error []LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["OvfCreateImportSpecResult"] = reflect.TypeOf((*OvfCreateImportSpecResult)(nil)).Elem() } type OvfDeploymentOption struct { DynamicData Key string `xml:"key"` Label string `xml:"label"` Description string `xml:"description"` } func init() { t["OvfDeploymentOption"] = reflect.TypeOf((*OvfDeploymentOption)(nil)).Elem() } type OvfDiskMappingNotFound struct { OvfSystemFault DiskName string `xml:"diskName"` VmName string `xml:"vmName"` } func init() { t["OvfDiskMappingNotFound"] = reflect.TypeOf((*OvfDiskMappingNotFound)(nil)).Elem() } type OvfDiskMappingNotFoundFault OvfDiskMappingNotFound func init() { t["OvfDiskMappingNotFoundFault"] = reflect.TypeOf((*OvfDiskMappingNotFoundFault)(nil)).Elem() } type OvfDiskOrderConstraint struct { OvfConstraint } func init() { t["OvfDiskOrderConstraint"] = reflect.TypeOf((*OvfDiskOrderConstraint)(nil)).Elem() } type OvfDiskOrderConstraintFault OvfDiskOrderConstraint func init() { t["OvfDiskOrderConstraintFault"] = reflect.TypeOf((*OvfDiskOrderConstraintFault)(nil)).Elem() } type OvfDuplicateElement struct { OvfElement } func init() { t["OvfDuplicateElement"] = reflect.TypeOf((*OvfDuplicateElement)(nil)).Elem() } type OvfDuplicateElementFault OvfDuplicateElement func init() { t["OvfDuplicateElementFault"] = reflect.TypeOf((*OvfDuplicateElementFault)(nil)).Elem() } type OvfDuplicatedElementBoundary struct { OvfElement Boundary string `xml:"boundary"` } func init() { t["OvfDuplicatedElementBoundary"] = reflect.TypeOf((*OvfDuplicatedElementBoundary)(nil)).Elem() } type OvfDuplicatedElementBoundaryFault OvfDuplicatedElementBoundary func init() { t["OvfDuplicatedElementBoundaryFault"] = reflect.TypeOf((*OvfDuplicatedElementBoundaryFault)(nil)).Elem() } type OvfDuplicatedPropertyIdExport struct { OvfExport Fqid string `xml:"fqid"` } func init() { t["OvfDuplicatedPropertyIdExport"] = reflect.TypeOf((*OvfDuplicatedPropertyIdExport)(nil)).Elem() } type OvfDuplicatedPropertyIdExportFault OvfDuplicatedPropertyIdExport func init() { t["OvfDuplicatedPropertyIdExportFault"] = reflect.TypeOf((*OvfDuplicatedPropertyIdExportFault)(nil)).Elem() } type OvfDuplicatedPropertyIdImport struct { OvfExport } func init() { t["OvfDuplicatedPropertyIdImport"] = reflect.TypeOf((*OvfDuplicatedPropertyIdImport)(nil)).Elem() } type OvfDuplicatedPropertyIdImportFault OvfDuplicatedPropertyIdImport func init() { t["OvfDuplicatedPropertyIdImportFault"] = reflect.TypeOf((*OvfDuplicatedPropertyIdImportFault)(nil)).Elem() } type OvfElement struct { OvfInvalidPackage Name string `xml:"name"` } func init() { t["OvfElement"] = reflect.TypeOf((*OvfElement)(nil)).Elem() } type OvfElementFault BaseOvfElement func init() { t["OvfElementFault"] = reflect.TypeOf((*OvfElementFault)(nil)).Elem() } type OvfElementInvalidValue struct { OvfElement Value string `xml:"value"` } func init() { t["OvfElementInvalidValue"] = reflect.TypeOf((*OvfElementInvalidValue)(nil)).Elem() } type OvfElementInvalidValueFault OvfElementInvalidValue func init() { t["OvfElementInvalidValueFault"] = reflect.TypeOf((*OvfElementInvalidValueFault)(nil)).Elem() } type OvfExport struct { OvfFault } func init() { t["OvfExport"] = reflect.TypeOf((*OvfExport)(nil)).Elem() } type OvfExportFailed struct { OvfExport } func init() { t["OvfExportFailed"] = reflect.TypeOf((*OvfExportFailed)(nil)).Elem() } type OvfExportFailedFault OvfExportFailed func init() { t["OvfExportFailedFault"] = reflect.TypeOf((*OvfExportFailedFault)(nil)).Elem() } type OvfExportFault BaseOvfExport func init() { t["OvfExportFault"] = reflect.TypeOf((*OvfExportFault)(nil)).Elem() } type OvfFault struct { VimFault } func init() { t["OvfFault"] = reflect.TypeOf((*OvfFault)(nil)).Elem() } type OvfFaultFault BaseOvfFault func init() { t["OvfFaultFault"] = reflect.TypeOf((*OvfFaultFault)(nil)).Elem() } type OvfFile struct { DynamicData DeviceId string `xml:"deviceId"` Path string `xml:"path"` CompressionMethod string `xml:"compressionMethod,omitempty"` ChunkSize int64 `xml:"chunkSize,omitempty"` Size int64 `xml:"size"` Capacity int64 `xml:"capacity,omitempty"` PopulatedSize int64 `xml:"populatedSize,omitempty"` } func init() { t["OvfFile"] = reflect.TypeOf((*OvfFile)(nil)).Elem() } type OvfFileItem struct { DynamicData DeviceId string `xml:"deviceId"` Path string `xml:"path"` CompressionMethod string `xml:"compressionMethod,omitempty"` ChunkSize int64 `xml:"chunkSize,omitempty"` Size int64 `xml:"size,omitempty"` CimType int32 `xml:"cimType"` Create bool `xml:"create"` } func init() { t["OvfFileItem"] = reflect.TypeOf((*OvfFileItem)(nil)).Elem() } type OvfHardwareCheck struct { OvfImport } func init() { t["OvfHardwareCheck"] = reflect.TypeOf((*OvfHardwareCheck)(nil)).Elem() } type OvfHardwareCheckFault OvfHardwareCheck func init() { t["OvfHardwareCheckFault"] = reflect.TypeOf((*OvfHardwareCheckFault)(nil)).Elem() } type OvfHardwareExport struct { OvfExport Device BaseVirtualDevice `xml:"device,omitempty,typeattr"` VmPath string `xml:"vmPath"` } func init() { t["OvfHardwareExport"] = reflect.TypeOf((*OvfHardwareExport)(nil)).Elem() } type OvfHardwareExportFault BaseOvfHardwareExport func init() { t["OvfHardwareExportFault"] = reflect.TypeOf((*OvfHardwareExportFault)(nil)).Elem() } type OvfHostResourceConstraint struct { OvfConstraint Value string `xml:"value"` } func init() { t["OvfHostResourceConstraint"] = reflect.TypeOf((*OvfHostResourceConstraint)(nil)).Elem() } type OvfHostResourceConstraintFault OvfHostResourceConstraint func init() { t["OvfHostResourceConstraintFault"] = reflect.TypeOf((*OvfHostResourceConstraintFault)(nil)).Elem() } type OvfHostValueNotParsed struct { OvfSystemFault Property string `xml:"property"` Value string `xml:"value"` } func init() { t["OvfHostValueNotParsed"] = reflect.TypeOf((*OvfHostValueNotParsed)(nil)).Elem() } type OvfHostValueNotParsedFault OvfHostValueNotParsed func init() { t["OvfHostValueNotParsedFault"] = reflect.TypeOf((*OvfHostValueNotParsedFault)(nil)).Elem() } type OvfImport struct { OvfFault } func init() { t["OvfImport"] = reflect.TypeOf((*OvfImport)(nil)).Elem() } type OvfImportFailed struct { OvfImport } func init() { t["OvfImportFailed"] = reflect.TypeOf((*OvfImportFailed)(nil)).Elem() } type OvfImportFailedFault OvfImportFailed func init() { t["OvfImportFailedFault"] = reflect.TypeOf((*OvfImportFailedFault)(nil)).Elem() } type OvfImportFault BaseOvfImport func init() { t["OvfImportFault"] = reflect.TypeOf((*OvfImportFault)(nil)).Elem() } type OvfInternalError struct { OvfSystemFault } func init() { t["OvfInternalError"] = reflect.TypeOf((*OvfInternalError)(nil)).Elem() } type OvfInternalErrorFault OvfInternalError func init() { t["OvfInternalErrorFault"] = reflect.TypeOf((*OvfInternalErrorFault)(nil)).Elem() } type OvfInvalidPackage struct { OvfFault LineNumber int32 `xml:"lineNumber"` } func init() { t["OvfInvalidPackage"] = reflect.TypeOf((*OvfInvalidPackage)(nil)).Elem() } type OvfInvalidPackageFault BaseOvfInvalidPackage func init() { t["OvfInvalidPackageFault"] = reflect.TypeOf((*OvfInvalidPackageFault)(nil)).Elem() } type OvfInvalidValue struct { OvfAttribute Value string `xml:"value"` } func init() { t["OvfInvalidValue"] = reflect.TypeOf((*OvfInvalidValue)(nil)).Elem() } type OvfInvalidValueConfiguration struct { OvfInvalidValue } func init() { t["OvfInvalidValueConfiguration"] = reflect.TypeOf((*OvfInvalidValueConfiguration)(nil)).Elem() } type OvfInvalidValueConfigurationFault OvfInvalidValueConfiguration func init() { t["OvfInvalidValueConfigurationFault"] = reflect.TypeOf((*OvfInvalidValueConfigurationFault)(nil)).Elem() } type OvfInvalidValueEmpty struct { OvfInvalidValue } func init() { t["OvfInvalidValueEmpty"] = reflect.TypeOf((*OvfInvalidValueEmpty)(nil)).Elem() } type OvfInvalidValueEmptyFault OvfInvalidValueEmpty func init() { t["OvfInvalidValueEmptyFault"] = reflect.TypeOf((*OvfInvalidValueEmptyFault)(nil)).Elem() } type OvfInvalidValueFault BaseOvfInvalidValue func init() { t["OvfInvalidValueFault"] = reflect.TypeOf((*OvfInvalidValueFault)(nil)).Elem() } type OvfInvalidValueFormatMalformed struct { OvfInvalidValue } func init() { t["OvfInvalidValueFormatMalformed"] = reflect.TypeOf((*OvfInvalidValueFormatMalformed)(nil)).Elem() } type OvfInvalidValueFormatMalformedFault OvfInvalidValueFormatMalformed func init() { t["OvfInvalidValueFormatMalformedFault"] = reflect.TypeOf((*OvfInvalidValueFormatMalformedFault)(nil)).Elem() } type OvfInvalidValueReference struct { OvfInvalidValue } func init() { t["OvfInvalidValueReference"] = reflect.TypeOf((*OvfInvalidValueReference)(nil)).Elem() } type OvfInvalidValueReferenceFault OvfInvalidValueReference func init() { t["OvfInvalidValueReferenceFault"] = reflect.TypeOf((*OvfInvalidValueReferenceFault)(nil)).Elem() } type OvfInvalidVmName struct { OvfUnsupportedPackage Name string `xml:"name"` } func init() { t["OvfInvalidVmName"] = reflect.TypeOf((*OvfInvalidVmName)(nil)).Elem() } type OvfInvalidVmNameFault OvfInvalidVmName func init() { t["OvfInvalidVmNameFault"] = reflect.TypeOf((*OvfInvalidVmNameFault)(nil)).Elem() } type OvfManagerCommonParams struct { DynamicData Locale string `xml:"locale"` DeploymentOption string `xml:"deploymentOption"` MsgBundle []KeyValue `xml:"msgBundle,omitempty"` ImportOption []string `xml:"importOption,omitempty"` } func init() { t["OvfManagerCommonParams"] = reflect.TypeOf((*OvfManagerCommonParams)(nil)).Elem() } type OvfMappedOsId struct { OvfImport OvfId int32 `xml:"ovfId"` OvfDescription string `xml:"ovfDescription"` TargetDescription string `xml:"targetDescription"` } func init() { t["OvfMappedOsId"] = reflect.TypeOf((*OvfMappedOsId)(nil)).Elem() } type OvfMappedOsIdFault OvfMappedOsId func init() { t["OvfMappedOsIdFault"] = reflect.TypeOf((*OvfMappedOsIdFault)(nil)).Elem() } type OvfMissingAttribute struct { OvfAttribute } func init() { t["OvfMissingAttribute"] = reflect.TypeOf((*OvfMissingAttribute)(nil)).Elem() } type OvfMissingAttributeFault OvfMissingAttribute func init() { t["OvfMissingAttributeFault"] = reflect.TypeOf((*OvfMissingAttributeFault)(nil)).Elem() } type OvfMissingElement struct { OvfElement } func init() { t["OvfMissingElement"] = reflect.TypeOf((*OvfMissingElement)(nil)).Elem() } type OvfMissingElementFault BaseOvfMissingElement func init() { t["OvfMissingElementFault"] = reflect.TypeOf((*OvfMissingElementFault)(nil)).Elem() } type OvfMissingElementNormalBoundary struct { OvfMissingElement Boundary string `xml:"boundary"` } func init() { t["OvfMissingElementNormalBoundary"] = reflect.TypeOf((*OvfMissingElementNormalBoundary)(nil)).Elem() } type OvfMissingElementNormalBoundaryFault OvfMissingElementNormalBoundary func init() { t["OvfMissingElementNormalBoundaryFault"] = reflect.TypeOf((*OvfMissingElementNormalBoundaryFault)(nil)).Elem() } type OvfMissingHardware struct { OvfImport Name string `xml:"name"` ResourceType int32 `xml:"resourceType"` } func init() { t["OvfMissingHardware"] = reflect.TypeOf((*OvfMissingHardware)(nil)).Elem() } type OvfMissingHardwareFault OvfMissingHardware func init() { t["OvfMissingHardwareFault"] = reflect.TypeOf((*OvfMissingHardwareFault)(nil)).Elem() } type OvfNetworkInfo struct { DynamicData Name string `xml:"name"` Description string `xml:"description"` } func init() { t["OvfNetworkInfo"] = reflect.TypeOf((*OvfNetworkInfo)(nil)).Elem() } type OvfNetworkMapping struct { DynamicData Name string `xml:"name"` Network ManagedObjectReference `xml:"network"` } func init() { t["OvfNetworkMapping"] = reflect.TypeOf((*OvfNetworkMapping)(nil)).Elem() } type OvfNetworkMappingNotSupported struct { OvfImport } func init() { t["OvfNetworkMappingNotSupported"] = reflect.TypeOf((*OvfNetworkMappingNotSupported)(nil)).Elem() } type OvfNetworkMappingNotSupportedFault OvfNetworkMappingNotSupported func init() { t["OvfNetworkMappingNotSupportedFault"] = reflect.TypeOf((*OvfNetworkMappingNotSupportedFault)(nil)).Elem() } type OvfNoHostNic struct { OvfUnsupportedPackage } func init() { t["OvfNoHostNic"] = reflect.TypeOf((*OvfNoHostNic)(nil)).Elem() } type OvfNoHostNicFault OvfNoHostNic func init() { t["OvfNoHostNicFault"] = reflect.TypeOf((*OvfNoHostNicFault)(nil)).Elem() } type OvfNoSpaceOnController struct { OvfUnsupportedElement Parent string `xml:"parent"` } func init() { t["OvfNoSpaceOnController"] = reflect.TypeOf((*OvfNoSpaceOnController)(nil)).Elem() } type OvfNoSpaceOnControllerFault OvfNoSpaceOnController func init() { t["OvfNoSpaceOnControllerFault"] = reflect.TypeOf((*OvfNoSpaceOnControllerFault)(nil)).Elem() } type OvfNoSupportedHardwareFamily struct { OvfUnsupportedPackage Version string `xml:"version"` } func init() { t["OvfNoSupportedHardwareFamily"] = reflect.TypeOf((*OvfNoSupportedHardwareFamily)(nil)).Elem() } type OvfNoSupportedHardwareFamilyFault OvfNoSupportedHardwareFamily func init() { t["OvfNoSupportedHardwareFamilyFault"] = reflect.TypeOf((*OvfNoSupportedHardwareFamilyFault)(nil)).Elem() } type OvfOptionInfo struct { DynamicData Option string `xml:"option"` Description LocalizableMessage `xml:"description"` } func init() { t["OvfOptionInfo"] = reflect.TypeOf((*OvfOptionInfo)(nil)).Elem() } type OvfParseDescriptorParams struct { OvfManagerCommonParams } func init() { t["OvfParseDescriptorParams"] = reflect.TypeOf((*OvfParseDescriptorParams)(nil)).Elem() } type OvfParseDescriptorResult struct { DynamicData Eula []string `xml:"eula,omitempty"` Network []OvfNetworkInfo `xml:"network,omitempty"` IpAllocationScheme []string `xml:"ipAllocationScheme,omitempty"` IpProtocols []string `xml:"ipProtocols,omitempty"` Property []VAppPropertyInfo `xml:"property,omitempty"` ProductInfo *VAppProductInfo `xml:"productInfo,omitempty"` Annotation string `xml:"annotation"` ApproximateDownloadSize int64 `xml:"approximateDownloadSize,omitempty"` ApproximateFlatDeploymentSize int64 `xml:"approximateFlatDeploymentSize,omitempty"` ApproximateSparseDeploymentSize int64 `xml:"approximateSparseDeploymentSize,omitempty"` DefaultEntityName string `xml:"defaultEntityName"` VirtualApp bool `xml:"virtualApp"` DeploymentOption []OvfDeploymentOption `xml:"deploymentOption,omitempty"` DefaultDeploymentOption string `xml:"defaultDeploymentOption"` EntityName []KeyValue `xml:"entityName,omitempty"` AnnotatedOst *OvfConsumerOstNode `xml:"annotatedOst,omitempty"` Error []LocalizedMethodFault `xml:"error,omitempty"` Warning []LocalizedMethodFault `xml:"warning,omitempty"` } func init() { t["OvfParseDescriptorResult"] = reflect.TypeOf((*OvfParseDescriptorResult)(nil)).Elem() } type OvfProperty struct { OvfInvalidPackage Type string `xml:"type"` Value string `xml:"value"` } func init() { t["OvfProperty"] = reflect.TypeOf((*OvfProperty)(nil)).Elem() } type OvfPropertyExport struct { OvfExport Type string `xml:"type"` Value string `xml:"value"` } func init() { t["OvfPropertyExport"] = reflect.TypeOf((*OvfPropertyExport)(nil)).Elem() } type OvfPropertyExportFault OvfPropertyExport func init() { t["OvfPropertyExportFault"] = reflect.TypeOf((*OvfPropertyExportFault)(nil)).Elem() } type OvfPropertyFault BaseOvfProperty func init() { t["OvfPropertyFault"] = reflect.TypeOf((*OvfPropertyFault)(nil)).Elem() } type OvfPropertyNetwork struct { OvfProperty } func init() { t["OvfPropertyNetwork"] = reflect.TypeOf((*OvfPropertyNetwork)(nil)).Elem() } type OvfPropertyNetworkExport struct { OvfExport Network string `xml:"network"` } func init() { t["OvfPropertyNetworkExport"] = reflect.TypeOf((*OvfPropertyNetworkExport)(nil)).Elem() } type OvfPropertyNetworkExportFault OvfPropertyNetworkExport func init() { t["OvfPropertyNetworkExportFault"] = reflect.TypeOf((*OvfPropertyNetworkExportFault)(nil)).Elem() } type OvfPropertyNetworkFault OvfPropertyNetwork func init() { t["OvfPropertyNetworkFault"] = reflect.TypeOf((*OvfPropertyNetworkFault)(nil)).Elem() } type OvfPropertyQualifier struct { OvfProperty Qualifier string `xml:"qualifier"` } func init() { t["OvfPropertyQualifier"] = reflect.TypeOf((*OvfPropertyQualifier)(nil)).Elem() } type OvfPropertyQualifierDuplicate struct { OvfProperty Qualifier string `xml:"qualifier"` } func init() { t["OvfPropertyQualifierDuplicate"] = reflect.TypeOf((*OvfPropertyQualifierDuplicate)(nil)).Elem() } type OvfPropertyQualifierDuplicateFault OvfPropertyQualifierDuplicate func init() { t["OvfPropertyQualifierDuplicateFault"] = reflect.TypeOf((*OvfPropertyQualifierDuplicateFault)(nil)).Elem() } type OvfPropertyQualifierFault OvfPropertyQualifier func init() { t["OvfPropertyQualifierFault"] = reflect.TypeOf((*OvfPropertyQualifierFault)(nil)).Elem() } type OvfPropertyQualifierIgnored struct { OvfProperty Qualifier string `xml:"qualifier"` } func init() { t["OvfPropertyQualifierIgnored"] = reflect.TypeOf((*OvfPropertyQualifierIgnored)(nil)).Elem() } type OvfPropertyQualifierIgnoredFault OvfPropertyQualifierIgnored func init() { t["OvfPropertyQualifierIgnoredFault"] = reflect.TypeOf((*OvfPropertyQualifierIgnoredFault)(nil)).Elem() } type OvfPropertyType struct { OvfProperty } func init() { t["OvfPropertyType"] = reflect.TypeOf((*OvfPropertyType)(nil)).Elem() } type OvfPropertyTypeFault OvfPropertyType func init() { t["OvfPropertyTypeFault"] = reflect.TypeOf((*OvfPropertyTypeFault)(nil)).Elem() } type OvfPropertyValue struct { OvfProperty } func init() { t["OvfPropertyValue"] = reflect.TypeOf((*OvfPropertyValue)(nil)).Elem() } type OvfPropertyValueFault OvfPropertyValue func init() { t["OvfPropertyValueFault"] = reflect.TypeOf((*OvfPropertyValueFault)(nil)).Elem() } type OvfResourceMap struct { DynamicData Source string `xml:"source"` Parent *ManagedObjectReference `xml:"parent,omitempty"` ResourceSpec *ResourceConfigSpec `xml:"resourceSpec,omitempty"` Datastore *ManagedObjectReference `xml:"datastore,omitempty"` } func init() { t["OvfResourceMap"] = reflect.TypeOf((*OvfResourceMap)(nil)).Elem() } type OvfSystemFault struct { OvfFault } func init() { t["OvfSystemFault"] = reflect.TypeOf((*OvfSystemFault)(nil)).Elem() } type OvfSystemFaultFault BaseOvfSystemFault func init() { t["OvfSystemFaultFault"] = reflect.TypeOf((*OvfSystemFaultFault)(nil)).Elem() } type OvfToXmlUnsupportedElement struct { OvfSystemFault Name string `xml:"name,omitempty"` } func init() { t["OvfToXmlUnsupportedElement"] = reflect.TypeOf((*OvfToXmlUnsupportedElement)(nil)).Elem() } type OvfToXmlUnsupportedElementFault OvfToXmlUnsupportedElement func init() { t["OvfToXmlUnsupportedElementFault"] = reflect.TypeOf((*OvfToXmlUnsupportedElementFault)(nil)).Elem() } type OvfUnableToExportDisk struct { OvfHardwareExport DiskName string `xml:"diskName"` } func init() { t["OvfUnableToExportDisk"] = reflect.TypeOf((*OvfUnableToExportDisk)(nil)).Elem() } type OvfUnableToExportDiskFault OvfUnableToExportDisk func init() { t["OvfUnableToExportDiskFault"] = reflect.TypeOf((*OvfUnableToExportDiskFault)(nil)).Elem() } type OvfUnexpectedElement struct { OvfElement } func init() { t["OvfUnexpectedElement"] = reflect.TypeOf((*OvfUnexpectedElement)(nil)).Elem() } type OvfUnexpectedElementFault OvfUnexpectedElement func init() { t["OvfUnexpectedElementFault"] = reflect.TypeOf((*OvfUnexpectedElementFault)(nil)).Elem() } type OvfUnknownDevice struct { OvfSystemFault Device BaseVirtualDevice `xml:"device,omitempty,typeattr"` VmName string `xml:"vmName"` } func init() { t["OvfUnknownDevice"] = reflect.TypeOf((*OvfUnknownDevice)(nil)).Elem() } type OvfUnknownDeviceBacking struct { OvfHardwareExport Backing BaseVirtualDeviceBackingInfo `xml:"backing,typeattr"` } func init() { t["OvfUnknownDeviceBacking"] = reflect.TypeOf((*OvfUnknownDeviceBacking)(nil)).Elem() } type OvfUnknownDeviceBackingFault OvfUnknownDeviceBacking func init() { t["OvfUnknownDeviceBackingFault"] = reflect.TypeOf((*OvfUnknownDeviceBackingFault)(nil)).Elem() } type OvfUnknownDeviceFault OvfUnknownDevice func init() { t["OvfUnknownDeviceFault"] = reflect.TypeOf((*OvfUnknownDeviceFault)(nil)).Elem() } type OvfUnknownEntity struct { OvfSystemFault LineNumber int32 `xml:"lineNumber"` } func init() { t["OvfUnknownEntity"] = reflect.TypeOf((*OvfUnknownEntity)(nil)).Elem() } type OvfUnknownEntityFault OvfUnknownEntity func init() { t["OvfUnknownEntityFault"] = reflect.TypeOf((*OvfUnknownEntityFault)(nil)).Elem() } type OvfUnsupportedAttribute struct { OvfUnsupportedPackage ElementName string `xml:"elementName"` AttributeName string `xml:"attributeName"` } func init() { t["OvfUnsupportedAttribute"] = reflect.TypeOf((*OvfUnsupportedAttribute)(nil)).Elem() } type OvfUnsupportedAttributeFault BaseOvfUnsupportedAttribute func init() { t["OvfUnsupportedAttributeFault"] = reflect.TypeOf((*OvfUnsupportedAttributeFault)(nil)).Elem() } type OvfUnsupportedAttributeValue struct { OvfUnsupportedAttribute Value string `xml:"value"` } func init() { t["OvfUnsupportedAttributeValue"] = reflect.TypeOf((*OvfUnsupportedAttributeValue)(nil)).Elem() } type OvfUnsupportedAttributeValueFault OvfUnsupportedAttributeValue func init() { t["OvfUnsupportedAttributeValueFault"] = reflect.TypeOf((*OvfUnsupportedAttributeValueFault)(nil)).Elem() } type OvfUnsupportedDeviceBackingInfo struct { OvfSystemFault ElementName string `xml:"elementName,omitempty"` InstanceId string `xml:"instanceId,omitempty"` DeviceName string `xml:"deviceName"` BackingName string `xml:"backingName,omitempty"` } func init() { t["OvfUnsupportedDeviceBackingInfo"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingInfo)(nil)).Elem() } type OvfUnsupportedDeviceBackingInfoFault OvfUnsupportedDeviceBackingInfo func init() { t["OvfUnsupportedDeviceBackingInfoFault"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingInfoFault)(nil)).Elem() } type OvfUnsupportedDeviceBackingOption struct { OvfSystemFault ElementName string `xml:"elementName,omitempty"` InstanceId string `xml:"instanceId,omitempty"` DeviceName string `xml:"deviceName"` BackingName string `xml:"backingName,omitempty"` } func init() { t["OvfUnsupportedDeviceBackingOption"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingOption)(nil)).Elem() } type OvfUnsupportedDeviceBackingOptionFault OvfUnsupportedDeviceBackingOption func init() { t["OvfUnsupportedDeviceBackingOptionFault"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingOptionFault)(nil)).Elem() } type OvfUnsupportedDeviceExport struct { OvfHardwareExport } func init() { t["OvfUnsupportedDeviceExport"] = reflect.TypeOf((*OvfUnsupportedDeviceExport)(nil)).Elem() } type OvfUnsupportedDeviceExportFault OvfUnsupportedDeviceExport func init() { t["OvfUnsupportedDeviceExportFault"] = reflect.TypeOf((*OvfUnsupportedDeviceExportFault)(nil)).Elem() } type OvfUnsupportedDiskProvisioning struct { OvfImport DiskProvisioning string `xml:"diskProvisioning"` SupportedDiskProvisioning string `xml:"supportedDiskProvisioning"` } func init() { t["OvfUnsupportedDiskProvisioning"] = reflect.TypeOf((*OvfUnsupportedDiskProvisioning)(nil)).Elem() } type OvfUnsupportedDiskProvisioningFault OvfUnsupportedDiskProvisioning func init() { t["OvfUnsupportedDiskProvisioningFault"] = reflect.TypeOf((*OvfUnsupportedDiskProvisioningFault)(nil)).Elem() } type OvfUnsupportedElement struct { OvfUnsupportedPackage Name string `xml:"name"` } func init() { t["OvfUnsupportedElement"] = reflect.TypeOf((*OvfUnsupportedElement)(nil)).Elem() } type OvfUnsupportedElementFault BaseOvfUnsupportedElement func init() { t["OvfUnsupportedElementFault"] = reflect.TypeOf((*OvfUnsupportedElementFault)(nil)).Elem() } type OvfUnsupportedElementValue struct { OvfUnsupportedElement Value string `xml:"value"` } func init() { t["OvfUnsupportedElementValue"] = reflect.TypeOf((*OvfUnsupportedElementValue)(nil)).Elem() } type OvfUnsupportedElementValueFault OvfUnsupportedElementValue func init() { t["OvfUnsupportedElementValueFault"] = reflect.TypeOf((*OvfUnsupportedElementValueFault)(nil)).Elem() } type OvfUnsupportedPackage struct { OvfFault LineNumber int32 `xml:"lineNumber,omitempty"` } func init() { t["OvfUnsupportedPackage"] = reflect.TypeOf((*OvfUnsupportedPackage)(nil)).Elem() } type OvfUnsupportedPackageFault BaseOvfUnsupportedPackage func init() { t["OvfUnsupportedPackageFault"] = reflect.TypeOf((*OvfUnsupportedPackageFault)(nil)).Elem() } type OvfUnsupportedSection struct { OvfUnsupportedElement Info string `xml:"info"` } func init() { t["OvfUnsupportedSection"] = reflect.TypeOf((*OvfUnsupportedSection)(nil)).Elem() } type OvfUnsupportedSectionFault OvfUnsupportedSection func init() { t["OvfUnsupportedSectionFault"] = reflect.TypeOf((*OvfUnsupportedSectionFault)(nil)).Elem() } type OvfUnsupportedSubType struct { OvfUnsupportedPackage ElementName string `xml:"elementName"` InstanceId string `xml:"instanceId"` DeviceType int32 `xml:"deviceType"` DeviceSubType string `xml:"deviceSubType"` } func init() { t["OvfUnsupportedSubType"] = reflect.TypeOf((*OvfUnsupportedSubType)(nil)).Elem() } type OvfUnsupportedSubTypeFault OvfUnsupportedSubType func init() { t["OvfUnsupportedSubTypeFault"] = reflect.TypeOf((*OvfUnsupportedSubTypeFault)(nil)).Elem() } type OvfUnsupportedType struct { OvfUnsupportedPackage Name string `xml:"name"` InstanceId string `xml:"instanceId"` DeviceType int32 `xml:"deviceType"` } func init() { t["OvfUnsupportedType"] = reflect.TypeOf((*OvfUnsupportedType)(nil)).Elem() } type OvfUnsupportedTypeFault OvfUnsupportedType func init() { t["OvfUnsupportedTypeFault"] = reflect.TypeOf((*OvfUnsupportedTypeFault)(nil)).Elem() } type OvfValidateHostParams struct { OvfManagerCommonParams } func init() { t["OvfValidateHostParams"] = reflect.TypeOf((*OvfValidateHostParams)(nil)).Elem() } type OvfValidateHostResult struct { DynamicData DownloadSize int64 `xml:"downloadSize,omitempty"` FlatDeploymentSize int64 `xml:"flatDeploymentSize,omitempty"` SparseDeploymentSize int64 `xml:"sparseDeploymentSize,omitempty"` Error []LocalizedMethodFault `xml:"error,omitempty"` Warning []LocalizedMethodFault `xml:"warning,omitempty"` SupportedDiskProvisioning []string `xml:"supportedDiskProvisioning,omitempty"` } func init() { t["OvfValidateHostResult"] = reflect.TypeOf((*OvfValidateHostResult)(nil)).Elem() } type OvfWrongElement struct { OvfElement } func init() { t["OvfWrongElement"] = reflect.TypeOf((*OvfWrongElement)(nil)).Elem() } type OvfWrongElementFault OvfWrongElement func init() { t["OvfWrongElementFault"] = reflect.TypeOf((*OvfWrongElementFault)(nil)).Elem() } type OvfWrongNamespace struct { OvfInvalidPackage NamespaceName string `xml:"namespaceName"` } func init() { t["OvfWrongNamespace"] = reflect.TypeOf((*OvfWrongNamespace)(nil)).Elem() } type OvfWrongNamespaceFault OvfWrongNamespace func init() { t["OvfWrongNamespaceFault"] = reflect.TypeOf((*OvfWrongNamespaceFault)(nil)).Elem() } type OvfXmlFormat struct { OvfInvalidPackage Description string `xml:"description"` } func init() { t["OvfXmlFormat"] = reflect.TypeOf((*OvfXmlFormat)(nil)).Elem() } type OvfXmlFormatFault OvfXmlFormat func init() { t["OvfXmlFormatFault"] = reflect.TypeOf((*OvfXmlFormatFault)(nil)).Elem() } type ParaVirtualSCSIController struct { VirtualSCSIController } func init() { t["ParaVirtualSCSIController"] = reflect.TypeOf((*ParaVirtualSCSIController)(nil)).Elem() } type ParaVirtualSCSIControllerOption struct { VirtualSCSIControllerOption } func init() { t["ParaVirtualSCSIControllerOption"] = reflect.TypeOf((*ParaVirtualSCSIControllerOption)(nil)).Elem() } type ParseDescriptor ParseDescriptorRequestType func init() { t["ParseDescriptor"] = reflect.TypeOf((*ParseDescriptor)(nil)).Elem() } type ParseDescriptorRequestType struct { This ManagedObjectReference `xml:"_this"` OvfDescriptor string `xml:"ovfDescriptor"` Pdp OvfParseDescriptorParams `xml:"pdp"` } func init() { t["ParseDescriptorRequestType"] = reflect.TypeOf((*ParseDescriptorRequestType)(nil)).Elem() } type ParseDescriptorResponse struct { Returnval OvfParseDescriptorResult `xml:"returnval"` } type PassiveNodeDeploymentSpec struct { NodeDeploymentSpec FailoverIpSettings *CustomizationIPSettings `xml:"failoverIpSettings,omitempty"` } func init() { t["PassiveNodeDeploymentSpec"] = reflect.TypeOf((*PassiveNodeDeploymentSpec)(nil)).Elem() } type PassiveNodeNetworkSpec struct { NodeNetworkSpec FailoverIpSettings *CustomizationIPSettings `xml:"failoverIpSettings,omitempty"` } func init() { t["PassiveNodeNetworkSpec"] = reflect.TypeOf((*PassiveNodeNetworkSpec)(nil)).Elem() } type PasswordField struct { DynamicData Value string `xml:"value"` } func init() { t["PasswordField"] = reflect.TypeOf((*PasswordField)(nil)).Elem() } type PatchAlreadyInstalled struct { PatchNotApplicable } func init() { t["PatchAlreadyInstalled"] = reflect.TypeOf((*PatchAlreadyInstalled)(nil)).Elem() } type PatchAlreadyInstalledFault PatchAlreadyInstalled func init() { t["PatchAlreadyInstalledFault"] = reflect.TypeOf((*PatchAlreadyInstalledFault)(nil)).Elem() } type PatchBinariesNotFound struct { VimFault PatchID string `xml:"patchID"` Binary []string `xml:"binary,omitempty"` } func init() { t["PatchBinariesNotFound"] = reflect.TypeOf((*PatchBinariesNotFound)(nil)).Elem() } type PatchBinariesNotFoundFault PatchBinariesNotFound func init() { t["PatchBinariesNotFoundFault"] = reflect.TypeOf((*PatchBinariesNotFoundFault)(nil)).Elem() } type PatchInstallFailed struct { PlatformConfigFault RolledBack bool `xml:"rolledBack"` } func init() { t["PatchInstallFailed"] = reflect.TypeOf((*PatchInstallFailed)(nil)).Elem() } type PatchInstallFailedFault PatchInstallFailed func init() { t["PatchInstallFailedFault"] = reflect.TypeOf((*PatchInstallFailedFault)(nil)).Elem() } type PatchIntegrityError struct { PlatformConfigFault } func init() { t["PatchIntegrityError"] = reflect.TypeOf((*PatchIntegrityError)(nil)).Elem() } type PatchIntegrityErrorFault PatchIntegrityError func init() { t["PatchIntegrityErrorFault"] = reflect.TypeOf((*PatchIntegrityErrorFault)(nil)).Elem() } type PatchMetadataCorrupted struct { PatchMetadataInvalid } func init() { t["PatchMetadataCorrupted"] = reflect.TypeOf((*PatchMetadataCorrupted)(nil)).Elem() } type PatchMetadataCorruptedFault PatchMetadataCorrupted func init() { t["PatchMetadataCorruptedFault"] = reflect.TypeOf((*PatchMetadataCorruptedFault)(nil)).Elem() } type PatchMetadataInvalid struct { VimFault PatchID string `xml:"patchID"` MetaData []string `xml:"metaData,omitempty"` } func init() { t["PatchMetadataInvalid"] = reflect.TypeOf((*PatchMetadataInvalid)(nil)).Elem() } type PatchMetadataInvalidFault BasePatchMetadataInvalid func init() { t["PatchMetadataInvalidFault"] = reflect.TypeOf((*PatchMetadataInvalidFault)(nil)).Elem() } type PatchMetadataNotFound struct { PatchMetadataInvalid } func init() { t["PatchMetadataNotFound"] = reflect.TypeOf((*PatchMetadataNotFound)(nil)).Elem() } type PatchMetadataNotFoundFault PatchMetadataNotFound func init() { t["PatchMetadataNotFoundFault"] = reflect.TypeOf((*PatchMetadataNotFoundFault)(nil)).Elem() } type PatchMissingDependencies struct { PatchNotApplicable PrerequisitePatch []string `xml:"prerequisitePatch,omitempty"` PrerequisiteLib []string `xml:"prerequisiteLib,omitempty"` } func init() { t["PatchMissingDependencies"] = reflect.TypeOf((*PatchMissingDependencies)(nil)).Elem() } type PatchMissingDependenciesFault PatchMissingDependencies func init() { t["PatchMissingDependenciesFault"] = reflect.TypeOf((*PatchMissingDependenciesFault)(nil)).Elem() } type PatchNotApplicable struct { VimFault PatchID string `xml:"patchID"` } func init() { t["PatchNotApplicable"] = reflect.TypeOf((*PatchNotApplicable)(nil)).Elem() } type PatchNotApplicableFault BasePatchNotApplicable func init() { t["PatchNotApplicableFault"] = reflect.TypeOf((*PatchNotApplicableFault)(nil)).Elem() } type PatchSuperseded struct { PatchNotApplicable Supersede []string `xml:"supersede,omitempty"` } func init() { t["PatchSuperseded"] = reflect.TypeOf((*PatchSuperseded)(nil)).Elem() } type PatchSupersededFault PatchSuperseded func init() { t["PatchSupersededFault"] = reflect.TypeOf((*PatchSupersededFault)(nil)).Elem() } type PerfCompositeMetric struct { DynamicData Entity BasePerfEntityMetricBase `xml:"entity,omitempty,typeattr"` ChildEntity []BasePerfEntityMetricBase `xml:"childEntity,omitempty,typeattr"` } func init() { t["PerfCompositeMetric"] = reflect.TypeOf((*PerfCompositeMetric)(nil)).Elem() } type PerfCounterInfo struct { DynamicData Key int32 `xml:"key"` NameInfo BaseElementDescription `xml:"nameInfo,typeattr"` GroupInfo BaseElementDescription `xml:"groupInfo,typeattr"` UnitInfo BaseElementDescription `xml:"unitInfo,typeattr"` RollupType PerfSummaryType `xml:"rollupType"` StatsType PerfStatsType `xml:"statsType"` Level int32 `xml:"level,omitempty"` PerDeviceLevel int32 `xml:"perDeviceLevel,omitempty"` AssociatedCounterId []int32 `xml:"associatedCounterId,omitempty"` } func init() { t["PerfCounterInfo"] = reflect.TypeOf((*PerfCounterInfo)(nil)).Elem() } type PerfEntityMetric struct { PerfEntityMetricBase SampleInfo []PerfSampleInfo `xml:"sampleInfo,omitempty"` Value []BasePerfMetricSeries `xml:"value,omitempty,typeattr"` } func init() { t["PerfEntityMetric"] = reflect.TypeOf((*PerfEntityMetric)(nil)).Elem() } type PerfEntityMetricBase struct { DynamicData Entity ManagedObjectReference `xml:"entity"` } func init() { t["PerfEntityMetricBase"] = reflect.TypeOf((*PerfEntityMetricBase)(nil)).Elem() } type PerfEntityMetricCSV struct { PerfEntityMetricBase SampleInfoCSV string `xml:"sampleInfoCSV"` Value []PerfMetricSeriesCSV `xml:"value,omitempty"` } func init() { t["PerfEntityMetricCSV"] = reflect.TypeOf((*PerfEntityMetricCSV)(nil)).Elem() } type PerfInterval struct { DynamicData Key int32 `xml:"key"` SamplingPeriod int32 `xml:"samplingPeriod"` Name string `xml:"name"` Length int32 `xml:"length"` Level int32 `xml:"level,omitempty"` Enabled bool `xml:"enabled"` } func init() { t["PerfInterval"] = reflect.TypeOf((*PerfInterval)(nil)).Elem() } type PerfMetricId struct { DynamicData CounterId int32 `xml:"counterId"` Instance string `xml:"instance"` } func init() { t["PerfMetricId"] = reflect.TypeOf((*PerfMetricId)(nil)).Elem() } type PerfMetricIntSeries struct { PerfMetricSeries Value []int64 `xml:"value,omitempty"` } func init() { t["PerfMetricIntSeries"] = reflect.TypeOf((*PerfMetricIntSeries)(nil)).Elem() } type PerfMetricSeries struct { DynamicData Id PerfMetricId `xml:"id"` } func init() { t["PerfMetricSeries"] = reflect.TypeOf((*PerfMetricSeries)(nil)).Elem() } type PerfMetricSeriesCSV struct { PerfMetricSeries Value string `xml:"value,omitempty"` } func init() { t["PerfMetricSeriesCSV"] = reflect.TypeOf((*PerfMetricSeriesCSV)(nil)).Elem() } type PerfProviderSummary struct { DynamicData Entity ManagedObjectReference `xml:"entity"` CurrentSupported bool `xml:"currentSupported"` SummarySupported bool `xml:"summarySupported"` RefreshRate int32 `xml:"refreshRate,omitempty"` } func init() { t["PerfProviderSummary"] = reflect.TypeOf((*PerfProviderSummary)(nil)).Elem() } type PerfQuerySpec struct { DynamicData Entity ManagedObjectReference `xml:"entity"` StartTime *time.Time `xml:"startTime"` EndTime *time.Time `xml:"endTime"` MaxSample int32 `xml:"maxSample,omitempty"` MetricId []PerfMetricId `xml:"metricId,omitempty"` IntervalId int32 `xml:"intervalId,omitempty"` Format string `xml:"format,omitempty"` } func init() { t["PerfQuerySpec"] = reflect.TypeOf((*PerfQuerySpec)(nil)).Elem() } type PerfSampleInfo struct { DynamicData Timestamp time.Time `xml:"timestamp"` Interval int32 `xml:"interval"` } func init() { t["PerfSampleInfo"] = reflect.TypeOf((*PerfSampleInfo)(nil)).Elem() } type PerformDvsProductSpecOperationRequestType struct { This ManagedObjectReference `xml:"_this"` Operation string `xml:"operation"` ProductSpec *DistributedVirtualSwitchProductSpec `xml:"productSpec,omitempty"` } func init() { t["PerformDvsProductSpecOperationRequestType"] = reflect.TypeOf((*PerformDvsProductSpecOperationRequestType)(nil)).Elem() } type PerformDvsProductSpecOperation_Task PerformDvsProductSpecOperationRequestType func init() { t["PerformDvsProductSpecOperation_Task"] = reflect.TypeOf((*PerformDvsProductSpecOperation_Task)(nil)).Elem() } type PerformDvsProductSpecOperation_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PerformVsanUpgradePreflightCheck PerformVsanUpgradePreflightCheckRequestType func init() { t["PerformVsanUpgradePreflightCheck"] = reflect.TypeOf((*PerformVsanUpgradePreflightCheck)(nil)).Elem() } type PerformVsanUpgradePreflightCheckRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster ManagedObjectReference `xml:"cluster"` DowngradeFormat *bool `xml:"downgradeFormat"` } func init() { t["PerformVsanUpgradePreflightCheckRequestType"] = reflect.TypeOf((*PerformVsanUpgradePreflightCheckRequestType)(nil)).Elem() } type PerformVsanUpgradePreflightCheckResponse struct { Returnval VsanUpgradeSystemPreflightCheckResult `xml:"returnval"` } type PerformVsanUpgradeRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster ManagedObjectReference `xml:"cluster"` PerformObjectUpgrade *bool `xml:"performObjectUpgrade"` DowngradeFormat *bool `xml:"downgradeFormat"` AllowReducedRedundancy *bool `xml:"allowReducedRedundancy"` ExcludeHosts []ManagedObjectReference `xml:"excludeHosts,omitempty"` } func init() { t["PerformVsanUpgradeRequestType"] = reflect.TypeOf((*PerformVsanUpgradeRequestType)(nil)).Elem() } type PerformVsanUpgrade_Task PerformVsanUpgradeRequestType func init() { t["PerformVsanUpgrade_Task"] = reflect.TypeOf((*PerformVsanUpgrade_Task)(nil)).Elem() } type PerformVsanUpgrade_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PerformanceDescription struct { DynamicData CounterType []BaseElementDescription `xml:"counterType,typeattr"` StatsType []BaseElementDescription `xml:"statsType,typeattr"` } func init() { t["PerformanceDescription"] = reflect.TypeOf((*PerformanceDescription)(nil)).Elem() } type PerformanceManagerCounterLevelMapping struct { DynamicData CounterId int32 `xml:"counterId"` AggregateLevel int32 `xml:"aggregateLevel,omitempty"` PerDeviceLevel int32 `xml:"perDeviceLevel,omitempty"` } func init() { t["PerformanceManagerCounterLevelMapping"] = reflect.TypeOf((*PerformanceManagerCounterLevelMapping)(nil)).Elem() } type PerformanceStatisticsDescription struct { DynamicData Intervals []PerfInterval `xml:"intervals,omitempty"` } func init() { t["PerformanceStatisticsDescription"] = reflect.TypeOf((*PerformanceStatisticsDescription)(nil)).Elem() } type Permission struct { DynamicData Entity *ManagedObjectReference `xml:"entity,omitempty"` Principal string `xml:"principal"` Group bool `xml:"group"` RoleId int32 `xml:"roleId"` Propagate bool `xml:"propagate"` } func init() { t["Permission"] = reflect.TypeOf((*Permission)(nil)).Elem() } type PermissionAddedEvent struct { PermissionEvent Role RoleEventArgument `xml:"role"` Propagate bool `xml:"propagate"` } func init() { t["PermissionAddedEvent"] = reflect.TypeOf((*PermissionAddedEvent)(nil)).Elem() } type PermissionEvent struct { AuthorizationEvent Entity ManagedEntityEventArgument `xml:"entity"` Principal string `xml:"principal"` Group bool `xml:"group"` } func init() { t["PermissionEvent"] = reflect.TypeOf((*PermissionEvent)(nil)).Elem() } type PermissionProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["PermissionProfile"] = reflect.TypeOf((*PermissionProfile)(nil)).Elem() } type PermissionRemovedEvent struct { PermissionEvent } func init() { t["PermissionRemovedEvent"] = reflect.TypeOf((*PermissionRemovedEvent)(nil)).Elem() } type PermissionUpdatedEvent struct { PermissionEvent Role RoleEventArgument `xml:"role"` Propagate bool `xml:"propagate"` PrevRole *RoleEventArgument `xml:"prevRole,omitempty"` PrevPropagate *bool `xml:"prevPropagate"` } func init() { t["PermissionUpdatedEvent"] = reflect.TypeOf((*PermissionUpdatedEvent)(nil)).Elem() } type PhysCompatRDMNotSupported struct { RDMNotSupported } func init() { t["PhysCompatRDMNotSupported"] = reflect.TypeOf((*PhysCompatRDMNotSupported)(nil)).Elem() } type PhysCompatRDMNotSupportedFault PhysCompatRDMNotSupported func init() { t["PhysCompatRDMNotSupportedFault"] = reflect.TypeOf((*PhysCompatRDMNotSupportedFault)(nil)).Elem() } type PhysicalNic struct { DynamicData Key string `xml:"key,omitempty"` Device string `xml:"device"` Pci string `xml:"pci"` Driver string `xml:"driver,omitempty"` LinkSpeed *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"` ValidLinkSpecification []PhysicalNicLinkInfo `xml:"validLinkSpecification,omitempty"` Spec PhysicalNicSpec `xml:"spec"` WakeOnLanSupported bool `xml:"wakeOnLanSupported"` Mac string `xml:"mac"` FcoeConfiguration *FcoeConfig `xml:"fcoeConfiguration,omitempty"` VmDirectPathGen2Supported *bool `xml:"vmDirectPathGen2Supported"` VmDirectPathGen2SupportedMode string `xml:"vmDirectPathGen2SupportedMode,omitempty"` ResourcePoolSchedulerAllowed *bool `xml:"resourcePoolSchedulerAllowed"` ResourcePoolSchedulerDisallowedReason []string `xml:"resourcePoolSchedulerDisallowedReason,omitempty"` AutoNegotiateSupported *bool `xml:"autoNegotiateSupported"` } func init() { t["PhysicalNic"] = reflect.TypeOf((*PhysicalNic)(nil)).Elem() } type PhysicalNicCdpDeviceCapability struct { DynamicData Router bool `xml:"router"` TransparentBridge bool `xml:"transparentBridge"` SourceRouteBridge bool `xml:"sourceRouteBridge"` NetworkSwitch bool `xml:"networkSwitch"` Host bool `xml:"host"` IgmpEnabled bool `xml:"igmpEnabled"` Repeater bool `xml:"repeater"` } func init() { t["PhysicalNicCdpDeviceCapability"] = reflect.TypeOf((*PhysicalNicCdpDeviceCapability)(nil)).Elem() } type PhysicalNicCdpInfo struct { DynamicData CdpVersion int32 `xml:"cdpVersion,omitempty"` Timeout int32 `xml:"timeout,omitempty"` Ttl int32 `xml:"ttl,omitempty"` Samples int32 `xml:"samples,omitempty"` DevId string `xml:"devId,omitempty"` Address string `xml:"address,omitempty"` PortId string `xml:"portId,omitempty"` DeviceCapability *PhysicalNicCdpDeviceCapability `xml:"deviceCapability,omitempty"` SoftwareVersion string `xml:"softwareVersion,omitempty"` HardwarePlatform string `xml:"hardwarePlatform,omitempty"` IpPrefix string `xml:"ipPrefix,omitempty"` IpPrefixLen int32 `xml:"ipPrefixLen,omitempty"` Vlan int32 `xml:"vlan,omitempty"` FullDuplex *bool `xml:"fullDuplex"` Mtu int32 `xml:"mtu,omitempty"` SystemName string `xml:"systemName,omitempty"` SystemOID string `xml:"systemOID,omitempty"` MgmtAddr string `xml:"mgmtAddr,omitempty"` Location string `xml:"location,omitempty"` } func init() { t["PhysicalNicCdpInfo"] = reflect.TypeOf((*PhysicalNicCdpInfo)(nil)).Elem() } type PhysicalNicConfig struct { DynamicData Device string `xml:"device"` Spec PhysicalNicSpec `xml:"spec"` } func init() { t["PhysicalNicConfig"] = reflect.TypeOf((*PhysicalNicConfig)(nil)).Elem() } type PhysicalNicHint struct { DynamicData VlanId int32 `xml:"vlanId,omitempty"` } func init() { t["PhysicalNicHint"] = reflect.TypeOf((*PhysicalNicHint)(nil)).Elem() } type PhysicalNicHintInfo struct { DynamicData Device string `xml:"device"` Subnet []PhysicalNicIpHint `xml:"subnet,omitempty"` Network []PhysicalNicNameHint `xml:"network,omitempty"` ConnectedSwitchPort *PhysicalNicCdpInfo `xml:"connectedSwitchPort,omitempty"` LldpInfo *LinkLayerDiscoveryProtocolInfo `xml:"lldpInfo,omitempty"` } func init() { t["PhysicalNicHintInfo"] = reflect.TypeOf((*PhysicalNicHintInfo)(nil)).Elem() } type PhysicalNicIpHint struct { PhysicalNicHint IpSubnet string `xml:"ipSubnet"` } func init() { t["PhysicalNicIpHint"] = reflect.TypeOf((*PhysicalNicIpHint)(nil)).Elem() } type PhysicalNicLinkInfo struct { DynamicData SpeedMb int32 `xml:"speedMb"` Duplex bool `xml:"duplex"` } func init() { t["PhysicalNicLinkInfo"] = reflect.TypeOf((*PhysicalNicLinkInfo)(nil)).Elem() } type PhysicalNicNameHint struct { PhysicalNicHint Network string `xml:"network"` } func init() { t["PhysicalNicNameHint"] = reflect.TypeOf((*PhysicalNicNameHint)(nil)).Elem() } type PhysicalNicProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["PhysicalNicProfile"] = reflect.TypeOf((*PhysicalNicProfile)(nil)).Elem() } type PhysicalNicSpec struct { DynamicData Ip *HostIpConfig `xml:"ip,omitempty"` LinkSpeed *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"` } func init() { t["PhysicalNicSpec"] = reflect.TypeOf((*PhysicalNicSpec)(nil)).Elem() } type PlaceVm PlaceVmRequestType func init() { t["PlaceVm"] = reflect.TypeOf((*PlaceVm)(nil)).Elem() } type PlaceVmRequestType struct { This ManagedObjectReference `xml:"_this"` PlacementSpec PlacementSpec `xml:"placementSpec"` } func init() { t["PlaceVmRequestType"] = reflect.TypeOf((*PlaceVmRequestType)(nil)).Elem() } type PlaceVmResponse struct { Returnval PlacementResult `xml:"returnval"` } type PlacementAction struct { ClusterAction Vm *ManagedObjectReference `xml:"vm,omitempty"` TargetHost *ManagedObjectReference `xml:"targetHost,omitempty"` RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"` } func init() { t["PlacementAction"] = reflect.TypeOf((*PlacementAction)(nil)).Elem() } type PlacementAffinityRule struct { DynamicData RuleType string `xml:"ruleType"` RuleScope string `xml:"ruleScope"` Vms []ManagedObjectReference `xml:"vms,omitempty"` Keys []string `xml:"keys,omitempty"` } func init() { t["PlacementAffinityRule"] = reflect.TypeOf((*PlacementAffinityRule)(nil)).Elem() } type PlacementRankResult struct { DynamicData Key string `xml:"key"` Candidate ManagedObjectReference `xml:"candidate"` ReservedSpaceMB int64 `xml:"reservedSpaceMB"` UsedSpaceMB int64 `xml:"usedSpaceMB"` TotalSpaceMB int64 `xml:"totalSpaceMB"` Utilization float64 `xml:"utilization"` Faults []LocalizedMethodFault `xml:"faults,omitempty"` } func init() { t["PlacementRankResult"] = reflect.TypeOf((*PlacementRankResult)(nil)).Elem() } type PlacementRankSpec struct { DynamicData Specs []PlacementSpec `xml:"specs"` Clusters []ManagedObjectReference `xml:"clusters"` Rules []PlacementAffinityRule `xml:"rules,omitempty"` PlacementRankByVm []StorageDrsPlacementRankVmSpec `xml:"placementRankByVm,omitempty"` } func init() { t["PlacementRankSpec"] = reflect.TypeOf((*PlacementRankSpec)(nil)).Elem() } type PlacementResult struct { DynamicData Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` DrsFault *ClusterDrsFaults `xml:"drsFault,omitempty"` } func init() { t["PlacementResult"] = reflect.TypeOf((*PlacementResult)(nil)).Elem() } type PlacementSpec struct { DynamicData Priority VirtualMachineMovePriority `xml:"priority,omitempty"` Vm *ManagedObjectReference `xml:"vm,omitempty"` ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"` Hosts []ManagedObjectReference `xml:"hosts,omitempty"` Datastores []ManagedObjectReference `xml:"datastores,omitempty"` StoragePods []ManagedObjectReference `xml:"storagePods,omitempty"` DisallowPrerequisiteMoves *bool `xml:"disallowPrerequisiteMoves"` Rules []BaseClusterRuleInfo `xml:"rules,omitempty,typeattr"` Key string `xml:"key,omitempty"` PlacementType string `xml:"placementType,omitempty"` CloneSpec *VirtualMachineCloneSpec `xml:"cloneSpec,omitempty"` CloneName string `xml:"cloneName,omitempty"` } func init() { t["PlacementSpec"] = reflect.TypeOf((*PlacementSpec)(nil)).Elem() } type PlatformConfigFault struct { HostConfigFault Text string `xml:"text"` } func init() { t["PlatformConfigFault"] = reflect.TypeOf((*PlatformConfigFault)(nil)).Elem() } type PlatformConfigFaultFault BasePlatformConfigFault func init() { t["PlatformConfigFaultFault"] = reflect.TypeOf((*PlatformConfigFaultFault)(nil)).Elem() } type PnicUplinkProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["PnicUplinkProfile"] = reflect.TypeOf((*PnicUplinkProfile)(nil)).Elem() } type PodDiskLocator struct { DynamicData DiskId int32 `xml:"diskId"` DiskMoveType string `xml:"diskMoveType,omitempty"` DiskBackingInfo BaseVirtualDeviceBackingInfo `xml:"diskBackingInfo,omitempty,typeattr"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` } func init() { t["PodDiskLocator"] = reflect.TypeOf((*PodDiskLocator)(nil)).Elem() } type PodStorageDrsEntry struct { DynamicData StorageDrsConfig StorageDrsConfigInfo `xml:"storageDrsConfig"` Recommendation []ClusterRecommendation `xml:"recommendation,omitempty"` DrsFault []ClusterDrsFaults `xml:"drsFault,omitempty"` ActionHistory []ClusterActionHistory `xml:"actionHistory,omitempty"` } func init() { t["PodStorageDrsEntry"] = reflect.TypeOf((*PodStorageDrsEntry)(nil)).Elem() } type PolicyOption struct { DynamicData Id string `xml:"id"` Parameter []KeyAnyValue `xml:"parameter,omitempty"` } func init() { t["PolicyOption"] = reflect.TypeOf((*PolicyOption)(nil)).Elem() } type PortGroupProfile struct { ApplyProfile Key string `xml:"key"` Name string `xml:"name"` Vlan VlanProfile `xml:"vlan"` Vswitch VirtualSwitchSelectionProfile `xml:"vswitch"` NetworkPolicy NetworkPolicyProfile `xml:"networkPolicy"` } func init() { t["PortGroupProfile"] = reflect.TypeOf((*PortGroupProfile)(nil)).Elem() } type PosixUserSearchResult struct { UserSearchResult Id int32 `xml:"id"` ShellAccess *bool `xml:"shellAccess"` } func init() { t["PosixUserSearchResult"] = reflect.TypeOf((*PosixUserSearchResult)(nil)).Elem() } type PostEvent PostEventRequestType func init() { t["PostEvent"] = reflect.TypeOf((*PostEvent)(nil)).Elem() } type PostEventRequestType struct { This ManagedObjectReference `xml:"_this"` EventToPost BaseEvent `xml:"eventToPost,typeattr"` TaskInfo *TaskInfo `xml:"taskInfo,omitempty"` } func init() { t["PostEventRequestType"] = reflect.TypeOf((*PostEventRequestType)(nil)).Elem() } type PostEventResponse struct { } type PostHealthUpdates PostHealthUpdatesRequestType func init() { t["PostHealthUpdates"] = reflect.TypeOf((*PostHealthUpdates)(nil)).Elem() } type PostHealthUpdatesRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` Updates []HealthUpdate `xml:"updates,omitempty"` } func init() { t["PostHealthUpdatesRequestType"] = reflect.TypeOf((*PostHealthUpdatesRequestType)(nil)).Elem() } type PostHealthUpdatesResponse struct { } type PowerDownHostToStandByRequestType struct { This ManagedObjectReference `xml:"_this"` TimeoutSec int32 `xml:"timeoutSec"` EvacuatePoweredOffVms *bool `xml:"evacuatePoweredOffVms"` } func init() { t["PowerDownHostToStandByRequestType"] = reflect.TypeOf((*PowerDownHostToStandByRequestType)(nil)).Elem() } type PowerDownHostToStandBy_Task PowerDownHostToStandByRequestType func init() { t["PowerDownHostToStandBy_Task"] = reflect.TypeOf((*PowerDownHostToStandBy_Task)(nil)).Elem() } type PowerDownHostToStandBy_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PowerOffVAppRequestType struct { This ManagedObjectReference `xml:"_this"` Force bool `xml:"force"` } func init() { t["PowerOffVAppRequestType"] = reflect.TypeOf((*PowerOffVAppRequestType)(nil)).Elem() } type PowerOffVApp_Task PowerOffVAppRequestType func init() { t["PowerOffVApp_Task"] = reflect.TypeOf((*PowerOffVApp_Task)(nil)).Elem() } type PowerOffVApp_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PowerOffVMRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["PowerOffVMRequestType"] = reflect.TypeOf((*PowerOffVMRequestType)(nil)).Elem() } type PowerOffVM_Task PowerOffVMRequestType func init() { t["PowerOffVM_Task"] = reflect.TypeOf((*PowerOffVM_Task)(nil)).Elem() } type PowerOffVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PowerOnFtSecondaryFailed struct { VmFaultToleranceIssue Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` HostSelectionBy FtIssuesOnHostHostSelectionType `xml:"hostSelectionBy"` HostErrors []LocalizedMethodFault `xml:"hostErrors,omitempty"` RootCause LocalizedMethodFault `xml:"rootCause"` } func init() { t["PowerOnFtSecondaryFailed"] = reflect.TypeOf((*PowerOnFtSecondaryFailed)(nil)).Elem() } type PowerOnFtSecondaryFailedFault PowerOnFtSecondaryFailed func init() { t["PowerOnFtSecondaryFailedFault"] = reflect.TypeOf((*PowerOnFtSecondaryFailedFault)(nil)).Elem() } type PowerOnFtSecondaryTimedout struct { Timedout Vm ManagedObjectReference `xml:"vm"` VmName string `xml:"vmName"` Timeout int32 `xml:"timeout"` } func init() { t["PowerOnFtSecondaryTimedout"] = reflect.TypeOf((*PowerOnFtSecondaryTimedout)(nil)).Elem() } type PowerOnFtSecondaryTimedoutFault PowerOnFtSecondaryTimedout func init() { t["PowerOnFtSecondaryTimedoutFault"] = reflect.TypeOf((*PowerOnFtSecondaryTimedoutFault)(nil)).Elem() } type PowerOnMultiVMRequestType struct { This ManagedObjectReference `xml:"_this"` Vm []ManagedObjectReference `xml:"vm"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` } func init() { t["PowerOnMultiVMRequestType"] = reflect.TypeOf((*PowerOnMultiVMRequestType)(nil)).Elem() } type PowerOnMultiVM_Task PowerOnMultiVMRequestType func init() { t["PowerOnMultiVM_Task"] = reflect.TypeOf((*PowerOnMultiVM_Task)(nil)).Elem() } type PowerOnMultiVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PowerOnVAppRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["PowerOnVAppRequestType"] = reflect.TypeOf((*PowerOnVAppRequestType)(nil)).Elem() } type PowerOnVApp_Task PowerOnVAppRequestType func init() { t["PowerOnVApp_Task"] = reflect.TypeOf((*PowerOnVApp_Task)(nil)).Elem() } type PowerOnVApp_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PowerOnVMRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["PowerOnVMRequestType"] = reflect.TypeOf((*PowerOnVMRequestType)(nil)).Elem() } type PowerOnVM_Task PowerOnVMRequestType func init() { t["PowerOnVM_Task"] = reflect.TypeOf((*PowerOnVM_Task)(nil)).Elem() } type PowerOnVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PowerSystemCapability struct { DynamicData AvailablePolicy []HostPowerPolicy `xml:"availablePolicy"` } func init() { t["PowerSystemCapability"] = reflect.TypeOf((*PowerSystemCapability)(nil)).Elem() } type PowerSystemInfo struct { DynamicData CurrentPolicy HostPowerPolicy `xml:"currentPolicy"` } func init() { t["PowerSystemInfo"] = reflect.TypeOf((*PowerSystemInfo)(nil)).Elem() } type PowerUpHostFromStandByRequestType struct { This ManagedObjectReference `xml:"_this"` TimeoutSec int32 `xml:"timeoutSec"` } func init() { t["PowerUpHostFromStandByRequestType"] = reflect.TypeOf((*PowerUpHostFromStandByRequestType)(nil)).Elem() } type PowerUpHostFromStandBy_Task PowerUpHostFromStandByRequestType func init() { t["PowerUpHostFromStandBy_Task"] = reflect.TypeOf((*PowerUpHostFromStandBy_Task)(nil)).Elem() } type PowerUpHostFromStandBy_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PrepareCrypto PrepareCryptoRequestType func init() { t["PrepareCrypto"] = reflect.TypeOf((*PrepareCrypto)(nil)).Elem() } type PrepareCryptoRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["PrepareCryptoRequestType"] = reflect.TypeOf((*PrepareCryptoRequestType)(nil)).Elem() } type PrepareCryptoResponse struct { } type PrivilegeAvailability struct { DynamicData PrivId string `xml:"privId"` IsGranted bool `xml:"isGranted"` } func init() { t["PrivilegeAvailability"] = reflect.TypeOf((*PrivilegeAvailability)(nil)).Elem() } type PrivilegePolicyDef struct { DynamicData CreatePrivilege string `xml:"createPrivilege"` ReadPrivilege string `xml:"readPrivilege"` UpdatePrivilege string `xml:"updatePrivilege"` DeletePrivilege string `xml:"deletePrivilege"` } func init() { t["PrivilegePolicyDef"] = reflect.TypeOf((*PrivilegePolicyDef)(nil)).Elem() } type ProductComponentInfo struct { DynamicData Id string `xml:"id"` Name string `xml:"name"` Version string `xml:"version"` Release int32 `xml:"release"` } func init() { t["ProductComponentInfo"] = reflect.TypeOf((*ProductComponentInfo)(nil)).Elem() } type ProfileApplyProfileElement struct { ApplyProfile Key string `xml:"key"` } func init() { t["ProfileApplyProfileElement"] = reflect.TypeOf((*ProfileApplyProfileElement)(nil)).Elem() } type ProfileApplyProfileProperty struct { DynamicData PropertyName string `xml:"propertyName"` Array bool `xml:"array"` Profile []BaseApplyProfile `xml:"profile,omitempty,typeattr"` } func init() { t["ProfileApplyProfileProperty"] = reflect.TypeOf((*ProfileApplyProfileProperty)(nil)).Elem() } type ProfileAssociatedEvent struct { ProfileEvent } func init() { t["ProfileAssociatedEvent"] = reflect.TypeOf((*ProfileAssociatedEvent)(nil)).Elem() } type ProfileChangedEvent struct { ProfileEvent } func init() { t["ProfileChangedEvent"] = reflect.TypeOf((*ProfileChangedEvent)(nil)).Elem() } type ProfileCompositeExpression struct { ProfileExpression Operator string `xml:"operator"` ExpressionName []string `xml:"expressionName"` } func init() { t["ProfileCompositeExpression"] = reflect.TypeOf((*ProfileCompositeExpression)(nil)).Elem() } type ProfileCompositePolicyOptionMetadata struct { ProfilePolicyOptionMetadata Option []string `xml:"option"` } func init() { t["ProfileCompositePolicyOptionMetadata"] = reflect.TypeOf((*ProfileCompositePolicyOptionMetadata)(nil)).Elem() } type ProfileConfigInfo struct { DynamicData Name string `xml:"name"` Annotation string `xml:"annotation,omitempty"` Enabled bool `xml:"enabled"` } func init() { t["ProfileConfigInfo"] = reflect.TypeOf((*ProfileConfigInfo)(nil)).Elem() } type ProfileCreateSpec struct { DynamicData Name string `xml:"name,omitempty"` Annotation string `xml:"annotation,omitempty"` Enabled *bool `xml:"enabled"` } func init() { t["ProfileCreateSpec"] = reflect.TypeOf((*ProfileCreateSpec)(nil)).Elem() } type ProfileCreatedEvent struct { ProfileEvent } func init() { t["ProfileCreatedEvent"] = reflect.TypeOf((*ProfileCreatedEvent)(nil)).Elem() } type ProfileDeferredPolicyOptionParameter struct { DynamicData InputPath ProfilePropertyPath `xml:"inputPath"` Parameter []KeyAnyValue `xml:"parameter,omitempty"` } func init() { t["ProfileDeferredPolicyOptionParameter"] = reflect.TypeOf((*ProfileDeferredPolicyOptionParameter)(nil)).Elem() } type ProfileDescription struct { DynamicData Section []ProfileDescriptionSection `xml:"section"` } func init() { t["ProfileDescription"] = reflect.TypeOf((*ProfileDescription)(nil)).Elem() } type ProfileDescriptionSection struct { DynamicData Description ExtendedElementDescription `xml:"description"` Message []LocalizableMessage `xml:"message,omitempty"` } func init() { t["ProfileDescriptionSection"] = reflect.TypeOf((*ProfileDescriptionSection)(nil)).Elem() } type ProfileDissociatedEvent struct { ProfileEvent } func init() { t["ProfileDissociatedEvent"] = reflect.TypeOf((*ProfileDissociatedEvent)(nil)).Elem() } type ProfileEvent struct { Event Profile ProfileEventArgument `xml:"profile"` } func init() { t["ProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem() } type ProfileEventArgument struct { EventArgument Profile ManagedObjectReference `xml:"profile"` Name string `xml:"name"` } func init() { t["ProfileEventArgument"] = reflect.TypeOf((*ProfileEventArgument)(nil)).Elem() } type ProfileExecuteError struct { DynamicData Path *ProfilePropertyPath `xml:"path,omitempty"` Message LocalizableMessage `xml:"message"` } func init() { t["ProfileExecuteError"] = reflect.TypeOf((*ProfileExecuteError)(nil)).Elem() } type ProfileExecuteResult struct { DynamicData Status string `xml:"status"` ConfigSpec *HostConfigSpec `xml:"configSpec,omitempty"` InapplicablePath []string `xml:"inapplicablePath,omitempty"` RequireInput []ProfileDeferredPolicyOptionParameter `xml:"requireInput,omitempty"` Error []ProfileExecuteError `xml:"error,omitempty"` } func init() { t["ProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem() } type ProfileExpression struct { DynamicData Id string `xml:"id"` DisplayName string `xml:"displayName"` Negated bool `xml:"negated"` } func init() { t["ProfileExpression"] = reflect.TypeOf((*ProfileExpression)(nil)).Elem() } type ProfileExpressionMetadata struct { DynamicData ExpressionId ExtendedElementDescription `xml:"expressionId"` Parameter []ProfileParameterMetadata `xml:"parameter,omitempty"` } func init() { t["ProfileExpressionMetadata"] = reflect.TypeOf((*ProfileExpressionMetadata)(nil)).Elem() } type ProfileMetadata struct { DynamicData Key string `xml:"key"` ProfileTypeName string `xml:"profileTypeName,omitempty"` Description *ExtendedDescription `xml:"description,omitempty"` SortSpec []ProfileMetadataProfileSortSpec `xml:"sortSpec,omitempty"` ProfileCategory string `xml:"profileCategory,omitempty"` ProfileComponent string `xml:"profileComponent,omitempty"` } func init() { t["ProfileMetadata"] = reflect.TypeOf((*ProfileMetadata)(nil)).Elem() } type ProfileMetadataProfileSortSpec struct { DynamicData PolicyId string `xml:"policyId"` Parameter string `xml:"parameter"` } func init() { t["ProfileMetadataProfileSortSpec"] = reflect.TypeOf((*ProfileMetadataProfileSortSpec)(nil)).Elem() } type ProfileParameterMetadata struct { DynamicData Id ExtendedElementDescription `xml:"id"` Type string `xml:"type"` Optional bool `xml:"optional"` DefaultValue AnyType `xml:"defaultValue,omitempty,typeattr"` Hidden *bool `xml:"hidden"` SecuritySensitive *bool `xml:"securitySensitive"` ReadOnly *bool `xml:"readOnly"` } func init() { t["ProfileParameterMetadata"] = reflect.TypeOf((*ProfileParameterMetadata)(nil)).Elem() } type ProfilePolicy struct { DynamicData Id string `xml:"id"` PolicyOption BasePolicyOption `xml:"policyOption,typeattr"` } func init() { t["ProfilePolicy"] = reflect.TypeOf((*ProfilePolicy)(nil)).Elem() } type ProfilePolicyMetadata struct { DynamicData Id ExtendedElementDescription `xml:"id"` PossibleOption []BaseProfilePolicyOptionMetadata `xml:"possibleOption,typeattr"` } func init() { t["ProfilePolicyMetadata"] = reflect.TypeOf((*ProfilePolicyMetadata)(nil)).Elem() } type ProfilePolicyOptionMetadata struct { DynamicData Id ExtendedElementDescription `xml:"id"` Parameter []ProfileParameterMetadata `xml:"parameter,omitempty"` } func init() { t["ProfilePolicyOptionMetadata"] = reflect.TypeOf((*ProfilePolicyOptionMetadata)(nil)).Elem() } type ProfileProfileStructure struct { DynamicData ProfileTypeName string `xml:"profileTypeName"` Child []ProfileProfileStructureProperty `xml:"child,omitempty"` } func init() { t["ProfileProfileStructure"] = reflect.TypeOf((*ProfileProfileStructure)(nil)).Elem() } type ProfileProfileStructureProperty struct { DynamicData PropertyName string `xml:"propertyName"` Array bool `xml:"array"` Element ProfileProfileStructure `xml:"element"` } func init() { t["ProfileProfileStructureProperty"] = reflect.TypeOf((*ProfileProfileStructureProperty)(nil)).Elem() } type ProfilePropertyPath struct { DynamicData ProfilePath string `xml:"profilePath"` PolicyId string `xml:"policyId,omitempty"` ParameterId string `xml:"parameterId,omitempty"` } func init() { t["ProfilePropertyPath"] = reflect.TypeOf((*ProfilePropertyPath)(nil)).Elem() } type ProfileReferenceHostChangedEvent struct { ProfileEvent ReferenceHost *ManagedObjectReference `xml:"referenceHost,omitempty"` ReferenceHostName string `xml:"referenceHostName,omitempty"` PrevReferenceHostName string `xml:"prevReferenceHostName,omitempty"` } func init() { t["ProfileReferenceHostChangedEvent"] = reflect.TypeOf((*ProfileReferenceHostChangedEvent)(nil)).Elem() } type ProfileRemovedEvent struct { ProfileEvent } func init() { t["ProfileRemovedEvent"] = reflect.TypeOf((*ProfileRemovedEvent)(nil)).Elem() } type ProfileSerializedCreateSpec struct { ProfileCreateSpec ProfileConfigString string `xml:"profileConfigString"` } func init() { t["ProfileSerializedCreateSpec"] = reflect.TypeOf((*ProfileSerializedCreateSpec)(nil)).Elem() } type ProfileSimpleExpression struct { ProfileExpression ExpressionType string `xml:"expressionType"` Parameter []KeyAnyValue `xml:"parameter,omitempty"` } func init() { t["ProfileSimpleExpression"] = reflect.TypeOf((*ProfileSimpleExpression)(nil)).Elem() } type ProfileUpdateFailed struct { VimFault Failure []ProfileUpdateFailedUpdateFailure `xml:"failure"` } func init() { t["ProfileUpdateFailed"] = reflect.TypeOf((*ProfileUpdateFailed)(nil)).Elem() } type ProfileUpdateFailedFault ProfileUpdateFailed func init() { t["ProfileUpdateFailedFault"] = reflect.TypeOf((*ProfileUpdateFailedFault)(nil)).Elem() } type ProfileUpdateFailedUpdateFailure struct { DynamicData ProfilePath ProfilePropertyPath `xml:"profilePath"` ErrMsg LocalizableMessage `xml:"errMsg"` } func init() { t["ProfileUpdateFailedUpdateFailure"] = reflect.TypeOf((*ProfileUpdateFailedUpdateFailure)(nil)).Elem() } type PromoteDisksRequestType struct { This ManagedObjectReference `xml:"_this"` Unlink bool `xml:"unlink"` Disks []VirtualDisk `xml:"disks,omitempty"` } func init() { t["PromoteDisksRequestType"] = reflect.TypeOf((*PromoteDisksRequestType)(nil)).Elem() } type PromoteDisks_Task PromoteDisksRequestType func init() { t["PromoteDisks_Task"] = reflect.TypeOf((*PromoteDisks_Task)(nil)).Elem() } type PromoteDisks_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type PropertyChange struct { DynamicData Name string `xml:"name"` Op PropertyChangeOp `xml:"op"` Val AnyType `xml:"val,omitempty,typeattr"` } func init() { t["PropertyChange"] = reflect.TypeOf((*PropertyChange)(nil)).Elem() } type PropertyFilterSpec struct { DynamicData PropSet []PropertySpec `xml:"propSet"` ObjectSet []ObjectSpec `xml:"objectSet"` ReportMissingObjectsInResults *bool `xml:"reportMissingObjectsInResults"` } func init() { t["PropertyFilterSpec"] = reflect.TypeOf((*PropertyFilterSpec)(nil)).Elem() } type PropertyFilterUpdate struct { DynamicData Filter ManagedObjectReference `xml:"filter"` ObjectSet []ObjectUpdate `xml:"objectSet,omitempty"` MissingSet []MissingObject `xml:"missingSet,omitempty"` } func init() { t["PropertyFilterUpdate"] = reflect.TypeOf((*PropertyFilterUpdate)(nil)).Elem() } type PropertySpec struct { DynamicData Type string `xml:"type"` All *bool `xml:"all"` PathSet []string `xml:"pathSet,omitempty"` } func init() { t["PropertySpec"] = reflect.TypeOf((*PropertySpec)(nil)).Elem() } type PutUsbScanCodes PutUsbScanCodesRequestType func init() { t["PutUsbScanCodes"] = reflect.TypeOf((*PutUsbScanCodes)(nil)).Elem() } type PutUsbScanCodesRequestType struct { This ManagedObjectReference `xml:"_this"` Spec UsbScanCodeSpec `xml:"spec"` } func init() { t["PutUsbScanCodesRequestType"] = reflect.TypeOf((*PutUsbScanCodesRequestType)(nil)).Elem() } type PutUsbScanCodesResponse struct { Returnval int32 `xml:"returnval"` } type QuarantineModeFault struct { VmConfigFault VmName string `xml:"vmName"` FaultType string `xml:"faultType"` } func init() { t["QuarantineModeFault"] = reflect.TypeOf((*QuarantineModeFault)(nil)).Elem() } type QuarantineModeFaultFault QuarantineModeFault func init() { t["QuarantineModeFaultFault"] = reflect.TypeOf((*QuarantineModeFaultFault)(nil)).Elem() } type QueryAnswerFileStatus QueryAnswerFileStatusRequestType func init() { t["QueryAnswerFileStatus"] = reflect.TypeOf((*QueryAnswerFileStatus)(nil)).Elem() } type QueryAnswerFileStatusRequestType struct { This ManagedObjectReference `xml:"_this"` Host []ManagedObjectReference `xml:"host"` } func init() { t["QueryAnswerFileStatusRequestType"] = reflect.TypeOf((*QueryAnswerFileStatusRequestType)(nil)).Elem() } type QueryAnswerFileStatusResponse struct { Returnval []AnswerFileStatusResult `xml:"returnval,omitempty"` } type QueryAssignedLicenses QueryAssignedLicensesRequestType func init() { t["QueryAssignedLicenses"] = reflect.TypeOf((*QueryAssignedLicenses)(nil)).Elem() } type QueryAssignedLicensesRequestType struct { This ManagedObjectReference `xml:"_this"` EntityId string `xml:"entityId,omitempty"` } func init() { t["QueryAssignedLicensesRequestType"] = reflect.TypeOf((*QueryAssignedLicensesRequestType)(nil)).Elem() } type QueryAssignedLicensesResponse struct { Returnval []LicenseAssignmentManagerLicenseAssignment `xml:"returnval"` } type QueryAvailableDisksForVmfs QueryAvailableDisksForVmfsRequestType func init() { t["QueryAvailableDisksForVmfs"] = reflect.TypeOf((*QueryAvailableDisksForVmfs)(nil)).Elem() } type QueryAvailableDisksForVmfsRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore *ManagedObjectReference `xml:"datastore,omitempty"` } func init() { t["QueryAvailableDisksForVmfsRequestType"] = reflect.TypeOf((*QueryAvailableDisksForVmfsRequestType)(nil)).Elem() } type QueryAvailableDisksForVmfsResponse struct { Returnval []HostScsiDisk `xml:"returnval,omitempty"` } type QueryAvailableDvsSpec QueryAvailableDvsSpecRequestType func init() { t["QueryAvailableDvsSpec"] = reflect.TypeOf((*QueryAvailableDvsSpec)(nil)).Elem() } type QueryAvailableDvsSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Recommended *bool `xml:"recommended"` } func init() { t["QueryAvailableDvsSpecRequestType"] = reflect.TypeOf((*QueryAvailableDvsSpecRequestType)(nil)).Elem() } type QueryAvailableDvsSpecResponse struct { Returnval []DistributedVirtualSwitchProductSpec `xml:"returnval,omitempty"` } type QueryAvailablePartition QueryAvailablePartitionRequestType func init() { t["QueryAvailablePartition"] = reflect.TypeOf((*QueryAvailablePartition)(nil)).Elem() } type QueryAvailablePartitionRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryAvailablePartitionRequestType"] = reflect.TypeOf((*QueryAvailablePartitionRequestType)(nil)).Elem() } type QueryAvailablePartitionResponse struct { Returnval []HostDiagnosticPartition `xml:"returnval,omitempty"` } type QueryAvailablePerfMetric QueryAvailablePerfMetricRequestType func init() { t["QueryAvailablePerfMetric"] = reflect.TypeOf((*QueryAvailablePerfMetric)(nil)).Elem() } type QueryAvailablePerfMetricRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` BeginTime *time.Time `xml:"beginTime"` EndTime *time.Time `xml:"endTime"` IntervalId int32 `xml:"intervalId,omitempty"` } func init() { t["QueryAvailablePerfMetricRequestType"] = reflect.TypeOf((*QueryAvailablePerfMetricRequestType)(nil)).Elem() } type QueryAvailablePerfMetricResponse struct { Returnval []PerfMetricId `xml:"returnval,omitempty"` } type QueryAvailableSsds QueryAvailableSsdsRequestType func init() { t["QueryAvailableSsds"] = reflect.TypeOf((*QueryAvailableSsds)(nil)).Elem() } type QueryAvailableSsdsRequestType struct { This ManagedObjectReference `xml:"_this"` VffsPath string `xml:"vffsPath,omitempty"` } func init() { t["QueryAvailableSsdsRequestType"] = reflect.TypeOf((*QueryAvailableSsdsRequestType)(nil)).Elem() } type QueryAvailableSsdsResponse struct { Returnval []HostScsiDisk `xml:"returnval,omitempty"` } type QueryAvailableTimeZones QueryAvailableTimeZonesRequestType func init() { t["QueryAvailableTimeZones"] = reflect.TypeOf((*QueryAvailableTimeZones)(nil)).Elem() } type QueryAvailableTimeZonesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryAvailableTimeZonesRequestType"] = reflect.TypeOf((*QueryAvailableTimeZonesRequestType)(nil)).Elem() } type QueryAvailableTimeZonesResponse struct { Returnval []HostDateTimeSystemTimeZone `xml:"returnval,omitempty"` } type QueryBootDevices QueryBootDevicesRequestType func init() { t["QueryBootDevices"] = reflect.TypeOf((*QueryBootDevices)(nil)).Elem() } type QueryBootDevicesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryBootDevicesRequestType"] = reflect.TypeOf((*QueryBootDevicesRequestType)(nil)).Elem() } type QueryBootDevicesResponse struct { Returnval *HostBootDeviceInfo `xml:"returnval,omitempty"` } type QueryBoundVnics QueryBoundVnicsRequestType func init() { t["QueryBoundVnics"] = reflect.TypeOf((*QueryBoundVnics)(nil)).Elem() } type QueryBoundVnicsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaName string `xml:"iScsiHbaName"` } func init() { t["QueryBoundVnicsRequestType"] = reflect.TypeOf((*QueryBoundVnicsRequestType)(nil)).Elem() } type QueryBoundVnicsResponse struct { Returnval []IscsiPortInfo `xml:"returnval,omitempty"` } type QueryCandidateNics QueryCandidateNicsRequestType func init() { t["QueryCandidateNics"] = reflect.TypeOf((*QueryCandidateNics)(nil)).Elem() } type QueryCandidateNicsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaName string `xml:"iScsiHbaName"` } func init() { t["QueryCandidateNicsRequestType"] = reflect.TypeOf((*QueryCandidateNicsRequestType)(nil)).Elem() } type QueryCandidateNicsResponse struct { Returnval []IscsiPortInfo `xml:"returnval,omitempty"` } type QueryChangedDiskAreas QueryChangedDiskAreasRequestType func init() { t["QueryChangedDiskAreas"] = reflect.TypeOf((*QueryChangedDiskAreas)(nil)).Elem() } type QueryChangedDiskAreasRequestType struct { This ManagedObjectReference `xml:"_this"` Snapshot *ManagedObjectReference `xml:"snapshot,omitempty"` DeviceKey int32 `xml:"deviceKey"` StartOffset int64 `xml:"startOffset"` ChangeId string `xml:"changeId"` } func init() { t["QueryChangedDiskAreasRequestType"] = reflect.TypeOf((*QueryChangedDiskAreasRequestType)(nil)).Elem() } type QueryChangedDiskAreasResponse struct { Returnval DiskChangeInfo `xml:"returnval"` } type QueryCmmds QueryCmmdsRequestType func init() { t["QueryCmmds"] = reflect.TypeOf((*QueryCmmds)(nil)).Elem() } type QueryCmmdsRequestType struct { This ManagedObjectReference `xml:"_this"` Queries []HostVsanInternalSystemCmmdsQuery `xml:"queries"` } func init() { t["QueryCmmdsRequestType"] = reflect.TypeOf((*QueryCmmdsRequestType)(nil)).Elem() } type QueryCmmdsResponse struct { Returnval string `xml:"returnval"` } type QueryCompatibleHostForExistingDvs QueryCompatibleHostForExistingDvsRequestType func init() { t["QueryCompatibleHostForExistingDvs"] = reflect.TypeOf((*QueryCompatibleHostForExistingDvs)(nil)).Elem() } type QueryCompatibleHostForExistingDvsRequestType struct { This ManagedObjectReference `xml:"_this"` Container ManagedObjectReference `xml:"container"` Recursive bool `xml:"recursive"` Dvs ManagedObjectReference `xml:"dvs"` } func init() { t["QueryCompatibleHostForExistingDvsRequestType"] = reflect.TypeOf((*QueryCompatibleHostForExistingDvsRequestType)(nil)).Elem() } type QueryCompatibleHostForExistingDvsResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type QueryCompatibleHostForNewDvs QueryCompatibleHostForNewDvsRequestType func init() { t["QueryCompatibleHostForNewDvs"] = reflect.TypeOf((*QueryCompatibleHostForNewDvs)(nil)).Elem() } type QueryCompatibleHostForNewDvsRequestType struct { This ManagedObjectReference `xml:"_this"` Container ManagedObjectReference `xml:"container"` Recursive bool `xml:"recursive"` SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"` } func init() { t["QueryCompatibleHostForNewDvsRequestType"] = reflect.TypeOf((*QueryCompatibleHostForNewDvsRequestType)(nil)).Elem() } type QueryCompatibleHostForNewDvsResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type QueryComplianceStatus QueryComplianceStatusRequestType func init() { t["QueryComplianceStatus"] = reflect.TypeOf((*QueryComplianceStatus)(nil)).Elem() } type QueryComplianceStatusRequestType struct { This ManagedObjectReference `xml:"_this"` Profile []ManagedObjectReference `xml:"profile,omitempty"` Entity []ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["QueryComplianceStatusRequestType"] = reflect.TypeOf((*QueryComplianceStatusRequestType)(nil)).Elem() } type QueryComplianceStatusResponse struct { Returnval []ComplianceResult `xml:"returnval,omitempty"` } type QueryConfigOption QueryConfigOptionRequestType func init() { t["QueryConfigOption"] = reflect.TypeOf((*QueryConfigOption)(nil)).Elem() } type QueryConfigOptionDescriptor QueryConfigOptionDescriptorRequestType func init() { t["QueryConfigOptionDescriptor"] = reflect.TypeOf((*QueryConfigOptionDescriptor)(nil)).Elem() } type QueryConfigOptionDescriptorRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryConfigOptionDescriptorRequestType"] = reflect.TypeOf((*QueryConfigOptionDescriptorRequestType)(nil)).Elem() } type QueryConfigOptionDescriptorResponse struct { Returnval []VirtualMachineConfigOptionDescriptor `xml:"returnval,omitempty"` } type QueryConfigOptionEx QueryConfigOptionExRequestType func init() { t["QueryConfigOptionEx"] = reflect.TypeOf((*QueryConfigOptionEx)(nil)).Elem() } type QueryConfigOptionExRequestType struct { This ManagedObjectReference `xml:"_this"` Spec *EnvironmentBrowserConfigOptionQuerySpec `xml:"spec,omitempty"` } func init() { t["QueryConfigOptionExRequestType"] = reflect.TypeOf((*QueryConfigOptionExRequestType)(nil)).Elem() } type QueryConfigOptionExResponse struct { Returnval *VirtualMachineConfigOption `xml:"returnval,omitempty"` } type QueryConfigOptionRequestType struct { This ManagedObjectReference `xml:"_this"` Key string `xml:"key,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QueryConfigOptionRequestType"] = reflect.TypeOf((*QueryConfigOptionRequestType)(nil)).Elem() } type QueryConfigOptionResponse struct { Returnval *VirtualMachineConfigOption `xml:"returnval,omitempty"` } type QueryConfigTarget QueryConfigTargetRequestType func init() { t["QueryConfigTarget"] = reflect.TypeOf((*QueryConfigTarget)(nil)).Elem() } type QueryConfigTargetRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QueryConfigTargetRequestType"] = reflect.TypeOf((*QueryConfigTargetRequestType)(nil)).Elem() } type QueryConfigTargetResponse struct { Returnval *ConfigTarget `xml:"returnval,omitempty"` } type QueryConfiguredModuleOptionString QueryConfiguredModuleOptionStringRequestType func init() { t["QueryConfiguredModuleOptionString"] = reflect.TypeOf((*QueryConfiguredModuleOptionString)(nil)).Elem() } type QueryConfiguredModuleOptionStringRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` } func init() { t["QueryConfiguredModuleOptionStringRequestType"] = reflect.TypeOf((*QueryConfiguredModuleOptionStringRequestType)(nil)).Elem() } type QueryConfiguredModuleOptionStringResponse struct { Returnval string `xml:"returnval"` } type QueryConnectionInfo QueryConnectionInfoRequestType func init() { t["QueryConnectionInfo"] = reflect.TypeOf((*QueryConnectionInfo)(nil)).Elem() } type QueryConnectionInfoRequestType struct { This ManagedObjectReference `xml:"_this"` Hostname string `xml:"hostname"` Port int32 `xml:"port"` Username string `xml:"username"` Password string `xml:"password"` SslThumbprint string `xml:"sslThumbprint,omitempty"` } func init() { t["QueryConnectionInfoRequestType"] = reflect.TypeOf((*QueryConnectionInfoRequestType)(nil)).Elem() } type QueryConnectionInfoResponse struct { Returnval HostConnectInfo `xml:"returnval"` } type QueryConnectionInfoViaSpec QueryConnectionInfoViaSpecRequestType func init() { t["QueryConnectionInfoViaSpec"] = reflect.TypeOf((*QueryConnectionInfoViaSpec)(nil)).Elem() } type QueryConnectionInfoViaSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostConnectSpec `xml:"spec"` } func init() { t["QueryConnectionInfoViaSpecRequestType"] = reflect.TypeOf((*QueryConnectionInfoViaSpecRequestType)(nil)).Elem() } type QueryConnectionInfoViaSpecResponse struct { Returnval HostConnectInfo `xml:"returnval"` } type QueryDatastorePerformanceSummary QueryDatastorePerformanceSummaryRequestType func init() { t["QueryDatastorePerformanceSummary"] = reflect.TypeOf((*QueryDatastorePerformanceSummary)(nil)).Elem() } type QueryDatastorePerformanceSummaryRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["QueryDatastorePerformanceSummaryRequestType"] = reflect.TypeOf((*QueryDatastorePerformanceSummaryRequestType)(nil)).Elem() } type QueryDatastorePerformanceSummaryResponse struct { Returnval []StoragePerformanceSummary `xml:"returnval,omitempty"` } type QueryDateTime QueryDateTimeRequestType func init() { t["QueryDateTime"] = reflect.TypeOf((*QueryDateTime)(nil)).Elem() } type QueryDateTimeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryDateTimeRequestType"] = reflect.TypeOf((*QueryDateTimeRequestType)(nil)).Elem() } type QueryDateTimeResponse struct { Returnval time.Time `xml:"returnval"` } type QueryDescriptions QueryDescriptionsRequestType func init() { t["QueryDescriptions"] = reflect.TypeOf((*QueryDescriptions)(nil)).Elem() } type QueryDescriptionsRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QueryDescriptionsRequestType"] = reflect.TypeOf((*QueryDescriptionsRequestType)(nil)).Elem() } type QueryDescriptionsResponse struct { Returnval []DiagnosticManagerLogDescriptor `xml:"returnval,omitempty"` } type QueryDisksForVsan QueryDisksForVsanRequestType func init() { t["QueryDisksForVsan"] = reflect.TypeOf((*QueryDisksForVsan)(nil)).Elem() } type QueryDisksForVsanRequestType struct { This ManagedObjectReference `xml:"_this"` CanonicalName []string `xml:"canonicalName,omitempty"` } func init() { t["QueryDisksForVsanRequestType"] = reflect.TypeOf((*QueryDisksForVsanRequestType)(nil)).Elem() } type QueryDisksForVsanResponse struct { Returnval []VsanHostDiskResult `xml:"returnval,omitempty"` } type QueryDisksUsingFilter QueryDisksUsingFilterRequestType func init() { t["QueryDisksUsingFilter"] = reflect.TypeOf((*QueryDisksUsingFilter)(nil)).Elem() } type QueryDisksUsingFilterRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` CompRes ManagedObjectReference `xml:"compRes"` } func init() { t["QueryDisksUsingFilterRequestType"] = reflect.TypeOf((*QueryDisksUsingFilterRequestType)(nil)).Elem() } type QueryDisksUsingFilterResponse struct { Returnval []VirtualDiskId `xml:"returnval"` } type QueryDvsByUuid QueryDvsByUuidRequestType func init() { t["QueryDvsByUuid"] = reflect.TypeOf((*QueryDvsByUuid)(nil)).Elem() } type QueryDvsByUuidRequestType struct { This ManagedObjectReference `xml:"_this"` Uuid string `xml:"uuid"` } func init() { t["QueryDvsByUuidRequestType"] = reflect.TypeOf((*QueryDvsByUuidRequestType)(nil)).Elem() } type QueryDvsByUuidResponse struct { Returnval *ManagedObjectReference `xml:"returnval,omitempty"` } type QueryDvsCheckCompatibility QueryDvsCheckCompatibilityRequestType func init() { t["QueryDvsCheckCompatibility"] = reflect.TypeOf((*QueryDvsCheckCompatibility)(nil)).Elem() } type QueryDvsCheckCompatibilityRequestType struct { This ManagedObjectReference `xml:"_this"` HostContainer DistributedVirtualSwitchManagerHostContainer `xml:"hostContainer"` DvsProductSpec *DistributedVirtualSwitchManagerDvsProductSpec `xml:"dvsProductSpec,omitempty"` HostFilterSpec []BaseDistributedVirtualSwitchManagerHostDvsFilterSpec `xml:"hostFilterSpec,omitempty,typeattr"` } func init() { t["QueryDvsCheckCompatibilityRequestType"] = reflect.TypeOf((*QueryDvsCheckCompatibilityRequestType)(nil)).Elem() } type QueryDvsCheckCompatibilityResponse struct { Returnval []DistributedVirtualSwitchManagerCompatibilityResult `xml:"returnval,omitempty"` } type QueryDvsCompatibleHostSpec QueryDvsCompatibleHostSpecRequestType func init() { t["QueryDvsCompatibleHostSpec"] = reflect.TypeOf((*QueryDvsCompatibleHostSpec)(nil)).Elem() } type QueryDvsCompatibleHostSpecRequestType struct { This ManagedObjectReference `xml:"_this"` SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"` } func init() { t["QueryDvsCompatibleHostSpecRequestType"] = reflect.TypeOf((*QueryDvsCompatibleHostSpecRequestType)(nil)).Elem() } type QueryDvsCompatibleHostSpecResponse struct { Returnval []DistributedVirtualSwitchHostProductSpec `xml:"returnval,omitempty"` } type QueryDvsConfigTarget QueryDvsConfigTargetRequestType func init() { t["QueryDvsConfigTarget"] = reflect.TypeOf((*QueryDvsConfigTarget)(nil)).Elem() } type QueryDvsConfigTargetRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` Dvs *ManagedObjectReference `xml:"dvs,omitempty"` } func init() { t["QueryDvsConfigTargetRequestType"] = reflect.TypeOf((*QueryDvsConfigTargetRequestType)(nil)).Elem() } type QueryDvsConfigTargetResponse struct { Returnval DVSManagerDvsConfigTarget `xml:"returnval"` } type QueryDvsFeatureCapability QueryDvsFeatureCapabilityRequestType func init() { t["QueryDvsFeatureCapability"] = reflect.TypeOf((*QueryDvsFeatureCapability)(nil)).Elem() } type QueryDvsFeatureCapabilityRequestType struct { This ManagedObjectReference `xml:"_this"` SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"` } func init() { t["QueryDvsFeatureCapabilityRequestType"] = reflect.TypeOf((*QueryDvsFeatureCapabilityRequestType)(nil)).Elem() } type QueryDvsFeatureCapabilityResponse struct { Returnval BaseDVSFeatureCapability `xml:"returnval,omitempty,typeattr"` } type QueryEvents QueryEventsRequestType func init() { t["QueryEvents"] = reflect.TypeOf((*QueryEvents)(nil)).Elem() } type QueryEventsRequestType struct { This ManagedObjectReference `xml:"_this"` Filter EventFilterSpec `xml:"filter"` } func init() { t["QueryEventsRequestType"] = reflect.TypeOf((*QueryEventsRequestType)(nil)).Elem() } type QueryEventsResponse struct { Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` } type QueryExpressionMetadata QueryExpressionMetadataRequestType func init() { t["QueryExpressionMetadata"] = reflect.TypeOf((*QueryExpressionMetadata)(nil)).Elem() } type QueryExpressionMetadataRequestType struct { This ManagedObjectReference `xml:"_this"` ExpressionName []string `xml:"expressionName,omitempty"` Profile *ManagedObjectReference `xml:"profile,omitempty"` } func init() { t["QueryExpressionMetadataRequestType"] = reflect.TypeOf((*QueryExpressionMetadataRequestType)(nil)).Elem() } type QueryExpressionMetadataResponse struct { Returnval []ProfileExpressionMetadata `xml:"returnval,omitempty"` } type QueryExtensionIpAllocationUsage QueryExtensionIpAllocationUsageRequestType func init() { t["QueryExtensionIpAllocationUsage"] = reflect.TypeOf((*QueryExtensionIpAllocationUsage)(nil)).Elem() } type QueryExtensionIpAllocationUsageRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKeys []string `xml:"extensionKeys,omitempty"` } func init() { t["QueryExtensionIpAllocationUsageRequestType"] = reflect.TypeOf((*QueryExtensionIpAllocationUsageRequestType)(nil)).Elem() } type QueryExtensionIpAllocationUsageResponse struct { Returnval []ExtensionManagerIpAllocationUsage `xml:"returnval,omitempty"` } type QueryFaultToleranceCompatibility QueryFaultToleranceCompatibilityRequestType func init() { t["QueryFaultToleranceCompatibility"] = reflect.TypeOf((*QueryFaultToleranceCompatibility)(nil)).Elem() } type QueryFaultToleranceCompatibilityEx QueryFaultToleranceCompatibilityExRequestType func init() { t["QueryFaultToleranceCompatibilityEx"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityEx)(nil)).Elem() } type QueryFaultToleranceCompatibilityExRequestType struct { This ManagedObjectReference `xml:"_this"` ForLegacyFt *bool `xml:"forLegacyFt"` } func init() { t["QueryFaultToleranceCompatibilityExRequestType"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityExRequestType)(nil)).Elem() } type QueryFaultToleranceCompatibilityExResponse struct { Returnval []LocalizedMethodFault `xml:"returnval,omitempty"` } type QueryFaultToleranceCompatibilityRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryFaultToleranceCompatibilityRequestType"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityRequestType)(nil)).Elem() } type QueryFaultToleranceCompatibilityResponse struct { Returnval []LocalizedMethodFault `xml:"returnval,omitempty"` } type QueryFilterEntities QueryFilterEntitiesRequestType func init() { t["QueryFilterEntities"] = reflect.TypeOf((*QueryFilterEntities)(nil)).Elem() } type QueryFilterEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` } func init() { t["QueryFilterEntitiesRequestType"] = reflect.TypeOf((*QueryFilterEntitiesRequestType)(nil)).Elem() } type QueryFilterEntitiesResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type QueryFilterInfoIds QueryFilterInfoIdsRequestType func init() { t["QueryFilterInfoIds"] = reflect.TypeOf((*QueryFilterInfoIds)(nil)).Elem() } type QueryFilterInfoIdsRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` } func init() { t["QueryFilterInfoIdsRequestType"] = reflect.TypeOf((*QueryFilterInfoIdsRequestType)(nil)).Elem() } type QueryFilterInfoIdsResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryFilterList QueryFilterListRequestType func init() { t["QueryFilterList"] = reflect.TypeOf((*QueryFilterList)(nil)).Elem() } type QueryFilterListRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` } func init() { t["QueryFilterListRequestType"] = reflect.TypeOf((*QueryFilterListRequestType)(nil)).Elem() } type QueryFilterListResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryFilterName QueryFilterNameRequestType func init() { t["QueryFilterName"] = reflect.TypeOf((*QueryFilterName)(nil)).Elem() } type QueryFilterNameRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` } func init() { t["QueryFilterNameRequestType"] = reflect.TypeOf((*QueryFilterNameRequestType)(nil)).Elem() } type QueryFilterNameResponse struct { Returnval string `xml:"returnval"` } type QueryFirmwareConfigUploadURL QueryFirmwareConfigUploadURLRequestType func init() { t["QueryFirmwareConfigUploadURL"] = reflect.TypeOf((*QueryFirmwareConfigUploadURL)(nil)).Elem() } type QueryFirmwareConfigUploadURLRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryFirmwareConfigUploadURLRequestType"] = reflect.TypeOf((*QueryFirmwareConfigUploadURLRequestType)(nil)).Elem() } type QueryFirmwareConfigUploadURLResponse struct { Returnval string `xml:"returnval"` } type QueryHealthUpdateInfos QueryHealthUpdateInfosRequestType func init() { t["QueryHealthUpdateInfos"] = reflect.TypeOf((*QueryHealthUpdateInfos)(nil)).Elem() } type QueryHealthUpdateInfosRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` } func init() { t["QueryHealthUpdateInfosRequestType"] = reflect.TypeOf((*QueryHealthUpdateInfosRequestType)(nil)).Elem() } type QueryHealthUpdateInfosResponse struct { Returnval []HealthUpdateInfo `xml:"returnval,omitempty"` } type QueryHealthUpdates QueryHealthUpdatesRequestType func init() { t["QueryHealthUpdates"] = reflect.TypeOf((*QueryHealthUpdates)(nil)).Elem() } type QueryHealthUpdatesRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` } func init() { t["QueryHealthUpdatesRequestType"] = reflect.TypeOf((*QueryHealthUpdatesRequestType)(nil)).Elem() } type QueryHealthUpdatesResponse struct { Returnval []HealthUpdate `xml:"returnval,omitempty"` } type QueryHostConnectionInfo QueryHostConnectionInfoRequestType func init() { t["QueryHostConnectionInfo"] = reflect.TypeOf((*QueryHostConnectionInfo)(nil)).Elem() } type QueryHostConnectionInfoRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryHostConnectionInfoRequestType"] = reflect.TypeOf((*QueryHostConnectionInfoRequestType)(nil)).Elem() } type QueryHostConnectionInfoResponse struct { Returnval HostConnectInfo `xml:"returnval"` } type QueryHostPatchRequestType struct { This ManagedObjectReference `xml:"_this"` Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` } func init() { t["QueryHostPatchRequestType"] = reflect.TypeOf((*QueryHostPatchRequestType)(nil)).Elem() } type QueryHostPatch_Task QueryHostPatchRequestType func init() { t["QueryHostPatch_Task"] = reflect.TypeOf((*QueryHostPatch_Task)(nil)).Elem() } type QueryHostPatch_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type QueryHostProfileMetadata QueryHostProfileMetadataRequestType func init() { t["QueryHostProfileMetadata"] = reflect.TypeOf((*QueryHostProfileMetadata)(nil)).Elem() } type QueryHostProfileMetadataRequestType struct { This ManagedObjectReference `xml:"_this"` ProfileName []string `xml:"profileName,omitempty"` Profile *ManagedObjectReference `xml:"profile,omitempty"` } func init() { t["QueryHostProfileMetadataRequestType"] = reflect.TypeOf((*QueryHostProfileMetadataRequestType)(nil)).Elem() } type QueryHostProfileMetadataResponse struct { Returnval []ProfileMetadata `xml:"returnval,omitempty"` } type QueryHostStatus QueryHostStatusRequestType func init() { t["QueryHostStatus"] = reflect.TypeOf((*QueryHostStatus)(nil)).Elem() } type QueryHostStatusRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryHostStatusRequestType"] = reflect.TypeOf((*QueryHostStatusRequestType)(nil)).Elem() } type QueryHostStatusResponse struct { Returnval VsanHostClusterStatus `xml:"returnval"` } type QueryIORMConfigOption QueryIORMConfigOptionRequestType func init() { t["QueryIORMConfigOption"] = reflect.TypeOf((*QueryIORMConfigOption)(nil)).Elem() } type QueryIORMConfigOptionRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` } func init() { t["QueryIORMConfigOptionRequestType"] = reflect.TypeOf((*QueryIORMConfigOptionRequestType)(nil)).Elem() } type QueryIORMConfigOptionResponse struct { Returnval StorageIORMConfigOption `xml:"returnval"` } type QueryIPAllocations QueryIPAllocationsRequestType func init() { t["QueryIPAllocations"] = reflect.TypeOf((*QueryIPAllocations)(nil)).Elem() } type QueryIPAllocationsRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` PoolId int32 `xml:"poolId"` ExtensionKey string `xml:"extensionKey"` } func init() { t["QueryIPAllocationsRequestType"] = reflect.TypeOf((*QueryIPAllocationsRequestType)(nil)).Elem() } type QueryIPAllocationsResponse struct { Returnval []IpPoolManagerIpAllocation `xml:"returnval"` } type QueryIoFilterInfo QueryIoFilterInfoRequestType func init() { t["QueryIoFilterInfo"] = reflect.TypeOf((*QueryIoFilterInfo)(nil)).Elem() } type QueryIoFilterInfoRequestType struct { This ManagedObjectReference `xml:"_this"` CompRes ManagedObjectReference `xml:"compRes"` } func init() { t["QueryIoFilterInfoRequestType"] = reflect.TypeOf((*QueryIoFilterInfoRequestType)(nil)).Elem() } type QueryIoFilterInfoResponse struct { Returnval []ClusterIoFilterInfo `xml:"returnval,omitempty"` } type QueryIoFilterIssues QueryIoFilterIssuesRequestType func init() { t["QueryIoFilterIssues"] = reflect.TypeOf((*QueryIoFilterIssues)(nil)).Elem() } type QueryIoFilterIssuesRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` CompRes ManagedObjectReference `xml:"compRes"` } func init() { t["QueryIoFilterIssuesRequestType"] = reflect.TypeOf((*QueryIoFilterIssuesRequestType)(nil)).Elem() } type QueryIoFilterIssuesResponse struct { Returnval IoFilterQueryIssueResult `xml:"returnval"` } type QueryIpPools QueryIpPoolsRequestType func init() { t["QueryIpPools"] = reflect.TypeOf((*QueryIpPools)(nil)).Elem() } type QueryIpPoolsRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` } func init() { t["QueryIpPoolsRequestType"] = reflect.TypeOf((*QueryIpPoolsRequestType)(nil)).Elem() } type QueryIpPoolsResponse struct { Returnval []IpPool `xml:"returnval,omitempty"` } type QueryLicenseSourceAvailability QueryLicenseSourceAvailabilityRequestType func init() { t["QueryLicenseSourceAvailability"] = reflect.TypeOf((*QueryLicenseSourceAvailability)(nil)).Elem() } type QueryLicenseSourceAvailabilityRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QueryLicenseSourceAvailabilityRequestType"] = reflect.TypeOf((*QueryLicenseSourceAvailabilityRequestType)(nil)).Elem() } type QueryLicenseSourceAvailabilityResponse struct { Returnval []LicenseAvailabilityInfo `xml:"returnval,omitempty"` } type QueryLicenseUsage QueryLicenseUsageRequestType func init() { t["QueryLicenseUsage"] = reflect.TypeOf((*QueryLicenseUsage)(nil)).Elem() } type QueryLicenseUsageRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QueryLicenseUsageRequestType"] = reflect.TypeOf((*QueryLicenseUsageRequestType)(nil)).Elem() } type QueryLicenseUsageResponse struct { Returnval LicenseUsageInfo `xml:"returnval"` } type QueryLockdownExceptions QueryLockdownExceptionsRequestType func init() { t["QueryLockdownExceptions"] = reflect.TypeOf((*QueryLockdownExceptions)(nil)).Elem() } type QueryLockdownExceptionsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryLockdownExceptionsRequestType"] = reflect.TypeOf((*QueryLockdownExceptionsRequestType)(nil)).Elem() } type QueryLockdownExceptionsResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryManagedBy QueryManagedByRequestType func init() { t["QueryManagedBy"] = reflect.TypeOf((*QueryManagedBy)(nil)).Elem() } type QueryManagedByRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` } func init() { t["QueryManagedByRequestType"] = reflect.TypeOf((*QueryManagedByRequestType)(nil)).Elem() } type QueryManagedByResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type QueryMemoryOverhead QueryMemoryOverheadRequestType func init() { t["QueryMemoryOverhead"] = reflect.TypeOf((*QueryMemoryOverhead)(nil)).Elem() } type QueryMemoryOverheadEx QueryMemoryOverheadExRequestType func init() { t["QueryMemoryOverheadEx"] = reflect.TypeOf((*QueryMemoryOverheadEx)(nil)).Elem() } type QueryMemoryOverheadExRequestType struct { This ManagedObjectReference `xml:"_this"` VmConfigInfo VirtualMachineConfigInfo `xml:"vmConfigInfo"` } func init() { t["QueryMemoryOverheadExRequestType"] = reflect.TypeOf((*QueryMemoryOverheadExRequestType)(nil)).Elem() } type QueryMemoryOverheadExResponse struct { Returnval int64 `xml:"returnval"` } type QueryMemoryOverheadRequestType struct { This ManagedObjectReference `xml:"_this"` MemorySize int64 `xml:"memorySize"` VideoRamSize int32 `xml:"videoRamSize,omitempty"` NumVcpus int32 `xml:"numVcpus"` } func init() { t["QueryMemoryOverheadRequestType"] = reflect.TypeOf((*QueryMemoryOverheadRequestType)(nil)).Elem() } type QueryMemoryOverheadResponse struct { Returnval int64 `xml:"returnval"` } type QueryMigrationDependencies QueryMigrationDependenciesRequestType func init() { t["QueryMigrationDependencies"] = reflect.TypeOf((*QueryMigrationDependencies)(nil)).Elem() } type QueryMigrationDependenciesRequestType struct { This ManagedObjectReference `xml:"_this"` PnicDevice []string `xml:"pnicDevice"` } func init() { t["QueryMigrationDependenciesRequestType"] = reflect.TypeOf((*QueryMigrationDependenciesRequestType)(nil)).Elem() } type QueryMigrationDependenciesResponse struct { Returnval IscsiMigrationDependency `xml:"returnval"` } type QueryModules QueryModulesRequestType func init() { t["QueryModules"] = reflect.TypeOf((*QueryModules)(nil)).Elem() } type QueryModulesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryModulesRequestType"] = reflect.TypeOf((*QueryModulesRequestType)(nil)).Elem() } type QueryModulesResponse struct { Returnval []KernelModuleInfo `xml:"returnval,omitempty"` } type QueryMonitoredEntities QueryMonitoredEntitiesRequestType func init() { t["QueryMonitoredEntities"] = reflect.TypeOf((*QueryMonitoredEntities)(nil)).Elem() } type QueryMonitoredEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` } func init() { t["QueryMonitoredEntitiesRequestType"] = reflect.TypeOf((*QueryMonitoredEntitiesRequestType)(nil)).Elem() } type QueryMonitoredEntitiesResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type QueryNFSUser QueryNFSUserRequestType func init() { t["QueryNFSUser"] = reflect.TypeOf((*QueryNFSUser)(nil)).Elem() } type QueryNFSUserRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryNFSUserRequestType"] = reflect.TypeOf((*QueryNFSUserRequestType)(nil)).Elem() } type QueryNFSUserResponse struct { Returnval *HostNasVolumeUserInfo `xml:"returnval,omitempty"` } type QueryNetConfig QueryNetConfigRequestType func init() { t["QueryNetConfig"] = reflect.TypeOf((*QueryNetConfig)(nil)).Elem() } type QueryNetConfigRequestType struct { This ManagedObjectReference `xml:"_this"` NicType string `xml:"nicType"` } func init() { t["QueryNetConfigRequestType"] = reflect.TypeOf((*QueryNetConfigRequestType)(nil)).Elem() } type QueryNetConfigResponse struct { Returnval *VirtualNicManagerNetConfig `xml:"returnval,omitempty"` } type QueryNetworkHint QueryNetworkHintRequestType func init() { t["QueryNetworkHint"] = reflect.TypeOf((*QueryNetworkHint)(nil)).Elem() } type QueryNetworkHintRequestType struct { This ManagedObjectReference `xml:"_this"` Device []string `xml:"device,omitempty"` } func init() { t["QueryNetworkHintRequestType"] = reflect.TypeOf((*QueryNetworkHintRequestType)(nil)).Elem() } type QueryNetworkHintResponse struct { Returnval []PhysicalNicHintInfo `xml:"returnval,omitempty"` } type QueryObjectsOnPhysicalVsanDisk QueryObjectsOnPhysicalVsanDiskRequestType func init() { t["QueryObjectsOnPhysicalVsanDisk"] = reflect.TypeOf((*QueryObjectsOnPhysicalVsanDisk)(nil)).Elem() } type QueryObjectsOnPhysicalVsanDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Disks []string `xml:"disks"` } func init() { t["QueryObjectsOnPhysicalVsanDiskRequestType"] = reflect.TypeOf((*QueryObjectsOnPhysicalVsanDiskRequestType)(nil)).Elem() } type QueryObjectsOnPhysicalVsanDiskResponse struct { Returnval string `xml:"returnval"` } type QueryOptions QueryOptionsRequestType func init() { t["QueryOptions"] = reflect.TypeOf((*QueryOptions)(nil)).Elem() } type QueryOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name,omitempty"` } func init() { t["QueryOptionsRequestType"] = reflect.TypeOf((*QueryOptionsRequestType)(nil)).Elem() } type QueryOptionsResponse struct { Returnval []BaseOptionValue `xml:"returnval,omitempty,typeattr"` } type QueryPartitionCreateDesc QueryPartitionCreateDescRequestType func init() { t["QueryPartitionCreateDesc"] = reflect.TypeOf((*QueryPartitionCreateDesc)(nil)).Elem() } type QueryPartitionCreateDescRequestType struct { This ManagedObjectReference `xml:"_this"` DiskUuid string `xml:"diskUuid"` DiagnosticType string `xml:"diagnosticType"` } func init() { t["QueryPartitionCreateDescRequestType"] = reflect.TypeOf((*QueryPartitionCreateDescRequestType)(nil)).Elem() } type QueryPartitionCreateDescResponse struct { Returnval HostDiagnosticPartitionCreateDescription `xml:"returnval"` } type QueryPartitionCreateOptions QueryPartitionCreateOptionsRequestType func init() { t["QueryPartitionCreateOptions"] = reflect.TypeOf((*QueryPartitionCreateOptions)(nil)).Elem() } type QueryPartitionCreateOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` StorageType string `xml:"storageType"` DiagnosticType string `xml:"diagnosticType"` } func init() { t["QueryPartitionCreateOptionsRequestType"] = reflect.TypeOf((*QueryPartitionCreateOptionsRequestType)(nil)).Elem() } type QueryPartitionCreateOptionsResponse struct { Returnval []HostDiagnosticPartitionCreateOption `xml:"returnval,omitempty"` } type QueryPathSelectionPolicyOptions QueryPathSelectionPolicyOptionsRequestType func init() { t["QueryPathSelectionPolicyOptions"] = reflect.TypeOf((*QueryPathSelectionPolicyOptions)(nil)).Elem() } type QueryPathSelectionPolicyOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryPathSelectionPolicyOptionsRequestType"] = reflect.TypeOf((*QueryPathSelectionPolicyOptionsRequestType)(nil)).Elem() } type QueryPathSelectionPolicyOptionsResponse struct { Returnval []HostPathSelectionPolicyOption `xml:"returnval,omitempty"` } type QueryPerf QueryPerfRequestType func init() { t["QueryPerf"] = reflect.TypeOf((*QueryPerf)(nil)).Elem() } type QueryPerfComposite QueryPerfCompositeRequestType func init() { t["QueryPerfComposite"] = reflect.TypeOf((*QueryPerfComposite)(nil)).Elem() } type QueryPerfCompositeRequestType struct { This ManagedObjectReference `xml:"_this"` QuerySpec PerfQuerySpec `xml:"querySpec"` } func init() { t["QueryPerfCompositeRequestType"] = reflect.TypeOf((*QueryPerfCompositeRequestType)(nil)).Elem() } type QueryPerfCompositeResponse struct { Returnval PerfCompositeMetric `xml:"returnval"` } type QueryPerfCounter QueryPerfCounterRequestType func init() { t["QueryPerfCounter"] = reflect.TypeOf((*QueryPerfCounter)(nil)).Elem() } type QueryPerfCounterByLevel QueryPerfCounterByLevelRequestType func init() { t["QueryPerfCounterByLevel"] = reflect.TypeOf((*QueryPerfCounterByLevel)(nil)).Elem() } type QueryPerfCounterByLevelRequestType struct { This ManagedObjectReference `xml:"_this"` Level int32 `xml:"level"` } func init() { t["QueryPerfCounterByLevelRequestType"] = reflect.TypeOf((*QueryPerfCounterByLevelRequestType)(nil)).Elem() } type QueryPerfCounterByLevelResponse struct { Returnval []PerfCounterInfo `xml:"returnval"` } type QueryPerfCounterRequestType struct { This ManagedObjectReference `xml:"_this"` CounterId []int32 `xml:"counterId"` } func init() { t["QueryPerfCounterRequestType"] = reflect.TypeOf((*QueryPerfCounterRequestType)(nil)).Elem() } type QueryPerfCounterResponse struct { Returnval []PerfCounterInfo `xml:"returnval,omitempty"` } type QueryPerfProviderSummary QueryPerfProviderSummaryRequestType func init() { t["QueryPerfProviderSummary"] = reflect.TypeOf((*QueryPerfProviderSummary)(nil)).Elem() } type QueryPerfProviderSummaryRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["QueryPerfProviderSummaryRequestType"] = reflect.TypeOf((*QueryPerfProviderSummaryRequestType)(nil)).Elem() } type QueryPerfProviderSummaryResponse struct { Returnval PerfProviderSummary `xml:"returnval"` } type QueryPerfRequestType struct { This ManagedObjectReference `xml:"_this"` QuerySpec []PerfQuerySpec `xml:"querySpec"` } func init() { t["QueryPerfRequestType"] = reflect.TypeOf((*QueryPerfRequestType)(nil)).Elem() } type QueryPerfResponse struct { Returnval []BasePerfEntityMetricBase `xml:"returnval,omitempty,typeattr"` } type QueryPhysicalVsanDisks QueryPhysicalVsanDisksRequestType func init() { t["QueryPhysicalVsanDisks"] = reflect.TypeOf((*QueryPhysicalVsanDisks)(nil)).Elem() } type QueryPhysicalVsanDisksRequestType struct { This ManagedObjectReference `xml:"_this"` Props []string `xml:"props,omitempty"` } func init() { t["QueryPhysicalVsanDisksRequestType"] = reflect.TypeOf((*QueryPhysicalVsanDisksRequestType)(nil)).Elem() } type QueryPhysicalVsanDisksResponse struct { Returnval string `xml:"returnval"` } type QueryPnicStatus QueryPnicStatusRequestType func init() { t["QueryPnicStatus"] = reflect.TypeOf((*QueryPnicStatus)(nil)).Elem() } type QueryPnicStatusRequestType struct { This ManagedObjectReference `xml:"_this"` PnicDevice string `xml:"pnicDevice"` } func init() { t["QueryPnicStatusRequestType"] = reflect.TypeOf((*QueryPnicStatusRequestType)(nil)).Elem() } type QueryPnicStatusResponse struct { Returnval IscsiStatus `xml:"returnval"` } type QueryPolicyMetadata QueryPolicyMetadataRequestType func init() { t["QueryPolicyMetadata"] = reflect.TypeOf((*QueryPolicyMetadata)(nil)).Elem() } type QueryPolicyMetadataRequestType struct { This ManagedObjectReference `xml:"_this"` PolicyName []string `xml:"policyName,omitempty"` Profile *ManagedObjectReference `xml:"profile,omitempty"` } func init() { t["QueryPolicyMetadataRequestType"] = reflect.TypeOf((*QueryPolicyMetadataRequestType)(nil)).Elem() } type QueryPolicyMetadataResponse struct { Returnval []ProfilePolicyMetadata `xml:"returnval,omitempty"` } type QueryProfileStructure QueryProfileStructureRequestType func init() { t["QueryProfileStructure"] = reflect.TypeOf((*QueryProfileStructure)(nil)).Elem() } type QueryProfileStructureRequestType struct { This ManagedObjectReference `xml:"_this"` Profile *ManagedObjectReference `xml:"profile,omitempty"` } func init() { t["QueryProfileStructureRequestType"] = reflect.TypeOf((*QueryProfileStructureRequestType)(nil)).Elem() } type QueryProfileStructureResponse struct { Returnval ProfileProfileStructure `xml:"returnval"` } type QueryProviderList QueryProviderListRequestType func init() { t["QueryProviderList"] = reflect.TypeOf((*QueryProviderList)(nil)).Elem() } type QueryProviderListRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryProviderListRequestType"] = reflect.TypeOf((*QueryProviderListRequestType)(nil)).Elem() } type QueryProviderListResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryProviderName QueryProviderNameRequestType func init() { t["QueryProviderName"] = reflect.TypeOf((*QueryProviderName)(nil)).Elem() } type QueryProviderNameRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["QueryProviderNameRequestType"] = reflect.TypeOf((*QueryProviderNameRequestType)(nil)).Elem() } type QueryProviderNameResponse struct { Returnval string `xml:"returnval"` } type QueryResourceConfigOption QueryResourceConfigOptionRequestType func init() { t["QueryResourceConfigOption"] = reflect.TypeOf((*QueryResourceConfigOption)(nil)).Elem() } type QueryResourceConfigOptionRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryResourceConfigOptionRequestType"] = reflect.TypeOf((*QueryResourceConfigOptionRequestType)(nil)).Elem() } type QueryResourceConfigOptionResponse struct { Returnval ResourceConfigOption `xml:"returnval"` } type QueryServiceList QueryServiceListRequestType func init() { t["QueryServiceList"] = reflect.TypeOf((*QueryServiceList)(nil)).Elem() } type QueryServiceListRequestType struct { This ManagedObjectReference `xml:"_this"` ServiceName string `xml:"serviceName,omitempty"` Location []string `xml:"location,omitempty"` } func init() { t["QueryServiceListRequestType"] = reflect.TypeOf((*QueryServiceListRequestType)(nil)).Elem() } type QueryServiceListResponse struct { Returnval []ServiceManagerServiceInfo `xml:"returnval,omitempty"` } type QueryStorageArrayTypePolicyOptions QueryStorageArrayTypePolicyOptionsRequestType func init() { t["QueryStorageArrayTypePolicyOptions"] = reflect.TypeOf((*QueryStorageArrayTypePolicyOptions)(nil)).Elem() } type QueryStorageArrayTypePolicyOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryStorageArrayTypePolicyOptionsRequestType"] = reflect.TypeOf((*QueryStorageArrayTypePolicyOptionsRequestType)(nil)).Elem() } type QueryStorageArrayTypePolicyOptionsResponse struct { Returnval []HostStorageArrayTypePolicyOption `xml:"returnval,omitempty"` } type QuerySupportedFeatures QuerySupportedFeaturesRequestType func init() { t["QuerySupportedFeatures"] = reflect.TypeOf((*QuerySupportedFeatures)(nil)).Elem() } type QuerySupportedFeaturesRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QuerySupportedFeaturesRequestType"] = reflect.TypeOf((*QuerySupportedFeaturesRequestType)(nil)).Elem() } type QuerySupportedFeaturesResponse struct { Returnval []LicenseFeatureInfo `xml:"returnval,omitempty"` } type QuerySyncingVsanObjects QuerySyncingVsanObjectsRequestType func init() { t["QuerySyncingVsanObjects"] = reflect.TypeOf((*QuerySyncingVsanObjects)(nil)).Elem() } type QuerySyncingVsanObjectsRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids,omitempty"` } func init() { t["QuerySyncingVsanObjectsRequestType"] = reflect.TypeOf((*QuerySyncingVsanObjectsRequestType)(nil)).Elem() } type QuerySyncingVsanObjectsResponse struct { Returnval string `xml:"returnval"` } type QuerySystemUsers QuerySystemUsersRequestType func init() { t["QuerySystemUsers"] = reflect.TypeOf((*QuerySystemUsers)(nil)).Elem() } type QuerySystemUsersRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QuerySystemUsersRequestType"] = reflect.TypeOf((*QuerySystemUsersRequestType)(nil)).Elem() } type QuerySystemUsersResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryTargetCapabilities QueryTargetCapabilitiesRequestType func init() { t["QueryTargetCapabilities"] = reflect.TypeOf((*QueryTargetCapabilities)(nil)).Elem() } type QueryTargetCapabilitiesRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["QueryTargetCapabilitiesRequestType"] = reflect.TypeOf((*QueryTargetCapabilitiesRequestType)(nil)).Elem() } type QueryTargetCapabilitiesResponse struct { Returnval *HostCapability `xml:"returnval,omitempty"` } type QueryTpmAttestationReport QueryTpmAttestationReportRequestType func init() { t["QueryTpmAttestationReport"] = reflect.TypeOf((*QueryTpmAttestationReport)(nil)).Elem() } type QueryTpmAttestationReportRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryTpmAttestationReportRequestType"] = reflect.TypeOf((*QueryTpmAttestationReportRequestType)(nil)).Elem() } type QueryTpmAttestationReportResponse struct { Returnval *HostTpmAttestationReport `xml:"returnval,omitempty"` } type QueryUnmonitoredHosts QueryUnmonitoredHostsRequestType func init() { t["QueryUnmonitoredHosts"] = reflect.TypeOf((*QueryUnmonitoredHosts)(nil)).Elem() } type QueryUnmonitoredHostsRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` Cluster ManagedObjectReference `xml:"cluster"` } func init() { t["QueryUnmonitoredHostsRequestType"] = reflect.TypeOf((*QueryUnmonitoredHostsRequestType)(nil)).Elem() } type QueryUnmonitoredHostsResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type QueryUnownedFiles QueryUnownedFilesRequestType func init() { t["QueryUnownedFiles"] = reflect.TypeOf((*QueryUnownedFiles)(nil)).Elem() } type QueryUnownedFilesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryUnownedFilesRequestType"] = reflect.TypeOf((*QueryUnownedFilesRequestType)(nil)).Elem() } type QueryUnownedFilesResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryUnresolvedVmfsVolume QueryUnresolvedVmfsVolumeRequestType func init() { t["QueryUnresolvedVmfsVolume"] = reflect.TypeOf((*QueryUnresolvedVmfsVolume)(nil)).Elem() } type QueryUnresolvedVmfsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryUnresolvedVmfsVolumeRequestType"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumeRequestType)(nil)).Elem() } type QueryUnresolvedVmfsVolumeResponse struct { Returnval []HostUnresolvedVmfsVolume `xml:"returnval,omitempty"` } type QueryUnresolvedVmfsVolumes QueryUnresolvedVmfsVolumesRequestType func init() { t["QueryUnresolvedVmfsVolumes"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumes)(nil)).Elem() } type QueryUnresolvedVmfsVolumesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryUnresolvedVmfsVolumesRequestType"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumesRequestType)(nil)).Elem() } type QueryUnresolvedVmfsVolumesResponse struct { Returnval []HostUnresolvedVmfsVolume `xml:"returnval,omitempty"` } type QueryUsedVlanIdInDvs QueryUsedVlanIdInDvsRequestType func init() { t["QueryUsedVlanIdInDvs"] = reflect.TypeOf((*QueryUsedVlanIdInDvs)(nil)).Elem() } type QueryUsedVlanIdInDvsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryUsedVlanIdInDvsRequestType"] = reflect.TypeOf((*QueryUsedVlanIdInDvsRequestType)(nil)).Elem() } type QueryUsedVlanIdInDvsResponse struct { Returnval []int32 `xml:"returnval,omitempty"` } type QueryVMotionCompatibility QueryVMotionCompatibilityRequestType func init() { t["QueryVMotionCompatibility"] = reflect.TypeOf((*QueryVMotionCompatibility)(nil)).Elem() } type QueryVMotionCompatibilityExRequestType struct { This ManagedObjectReference `xml:"_this"` Vm []ManagedObjectReference `xml:"vm"` Host []ManagedObjectReference `xml:"host"` } func init() { t["QueryVMotionCompatibilityExRequestType"] = reflect.TypeOf((*QueryVMotionCompatibilityExRequestType)(nil)).Elem() } type QueryVMotionCompatibilityEx_Task QueryVMotionCompatibilityExRequestType func init() { t["QueryVMotionCompatibilityEx_Task"] = reflect.TypeOf((*QueryVMotionCompatibilityEx_Task)(nil)).Elem() } type QueryVMotionCompatibilityEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type QueryVMotionCompatibilityRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Host []ManagedObjectReference `xml:"host"` Compatibility []string `xml:"compatibility,omitempty"` } func init() { t["QueryVMotionCompatibilityRequestType"] = reflect.TypeOf((*QueryVMotionCompatibilityRequestType)(nil)).Elem() } type QueryVMotionCompatibilityResponse struct { Returnval []HostVMotionCompatibility `xml:"returnval,omitempty"` } type QueryVirtualDiskFragmentation QueryVirtualDiskFragmentationRequestType func init() { t["QueryVirtualDiskFragmentation"] = reflect.TypeOf((*QueryVirtualDiskFragmentation)(nil)).Elem() } type QueryVirtualDiskFragmentationRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["QueryVirtualDiskFragmentationRequestType"] = reflect.TypeOf((*QueryVirtualDiskFragmentationRequestType)(nil)).Elem() } type QueryVirtualDiskFragmentationResponse struct { Returnval int32 `xml:"returnval"` } type QueryVirtualDiskGeometry QueryVirtualDiskGeometryRequestType func init() { t["QueryVirtualDiskGeometry"] = reflect.TypeOf((*QueryVirtualDiskGeometry)(nil)).Elem() } type QueryVirtualDiskGeometryRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["QueryVirtualDiskGeometryRequestType"] = reflect.TypeOf((*QueryVirtualDiskGeometryRequestType)(nil)).Elem() } type QueryVirtualDiskGeometryResponse struct { Returnval HostDiskDimensionsChs `xml:"returnval"` } type QueryVirtualDiskUuid QueryVirtualDiskUuidRequestType func init() { t["QueryVirtualDiskUuid"] = reflect.TypeOf((*QueryVirtualDiskUuid)(nil)).Elem() } type QueryVirtualDiskUuidRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["QueryVirtualDiskUuidRequestType"] = reflect.TypeOf((*QueryVirtualDiskUuidRequestType)(nil)).Elem() } type QueryVirtualDiskUuidResponse struct { Returnval string `xml:"returnval"` } type QueryVmfsConfigOption QueryVmfsConfigOptionRequestType func init() { t["QueryVmfsConfigOption"] = reflect.TypeOf((*QueryVmfsConfigOption)(nil)).Elem() } type QueryVmfsConfigOptionRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["QueryVmfsConfigOptionRequestType"] = reflect.TypeOf((*QueryVmfsConfigOptionRequestType)(nil)).Elem() } type QueryVmfsConfigOptionResponse struct { Returnval []VmfsConfigOption `xml:"returnval,omitempty"` } type QueryVmfsDatastoreCreateOptions QueryVmfsDatastoreCreateOptionsRequestType func init() { t["QueryVmfsDatastoreCreateOptions"] = reflect.TypeOf((*QueryVmfsDatastoreCreateOptions)(nil)).Elem() } type QueryVmfsDatastoreCreateOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` DevicePath string `xml:"devicePath"` VmfsMajorVersion int32 `xml:"vmfsMajorVersion,omitempty"` } func init() { t["QueryVmfsDatastoreCreateOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreCreateOptionsRequestType)(nil)).Elem() } type QueryVmfsDatastoreCreateOptionsResponse struct { Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"` } type QueryVmfsDatastoreExpandOptions QueryVmfsDatastoreExpandOptionsRequestType func init() { t["QueryVmfsDatastoreExpandOptions"] = reflect.TypeOf((*QueryVmfsDatastoreExpandOptions)(nil)).Elem() } type QueryVmfsDatastoreExpandOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["QueryVmfsDatastoreExpandOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreExpandOptionsRequestType)(nil)).Elem() } type QueryVmfsDatastoreExpandOptionsResponse struct { Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"` } type QueryVmfsDatastoreExtendOptions QueryVmfsDatastoreExtendOptionsRequestType func init() { t["QueryVmfsDatastoreExtendOptions"] = reflect.TypeOf((*QueryVmfsDatastoreExtendOptions)(nil)).Elem() } type QueryVmfsDatastoreExtendOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` DevicePath string `xml:"devicePath"` SuppressExpandCandidates *bool `xml:"suppressExpandCandidates"` } func init() { t["QueryVmfsDatastoreExtendOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreExtendOptionsRequestType)(nil)).Elem() } type QueryVmfsDatastoreExtendOptionsResponse struct { Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"` } type QueryVnicStatus QueryVnicStatusRequestType func init() { t["QueryVnicStatus"] = reflect.TypeOf((*QueryVnicStatus)(nil)).Elem() } type QueryVnicStatusRequestType struct { This ManagedObjectReference `xml:"_this"` VnicDevice string `xml:"vnicDevice"` } func init() { t["QueryVnicStatusRequestType"] = reflect.TypeOf((*QueryVnicStatusRequestType)(nil)).Elem() } type QueryVnicStatusResponse struct { Returnval IscsiStatus `xml:"returnval"` } type QueryVsanObjectUuidsByFilter QueryVsanObjectUuidsByFilterRequestType func init() { t["QueryVsanObjectUuidsByFilter"] = reflect.TypeOf((*QueryVsanObjectUuidsByFilter)(nil)).Elem() } type QueryVsanObjectUuidsByFilterRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids,omitempty"` Limit int32 `xml:"limit,omitempty"` Version int32 `xml:"version,omitempty"` } func init() { t["QueryVsanObjectUuidsByFilterRequestType"] = reflect.TypeOf((*QueryVsanObjectUuidsByFilterRequestType)(nil)).Elem() } type QueryVsanObjectUuidsByFilterResponse struct { Returnval []string `xml:"returnval,omitempty"` } type QueryVsanObjects QueryVsanObjectsRequestType func init() { t["QueryVsanObjects"] = reflect.TypeOf((*QueryVsanObjects)(nil)).Elem() } type QueryVsanObjectsRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids,omitempty"` } func init() { t["QueryVsanObjectsRequestType"] = reflect.TypeOf((*QueryVsanObjectsRequestType)(nil)).Elem() } type QueryVsanObjectsResponse struct { Returnval string `xml:"returnval"` } type QueryVsanStatistics QueryVsanStatisticsRequestType func init() { t["QueryVsanStatistics"] = reflect.TypeOf((*QueryVsanStatistics)(nil)).Elem() } type QueryVsanStatisticsRequestType struct { This ManagedObjectReference `xml:"_this"` Labels []string `xml:"labels"` } func init() { t["QueryVsanStatisticsRequestType"] = reflect.TypeOf((*QueryVsanStatisticsRequestType)(nil)).Elem() } type QueryVsanStatisticsResponse struct { Returnval string `xml:"returnval"` } type QueryVsanUpgradeStatus QueryVsanUpgradeStatusRequestType func init() { t["QueryVsanUpgradeStatus"] = reflect.TypeOf((*QueryVsanUpgradeStatus)(nil)).Elem() } type QueryVsanUpgradeStatusRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster ManagedObjectReference `xml:"cluster"` } func init() { t["QueryVsanUpgradeStatusRequestType"] = reflect.TypeOf((*QueryVsanUpgradeStatusRequestType)(nil)).Elem() } type QueryVsanUpgradeStatusResponse struct { Returnval VsanUpgradeSystemUpgradeStatus `xml:"returnval"` } type QuestionPending struct { InvalidState Text string `xml:"text"` } func init() { t["QuestionPending"] = reflect.TypeOf((*QuestionPending)(nil)).Elem() } type QuestionPendingFault QuestionPending func init() { t["QuestionPendingFault"] = reflect.TypeOf((*QuestionPendingFault)(nil)).Elem() } type QuiesceDatastoreIOForHAFailed struct { ResourceInUse Host ManagedObjectReference `xml:"host"` HostName string `xml:"hostName"` Ds ManagedObjectReference `xml:"ds"` DsName string `xml:"dsName"` } func init() { t["QuiesceDatastoreIOForHAFailed"] = reflect.TypeOf((*QuiesceDatastoreIOForHAFailed)(nil)).Elem() } type QuiesceDatastoreIOForHAFailedFault QuiesceDatastoreIOForHAFailed func init() { t["QuiesceDatastoreIOForHAFailedFault"] = reflect.TypeOf((*QuiesceDatastoreIOForHAFailedFault)(nil)).Elem() } type RDMConversionNotSupported struct { MigrationFault Device string `xml:"device"` } func init() { t["RDMConversionNotSupported"] = reflect.TypeOf((*RDMConversionNotSupported)(nil)).Elem() } type RDMConversionNotSupportedFault RDMConversionNotSupported func init() { t["RDMConversionNotSupportedFault"] = reflect.TypeOf((*RDMConversionNotSupportedFault)(nil)).Elem() } type RDMNotPreserved struct { MigrationFault Device string `xml:"device"` } func init() { t["RDMNotPreserved"] = reflect.TypeOf((*RDMNotPreserved)(nil)).Elem() } type RDMNotPreservedFault RDMNotPreserved func init() { t["RDMNotPreservedFault"] = reflect.TypeOf((*RDMNotPreservedFault)(nil)).Elem() } type RDMNotSupported struct { DeviceNotSupported } func init() { t["RDMNotSupported"] = reflect.TypeOf((*RDMNotSupported)(nil)).Elem() } type RDMNotSupportedFault BaseRDMNotSupported func init() { t["RDMNotSupportedFault"] = reflect.TypeOf((*RDMNotSupportedFault)(nil)).Elem() } type RDMNotSupportedOnDatastore struct { VmConfigFault Device string `xml:"device"` Datastore ManagedObjectReference `xml:"datastore"` DatastoreName string `xml:"datastoreName"` } func init() { t["RDMNotSupportedOnDatastore"] = reflect.TypeOf((*RDMNotSupportedOnDatastore)(nil)).Elem() } type RDMNotSupportedOnDatastoreFault RDMNotSupportedOnDatastore func init() { t["RDMNotSupportedOnDatastoreFault"] = reflect.TypeOf((*RDMNotSupportedOnDatastoreFault)(nil)).Elem() } type RDMPointsToInaccessibleDisk struct { CannotAccessVmDisk } func init() { t["RDMPointsToInaccessibleDisk"] = reflect.TypeOf((*RDMPointsToInaccessibleDisk)(nil)).Elem() } type RDMPointsToInaccessibleDiskFault RDMPointsToInaccessibleDisk func init() { t["RDMPointsToInaccessibleDiskFault"] = reflect.TypeOf((*RDMPointsToInaccessibleDiskFault)(nil)).Elem() } type RawDiskNotSupported struct { DeviceNotSupported } func init() { t["RawDiskNotSupported"] = reflect.TypeOf((*RawDiskNotSupported)(nil)).Elem() } type RawDiskNotSupportedFault RawDiskNotSupported func init() { t["RawDiskNotSupportedFault"] = reflect.TypeOf((*RawDiskNotSupportedFault)(nil)).Elem() } type ReadEnvironmentVariableInGuest ReadEnvironmentVariableInGuestRequestType func init() { t["ReadEnvironmentVariableInGuest"] = reflect.TypeOf((*ReadEnvironmentVariableInGuest)(nil)).Elem() } type ReadEnvironmentVariableInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Names []string `xml:"names,omitempty"` } func init() { t["ReadEnvironmentVariableInGuestRequestType"] = reflect.TypeOf((*ReadEnvironmentVariableInGuestRequestType)(nil)).Elem() } type ReadEnvironmentVariableInGuestResponse struct { Returnval []string `xml:"returnval,omitempty"` } type ReadHostResourcePoolTreeFailed struct { HostConnectFault } func init() { t["ReadHostResourcePoolTreeFailed"] = reflect.TypeOf((*ReadHostResourcePoolTreeFailed)(nil)).Elem() } type ReadHostResourcePoolTreeFailedFault ReadHostResourcePoolTreeFailed func init() { t["ReadHostResourcePoolTreeFailedFault"] = reflect.TypeOf((*ReadHostResourcePoolTreeFailedFault)(nil)).Elem() } type ReadNextEvents ReadNextEventsRequestType func init() { t["ReadNextEvents"] = reflect.TypeOf((*ReadNextEvents)(nil)).Elem() } type ReadNextEventsRequestType struct { This ManagedObjectReference `xml:"_this"` MaxCount int32 `xml:"maxCount"` } func init() { t["ReadNextEventsRequestType"] = reflect.TypeOf((*ReadNextEventsRequestType)(nil)).Elem() } type ReadNextEventsResponse struct { Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` } type ReadNextTasks ReadNextTasksRequestType func init() { t["ReadNextTasks"] = reflect.TypeOf((*ReadNextTasks)(nil)).Elem() } type ReadNextTasksRequestType struct { This ManagedObjectReference `xml:"_this"` MaxCount int32 `xml:"maxCount"` } func init() { t["ReadNextTasksRequestType"] = reflect.TypeOf((*ReadNextTasksRequestType)(nil)).Elem() } type ReadNextTasksResponse struct { Returnval []TaskInfo `xml:"returnval,omitempty"` } type ReadOnlyDisksWithLegacyDestination struct { MigrationFault RoDiskCount int32 `xml:"roDiskCount"` TimeoutDanger bool `xml:"timeoutDanger"` } func init() { t["ReadOnlyDisksWithLegacyDestination"] = reflect.TypeOf((*ReadOnlyDisksWithLegacyDestination)(nil)).Elem() } type ReadOnlyDisksWithLegacyDestinationFault ReadOnlyDisksWithLegacyDestination func init() { t["ReadOnlyDisksWithLegacyDestinationFault"] = reflect.TypeOf((*ReadOnlyDisksWithLegacyDestinationFault)(nil)).Elem() } type ReadPreviousEvents ReadPreviousEventsRequestType func init() { t["ReadPreviousEvents"] = reflect.TypeOf((*ReadPreviousEvents)(nil)).Elem() } type ReadPreviousEventsRequestType struct { This ManagedObjectReference `xml:"_this"` MaxCount int32 `xml:"maxCount"` } func init() { t["ReadPreviousEventsRequestType"] = reflect.TypeOf((*ReadPreviousEventsRequestType)(nil)).Elem() } type ReadPreviousEventsResponse struct { Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` } type ReadPreviousTasks ReadPreviousTasksRequestType func init() { t["ReadPreviousTasks"] = reflect.TypeOf((*ReadPreviousTasks)(nil)).Elem() } type ReadPreviousTasksRequestType struct { This ManagedObjectReference `xml:"_this"` MaxCount int32 `xml:"maxCount"` } func init() { t["ReadPreviousTasksRequestType"] = reflect.TypeOf((*ReadPreviousTasksRequestType)(nil)).Elem() } type ReadPreviousTasksResponse struct { Returnval []TaskInfo `xml:"returnval,omitempty"` } type RebootGuest RebootGuestRequestType func init() { t["RebootGuest"] = reflect.TypeOf((*RebootGuest)(nil)).Elem() } type RebootGuestRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RebootGuestRequestType"] = reflect.TypeOf((*RebootGuestRequestType)(nil)).Elem() } type RebootGuestResponse struct { } type RebootHostRequestType struct { This ManagedObjectReference `xml:"_this"` Force bool `xml:"force"` } func init() { t["RebootHostRequestType"] = reflect.TypeOf((*RebootHostRequestType)(nil)).Elem() } type RebootHost_Task RebootHostRequestType func init() { t["RebootHost_Task"] = reflect.TypeOf((*RebootHost_Task)(nil)).Elem() } type RebootHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RebootRequired struct { VimFault Patch string `xml:"patch,omitempty"` } func init() { t["RebootRequired"] = reflect.TypeOf((*RebootRequired)(nil)).Elem() } type RebootRequiredFault RebootRequired func init() { t["RebootRequiredFault"] = reflect.TypeOf((*RebootRequiredFault)(nil)).Elem() } type RecommendDatastores RecommendDatastoresRequestType func init() { t["RecommendDatastores"] = reflect.TypeOf((*RecommendDatastores)(nil)).Elem() } type RecommendDatastoresRequestType struct { This ManagedObjectReference `xml:"_this"` StorageSpec StoragePlacementSpec `xml:"storageSpec"` } func init() { t["RecommendDatastoresRequestType"] = reflect.TypeOf((*RecommendDatastoresRequestType)(nil)).Elem() } type RecommendDatastoresResponse struct { Returnval StoragePlacementResult `xml:"returnval"` } type RecommendHostsForVm RecommendHostsForVmRequestType func init() { t["RecommendHostsForVm"] = reflect.TypeOf((*RecommendHostsForVm)(nil)).Elem() } type RecommendHostsForVmRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Pool *ManagedObjectReference `xml:"pool,omitempty"` } func init() { t["RecommendHostsForVmRequestType"] = reflect.TypeOf((*RecommendHostsForVmRequestType)(nil)).Elem() } type RecommendHostsForVmResponse struct { Returnval []ClusterHostRecommendation `xml:"returnval,omitempty"` } type RecommissionVsanNodeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RecommissionVsanNodeRequestType"] = reflect.TypeOf((*RecommissionVsanNodeRequestType)(nil)).Elem() } type RecommissionVsanNode_Task RecommissionVsanNodeRequestType func init() { t["RecommissionVsanNode_Task"] = reflect.TypeOf((*RecommissionVsanNode_Task)(nil)).Elem() } type RecommissionVsanNode_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconcileDatastoreInventoryRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["ReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*ReconcileDatastoreInventoryRequestType)(nil)).Elem() } type ReconcileDatastoreInventory_Task ReconcileDatastoreInventoryRequestType func init() { t["ReconcileDatastoreInventory_Task"] = reflect.TypeOf((*ReconcileDatastoreInventory_Task)(nil)).Elem() } type ReconcileDatastoreInventory_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigVMRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VirtualMachineConfigSpec `xml:"spec"` } func init() { t["ReconfigVMRequestType"] = reflect.TypeOf((*ReconfigVMRequestType)(nil)).Elem() } type ReconfigVM_Task ReconfigVMRequestType func init() { t["ReconfigVM_Task"] = reflect.TypeOf((*ReconfigVM_Task)(nil)).Elem() } type ReconfigVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigurationSatisfiable ReconfigurationSatisfiableRequestType func init() { t["ReconfigurationSatisfiable"] = reflect.TypeOf((*ReconfigurationSatisfiable)(nil)).Elem() } type ReconfigurationSatisfiableRequestType struct { This ManagedObjectReference `xml:"_this"` Pcbs []VsanPolicyChangeBatch `xml:"pcbs"` IgnoreSatisfiability *bool `xml:"ignoreSatisfiability"` } func init() { t["ReconfigurationSatisfiableRequestType"] = reflect.TypeOf((*ReconfigurationSatisfiableRequestType)(nil)).Elem() } type ReconfigurationSatisfiableResponse struct { Returnval []VsanPolicySatisfiability `xml:"returnval"` } type ReconfigureAlarm ReconfigureAlarmRequestType func init() { t["ReconfigureAlarm"] = reflect.TypeOf((*ReconfigureAlarm)(nil)).Elem() } type ReconfigureAlarmRequestType struct { This ManagedObjectReference `xml:"_this"` Spec BaseAlarmSpec `xml:"spec,typeattr"` } func init() { t["ReconfigureAlarmRequestType"] = reflect.TypeOf((*ReconfigureAlarmRequestType)(nil)).Elem() } type ReconfigureAlarmResponse struct { } type ReconfigureAutostart ReconfigureAutostartRequestType func init() { t["ReconfigureAutostart"] = reflect.TypeOf((*ReconfigureAutostart)(nil)).Elem() } type ReconfigureAutostartRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostAutoStartManagerConfig `xml:"spec"` } func init() { t["ReconfigureAutostartRequestType"] = reflect.TypeOf((*ReconfigureAutostartRequestType)(nil)).Elem() } type ReconfigureAutostartResponse struct { } type ReconfigureClusterRequestType struct { This ManagedObjectReference `xml:"_this"` Spec ClusterConfigSpec `xml:"spec"` Modify bool `xml:"modify"` } func init() { t["ReconfigureClusterRequestType"] = reflect.TypeOf((*ReconfigureClusterRequestType)(nil)).Elem() } type ReconfigureCluster_Task ReconfigureClusterRequestType func init() { t["ReconfigureCluster_Task"] = reflect.TypeOf((*ReconfigureCluster_Task)(nil)).Elem() } type ReconfigureCluster_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureComputeResourceRequestType struct { This ManagedObjectReference `xml:"_this"` Spec BaseComputeResourceConfigSpec `xml:"spec,typeattr"` Modify bool `xml:"modify"` } func init() { t["ReconfigureComputeResourceRequestType"] = reflect.TypeOf((*ReconfigureComputeResourceRequestType)(nil)).Elem() } type ReconfigureComputeResource_Task ReconfigureComputeResourceRequestType func init() { t["ReconfigureComputeResource_Task"] = reflect.TypeOf((*ReconfigureComputeResource_Task)(nil)).Elem() } type ReconfigureComputeResource_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureDVPortRequestType struct { This ManagedObjectReference `xml:"_this"` Port []DVPortConfigSpec `xml:"port"` } func init() { t["ReconfigureDVPortRequestType"] = reflect.TypeOf((*ReconfigureDVPortRequestType)(nil)).Elem() } type ReconfigureDVPort_Task ReconfigureDVPortRequestType func init() { t["ReconfigureDVPort_Task"] = reflect.TypeOf((*ReconfigureDVPort_Task)(nil)).Elem() } type ReconfigureDVPort_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureDVPortgroupRequestType struct { This ManagedObjectReference `xml:"_this"` Spec DVPortgroupConfigSpec `xml:"spec"` } func init() { t["ReconfigureDVPortgroupRequestType"] = reflect.TypeOf((*ReconfigureDVPortgroupRequestType)(nil)).Elem() } type ReconfigureDVPortgroup_Task ReconfigureDVPortgroupRequestType func init() { t["ReconfigureDVPortgroup_Task"] = reflect.TypeOf((*ReconfigureDVPortgroup_Task)(nil)).Elem() } type ReconfigureDVPortgroup_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureDatacenterRequestType struct { This ManagedObjectReference `xml:"_this"` Spec DatacenterConfigSpec `xml:"spec"` Modify bool `xml:"modify"` } func init() { t["ReconfigureDatacenterRequestType"] = reflect.TypeOf((*ReconfigureDatacenterRequestType)(nil)).Elem() } type ReconfigureDatacenter_Task ReconfigureDatacenterRequestType func init() { t["ReconfigureDatacenter_Task"] = reflect.TypeOf((*ReconfigureDatacenter_Task)(nil)).Elem() } type ReconfigureDatacenter_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureDomObject ReconfigureDomObjectRequestType func init() { t["ReconfigureDomObject"] = reflect.TypeOf((*ReconfigureDomObject)(nil)).Elem() } type ReconfigureDomObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Uuid string `xml:"uuid"` Policy string `xml:"policy"` } func init() { t["ReconfigureDomObjectRequestType"] = reflect.TypeOf((*ReconfigureDomObjectRequestType)(nil)).Elem() } type ReconfigureDomObjectResponse struct { } type ReconfigureDvsRequestType struct { This ManagedObjectReference `xml:"_this"` Spec BaseDVSConfigSpec `xml:"spec,typeattr"` } func init() { t["ReconfigureDvsRequestType"] = reflect.TypeOf((*ReconfigureDvsRequestType)(nil)).Elem() } type ReconfigureDvs_Task ReconfigureDvsRequestType func init() { t["ReconfigureDvs_Task"] = reflect.TypeOf((*ReconfigureDvs_Task)(nil)).Elem() } type ReconfigureDvs_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureHostForDASRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ReconfigureHostForDASRequestType"] = reflect.TypeOf((*ReconfigureHostForDASRequestType)(nil)).Elem() } type ReconfigureHostForDAS_Task ReconfigureHostForDASRequestType func init() { t["ReconfigureHostForDAS_Task"] = reflect.TypeOf((*ReconfigureHostForDAS_Task)(nil)).Elem() } type ReconfigureHostForDAS_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReconfigureScheduledTask ReconfigureScheduledTaskRequestType func init() { t["ReconfigureScheduledTask"] = reflect.TypeOf((*ReconfigureScheduledTask)(nil)).Elem() } type ReconfigureScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` Spec BaseScheduledTaskSpec `xml:"spec,typeattr"` } func init() { t["ReconfigureScheduledTaskRequestType"] = reflect.TypeOf((*ReconfigureScheduledTaskRequestType)(nil)).Elem() } type ReconfigureScheduledTaskResponse struct { } type ReconfigureServiceConsoleReservation ReconfigureServiceConsoleReservationRequestType func init() { t["ReconfigureServiceConsoleReservation"] = reflect.TypeOf((*ReconfigureServiceConsoleReservation)(nil)).Elem() } type ReconfigureServiceConsoleReservationRequestType struct { This ManagedObjectReference `xml:"_this"` CfgBytes int64 `xml:"cfgBytes"` } func init() { t["ReconfigureServiceConsoleReservationRequestType"] = reflect.TypeOf((*ReconfigureServiceConsoleReservationRequestType)(nil)).Elem() } type ReconfigureServiceConsoleReservationResponse struct { } type ReconfigureSnmpAgent ReconfigureSnmpAgentRequestType func init() { t["ReconfigureSnmpAgent"] = reflect.TypeOf((*ReconfigureSnmpAgent)(nil)).Elem() } type ReconfigureSnmpAgentRequestType struct { This ManagedObjectReference `xml:"_this"` Spec HostSnmpConfigSpec `xml:"spec"` } func init() { t["ReconfigureSnmpAgentRequestType"] = reflect.TypeOf((*ReconfigureSnmpAgentRequestType)(nil)).Elem() } type ReconfigureSnmpAgentResponse struct { } type ReconfigureVirtualMachineReservation ReconfigureVirtualMachineReservationRequestType func init() { t["ReconfigureVirtualMachineReservation"] = reflect.TypeOf((*ReconfigureVirtualMachineReservation)(nil)).Elem() } type ReconfigureVirtualMachineReservationRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VirtualMachineMemoryReservationSpec `xml:"spec"` } func init() { t["ReconfigureVirtualMachineReservationRequestType"] = reflect.TypeOf((*ReconfigureVirtualMachineReservationRequestType)(nil)).Elem() } type ReconfigureVirtualMachineReservationResponse struct { } type ReconnectHostRequestType struct { This ManagedObjectReference `xml:"_this"` CnxSpec *HostConnectSpec `xml:"cnxSpec,omitempty"` ReconnectSpec *HostSystemReconnectSpec `xml:"reconnectSpec,omitempty"` } func init() { t["ReconnectHostRequestType"] = reflect.TypeOf((*ReconnectHostRequestType)(nil)).Elem() } type ReconnectHost_Task ReconnectHostRequestType func init() { t["ReconnectHost_Task"] = reflect.TypeOf((*ReconnectHost_Task)(nil)).Elem() } type ReconnectHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RecordReplayDisabled struct { VimFault } func init() { t["RecordReplayDisabled"] = reflect.TypeOf((*RecordReplayDisabled)(nil)).Elem() } type RecordReplayDisabledFault RecordReplayDisabled func init() { t["RecordReplayDisabledFault"] = reflect.TypeOf((*RecordReplayDisabledFault)(nil)).Elem() } type RecoveryEvent struct { DvsEvent HostName string `xml:"hostName"` PortKey string `xml:"portKey"` DvsUuid string `xml:"dvsUuid,omitempty"` Vnic string `xml:"vnic,omitempty"` } func init() { t["RecoveryEvent"] = reflect.TypeOf((*RecoveryEvent)(nil)).Elem() } type RectifyDvsHostRequestType struct { This ManagedObjectReference `xml:"_this"` Hosts []ManagedObjectReference `xml:"hosts,omitempty"` } func init() { t["RectifyDvsHostRequestType"] = reflect.TypeOf((*RectifyDvsHostRequestType)(nil)).Elem() } type RectifyDvsHost_Task RectifyDvsHostRequestType func init() { t["RectifyDvsHost_Task"] = reflect.TypeOf((*RectifyDvsHost_Task)(nil)).Elem() } type RectifyDvsHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RectifyDvsOnHostRequestType struct { This ManagedObjectReference `xml:"_this"` Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["RectifyDvsOnHostRequestType"] = reflect.TypeOf((*RectifyDvsOnHostRequestType)(nil)).Elem() } type RectifyDvsOnHost_Task RectifyDvsOnHostRequestType func init() { t["RectifyDvsOnHost_Task"] = reflect.TypeOf((*RectifyDvsOnHost_Task)(nil)).Elem() } type RectifyDvsOnHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RecurrentTaskScheduler struct { TaskScheduler Interval int32 `xml:"interval"` } func init() { t["RecurrentTaskScheduler"] = reflect.TypeOf((*RecurrentTaskScheduler)(nil)).Elem() } type Refresh RefreshRequestType func init() { t["Refresh"] = reflect.TypeOf((*Refresh)(nil)).Elem() } type RefreshDVPortState RefreshDVPortStateRequestType func init() { t["RefreshDVPortState"] = reflect.TypeOf((*RefreshDVPortState)(nil)).Elem() } type RefreshDVPortStateRequestType struct { This ManagedObjectReference `xml:"_this"` PortKeys []string `xml:"portKeys,omitempty"` } func init() { t["RefreshDVPortStateRequestType"] = reflect.TypeOf((*RefreshDVPortStateRequestType)(nil)).Elem() } type RefreshDVPortStateResponse struct { } type RefreshDatastore RefreshDatastoreRequestType func init() { t["RefreshDatastore"] = reflect.TypeOf((*RefreshDatastore)(nil)).Elem() } type RefreshDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshDatastoreRequestType"] = reflect.TypeOf((*RefreshDatastoreRequestType)(nil)).Elem() } type RefreshDatastoreResponse struct { } type RefreshDatastoreStorageInfo RefreshDatastoreStorageInfoRequestType func init() { t["RefreshDatastoreStorageInfo"] = reflect.TypeOf((*RefreshDatastoreStorageInfo)(nil)).Elem() } type RefreshDatastoreStorageInfoRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshDatastoreStorageInfoRequestType"] = reflect.TypeOf((*RefreshDatastoreStorageInfoRequestType)(nil)).Elem() } type RefreshDatastoreStorageInfoResponse struct { } type RefreshDateTimeSystem RefreshDateTimeSystemRequestType func init() { t["RefreshDateTimeSystem"] = reflect.TypeOf((*RefreshDateTimeSystem)(nil)).Elem() } type RefreshDateTimeSystemRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshDateTimeSystemRequestType"] = reflect.TypeOf((*RefreshDateTimeSystemRequestType)(nil)).Elem() } type RefreshDateTimeSystemResponse struct { } type RefreshFirewall RefreshFirewallRequestType func init() { t["RefreshFirewall"] = reflect.TypeOf((*RefreshFirewall)(nil)).Elem() } type RefreshFirewallRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshFirewallRequestType"] = reflect.TypeOf((*RefreshFirewallRequestType)(nil)).Elem() } type RefreshFirewallResponse struct { } type RefreshGraphicsManager RefreshGraphicsManagerRequestType func init() { t["RefreshGraphicsManager"] = reflect.TypeOf((*RefreshGraphicsManager)(nil)).Elem() } type RefreshGraphicsManagerRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshGraphicsManagerRequestType"] = reflect.TypeOf((*RefreshGraphicsManagerRequestType)(nil)).Elem() } type RefreshGraphicsManagerResponse struct { } type RefreshHealthStatusSystem RefreshHealthStatusSystemRequestType func init() { t["RefreshHealthStatusSystem"] = reflect.TypeOf((*RefreshHealthStatusSystem)(nil)).Elem() } type RefreshHealthStatusSystemRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshHealthStatusSystemRequestType"] = reflect.TypeOf((*RefreshHealthStatusSystemRequestType)(nil)).Elem() } type RefreshHealthStatusSystemResponse struct { } type RefreshNetworkSystem RefreshNetworkSystemRequestType func init() { t["RefreshNetworkSystem"] = reflect.TypeOf((*RefreshNetworkSystem)(nil)).Elem() } type RefreshNetworkSystemRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshNetworkSystemRequestType"] = reflect.TypeOf((*RefreshNetworkSystemRequestType)(nil)).Elem() } type RefreshNetworkSystemResponse struct { } type RefreshRecommendation RefreshRecommendationRequestType func init() { t["RefreshRecommendation"] = reflect.TypeOf((*RefreshRecommendation)(nil)).Elem() } type RefreshRecommendationRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshRecommendationRequestType"] = reflect.TypeOf((*RefreshRecommendationRequestType)(nil)).Elem() } type RefreshRecommendationResponse struct { } type RefreshRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshRequestType"] = reflect.TypeOf((*RefreshRequestType)(nil)).Elem() } type RefreshResponse struct { } type RefreshRuntime RefreshRuntimeRequestType func init() { t["RefreshRuntime"] = reflect.TypeOf((*RefreshRuntime)(nil)).Elem() } type RefreshRuntimeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshRuntimeRequestType"] = reflect.TypeOf((*RefreshRuntimeRequestType)(nil)).Elem() } type RefreshRuntimeResponse struct { } type RefreshServices RefreshServicesRequestType func init() { t["RefreshServices"] = reflect.TypeOf((*RefreshServices)(nil)).Elem() } type RefreshServicesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshServicesRequestType"] = reflect.TypeOf((*RefreshServicesRequestType)(nil)).Elem() } type RefreshServicesResponse struct { } type RefreshStorageDrsRecommendation RefreshStorageDrsRecommendationRequestType func init() { t["RefreshStorageDrsRecommendation"] = reflect.TypeOf((*RefreshStorageDrsRecommendation)(nil)).Elem() } type RefreshStorageDrsRecommendationRequestType struct { This ManagedObjectReference `xml:"_this"` Pod ManagedObjectReference `xml:"pod"` } func init() { t["RefreshStorageDrsRecommendationRequestType"] = reflect.TypeOf((*RefreshStorageDrsRecommendationRequestType)(nil)).Elem() } type RefreshStorageDrsRecommendationResponse struct { } type RefreshStorageInfo RefreshStorageInfoRequestType func init() { t["RefreshStorageInfo"] = reflect.TypeOf((*RefreshStorageInfo)(nil)).Elem() } type RefreshStorageInfoRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshStorageInfoRequestType"] = reflect.TypeOf((*RefreshStorageInfoRequestType)(nil)).Elem() } type RefreshStorageInfoResponse struct { } type RefreshStorageSystem RefreshStorageSystemRequestType func init() { t["RefreshStorageSystem"] = reflect.TypeOf((*RefreshStorageSystem)(nil)).Elem() } type RefreshStorageSystemRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RefreshStorageSystemRequestType"] = reflect.TypeOf((*RefreshStorageSystemRequestType)(nil)).Elem() } type RefreshStorageSystemResponse struct { } type RegisterChildVMRequestType struct { This ManagedObjectReference `xml:"_this"` Path string `xml:"path"` Name string `xml:"name,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["RegisterChildVMRequestType"] = reflect.TypeOf((*RegisterChildVMRequestType)(nil)).Elem() } type RegisterChildVM_Task RegisterChildVMRequestType func init() { t["RegisterChildVM_Task"] = reflect.TypeOf((*RegisterChildVM_Task)(nil)).Elem() } type RegisterChildVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RegisterDisk RegisterDiskRequestType func init() { t["RegisterDisk"] = reflect.TypeOf((*RegisterDisk)(nil)).Elem() } type RegisterDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Path string `xml:"path"` Name string `xml:"name,omitempty"` } func init() { t["RegisterDiskRequestType"] = reflect.TypeOf((*RegisterDiskRequestType)(nil)).Elem() } type RegisterDiskResponse struct { Returnval VStorageObject `xml:"returnval"` } type RegisterExtension RegisterExtensionRequestType func init() { t["RegisterExtension"] = reflect.TypeOf((*RegisterExtension)(nil)).Elem() } type RegisterExtensionRequestType struct { This ManagedObjectReference `xml:"_this"` Extension Extension `xml:"extension"` } func init() { t["RegisterExtensionRequestType"] = reflect.TypeOf((*RegisterExtensionRequestType)(nil)).Elem() } type RegisterExtensionResponse struct { } type RegisterHealthUpdateProvider RegisterHealthUpdateProviderRequestType func init() { t["RegisterHealthUpdateProvider"] = reflect.TypeOf((*RegisterHealthUpdateProvider)(nil)).Elem() } type RegisterHealthUpdateProviderRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` HealthUpdateInfo []HealthUpdateInfo `xml:"healthUpdateInfo,omitempty"` } func init() { t["RegisterHealthUpdateProviderRequestType"] = reflect.TypeOf((*RegisterHealthUpdateProviderRequestType)(nil)).Elem() } type RegisterHealthUpdateProviderResponse struct { Returnval string `xml:"returnval"` } type RegisterKmipServer RegisterKmipServerRequestType func init() { t["RegisterKmipServer"] = reflect.TypeOf((*RegisterKmipServer)(nil)).Elem() } type RegisterKmipServerRequestType struct { This ManagedObjectReference `xml:"_this"` Server KmipServerSpec `xml:"server"` } func init() { t["RegisterKmipServerRequestType"] = reflect.TypeOf((*RegisterKmipServerRequestType)(nil)).Elem() } type RegisterKmipServerResponse struct { } type RegisterVMRequestType struct { This ManagedObjectReference `xml:"_this"` Path string `xml:"path"` Name string `xml:"name,omitempty"` AsTemplate bool `xml:"asTemplate"` Pool *ManagedObjectReference `xml:"pool,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["RegisterVMRequestType"] = reflect.TypeOf((*RegisterVMRequestType)(nil)).Elem() } type RegisterVM_Task RegisterVMRequestType func init() { t["RegisterVM_Task"] = reflect.TypeOf((*RegisterVM_Task)(nil)).Elem() } type RegisterVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type Relation struct { DynamicData Constraint string `xml:"constraint,omitempty"` Name string `xml:"name"` Version string `xml:"version,omitempty"` } func init() { t["Relation"] = reflect.TypeOf((*Relation)(nil)).Elem() } type ReleaseCredentialsInGuest ReleaseCredentialsInGuestRequestType func init() { t["ReleaseCredentialsInGuest"] = reflect.TypeOf((*ReleaseCredentialsInGuest)(nil)).Elem() } type ReleaseCredentialsInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` } func init() { t["ReleaseCredentialsInGuestRequestType"] = reflect.TypeOf((*ReleaseCredentialsInGuestRequestType)(nil)).Elem() } type ReleaseCredentialsInGuestResponse struct { } type ReleaseIpAllocation ReleaseIpAllocationRequestType func init() { t["ReleaseIpAllocation"] = reflect.TypeOf((*ReleaseIpAllocation)(nil)).Elem() } type ReleaseIpAllocationRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` PoolId int32 `xml:"poolId"` AllocationId string `xml:"allocationId"` } func init() { t["ReleaseIpAllocationRequestType"] = reflect.TypeOf((*ReleaseIpAllocationRequestType)(nil)).Elem() } type ReleaseIpAllocationResponse struct { } type ReleaseManagedSnapshot ReleaseManagedSnapshotRequestType func init() { t["ReleaseManagedSnapshot"] = reflect.TypeOf((*ReleaseManagedSnapshot)(nil)).Elem() } type ReleaseManagedSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` Vdisk string `xml:"vdisk"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["ReleaseManagedSnapshotRequestType"] = reflect.TypeOf((*ReleaseManagedSnapshotRequestType)(nil)).Elem() } type ReleaseManagedSnapshotResponse struct { } type Reload ReloadRequestType func init() { t["Reload"] = reflect.TypeOf((*Reload)(nil)).Elem() } type ReloadRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ReloadRequestType"] = reflect.TypeOf((*ReloadRequestType)(nil)).Elem() } type ReloadResponse struct { } type RelocateVMRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VirtualMachineRelocateSpec `xml:"spec"` Priority VirtualMachineMovePriority `xml:"priority,omitempty"` } func init() { t["RelocateVMRequestType"] = reflect.TypeOf((*RelocateVMRequestType)(nil)).Elem() } type RelocateVM_Task RelocateVMRequestType func init() { t["RelocateVM_Task"] = reflect.TypeOf((*RelocateVM_Task)(nil)).Elem() } type RelocateVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RelocateVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` Spec VslmRelocateSpec `xml:"spec"` } func init() { t["RelocateVStorageObjectRequestType"] = reflect.TypeOf((*RelocateVStorageObjectRequestType)(nil)).Elem() } type RelocateVStorageObject_Task RelocateVStorageObjectRequestType func init() { t["RelocateVStorageObject_Task"] = reflect.TypeOf((*RelocateVStorageObject_Task)(nil)).Elem() } type RelocateVStorageObject_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RemoteDeviceNotSupported struct { DeviceNotSupported } func init() { t["RemoteDeviceNotSupported"] = reflect.TypeOf((*RemoteDeviceNotSupported)(nil)).Elem() } type RemoteDeviceNotSupportedFault RemoteDeviceNotSupported func init() { t["RemoteDeviceNotSupportedFault"] = reflect.TypeOf((*RemoteDeviceNotSupportedFault)(nil)).Elem() } type RemoteTSMEnabledEvent struct { HostEvent } func init() { t["RemoteTSMEnabledEvent"] = reflect.TypeOf((*RemoteTSMEnabledEvent)(nil)).Elem() } type RemoveAlarm RemoveAlarmRequestType func init() { t["RemoveAlarm"] = reflect.TypeOf((*RemoveAlarm)(nil)).Elem() } type RemoveAlarmRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RemoveAlarmRequestType"] = reflect.TypeOf((*RemoveAlarmRequestType)(nil)).Elem() } type RemoveAlarmResponse struct { } type RemoveAllSnapshotsRequestType struct { This ManagedObjectReference `xml:"_this"` Consolidate *bool `xml:"consolidate"` } func init() { t["RemoveAllSnapshotsRequestType"] = reflect.TypeOf((*RemoveAllSnapshotsRequestType)(nil)).Elem() } type RemoveAllSnapshots_Task RemoveAllSnapshotsRequestType func init() { t["RemoveAllSnapshots_Task"] = reflect.TypeOf((*RemoveAllSnapshots_Task)(nil)).Elem() } type RemoveAllSnapshots_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RemoveAssignedLicense RemoveAssignedLicenseRequestType func init() { t["RemoveAssignedLicense"] = reflect.TypeOf((*RemoveAssignedLicense)(nil)).Elem() } type RemoveAssignedLicenseRequestType struct { This ManagedObjectReference `xml:"_this"` EntityId string `xml:"entityId"` } func init() { t["RemoveAssignedLicenseRequestType"] = reflect.TypeOf((*RemoveAssignedLicenseRequestType)(nil)).Elem() } type RemoveAssignedLicenseResponse struct { } type RemoveAuthorizationRole RemoveAuthorizationRoleRequestType func init() { t["RemoveAuthorizationRole"] = reflect.TypeOf((*RemoveAuthorizationRole)(nil)).Elem() } type RemoveAuthorizationRoleRequestType struct { This ManagedObjectReference `xml:"_this"` RoleId int32 `xml:"roleId"` FailIfUsed bool `xml:"failIfUsed"` } func init() { t["RemoveAuthorizationRoleRequestType"] = reflect.TypeOf((*RemoveAuthorizationRoleRequestType)(nil)).Elem() } type RemoveAuthorizationRoleResponse struct { } type RemoveCustomFieldDef RemoveCustomFieldDefRequestType func init() { t["RemoveCustomFieldDef"] = reflect.TypeOf((*RemoveCustomFieldDef)(nil)).Elem() } type RemoveCustomFieldDefRequestType struct { This ManagedObjectReference `xml:"_this"` Key int32 `xml:"key"` } func init() { t["RemoveCustomFieldDefRequestType"] = reflect.TypeOf((*RemoveCustomFieldDefRequestType)(nil)).Elem() } type RemoveCustomFieldDefResponse struct { } type RemoveDatastore RemoveDatastoreRequestType func init() { t["RemoveDatastore"] = reflect.TypeOf((*RemoveDatastore)(nil)).Elem() } type RemoveDatastoreExRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore []ManagedObjectReference `xml:"datastore"` } func init() { t["RemoveDatastoreExRequestType"] = reflect.TypeOf((*RemoveDatastoreExRequestType)(nil)).Elem() } type RemoveDatastoreEx_Task RemoveDatastoreExRequestType func init() { t["RemoveDatastoreEx_Task"] = reflect.TypeOf((*RemoveDatastoreEx_Task)(nil)).Elem() } type RemoveDatastoreEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RemoveDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["RemoveDatastoreRequestType"] = reflect.TypeOf((*RemoveDatastoreRequestType)(nil)).Elem() } type RemoveDatastoreResponse struct { } type RemoveDiskMappingRequestType struct { This ManagedObjectReference `xml:"_this"` Mapping []VsanHostDiskMapping `xml:"mapping"` MaintenanceSpec *HostMaintenanceSpec `xml:"maintenanceSpec,omitempty"` Timeout int32 `xml:"timeout,omitempty"` } func init() { t["RemoveDiskMappingRequestType"] = reflect.TypeOf((*RemoveDiskMappingRequestType)(nil)).Elem() } type RemoveDiskMapping_Task RemoveDiskMappingRequestType func init() { t["RemoveDiskMapping_Task"] = reflect.TypeOf((*RemoveDiskMapping_Task)(nil)).Elem() } type RemoveDiskMapping_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RemoveDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Disk []HostScsiDisk `xml:"disk"` MaintenanceSpec *HostMaintenanceSpec `xml:"maintenanceSpec,omitempty"` Timeout int32 `xml:"timeout,omitempty"` } func init() { t["RemoveDiskRequestType"] = reflect.TypeOf((*RemoveDiskRequestType)(nil)).Elem() } type RemoveDisk_Task RemoveDiskRequestType func init() { t["RemoveDisk_Task"] = reflect.TypeOf((*RemoveDisk_Task)(nil)).Elem() } type RemoveDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RemoveEntityPermission RemoveEntityPermissionRequestType func init() { t["RemoveEntityPermission"] = reflect.TypeOf((*RemoveEntityPermission)(nil)).Elem() } type RemoveEntityPermissionRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` User string `xml:"user"` IsGroup bool `xml:"isGroup"` } func init() { t["RemoveEntityPermissionRequestType"] = reflect.TypeOf((*RemoveEntityPermissionRequestType)(nil)).Elem() } type RemoveEntityPermissionResponse struct { } type RemoveFailed struct { VimFault } func init() { t["RemoveFailed"] = reflect.TypeOf((*RemoveFailed)(nil)).Elem() } type RemoveFailedFault RemoveFailed func init() { t["RemoveFailedFault"] = reflect.TypeOf((*RemoveFailedFault)(nil)).Elem() } type RemoveFilter RemoveFilterRequestType func init() { t["RemoveFilter"] = reflect.TypeOf((*RemoveFilter)(nil)).Elem() } type RemoveFilterEntities RemoveFilterEntitiesRequestType func init() { t["RemoveFilterEntities"] = reflect.TypeOf((*RemoveFilterEntities)(nil)).Elem() } type RemoveFilterEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` Entities []ManagedObjectReference `xml:"entities,omitempty"` } func init() { t["RemoveFilterEntitiesRequestType"] = reflect.TypeOf((*RemoveFilterEntitiesRequestType)(nil)).Elem() } type RemoveFilterEntitiesResponse struct { } type RemoveFilterRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` } func init() { t["RemoveFilterRequestType"] = reflect.TypeOf((*RemoveFilterRequestType)(nil)).Elem() } type RemoveFilterResponse struct { } type RemoveGroup RemoveGroupRequestType func init() { t["RemoveGroup"] = reflect.TypeOf((*RemoveGroup)(nil)).Elem() } type RemoveGroupRequestType struct { This ManagedObjectReference `xml:"_this"` GroupName string `xml:"groupName"` } func init() { t["RemoveGroupRequestType"] = reflect.TypeOf((*RemoveGroupRequestType)(nil)).Elem() } type RemoveGroupResponse struct { } type RemoveGuestAlias RemoveGuestAliasRequestType func init() { t["RemoveGuestAlias"] = reflect.TypeOf((*RemoveGuestAlias)(nil)).Elem() } type RemoveGuestAliasByCert RemoveGuestAliasByCertRequestType func init() { t["RemoveGuestAliasByCert"] = reflect.TypeOf((*RemoveGuestAliasByCert)(nil)).Elem() } type RemoveGuestAliasByCertRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Username string `xml:"username"` Base64Cert string `xml:"base64Cert"` } func init() { t["RemoveGuestAliasByCertRequestType"] = reflect.TypeOf((*RemoveGuestAliasByCertRequestType)(nil)).Elem() } type RemoveGuestAliasByCertResponse struct { } type RemoveGuestAliasRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Username string `xml:"username"` Base64Cert string `xml:"base64Cert"` Subject BaseGuestAuthSubject `xml:"subject,typeattr"` } func init() { t["RemoveGuestAliasRequestType"] = reflect.TypeOf((*RemoveGuestAliasRequestType)(nil)).Elem() } type RemoveGuestAliasResponse struct { } type RemoveInternetScsiSendTargets RemoveInternetScsiSendTargetsRequestType func init() { t["RemoveInternetScsiSendTargets"] = reflect.TypeOf((*RemoveInternetScsiSendTargets)(nil)).Elem() } type RemoveInternetScsiSendTargetsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` Targets []HostInternetScsiHbaSendTarget `xml:"targets"` } func init() { t["RemoveInternetScsiSendTargetsRequestType"] = reflect.TypeOf((*RemoveInternetScsiSendTargetsRequestType)(nil)).Elem() } type RemoveInternetScsiSendTargetsResponse struct { } type RemoveInternetScsiStaticTargets RemoveInternetScsiStaticTargetsRequestType func init() { t["RemoveInternetScsiStaticTargets"] = reflect.TypeOf((*RemoveInternetScsiStaticTargets)(nil)).Elem() } type RemoveInternetScsiStaticTargetsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` Targets []HostInternetScsiHbaStaticTarget `xml:"targets"` } func init() { t["RemoveInternetScsiStaticTargetsRequestType"] = reflect.TypeOf((*RemoveInternetScsiStaticTargetsRequestType)(nil)).Elem() } type RemoveInternetScsiStaticTargetsResponse struct { } type RemoveKey RemoveKeyRequestType func init() { t["RemoveKey"] = reflect.TypeOf((*RemoveKey)(nil)).Elem() } type RemoveKeyRequestType struct { This ManagedObjectReference `xml:"_this"` Key CryptoKeyId `xml:"key"` Force bool `xml:"force"` } func init() { t["RemoveKeyRequestType"] = reflect.TypeOf((*RemoveKeyRequestType)(nil)).Elem() } type RemoveKeyResponse struct { } type RemoveKeys RemoveKeysRequestType func init() { t["RemoveKeys"] = reflect.TypeOf((*RemoveKeys)(nil)).Elem() } type RemoveKeysRequestType struct { This ManagedObjectReference `xml:"_this"` Keys []CryptoKeyId `xml:"keys,omitempty"` Force bool `xml:"force"` } func init() { t["RemoveKeysRequestType"] = reflect.TypeOf((*RemoveKeysRequestType)(nil)).Elem() } type RemoveKeysResponse struct { Returnval []CryptoKeyResult `xml:"returnval,omitempty"` } type RemoveKmipServer RemoveKmipServerRequestType func init() { t["RemoveKmipServer"] = reflect.TypeOf((*RemoveKmipServer)(nil)).Elem() } type RemoveKmipServerRequestType struct { This ManagedObjectReference `xml:"_this"` ClusterId KeyProviderId `xml:"clusterId"` ServerName string `xml:"serverName"` } func init() { t["RemoveKmipServerRequestType"] = reflect.TypeOf((*RemoveKmipServerRequestType)(nil)).Elem() } type RemoveKmipServerResponse struct { } type RemoveLicense RemoveLicenseRequestType func init() { t["RemoveLicense"] = reflect.TypeOf((*RemoveLicense)(nil)).Elem() } type RemoveLicenseLabel RemoveLicenseLabelRequestType func init() { t["RemoveLicenseLabel"] = reflect.TypeOf((*RemoveLicenseLabel)(nil)).Elem() } type RemoveLicenseLabelRequestType struct { This ManagedObjectReference `xml:"_this"` LicenseKey string `xml:"licenseKey"` LabelKey string `xml:"labelKey"` } func init() { t["RemoveLicenseLabelRequestType"] = reflect.TypeOf((*RemoveLicenseLabelRequestType)(nil)).Elem() } type RemoveLicenseLabelResponse struct { } type RemoveLicenseRequestType struct { This ManagedObjectReference `xml:"_this"` LicenseKey string `xml:"licenseKey"` } func init() { t["RemoveLicenseRequestType"] = reflect.TypeOf((*RemoveLicenseRequestType)(nil)).Elem() } type RemoveLicenseResponse struct { } type RemoveMonitoredEntities RemoveMonitoredEntitiesRequestType func init() { t["RemoveMonitoredEntities"] = reflect.TypeOf((*RemoveMonitoredEntities)(nil)).Elem() } type RemoveMonitoredEntitiesRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` Entities []ManagedObjectReference `xml:"entities,omitempty"` } func init() { t["RemoveMonitoredEntitiesRequestType"] = reflect.TypeOf((*RemoveMonitoredEntitiesRequestType)(nil)).Elem() } type RemoveMonitoredEntitiesResponse struct { } type RemoveNetworkResourcePool RemoveNetworkResourcePoolRequestType func init() { t["RemoveNetworkResourcePool"] = reflect.TypeOf((*RemoveNetworkResourcePool)(nil)).Elem() } type RemoveNetworkResourcePoolRequestType struct { This ManagedObjectReference `xml:"_this"` Key []string `xml:"key"` } func init() { t["RemoveNetworkResourcePoolRequestType"] = reflect.TypeOf((*RemoveNetworkResourcePoolRequestType)(nil)).Elem() } type RemoveNetworkResourcePoolResponse struct { } type RemovePerfInterval RemovePerfIntervalRequestType func init() { t["RemovePerfInterval"] = reflect.TypeOf((*RemovePerfInterval)(nil)).Elem() } type RemovePerfIntervalRequestType struct { This ManagedObjectReference `xml:"_this"` SamplePeriod int32 `xml:"samplePeriod"` } func init() { t["RemovePerfIntervalRequestType"] = reflect.TypeOf((*RemovePerfIntervalRequestType)(nil)).Elem() } type RemovePerfIntervalResponse struct { } type RemovePortGroup RemovePortGroupRequestType func init() { t["RemovePortGroup"] = reflect.TypeOf((*RemovePortGroup)(nil)).Elem() } type RemovePortGroupRequestType struct { This ManagedObjectReference `xml:"_this"` PgName string `xml:"pgName"` } func init() { t["RemovePortGroupRequestType"] = reflect.TypeOf((*RemovePortGroupRequestType)(nil)).Elem() } type RemovePortGroupResponse struct { } type RemoveScheduledTask RemoveScheduledTaskRequestType func init() { t["RemoveScheduledTask"] = reflect.TypeOf((*RemoveScheduledTask)(nil)).Elem() } type RemoveScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RemoveScheduledTaskRequestType"] = reflect.TypeOf((*RemoveScheduledTaskRequestType)(nil)).Elem() } type RemoveScheduledTaskResponse struct { } type RemoveServiceConsoleVirtualNic RemoveServiceConsoleVirtualNicRequestType func init() { t["RemoveServiceConsoleVirtualNic"] = reflect.TypeOf((*RemoveServiceConsoleVirtualNic)(nil)).Elem() } type RemoveServiceConsoleVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` } func init() { t["RemoveServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*RemoveServiceConsoleVirtualNicRequestType)(nil)).Elem() } type RemoveServiceConsoleVirtualNicResponse struct { } type RemoveSmartCardTrustAnchor RemoveSmartCardTrustAnchorRequestType func init() { t["RemoveSmartCardTrustAnchor"] = reflect.TypeOf((*RemoveSmartCardTrustAnchor)(nil)).Elem() } type RemoveSmartCardTrustAnchorByFingerprint RemoveSmartCardTrustAnchorByFingerprintRequestType func init() { t["RemoveSmartCardTrustAnchorByFingerprint"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorByFingerprint)(nil)).Elem() } type RemoveSmartCardTrustAnchorByFingerprintRequestType struct { This ManagedObjectReference `xml:"_this"` Fingerprint string `xml:"fingerprint"` Digest string `xml:"digest"` } func init() { t["RemoveSmartCardTrustAnchorByFingerprintRequestType"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorByFingerprintRequestType)(nil)).Elem() } type RemoveSmartCardTrustAnchorByFingerprintResponse struct { } type RemoveSmartCardTrustAnchorRequestType struct { This ManagedObjectReference `xml:"_this"` Issuer string `xml:"issuer"` Serial string `xml:"serial"` } func init() { t["RemoveSmartCardTrustAnchorRequestType"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorRequestType)(nil)).Elem() } type RemoveSmartCardTrustAnchorResponse struct { } type RemoveSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` RemoveChildren bool `xml:"removeChildren"` Consolidate *bool `xml:"consolidate"` } func init() { t["RemoveSnapshotRequestType"] = reflect.TypeOf((*RemoveSnapshotRequestType)(nil)).Elem() } type RemoveSnapshot_Task RemoveSnapshotRequestType func init() { t["RemoveSnapshot_Task"] = reflect.TypeOf((*RemoveSnapshot_Task)(nil)).Elem() } type RemoveSnapshot_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RemoveUser RemoveUserRequestType func init() { t["RemoveUser"] = reflect.TypeOf((*RemoveUser)(nil)).Elem() } type RemoveUserRequestType struct { This ManagedObjectReference `xml:"_this"` UserName string `xml:"userName"` } func init() { t["RemoveUserRequestType"] = reflect.TypeOf((*RemoveUserRequestType)(nil)).Elem() } type RemoveUserResponse struct { } type RemoveVirtualNic RemoveVirtualNicRequestType func init() { t["RemoveVirtualNic"] = reflect.TypeOf((*RemoveVirtualNic)(nil)).Elem() } type RemoveVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` } func init() { t["RemoveVirtualNicRequestType"] = reflect.TypeOf((*RemoveVirtualNicRequestType)(nil)).Elem() } type RemoveVirtualNicResponse struct { } type RemoveVirtualSwitch RemoveVirtualSwitchRequestType func init() { t["RemoveVirtualSwitch"] = reflect.TypeOf((*RemoveVirtualSwitch)(nil)).Elem() } type RemoveVirtualSwitchRequestType struct { This ManagedObjectReference `xml:"_this"` VswitchName string `xml:"vswitchName"` } func init() { t["RemoveVirtualSwitchRequestType"] = reflect.TypeOf((*RemoveVirtualSwitchRequestType)(nil)).Elem() } type RemoveVirtualSwitchResponse struct { } type RenameCustomFieldDef RenameCustomFieldDefRequestType func init() { t["RenameCustomFieldDef"] = reflect.TypeOf((*RenameCustomFieldDef)(nil)).Elem() } type RenameCustomFieldDefRequestType struct { This ManagedObjectReference `xml:"_this"` Key int32 `xml:"key"` Name string `xml:"name"` } func init() { t["RenameCustomFieldDefRequestType"] = reflect.TypeOf((*RenameCustomFieldDefRequestType)(nil)).Elem() } type RenameCustomFieldDefResponse struct { } type RenameCustomizationSpec RenameCustomizationSpecRequestType func init() { t["RenameCustomizationSpec"] = reflect.TypeOf((*RenameCustomizationSpec)(nil)).Elem() } type RenameCustomizationSpecRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` NewName string `xml:"newName"` } func init() { t["RenameCustomizationSpecRequestType"] = reflect.TypeOf((*RenameCustomizationSpecRequestType)(nil)).Elem() } type RenameCustomizationSpecResponse struct { } type RenameDatastore RenameDatastoreRequestType func init() { t["RenameDatastore"] = reflect.TypeOf((*RenameDatastore)(nil)).Elem() } type RenameDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` NewName string `xml:"newName"` } func init() { t["RenameDatastoreRequestType"] = reflect.TypeOf((*RenameDatastoreRequestType)(nil)).Elem() } type RenameDatastoreResponse struct { } type RenameRequestType struct { This ManagedObjectReference `xml:"_this"` NewName string `xml:"newName"` } func init() { t["RenameRequestType"] = reflect.TypeOf((*RenameRequestType)(nil)).Elem() } type RenameSnapshot RenameSnapshotRequestType func init() { t["RenameSnapshot"] = reflect.TypeOf((*RenameSnapshot)(nil)).Elem() } type RenameSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` } func init() { t["RenameSnapshotRequestType"] = reflect.TypeOf((*RenameSnapshotRequestType)(nil)).Elem() } type RenameSnapshotResponse struct { } type RenameVStorageObject RenameVStorageObjectRequestType func init() { t["RenameVStorageObject"] = reflect.TypeOf((*RenameVStorageObject)(nil)).Elem() } type RenameVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` Name string `xml:"name"` } func init() { t["RenameVStorageObjectRequestType"] = reflect.TypeOf((*RenameVStorageObjectRequestType)(nil)).Elem() } type RenameVStorageObjectResponse struct { } type Rename_Task RenameRequestType func init() { t["Rename_Task"] = reflect.TypeOf((*Rename_Task)(nil)).Elem() } type Rename_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ReplaceCACertificatesAndCRLs ReplaceCACertificatesAndCRLsRequestType func init() { t["ReplaceCACertificatesAndCRLs"] = reflect.TypeOf((*ReplaceCACertificatesAndCRLs)(nil)).Elem() } type ReplaceCACertificatesAndCRLsRequestType struct { This ManagedObjectReference `xml:"_this"` CaCert []string `xml:"caCert"` CaCrl []string `xml:"caCrl,omitempty"` } func init() { t["ReplaceCACertificatesAndCRLsRequestType"] = reflect.TypeOf((*ReplaceCACertificatesAndCRLsRequestType)(nil)).Elem() } type ReplaceCACertificatesAndCRLsResponse struct { } type ReplaceSmartCardTrustAnchors ReplaceSmartCardTrustAnchorsRequestType func init() { t["ReplaceSmartCardTrustAnchors"] = reflect.TypeOf((*ReplaceSmartCardTrustAnchors)(nil)).Elem() } type ReplaceSmartCardTrustAnchorsRequestType struct { This ManagedObjectReference `xml:"_this"` Certs []string `xml:"certs,omitempty"` } func init() { t["ReplaceSmartCardTrustAnchorsRequestType"] = reflect.TypeOf((*ReplaceSmartCardTrustAnchorsRequestType)(nil)).Elem() } type ReplaceSmartCardTrustAnchorsResponse struct { } type ReplicationConfigFault struct { ReplicationFault } func init() { t["ReplicationConfigFault"] = reflect.TypeOf((*ReplicationConfigFault)(nil)).Elem() } type ReplicationConfigFaultFault BaseReplicationConfigFault func init() { t["ReplicationConfigFaultFault"] = reflect.TypeOf((*ReplicationConfigFaultFault)(nil)).Elem() } type ReplicationConfigSpec struct { DynamicData Generation int64 `xml:"generation"` VmReplicationId string `xml:"vmReplicationId"` Destination string `xml:"destination"` Port int32 `xml:"port"` Rpo int64 `xml:"rpo"` QuiesceGuestEnabled bool `xml:"quiesceGuestEnabled"` Paused bool `xml:"paused"` OppUpdatesEnabled bool `xml:"oppUpdatesEnabled"` NetCompressionEnabled *bool `xml:"netCompressionEnabled"` Disk []ReplicationInfoDiskSettings `xml:"disk,omitempty"` } func init() { t["ReplicationConfigSpec"] = reflect.TypeOf((*ReplicationConfigSpec)(nil)).Elem() } type ReplicationDiskConfigFault struct { ReplicationConfigFault Reason string `xml:"reason,omitempty"` VmRef *ManagedObjectReference `xml:"vmRef,omitempty"` Key int32 `xml:"key,omitempty"` } func init() { t["ReplicationDiskConfigFault"] = reflect.TypeOf((*ReplicationDiskConfigFault)(nil)).Elem() } type ReplicationDiskConfigFaultFault ReplicationDiskConfigFault func init() { t["ReplicationDiskConfigFaultFault"] = reflect.TypeOf((*ReplicationDiskConfigFaultFault)(nil)).Elem() } type ReplicationFault struct { VimFault } func init() { t["ReplicationFault"] = reflect.TypeOf((*ReplicationFault)(nil)).Elem() } type ReplicationFaultFault BaseReplicationFault func init() { t["ReplicationFaultFault"] = reflect.TypeOf((*ReplicationFaultFault)(nil)).Elem() } type ReplicationGroupId struct { DynamicData FaultDomainId FaultDomainId `xml:"faultDomainId"` DeviceGroupId DeviceGroupId `xml:"deviceGroupId"` } func init() { t["ReplicationGroupId"] = reflect.TypeOf((*ReplicationGroupId)(nil)).Elem() } type ReplicationIncompatibleWithFT struct { ReplicationFault } func init() { t["ReplicationIncompatibleWithFT"] = reflect.TypeOf((*ReplicationIncompatibleWithFT)(nil)).Elem() } type ReplicationIncompatibleWithFTFault ReplicationIncompatibleWithFT func init() { t["ReplicationIncompatibleWithFTFault"] = reflect.TypeOf((*ReplicationIncompatibleWithFTFault)(nil)).Elem() } type ReplicationInfoDiskSettings struct { DynamicData Key int32 `xml:"key"` DiskReplicationId string `xml:"diskReplicationId"` } func init() { t["ReplicationInfoDiskSettings"] = reflect.TypeOf((*ReplicationInfoDiskSettings)(nil)).Elem() } type ReplicationInvalidOptions struct { ReplicationFault Options string `xml:"options"` Entity *ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["ReplicationInvalidOptions"] = reflect.TypeOf((*ReplicationInvalidOptions)(nil)).Elem() } type ReplicationInvalidOptionsFault ReplicationInvalidOptions func init() { t["ReplicationInvalidOptionsFault"] = reflect.TypeOf((*ReplicationInvalidOptionsFault)(nil)).Elem() } type ReplicationNotSupportedOnHost struct { ReplicationFault } func init() { t["ReplicationNotSupportedOnHost"] = reflect.TypeOf((*ReplicationNotSupportedOnHost)(nil)).Elem() } type ReplicationNotSupportedOnHostFault ReplicationNotSupportedOnHost func init() { t["ReplicationNotSupportedOnHostFault"] = reflect.TypeOf((*ReplicationNotSupportedOnHostFault)(nil)).Elem() } type ReplicationSpec struct { DynamicData ReplicationGroupId ReplicationGroupId `xml:"replicationGroupId"` } func init() { t["ReplicationSpec"] = reflect.TypeOf((*ReplicationSpec)(nil)).Elem() } type ReplicationVmConfigFault struct { ReplicationConfigFault Reason string `xml:"reason,omitempty"` VmRef *ManagedObjectReference `xml:"vmRef,omitempty"` } func init() { t["ReplicationVmConfigFault"] = reflect.TypeOf((*ReplicationVmConfigFault)(nil)).Elem() } type ReplicationVmConfigFaultFault ReplicationVmConfigFault func init() { t["ReplicationVmConfigFaultFault"] = reflect.TypeOf((*ReplicationVmConfigFaultFault)(nil)).Elem() } type ReplicationVmFault struct { ReplicationFault Reason string `xml:"reason,omitempty"` State string `xml:"state,omitempty"` InstanceId string `xml:"instanceId,omitempty"` Vm *ManagedObjectReference `xml:"vm,omitempty"` } func init() { t["ReplicationVmFault"] = reflect.TypeOf((*ReplicationVmFault)(nil)).Elem() } type ReplicationVmFaultFault BaseReplicationVmFault func init() { t["ReplicationVmFaultFault"] = reflect.TypeOf((*ReplicationVmFaultFault)(nil)).Elem() } type ReplicationVmInProgressFault struct { ReplicationVmFault RequestedActivity string `xml:"requestedActivity"` InProgressActivity string `xml:"inProgressActivity"` } func init() { t["ReplicationVmInProgressFault"] = reflect.TypeOf((*ReplicationVmInProgressFault)(nil)).Elem() } type ReplicationVmInProgressFaultFault ReplicationVmInProgressFault func init() { t["ReplicationVmInProgressFaultFault"] = reflect.TypeOf((*ReplicationVmInProgressFaultFault)(nil)).Elem() } type ReplicationVmProgressInfo struct { DynamicData Progress int32 `xml:"progress"` BytesTransferred int64 `xml:"bytesTransferred"` BytesToTransfer int64 `xml:"bytesToTransfer"` ChecksumTotalBytes int64 `xml:"checksumTotalBytes,omitempty"` ChecksumComparedBytes int64 `xml:"checksumComparedBytes,omitempty"` } func init() { t["ReplicationVmProgressInfo"] = reflect.TypeOf((*ReplicationVmProgressInfo)(nil)).Elem() } type RequestCanceled struct { RuntimeFault } func init() { t["RequestCanceled"] = reflect.TypeOf((*RequestCanceled)(nil)).Elem() } type RequestCanceledFault RequestCanceled func init() { t["RequestCanceledFault"] = reflect.TypeOf((*RequestCanceledFault)(nil)).Elem() } type RescanAllHba RescanAllHbaRequestType func init() { t["RescanAllHba"] = reflect.TypeOf((*RescanAllHba)(nil)).Elem() } type RescanAllHbaRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RescanAllHbaRequestType"] = reflect.TypeOf((*RescanAllHbaRequestType)(nil)).Elem() } type RescanAllHbaResponse struct { } type RescanHba RescanHbaRequestType func init() { t["RescanHba"] = reflect.TypeOf((*RescanHba)(nil)).Elem() } type RescanHbaRequestType struct { This ManagedObjectReference `xml:"_this"` HbaDevice string `xml:"hbaDevice"` } func init() { t["RescanHbaRequestType"] = reflect.TypeOf((*RescanHbaRequestType)(nil)).Elem() } type RescanHbaResponse struct { } type RescanVffs RescanVffsRequestType func init() { t["RescanVffs"] = reflect.TypeOf((*RescanVffs)(nil)).Elem() } type RescanVffsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RescanVffsRequestType"] = reflect.TypeOf((*RescanVffsRequestType)(nil)).Elem() } type RescanVffsResponse struct { } type RescanVmfs RescanVmfsRequestType func init() { t["RescanVmfs"] = reflect.TypeOf((*RescanVmfs)(nil)).Elem() } type RescanVmfsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RescanVmfsRequestType"] = reflect.TypeOf((*RescanVmfsRequestType)(nil)).Elem() } type RescanVmfsResponse struct { } type ResetCollector ResetCollectorRequestType func init() { t["ResetCollector"] = reflect.TypeOf((*ResetCollector)(nil)).Elem() } type ResetCollectorRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ResetCollectorRequestType"] = reflect.TypeOf((*ResetCollectorRequestType)(nil)).Elem() } type ResetCollectorResponse struct { } type ResetCounterLevelMapping ResetCounterLevelMappingRequestType func init() { t["ResetCounterLevelMapping"] = reflect.TypeOf((*ResetCounterLevelMapping)(nil)).Elem() } type ResetCounterLevelMappingRequestType struct { This ManagedObjectReference `xml:"_this"` Counters []int32 `xml:"counters"` } func init() { t["ResetCounterLevelMappingRequestType"] = reflect.TypeOf((*ResetCounterLevelMappingRequestType)(nil)).Elem() } type ResetCounterLevelMappingResponse struct { } type ResetEntityPermissions ResetEntityPermissionsRequestType func init() { t["ResetEntityPermissions"] = reflect.TypeOf((*ResetEntityPermissions)(nil)).Elem() } type ResetEntityPermissionsRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Permission []Permission `xml:"permission,omitempty"` } func init() { t["ResetEntityPermissionsRequestType"] = reflect.TypeOf((*ResetEntityPermissionsRequestType)(nil)).Elem() } type ResetEntityPermissionsResponse struct { } type ResetFirmwareToFactoryDefaults ResetFirmwareToFactoryDefaultsRequestType func init() { t["ResetFirmwareToFactoryDefaults"] = reflect.TypeOf((*ResetFirmwareToFactoryDefaults)(nil)).Elem() } type ResetFirmwareToFactoryDefaultsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ResetFirmwareToFactoryDefaultsRequestType"] = reflect.TypeOf((*ResetFirmwareToFactoryDefaultsRequestType)(nil)).Elem() } type ResetFirmwareToFactoryDefaultsResponse struct { } type ResetGuestInformation ResetGuestInformationRequestType func init() { t["ResetGuestInformation"] = reflect.TypeOf((*ResetGuestInformation)(nil)).Elem() } type ResetGuestInformationRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ResetGuestInformationRequestType"] = reflect.TypeOf((*ResetGuestInformationRequestType)(nil)).Elem() } type ResetGuestInformationResponse struct { } type ResetListView ResetListViewRequestType func init() { t["ResetListView"] = reflect.TypeOf((*ResetListView)(nil)).Elem() } type ResetListViewFromView ResetListViewFromViewRequestType func init() { t["ResetListViewFromView"] = reflect.TypeOf((*ResetListViewFromView)(nil)).Elem() } type ResetListViewFromViewRequestType struct { This ManagedObjectReference `xml:"_this"` View ManagedObjectReference `xml:"view"` } func init() { t["ResetListViewFromViewRequestType"] = reflect.TypeOf((*ResetListViewFromViewRequestType)(nil)).Elem() } type ResetListViewFromViewResponse struct { } type ResetListViewRequestType struct { This ManagedObjectReference `xml:"_this"` Obj []ManagedObjectReference `xml:"obj,omitempty"` } func init() { t["ResetListViewRequestType"] = reflect.TypeOf((*ResetListViewRequestType)(nil)).Elem() } type ResetListViewResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type ResetSystemHealthInfo ResetSystemHealthInfoRequestType func init() { t["ResetSystemHealthInfo"] = reflect.TypeOf((*ResetSystemHealthInfo)(nil)).Elem() } type ResetSystemHealthInfoRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ResetSystemHealthInfoRequestType"] = reflect.TypeOf((*ResetSystemHealthInfoRequestType)(nil)).Elem() } type ResetSystemHealthInfoResponse struct { } type ResetVMRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ResetVMRequestType"] = reflect.TypeOf((*ResetVMRequestType)(nil)).Elem() } type ResetVM_Task ResetVMRequestType func init() { t["ResetVM_Task"] = reflect.TypeOf((*ResetVM_Task)(nil)).Elem() } type ResetVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ResignatureUnresolvedVmfsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` ResolutionSpec HostUnresolvedVmfsResignatureSpec `xml:"resolutionSpec"` } func init() { t["ResignatureUnresolvedVmfsVolumeRequestType"] = reflect.TypeOf((*ResignatureUnresolvedVmfsVolumeRequestType)(nil)).Elem() } type ResignatureUnresolvedVmfsVolume_Task ResignatureUnresolvedVmfsVolumeRequestType func init() { t["ResignatureUnresolvedVmfsVolume_Task"] = reflect.TypeOf((*ResignatureUnresolvedVmfsVolume_Task)(nil)).Elem() } type ResignatureUnresolvedVmfsVolume_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ResolveInstallationErrorsOnClusterRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` Cluster ManagedObjectReference `xml:"cluster"` } func init() { t["ResolveInstallationErrorsOnClusterRequestType"] = reflect.TypeOf((*ResolveInstallationErrorsOnClusterRequestType)(nil)).Elem() } type ResolveInstallationErrorsOnCluster_Task ResolveInstallationErrorsOnClusterRequestType func init() { t["ResolveInstallationErrorsOnCluster_Task"] = reflect.TypeOf((*ResolveInstallationErrorsOnCluster_Task)(nil)).Elem() } type ResolveInstallationErrorsOnCluster_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ResolveInstallationErrorsOnHostRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` Host ManagedObjectReference `xml:"host"` } func init() { t["ResolveInstallationErrorsOnHostRequestType"] = reflect.TypeOf((*ResolveInstallationErrorsOnHostRequestType)(nil)).Elem() } type ResolveInstallationErrorsOnHost_Task ResolveInstallationErrorsOnHostRequestType func init() { t["ResolveInstallationErrorsOnHost_Task"] = reflect.TypeOf((*ResolveInstallationErrorsOnHost_Task)(nil)).Elem() } type ResolveInstallationErrorsOnHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ResolveMultipleUnresolvedVmfsVolumes ResolveMultipleUnresolvedVmfsVolumesRequestType func init() { t["ResolveMultipleUnresolvedVmfsVolumes"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumes)(nil)).Elem() } type ResolveMultipleUnresolvedVmfsVolumesExRequestType struct { This ManagedObjectReference `xml:"_this"` ResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"resolutionSpec"` } func init() { t["ResolveMultipleUnresolvedVmfsVolumesExRequestType"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesExRequestType)(nil)).Elem() } type ResolveMultipleUnresolvedVmfsVolumesEx_Task ResolveMultipleUnresolvedVmfsVolumesExRequestType func init() { t["ResolveMultipleUnresolvedVmfsVolumesEx_Task"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesEx_Task)(nil)).Elem() } type ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ResolveMultipleUnresolvedVmfsVolumesRequestType struct { This ManagedObjectReference `xml:"_this"` ResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"resolutionSpec"` } func init() { t["ResolveMultipleUnresolvedVmfsVolumesRequestType"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesRequestType)(nil)).Elem() } type ResolveMultipleUnresolvedVmfsVolumesResponse struct { Returnval []HostUnresolvedVmfsResolutionResult `xml:"returnval,omitempty"` } type ResourceAllocationInfo struct { DynamicData Reservation int64 `xml:"reservation,omitempty"` ExpandableReservation *bool `xml:"expandableReservation"` Limit int64 `xml:"limit,omitempty"` Shares *SharesInfo `xml:"shares,omitempty"` OverheadLimit int64 `xml:"overheadLimit,omitempty"` } func init() { t["ResourceAllocationInfo"] = reflect.TypeOf((*ResourceAllocationInfo)(nil)).Elem() } type ResourceAllocationOption struct { DynamicData SharesOption SharesOption `xml:"sharesOption"` } func init() { t["ResourceAllocationOption"] = reflect.TypeOf((*ResourceAllocationOption)(nil)).Elem() } type ResourceConfigOption struct { DynamicData CpuAllocationOption ResourceAllocationOption `xml:"cpuAllocationOption"` MemoryAllocationOption ResourceAllocationOption `xml:"memoryAllocationOption"` } func init() { t["ResourceConfigOption"] = reflect.TypeOf((*ResourceConfigOption)(nil)).Elem() } type ResourceConfigSpec struct { DynamicData Entity *ManagedObjectReference `xml:"entity,omitempty"` ChangeVersion string `xml:"changeVersion,omitempty"` LastModified *time.Time `xml:"lastModified"` CpuAllocation BaseResourceAllocationInfo `xml:"cpuAllocation,typeattr"` MemoryAllocation BaseResourceAllocationInfo `xml:"memoryAllocation,typeattr"` } func init() { t["ResourceConfigSpec"] = reflect.TypeOf((*ResourceConfigSpec)(nil)).Elem() } type ResourceInUse struct { VimFault Type string `xml:"type,omitempty"` Name string `xml:"name,omitempty"` } func init() { t["ResourceInUse"] = reflect.TypeOf((*ResourceInUse)(nil)).Elem() } type ResourceInUseFault BaseResourceInUse func init() { t["ResourceInUseFault"] = reflect.TypeOf((*ResourceInUseFault)(nil)).Elem() } type ResourceNotAvailable struct { VimFault ContainerType string `xml:"containerType,omitempty"` ContainerName string `xml:"containerName,omitempty"` Type string `xml:"type,omitempty"` } func init() { t["ResourceNotAvailable"] = reflect.TypeOf((*ResourceNotAvailable)(nil)).Elem() } type ResourceNotAvailableFault ResourceNotAvailable func init() { t["ResourceNotAvailableFault"] = reflect.TypeOf((*ResourceNotAvailableFault)(nil)).Elem() } type ResourcePoolCreatedEvent struct { ResourcePoolEvent Parent ResourcePoolEventArgument `xml:"parent"` } func init() { t["ResourcePoolCreatedEvent"] = reflect.TypeOf((*ResourcePoolCreatedEvent)(nil)).Elem() } type ResourcePoolDestroyedEvent struct { ResourcePoolEvent } func init() { t["ResourcePoolDestroyedEvent"] = reflect.TypeOf((*ResourcePoolDestroyedEvent)(nil)).Elem() } type ResourcePoolEvent struct { Event ResourcePool ResourcePoolEventArgument `xml:"resourcePool"` } func init() { t["ResourcePoolEvent"] = reflect.TypeOf((*ResourcePoolEvent)(nil)).Elem() } type ResourcePoolEventArgument struct { EntityEventArgument ResourcePool ManagedObjectReference `xml:"resourcePool"` } func init() { t["ResourcePoolEventArgument"] = reflect.TypeOf((*ResourcePoolEventArgument)(nil)).Elem() } type ResourcePoolMovedEvent struct { ResourcePoolEvent OldParent ResourcePoolEventArgument `xml:"oldParent"` NewParent ResourcePoolEventArgument `xml:"newParent"` } func init() { t["ResourcePoolMovedEvent"] = reflect.TypeOf((*ResourcePoolMovedEvent)(nil)).Elem() } type ResourcePoolQuickStats struct { DynamicData OverallCpuUsage int64 `xml:"overallCpuUsage,omitempty"` OverallCpuDemand int64 `xml:"overallCpuDemand,omitempty"` GuestMemoryUsage int64 `xml:"guestMemoryUsage,omitempty"` HostMemoryUsage int64 `xml:"hostMemoryUsage,omitempty"` DistributedCpuEntitlement int64 `xml:"distributedCpuEntitlement,omitempty"` DistributedMemoryEntitlement int64 `xml:"distributedMemoryEntitlement,omitempty"` StaticCpuEntitlement int32 `xml:"staticCpuEntitlement,omitempty"` StaticMemoryEntitlement int32 `xml:"staticMemoryEntitlement,omitempty"` PrivateMemory int64 `xml:"privateMemory,omitempty"` SharedMemory int64 `xml:"sharedMemory,omitempty"` SwappedMemory int64 `xml:"swappedMemory,omitempty"` BalloonedMemory int64 `xml:"balloonedMemory,omitempty"` OverheadMemory int64 `xml:"overheadMemory,omitempty"` ConsumedOverheadMemory int64 `xml:"consumedOverheadMemory,omitempty"` CompressedMemory int64 `xml:"compressedMemory,omitempty"` } func init() { t["ResourcePoolQuickStats"] = reflect.TypeOf((*ResourcePoolQuickStats)(nil)).Elem() } type ResourcePoolReconfiguredEvent struct { ResourcePoolEvent ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["ResourcePoolReconfiguredEvent"] = reflect.TypeOf((*ResourcePoolReconfiguredEvent)(nil)).Elem() } type ResourcePoolResourceUsage struct { DynamicData ReservationUsed int64 `xml:"reservationUsed"` ReservationUsedForVm int64 `xml:"reservationUsedForVm"` UnreservedForPool int64 `xml:"unreservedForPool"` UnreservedForVm int64 `xml:"unreservedForVm"` OverallUsage int64 `xml:"overallUsage"` MaxUsage int64 `xml:"maxUsage"` } func init() { t["ResourcePoolResourceUsage"] = reflect.TypeOf((*ResourcePoolResourceUsage)(nil)).Elem() } type ResourcePoolRuntimeInfo struct { DynamicData Memory ResourcePoolResourceUsage `xml:"memory"` Cpu ResourcePoolResourceUsage `xml:"cpu"` OverallStatus ManagedEntityStatus `xml:"overallStatus"` } func init() { t["ResourcePoolRuntimeInfo"] = reflect.TypeOf((*ResourcePoolRuntimeInfo)(nil)).Elem() } type ResourcePoolSummary struct { DynamicData Name string `xml:"name"` Config ResourceConfigSpec `xml:"config"` Runtime ResourcePoolRuntimeInfo `xml:"runtime"` QuickStats *ResourcePoolQuickStats `xml:"quickStats,omitempty"` ConfiguredMemoryMB int32 `xml:"configuredMemoryMB,omitempty"` } func init() { t["ResourcePoolSummary"] = reflect.TypeOf((*ResourcePoolSummary)(nil)).Elem() } type ResourceViolatedEvent struct { ResourcePoolEvent } func init() { t["ResourceViolatedEvent"] = reflect.TypeOf((*ResourceViolatedEvent)(nil)).Elem() } type RestartService RestartServiceRequestType func init() { t["RestartService"] = reflect.TypeOf((*RestartService)(nil)).Elem() } type RestartServiceConsoleVirtualNic RestartServiceConsoleVirtualNicRequestType func init() { t["RestartServiceConsoleVirtualNic"] = reflect.TypeOf((*RestartServiceConsoleVirtualNic)(nil)).Elem() } type RestartServiceConsoleVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` } func init() { t["RestartServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*RestartServiceConsoleVirtualNicRequestType)(nil)).Elem() } type RestartServiceConsoleVirtualNicResponse struct { } type RestartServiceRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["RestartServiceRequestType"] = reflect.TypeOf((*RestartServiceRequestType)(nil)).Elem() } type RestartServiceResponse struct { } type RestoreFirmwareConfiguration RestoreFirmwareConfigurationRequestType func init() { t["RestoreFirmwareConfiguration"] = reflect.TypeOf((*RestoreFirmwareConfiguration)(nil)).Elem() } type RestoreFirmwareConfigurationRequestType struct { This ManagedObjectReference `xml:"_this"` Force bool `xml:"force"` } func init() { t["RestoreFirmwareConfigurationRequestType"] = reflect.TypeOf((*RestoreFirmwareConfigurationRequestType)(nil)).Elem() } type RestoreFirmwareConfigurationResponse struct { } type RestrictedByAdministrator struct { RuntimeFault Details string `xml:"details"` } func init() { t["RestrictedByAdministrator"] = reflect.TypeOf((*RestrictedByAdministrator)(nil)).Elem() } type RestrictedByAdministratorFault RestrictedByAdministrator func init() { t["RestrictedByAdministratorFault"] = reflect.TypeOf((*RestrictedByAdministratorFault)(nil)).Elem() } type RestrictedVersion struct { SecurityError } func init() { t["RestrictedVersion"] = reflect.TypeOf((*RestrictedVersion)(nil)).Elem() } type RestrictedVersionFault RestrictedVersion func init() { t["RestrictedVersionFault"] = reflect.TypeOf((*RestrictedVersionFault)(nil)).Elem() } type RetrieveAllPermissions RetrieveAllPermissionsRequestType func init() { t["RetrieveAllPermissions"] = reflect.TypeOf((*RetrieveAllPermissions)(nil)).Elem() } type RetrieveAllPermissionsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveAllPermissionsRequestType"] = reflect.TypeOf((*RetrieveAllPermissionsRequestType)(nil)).Elem() } type RetrieveAllPermissionsResponse struct { Returnval []Permission `xml:"returnval,omitempty"` } type RetrieveAnswerFile RetrieveAnswerFileRequestType func init() { t["RetrieveAnswerFile"] = reflect.TypeOf((*RetrieveAnswerFile)(nil)).Elem() } type RetrieveAnswerFileForProfile RetrieveAnswerFileForProfileRequestType func init() { t["RetrieveAnswerFileForProfile"] = reflect.TypeOf((*RetrieveAnswerFileForProfile)(nil)).Elem() } type RetrieveAnswerFileForProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` ApplyProfile HostApplyProfile `xml:"applyProfile"` } func init() { t["RetrieveAnswerFileForProfileRequestType"] = reflect.TypeOf((*RetrieveAnswerFileForProfileRequestType)(nil)).Elem() } type RetrieveAnswerFileForProfileResponse struct { Returnval *AnswerFile `xml:"returnval,omitempty"` } type RetrieveAnswerFileRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` } func init() { t["RetrieveAnswerFileRequestType"] = reflect.TypeOf((*RetrieveAnswerFileRequestType)(nil)).Elem() } type RetrieveAnswerFileResponse struct { Returnval *AnswerFile `xml:"returnval,omitempty"` } type RetrieveArgumentDescription RetrieveArgumentDescriptionRequestType func init() { t["RetrieveArgumentDescription"] = reflect.TypeOf((*RetrieveArgumentDescription)(nil)).Elem() } type RetrieveArgumentDescriptionRequestType struct { This ManagedObjectReference `xml:"_this"` EventTypeId string `xml:"eventTypeId"` } func init() { t["RetrieveArgumentDescriptionRequestType"] = reflect.TypeOf((*RetrieveArgumentDescriptionRequestType)(nil)).Elem() } type RetrieveArgumentDescriptionResponse struct { Returnval []EventArgDesc `xml:"returnval,omitempty"` } type RetrieveClientCert RetrieveClientCertRequestType func init() { t["RetrieveClientCert"] = reflect.TypeOf((*RetrieveClientCert)(nil)).Elem() } type RetrieveClientCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` } func init() { t["RetrieveClientCertRequestType"] = reflect.TypeOf((*RetrieveClientCertRequestType)(nil)).Elem() } type RetrieveClientCertResponse struct { Returnval string `xml:"returnval"` } type RetrieveClientCsr RetrieveClientCsrRequestType func init() { t["RetrieveClientCsr"] = reflect.TypeOf((*RetrieveClientCsr)(nil)).Elem() } type RetrieveClientCsrRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` } func init() { t["RetrieveClientCsrRequestType"] = reflect.TypeOf((*RetrieveClientCsrRequestType)(nil)).Elem() } type RetrieveClientCsrResponse struct { Returnval string `xml:"returnval"` } type RetrieveDasAdvancedRuntimeInfo RetrieveDasAdvancedRuntimeInfoRequestType func init() { t["RetrieveDasAdvancedRuntimeInfo"] = reflect.TypeOf((*RetrieveDasAdvancedRuntimeInfo)(nil)).Elem() } type RetrieveDasAdvancedRuntimeInfoRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveDasAdvancedRuntimeInfoRequestType"] = reflect.TypeOf((*RetrieveDasAdvancedRuntimeInfoRequestType)(nil)).Elem() } type RetrieveDasAdvancedRuntimeInfoResponse struct { Returnval BaseClusterDasAdvancedRuntimeInfo `xml:"returnval,omitempty,typeattr"` } type RetrieveDescription RetrieveDescriptionRequestType func init() { t["RetrieveDescription"] = reflect.TypeOf((*RetrieveDescription)(nil)).Elem() } type RetrieveDescriptionRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveDescriptionRequestType"] = reflect.TypeOf((*RetrieveDescriptionRequestType)(nil)).Elem() } type RetrieveDescriptionResponse struct { Returnval *ProfileDescription `xml:"returnval,omitempty"` } type RetrieveDiskPartitionInfo RetrieveDiskPartitionInfoRequestType func init() { t["RetrieveDiskPartitionInfo"] = reflect.TypeOf((*RetrieveDiskPartitionInfo)(nil)).Elem() } type RetrieveDiskPartitionInfoRequestType struct { This ManagedObjectReference `xml:"_this"` DevicePath []string `xml:"devicePath"` } func init() { t["RetrieveDiskPartitionInfoRequestType"] = reflect.TypeOf((*RetrieveDiskPartitionInfoRequestType)(nil)).Elem() } type RetrieveDiskPartitionInfoResponse struct { Returnval []HostDiskPartitionInfo `xml:"returnval,omitempty"` } type RetrieveEntityPermissions RetrieveEntityPermissionsRequestType func init() { t["RetrieveEntityPermissions"] = reflect.TypeOf((*RetrieveEntityPermissions)(nil)).Elem() } type RetrieveEntityPermissionsRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Inherited bool `xml:"inherited"` } func init() { t["RetrieveEntityPermissionsRequestType"] = reflect.TypeOf((*RetrieveEntityPermissionsRequestType)(nil)).Elem() } type RetrieveEntityPermissionsResponse struct { Returnval []Permission `xml:"returnval,omitempty"` } type RetrieveEntityScheduledTask RetrieveEntityScheduledTaskRequestType func init() { t["RetrieveEntityScheduledTask"] = reflect.TypeOf((*RetrieveEntityScheduledTask)(nil)).Elem() } type RetrieveEntityScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` Entity *ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["RetrieveEntityScheduledTaskRequestType"] = reflect.TypeOf((*RetrieveEntityScheduledTaskRequestType)(nil)).Elem() } type RetrieveEntityScheduledTaskResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type RetrieveHardwareUptime RetrieveHardwareUptimeRequestType func init() { t["RetrieveHardwareUptime"] = reflect.TypeOf((*RetrieveHardwareUptime)(nil)).Elem() } type RetrieveHardwareUptimeRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveHardwareUptimeRequestType"] = reflect.TypeOf((*RetrieveHardwareUptimeRequestType)(nil)).Elem() } type RetrieveHardwareUptimeResponse struct { Returnval int64 `xml:"returnval"` } type RetrieveHostAccessControlEntries RetrieveHostAccessControlEntriesRequestType func init() { t["RetrieveHostAccessControlEntries"] = reflect.TypeOf((*RetrieveHostAccessControlEntries)(nil)).Elem() } type RetrieveHostAccessControlEntriesRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveHostAccessControlEntriesRequestType"] = reflect.TypeOf((*RetrieveHostAccessControlEntriesRequestType)(nil)).Elem() } type RetrieveHostAccessControlEntriesResponse struct { Returnval []HostAccessControlEntry `xml:"returnval,omitempty"` } type RetrieveHostCustomizations RetrieveHostCustomizationsRequestType func init() { t["RetrieveHostCustomizations"] = reflect.TypeOf((*RetrieveHostCustomizations)(nil)).Elem() } type RetrieveHostCustomizationsForProfile RetrieveHostCustomizationsForProfileRequestType func init() { t["RetrieveHostCustomizationsForProfile"] = reflect.TypeOf((*RetrieveHostCustomizationsForProfile)(nil)).Elem() } type RetrieveHostCustomizationsForProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Hosts []ManagedObjectReference `xml:"hosts,omitempty"` ApplyProfile HostApplyProfile `xml:"applyProfile"` } func init() { t["RetrieveHostCustomizationsForProfileRequestType"] = reflect.TypeOf((*RetrieveHostCustomizationsForProfileRequestType)(nil)).Elem() } type RetrieveHostCustomizationsForProfileResponse struct { Returnval []StructuredCustomizations `xml:"returnval,omitempty"` } type RetrieveHostCustomizationsRequestType struct { This ManagedObjectReference `xml:"_this"` Hosts []ManagedObjectReference `xml:"hosts,omitempty"` } func init() { t["RetrieveHostCustomizationsRequestType"] = reflect.TypeOf((*RetrieveHostCustomizationsRequestType)(nil)).Elem() } type RetrieveHostCustomizationsResponse struct { Returnval []StructuredCustomizations `xml:"returnval,omitempty"` } type RetrieveHostSpecification RetrieveHostSpecificationRequestType func init() { t["RetrieveHostSpecification"] = reflect.TypeOf((*RetrieveHostSpecification)(nil)).Elem() } type RetrieveHostSpecificationRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` FromHost bool `xml:"fromHost"` } func init() { t["RetrieveHostSpecificationRequestType"] = reflect.TypeOf((*RetrieveHostSpecificationRequestType)(nil)).Elem() } type RetrieveHostSpecificationResponse struct { Returnval HostSpecification `xml:"returnval"` } type RetrieveKmipServerCert RetrieveKmipServerCertRequestType func init() { t["RetrieveKmipServerCert"] = reflect.TypeOf((*RetrieveKmipServerCert)(nil)).Elem() } type RetrieveKmipServerCertRequestType struct { This ManagedObjectReference `xml:"_this"` KeyProvider KeyProviderId `xml:"keyProvider"` Server KmipServerInfo `xml:"server"` } func init() { t["RetrieveKmipServerCertRequestType"] = reflect.TypeOf((*RetrieveKmipServerCertRequestType)(nil)).Elem() } type RetrieveKmipServerCertResponse struct { Returnval CryptoManagerKmipServerCertInfo `xml:"returnval"` } type RetrieveKmipServersStatusRequestType struct { This ManagedObjectReference `xml:"_this"` Clusters []KmipClusterInfo `xml:"clusters,omitempty"` } func init() { t["RetrieveKmipServersStatusRequestType"] = reflect.TypeOf((*RetrieveKmipServersStatusRequestType)(nil)).Elem() } type RetrieveKmipServersStatus_Task RetrieveKmipServersStatusRequestType func init() { t["RetrieveKmipServersStatus_Task"] = reflect.TypeOf((*RetrieveKmipServersStatus_Task)(nil)).Elem() } type RetrieveKmipServersStatus_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RetrieveObjectScheduledTask RetrieveObjectScheduledTaskRequestType func init() { t["RetrieveObjectScheduledTask"] = reflect.TypeOf((*RetrieveObjectScheduledTask)(nil)).Elem() } type RetrieveObjectScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` Obj *ManagedObjectReference `xml:"obj,omitempty"` } func init() { t["RetrieveObjectScheduledTaskRequestType"] = reflect.TypeOf((*RetrieveObjectScheduledTaskRequestType)(nil)).Elem() } type RetrieveObjectScheduledTaskResponse struct { Returnval []ManagedObjectReference `xml:"returnval,omitempty"` } type RetrieveOptions struct { DynamicData MaxObjects int32 `xml:"maxObjects,omitempty"` } func init() { t["RetrieveOptions"] = reflect.TypeOf((*RetrieveOptions)(nil)).Elem() } type RetrieveProductComponents RetrieveProductComponentsRequestType func init() { t["RetrieveProductComponents"] = reflect.TypeOf((*RetrieveProductComponents)(nil)).Elem() } type RetrieveProductComponentsRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveProductComponentsRequestType"] = reflect.TypeOf((*RetrieveProductComponentsRequestType)(nil)).Elem() } type RetrieveProductComponentsResponse struct { Returnval []ProductComponentInfo `xml:"returnval,omitempty"` } type RetrieveProperties RetrievePropertiesRequestType func init() { t["RetrieveProperties"] = reflect.TypeOf((*RetrieveProperties)(nil)).Elem() } type RetrievePropertiesEx RetrievePropertiesExRequestType func init() { t["RetrievePropertiesEx"] = reflect.TypeOf((*RetrievePropertiesEx)(nil)).Elem() } type RetrievePropertiesExRequestType struct { This ManagedObjectReference `xml:"_this"` SpecSet []PropertyFilterSpec `xml:"specSet"` Options RetrieveOptions `xml:"options"` } func init() { t["RetrievePropertiesExRequestType"] = reflect.TypeOf((*RetrievePropertiesExRequestType)(nil)).Elem() } type RetrievePropertiesExResponse struct { Returnval *RetrieveResult `xml:"returnval,omitempty"` } type RetrievePropertiesRequestType struct { This ManagedObjectReference `xml:"_this"` SpecSet []PropertyFilterSpec `xml:"specSet"` } func init() { t["RetrievePropertiesRequestType"] = reflect.TypeOf((*RetrievePropertiesRequestType)(nil)).Elem() } type RetrievePropertiesResponse struct { Returnval []ObjectContent `xml:"returnval,omitempty"` } type RetrieveResult struct { DynamicData Token string `xml:"token,omitempty"` Objects []ObjectContent `xml:"objects"` } func init() { t["RetrieveResult"] = reflect.TypeOf((*RetrieveResult)(nil)).Elem() } type RetrieveRolePermissions RetrieveRolePermissionsRequestType func init() { t["RetrieveRolePermissions"] = reflect.TypeOf((*RetrieveRolePermissions)(nil)).Elem() } type RetrieveRolePermissionsRequestType struct { This ManagedObjectReference `xml:"_this"` RoleId int32 `xml:"roleId"` } func init() { t["RetrieveRolePermissionsRequestType"] = reflect.TypeOf((*RetrieveRolePermissionsRequestType)(nil)).Elem() } type RetrieveRolePermissionsResponse struct { Returnval []Permission `xml:"returnval,omitempty"` } type RetrieveSelfSignedClientCert RetrieveSelfSignedClientCertRequestType func init() { t["RetrieveSelfSignedClientCert"] = reflect.TypeOf((*RetrieveSelfSignedClientCert)(nil)).Elem() } type RetrieveSelfSignedClientCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` } func init() { t["RetrieveSelfSignedClientCertRequestType"] = reflect.TypeOf((*RetrieveSelfSignedClientCertRequestType)(nil)).Elem() } type RetrieveSelfSignedClientCertResponse struct { Returnval string `xml:"returnval"` } type RetrieveServiceContent RetrieveServiceContentRequestType func init() { t["RetrieveServiceContent"] = reflect.TypeOf((*RetrieveServiceContent)(nil)).Elem() } type RetrieveServiceContentRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RetrieveServiceContentRequestType"] = reflect.TypeOf((*RetrieveServiceContentRequestType)(nil)).Elem() } type RetrieveServiceContentResponse struct { Returnval ServiceContent `xml:"returnval"` } type RetrieveUserGroups RetrieveUserGroupsRequestType func init() { t["RetrieveUserGroups"] = reflect.TypeOf((*RetrieveUserGroups)(nil)).Elem() } type RetrieveUserGroupsRequestType struct { This ManagedObjectReference `xml:"_this"` Domain string `xml:"domain,omitempty"` SearchStr string `xml:"searchStr"` BelongsToGroup string `xml:"belongsToGroup,omitempty"` BelongsToUser string `xml:"belongsToUser,omitempty"` ExactMatch bool `xml:"exactMatch"` FindUsers bool `xml:"findUsers"` FindGroups bool `xml:"findGroups"` } func init() { t["RetrieveUserGroupsRequestType"] = reflect.TypeOf((*RetrieveUserGroupsRequestType)(nil)).Elem() } type RetrieveUserGroupsResponse struct { Returnval []BaseUserSearchResult `xml:"returnval,omitempty,typeattr"` } type RetrieveVStorageObject RetrieveVStorageObjectRequestType func init() { t["RetrieveVStorageObject"] = reflect.TypeOf((*RetrieveVStorageObject)(nil)).Elem() } type RetrieveVStorageObjectRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["RetrieveVStorageObjectRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectRequestType)(nil)).Elem() } type RetrieveVStorageObjectResponse struct { Returnval VStorageObject `xml:"returnval"` } type RetrieveVStorageObjectState RetrieveVStorageObjectStateRequestType func init() { t["RetrieveVStorageObjectState"] = reflect.TypeOf((*RetrieveVStorageObjectState)(nil)).Elem() } type RetrieveVStorageObjectStateRequestType struct { This ManagedObjectReference `xml:"_this"` Id ID `xml:"id"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["RetrieveVStorageObjectStateRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectStateRequestType)(nil)).Elem() } type RetrieveVStorageObjectStateResponse struct { Returnval VStorageObjectStateInfo `xml:"returnval"` } type RevertToCurrentSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` SuppressPowerOn *bool `xml:"suppressPowerOn"` } func init() { t["RevertToCurrentSnapshotRequestType"] = reflect.TypeOf((*RevertToCurrentSnapshotRequestType)(nil)).Elem() } type RevertToCurrentSnapshot_Task RevertToCurrentSnapshotRequestType func init() { t["RevertToCurrentSnapshot_Task"] = reflect.TypeOf((*RevertToCurrentSnapshot_Task)(nil)).Elem() } type RevertToCurrentSnapshot_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RevertToSnapshotRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` SuppressPowerOn *bool `xml:"suppressPowerOn"` } func init() { t["RevertToSnapshotRequestType"] = reflect.TypeOf((*RevertToSnapshotRequestType)(nil)).Elem() } type RevertToSnapshot_Task RevertToSnapshotRequestType func init() { t["RevertToSnapshot_Task"] = reflect.TypeOf((*RevertToSnapshot_Task)(nil)).Elem() } type RevertToSnapshot_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type RewindCollector RewindCollectorRequestType func init() { t["RewindCollector"] = reflect.TypeOf((*RewindCollector)(nil)).Elem() } type RewindCollectorRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RewindCollectorRequestType"] = reflect.TypeOf((*RewindCollectorRequestType)(nil)).Elem() } type RewindCollectorResponse struct { } type RoleAddedEvent struct { RoleEvent PrivilegeList []string `xml:"privilegeList,omitempty"` } func init() { t["RoleAddedEvent"] = reflect.TypeOf((*RoleAddedEvent)(nil)).Elem() } type RoleEvent struct { AuthorizationEvent Role RoleEventArgument `xml:"role"` } func init() { t["RoleEvent"] = reflect.TypeOf((*RoleEvent)(nil)).Elem() } type RoleEventArgument struct { EventArgument RoleId int32 `xml:"roleId"` Name string `xml:"name"` } func init() { t["RoleEventArgument"] = reflect.TypeOf((*RoleEventArgument)(nil)).Elem() } type RoleRemovedEvent struct { RoleEvent } func init() { t["RoleRemovedEvent"] = reflect.TypeOf((*RoleRemovedEvent)(nil)).Elem() } type RoleUpdatedEvent struct { RoleEvent PrivilegeList []string `xml:"privilegeList,omitempty"` PrevRoleName string `xml:"prevRoleName,omitempty"` PrivilegesAdded []string `xml:"privilegesAdded,omitempty"` PrivilegesRemoved []string `xml:"privilegesRemoved,omitempty"` } func init() { t["RoleUpdatedEvent"] = reflect.TypeOf((*RoleUpdatedEvent)(nil)).Elem() } type RollbackEvent struct { DvsEvent HostName string `xml:"hostName"` MethodName string `xml:"methodName,omitempty"` } func init() { t["RollbackEvent"] = reflect.TypeOf((*RollbackEvent)(nil)).Elem() } type RollbackFailure struct { DvsFault EntityName string `xml:"entityName"` EntityType string `xml:"entityType"` } func init() { t["RollbackFailure"] = reflect.TypeOf((*RollbackFailure)(nil)).Elem() } type RollbackFailureFault RollbackFailure func init() { t["RollbackFailureFault"] = reflect.TypeOf((*RollbackFailureFault)(nil)).Elem() } type RuleViolation struct { VmConfigFault Host *ManagedObjectReference `xml:"host,omitempty"` Rule BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` } func init() { t["RuleViolation"] = reflect.TypeOf((*RuleViolation)(nil)).Elem() } type RuleViolationFault RuleViolation func init() { t["RuleViolationFault"] = reflect.TypeOf((*RuleViolationFault)(nil)).Elem() } type RunScheduledTask RunScheduledTaskRequestType func init() { t["RunScheduledTask"] = reflect.TypeOf((*RunScheduledTask)(nil)).Elem() } type RunScheduledTaskRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["RunScheduledTaskRequestType"] = reflect.TypeOf((*RunScheduledTaskRequestType)(nil)).Elem() } type RunScheduledTaskResponse struct { } type RunScriptAction struct { Action Script string `xml:"script"` } func init() { t["RunScriptAction"] = reflect.TypeOf((*RunScriptAction)(nil)).Elem() } type RunVsanPhysicalDiskDiagnostics RunVsanPhysicalDiskDiagnosticsRequestType func init() { t["RunVsanPhysicalDiskDiagnostics"] = reflect.TypeOf((*RunVsanPhysicalDiskDiagnostics)(nil)).Elem() } type RunVsanPhysicalDiskDiagnosticsRequestType struct { This ManagedObjectReference `xml:"_this"` Disks []string `xml:"disks,omitempty"` } func init() { t["RunVsanPhysicalDiskDiagnosticsRequestType"] = reflect.TypeOf((*RunVsanPhysicalDiskDiagnosticsRequestType)(nil)).Elem() } type RunVsanPhysicalDiskDiagnosticsResponse struct { Returnval []HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult `xml:"returnval"` } type RuntimeFault struct { MethodFault } func init() { t["RuntimeFault"] = reflect.TypeOf((*RuntimeFault)(nil)).Elem() } type RuntimeFaultFault BaseRuntimeFault func init() { t["RuntimeFaultFault"] = reflect.TypeOf((*RuntimeFaultFault)(nil)).Elem() } type SAMLTokenAuthentication struct { GuestAuthentication Token string `xml:"token"` Username string `xml:"username,omitempty"` } func init() { t["SAMLTokenAuthentication"] = reflect.TypeOf((*SAMLTokenAuthentication)(nil)).Elem() } type SSLDisabledFault struct { HostConnectFault } func init() { t["SSLDisabledFault"] = reflect.TypeOf((*SSLDisabledFault)(nil)).Elem() } type SSLDisabledFaultFault SSLDisabledFault func init() { t["SSLDisabledFaultFault"] = reflect.TypeOf((*SSLDisabledFaultFault)(nil)).Elem() } type SSLVerifyFault struct { HostConnectFault SelfSigned bool `xml:"selfSigned"` Thumbprint string `xml:"thumbprint"` } func init() { t["SSLVerifyFault"] = reflect.TypeOf((*SSLVerifyFault)(nil)).Elem() } type SSLVerifyFaultFault SSLVerifyFault func init() { t["SSLVerifyFaultFault"] = reflect.TypeOf((*SSLVerifyFaultFault)(nil)).Elem() } type SSPIAuthentication struct { GuestAuthentication SspiToken string `xml:"sspiToken"` } func init() { t["SSPIAuthentication"] = reflect.TypeOf((*SSPIAuthentication)(nil)).Elem() } type SSPIChallenge struct { VimFault Base64Token string `xml:"base64Token"` } func init() { t["SSPIChallenge"] = reflect.TypeOf((*SSPIChallenge)(nil)).Elem() } type SSPIChallengeFault SSPIChallenge func init() { t["SSPIChallengeFault"] = reflect.TypeOf((*SSPIChallengeFault)(nil)).Elem() } type ScanHostPatchRequestType struct { This ManagedObjectReference `xml:"_this"` Repository HostPatchManagerLocator `xml:"repository"` UpdateID []string `xml:"updateID,omitempty"` } func init() { t["ScanHostPatchRequestType"] = reflect.TypeOf((*ScanHostPatchRequestType)(nil)).Elem() } type ScanHostPatchV2RequestType struct { This ManagedObjectReference `xml:"_this"` MetaUrls []string `xml:"metaUrls,omitempty"` BundleUrls []string `xml:"bundleUrls,omitempty"` Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` } func init() { t["ScanHostPatchV2RequestType"] = reflect.TypeOf((*ScanHostPatchV2RequestType)(nil)).Elem() } type ScanHostPatchV2_Task ScanHostPatchV2RequestType func init() { t["ScanHostPatchV2_Task"] = reflect.TypeOf((*ScanHostPatchV2_Task)(nil)).Elem() } type ScanHostPatchV2_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ScanHostPatch_Task ScanHostPatchRequestType func init() { t["ScanHostPatch_Task"] = reflect.TypeOf((*ScanHostPatch_Task)(nil)).Elem() } type ScanHostPatch_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ScheduleReconcileDatastoreInventory ScheduleReconcileDatastoreInventoryRequestType func init() { t["ScheduleReconcileDatastoreInventory"] = reflect.TypeOf((*ScheduleReconcileDatastoreInventory)(nil)).Elem() } type ScheduleReconcileDatastoreInventoryRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["ScheduleReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*ScheduleReconcileDatastoreInventoryRequestType)(nil)).Elem() } type ScheduleReconcileDatastoreInventoryResponse struct { } type ScheduledHardwareUpgradeInfo struct { DynamicData UpgradePolicy string `xml:"upgradePolicy,omitempty"` VersionKey string `xml:"versionKey,omitempty"` ScheduledHardwareUpgradeStatus string `xml:"scheduledHardwareUpgradeStatus,omitempty"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["ScheduledHardwareUpgradeInfo"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfo)(nil)).Elem() } type ScheduledTaskCompletedEvent struct { ScheduledTaskEvent } func init() { t["ScheduledTaskCompletedEvent"] = reflect.TypeOf((*ScheduledTaskCompletedEvent)(nil)).Elem() } type ScheduledTaskCreatedEvent struct { ScheduledTaskEvent } func init() { t["ScheduledTaskCreatedEvent"] = reflect.TypeOf((*ScheduledTaskCreatedEvent)(nil)).Elem() } type ScheduledTaskDescription struct { DynamicData Action []BaseTypeDescription `xml:"action,typeattr"` SchedulerInfo []ScheduledTaskDetail `xml:"schedulerInfo"` State []BaseElementDescription `xml:"state,typeattr"` DayOfWeek []BaseElementDescription `xml:"dayOfWeek,typeattr"` WeekOfMonth []BaseElementDescription `xml:"weekOfMonth,typeattr"` } func init() { t["ScheduledTaskDescription"] = reflect.TypeOf((*ScheduledTaskDescription)(nil)).Elem() } type ScheduledTaskDetail struct { TypeDescription Frequency string `xml:"frequency"` } func init() { t["ScheduledTaskDetail"] = reflect.TypeOf((*ScheduledTaskDetail)(nil)).Elem() } type ScheduledTaskEmailCompletedEvent struct { ScheduledTaskEvent To string `xml:"to"` } func init() { t["ScheduledTaskEmailCompletedEvent"] = reflect.TypeOf((*ScheduledTaskEmailCompletedEvent)(nil)).Elem() } type ScheduledTaskEmailFailedEvent struct { ScheduledTaskEvent To string `xml:"to"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["ScheduledTaskEmailFailedEvent"] = reflect.TypeOf((*ScheduledTaskEmailFailedEvent)(nil)).Elem() } type ScheduledTaskEvent struct { Event ScheduledTask ScheduledTaskEventArgument `xml:"scheduledTask"` Entity ManagedEntityEventArgument `xml:"entity"` } func init() { t["ScheduledTaskEvent"] = reflect.TypeOf((*ScheduledTaskEvent)(nil)).Elem() } type ScheduledTaskEventArgument struct { EntityEventArgument ScheduledTask ManagedObjectReference `xml:"scheduledTask"` } func init() { t["ScheduledTaskEventArgument"] = reflect.TypeOf((*ScheduledTaskEventArgument)(nil)).Elem() } type ScheduledTaskFailedEvent struct { ScheduledTaskEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["ScheduledTaskFailedEvent"] = reflect.TypeOf((*ScheduledTaskFailedEvent)(nil)).Elem() } type ScheduledTaskInfo struct { ScheduledTaskSpec ScheduledTask ManagedObjectReference `xml:"scheduledTask"` Entity ManagedObjectReference `xml:"entity"` LastModifiedTime time.Time `xml:"lastModifiedTime"` LastModifiedUser string `xml:"lastModifiedUser"` NextRunTime *time.Time `xml:"nextRunTime"` PrevRunTime *time.Time `xml:"prevRunTime"` State TaskInfoState `xml:"state"` Error *LocalizedMethodFault `xml:"error,omitempty"` Result AnyType `xml:"result,omitempty,typeattr"` Progress int32 `xml:"progress,omitempty"` ActiveTask *ManagedObjectReference `xml:"activeTask,omitempty"` TaskObject *ManagedObjectReference `xml:"taskObject,omitempty"` } func init() { t["ScheduledTaskInfo"] = reflect.TypeOf((*ScheduledTaskInfo)(nil)).Elem() } type ScheduledTaskReconfiguredEvent struct { ScheduledTaskEvent ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["ScheduledTaskReconfiguredEvent"] = reflect.TypeOf((*ScheduledTaskReconfiguredEvent)(nil)).Elem() } type ScheduledTaskRemovedEvent struct { ScheduledTaskEvent } func init() { t["ScheduledTaskRemovedEvent"] = reflect.TypeOf((*ScheduledTaskRemovedEvent)(nil)).Elem() } type ScheduledTaskSpec struct { DynamicData Name string `xml:"name"` Description string `xml:"description"` Enabled bool `xml:"enabled"` Scheduler BaseTaskScheduler `xml:"scheduler,typeattr"` Action BaseAction `xml:"action,typeattr"` Notification string `xml:"notification,omitempty"` } func init() { t["ScheduledTaskSpec"] = reflect.TypeOf((*ScheduledTaskSpec)(nil)).Elem() } type ScheduledTaskStartedEvent struct { ScheduledTaskEvent } func init() { t["ScheduledTaskStartedEvent"] = reflect.TypeOf((*ScheduledTaskStartedEvent)(nil)).Elem() } type ScsiLun struct { HostDevice Key string `xml:"key,omitempty"` Uuid string `xml:"uuid"` Descriptor []ScsiLunDescriptor `xml:"descriptor,omitempty"` CanonicalName string `xml:"canonicalName,omitempty"` DisplayName string `xml:"displayName,omitempty"` LunType string `xml:"lunType"` Vendor string `xml:"vendor,omitempty"` Model string `xml:"model,omitempty"` Revision string `xml:"revision,omitempty"` ScsiLevel int32 `xml:"scsiLevel,omitempty"` SerialNumber string `xml:"serialNumber,omitempty"` DurableName *ScsiLunDurableName `xml:"durableName,omitempty"` AlternateName []ScsiLunDurableName `xml:"alternateName,omitempty"` StandardInquiry []byte `xml:"standardInquiry,omitempty"` QueueDepth int32 `xml:"queueDepth,omitempty"` OperationalState []string `xml:"operationalState"` Capabilities *ScsiLunCapabilities `xml:"capabilities,omitempty"` VStorageSupport string `xml:"vStorageSupport,omitempty"` ProtocolEndpoint *bool `xml:"protocolEndpoint"` } func init() { t["ScsiLun"] = reflect.TypeOf((*ScsiLun)(nil)).Elem() } type ScsiLunCapabilities struct { DynamicData UpdateDisplayNameSupported bool `xml:"updateDisplayNameSupported"` } func init() { t["ScsiLunCapabilities"] = reflect.TypeOf((*ScsiLunCapabilities)(nil)).Elem() } type ScsiLunDescriptor struct { DynamicData Quality string `xml:"quality"` Id string `xml:"id"` } func init() { t["ScsiLunDescriptor"] = reflect.TypeOf((*ScsiLunDescriptor)(nil)).Elem() } type ScsiLunDurableName struct { DynamicData Namespace string `xml:"namespace"` NamespaceId byte `xml:"namespaceId"` Data []byte `xml:"data,omitempty"` } func init() { t["ScsiLunDurableName"] = reflect.TypeOf((*ScsiLunDurableName)(nil)).Elem() } type SeSparseVirtualDiskSpec struct { FileBackedVirtualDiskSpec GrainSizeKb int32 `xml:"grainSizeKb,omitempty"` } func init() { t["SeSparseVirtualDiskSpec"] = reflect.TypeOf((*SeSparseVirtualDiskSpec)(nil)).Elem() } type SearchDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` DatastorePath string `xml:"datastorePath"` SearchSpec *HostDatastoreBrowserSearchSpec `xml:"searchSpec,omitempty"` } func init() { t["SearchDatastoreRequestType"] = reflect.TypeOf((*SearchDatastoreRequestType)(nil)).Elem() } type SearchDatastoreSubFoldersRequestType struct { This ManagedObjectReference `xml:"_this"` DatastorePath string `xml:"datastorePath"` SearchSpec *HostDatastoreBrowserSearchSpec `xml:"searchSpec,omitempty"` } func init() { t["SearchDatastoreSubFoldersRequestType"] = reflect.TypeOf((*SearchDatastoreSubFoldersRequestType)(nil)).Elem() } type SearchDatastoreSubFolders_Task SearchDatastoreSubFoldersRequestType func init() { t["SearchDatastoreSubFolders_Task"] = reflect.TypeOf((*SearchDatastoreSubFolders_Task)(nil)).Elem() } type SearchDatastoreSubFolders_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type SearchDatastore_Task SearchDatastoreRequestType func init() { t["SearchDatastore_Task"] = reflect.TypeOf((*SearchDatastore_Task)(nil)).Elem() } type SearchDatastore_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type SecondaryVmAlreadyDisabled struct { VmFaultToleranceIssue InstanceUuid string `xml:"instanceUuid"` } func init() { t["SecondaryVmAlreadyDisabled"] = reflect.TypeOf((*SecondaryVmAlreadyDisabled)(nil)).Elem() } type SecondaryVmAlreadyDisabledFault SecondaryVmAlreadyDisabled func init() { t["SecondaryVmAlreadyDisabledFault"] = reflect.TypeOf((*SecondaryVmAlreadyDisabledFault)(nil)).Elem() } type SecondaryVmAlreadyEnabled struct { VmFaultToleranceIssue InstanceUuid string `xml:"instanceUuid"` } func init() { t["SecondaryVmAlreadyEnabled"] = reflect.TypeOf((*SecondaryVmAlreadyEnabled)(nil)).Elem() } type SecondaryVmAlreadyEnabledFault SecondaryVmAlreadyEnabled func init() { t["SecondaryVmAlreadyEnabledFault"] = reflect.TypeOf((*SecondaryVmAlreadyEnabledFault)(nil)).Elem() } type SecondaryVmAlreadyRegistered struct { VmFaultToleranceIssue InstanceUuid string `xml:"instanceUuid,omitempty"` } func init() { t["SecondaryVmAlreadyRegistered"] = reflect.TypeOf((*SecondaryVmAlreadyRegistered)(nil)).Elem() } type SecondaryVmAlreadyRegisteredFault SecondaryVmAlreadyRegistered func init() { t["SecondaryVmAlreadyRegisteredFault"] = reflect.TypeOf((*SecondaryVmAlreadyRegisteredFault)(nil)).Elem() } type SecondaryVmNotRegistered struct { VmFaultToleranceIssue InstanceUuid string `xml:"instanceUuid,omitempty"` } func init() { t["SecondaryVmNotRegistered"] = reflect.TypeOf((*SecondaryVmNotRegistered)(nil)).Elem() } type SecondaryVmNotRegisteredFault SecondaryVmNotRegistered func init() { t["SecondaryVmNotRegisteredFault"] = reflect.TypeOf((*SecondaryVmNotRegisteredFault)(nil)).Elem() } type SecurityError struct { RuntimeFault } func init() { t["SecurityError"] = reflect.TypeOf((*SecurityError)(nil)).Elem() } type SecurityErrorFault BaseSecurityError func init() { t["SecurityErrorFault"] = reflect.TypeOf((*SecurityErrorFault)(nil)).Elem() } type SecurityProfile struct { ApplyProfile Permission []PermissionProfile `xml:"permission,omitempty"` } func init() { t["SecurityProfile"] = reflect.TypeOf((*SecurityProfile)(nil)).Elem() } type SelectActivePartition SelectActivePartitionRequestType func init() { t["SelectActivePartition"] = reflect.TypeOf((*SelectActivePartition)(nil)).Elem() } type SelectActivePartitionRequestType struct { This ManagedObjectReference `xml:"_this"` Partition *HostScsiDiskPartition `xml:"partition,omitempty"` } func init() { t["SelectActivePartitionRequestType"] = reflect.TypeOf((*SelectActivePartitionRequestType)(nil)).Elem() } type SelectActivePartitionResponse struct { } type SelectVnic SelectVnicRequestType func init() { t["SelectVnic"] = reflect.TypeOf((*SelectVnic)(nil)).Elem() } type SelectVnicForNicType SelectVnicForNicTypeRequestType func init() { t["SelectVnicForNicType"] = reflect.TypeOf((*SelectVnicForNicType)(nil)).Elem() } type SelectVnicForNicTypeRequestType struct { This ManagedObjectReference `xml:"_this"` NicType string `xml:"nicType"` Device string `xml:"device"` } func init() { t["SelectVnicForNicTypeRequestType"] = reflect.TypeOf((*SelectVnicForNicTypeRequestType)(nil)).Elem() } type SelectVnicForNicTypeResponse struct { } type SelectVnicRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` } func init() { t["SelectVnicRequestType"] = reflect.TypeOf((*SelectVnicRequestType)(nil)).Elem() } type SelectVnicResponse struct { } type SelectionSet struct { DynamicData } func init() { t["SelectionSet"] = reflect.TypeOf((*SelectionSet)(nil)).Elem() } type SelectionSpec struct { DynamicData Name string `xml:"name,omitempty"` } func init() { t["SelectionSpec"] = reflect.TypeOf((*SelectionSpec)(nil)).Elem() } type SendEmailAction struct { Action ToList string `xml:"toList"` CcList string `xml:"ccList"` Subject string `xml:"subject"` Body string `xml:"body"` } func init() { t["SendEmailAction"] = reflect.TypeOf((*SendEmailAction)(nil)).Elem() } type SendNMI SendNMIRequestType func init() { t["SendNMI"] = reflect.TypeOf((*SendNMI)(nil)).Elem() } type SendNMIRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["SendNMIRequestType"] = reflect.TypeOf((*SendNMIRequestType)(nil)).Elem() } type SendNMIResponse struct { } type SendSNMPAction struct { Action } func init() { t["SendSNMPAction"] = reflect.TypeOf((*SendSNMPAction)(nil)).Elem() } type SendTestNotification SendTestNotificationRequestType func init() { t["SendTestNotification"] = reflect.TypeOf((*SendTestNotification)(nil)).Elem() } type SendTestNotificationRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["SendTestNotificationRequestType"] = reflect.TypeOf((*SendTestNotificationRequestType)(nil)).Elem() } type SendTestNotificationResponse struct { } type ServerLicenseExpiredEvent struct { LicenseEvent Product string `xml:"product"` } func init() { t["ServerLicenseExpiredEvent"] = reflect.TypeOf((*ServerLicenseExpiredEvent)(nil)).Elem() } type ServerStartedSessionEvent struct { SessionEvent } func init() { t["ServerStartedSessionEvent"] = reflect.TypeOf((*ServerStartedSessionEvent)(nil)).Elem() } type ServiceConsolePortGroupProfile struct { PortGroupProfile IpConfig IpAddressProfile `xml:"ipConfig"` } func init() { t["ServiceConsolePortGroupProfile"] = reflect.TypeOf((*ServiceConsolePortGroupProfile)(nil)).Elem() } type ServiceConsoleReservationInfo struct { DynamicData ServiceConsoleReservedCfg int64 `xml:"serviceConsoleReservedCfg"` ServiceConsoleReserved int64 `xml:"serviceConsoleReserved"` Unreserved int64 `xml:"unreserved"` } func init() { t["ServiceConsoleReservationInfo"] = reflect.TypeOf((*ServiceConsoleReservationInfo)(nil)).Elem() } type ServiceContent struct { DynamicData RootFolder ManagedObjectReference `xml:"rootFolder"` PropertyCollector ManagedObjectReference `xml:"propertyCollector"` ViewManager *ManagedObjectReference `xml:"viewManager,omitempty"` About AboutInfo `xml:"about"` Setting *ManagedObjectReference `xml:"setting,omitempty"` UserDirectory *ManagedObjectReference `xml:"userDirectory,omitempty"` SessionManager *ManagedObjectReference `xml:"sessionManager,omitempty"` AuthorizationManager *ManagedObjectReference `xml:"authorizationManager,omitempty"` ServiceManager *ManagedObjectReference `xml:"serviceManager,omitempty"` PerfManager *ManagedObjectReference `xml:"perfManager,omitempty"` ScheduledTaskManager *ManagedObjectReference `xml:"scheduledTaskManager,omitempty"` AlarmManager *ManagedObjectReference `xml:"alarmManager,omitempty"` EventManager *ManagedObjectReference `xml:"eventManager,omitempty"` TaskManager *ManagedObjectReference `xml:"taskManager,omitempty"` ExtensionManager *ManagedObjectReference `xml:"extensionManager,omitempty"` CustomizationSpecManager *ManagedObjectReference `xml:"customizationSpecManager,omitempty"` CustomFieldsManager *ManagedObjectReference `xml:"customFieldsManager,omitempty"` AccountManager *ManagedObjectReference `xml:"accountManager,omitempty"` DiagnosticManager *ManagedObjectReference `xml:"diagnosticManager,omitempty"` LicenseManager *ManagedObjectReference `xml:"licenseManager,omitempty"` SearchIndex *ManagedObjectReference `xml:"searchIndex,omitempty"` FileManager *ManagedObjectReference `xml:"fileManager,omitempty"` DatastoreNamespaceManager *ManagedObjectReference `xml:"datastoreNamespaceManager,omitempty"` VirtualDiskManager *ManagedObjectReference `xml:"virtualDiskManager,omitempty"` VirtualizationManager *ManagedObjectReference `xml:"virtualizationManager,omitempty"` SnmpSystem *ManagedObjectReference `xml:"snmpSystem,omitempty"` VmProvisioningChecker *ManagedObjectReference `xml:"vmProvisioningChecker,omitempty"` VmCompatibilityChecker *ManagedObjectReference `xml:"vmCompatibilityChecker,omitempty"` OvfManager *ManagedObjectReference `xml:"ovfManager,omitempty"` IpPoolManager *ManagedObjectReference `xml:"ipPoolManager,omitempty"` DvSwitchManager *ManagedObjectReference `xml:"dvSwitchManager,omitempty"` HostProfileManager *ManagedObjectReference `xml:"hostProfileManager,omitempty"` ClusterProfileManager *ManagedObjectReference `xml:"clusterProfileManager,omitempty"` ComplianceManager *ManagedObjectReference `xml:"complianceManager,omitempty"` LocalizationManager *ManagedObjectReference `xml:"localizationManager,omitempty"` StorageResourceManager *ManagedObjectReference `xml:"storageResourceManager,omitempty"` GuestOperationsManager *ManagedObjectReference `xml:"guestOperationsManager,omitempty"` OverheadMemoryManager *ManagedObjectReference `xml:"overheadMemoryManager,omitempty"` CertificateManager *ManagedObjectReference `xml:"certificateManager,omitempty"` IoFilterManager *ManagedObjectReference `xml:"ioFilterManager,omitempty"` VStorageObjectManager *ManagedObjectReference `xml:"vStorageObjectManager,omitempty"` HostSpecManager *ManagedObjectReference `xml:"hostSpecManager,omitempty"` CryptoManager *ManagedObjectReference `xml:"cryptoManager,omitempty"` HealthUpdateManager *ManagedObjectReference `xml:"healthUpdateManager,omitempty"` FailoverClusterConfigurator *ManagedObjectReference `xml:"failoverClusterConfigurator,omitempty"` FailoverClusterManager *ManagedObjectReference `xml:"failoverClusterManager,omitempty"` } func init() { t["ServiceContent"] = reflect.TypeOf((*ServiceContent)(nil)).Elem() } type ServiceLocator struct { DynamicData InstanceUuid string `xml:"instanceUuid"` Url string `xml:"url"` Credential BaseServiceLocatorCredential `xml:"credential,typeattr"` SslThumbprint string `xml:"sslThumbprint,omitempty"` } func init() { t["ServiceLocator"] = reflect.TypeOf((*ServiceLocator)(nil)).Elem() } type ServiceLocatorCredential struct { DynamicData } func init() { t["ServiceLocatorCredential"] = reflect.TypeOf((*ServiceLocatorCredential)(nil)).Elem() } type ServiceLocatorNamePassword struct { ServiceLocatorCredential Username string `xml:"username"` Password string `xml:"password"` } func init() { t["ServiceLocatorNamePassword"] = reflect.TypeOf((*ServiceLocatorNamePassword)(nil)).Elem() } type ServiceLocatorSAMLCredential struct { ServiceLocatorCredential Token string `xml:"token,omitempty"` } func init() { t["ServiceLocatorSAMLCredential"] = reflect.TypeOf((*ServiceLocatorSAMLCredential)(nil)).Elem() } type ServiceManagerServiceInfo struct { DynamicData ServiceName string `xml:"serviceName"` Location []string `xml:"location,omitempty"` Service ManagedObjectReference `xml:"service"` Description string `xml:"description"` } func init() { t["ServiceManagerServiceInfo"] = reflect.TypeOf((*ServiceManagerServiceInfo)(nil)).Elem() } type ServiceProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["ServiceProfile"] = reflect.TypeOf((*ServiceProfile)(nil)).Elem() } type SessionEvent struct { Event } func init() { t["SessionEvent"] = reflect.TypeOf((*SessionEvent)(nil)).Elem() } type SessionIsActive SessionIsActiveRequestType func init() { t["SessionIsActive"] = reflect.TypeOf((*SessionIsActive)(nil)).Elem() } type SessionIsActiveRequestType struct { This ManagedObjectReference `xml:"_this"` SessionID string `xml:"sessionID"` UserName string `xml:"userName"` } func init() { t["SessionIsActiveRequestType"] = reflect.TypeOf((*SessionIsActiveRequestType)(nil)).Elem() } type SessionIsActiveResponse struct { Returnval bool `xml:"returnval"` } type SessionManagerGenericServiceTicket struct { DynamicData Id string `xml:"id"` HostName string `xml:"hostName,omitempty"` SslThumbprint string `xml:"sslThumbprint,omitempty"` } func init() { t["SessionManagerGenericServiceTicket"] = reflect.TypeOf((*SessionManagerGenericServiceTicket)(nil)).Elem() } type SessionManagerHttpServiceRequestSpec struct { SessionManagerServiceRequestSpec Method string `xml:"method,omitempty"` Url string `xml:"url"` } func init() { t["SessionManagerHttpServiceRequestSpec"] = reflect.TypeOf((*SessionManagerHttpServiceRequestSpec)(nil)).Elem() } type SessionManagerLocalTicket struct { DynamicData UserName string `xml:"userName"` PasswordFilePath string `xml:"passwordFilePath"` } func init() { t["SessionManagerLocalTicket"] = reflect.TypeOf((*SessionManagerLocalTicket)(nil)).Elem() } type SessionManagerServiceRequestSpec struct { DynamicData } func init() { t["SessionManagerServiceRequestSpec"] = reflect.TypeOf((*SessionManagerServiceRequestSpec)(nil)).Elem() } type SessionManagerVmomiServiceRequestSpec struct { SessionManagerServiceRequestSpec Method string `xml:"method"` } func init() { t["SessionManagerVmomiServiceRequestSpec"] = reflect.TypeOf((*SessionManagerVmomiServiceRequestSpec)(nil)).Elem() } type SessionTerminatedEvent struct { SessionEvent SessionId string `xml:"sessionId"` TerminatedUsername string `xml:"terminatedUsername"` } func init() { t["SessionTerminatedEvent"] = reflect.TypeOf((*SessionTerminatedEvent)(nil)).Elem() } type SetCollectorPageSize SetCollectorPageSizeRequestType func init() { t["SetCollectorPageSize"] = reflect.TypeOf((*SetCollectorPageSize)(nil)).Elem() } type SetCollectorPageSizeRequestType struct { This ManagedObjectReference `xml:"_this"` MaxCount int32 `xml:"maxCount"` } func init() { t["SetCollectorPageSizeRequestType"] = reflect.TypeOf((*SetCollectorPageSizeRequestType)(nil)).Elem() } type SetCollectorPageSizeResponse struct { } type SetDisplayTopology SetDisplayTopologyRequestType func init() { t["SetDisplayTopology"] = reflect.TypeOf((*SetDisplayTopology)(nil)).Elem() } type SetDisplayTopologyRequestType struct { This ManagedObjectReference `xml:"_this"` Displays []VirtualMachineDisplayTopology `xml:"displays"` } func init() { t["SetDisplayTopologyRequestType"] = reflect.TypeOf((*SetDisplayTopologyRequestType)(nil)).Elem() } type SetDisplayTopologyResponse struct { } type SetEntityPermissions SetEntityPermissionsRequestType func init() { t["SetEntityPermissions"] = reflect.TypeOf((*SetEntityPermissions)(nil)).Elem() } type SetEntityPermissionsRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Permission []Permission `xml:"permission,omitempty"` } func init() { t["SetEntityPermissionsRequestType"] = reflect.TypeOf((*SetEntityPermissionsRequestType)(nil)).Elem() } type SetEntityPermissionsResponse struct { } type SetExtensionCertificate SetExtensionCertificateRequestType func init() { t["SetExtensionCertificate"] = reflect.TypeOf((*SetExtensionCertificate)(nil)).Elem() } type SetExtensionCertificateRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` CertificatePem string `xml:"certificatePem,omitempty"` } func init() { t["SetExtensionCertificateRequestType"] = reflect.TypeOf((*SetExtensionCertificateRequestType)(nil)).Elem() } type SetExtensionCertificateResponse struct { } type SetField SetFieldRequestType func init() { t["SetField"] = reflect.TypeOf((*SetField)(nil)).Elem() } type SetFieldRequestType struct { This ManagedObjectReference `xml:"_this"` Entity ManagedObjectReference `xml:"entity"` Key int32 `xml:"key"` Value string `xml:"value"` } func init() { t["SetFieldRequestType"] = reflect.TypeOf((*SetFieldRequestType)(nil)).Elem() } type SetFieldResponse struct { } type SetLicenseEdition SetLicenseEditionRequestType func init() { t["SetLicenseEdition"] = reflect.TypeOf((*SetLicenseEdition)(nil)).Elem() } type SetLicenseEditionRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` FeatureKey string `xml:"featureKey,omitempty"` } func init() { t["SetLicenseEditionRequestType"] = reflect.TypeOf((*SetLicenseEditionRequestType)(nil)).Elem() } type SetLicenseEditionResponse struct { } type SetLocale SetLocaleRequestType func init() { t["SetLocale"] = reflect.TypeOf((*SetLocale)(nil)).Elem() } type SetLocaleRequestType struct { This ManagedObjectReference `xml:"_this"` Locale string `xml:"locale"` } func init() { t["SetLocaleRequestType"] = reflect.TypeOf((*SetLocaleRequestType)(nil)).Elem() } type SetLocaleResponse struct { } type SetMultipathLunPolicy SetMultipathLunPolicyRequestType func init() { t["SetMultipathLunPolicy"] = reflect.TypeOf((*SetMultipathLunPolicy)(nil)).Elem() } type SetMultipathLunPolicyRequestType struct { This ManagedObjectReference `xml:"_this"` LunId string `xml:"lunId"` Policy BaseHostMultipathInfoLogicalUnitPolicy `xml:"policy,typeattr"` } func init() { t["SetMultipathLunPolicyRequestType"] = reflect.TypeOf((*SetMultipathLunPolicyRequestType)(nil)).Elem() } type SetMultipathLunPolicyResponse struct { } type SetNFSUser SetNFSUserRequestType func init() { t["SetNFSUser"] = reflect.TypeOf((*SetNFSUser)(nil)).Elem() } type SetNFSUserRequestType struct { This ManagedObjectReference `xml:"_this"` User string `xml:"user"` Password string `xml:"password"` } func init() { t["SetNFSUserRequestType"] = reflect.TypeOf((*SetNFSUserRequestType)(nil)).Elem() } type SetNFSUserResponse struct { } type SetPublicKey SetPublicKeyRequestType func init() { t["SetPublicKey"] = reflect.TypeOf((*SetPublicKey)(nil)).Elem() } type SetPublicKeyRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` PublicKey string `xml:"publicKey"` } func init() { t["SetPublicKeyRequestType"] = reflect.TypeOf((*SetPublicKeyRequestType)(nil)).Elem() } type SetPublicKeyResponse struct { } type SetRegistryValueInGuest SetRegistryValueInGuestRequestType func init() { t["SetRegistryValueInGuest"] = reflect.TypeOf((*SetRegistryValueInGuest)(nil)).Elem() } type SetRegistryValueInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Value GuestRegValueSpec `xml:"value"` } func init() { t["SetRegistryValueInGuestRequestType"] = reflect.TypeOf((*SetRegistryValueInGuestRequestType)(nil)).Elem() } type SetRegistryValueInGuestResponse struct { } type SetScreenResolution SetScreenResolutionRequestType func init() { t["SetScreenResolution"] = reflect.TypeOf((*SetScreenResolution)(nil)).Elem() } type SetScreenResolutionRequestType struct { This ManagedObjectReference `xml:"_this"` Width int32 `xml:"width"` Height int32 `xml:"height"` } func init() { t["SetScreenResolutionRequestType"] = reflect.TypeOf((*SetScreenResolutionRequestType)(nil)).Elem() } type SetScreenResolutionResponse struct { } type SetTaskDescription SetTaskDescriptionRequestType func init() { t["SetTaskDescription"] = reflect.TypeOf((*SetTaskDescription)(nil)).Elem() } type SetTaskDescriptionRequestType struct { This ManagedObjectReference `xml:"_this"` Description LocalizableMessage `xml:"description"` } func init() { t["SetTaskDescriptionRequestType"] = reflect.TypeOf((*SetTaskDescriptionRequestType)(nil)).Elem() } type SetTaskDescriptionResponse struct { } type SetTaskState SetTaskStateRequestType func init() { t["SetTaskState"] = reflect.TypeOf((*SetTaskState)(nil)).Elem() } type SetTaskStateRequestType struct { This ManagedObjectReference `xml:"_this"` State TaskInfoState `xml:"state"` Result AnyType `xml:"result,omitempty,typeattr"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["SetTaskStateRequestType"] = reflect.TypeOf((*SetTaskStateRequestType)(nil)).Elem() } type SetTaskStateResponse struct { } type SetVirtualDiskUuid SetVirtualDiskUuidRequestType func init() { t["SetVirtualDiskUuid"] = reflect.TypeOf((*SetVirtualDiskUuid)(nil)).Elem() } type SetVirtualDiskUuidRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Uuid string `xml:"uuid"` } func init() { t["SetVirtualDiskUuidRequestType"] = reflect.TypeOf((*SetVirtualDiskUuidRequestType)(nil)).Elem() } type SetVirtualDiskUuidResponse struct { } type SharedBusControllerNotSupported struct { DeviceNotSupported } func init() { t["SharedBusControllerNotSupported"] = reflect.TypeOf((*SharedBusControllerNotSupported)(nil)).Elem() } type SharedBusControllerNotSupportedFault SharedBusControllerNotSupported func init() { t["SharedBusControllerNotSupportedFault"] = reflect.TypeOf((*SharedBusControllerNotSupportedFault)(nil)).Elem() } type SharesInfo struct { DynamicData Shares int32 `xml:"shares"` Level SharesLevel `xml:"level"` } func init() { t["SharesInfo"] = reflect.TypeOf((*SharesInfo)(nil)).Elem() } type SharesOption struct { DynamicData SharesOption IntOption `xml:"sharesOption"` DefaultLevel SharesLevel `xml:"defaultLevel"` } func init() { t["SharesOption"] = reflect.TypeOf((*SharesOption)(nil)).Elem() } type ShrinkDiskFault struct { VimFault DiskId int32 `xml:"diskId,omitempty"` } func init() { t["ShrinkDiskFault"] = reflect.TypeOf((*ShrinkDiskFault)(nil)).Elem() } type ShrinkDiskFaultFault ShrinkDiskFault func init() { t["ShrinkDiskFaultFault"] = reflect.TypeOf((*ShrinkDiskFaultFault)(nil)).Elem() } type ShrinkVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` Copy *bool `xml:"copy"` } func init() { t["ShrinkVirtualDiskRequestType"] = reflect.TypeOf((*ShrinkVirtualDiskRequestType)(nil)).Elem() } type ShrinkVirtualDisk_Task ShrinkVirtualDiskRequestType func init() { t["ShrinkVirtualDisk_Task"] = reflect.TypeOf((*ShrinkVirtualDisk_Task)(nil)).Elem() } type ShrinkVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type ShutdownGuest ShutdownGuestRequestType func init() { t["ShutdownGuest"] = reflect.TypeOf((*ShutdownGuest)(nil)).Elem() } type ShutdownGuestRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["ShutdownGuestRequestType"] = reflect.TypeOf((*ShutdownGuestRequestType)(nil)).Elem() } type ShutdownGuestResponse struct { } type ShutdownHostRequestType struct { This ManagedObjectReference `xml:"_this"` Force bool `xml:"force"` } func init() { t["ShutdownHostRequestType"] = reflect.TypeOf((*ShutdownHostRequestType)(nil)).Elem() } type ShutdownHost_Task ShutdownHostRequestType func init() { t["ShutdownHost_Task"] = reflect.TypeOf((*ShutdownHost_Task)(nil)).Elem() } type ShutdownHost_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type SingleIp struct { IpAddress Address string `xml:"address"` } func init() { t["SingleIp"] = reflect.TypeOf((*SingleIp)(nil)).Elem() } type SingleMac struct { MacAddress Address string `xml:"address"` } func init() { t["SingleMac"] = reflect.TypeOf((*SingleMac)(nil)).Elem() } type SnapshotCloneNotSupported struct { SnapshotCopyNotSupported } func init() { t["SnapshotCloneNotSupported"] = reflect.TypeOf((*SnapshotCloneNotSupported)(nil)).Elem() } type SnapshotCloneNotSupportedFault SnapshotCloneNotSupported func init() { t["SnapshotCloneNotSupportedFault"] = reflect.TypeOf((*SnapshotCloneNotSupportedFault)(nil)).Elem() } type SnapshotCopyNotSupported struct { MigrationFault } func init() { t["SnapshotCopyNotSupported"] = reflect.TypeOf((*SnapshotCopyNotSupported)(nil)).Elem() } type SnapshotCopyNotSupportedFault BaseSnapshotCopyNotSupported func init() { t["SnapshotCopyNotSupportedFault"] = reflect.TypeOf((*SnapshotCopyNotSupportedFault)(nil)).Elem() } type SnapshotDisabled struct { SnapshotFault } func init() { t["SnapshotDisabled"] = reflect.TypeOf((*SnapshotDisabled)(nil)).Elem() } type SnapshotDisabledFault SnapshotDisabled func init() { t["SnapshotDisabledFault"] = reflect.TypeOf((*SnapshotDisabledFault)(nil)).Elem() } type SnapshotFault struct { VimFault } func init() { t["SnapshotFault"] = reflect.TypeOf((*SnapshotFault)(nil)).Elem() } type SnapshotFaultFault BaseSnapshotFault func init() { t["SnapshotFaultFault"] = reflect.TypeOf((*SnapshotFaultFault)(nil)).Elem() } type SnapshotIncompatibleDeviceInVm struct { SnapshotFault Fault LocalizedMethodFault `xml:"fault"` } func init() { t["SnapshotIncompatibleDeviceInVm"] = reflect.TypeOf((*SnapshotIncompatibleDeviceInVm)(nil)).Elem() } type SnapshotIncompatibleDeviceInVmFault SnapshotIncompatibleDeviceInVm func init() { t["SnapshotIncompatibleDeviceInVmFault"] = reflect.TypeOf((*SnapshotIncompatibleDeviceInVmFault)(nil)).Elem() } type SnapshotLocked struct { SnapshotFault } func init() { t["SnapshotLocked"] = reflect.TypeOf((*SnapshotLocked)(nil)).Elem() } type SnapshotLockedFault SnapshotLocked func init() { t["SnapshotLockedFault"] = reflect.TypeOf((*SnapshotLockedFault)(nil)).Elem() } type SnapshotMoveFromNonHomeNotSupported struct { SnapshotCopyNotSupported } func init() { t["SnapshotMoveFromNonHomeNotSupported"] = reflect.TypeOf((*SnapshotMoveFromNonHomeNotSupported)(nil)).Elem() } type SnapshotMoveFromNonHomeNotSupportedFault SnapshotMoveFromNonHomeNotSupported func init() { t["SnapshotMoveFromNonHomeNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveFromNonHomeNotSupportedFault)(nil)).Elem() } type SnapshotMoveNotSupported struct { SnapshotCopyNotSupported } func init() { t["SnapshotMoveNotSupported"] = reflect.TypeOf((*SnapshotMoveNotSupported)(nil)).Elem() } type SnapshotMoveNotSupportedFault SnapshotMoveNotSupported func init() { t["SnapshotMoveNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveNotSupportedFault)(nil)).Elem() } type SnapshotMoveToNonHomeNotSupported struct { SnapshotCopyNotSupported } func init() { t["SnapshotMoveToNonHomeNotSupported"] = reflect.TypeOf((*SnapshotMoveToNonHomeNotSupported)(nil)).Elem() } type SnapshotMoveToNonHomeNotSupportedFault SnapshotMoveToNonHomeNotSupported func init() { t["SnapshotMoveToNonHomeNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveToNonHomeNotSupportedFault)(nil)).Elem() } type SnapshotNoChange struct { SnapshotFault } func init() { t["SnapshotNoChange"] = reflect.TypeOf((*SnapshotNoChange)(nil)).Elem() } type SnapshotNoChangeFault SnapshotNoChange func init() { t["SnapshotNoChangeFault"] = reflect.TypeOf((*SnapshotNoChangeFault)(nil)).Elem() } type SnapshotRevertIssue struct { MigrationFault SnapshotName string `xml:"snapshotName,omitempty"` Event []BaseEvent `xml:"event,omitempty,typeattr"` Errors bool `xml:"errors"` } func init() { t["SnapshotRevertIssue"] = reflect.TypeOf((*SnapshotRevertIssue)(nil)).Elem() } type SnapshotRevertIssueFault SnapshotRevertIssue func init() { t["SnapshotRevertIssueFault"] = reflect.TypeOf((*SnapshotRevertIssueFault)(nil)).Elem() } type SoftRuleVioCorrectionDisallowed struct { VmConfigFault VmName string `xml:"vmName"` } func init() { t["SoftRuleVioCorrectionDisallowed"] = reflect.TypeOf((*SoftRuleVioCorrectionDisallowed)(nil)).Elem() } type SoftRuleVioCorrectionDisallowedFault SoftRuleVioCorrectionDisallowed func init() { t["SoftRuleVioCorrectionDisallowedFault"] = reflect.TypeOf((*SoftRuleVioCorrectionDisallowedFault)(nil)).Elem() } type SoftRuleVioCorrectionImpact struct { VmConfigFault VmName string `xml:"vmName"` } func init() { t["SoftRuleVioCorrectionImpact"] = reflect.TypeOf((*SoftRuleVioCorrectionImpact)(nil)).Elem() } type SoftRuleVioCorrectionImpactFault SoftRuleVioCorrectionImpact func init() { t["SoftRuleVioCorrectionImpactFault"] = reflect.TypeOf((*SoftRuleVioCorrectionImpactFault)(nil)).Elem() } type SoftwarePackage struct { DynamicData Name string `xml:"name"` Version string `xml:"version"` Type string `xml:"type"` Vendor string `xml:"vendor"` AcceptanceLevel string `xml:"acceptanceLevel"` Summary string `xml:"summary"` Description string `xml:"description"` ReferenceURL []string `xml:"referenceURL,omitempty"` CreationDate *time.Time `xml:"creationDate"` Depends []Relation `xml:"depends,omitempty"` Conflicts []Relation `xml:"conflicts,omitempty"` Replaces []Relation `xml:"replaces,omitempty"` Provides []string `xml:"provides,omitempty"` MaintenanceModeRequired *bool `xml:"maintenanceModeRequired"` HardwarePlatformsRequired []string `xml:"hardwarePlatformsRequired,omitempty"` Capability SoftwarePackageCapability `xml:"capability"` Tag []string `xml:"tag,omitempty"` Payload []string `xml:"payload,omitempty"` } func init() { t["SoftwarePackage"] = reflect.TypeOf((*SoftwarePackage)(nil)).Elem() } type SoftwarePackageCapability struct { DynamicData LiveInstallAllowed *bool `xml:"liveInstallAllowed"` LiveRemoveAllowed *bool `xml:"liveRemoveAllowed"` StatelessReady *bool `xml:"statelessReady"` Overlay *bool `xml:"overlay"` } func init() { t["SoftwarePackageCapability"] = reflect.TypeOf((*SoftwarePackageCapability)(nil)).Elem() } type SourceNodeSpec struct { DynamicData ManagementVc ServiceLocator `xml:"managementVc"` ActiveVc ManagedObjectReference `xml:"activeVc"` } func init() { t["SourceNodeSpec"] = reflect.TypeOf((*SourceNodeSpec)(nil)).Elem() } type SsdDiskNotAvailable struct { VimFault DevicePath string `xml:"devicePath"` } func init() { t["SsdDiskNotAvailable"] = reflect.TypeOf((*SsdDiskNotAvailable)(nil)).Elem() } type SsdDiskNotAvailableFault SsdDiskNotAvailable func init() { t["SsdDiskNotAvailableFault"] = reflect.TypeOf((*SsdDiskNotAvailableFault)(nil)).Elem() } type StageHostPatchRequestType struct { This ManagedObjectReference `xml:"_this"` MetaUrls []string `xml:"metaUrls,omitempty"` BundleUrls []string `xml:"bundleUrls,omitempty"` VibUrls []string `xml:"vibUrls,omitempty"` Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` } func init() { t["StageHostPatchRequestType"] = reflect.TypeOf((*StageHostPatchRequestType)(nil)).Elem() } type StageHostPatch_Task StageHostPatchRequestType func init() { t["StageHostPatch_Task"] = reflect.TypeOf((*StageHostPatch_Task)(nil)).Elem() } type StageHostPatch_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type StampAllRulesWithUuidRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["StampAllRulesWithUuidRequestType"] = reflect.TypeOf((*StampAllRulesWithUuidRequestType)(nil)).Elem() } type StampAllRulesWithUuid_Task StampAllRulesWithUuidRequestType func init() { t["StampAllRulesWithUuid_Task"] = reflect.TypeOf((*StampAllRulesWithUuid_Task)(nil)).Elem() } type StampAllRulesWithUuid_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type StandbyGuest StandbyGuestRequestType func init() { t["StandbyGuest"] = reflect.TypeOf((*StandbyGuest)(nil)).Elem() } type StandbyGuestRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["StandbyGuestRequestType"] = reflect.TypeOf((*StandbyGuestRequestType)(nil)).Elem() } type StandbyGuestResponse struct { } type StartProgramInGuest StartProgramInGuestRequestType func init() { t["StartProgramInGuest"] = reflect.TypeOf((*StartProgramInGuest)(nil)).Elem() } type StartProgramInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Spec BaseGuestProgramSpec `xml:"spec,typeattr"` } func init() { t["StartProgramInGuestRequestType"] = reflect.TypeOf((*StartProgramInGuestRequestType)(nil)).Elem() } type StartProgramInGuestResponse struct { Returnval int64 `xml:"returnval"` } type StartRecordingRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Description string `xml:"description,omitempty"` } func init() { t["StartRecordingRequestType"] = reflect.TypeOf((*StartRecordingRequestType)(nil)).Elem() } type StartRecording_Task StartRecordingRequestType func init() { t["StartRecording_Task"] = reflect.TypeOf((*StartRecording_Task)(nil)).Elem() } type StartRecording_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type StartReplayingRequestType struct { This ManagedObjectReference `xml:"_this"` ReplaySnapshot ManagedObjectReference `xml:"replaySnapshot"` } func init() { t["StartReplayingRequestType"] = reflect.TypeOf((*StartReplayingRequestType)(nil)).Elem() } type StartReplaying_Task StartReplayingRequestType func init() { t["StartReplaying_Task"] = reflect.TypeOf((*StartReplaying_Task)(nil)).Elem() } type StartReplaying_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type StartService StartServiceRequestType func init() { t["StartService"] = reflect.TypeOf((*StartService)(nil)).Elem() } type StartServiceRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["StartServiceRequestType"] = reflect.TypeOf((*StartServiceRequestType)(nil)).Elem() } type StartServiceResponse struct { } type StateAlarmExpression struct { AlarmExpression Operator StateAlarmOperator `xml:"operator"` Type string `xml:"type"` StatePath string `xml:"statePath"` Yellow string `xml:"yellow,omitempty"` Red string `xml:"red,omitempty"` } func init() { t["StateAlarmExpression"] = reflect.TypeOf((*StateAlarmExpression)(nil)).Elem() } type StaticRouteProfile struct { ApplyProfile Key string `xml:"key,omitempty"` } func init() { t["StaticRouteProfile"] = reflect.TypeOf((*StaticRouteProfile)(nil)).Elem() } type StopRecordingRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["StopRecordingRequestType"] = reflect.TypeOf((*StopRecordingRequestType)(nil)).Elem() } type StopRecording_Task StopRecordingRequestType func init() { t["StopRecording_Task"] = reflect.TypeOf((*StopRecording_Task)(nil)).Elem() } type StopRecording_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type StopReplayingRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["StopReplayingRequestType"] = reflect.TypeOf((*StopReplayingRequestType)(nil)).Elem() } type StopReplaying_Task StopReplayingRequestType func init() { t["StopReplaying_Task"] = reflect.TypeOf((*StopReplaying_Task)(nil)).Elem() } type StopReplaying_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type StopService StopServiceRequestType func init() { t["StopService"] = reflect.TypeOf((*StopService)(nil)).Elem() } type StopServiceRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["StopServiceRequestType"] = reflect.TypeOf((*StopServiceRequestType)(nil)).Elem() } type StopServiceResponse struct { } type StorageDrsAutomationConfig struct { DynamicData SpaceLoadBalanceAutomationMode string `xml:"spaceLoadBalanceAutomationMode,omitempty"` IoLoadBalanceAutomationMode string `xml:"ioLoadBalanceAutomationMode,omitempty"` RuleEnforcementAutomationMode string `xml:"ruleEnforcementAutomationMode,omitempty"` PolicyEnforcementAutomationMode string `xml:"policyEnforcementAutomationMode,omitempty"` VmEvacuationAutomationMode string `xml:"vmEvacuationAutomationMode,omitempty"` } func init() { t["StorageDrsAutomationConfig"] = reflect.TypeOf((*StorageDrsAutomationConfig)(nil)).Elem() } type StorageDrsCannotMoveDiskInMultiWriterMode struct { VimFault } func init() { t["StorageDrsCannotMoveDiskInMultiWriterMode"] = reflect.TypeOf((*StorageDrsCannotMoveDiskInMultiWriterMode)(nil)).Elem() } type StorageDrsCannotMoveDiskInMultiWriterModeFault StorageDrsCannotMoveDiskInMultiWriterMode func init() { t["StorageDrsCannotMoveDiskInMultiWriterModeFault"] = reflect.TypeOf((*StorageDrsCannotMoveDiskInMultiWriterModeFault)(nil)).Elem() } type StorageDrsCannotMoveFTVm struct { VimFault } func init() { t["StorageDrsCannotMoveFTVm"] = reflect.TypeOf((*StorageDrsCannotMoveFTVm)(nil)).Elem() } type StorageDrsCannotMoveFTVmFault StorageDrsCannotMoveFTVm func init() { t["StorageDrsCannotMoveFTVmFault"] = reflect.TypeOf((*StorageDrsCannotMoveFTVmFault)(nil)).Elem() } type StorageDrsCannotMoveIndependentDisk struct { VimFault } func init() { t["StorageDrsCannotMoveIndependentDisk"] = reflect.TypeOf((*StorageDrsCannotMoveIndependentDisk)(nil)).Elem() } type StorageDrsCannotMoveIndependentDiskFault StorageDrsCannotMoveIndependentDisk func init() { t["StorageDrsCannotMoveIndependentDiskFault"] = reflect.TypeOf((*StorageDrsCannotMoveIndependentDiskFault)(nil)).Elem() } type StorageDrsCannotMoveManuallyPlacedSwapFile struct { VimFault } func init() { t["StorageDrsCannotMoveManuallyPlacedSwapFile"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedSwapFile)(nil)).Elem() } type StorageDrsCannotMoveManuallyPlacedSwapFileFault StorageDrsCannotMoveManuallyPlacedSwapFile func init() { t["StorageDrsCannotMoveManuallyPlacedSwapFileFault"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedSwapFileFault)(nil)).Elem() } type StorageDrsCannotMoveManuallyPlacedVm struct { VimFault } func init() { t["StorageDrsCannotMoveManuallyPlacedVm"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedVm)(nil)).Elem() } type StorageDrsCannotMoveManuallyPlacedVmFault StorageDrsCannotMoveManuallyPlacedVm func init() { t["StorageDrsCannotMoveManuallyPlacedVmFault"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedVmFault)(nil)).Elem() } type StorageDrsCannotMoveSharedDisk struct { VimFault } func init() { t["StorageDrsCannotMoveSharedDisk"] = reflect.TypeOf((*StorageDrsCannotMoveSharedDisk)(nil)).Elem() } type StorageDrsCannotMoveSharedDiskFault StorageDrsCannotMoveSharedDisk func init() { t["StorageDrsCannotMoveSharedDiskFault"] = reflect.TypeOf((*StorageDrsCannotMoveSharedDiskFault)(nil)).Elem() } type StorageDrsCannotMoveTemplate struct { VimFault } func init() { t["StorageDrsCannotMoveTemplate"] = reflect.TypeOf((*StorageDrsCannotMoveTemplate)(nil)).Elem() } type StorageDrsCannotMoveTemplateFault StorageDrsCannotMoveTemplate func init() { t["StorageDrsCannotMoveTemplateFault"] = reflect.TypeOf((*StorageDrsCannotMoveTemplateFault)(nil)).Elem() } type StorageDrsCannotMoveVmInUserFolder struct { VimFault } func init() { t["StorageDrsCannotMoveVmInUserFolder"] = reflect.TypeOf((*StorageDrsCannotMoveVmInUserFolder)(nil)).Elem() } type StorageDrsCannotMoveVmInUserFolderFault StorageDrsCannotMoveVmInUserFolder func init() { t["StorageDrsCannotMoveVmInUserFolderFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmInUserFolderFault)(nil)).Elem() } type StorageDrsCannotMoveVmWithMountedCDROM struct { VimFault } func init() { t["StorageDrsCannotMoveVmWithMountedCDROM"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithMountedCDROM)(nil)).Elem() } type StorageDrsCannotMoveVmWithMountedCDROMFault StorageDrsCannotMoveVmWithMountedCDROM func init() { t["StorageDrsCannotMoveVmWithMountedCDROMFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithMountedCDROMFault)(nil)).Elem() } type StorageDrsCannotMoveVmWithNoFilesInLayout struct { VimFault } func init() { t["StorageDrsCannotMoveVmWithNoFilesInLayout"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithNoFilesInLayout)(nil)).Elem() } type StorageDrsCannotMoveVmWithNoFilesInLayoutFault StorageDrsCannotMoveVmWithNoFilesInLayout func init() { t["StorageDrsCannotMoveVmWithNoFilesInLayoutFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithNoFilesInLayoutFault)(nil)).Elem() } type StorageDrsConfigInfo struct { DynamicData PodConfig StorageDrsPodConfigInfo `xml:"podConfig"` VmConfig []StorageDrsVmConfigInfo `xml:"vmConfig,omitempty"` } func init() { t["StorageDrsConfigInfo"] = reflect.TypeOf((*StorageDrsConfigInfo)(nil)).Elem() } type StorageDrsConfigSpec struct { DynamicData PodConfigSpec *StorageDrsPodConfigSpec `xml:"podConfigSpec,omitempty"` VmConfigSpec []StorageDrsVmConfigSpec `xml:"vmConfigSpec,omitempty"` } func init() { t["StorageDrsConfigSpec"] = reflect.TypeOf((*StorageDrsConfigSpec)(nil)).Elem() } type StorageDrsDatacentersCannotShareDatastore struct { VimFault } func init() { t["StorageDrsDatacentersCannotShareDatastore"] = reflect.TypeOf((*StorageDrsDatacentersCannotShareDatastore)(nil)).Elem() } type StorageDrsDatacentersCannotShareDatastoreFault StorageDrsDatacentersCannotShareDatastore func init() { t["StorageDrsDatacentersCannotShareDatastoreFault"] = reflect.TypeOf((*StorageDrsDatacentersCannotShareDatastoreFault)(nil)).Elem() } type StorageDrsDisabledOnVm struct { VimFault } func init() { t["StorageDrsDisabledOnVm"] = reflect.TypeOf((*StorageDrsDisabledOnVm)(nil)).Elem() } type StorageDrsDisabledOnVmFault StorageDrsDisabledOnVm func init() { t["StorageDrsDisabledOnVmFault"] = reflect.TypeOf((*StorageDrsDisabledOnVmFault)(nil)).Elem() } type StorageDrsHbrDiskNotMovable struct { VimFault NonMovableDiskIds string `xml:"nonMovableDiskIds"` } func init() { t["StorageDrsHbrDiskNotMovable"] = reflect.TypeOf((*StorageDrsHbrDiskNotMovable)(nil)).Elem() } type StorageDrsHbrDiskNotMovableFault StorageDrsHbrDiskNotMovable func init() { t["StorageDrsHbrDiskNotMovableFault"] = reflect.TypeOf((*StorageDrsHbrDiskNotMovableFault)(nil)).Elem() } type StorageDrsHmsMoveInProgress struct { VimFault } func init() { t["StorageDrsHmsMoveInProgress"] = reflect.TypeOf((*StorageDrsHmsMoveInProgress)(nil)).Elem() } type StorageDrsHmsMoveInProgressFault StorageDrsHmsMoveInProgress func init() { t["StorageDrsHmsMoveInProgressFault"] = reflect.TypeOf((*StorageDrsHmsMoveInProgressFault)(nil)).Elem() } type StorageDrsHmsUnreachable struct { VimFault } func init() { t["StorageDrsHmsUnreachable"] = reflect.TypeOf((*StorageDrsHmsUnreachable)(nil)).Elem() } type StorageDrsHmsUnreachableFault StorageDrsHmsUnreachable func init() { t["StorageDrsHmsUnreachableFault"] = reflect.TypeOf((*StorageDrsHmsUnreachableFault)(nil)).Elem() } type StorageDrsIoLoadBalanceConfig struct { DynamicData ReservablePercentThreshold int32 `xml:"reservablePercentThreshold,omitempty"` ReservableIopsThreshold int32 `xml:"reservableIopsThreshold,omitempty"` ReservableThresholdMode string `xml:"reservableThresholdMode,omitempty"` IoLatencyThreshold int32 `xml:"ioLatencyThreshold,omitempty"` IoLoadImbalanceThreshold int32 `xml:"ioLoadImbalanceThreshold,omitempty"` } func init() { t["StorageDrsIoLoadBalanceConfig"] = reflect.TypeOf((*StorageDrsIoLoadBalanceConfig)(nil)).Elem() } type StorageDrsIolbDisabledInternally struct { VimFault } func init() { t["StorageDrsIolbDisabledInternally"] = reflect.TypeOf((*StorageDrsIolbDisabledInternally)(nil)).Elem() } type StorageDrsIolbDisabledInternallyFault StorageDrsIolbDisabledInternally func init() { t["StorageDrsIolbDisabledInternallyFault"] = reflect.TypeOf((*StorageDrsIolbDisabledInternallyFault)(nil)).Elem() } type StorageDrsOptionSpec struct { ArrayUpdateSpec Option BaseOptionValue `xml:"option,omitempty,typeattr"` } func init() { t["StorageDrsOptionSpec"] = reflect.TypeOf((*StorageDrsOptionSpec)(nil)).Elem() } type StorageDrsPlacementRankVmSpec struct { DynamicData VmPlacementSpec PlacementSpec `xml:"vmPlacementSpec"` VmClusters []ManagedObjectReference `xml:"vmClusters"` } func init() { t["StorageDrsPlacementRankVmSpec"] = reflect.TypeOf((*StorageDrsPlacementRankVmSpec)(nil)).Elem() } type StorageDrsPodConfigInfo struct { DynamicData Enabled bool `xml:"enabled"` IoLoadBalanceEnabled bool `xml:"ioLoadBalanceEnabled"` DefaultVmBehavior string `xml:"defaultVmBehavior"` LoadBalanceInterval int32 `xml:"loadBalanceInterval,omitempty"` DefaultIntraVmAffinity *bool `xml:"defaultIntraVmAffinity"` SpaceLoadBalanceConfig *StorageDrsSpaceLoadBalanceConfig `xml:"spaceLoadBalanceConfig,omitempty"` IoLoadBalanceConfig *StorageDrsIoLoadBalanceConfig `xml:"ioLoadBalanceConfig,omitempty"` AutomationOverrides *StorageDrsAutomationConfig `xml:"automationOverrides,omitempty"` Rule []BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` Option []BaseOptionValue `xml:"option,omitempty,typeattr"` } func init() { t["StorageDrsPodConfigInfo"] = reflect.TypeOf((*StorageDrsPodConfigInfo)(nil)).Elem() } type StorageDrsPodConfigSpec struct { DynamicData Enabled *bool `xml:"enabled"` IoLoadBalanceEnabled *bool `xml:"ioLoadBalanceEnabled"` DefaultVmBehavior string `xml:"defaultVmBehavior,omitempty"` LoadBalanceInterval int32 `xml:"loadBalanceInterval,omitempty"` DefaultIntraVmAffinity *bool `xml:"defaultIntraVmAffinity"` SpaceLoadBalanceConfig *StorageDrsSpaceLoadBalanceConfig `xml:"spaceLoadBalanceConfig,omitempty"` IoLoadBalanceConfig *StorageDrsIoLoadBalanceConfig `xml:"ioLoadBalanceConfig,omitempty"` AutomationOverrides *StorageDrsAutomationConfig `xml:"automationOverrides,omitempty"` Rule []ClusterRuleSpec `xml:"rule,omitempty"` Option []StorageDrsOptionSpec `xml:"option,omitempty"` } func init() { t["StorageDrsPodConfigSpec"] = reflect.TypeOf((*StorageDrsPodConfigSpec)(nil)).Elem() } type StorageDrsPodSelectionSpec struct { DynamicData InitialVmConfig []VmPodConfigForPlacement `xml:"initialVmConfig,omitempty"` StoragePod *ManagedObjectReference `xml:"storagePod,omitempty"` } func init() { t["StorageDrsPodSelectionSpec"] = reflect.TypeOf((*StorageDrsPodSelectionSpec)(nil)).Elem() } type StorageDrsRelocateDisabled struct { VimFault } func init() { t["StorageDrsRelocateDisabled"] = reflect.TypeOf((*StorageDrsRelocateDisabled)(nil)).Elem() } type StorageDrsRelocateDisabledFault StorageDrsRelocateDisabled func init() { t["StorageDrsRelocateDisabledFault"] = reflect.TypeOf((*StorageDrsRelocateDisabledFault)(nil)).Elem() } type StorageDrsSpaceLoadBalanceConfig struct { DynamicData SpaceThresholdMode string `xml:"spaceThresholdMode,omitempty"` SpaceUtilizationThreshold int32 `xml:"spaceUtilizationThreshold,omitempty"` FreeSpaceThresholdGB int32 `xml:"freeSpaceThresholdGB,omitempty"` MinSpaceUtilizationDifference int32 `xml:"minSpaceUtilizationDifference,omitempty"` } func init() { t["StorageDrsSpaceLoadBalanceConfig"] = reflect.TypeOf((*StorageDrsSpaceLoadBalanceConfig)(nil)).Elem() } type StorageDrsStaleHmsCollection struct { VimFault } func init() { t["StorageDrsStaleHmsCollection"] = reflect.TypeOf((*StorageDrsStaleHmsCollection)(nil)).Elem() } type StorageDrsStaleHmsCollectionFault StorageDrsStaleHmsCollection func init() { t["StorageDrsStaleHmsCollectionFault"] = reflect.TypeOf((*StorageDrsStaleHmsCollectionFault)(nil)).Elem() } type StorageDrsUnableToMoveFiles struct { VimFault } func init() { t["StorageDrsUnableToMoveFiles"] = reflect.TypeOf((*StorageDrsUnableToMoveFiles)(nil)).Elem() } type StorageDrsUnableToMoveFilesFault StorageDrsUnableToMoveFiles func init() { t["StorageDrsUnableToMoveFilesFault"] = reflect.TypeOf((*StorageDrsUnableToMoveFilesFault)(nil)).Elem() } type StorageDrsVmConfigInfo struct { DynamicData Vm *ManagedObjectReference `xml:"vm,omitempty"` Enabled *bool `xml:"enabled"` Behavior string `xml:"behavior,omitempty"` IntraVmAffinity *bool `xml:"intraVmAffinity"` IntraVmAntiAffinity *VirtualDiskAntiAffinityRuleSpec `xml:"intraVmAntiAffinity,omitempty"` } func init() { t["StorageDrsVmConfigInfo"] = reflect.TypeOf((*StorageDrsVmConfigInfo)(nil)).Elem() } type StorageDrsVmConfigSpec struct { ArrayUpdateSpec Info *StorageDrsVmConfigInfo `xml:"info,omitempty"` } func init() { t["StorageDrsVmConfigSpec"] = reflect.TypeOf((*StorageDrsVmConfigSpec)(nil)).Elem() } type StorageIOAllocationInfo struct { DynamicData Limit int64 `xml:"limit,omitempty"` Shares *SharesInfo `xml:"shares,omitempty"` Reservation int32 `xml:"reservation,omitempty"` } func init() { t["StorageIOAllocationInfo"] = reflect.TypeOf((*StorageIOAllocationInfo)(nil)).Elem() } type StorageIOAllocationOption struct { DynamicData LimitOption LongOption `xml:"limitOption"` SharesOption SharesOption `xml:"sharesOption"` } func init() { t["StorageIOAllocationOption"] = reflect.TypeOf((*StorageIOAllocationOption)(nil)).Elem() } type StorageIORMConfigOption struct { DynamicData EnabledOption BoolOption `xml:"enabledOption"` CongestionThresholdOption IntOption `xml:"congestionThresholdOption"` StatsCollectionEnabledOption *BoolOption `xml:"statsCollectionEnabledOption,omitempty"` ReservationEnabledOption *BoolOption `xml:"reservationEnabledOption,omitempty"` } func init() { t["StorageIORMConfigOption"] = reflect.TypeOf((*StorageIORMConfigOption)(nil)).Elem() } type StorageIORMConfigSpec struct { DynamicData Enabled *bool `xml:"enabled"` CongestionThresholdMode string `xml:"congestionThresholdMode,omitempty"` CongestionThreshold int32 `xml:"congestionThreshold,omitempty"` PercentOfPeakThroughput int32 `xml:"percentOfPeakThroughput,omitempty"` StatsCollectionEnabled *bool `xml:"statsCollectionEnabled"` ReservationEnabled *bool `xml:"reservationEnabled"` StatsAggregationDisabled *bool `xml:"statsAggregationDisabled"` ReservableIopsThreshold int32 `xml:"reservableIopsThreshold,omitempty"` } func init() { t["StorageIORMConfigSpec"] = reflect.TypeOf((*StorageIORMConfigSpec)(nil)).Elem() } type StorageIORMInfo struct { DynamicData Enabled bool `xml:"enabled"` CongestionThresholdMode string `xml:"congestionThresholdMode,omitempty"` CongestionThreshold int32 `xml:"congestionThreshold"` PercentOfPeakThroughput int32 `xml:"percentOfPeakThroughput,omitempty"` StatsCollectionEnabled *bool `xml:"statsCollectionEnabled"` ReservationEnabled *bool `xml:"reservationEnabled"` StatsAggregationDisabled *bool `xml:"statsAggregationDisabled"` ReservableIopsThreshold int32 `xml:"reservableIopsThreshold,omitempty"` } func init() { t["StorageIORMInfo"] = reflect.TypeOf((*StorageIORMInfo)(nil)).Elem() } type StorageMigrationAction struct { ClusterAction Vm ManagedObjectReference `xml:"vm"` RelocateSpec VirtualMachineRelocateSpec `xml:"relocateSpec"` Source ManagedObjectReference `xml:"source"` Destination ManagedObjectReference `xml:"destination"` SizeTransferred int64 `xml:"sizeTransferred"` SpaceUtilSrcBefore float32 `xml:"spaceUtilSrcBefore,omitempty"` SpaceUtilDstBefore float32 `xml:"spaceUtilDstBefore,omitempty"` SpaceUtilSrcAfter float32 `xml:"spaceUtilSrcAfter,omitempty"` SpaceUtilDstAfter float32 `xml:"spaceUtilDstAfter,omitempty"` IoLatencySrcBefore float32 `xml:"ioLatencySrcBefore,omitempty"` IoLatencyDstBefore float32 `xml:"ioLatencyDstBefore,omitempty"` } func init() { t["StorageMigrationAction"] = reflect.TypeOf((*StorageMigrationAction)(nil)).Elem() } type StoragePerformanceSummary struct { DynamicData Interval int32 `xml:"interval"` Percentile []int32 `xml:"percentile"` DatastoreReadLatency []float64 `xml:"datastoreReadLatency"` DatastoreWriteLatency []float64 `xml:"datastoreWriteLatency"` DatastoreVmLatency []float64 `xml:"datastoreVmLatency"` DatastoreReadIops []float64 `xml:"datastoreReadIops"` DatastoreWriteIops []float64 `xml:"datastoreWriteIops"` SiocActivityDuration int32 `xml:"siocActivityDuration"` } func init() { t["StoragePerformanceSummary"] = reflect.TypeOf((*StoragePerformanceSummary)(nil)).Elem() } type StoragePlacementAction struct { ClusterAction Vm *ManagedObjectReference `xml:"vm,omitempty"` RelocateSpec VirtualMachineRelocateSpec `xml:"relocateSpec"` Destination ManagedObjectReference `xml:"destination"` SpaceUtilBefore float32 `xml:"spaceUtilBefore,omitempty"` SpaceDemandBefore float32 `xml:"spaceDemandBefore,omitempty"` SpaceUtilAfter float32 `xml:"spaceUtilAfter,omitempty"` SpaceDemandAfter float32 `xml:"spaceDemandAfter,omitempty"` IoLatencyBefore float32 `xml:"ioLatencyBefore,omitempty"` } func init() { t["StoragePlacementAction"] = reflect.TypeOf((*StoragePlacementAction)(nil)).Elem() } type StoragePlacementResult struct { DynamicData Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` DrsFault *ClusterDrsFaults `xml:"drsFault,omitempty"` Task *ManagedObjectReference `xml:"task,omitempty"` } func init() { t["StoragePlacementResult"] = reflect.TypeOf((*StoragePlacementResult)(nil)).Elem() } type StoragePlacementSpec struct { DynamicData Type string `xml:"type"` Priority VirtualMachineMovePriority `xml:"priority,omitempty"` Vm *ManagedObjectReference `xml:"vm,omitempty"` PodSelectionSpec StorageDrsPodSelectionSpec `xml:"podSelectionSpec"` CloneSpec *VirtualMachineCloneSpec `xml:"cloneSpec,omitempty"` CloneName string `xml:"cloneName,omitempty"` ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"` ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` Folder *ManagedObjectReference `xml:"folder,omitempty"` DisallowPrerequisiteMoves *bool `xml:"disallowPrerequisiteMoves"` ResourceLeaseDurationSec int32 `xml:"resourceLeaseDurationSec,omitempty"` } func init() { t["StoragePlacementSpec"] = reflect.TypeOf((*StoragePlacementSpec)(nil)).Elem() } type StoragePodSummary struct { DynamicData Name string `xml:"name"` Capacity int64 `xml:"capacity"` FreeSpace int64 `xml:"freeSpace"` } func init() { t["StoragePodSummary"] = reflect.TypeOf((*StoragePodSummary)(nil)).Elem() } type StorageProfile struct { ApplyProfile NasStorage []NasStorageProfile `xml:"nasStorage,omitempty"` } func init() { t["StorageProfile"] = reflect.TypeOf((*StorageProfile)(nil)).Elem() } type StorageRequirement struct { DynamicData Datastore ManagedObjectReference `xml:"datastore"` FreeSpaceRequiredInKb int64 `xml:"freeSpaceRequiredInKb"` } func init() { t["StorageRequirement"] = reflect.TypeOf((*StorageRequirement)(nil)).Elem() } type StorageResourceManagerStorageProfileStatistics struct { DynamicData ProfileId string `xml:"profileId"` TotalSpaceMB int64 `xml:"totalSpaceMB"` UsedSpaceMB int64 `xml:"usedSpaceMB"` } func init() { t["StorageResourceManagerStorageProfileStatistics"] = reflect.TypeOf((*StorageResourceManagerStorageProfileStatistics)(nil)).Elem() } type StorageVMotionNotSupported struct { MigrationFeatureNotSupported } func init() { t["StorageVMotionNotSupported"] = reflect.TypeOf((*StorageVMotionNotSupported)(nil)).Elem() } type StorageVMotionNotSupportedFault StorageVMotionNotSupported func init() { t["StorageVMotionNotSupportedFault"] = reflect.TypeOf((*StorageVMotionNotSupportedFault)(nil)).Elem() } type StorageVmotionIncompatible struct { VirtualHardwareCompatibilityIssue Datastore *ManagedObjectReference `xml:"datastore,omitempty"` } func init() { t["StorageVmotionIncompatible"] = reflect.TypeOf((*StorageVmotionIncompatible)(nil)).Elem() } type StorageVmotionIncompatibleFault StorageVmotionIncompatible func init() { t["StorageVmotionIncompatibleFault"] = reflect.TypeOf((*StorageVmotionIncompatibleFault)(nil)).Elem() } type StringExpression struct { NegatableExpression Value string `xml:"value,omitempty"` } func init() { t["StringExpression"] = reflect.TypeOf((*StringExpression)(nil)).Elem() } type StringOption struct { OptionType DefaultValue string `xml:"defaultValue"` ValidCharacters string `xml:"validCharacters,omitempty"` } func init() { t["StringOption"] = reflect.TypeOf((*StringOption)(nil)).Elem() } type StringPolicy struct { InheritablePolicy Value string `xml:"value,omitempty"` } func init() { t["StringPolicy"] = reflect.TypeOf((*StringPolicy)(nil)).Elem() } type StructuredCustomizations struct { HostProfilesEntityCustomizations Entity ManagedObjectReference `xml:"entity"` Customizations *AnswerFile `xml:"customizations,omitempty"` } func init() { t["StructuredCustomizations"] = reflect.TypeOf((*StructuredCustomizations)(nil)).Elem() } type SuspendVAppRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["SuspendVAppRequestType"] = reflect.TypeOf((*SuspendVAppRequestType)(nil)).Elem() } type SuspendVApp_Task SuspendVAppRequestType func init() { t["SuspendVApp_Task"] = reflect.TypeOf((*SuspendVApp_Task)(nil)).Elem() } type SuspendVApp_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type SuspendVMRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["SuspendVMRequestType"] = reflect.TypeOf((*SuspendVMRequestType)(nil)).Elem() } type SuspendVM_Task SuspendVMRequestType func init() { t["SuspendVM_Task"] = reflect.TypeOf((*SuspendVM_Task)(nil)).Elem() } type SuspendVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type SuspendedRelocateNotSupported struct { MigrationFault } func init() { t["SuspendedRelocateNotSupported"] = reflect.TypeOf((*SuspendedRelocateNotSupported)(nil)).Elem() } type SuspendedRelocateNotSupportedFault SuspendedRelocateNotSupported func init() { t["SuspendedRelocateNotSupportedFault"] = reflect.TypeOf((*SuspendedRelocateNotSupportedFault)(nil)).Elem() } type SwapDatastoreNotWritableOnHost struct { DatastoreNotWritableOnHost } func init() { t["SwapDatastoreNotWritableOnHost"] = reflect.TypeOf((*SwapDatastoreNotWritableOnHost)(nil)).Elem() } type SwapDatastoreNotWritableOnHostFault SwapDatastoreNotWritableOnHost func init() { t["SwapDatastoreNotWritableOnHostFault"] = reflect.TypeOf((*SwapDatastoreNotWritableOnHostFault)(nil)).Elem() } type SwapDatastoreUnset struct { VimFault } func init() { t["SwapDatastoreUnset"] = reflect.TypeOf((*SwapDatastoreUnset)(nil)).Elem() } type SwapDatastoreUnsetFault SwapDatastoreUnset func init() { t["SwapDatastoreUnsetFault"] = reflect.TypeOf((*SwapDatastoreUnsetFault)(nil)).Elem() } type SwapPlacementOverrideNotSupported struct { InvalidVmConfig } func init() { t["SwapPlacementOverrideNotSupported"] = reflect.TypeOf((*SwapPlacementOverrideNotSupported)(nil)).Elem() } type SwapPlacementOverrideNotSupportedFault SwapPlacementOverrideNotSupported func init() { t["SwapPlacementOverrideNotSupportedFault"] = reflect.TypeOf((*SwapPlacementOverrideNotSupportedFault)(nil)).Elem() } type SwitchIpUnset struct { DvsFault } func init() { t["SwitchIpUnset"] = reflect.TypeOf((*SwitchIpUnset)(nil)).Elem() } type SwitchIpUnsetFault SwitchIpUnset func init() { t["SwitchIpUnsetFault"] = reflect.TypeOf((*SwitchIpUnsetFault)(nil)).Elem() } type SwitchNotInUpgradeMode struct { DvsFault } func init() { t["SwitchNotInUpgradeMode"] = reflect.TypeOf((*SwitchNotInUpgradeMode)(nil)).Elem() } type SwitchNotInUpgradeModeFault SwitchNotInUpgradeMode func init() { t["SwitchNotInUpgradeModeFault"] = reflect.TypeOf((*SwitchNotInUpgradeModeFault)(nil)).Elem() } type SystemError struct { RuntimeFault Reason string `xml:"reason"` } func init() { t["SystemError"] = reflect.TypeOf((*SystemError)(nil)).Elem() } type SystemErrorFault SystemError func init() { t["SystemErrorFault"] = reflect.TypeOf((*SystemErrorFault)(nil)).Elem() } type SystemEventInfo struct { DynamicData RecordId int64 `xml:"recordId"` When string `xml:"when"` SelType int64 `xml:"selType"` Message string `xml:"message"` SensorNumber int64 `xml:"sensorNumber"` } func init() { t["SystemEventInfo"] = reflect.TypeOf((*SystemEventInfo)(nil)).Elem() } type Tag struct { DynamicData Key string `xml:"key"` } func init() { t["Tag"] = reflect.TypeOf((*Tag)(nil)).Elem() } type TaskDescription struct { DynamicData MethodInfo []BaseElementDescription `xml:"methodInfo,typeattr"` State []BaseElementDescription `xml:"state,typeattr"` Reason []BaseTypeDescription `xml:"reason,typeattr"` } func init() { t["TaskDescription"] = reflect.TypeOf((*TaskDescription)(nil)).Elem() } type TaskEvent struct { Event Info TaskInfo `xml:"info"` } func init() { t["TaskEvent"] = reflect.TypeOf((*TaskEvent)(nil)).Elem() } type TaskFilterSpec struct { DynamicData Entity *TaskFilterSpecByEntity `xml:"entity,omitempty"` Time *TaskFilterSpecByTime `xml:"time,omitempty"` UserName *TaskFilterSpecByUsername `xml:"userName,omitempty"` ActivationId []string `xml:"activationId,omitempty"` State []TaskInfoState `xml:"state,omitempty"` Alarm *ManagedObjectReference `xml:"alarm,omitempty"` ScheduledTask *ManagedObjectReference `xml:"scheduledTask,omitempty"` EventChainId []int32 `xml:"eventChainId,omitempty"` Tag []string `xml:"tag,omitempty"` ParentTaskKey []string `xml:"parentTaskKey,omitempty"` RootTaskKey []string `xml:"rootTaskKey,omitempty"` } func init() { t["TaskFilterSpec"] = reflect.TypeOf((*TaskFilterSpec)(nil)).Elem() } type TaskFilterSpecByEntity struct { DynamicData Entity ManagedObjectReference `xml:"entity"` Recursion TaskFilterSpecRecursionOption `xml:"recursion"` } func init() { t["TaskFilterSpecByEntity"] = reflect.TypeOf((*TaskFilterSpecByEntity)(nil)).Elem() } type TaskFilterSpecByTime struct { DynamicData TimeType TaskFilterSpecTimeOption `xml:"timeType"` BeginTime *time.Time `xml:"beginTime"` EndTime *time.Time `xml:"endTime"` } func init() { t["TaskFilterSpecByTime"] = reflect.TypeOf((*TaskFilterSpecByTime)(nil)).Elem() } type TaskFilterSpecByUsername struct { DynamicData SystemUser bool `xml:"systemUser"` UserList []string `xml:"userList,omitempty"` } func init() { t["TaskFilterSpecByUsername"] = reflect.TypeOf((*TaskFilterSpecByUsername)(nil)).Elem() } type TaskInProgress struct { VimFault Task ManagedObjectReference `xml:"task"` } func init() { t["TaskInProgress"] = reflect.TypeOf((*TaskInProgress)(nil)).Elem() } type TaskInProgressFault BaseTaskInProgress func init() { t["TaskInProgressFault"] = reflect.TypeOf((*TaskInProgressFault)(nil)).Elem() } type TaskInfo struct { DynamicData Key string `xml:"key"` Task ManagedObjectReference `xml:"task"` Description *LocalizableMessage `xml:"description,omitempty"` Name string `xml:"name,omitempty"` DescriptionId string `xml:"descriptionId"` Entity *ManagedObjectReference `xml:"entity,omitempty"` EntityName string `xml:"entityName,omitempty"` Locked []ManagedObjectReference `xml:"locked,omitempty"` State TaskInfoState `xml:"state"` Cancelled bool `xml:"cancelled"` Cancelable bool `xml:"cancelable"` Error *LocalizedMethodFault `xml:"error,omitempty"` Result AnyType `xml:"result,omitempty,typeattr"` Progress int32 `xml:"progress,omitempty"` Reason BaseTaskReason `xml:"reason,typeattr"` QueueTime time.Time `xml:"queueTime"` StartTime *time.Time `xml:"startTime"` CompleteTime *time.Time `xml:"completeTime"` EventChainId int32 `xml:"eventChainId"` ChangeTag string `xml:"changeTag,omitempty"` ParentTaskKey string `xml:"parentTaskKey,omitempty"` RootTaskKey string `xml:"rootTaskKey,omitempty"` ActivationId string `xml:"activationId,omitempty"` } func init() { t["TaskInfo"] = reflect.TypeOf((*TaskInfo)(nil)).Elem() } type TaskReason struct { DynamicData } func init() { t["TaskReason"] = reflect.TypeOf((*TaskReason)(nil)).Elem() } type TaskReasonAlarm struct { TaskReason AlarmName string `xml:"alarmName"` Alarm ManagedObjectReference `xml:"alarm"` EntityName string `xml:"entityName"` Entity ManagedObjectReference `xml:"entity"` } func init() { t["TaskReasonAlarm"] = reflect.TypeOf((*TaskReasonAlarm)(nil)).Elem() } type TaskReasonSchedule struct { TaskReason Name string `xml:"name"` ScheduledTask ManagedObjectReference `xml:"scheduledTask"` } func init() { t["TaskReasonSchedule"] = reflect.TypeOf((*TaskReasonSchedule)(nil)).Elem() } type TaskReasonSystem struct { TaskReason } func init() { t["TaskReasonSystem"] = reflect.TypeOf((*TaskReasonSystem)(nil)).Elem() } type TaskReasonUser struct { TaskReason UserName string `xml:"userName"` } func init() { t["TaskReasonUser"] = reflect.TypeOf((*TaskReasonUser)(nil)).Elem() } type TaskScheduler struct { DynamicData ActiveTime *time.Time `xml:"activeTime"` ExpireTime *time.Time `xml:"expireTime"` } func init() { t["TaskScheduler"] = reflect.TypeOf((*TaskScheduler)(nil)).Elem() } type TaskTimeoutEvent struct { TaskEvent } func init() { t["TaskTimeoutEvent"] = reflect.TypeOf((*TaskTimeoutEvent)(nil)).Elem() } type TeamingMatchEvent struct { DvsHealthStatusChangeEvent } func init() { t["TeamingMatchEvent"] = reflect.TypeOf((*TeamingMatchEvent)(nil)).Elem() } type TeamingMisMatchEvent struct { DvsHealthStatusChangeEvent } func init() { t["TeamingMisMatchEvent"] = reflect.TypeOf((*TeamingMisMatchEvent)(nil)).Elem() } type TemplateBeingUpgradedEvent struct { TemplateUpgradeEvent } func init() { t["TemplateBeingUpgradedEvent"] = reflect.TypeOf((*TemplateBeingUpgradedEvent)(nil)).Elem() } type TemplateConfigFileInfo struct { VmConfigFileInfo } func init() { t["TemplateConfigFileInfo"] = reflect.TypeOf((*TemplateConfigFileInfo)(nil)).Elem() } type TemplateConfigFileQuery struct { VmConfigFileQuery } func init() { t["TemplateConfigFileQuery"] = reflect.TypeOf((*TemplateConfigFileQuery)(nil)).Elem() } type TemplateUpgradeEvent struct { Event LegacyTemplate string `xml:"legacyTemplate"` } func init() { t["TemplateUpgradeEvent"] = reflect.TypeOf((*TemplateUpgradeEvent)(nil)).Elem() } type TemplateUpgradeFailedEvent struct { TemplateUpgradeEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["TemplateUpgradeFailedEvent"] = reflect.TypeOf((*TemplateUpgradeFailedEvent)(nil)).Elem() } type TemplateUpgradedEvent struct { TemplateUpgradeEvent } func init() { t["TemplateUpgradedEvent"] = reflect.TypeOf((*TemplateUpgradedEvent)(nil)).Elem() } type TerminateFaultTolerantVMRequestType struct { This ManagedObjectReference `xml:"_this"` Vm *ManagedObjectReference `xml:"vm,omitempty"` } func init() { t["TerminateFaultTolerantVMRequestType"] = reflect.TypeOf((*TerminateFaultTolerantVMRequestType)(nil)).Elem() } type TerminateFaultTolerantVM_Task TerminateFaultTolerantVMRequestType func init() { t["TerminateFaultTolerantVM_Task"] = reflect.TypeOf((*TerminateFaultTolerantVM_Task)(nil)).Elem() } type TerminateFaultTolerantVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type TerminateProcessInGuest TerminateProcessInGuestRequestType func init() { t["TerminateProcessInGuest"] = reflect.TypeOf((*TerminateProcessInGuest)(nil)).Elem() } type TerminateProcessInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` Pid int64 `xml:"pid"` } func init() { t["TerminateProcessInGuestRequestType"] = reflect.TypeOf((*TerminateProcessInGuestRequestType)(nil)).Elem() } type TerminateProcessInGuestResponse struct { } type TerminateSession TerminateSessionRequestType func init() { t["TerminateSession"] = reflect.TypeOf((*TerminateSession)(nil)).Elem() } type TerminateSessionRequestType struct { This ManagedObjectReference `xml:"_this"` SessionId []string `xml:"sessionId"` } func init() { t["TerminateSessionRequestType"] = reflect.TypeOf((*TerminateSessionRequestType)(nil)).Elem() } type TerminateSessionResponse struct { } type TerminateVM TerminateVMRequestType func init() { t["TerminateVM"] = reflect.TypeOf((*TerminateVM)(nil)).Elem() } type TerminateVMRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["TerminateVMRequestType"] = reflect.TypeOf((*TerminateVMRequestType)(nil)).Elem() } type TerminateVMResponse struct { } type ThirdPartyLicenseAssignmentFailed struct { RuntimeFault Host ManagedObjectReference `xml:"host"` Module string `xml:"module"` Reason string `xml:"reason,omitempty"` } func init() { t["ThirdPartyLicenseAssignmentFailed"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailed)(nil)).Elem() } type ThirdPartyLicenseAssignmentFailedFault ThirdPartyLicenseAssignmentFailed func init() { t["ThirdPartyLicenseAssignmentFailedFault"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailedFault)(nil)).Elem() } type TicketedSessionAuthentication struct { GuestAuthentication Ticket string `xml:"ticket"` } func init() { t["TicketedSessionAuthentication"] = reflect.TypeOf((*TicketedSessionAuthentication)(nil)).Elem() } type TimedOutHostOperationEvent struct { HostEvent } func init() { t["TimedOutHostOperationEvent"] = reflect.TypeOf((*TimedOutHostOperationEvent)(nil)).Elem() } type Timedout struct { VimFault } func init() { t["Timedout"] = reflect.TypeOf((*Timedout)(nil)).Elem() } type TimedoutFault BaseTimedout func init() { t["TimedoutFault"] = reflect.TypeOf((*TimedoutFault)(nil)).Elem() } type TooManyConcurrentNativeClones struct { FileFault } func init() { t["TooManyConcurrentNativeClones"] = reflect.TypeOf((*TooManyConcurrentNativeClones)(nil)).Elem() } type TooManyConcurrentNativeClonesFault TooManyConcurrentNativeClones func init() { t["TooManyConcurrentNativeClonesFault"] = reflect.TypeOf((*TooManyConcurrentNativeClonesFault)(nil)).Elem() } type TooManyConsecutiveOverrides struct { VimFault } func init() { t["TooManyConsecutiveOverrides"] = reflect.TypeOf((*TooManyConsecutiveOverrides)(nil)).Elem() } type TooManyConsecutiveOverridesFault TooManyConsecutiveOverrides func init() { t["TooManyConsecutiveOverridesFault"] = reflect.TypeOf((*TooManyConsecutiveOverridesFault)(nil)).Elem() } type TooManyDevices struct { InvalidVmConfig } func init() { t["TooManyDevices"] = reflect.TypeOf((*TooManyDevices)(nil)).Elem() } type TooManyDevicesFault TooManyDevices func init() { t["TooManyDevicesFault"] = reflect.TypeOf((*TooManyDevicesFault)(nil)).Elem() } type TooManyDisksOnLegacyHost struct { MigrationFault DiskCount int32 `xml:"diskCount"` TimeoutDanger bool `xml:"timeoutDanger"` } func init() { t["TooManyDisksOnLegacyHost"] = reflect.TypeOf((*TooManyDisksOnLegacyHost)(nil)).Elem() } type TooManyDisksOnLegacyHostFault TooManyDisksOnLegacyHost func init() { t["TooManyDisksOnLegacyHostFault"] = reflect.TypeOf((*TooManyDisksOnLegacyHostFault)(nil)).Elem() } type TooManyGuestLogons struct { GuestOperationsFault } func init() { t["TooManyGuestLogons"] = reflect.TypeOf((*TooManyGuestLogons)(nil)).Elem() } type TooManyGuestLogonsFault TooManyGuestLogons func init() { t["TooManyGuestLogonsFault"] = reflect.TypeOf((*TooManyGuestLogonsFault)(nil)).Elem() } type TooManyHosts struct { HostConnectFault } func init() { t["TooManyHosts"] = reflect.TypeOf((*TooManyHosts)(nil)).Elem() } type TooManyHostsFault TooManyHosts func init() { t["TooManyHostsFault"] = reflect.TypeOf((*TooManyHostsFault)(nil)).Elem() } type TooManyNativeCloneLevels struct { FileFault } func init() { t["TooManyNativeCloneLevels"] = reflect.TypeOf((*TooManyNativeCloneLevels)(nil)).Elem() } type TooManyNativeCloneLevelsFault TooManyNativeCloneLevels func init() { t["TooManyNativeCloneLevelsFault"] = reflect.TypeOf((*TooManyNativeCloneLevelsFault)(nil)).Elem() } type TooManyNativeClonesOnFile struct { FileFault } func init() { t["TooManyNativeClonesOnFile"] = reflect.TypeOf((*TooManyNativeClonesOnFile)(nil)).Elem() } type TooManyNativeClonesOnFileFault TooManyNativeClonesOnFile func init() { t["TooManyNativeClonesOnFileFault"] = reflect.TypeOf((*TooManyNativeClonesOnFileFault)(nil)).Elem() } type TooManySnapshotLevels struct { SnapshotFault } func init() { t["TooManySnapshotLevels"] = reflect.TypeOf((*TooManySnapshotLevels)(nil)).Elem() } type TooManySnapshotLevelsFault TooManySnapshotLevels func init() { t["TooManySnapshotLevelsFault"] = reflect.TypeOf((*TooManySnapshotLevelsFault)(nil)).Elem() } type ToolsAlreadyUpgraded struct { VmToolsUpgradeFault } func init() { t["ToolsAlreadyUpgraded"] = reflect.TypeOf((*ToolsAlreadyUpgraded)(nil)).Elem() } type ToolsAlreadyUpgradedFault ToolsAlreadyUpgraded func init() { t["ToolsAlreadyUpgradedFault"] = reflect.TypeOf((*ToolsAlreadyUpgradedFault)(nil)).Elem() } type ToolsAutoUpgradeNotSupported struct { VmToolsUpgradeFault } func init() { t["ToolsAutoUpgradeNotSupported"] = reflect.TypeOf((*ToolsAutoUpgradeNotSupported)(nil)).Elem() } type ToolsAutoUpgradeNotSupportedFault ToolsAutoUpgradeNotSupported func init() { t["ToolsAutoUpgradeNotSupportedFault"] = reflect.TypeOf((*ToolsAutoUpgradeNotSupportedFault)(nil)).Elem() } type ToolsConfigInfo struct { DynamicData ToolsVersion int32 `xml:"toolsVersion,omitempty"` ToolsInstallType string `xml:"toolsInstallType,omitempty"` AfterPowerOn *bool `xml:"afterPowerOn"` AfterResume *bool `xml:"afterResume"` BeforeGuestStandby *bool `xml:"beforeGuestStandby"` BeforeGuestShutdown *bool `xml:"beforeGuestShutdown"` BeforeGuestReboot *bool `xml:"beforeGuestReboot"` ToolsUpgradePolicy string `xml:"toolsUpgradePolicy,omitempty"` PendingCustomization string `xml:"pendingCustomization,omitempty"` CustomizationKeyId *CryptoKeyId `xml:"customizationKeyId,omitempty"` SyncTimeWithHost *bool `xml:"syncTimeWithHost"` LastInstallInfo *ToolsConfigInfoToolsLastInstallInfo `xml:"lastInstallInfo,omitempty"` } func init() { t["ToolsConfigInfo"] = reflect.TypeOf((*ToolsConfigInfo)(nil)).Elem() } type ToolsConfigInfoToolsLastInstallInfo struct { DynamicData Counter int32 `xml:"counter"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["ToolsConfigInfoToolsLastInstallInfo"] = reflect.TypeOf((*ToolsConfigInfoToolsLastInstallInfo)(nil)).Elem() } type ToolsImageCopyFailed struct { VmToolsUpgradeFault } func init() { t["ToolsImageCopyFailed"] = reflect.TypeOf((*ToolsImageCopyFailed)(nil)).Elem() } type ToolsImageCopyFailedFault ToolsImageCopyFailed func init() { t["ToolsImageCopyFailedFault"] = reflect.TypeOf((*ToolsImageCopyFailedFault)(nil)).Elem() } type ToolsImageNotAvailable struct { VmToolsUpgradeFault } func init() { t["ToolsImageNotAvailable"] = reflect.TypeOf((*ToolsImageNotAvailable)(nil)).Elem() } type ToolsImageNotAvailableFault ToolsImageNotAvailable func init() { t["ToolsImageNotAvailableFault"] = reflect.TypeOf((*ToolsImageNotAvailableFault)(nil)).Elem() } type ToolsImageSignatureCheckFailed struct { VmToolsUpgradeFault } func init() { t["ToolsImageSignatureCheckFailed"] = reflect.TypeOf((*ToolsImageSignatureCheckFailed)(nil)).Elem() } type ToolsImageSignatureCheckFailedFault ToolsImageSignatureCheckFailed func init() { t["ToolsImageSignatureCheckFailedFault"] = reflect.TypeOf((*ToolsImageSignatureCheckFailedFault)(nil)).Elem() } type ToolsInstallationInProgress struct { MigrationFault } func init() { t["ToolsInstallationInProgress"] = reflect.TypeOf((*ToolsInstallationInProgress)(nil)).Elem() } type ToolsInstallationInProgressFault ToolsInstallationInProgress func init() { t["ToolsInstallationInProgressFault"] = reflect.TypeOf((*ToolsInstallationInProgressFault)(nil)).Elem() } type ToolsUnavailable struct { VimFault } func init() { t["ToolsUnavailable"] = reflect.TypeOf((*ToolsUnavailable)(nil)).Elem() } type ToolsUnavailableFault ToolsUnavailable func init() { t["ToolsUnavailableFault"] = reflect.TypeOf((*ToolsUnavailableFault)(nil)).Elem() } type ToolsUpgradeCancelled struct { VmToolsUpgradeFault } func init() { t["ToolsUpgradeCancelled"] = reflect.TypeOf((*ToolsUpgradeCancelled)(nil)).Elem() } type ToolsUpgradeCancelledFault ToolsUpgradeCancelled func init() { t["ToolsUpgradeCancelledFault"] = reflect.TypeOf((*ToolsUpgradeCancelledFault)(nil)).Elem() } type TraversalSpec struct { SelectionSpec Type string `xml:"type"` Path string `xml:"path"` Skip *bool `xml:"skip"` SelectSet []BaseSelectionSpec `xml:"selectSet,omitempty,typeattr"` } func init() { t["TraversalSpec"] = reflect.TypeOf((*TraversalSpec)(nil)).Elem() } type TurnDiskLocatorLedOffRequestType struct { This ManagedObjectReference `xml:"_this"` ScsiDiskUuids []string `xml:"scsiDiskUuids"` } func init() { t["TurnDiskLocatorLedOffRequestType"] = reflect.TypeOf((*TurnDiskLocatorLedOffRequestType)(nil)).Elem() } type TurnDiskLocatorLedOff_Task TurnDiskLocatorLedOffRequestType func init() { t["TurnDiskLocatorLedOff_Task"] = reflect.TypeOf((*TurnDiskLocatorLedOff_Task)(nil)).Elem() } type TurnDiskLocatorLedOff_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type TurnDiskLocatorLedOnRequestType struct { This ManagedObjectReference `xml:"_this"` ScsiDiskUuids []string `xml:"scsiDiskUuids"` } func init() { t["TurnDiskLocatorLedOnRequestType"] = reflect.TypeOf((*TurnDiskLocatorLedOnRequestType)(nil)).Elem() } type TurnDiskLocatorLedOn_Task TurnDiskLocatorLedOnRequestType func init() { t["TurnDiskLocatorLedOn_Task"] = reflect.TypeOf((*TurnDiskLocatorLedOn_Task)(nil)).Elem() } type TurnDiskLocatorLedOn_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type TurnOffFaultToleranceForVMRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["TurnOffFaultToleranceForVMRequestType"] = reflect.TypeOf((*TurnOffFaultToleranceForVMRequestType)(nil)).Elem() } type TurnOffFaultToleranceForVM_Task TurnOffFaultToleranceForVMRequestType func init() { t["TurnOffFaultToleranceForVM_Task"] = reflect.TypeOf((*TurnOffFaultToleranceForVM_Task)(nil)).Elem() } type TurnOffFaultToleranceForVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type TypeDescription struct { Description Key string `xml:"key"` } func init() { t["TypeDescription"] = reflect.TypeOf((*TypeDescription)(nil)).Elem() } type UnSupportedDatastoreForVFlash struct { UnsupportedDatastore DatastoreName string `xml:"datastoreName"` Type string `xml:"type"` } func init() { t["UnSupportedDatastoreForVFlash"] = reflect.TypeOf((*UnSupportedDatastoreForVFlash)(nil)).Elem() } type UnSupportedDatastoreForVFlashFault UnSupportedDatastoreForVFlash func init() { t["UnSupportedDatastoreForVFlashFault"] = reflect.TypeOf((*UnSupportedDatastoreForVFlashFault)(nil)).Elem() } type UnassignUserFromGroup UnassignUserFromGroupRequestType func init() { t["UnassignUserFromGroup"] = reflect.TypeOf((*UnassignUserFromGroup)(nil)).Elem() } type UnassignUserFromGroupRequestType struct { This ManagedObjectReference `xml:"_this"` User string `xml:"user"` Group string `xml:"group"` } func init() { t["UnassignUserFromGroupRequestType"] = reflect.TypeOf((*UnassignUserFromGroupRequestType)(nil)).Elem() } type UnassignUserFromGroupResponse struct { } type UnbindVnic UnbindVnicRequestType func init() { t["UnbindVnic"] = reflect.TypeOf((*UnbindVnic)(nil)).Elem() } type UnbindVnicRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaName string `xml:"iScsiHbaName"` VnicDevice string `xml:"vnicDevice"` Force bool `xml:"force"` } func init() { t["UnbindVnicRequestType"] = reflect.TypeOf((*UnbindVnicRequestType)(nil)).Elem() } type UnbindVnicResponse struct { } type UncommittedUndoableDisk struct { MigrationFault } func init() { t["UncommittedUndoableDisk"] = reflect.TypeOf((*UncommittedUndoableDisk)(nil)).Elem() } type UncommittedUndoableDiskFault UncommittedUndoableDisk func init() { t["UncommittedUndoableDiskFault"] = reflect.TypeOf((*UncommittedUndoableDiskFault)(nil)).Elem() } type UnconfiguredPropertyValue struct { InvalidPropertyValue } func init() { t["UnconfiguredPropertyValue"] = reflect.TypeOf((*UnconfiguredPropertyValue)(nil)).Elem() } type UnconfiguredPropertyValueFault UnconfiguredPropertyValue func init() { t["UnconfiguredPropertyValueFault"] = reflect.TypeOf((*UnconfiguredPropertyValueFault)(nil)).Elem() } type UncustomizableGuest struct { CustomizationFault UncustomizableGuestOS string `xml:"uncustomizableGuestOS"` } func init() { t["UncustomizableGuest"] = reflect.TypeOf((*UncustomizableGuest)(nil)).Elem() } type UncustomizableGuestFault UncustomizableGuest func init() { t["UncustomizableGuestFault"] = reflect.TypeOf((*UncustomizableGuestFault)(nil)).Elem() } type UnexpectedCustomizationFault struct { CustomizationFault } func init() { t["UnexpectedCustomizationFault"] = reflect.TypeOf((*UnexpectedCustomizationFault)(nil)).Elem() } type UnexpectedCustomizationFaultFault UnexpectedCustomizationFault func init() { t["UnexpectedCustomizationFaultFault"] = reflect.TypeOf((*UnexpectedCustomizationFaultFault)(nil)).Elem() } type UnexpectedFault struct { RuntimeFault FaultName string `xml:"faultName"` Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["UnexpectedFault"] = reflect.TypeOf((*UnexpectedFault)(nil)).Elem() } type UnexpectedFaultFault UnexpectedFault func init() { t["UnexpectedFaultFault"] = reflect.TypeOf((*UnexpectedFaultFault)(nil)).Elem() } type UninstallHostPatchRequestType struct { This ManagedObjectReference `xml:"_this"` BulletinIds []string `xml:"bulletinIds,omitempty"` Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` } func init() { t["UninstallHostPatchRequestType"] = reflect.TypeOf((*UninstallHostPatchRequestType)(nil)).Elem() } type UninstallHostPatch_Task UninstallHostPatchRequestType func init() { t["UninstallHostPatch_Task"] = reflect.TypeOf((*UninstallHostPatch_Task)(nil)).Elem() } type UninstallHostPatch_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UninstallIoFilterRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` CompRes ManagedObjectReference `xml:"compRes"` } func init() { t["UninstallIoFilterRequestType"] = reflect.TypeOf((*UninstallIoFilterRequestType)(nil)).Elem() } type UninstallIoFilter_Task UninstallIoFilterRequestType func init() { t["UninstallIoFilter_Task"] = reflect.TypeOf((*UninstallIoFilter_Task)(nil)).Elem() } type UninstallIoFilter_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UninstallService UninstallServiceRequestType func init() { t["UninstallService"] = reflect.TypeOf((*UninstallService)(nil)).Elem() } type UninstallServiceRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` } func init() { t["UninstallServiceRequestType"] = reflect.TypeOf((*UninstallServiceRequestType)(nil)).Elem() } type UninstallServiceResponse struct { } type UnlicensedVirtualMachinesEvent struct { LicenseEvent Unlicensed int32 `xml:"unlicensed"` Available int32 `xml:"available"` } func init() { t["UnlicensedVirtualMachinesEvent"] = reflect.TypeOf((*UnlicensedVirtualMachinesEvent)(nil)).Elem() } type UnlicensedVirtualMachinesFoundEvent struct { LicenseEvent Available int32 `xml:"available"` } func init() { t["UnlicensedVirtualMachinesFoundEvent"] = reflect.TypeOf((*UnlicensedVirtualMachinesFoundEvent)(nil)).Elem() } type UnmapVmfsVolumeExRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid []string `xml:"vmfsUuid"` } func init() { t["UnmapVmfsVolumeExRequestType"] = reflect.TypeOf((*UnmapVmfsVolumeExRequestType)(nil)).Elem() } type UnmapVmfsVolumeEx_Task UnmapVmfsVolumeExRequestType func init() { t["UnmapVmfsVolumeEx_Task"] = reflect.TypeOf((*UnmapVmfsVolumeEx_Task)(nil)).Elem() } type UnmapVmfsVolumeEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UnmountDiskMappingRequestType struct { This ManagedObjectReference `xml:"_this"` Mapping []VsanHostDiskMapping `xml:"mapping"` } func init() { t["UnmountDiskMappingRequestType"] = reflect.TypeOf((*UnmountDiskMappingRequestType)(nil)).Elem() } type UnmountDiskMapping_Task UnmountDiskMappingRequestType func init() { t["UnmountDiskMapping_Task"] = reflect.TypeOf((*UnmountDiskMapping_Task)(nil)).Elem() } type UnmountDiskMapping_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UnmountForceMountedVmfsVolume UnmountForceMountedVmfsVolumeRequestType func init() { t["UnmountForceMountedVmfsVolume"] = reflect.TypeOf((*UnmountForceMountedVmfsVolume)(nil)).Elem() } type UnmountForceMountedVmfsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid string `xml:"vmfsUuid"` } func init() { t["UnmountForceMountedVmfsVolumeRequestType"] = reflect.TypeOf((*UnmountForceMountedVmfsVolumeRequestType)(nil)).Elem() } type UnmountForceMountedVmfsVolumeResponse struct { } type UnmountToolsInstaller UnmountToolsInstallerRequestType func init() { t["UnmountToolsInstaller"] = reflect.TypeOf((*UnmountToolsInstaller)(nil)).Elem() } type UnmountToolsInstallerRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["UnmountToolsInstallerRequestType"] = reflect.TypeOf((*UnmountToolsInstallerRequestType)(nil)).Elem() } type UnmountToolsInstallerResponse struct { } type UnmountVffsVolume UnmountVffsVolumeRequestType func init() { t["UnmountVffsVolume"] = reflect.TypeOf((*UnmountVffsVolume)(nil)).Elem() } type UnmountVffsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` VffsUuid string `xml:"vffsUuid"` } func init() { t["UnmountVffsVolumeRequestType"] = reflect.TypeOf((*UnmountVffsVolumeRequestType)(nil)).Elem() } type UnmountVffsVolumeResponse struct { } type UnmountVmfsVolume UnmountVmfsVolumeRequestType func init() { t["UnmountVmfsVolume"] = reflect.TypeOf((*UnmountVmfsVolume)(nil)).Elem() } type UnmountVmfsVolumeExRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid []string `xml:"vmfsUuid"` } func init() { t["UnmountVmfsVolumeExRequestType"] = reflect.TypeOf((*UnmountVmfsVolumeExRequestType)(nil)).Elem() } type UnmountVmfsVolumeEx_Task UnmountVmfsVolumeExRequestType func init() { t["UnmountVmfsVolumeEx_Task"] = reflect.TypeOf((*UnmountVmfsVolumeEx_Task)(nil)).Elem() } type UnmountVmfsVolumeEx_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UnmountVmfsVolumeRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid string `xml:"vmfsUuid"` } func init() { t["UnmountVmfsVolumeRequestType"] = reflect.TypeOf((*UnmountVmfsVolumeRequestType)(nil)).Elem() } type UnmountVmfsVolumeResponse struct { } type UnrecognizedHost struct { VimFault HostName string `xml:"hostName"` } func init() { t["UnrecognizedHost"] = reflect.TypeOf((*UnrecognizedHost)(nil)).Elem() } type UnrecognizedHostFault UnrecognizedHost func init() { t["UnrecognizedHostFault"] = reflect.TypeOf((*UnrecognizedHostFault)(nil)).Elem() } type UnregisterAndDestroyRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["UnregisterAndDestroyRequestType"] = reflect.TypeOf((*UnregisterAndDestroyRequestType)(nil)).Elem() } type UnregisterAndDestroy_Task UnregisterAndDestroyRequestType func init() { t["UnregisterAndDestroy_Task"] = reflect.TypeOf((*UnregisterAndDestroy_Task)(nil)).Elem() } type UnregisterAndDestroy_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UnregisterExtension UnregisterExtensionRequestType func init() { t["UnregisterExtension"] = reflect.TypeOf((*UnregisterExtension)(nil)).Elem() } type UnregisterExtensionRequestType struct { This ManagedObjectReference `xml:"_this"` ExtensionKey string `xml:"extensionKey"` } func init() { t["UnregisterExtensionRequestType"] = reflect.TypeOf((*UnregisterExtensionRequestType)(nil)).Elem() } type UnregisterExtensionResponse struct { } type UnregisterHealthUpdateProvider UnregisterHealthUpdateProviderRequestType func init() { t["UnregisterHealthUpdateProvider"] = reflect.TypeOf((*UnregisterHealthUpdateProvider)(nil)).Elem() } type UnregisterHealthUpdateProviderRequestType struct { This ManagedObjectReference `xml:"_this"` ProviderId string `xml:"providerId"` } func init() { t["UnregisterHealthUpdateProviderRequestType"] = reflect.TypeOf((*UnregisterHealthUpdateProviderRequestType)(nil)).Elem() } type UnregisterHealthUpdateProviderResponse struct { } type UnregisterVM UnregisterVMRequestType func init() { t["UnregisterVM"] = reflect.TypeOf((*UnregisterVM)(nil)).Elem() } type UnregisterVMRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["UnregisterVMRequestType"] = reflect.TypeOf((*UnregisterVMRequestType)(nil)).Elem() } type UnregisterVMResponse struct { } type UnsharedSwapVMotionNotSupported struct { MigrationFeatureNotSupported } func init() { t["UnsharedSwapVMotionNotSupported"] = reflect.TypeOf((*UnsharedSwapVMotionNotSupported)(nil)).Elem() } type UnsharedSwapVMotionNotSupportedFault UnsharedSwapVMotionNotSupported func init() { t["UnsharedSwapVMotionNotSupportedFault"] = reflect.TypeOf((*UnsharedSwapVMotionNotSupportedFault)(nil)).Elem() } type UnsupportedDatastore struct { VmConfigFault Datastore *ManagedObjectReference `xml:"datastore,omitempty"` } func init() { t["UnsupportedDatastore"] = reflect.TypeOf((*UnsupportedDatastore)(nil)).Elem() } type UnsupportedDatastoreFault BaseUnsupportedDatastore func init() { t["UnsupportedDatastoreFault"] = reflect.TypeOf((*UnsupportedDatastoreFault)(nil)).Elem() } type UnsupportedGuest struct { InvalidVmConfig UnsupportedGuestOS string `xml:"unsupportedGuestOS"` } func init() { t["UnsupportedGuest"] = reflect.TypeOf((*UnsupportedGuest)(nil)).Elem() } type UnsupportedGuestFault UnsupportedGuest func init() { t["UnsupportedGuestFault"] = reflect.TypeOf((*UnsupportedGuestFault)(nil)).Elem() } type UnsupportedVimApiVersion struct { VimFault Version string `xml:"version,omitempty"` } func init() { t["UnsupportedVimApiVersion"] = reflect.TypeOf((*UnsupportedVimApiVersion)(nil)).Elem() } type UnsupportedVimApiVersionFault UnsupportedVimApiVersion func init() { t["UnsupportedVimApiVersionFault"] = reflect.TypeOf((*UnsupportedVimApiVersionFault)(nil)).Elem() } type UnsupportedVmxLocation struct { VmConfigFault } func init() { t["UnsupportedVmxLocation"] = reflect.TypeOf((*UnsupportedVmxLocation)(nil)).Elem() } type UnsupportedVmxLocationFault UnsupportedVmxLocation func init() { t["UnsupportedVmxLocationFault"] = reflect.TypeOf((*UnsupportedVmxLocationFault)(nil)).Elem() } type UnusedVirtualDiskBlocksNotScrubbed struct { DeviceBackingNotSupported } func init() { t["UnusedVirtualDiskBlocksNotScrubbed"] = reflect.TypeOf((*UnusedVirtualDiskBlocksNotScrubbed)(nil)).Elem() } type UnusedVirtualDiskBlocksNotScrubbedFault UnusedVirtualDiskBlocksNotScrubbed func init() { t["UnusedVirtualDiskBlocksNotScrubbedFault"] = reflect.TypeOf((*UnusedVirtualDiskBlocksNotScrubbedFault)(nil)).Elem() } type UpdateAnswerFileRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` ConfigSpec BaseAnswerFileCreateSpec `xml:"configSpec,typeattr"` } func init() { t["UpdateAnswerFileRequestType"] = reflect.TypeOf((*UpdateAnswerFileRequestType)(nil)).Elem() } type UpdateAnswerFile_Task UpdateAnswerFileRequestType func init() { t["UpdateAnswerFile_Task"] = reflect.TypeOf((*UpdateAnswerFile_Task)(nil)).Elem() } type UpdateAnswerFile_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdateAssignedLicense UpdateAssignedLicenseRequestType func init() { t["UpdateAssignedLicense"] = reflect.TypeOf((*UpdateAssignedLicense)(nil)).Elem() } type UpdateAssignedLicenseRequestType struct { This ManagedObjectReference `xml:"_this"` Entity string `xml:"entity"` LicenseKey string `xml:"licenseKey"` EntityDisplayName string `xml:"entityDisplayName,omitempty"` } func init() { t["UpdateAssignedLicenseRequestType"] = reflect.TypeOf((*UpdateAssignedLicenseRequestType)(nil)).Elem() } type UpdateAssignedLicenseResponse struct { Returnval LicenseManagerLicenseInfo `xml:"returnval"` } type UpdateAuthorizationRole UpdateAuthorizationRoleRequestType func init() { t["UpdateAuthorizationRole"] = reflect.TypeOf((*UpdateAuthorizationRole)(nil)).Elem() } type UpdateAuthorizationRoleRequestType struct { This ManagedObjectReference `xml:"_this"` RoleId int32 `xml:"roleId"` NewName string `xml:"newName"` PrivIds []string `xml:"privIds,omitempty"` } func init() { t["UpdateAuthorizationRoleRequestType"] = reflect.TypeOf((*UpdateAuthorizationRoleRequestType)(nil)).Elem() } type UpdateAuthorizationRoleResponse struct { } type UpdateBootDevice UpdateBootDeviceRequestType func init() { t["UpdateBootDevice"] = reflect.TypeOf((*UpdateBootDevice)(nil)).Elem() } type UpdateBootDeviceRequestType struct { This ManagedObjectReference `xml:"_this"` Key string `xml:"key"` } func init() { t["UpdateBootDeviceRequestType"] = reflect.TypeOf((*UpdateBootDeviceRequestType)(nil)).Elem() } type UpdateBootDeviceResponse struct { } type UpdateChildResourceConfiguration UpdateChildResourceConfigurationRequestType func init() { t["UpdateChildResourceConfiguration"] = reflect.TypeOf((*UpdateChildResourceConfiguration)(nil)).Elem() } type UpdateChildResourceConfigurationRequestType struct { This ManagedObjectReference `xml:"_this"` Spec []ResourceConfigSpec `xml:"spec"` } func init() { t["UpdateChildResourceConfigurationRequestType"] = reflect.TypeOf((*UpdateChildResourceConfigurationRequestType)(nil)).Elem() } type UpdateChildResourceConfigurationResponse struct { } type UpdateClusterProfile UpdateClusterProfileRequestType func init() { t["UpdateClusterProfile"] = reflect.TypeOf((*UpdateClusterProfile)(nil)).Elem() } type UpdateClusterProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Config BaseClusterProfileConfigSpec `xml:"config,typeattr"` } func init() { t["UpdateClusterProfileRequestType"] = reflect.TypeOf((*UpdateClusterProfileRequestType)(nil)).Elem() } type UpdateClusterProfileResponse struct { } type UpdateConfig UpdateConfigRequestType func init() { t["UpdateConfig"] = reflect.TypeOf((*UpdateConfig)(nil)).Elem() } type UpdateConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name,omitempty"` Config *ResourceConfigSpec `xml:"config,omitempty"` } func init() { t["UpdateConfigRequestType"] = reflect.TypeOf((*UpdateConfigRequestType)(nil)).Elem() } type UpdateConfigResponse struct { } type UpdateConsoleIpRouteConfig UpdateConsoleIpRouteConfigRequestType func init() { t["UpdateConsoleIpRouteConfig"] = reflect.TypeOf((*UpdateConsoleIpRouteConfig)(nil)).Elem() } type UpdateConsoleIpRouteConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config BaseHostIpRouteConfig `xml:"config,typeattr"` } func init() { t["UpdateConsoleIpRouteConfigRequestType"] = reflect.TypeOf((*UpdateConsoleIpRouteConfigRequestType)(nil)).Elem() } type UpdateConsoleIpRouteConfigResponse struct { } type UpdateCounterLevelMapping UpdateCounterLevelMappingRequestType func init() { t["UpdateCounterLevelMapping"] = reflect.TypeOf((*UpdateCounterLevelMapping)(nil)).Elem() } type UpdateCounterLevelMappingRequestType struct { This ManagedObjectReference `xml:"_this"` CounterLevelMap []PerformanceManagerCounterLevelMapping `xml:"counterLevelMap"` } func init() { t["UpdateCounterLevelMappingRequestType"] = reflect.TypeOf((*UpdateCounterLevelMappingRequestType)(nil)).Elem() } type UpdateCounterLevelMappingResponse struct { } type UpdateDVSHealthCheckConfigRequestType struct { This ManagedObjectReference `xml:"_this"` HealthCheckConfig []BaseDVSHealthCheckConfig `xml:"healthCheckConfig,typeattr"` } func init() { t["UpdateDVSHealthCheckConfigRequestType"] = reflect.TypeOf((*UpdateDVSHealthCheckConfigRequestType)(nil)).Elem() } type UpdateDVSHealthCheckConfig_Task UpdateDVSHealthCheckConfigRequestType func init() { t["UpdateDVSHealthCheckConfig_Task"] = reflect.TypeOf((*UpdateDVSHealthCheckConfig_Task)(nil)).Elem() } type UpdateDVSHealthCheckConfig_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdateDVSLacpGroupConfigRequestType struct { This ManagedObjectReference `xml:"_this"` LacpGroupSpec []VMwareDvsLacpGroupSpec `xml:"lacpGroupSpec"` } func init() { t["UpdateDVSLacpGroupConfigRequestType"] = reflect.TypeOf((*UpdateDVSLacpGroupConfigRequestType)(nil)).Elem() } type UpdateDVSLacpGroupConfig_Task UpdateDVSLacpGroupConfigRequestType func init() { t["UpdateDVSLacpGroupConfig_Task"] = reflect.TypeOf((*UpdateDVSLacpGroupConfig_Task)(nil)).Elem() } type UpdateDVSLacpGroupConfig_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdateDateTime UpdateDateTimeRequestType func init() { t["UpdateDateTime"] = reflect.TypeOf((*UpdateDateTime)(nil)).Elem() } type UpdateDateTimeConfig UpdateDateTimeConfigRequestType func init() { t["UpdateDateTimeConfig"] = reflect.TypeOf((*UpdateDateTimeConfig)(nil)).Elem() } type UpdateDateTimeConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config HostDateTimeConfig `xml:"config"` } func init() { t["UpdateDateTimeConfigRequestType"] = reflect.TypeOf((*UpdateDateTimeConfigRequestType)(nil)).Elem() } type UpdateDateTimeConfigResponse struct { } type UpdateDateTimeRequestType struct { This ManagedObjectReference `xml:"_this"` DateTime time.Time `xml:"dateTime"` } func init() { t["UpdateDateTimeRequestType"] = reflect.TypeOf((*UpdateDateTimeRequestType)(nil)).Elem() } type UpdateDateTimeResponse struct { } type UpdateDefaultPolicy UpdateDefaultPolicyRequestType func init() { t["UpdateDefaultPolicy"] = reflect.TypeOf((*UpdateDefaultPolicy)(nil)).Elem() } type UpdateDefaultPolicyRequestType struct { This ManagedObjectReference `xml:"_this"` DefaultPolicy HostFirewallDefaultPolicy `xml:"defaultPolicy"` } func init() { t["UpdateDefaultPolicyRequestType"] = reflect.TypeOf((*UpdateDefaultPolicyRequestType)(nil)).Elem() } type UpdateDefaultPolicyResponse struct { } type UpdateDiskPartitions UpdateDiskPartitionsRequestType func init() { t["UpdateDiskPartitions"] = reflect.TypeOf((*UpdateDiskPartitions)(nil)).Elem() } type UpdateDiskPartitionsRequestType struct { This ManagedObjectReference `xml:"_this"` DevicePath string `xml:"devicePath"` Spec HostDiskPartitionSpec `xml:"spec"` } func init() { t["UpdateDiskPartitionsRequestType"] = reflect.TypeOf((*UpdateDiskPartitionsRequestType)(nil)).Elem() } type UpdateDiskPartitionsResponse struct { } type UpdateDnsConfig UpdateDnsConfigRequestType func init() { t["UpdateDnsConfig"] = reflect.TypeOf((*UpdateDnsConfig)(nil)).Elem() } type UpdateDnsConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config BaseHostDnsConfig `xml:"config,typeattr"` } func init() { t["UpdateDnsConfigRequestType"] = reflect.TypeOf((*UpdateDnsConfigRequestType)(nil)).Elem() } type UpdateDnsConfigResponse struct { } type UpdateDvsCapability UpdateDvsCapabilityRequestType func init() { t["UpdateDvsCapability"] = reflect.TypeOf((*UpdateDvsCapability)(nil)).Elem() } type UpdateDvsCapabilityRequestType struct { This ManagedObjectReference `xml:"_this"` Capability DVSCapability `xml:"capability"` } func init() { t["UpdateDvsCapabilityRequestType"] = reflect.TypeOf((*UpdateDvsCapabilityRequestType)(nil)).Elem() } type UpdateDvsCapabilityResponse struct { } type UpdateExtension UpdateExtensionRequestType func init() { t["UpdateExtension"] = reflect.TypeOf((*UpdateExtension)(nil)).Elem() } type UpdateExtensionRequestType struct { This ManagedObjectReference `xml:"_this"` Extension Extension `xml:"extension"` } func init() { t["UpdateExtensionRequestType"] = reflect.TypeOf((*UpdateExtensionRequestType)(nil)).Elem() } type UpdateExtensionResponse struct { } type UpdateFlags UpdateFlagsRequestType func init() { t["UpdateFlags"] = reflect.TypeOf((*UpdateFlags)(nil)).Elem() } type UpdateFlagsRequestType struct { This ManagedObjectReference `xml:"_this"` FlagInfo HostFlagInfo `xml:"flagInfo"` } func init() { t["UpdateFlagsRequestType"] = reflect.TypeOf((*UpdateFlagsRequestType)(nil)).Elem() } type UpdateFlagsResponse struct { } type UpdateGraphicsConfig UpdateGraphicsConfigRequestType func init() { t["UpdateGraphicsConfig"] = reflect.TypeOf((*UpdateGraphicsConfig)(nil)).Elem() } type UpdateGraphicsConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config HostGraphicsConfig `xml:"config"` } func init() { t["UpdateGraphicsConfigRequestType"] = reflect.TypeOf((*UpdateGraphicsConfigRequestType)(nil)).Elem() } type UpdateGraphicsConfigResponse struct { } type UpdateHostCustomizationsRequestType struct { This ManagedObjectReference `xml:"_this"` HostToConfigSpecMap []HostProfileManagerHostToConfigSpecMap `xml:"hostToConfigSpecMap,omitempty"` } func init() { t["UpdateHostCustomizationsRequestType"] = reflect.TypeOf((*UpdateHostCustomizationsRequestType)(nil)).Elem() } type UpdateHostCustomizations_Task UpdateHostCustomizationsRequestType func init() { t["UpdateHostCustomizations_Task"] = reflect.TypeOf((*UpdateHostCustomizations_Task)(nil)).Elem() } type UpdateHostCustomizations_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdateHostImageAcceptanceLevel UpdateHostImageAcceptanceLevelRequestType func init() { t["UpdateHostImageAcceptanceLevel"] = reflect.TypeOf((*UpdateHostImageAcceptanceLevel)(nil)).Elem() } type UpdateHostImageAcceptanceLevelRequestType struct { This ManagedObjectReference `xml:"_this"` NewAcceptanceLevel string `xml:"newAcceptanceLevel"` } func init() { t["UpdateHostImageAcceptanceLevelRequestType"] = reflect.TypeOf((*UpdateHostImageAcceptanceLevelRequestType)(nil)).Elem() } type UpdateHostImageAcceptanceLevelResponse struct { } type UpdateHostProfile UpdateHostProfileRequestType func init() { t["UpdateHostProfile"] = reflect.TypeOf((*UpdateHostProfile)(nil)).Elem() } type UpdateHostProfileRequestType struct { This ManagedObjectReference `xml:"_this"` Config BaseHostProfileConfigSpec `xml:"config,typeattr"` } func init() { t["UpdateHostProfileRequestType"] = reflect.TypeOf((*UpdateHostProfileRequestType)(nil)).Elem() } type UpdateHostProfileResponse struct { } type UpdateHostSpecification UpdateHostSpecificationRequestType func init() { t["UpdateHostSpecification"] = reflect.TypeOf((*UpdateHostSpecification)(nil)).Elem() } type UpdateHostSpecificationRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` HostSpec HostSpecification `xml:"hostSpec"` } func init() { t["UpdateHostSpecificationRequestType"] = reflect.TypeOf((*UpdateHostSpecificationRequestType)(nil)).Elem() } type UpdateHostSpecificationResponse struct { } type UpdateHostSubSpecification UpdateHostSubSpecificationRequestType func init() { t["UpdateHostSubSpecification"] = reflect.TypeOf((*UpdateHostSubSpecification)(nil)).Elem() } type UpdateHostSubSpecificationRequestType struct { This ManagedObjectReference `xml:"_this"` Host ManagedObjectReference `xml:"host"` HostSubSpec HostSubSpecification `xml:"hostSubSpec"` } func init() { t["UpdateHostSubSpecificationRequestType"] = reflect.TypeOf((*UpdateHostSubSpecificationRequestType)(nil)).Elem() } type UpdateHostSubSpecificationResponse struct { } type UpdateInternetScsiAdvancedOptions UpdateInternetScsiAdvancedOptionsRequestType func init() { t["UpdateInternetScsiAdvancedOptions"] = reflect.TypeOf((*UpdateInternetScsiAdvancedOptions)(nil)).Elem() } type UpdateInternetScsiAdvancedOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` TargetSet *HostInternetScsiHbaTargetSet `xml:"targetSet,omitempty"` Options []HostInternetScsiHbaParamValue `xml:"options"` } func init() { t["UpdateInternetScsiAdvancedOptionsRequestType"] = reflect.TypeOf((*UpdateInternetScsiAdvancedOptionsRequestType)(nil)).Elem() } type UpdateInternetScsiAdvancedOptionsResponse struct { } type UpdateInternetScsiAlias UpdateInternetScsiAliasRequestType func init() { t["UpdateInternetScsiAlias"] = reflect.TypeOf((*UpdateInternetScsiAlias)(nil)).Elem() } type UpdateInternetScsiAliasRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` IScsiAlias string `xml:"iScsiAlias"` } func init() { t["UpdateInternetScsiAliasRequestType"] = reflect.TypeOf((*UpdateInternetScsiAliasRequestType)(nil)).Elem() } type UpdateInternetScsiAliasResponse struct { } type UpdateInternetScsiAuthenticationProperties UpdateInternetScsiAuthenticationPropertiesRequestType func init() { t["UpdateInternetScsiAuthenticationProperties"] = reflect.TypeOf((*UpdateInternetScsiAuthenticationProperties)(nil)).Elem() } type UpdateInternetScsiAuthenticationPropertiesRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` AuthenticationProperties HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties"` TargetSet *HostInternetScsiHbaTargetSet `xml:"targetSet,omitempty"` } func init() { t["UpdateInternetScsiAuthenticationPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiAuthenticationPropertiesRequestType)(nil)).Elem() } type UpdateInternetScsiAuthenticationPropertiesResponse struct { } type UpdateInternetScsiDigestProperties UpdateInternetScsiDigestPropertiesRequestType func init() { t["UpdateInternetScsiDigestProperties"] = reflect.TypeOf((*UpdateInternetScsiDigestProperties)(nil)).Elem() } type UpdateInternetScsiDigestPropertiesRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` TargetSet *HostInternetScsiHbaTargetSet `xml:"targetSet,omitempty"` DigestProperties HostInternetScsiHbaDigestProperties `xml:"digestProperties"` } func init() { t["UpdateInternetScsiDigestPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiDigestPropertiesRequestType)(nil)).Elem() } type UpdateInternetScsiDigestPropertiesResponse struct { } type UpdateInternetScsiDiscoveryProperties UpdateInternetScsiDiscoveryPropertiesRequestType func init() { t["UpdateInternetScsiDiscoveryProperties"] = reflect.TypeOf((*UpdateInternetScsiDiscoveryProperties)(nil)).Elem() } type UpdateInternetScsiDiscoveryPropertiesRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` DiscoveryProperties HostInternetScsiHbaDiscoveryProperties `xml:"discoveryProperties"` } func init() { t["UpdateInternetScsiDiscoveryPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiDiscoveryPropertiesRequestType)(nil)).Elem() } type UpdateInternetScsiDiscoveryPropertiesResponse struct { } type UpdateInternetScsiIPProperties UpdateInternetScsiIPPropertiesRequestType func init() { t["UpdateInternetScsiIPProperties"] = reflect.TypeOf((*UpdateInternetScsiIPProperties)(nil)).Elem() } type UpdateInternetScsiIPPropertiesRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` IpProperties HostInternetScsiHbaIPProperties `xml:"ipProperties"` } func init() { t["UpdateInternetScsiIPPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiIPPropertiesRequestType)(nil)).Elem() } type UpdateInternetScsiIPPropertiesResponse struct { } type UpdateInternetScsiName UpdateInternetScsiNameRequestType func init() { t["UpdateInternetScsiName"] = reflect.TypeOf((*UpdateInternetScsiName)(nil)).Elem() } type UpdateInternetScsiNameRequestType struct { This ManagedObjectReference `xml:"_this"` IScsiHbaDevice string `xml:"iScsiHbaDevice"` IScsiName string `xml:"iScsiName"` } func init() { t["UpdateInternetScsiNameRequestType"] = reflect.TypeOf((*UpdateInternetScsiNameRequestType)(nil)).Elem() } type UpdateInternetScsiNameResponse struct { } type UpdateIpConfig UpdateIpConfigRequestType func init() { t["UpdateIpConfig"] = reflect.TypeOf((*UpdateIpConfig)(nil)).Elem() } type UpdateIpConfigRequestType struct { This ManagedObjectReference `xml:"_this"` IpConfig HostIpConfig `xml:"ipConfig"` } func init() { t["UpdateIpConfigRequestType"] = reflect.TypeOf((*UpdateIpConfigRequestType)(nil)).Elem() } type UpdateIpConfigResponse struct { } type UpdateIpPool UpdateIpPoolRequestType func init() { t["UpdateIpPool"] = reflect.TypeOf((*UpdateIpPool)(nil)).Elem() } type UpdateIpPoolRequestType struct { This ManagedObjectReference `xml:"_this"` Dc ManagedObjectReference `xml:"dc"` Pool IpPool `xml:"pool"` } func init() { t["UpdateIpPoolRequestType"] = reflect.TypeOf((*UpdateIpPoolRequestType)(nil)).Elem() } type UpdateIpPoolResponse struct { } type UpdateIpRouteConfig UpdateIpRouteConfigRequestType func init() { t["UpdateIpRouteConfig"] = reflect.TypeOf((*UpdateIpRouteConfig)(nil)).Elem() } type UpdateIpRouteConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config BaseHostIpRouteConfig `xml:"config,typeattr"` } func init() { t["UpdateIpRouteConfigRequestType"] = reflect.TypeOf((*UpdateIpRouteConfigRequestType)(nil)).Elem() } type UpdateIpRouteConfigResponse struct { } type UpdateIpRouteTableConfig UpdateIpRouteTableConfigRequestType func init() { t["UpdateIpRouteTableConfig"] = reflect.TypeOf((*UpdateIpRouteTableConfig)(nil)).Elem() } type UpdateIpRouteTableConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config HostIpRouteTableConfig `xml:"config"` } func init() { t["UpdateIpRouteTableConfigRequestType"] = reflect.TypeOf((*UpdateIpRouteTableConfigRequestType)(nil)).Elem() } type UpdateIpRouteTableConfigResponse struct { } type UpdateIpmi UpdateIpmiRequestType func init() { t["UpdateIpmi"] = reflect.TypeOf((*UpdateIpmi)(nil)).Elem() } type UpdateIpmiRequestType struct { This ManagedObjectReference `xml:"_this"` IpmiInfo HostIpmiInfo `xml:"ipmiInfo"` } func init() { t["UpdateIpmiRequestType"] = reflect.TypeOf((*UpdateIpmiRequestType)(nil)).Elem() } type UpdateIpmiResponse struct { } type UpdateKmipServer UpdateKmipServerRequestType func init() { t["UpdateKmipServer"] = reflect.TypeOf((*UpdateKmipServer)(nil)).Elem() } type UpdateKmipServerRequestType struct { This ManagedObjectReference `xml:"_this"` Server KmipServerSpec `xml:"server"` } func init() { t["UpdateKmipServerRequestType"] = reflect.TypeOf((*UpdateKmipServerRequestType)(nil)).Elem() } type UpdateKmipServerResponse struct { } type UpdateKmsSignedCsrClientCert UpdateKmsSignedCsrClientCertRequestType func init() { t["UpdateKmsSignedCsrClientCert"] = reflect.TypeOf((*UpdateKmsSignedCsrClientCert)(nil)).Elem() } type UpdateKmsSignedCsrClientCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` Certificate string `xml:"certificate"` } func init() { t["UpdateKmsSignedCsrClientCertRequestType"] = reflect.TypeOf((*UpdateKmsSignedCsrClientCertRequestType)(nil)).Elem() } type UpdateKmsSignedCsrClientCertResponse struct { } type UpdateLicense UpdateLicenseRequestType func init() { t["UpdateLicense"] = reflect.TypeOf((*UpdateLicense)(nil)).Elem() } type UpdateLicenseLabel UpdateLicenseLabelRequestType func init() { t["UpdateLicenseLabel"] = reflect.TypeOf((*UpdateLicenseLabel)(nil)).Elem() } type UpdateLicenseLabelRequestType struct { This ManagedObjectReference `xml:"_this"` LicenseKey string `xml:"licenseKey"` LabelKey string `xml:"labelKey"` LabelValue string `xml:"labelValue"` } func init() { t["UpdateLicenseLabelRequestType"] = reflect.TypeOf((*UpdateLicenseLabelRequestType)(nil)).Elem() } type UpdateLicenseLabelResponse struct { } type UpdateLicenseRequestType struct { This ManagedObjectReference `xml:"_this"` LicenseKey string `xml:"licenseKey"` Labels []KeyValue `xml:"labels,omitempty"` } func init() { t["UpdateLicenseRequestType"] = reflect.TypeOf((*UpdateLicenseRequestType)(nil)).Elem() } type UpdateLicenseResponse struct { Returnval LicenseManagerLicenseInfo `xml:"returnval"` } type UpdateLinkedChildren UpdateLinkedChildrenRequestType func init() { t["UpdateLinkedChildren"] = reflect.TypeOf((*UpdateLinkedChildren)(nil)).Elem() } type UpdateLinkedChildrenRequestType struct { This ManagedObjectReference `xml:"_this"` AddChangeSet []VirtualAppLinkInfo `xml:"addChangeSet,omitempty"` RemoveSet []ManagedObjectReference `xml:"removeSet,omitempty"` } func init() { t["UpdateLinkedChildrenRequestType"] = reflect.TypeOf((*UpdateLinkedChildrenRequestType)(nil)).Elem() } type UpdateLinkedChildrenResponse struct { } type UpdateLocalSwapDatastore UpdateLocalSwapDatastoreRequestType func init() { t["UpdateLocalSwapDatastore"] = reflect.TypeOf((*UpdateLocalSwapDatastore)(nil)).Elem() } type UpdateLocalSwapDatastoreRequestType struct { This ManagedObjectReference `xml:"_this"` Datastore *ManagedObjectReference `xml:"datastore,omitempty"` } func init() { t["UpdateLocalSwapDatastoreRequestType"] = reflect.TypeOf((*UpdateLocalSwapDatastoreRequestType)(nil)).Elem() } type UpdateLocalSwapDatastoreResponse struct { } type UpdateLockdownExceptions UpdateLockdownExceptionsRequestType func init() { t["UpdateLockdownExceptions"] = reflect.TypeOf((*UpdateLockdownExceptions)(nil)).Elem() } type UpdateLockdownExceptionsRequestType struct { This ManagedObjectReference `xml:"_this"` Users []string `xml:"users,omitempty"` } func init() { t["UpdateLockdownExceptionsRequestType"] = reflect.TypeOf((*UpdateLockdownExceptionsRequestType)(nil)).Elem() } type UpdateLockdownExceptionsResponse struct { } type UpdateModuleOptionString UpdateModuleOptionStringRequestType func init() { t["UpdateModuleOptionString"] = reflect.TypeOf((*UpdateModuleOptionString)(nil)).Elem() } type UpdateModuleOptionStringRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Options string `xml:"options"` } func init() { t["UpdateModuleOptionStringRequestType"] = reflect.TypeOf((*UpdateModuleOptionStringRequestType)(nil)).Elem() } type UpdateModuleOptionStringResponse struct { } type UpdateNetworkConfig UpdateNetworkConfigRequestType func init() { t["UpdateNetworkConfig"] = reflect.TypeOf((*UpdateNetworkConfig)(nil)).Elem() } type UpdateNetworkConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config HostNetworkConfig `xml:"config"` ChangeMode string `xml:"changeMode"` } func init() { t["UpdateNetworkConfigRequestType"] = reflect.TypeOf((*UpdateNetworkConfigRequestType)(nil)).Elem() } type UpdateNetworkConfigResponse struct { Returnval HostNetworkConfigResult `xml:"returnval"` } type UpdateNetworkResourcePool UpdateNetworkResourcePoolRequestType func init() { t["UpdateNetworkResourcePool"] = reflect.TypeOf((*UpdateNetworkResourcePool)(nil)).Elem() } type UpdateNetworkResourcePoolRequestType struct { This ManagedObjectReference `xml:"_this"` ConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"configSpec"` } func init() { t["UpdateNetworkResourcePoolRequestType"] = reflect.TypeOf((*UpdateNetworkResourcePoolRequestType)(nil)).Elem() } type UpdateNetworkResourcePoolResponse struct { } type UpdateOptions UpdateOptionsRequestType func init() { t["UpdateOptions"] = reflect.TypeOf((*UpdateOptions)(nil)).Elem() } type UpdateOptionsRequestType struct { This ManagedObjectReference `xml:"_this"` ChangedValue []BaseOptionValue `xml:"changedValue,typeattr"` } func init() { t["UpdateOptionsRequestType"] = reflect.TypeOf((*UpdateOptionsRequestType)(nil)).Elem() } type UpdateOptionsResponse struct { } type UpdatePassthruConfig UpdatePassthruConfigRequestType func init() { t["UpdatePassthruConfig"] = reflect.TypeOf((*UpdatePassthruConfig)(nil)).Elem() } type UpdatePassthruConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Config []BaseHostPciPassthruConfig `xml:"config,typeattr"` } func init() { t["UpdatePassthruConfigRequestType"] = reflect.TypeOf((*UpdatePassthruConfigRequestType)(nil)).Elem() } type UpdatePassthruConfigResponse struct { } type UpdatePerfInterval UpdatePerfIntervalRequestType func init() { t["UpdatePerfInterval"] = reflect.TypeOf((*UpdatePerfInterval)(nil)).Elem() } type UpdatePerfIntervalRequestType struct { This ManagedObjectReference `xml:"_this"` Interval PerfInterval `xml:"interval"` } func init() { t["UpdatePerfIntervalRequestType"] = reflect.TypeOf((*UpdatePerfIntervalRequestType)(nil)).Elem() } type UpdatePerfIntervalResponse struct { } type UpdatePhysicalNicLinkSpeed UpdatePhysicalNicLinkSpeedRequestType func init() { t["UpdatePhysicalNicLinkSpeed"] = reflect.TypeOf((*UpdatePhysicalNicLinkSpeed)(nil)).Elem() } type UpdatePhysicalNicLinkSpeedRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` LinkSpeed *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"` } func init() { t["UpdatePhysicalNicLinkSpeedRequestType"] = reflect.TypeOf((*UpdatePhysicalNicLinkSpeedRequestType)(nil)).Elem() } type UpdatePhysicalNicLinkSpeedResponse struct { } type UpdatePortGroup UpdatePortGroupRequestType func init() { t["UpdatePortGroup"] = reflect.TypeOf((*UpdatePortGroup)(nil)).Elem() } type UpdatePortGroupRequestType struct { This ManagedObjectReference `xml:"_this"` PgName string `xml:"pgName"` Portgrp HostPortGroupSpec `xml:"portgrp"` } func init() { t["UpdatePortGroupRequestType"] = reflect.TypeOf((*UpdatePortGroupRequestType)(nil)).Elem() } type UpdatePortGroupResponse struct { } type UpdateProgress UpdateProgressRequestType func init() { t["UpdateProgress"] = reflect.TypeOf((*UpdateProgress)(nil)).Elem() } type UpdateProgressRequestType struct { This ManagedObjectReference `xml:"_this"` PercentDone int32 `xml:"percentDone"` } func init() { t["UpdateProgressRequestType"] = reflect.TypeOf((*UpdateProgressRequestType)(nil)).Elem() } type UpdateProgressResponse struct { } type UpdateReferenceHost UpdateReferenceHostRequestType func init() { t["UpdateReferenceHost"] = reflect.TypeOf((*UpdateReferenceHost)(nil)).Elem() } type UpdateReferenceHostRequestType struct { This ManagedObjectReference `xml:"_this"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["UpdateReferenceHostRequestType"] = reflect.TypeOf((*UpdateReferenceHostRequestType)(nil)).Elem() } type UpdateReferenceHostResponse struct { } type UpdateRuleset UpdateRulesetRequestType func init() { t["UpdateRuleset"] = reflect.TypeOf((*UpdateRuleset)(nil)).Elem() } type UpdateRulesetRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` Spec HostFirewallRulesetRulesetSpec `xml:"spec"` } func init() { t["UpdateRulesetRequestType"] = reflect.TypeOf((*UpdateRulesetRequestType)(nil)).Elem() } type UpdateRulesetResponse struct { } type UpdateScsiLunDisplayName UpdateScsiLunDisplayNameRequestType func init() { t["UpdateScsiLunDisplayName"] = reflect.TypeOf((*UpdateScsiLunDisplayName)(nil)).Elem() } type UpdateScsiLunDisplayNameRequestType struct { This ManagedObjectReference `xml:"_this"` LunUuid string `xml:"lunUuid"` DisplayName string `xml:"displayName"` } func init() { t["UpdateScsiLunDisplayNameRequestType"] = reflect.TypeOf((*UpdateScsiLunDisplayNameRequestType)(nil)).Elem() } type UpdateScsiLunDisplayNameResponse struct { } type UpdateSelfSignedClientCert UpdateSelfSignedClientCertRequestType func init() { t["UpdateSelfSignedClientCert"] = reflect.TypeOf((*UpdateSelfSignedClientCert)(nil)).Elem() } type UpdateSelfSignedClientCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` Certificate string `xml:"certificate"` } func init() { t["UpdateSelfSignedClientCertRequestType"] = reflect.TypeOf((*UpdateSelfSignedClientCertRequestType)(nil)).Elem() } type UpdateSelfSignedClientCertResponse struct { } type UpdateServiceConsoleVirtualNic UpdateServiceConsoleVirtualNicRequestType func init() { t["UpdateServiceConsoleVirtualNic"] = reflect.TypeOf((*UpdateServiceConsoleVirtualNic)(nil)).Elem() } type UpdateServiceConsoleVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` Nic HostVirtualNicSpec `xml:"nic"` } func init() { t["UpdateServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*UpdateServiceConsoleVirtualNicRequestType)(nil)).Elem() } type UpdateServiceConsoleVirtualNicResponse struct { } type UpdateServiceMessage UpdateServiceMessageRequestType func init() { t["UpdateServiceMessage"] = reflect.TypeOf((*UpdateServiceMessage)(nil)).Elem() } type UpdateServiceMessageRequestType struct { This ManagedObjectReference `xml:"_this"` Message string `xml:"message"` } func init() { t["UpdateServiceMessageRequestType"] = reflect.TypeOf((*UpdateServiceMessageRequestType)(nil)).Elem() } type UpdateServiceMessageResponse struct { } type UpdateServicePolicy UpdateServicePolicyRequestType func init() { t["UpdateServicePolicy"] = reflect.TypeOf((*UpdateServicePolicy)(nil)).Elem() } type UpdateServicePolicyRequestType struct { This ManagedObjectReference `xml:"_this"` Id string `xml:"id"` Policy string `xml:"policy"` } func init() { t["UpdateServicePolicyRequestType"] = reflect.TypeOf((*UpdateServicePolicyRequestType)(nil)).Elem() } type UpdateServicePolicyResponse struct { } type UpdateSet struct { DynamicData Version string `xml:"version"` FilterSet []PropertyFilterUpdate `xml:"filterSet,omitempty"` Truncated *bool `xml:"truncated"` } func init() { t["UpdateSet"] = reflect.TypeOf((*UpdateSet)(nil)).Elem() } type UpdateSoftwareInternetScsiEnabled UpdateSoftwareInternetScsiEnabledRequestType func init() { t["UpdateSoftwareInternetScsiEnabled"] = reflect.TypeOf((*UpdateSoftwareInternetScsiEnabled)(nil)).Elem() } type UpdateSoftwareInternetScsiEnabledRequestType struct { This ManagedObjectReference `xml:"_this"` Enabled bool `xml:"enabled"` } func init() { t["UpdateSoftwareInternetScsiEnabledRequestType"] = reflect.TypeOf((*UpdateSoftwareInternetScsiEnabledRequestType)(nil)).Elem() } type UpdateSoftwareInternetScsiEnabledResponse struct { } type UpdateSystemResources UpdateSystemResourcesRequestType func init() { t["UpdateSystemResources"] = reflect.TypeOf((*UpdateSystemResources)(nil)).Elem() } type UpdateSystemResourcesRequestType struct { This ManagedObjectReference `xml:"_this"` ResourceInfo HostSystemResourceInfo `xml:"resourceInfo"` } func init() { t["UpdateSystemResourcesRequestType"] = reflect.TypeOf((*UpdateSystemResourcesRequestType)(nil)).Elem() } type UpdateSystemResourcesResponse struct { } type UpdateSystemSwapConfiguration UpdateSystemSwapConfigurationRequestType func init() { t["UpdateSystemSwapConfiguration"] = reflect.TypeOf((*UpdateSystemSwapConfiguration)(nil)).Elem() } type UpdateSystemSwapConfigurationRequestType struct { This ManagedObjectReference `xml:"_this"` SysSwapConfig HostSystemSwapConfiguration `xml:"sysSwapConfig"` } func init() { t["UpdateSystemSwapConfigurationRequestType"] = reflect.TypeOf((*UpdateSystemSwapConfigurationRequestType)(nil)).Elem() } type UpdateSystemSwapConfigurationResponse struct { } type UpdateSystemUsers UpdateSystemUsersRequestType func init() { t["UpdateSystemUsers"] = reflect.TypeOf((*UpdateSystemUsers)(nil)).Elem() } type UpdateSystemUsersRequestType struct { This ManagedObjectReference `xml:"_this"` Users []string `xml:"users,omitempty"` } func init() { t["UpdateSystemUsersRequestType"] = reflect.TypeOf((*UpdateSystemUsersRequestType)(nil)).Elem() } type UpdateSystemUsersResponse struct { } type UpdateUser UpdateUserRequestType func init() { t["UpdateUser"] = reflect.TypeOf((*UpdateUser)(nil)).Elem() } type UpdateUserRequestType struct { This ManagedObjectReference `xml:"_this"` User BaseHostAccountSpec `xml:"user,typeattr"` } func init() { t["UpdateUserRequestType"] = reflect.TypeOf((*UpdateUserRequestType)(nil)).Elem() } type UpdateUserResponse struct { } type UpdateVAppConfig UpdateVAppConfigRequestType func init() { t["UpdateVAppConfig"] = reflect.TypeOf((*UpdateVAppConfig)(nil)).Elem() } type UpdateVAppConfigRequestType struct { This ManagedObjectReference `xml:"_this"` Spec VAppConfigSpec `xml:"spec"` } func init() { t["UpdateVAppConfigRequestType"] = reflect.TypeOf((*UpdateVAppConfigRequestType)(nil)).Elem() } type UpdateVAppConfigResponse struct { } type UpdateVVolVirtualMachineFilesRequestType struct { This ManagedObjectReference `xml:"_this"` FailoverPair []DatastoreVVolContainerFailoverPair `xml:"failoverPair,omitempty"` } func init() { t["UpdateVVolVirtualMachineFilesRequestType"] = reflect.TypeOf((*UpdateVVolVirtualMachineFilesRequestType)(nil)).Elem() } type UpdateVVolVirtualMachineFiles_Task UpdateVVolVirtualMachineFilesRequestType func init() { t["UpdateVVolVirtualMachineFiles_Task"] = reflect.TypeOf((*UpdateVVolVirtualMachineFiles_Task)(nil)).Elem() } type UpdateVVolVirtualMachineFiles_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdateVirtualMachineFilesRequestType struct { This ManagedObjectReference `xml:"_this"` MountPathDatastoreMapping []DatastoreMountPathDatastorePair `xml:"mountPathDatastoreMapping"` } func init() { t["UpdateVirtualMachineFilesRequestType"] = reflect.TypeOf((*UpdateVirtualMachineFilesRequestType)(nil)).Elem() } type UpdateVirtualMachineFilesResult struct { DynamicData FailedVmFile []UpdateVirtualMachineFilesResultFailedVmFileInfo `xml:"failedVmFile,omitempty"` } func init() { t["UpdateVirtualMachineFilesResult"] = reflect.TypeOf((*UpdateVirtualMachineFilesResult)(nil)).Elem() } type UpdateVirtualMachineFilesResultFailedVmFileInfo struct { DynamicData VmFile string `xml:"vmFile"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["UpdateVirtualMachineFilesResultFailedVmFileInfo"] = reflect.TypeOf((*UpdateVirtualMachineFilesResultFailedVmFileInfo)(nil)).Elem() } type UpdateVirtualMachineFiles_Task UpdateVirtualMachineFilesRequestType func init() { t["UpdateVirtualMachineFiles_Task"] = reflect.TypeOf((*UpdateVirtualMachineFiles_Task)(nil)).Elem() } type UpdateVirtualMachineFiles_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdateVirtualNic UpdateVirtualNicRequestType func init() { t["UpdateVirtualNic"] = reflect.TypeOf((*UpdateVirtualNic)(nil)).Elem() } type UpdateVirtualNicRequestType struct { This ManagedObjectReference `xml:"_this"` Device string `xml:"device"` Nic HostVirtualNicSpec `xml:"nic"` } func init() { t["UpdateVirtualNicRequestType"] = reflect.TypeOf((*UpdateVirtualNicRequestType)(nil)).Elem() } type UpdateVirtualNicResponse struct { } type UpdateVirtualSwitch UpdateVirtualSwitchRequestType func init() { t["UpdateVirtualSwitch"] = reflect.TypeOf((*UpdateVirtualSwitch)(nil)).Elem() } type UpdateVirtualSwitchRequestType struct { This ManagedObjectReference `xml:"_this"` VswitchName string `xml:"vswitchName"` Spec HostVirtualSwitchSpec `xml:"spec"` } func init() { t["UpdateVirtualSwitchRequestType"] = reflect.TypeOf((*UpdateVirtualSwitchRequestType)(nil)).Elem() } type UpdateVirtualSwitchResponse struct { } type UpdateVmfsUnmapPriority UpdateVmfsUnmapPriorityRequestType func init() { t["UpdateVmfsUnmapPriority"] = reflect.TypeOf((*UpdateVmfsUnmapPriority)(nil)).Elem() } type UpdateVmfsUnmapPriorityRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsUuid string `xml:"vmfsUuid"` UnmapPriority string `xml:"unmapPriority"` } func init() { t["UpdateVmfsUnmapPriorityRequestType"] = reflect.TypeOf((*UpdateVmfsUnmapPriorityRequestType)(nil)).Elem() } type UpdateVmfsUnmapPriorityResponse struct { } type UpdateVsanRequestType struct { This ManagedObjectReference `xml:"_this"` Config VsanHostConfigInfo `xml:"config"` } func init() { t["UpdateVsanRequestType"] = reflect.TypeOf((*UpdateVsanRequestType)(nil)).Elem() } type UpdateVsan_Task UpdateVsanRequestType func init() { t["UpdateVsan_Task"] = reflect.TypeOf((*UpdateVsan_Task)(nil)).Elem() } type UpdateVsan_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpdatedAgentBeingRestartedEvent struct { HostEvent } func init() { t["UpdatedAgentBeingRestartedEvent"] = reflect.TypeOf((*UpdatedAgentBeingRestartedEvent)(nil)).Elem() } type UpgradeEvent struct { Event Message string `xml:"message"` } func init() { t["UpgradeEvent"] = reflect.TypeOf((*UpgradeEvent)(nil)).Elem() } type UpgradeIoFilterRequestType struct { This ManagedObjectReference `xml:"_this"` FilterId string `xml:"filterId"` CompRes ManagedObjectReference `xml:"compRes"` VibUrl string `xml:"vibUrl"` } func init() { t["UpgradeIoFilterRequestType"] = reflect.TypeOf((*UpgradeIoFilterRequestType)(nil)).Elem() } type UpgradeIoFilter_Task UpgradeIoFilterRequestType func init() { t["UpgradeIoFilter_Task"] = reflect.TypeOf((*UpgradeIoFilter_Task)(nil)).Elem() } type UpgradeIoFilter_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpgradeToolsRequestType struct { This ManagedObjectReference `xml:"_this"` InstallerOptions string `xml:"installerOptions,omitempty"` } func init() { t["UpgradeToolsRequestType"] = reflect.TypeOf((*UpgradeToolsRequestType)(nil)).Elem() } type UpgradeTools_Task UpgradeToolsRequestType func init() { t["UpgradeTools_Task"] = reflect.TypeOf((*UpgradeTools_Task)(nil)).Elem() } type UpgradeTools_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpgradeVMRequestType struct { This ManagedObjectReference `xml:"_this"` Version string `xml:"version,omitempty"` } func init() { t["UpgradeVMRequestType"] = reflect.TypeOf((*UpgradeVMRequestType)(nil)).Elem() } type UpgradeVM_Task UpgradeVMRequestType func init() { t["UpgradeVM_Task"] = reflect.TypeOf((*UpgradeVM_Task)(nil)).Elem() } type UpgradeVM_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } type UpgradeVmLayout UpgradeVmLayoutRequestType func init() { t["UpgradeVmLayout"] = reflect.TypeOf((*UpgradeVmLayout)(nil)).Elem() } type UpgradeVmLayoutRequestType struct { This ManagedObjectReference `xml:"_this"` } func init() { t["UpgradeVmLayoutRequestType"] = reflect.TypeOf((*UpgradeVmLayoutRequestType)(nil)).Elem() } type UpgradeVmLayoutResponse struct { } type UpgradeVmfs UpgradeVmfsRequestType func init() { t["UpgradeVmfs"] = reflect.TypeOf((*UpgradeVmfs)(nil)).Elem() } type UpgradeVmfsRequestType struct { This ManagedObjectReference `xml:"_this"` VmfsPath string `xml:"vmfsPath"` } func init() { t["UpgradeVmfsRequestType"] = reflect.TypeOf((*UpgradeVmfsRequestType)(nil)).Elem() } type UpgradeVmfsResponse struct { } type UpgradeVsanObjects UpgradeVsanObjectsRequestType func init() { t["UpgradeVsanObjects"] = reflect.TypeOf((*UpgradeVsanObjects)(nil)).Elem() } type UpgradeVsanObjectsRequestType struct { This ManagedObjectReference `xml:"_this"` Uuids []string `xml:"uuids"` NewVersion int32 `xml:"newVersion"` } func init() { t["UpgradeVsanObjectsRequestType"] = reflect.TypeOf((*UpgradeVsanObjectsRequestType)(nil)).Elem() } type UpgradeVsanObjectsResponse struct { Returnval []HostVsanInternalSystemVsanObjectOperationResult `xml:"returnval,omitempty"` } type UplinkPortMtuNotSupportEvent struct { DvsHealthStatusChangeEvent } func init() { t["UplinkPortMtuNotSupportEvent"] = reflect.TypeOf((*UplinkPortMtuNotSupportEvent)(nil)).Elem() } type UplinkPortMtuSupportEvent struct { DvsHealthStatusChangeEvent } func init() { t["UplinkPortMtuSupportEvent"] = reflect.TypeOf((*UplinkPortMtuSupportEvent)(nil)).Elem() } type UplinkPortVlanTrunkedEvent struct { DvsHealthStatusChangeEvent } func init() { t["UplinkPortVlanTrunkedEvent"] = reflect.TypeOf((*UplinkPortVlanTrunkedEvent)(nil)).Elem() } type UplinkPortVlanUntrunkedEvent struct { DvsHealthStatusChangeEvent } func init() { t["UplinkPortVlanUntrunkedEvent"] = reflect.TypeOf((*UplinkPortVlanUntrunkedEvent)(nil)).Elem() } type UploadClientCert UploadClientCertRequestType func init() { t["UploadClientCert"] = reflect.TypeOf((*UploadClientCert)(nil)).Elem() } type UploadClientCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` Certificate string `xml:"certificate"` PrivateKey string `xml:"privateKey"` } func init() { t["UploadClientCertRequestType"] = reflect.TypeOf((*UploadClientCertRequestType)(nil)).Elem() } type UploadClientCertResponse struct { } type UploadKmipServerCert UploadKmipServerCertRequestType func init() { t["UploadKmipServerCert"] = reflect.TypeOf((*UploadKmipServerCert)(nil)).Elem() } type UploadKmipServerCertRequestType struct { This ManagedObjectReference `xml:"_this"` Cluster KeyProviderId `xml:"cluster"` Certificate string `xml:"certificate"` } func init() { t["UploadKmipServerCertRequestType"] = reflect.TypeOf((*UploadKmipServerCertRequestType)(nil)).Elem() } type UploadKmipServerCertResponse struct { } type UsbScanCodeSpec struct { DynamicData KeyEvents []UsbScanCodeSpecKeyEvent `xml:"keyEvents"` } func init() { t["UsbScanCodeSpec"] = reflect.TypeOf((*UsbScanCodeSpec)(nil)).Elem() } type UsbScanCodeSpecKeyEvent struct { DynamicData UsbHidCode int32 `xml:"usbHidCode"` Modifiers *UsbScanCodeSpecModifierType `xml:"modifiers,omitempty"` } func init() { t["UsbScanCodeSpecKeyEvent"] = reflect.TypeOf((*UsbScanCodeSpecKeyEvent)(nil)).Elem() } type UsbScanCodeSpecModifierType struct { DynamicData LeftControl *bool `xml:"leftControl"` LeftShift *bool `xml:"leftShift"` LeftAlt *bool `xml:"leftAlt"` LeftGui *bool `xml:"leftGui"` RightControl *bool `xml:"rightControl"` RightShift *bool `xml:"rightShift"` RightAlt *bool `xml:"rightAlt"` RightGui *bool `xml:"rightGui"` } func init() { t["UsbScanCodeSpecModifierType"] = reflect.TypeOf((*UsbScanCodeSpecModifierType)(nil)).Elem() } type UserAssignedToGroup struct { HostEvent UserLogin string `xml:"userLogin"` Group string `xml:"group"` } func init() { t["UserAssignedToGroup"] = reflect.TypeOf((*UserAssignedToGroup)(nil)).Elem() } type UserGroupProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["UserGroupProfile"] = reflect.TypeOf((*UserGroupProfile)(nil)).Elem() } type UserInputRequiredParameterMetadata struct { ProfilePolicyOptionMetadata UserInputParameter []ProfileParameterMetadata `xml:"userInputParameter,omitempty"` } func init() { t["UserInputRequiredParameterMetadata"] = reflect.TypeOf((*UserInputRequiredParameterMetadata)(nil)).Elem() } type UserLoginSessionEvent struct { SessionEvent IpAddress string `xml:"ipAddress"` UserAgent string `xml:"userAgent,omitempty"` Locale string `xml:"locale"` SessionId string `xml:"sessionId"` } func init() { t["UserLoginSessionEvent"] = reflect.TypeOf((*UserLoginSessionEvent)(nil)).Elem() } type UserLogoutSessionEvent struct { SessionEvent IpAddress string `xml:"ipAddress,omitempty"` UserAgent string `xml:"userAgent,omitempty"` CallCount int64 `xml:"callCount,omitempty"` SessionId string `xml:"sessionId,omitempty"` LoginTime *time.Time `xml:"loginTime"` } func init() { t["UserLogoutSessionEvent"] = reflect.TypeOf((*UserLogoutSessionEvent)(nil)).Elem() } type UserNotFound struct { VimFault Principal string `xml:"principal"` Unresolved bool `xml:"unresolved"` } func init() { t["UserNotFound"] = reflect.TypeOf((*UserNotFound)(nil)).Elem() } type UserNotFoundFault UserNotFound func init() { t["UserNotFoundFault"] = reflect.TypeOf((*UserNotFoundFault)(nil)).Elem() } type UserPasswordChanged struct { HostEvent UserLogin string `xml:"userLogin"` } func init() { t["UserPasswordChanged"] = reflect.TypeOf((*UserPasswordChanged)(nil)).Elem() } type UserPrivilegeResult struct { DynamicData Entity ManagedObjectReference `xml:"entity"` Privileges []string `xml:"privileges,omitempty"` } func init() { t["UserPrivilegeResult"] = reflect.TypeOf((*UserPrivilegeResult)(nil)).Elem() } type UserProfile struct { ApplyProfile Key string `xml:"key"` } func init() { t["UserProfile"] = reflect.TypeOf((*UserProfile)(nil)).Elem() } type UserSearchResult struct { DynamicData Principal string `xml:"principal"` FullName string `xml:"fullName,omitempty"` Group bool `xml:"group"` } func init() { t["UserSearchResult"] = reflect.TypeOf((*UserSearchResult)(nil)).Elem() } type UserSession struct { DynamicData Key string `xml:"key"` UserName string `xml:"userName"` FullName string `xml:"fullName"` LoginTime time.Time `xml:"loginTime"` LastActiveTime time.Time `xml:"lastActiveTime"` Locale string `xml:"locale"` MessageLocale string `xml:"messageLocale"` ExtensionSession *bool `xml:"extensionSession"` IpAddress string `xml:"ipAddress,omitempty"` UserAgent string `xml:"userAgent,omitempty"` CallCount int64 `xml:"callCount,omitempty"` } func init() { t["UserSession"] = reflect.TypeOf((*UserSession)(nil)).Elem() } type UserUnassignedFromGroup struct { HostEvent UserLogin string `xml:"userLogin"` Group string `xml:"group"` } func init() { t["UserUnassignedFromGroup"] = reflect.TypeOf((*UserUnassignedFromGroup)(nil)).Elem() } type UserUpgradeEvent struct { UpgradeEvent } func init() { t["UserUpgradeEvent"] = reflect.TypeOf((*UserUpgradeEvent)(nil)).Elem() } type VASAStorageArray struct { DynamicData Name string `xml:"name"` Uuid string `xml:"uuid"` VendorId string `xml:"vendorId"` ModelId string `xml:"modelId"` } func init() { t["VASAStorageArray"] = reflect.TypeOf((*VASAStorageArray)(nil)).Elem() } type VAppCloneSpec struct { DynamicData Location ManagedObjectReference `xml:"location"` Host *ManagedObjectReference `xml:"host,omitempty"` ResourceSpec *ResourceConfigSpec `xml:"resourceSpec,omitempty"` VmFolder *ManagedObjectReference `xml:"vmFolder,omitempty"` NetworkMapping []VAppCloneSpecNetworkMappingPair `xml:"networkMapping,omitempty"` Property []KeyValue `xml:"property,omitempty"` ResourceMapping []VAppCloneSpecResourceMap `xml:"resourceMapping,omitempty"` Provisioning string `xml:"provisioning,omitempty"` } func init() { t["VAppCloneSpec"] = reflect.TypeOf((*VAppCloneSpec)(nil)).Elem() } type VAppCloneSpecNetworkMappingPair struct { DynamicData Source ManagedObjectReference `xml:"source"` Destination ManagedObjectReference `xml:"destination"` } func init() { t["VAppCloneSpecNetworkMappingPair"] = reflect.TypeOf((*VAppCloneSpecNetworkMappingPair)(nil)).Elem() } type VAppCloneSpecResourceMap struct { DynamicData Source ManagedObjectReference `xml:"source"` Parent *ManagedObjectReference `xml:"parent,omitempty"` ResourceSpec *ResourceConfigSpec `xml:"resourceSpec,omitempty"` Location *ManagedObjectReference `xml:"location,omitempty"` } func init() { t["VAppCloneSpecResourceMap"] = reflect.TypeOf((*VAppCloneSpecResourceMap)(nil)).Elem() } type VAppConfigFault struct { VimFault } func init() { t["VAppConfigFault"] = reflect.TypeOf((*VAppConfigFault)(nil)).Elem() } type VAppConfigFaultFault BaseVAppConfigFault func init() { t["VAppConfigFaultFault"] = reflect.TypeOf((*VAppConfigFaultFault)(nil)).Elem() } type VAppConfigInfo struct { VmConfigInfo EntityConfig []VAppEntityConfigInfo `xml:"entityConfig,omitempty"` Annotation string `xml:"annotation"` InstanceUuid string `xml:"instanceUuid,omitempty"` ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` } func init() { t["VAppConfigInfo"] = reflect.TypeOf((*VAppConfigInfo)(nil)).Elem() } type VAppConfigSpec struct { VmConfigSpec EntityConfig []VAppEntityConfigInfo `xml:"entityConfig,omitempty"` Annotation string `xml:"annotation,omitempty"` InstanceUuid string `xml:"instanceUuid,omitempty"` ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` } func init() { t["VAppConfigSpec"] = reflect.TypeOf((*VAppConfigSpec)(nil)).Elem() } type VAppEntityConfigInfo struct { DynamicData Key *ManagedObjectReference `xml:"key,omitempty"` Tag string `xml:"tag,omitempty"` StartOrder int32 `xml:"startOrder,omitempty"` StartDelay int32 `xml:"startDelay,omitempty"` WaitingForGuest *bool `xml:"waitingForGuest"` StartAction string `xml:"startAction,omitempty"` StopDelay int32 `xml:"stopDelay,omitempty"` StopAction string `xml:"stopAction,omitempty"` DestroyWithParent *bool `xml:"destroyWithParent"` } func init() { t["VAppEntityConfigInfo"] = reflect.TypeOf((*VAppEntityConfigInfo)(nil)).Elem() } type VAppIPAssignmentInfo struct { DynamicData SupportedAllocationScheme []string `xml:"supportedAllocationScheme,omitempty"` IpAllocationPolicy string `xml:"ipAllocationPolicy,omitempty"` SupportedIpProtocol []string `xml:"supportedIpProtocol,omitempty"` IpProtocol string `xml:"ipProtocol,omitempty"` } func init() { t["VAppIPAssignmentInfo"] = reflect.TypeOf((*VAppIPAssignmentInfo)(nil)).Elem() } type VAppNotRunning struct { VmConfigFault } func init() { t["VAppNotRunning"] = reflect.TypeOf((*VAppNotRunning)(nil)).Elem() } type VAppNotRunningFault VAppNotRunning func init() { t["VAppNotRunningFault"] = reflect.TypeOf((*VAppNotRunningFault)(nil)).Elem() } type VAppOperationInProgress struct { RuntimeFault } func init() { t["VAppOperationInProgress"] = reflect.TypeOf((*VAppOperationInProgress)(nil)).Elem() } type VAppOperationInProgressFault VAppOperationInProgress func init() { t["VAppOperationInProgressFault"] = reflect.TypeOf((*VAppOperationInProgressFault)(nil)).Elem() } type VAppOvfSectionInfo struct { DynamicData Key int32 `xml:"key,omitempty"` Namespace string `xml:"namespace,omitempty"` Type string `xml:"type,omitempty"` AtEnvelopeLevel *bool `xml:"atEnvelopeLevel"` Contents string `xml:"contents,omitempty"` } func init() { t["VAppOvfSectionInfo"] = reflect.TypeOf((*VAppOvfSectionInfo)(nil)).Elem() } type VAppOvfSectionSpec struct { ArrayUpdateSpec Info *VAppOvfSectionInfo `xml:"info,omitempty"` } func init() { t["VAppOvfSectionSpec"] = reflect.TypeOf((*VAppOvfSectionSpec)(nil)).Elem() } type VAppProductInfo struct { DynamicData Key int32 `xml:"key"` ClassId string `xml:"classId,omitempty"` InstanceId string `xml:"instanceId,omitempty"` Name string `xml:"name,omitempty"` Vendor string `xml:"vendor,omitempty"` Version string `xml:"version,omitempty"` FullVersion string `xml:"fullVersion,omitempty"` VendorUrl string `xml:"vendorUrl,omitempty"` ProductUrl string `xml:"productUrl,omitempty"` AppUrl string `xml:"appUrl,omitempty"` } func init() { t["VAppProductInfo"] = reflect.TypeOf((*VAppProductInfo)(nil)).Elem() } type VAppProductSpec struct { ArrayUpdateSpec Info *VAppProductInfo `xml:"info,omitempty"` } func init() { t["VAppProductSpec"] = reflect.TypeOf((*VAppProductSpec)(nil)).Elem() } type VAppPropertyFault struct { VmConfigFault Id string `xml:"id"` Category string `xml:"category"` Label string `xml:"label"` Type string `xml:"type"` Value string `xml:"value"` } func init() { t["VAppPropertyFault"] = reflect.TypeOf((*VAppPropertyFault)(nil)).Elem() } type VAppPropertyFaultFault BaseVAppPropertyFault func init() { t["VAppPropertyFaultFault"] = reflect.TypeOf((*VAppPropertyFaultFault)(nil)).Elem() } type VAppPropertyInfo struct { DynamicData Key int32 `xml:"key"` ClassId string `xml:"classId,omitempty"` InstanceId string `xml:"instanceId,omitempty"` Id string `xml:"id,omitempty"` Category string `xml:"category,omitempty"` Label string `xml:"label,omitempty"` Type string `xml:"type,omitempty"` TypeReference string `xml:"typeReference,omitempty"` UserConfigurable *bool `xml:"userConfigurable"` DefaultValue string `xml:"defaultValue,omitempty"` Value string `xml:"value,omitempty"` Description string `xml:"description,omitempty"` } func init() { t["VAppPropertyInfo"] = reflect.TypeOf((*VAppPropertyInfo)(nil)).Elem() } type VAppPropertySpec struct { ArrayUpdateSpec Info *VAppPropertyInfo `xml:"info,omitempty"` } func init() { t["VAppPropertySpec"] = reflect.TypeOf((*VAppPropertySpec)(nil)).Elem() } type VAppTaskInProgress struct { TaskInProgress } func init() { t["VAppTaskInProgress"] = reflect.TypeOf((*VAppTaskInProgress)(nil)).Elem() } type VAppTaskInProgressFault VAppTaskInProgress func init() { t["VAppTaskInProgressFault"] = reflect.TypeOf((*VAppTaskInProgressFault)(nil)).Elem() } type VFlashCacheHotConfigNotSupported struct { VmConfigFault } func init() { t["VFlashCacheHotConfigNotSupported"] = reflect.TypeOf((*VFlashCacheHotConfigNotSupported)(nil)).Elem() } type VFlashCacheHotConfigNotSupportedFault VFlashCacheHotConfigNotSupported func init() { t["VFlashCacheHotConfigNotSupportedFault"] = reflect.TypeOf((*VFlashCacheHotConfigNotSupportedFault)(nil)).Elem() } type VFlashModuleNotSupported struct { VmConfigFault VmName string `xml:"vmName"` ModuleName string `xml:"moduleName"` Reason string `xml:"reason"` HostName string `xml:"hostName"` } func init() { t["VFlashModuleNotSupported"] = reflect.TypeOf((*VFlashModuleNotSupported)(nil)).Elem() } type VFlashModuleNotSupportedFault VFlashModuleNotSupported func init() { t["VFlashModuleNotSupportedFault"] = reflect.TypeOf((*VFlashModuleNotSupportedFault)(nil)).Elem() } type VFlashModuleVersionIncompatible struct { VimFault ModuleName string `xml:"moduleName"` VmRequestModuleVersion string `xml:"vmRequestModuleVersion"` HostMinSupportedVerson string `xml:"hostMinSupportedVerson"` HostModuleVersion string `xml:"hostModuleVersion"` } func init() { t["VFlashModuleVersionIncompatible"] = reflect.TypeOf((*VFlashModuleVersionIncompatible)(nil)).Elem() } type VFlashModuleVersionIncompatibleFault VFlashModuleVersionIncompatible func init() { t["VFlashModuleVersionIncompatibleFault"] = reflect.TypeOf((*VFlashModuleVersionIncompatibleFault)(nil)).Elem() } type VMFSDatastoreCreatedEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` DatastoreUrl string `xml:"datastoreUrl,omitempty"` } func init() { t["VMFSDatastoreCreatedEvent"] = reflect.TypeOf((*VMFSDatastoreCreatedEvent)(nil)).Elem() } type VMFSDatastoreExpandedEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` } func init() { t["VMFSDatastoreExpandedEvent"] = reflect.TypeOf((*VMFSDatastoreExpandedEvent)(nil)).Elem() } type VMFSDatastoreExtendedEvent struct { HostEvent Datastore DatastoreEventArgument `xml:"datastore"` } func init() { t["VMFSDatastoreExtendedEvent"] = reflect.TypeOf((*VMFSDatastoreExtendedEvent)(nil)).Elem() } type VMINotSupported struct { DeviceNotSupported } func init() { t["VMINotSupported"] = reflect.TypeOf((*VMINotSupported)(nil)).Elem() } type VMINotSupportedFault VMINotSupported func init() { t["VMINotSupportedFault"] = reflect.TypeOf((*VMINotSupportedFault)(nil)).Elem() } type VMOnConflictDVPort struct { CannotAccessNetwork } func init() { t["VMOnConflictDVPort"] = reflect.TypeOf((*VMOnConflictDVPort)(nil)).Elem() } type VMOnConflictDVPortFault VMOnConflictDVPort func init() { t["VMOnConflictDVPortFault"] = reflect.TypeOf((*VMOnConflictDVPortFault)(nil)).Elem() } type VMOnVirtualIntranet struct { CannotAccessNetwork } func init() { t["VMOnVirtualIntranet"] = reflect.TypeOf((*VMOnVirtualIntranet)(nil)).Elem() } type VMOnVirtualIntranetFault VMOnVirtualIntranet func init() { t["VMOnVirtualIntranetFault"] = reflect.TypeOf((*VMOnVirtualIntranetFault)(nil)).Elem() } type VMotionAcrossNetworkNotSupported struct { MigrationFeatureNotSupported } func init() { t["VMotionAcrossNetworkNotSupported"] = reflect.TypeOf((*VMotionAcrossNetworkNotSupported)(nil)).Elem() } type VMotionAcrossNetworkNotSupportedFault VMotionAcrossNetworkNotSupported func init() { t["VMotionAcrossNetworkNotSupportedFault"] = reflect.TypeOf((*VMotionAcrossNetworkNotSupportedFault)(nil)).Elem() } type VMotionInterfaceIssue struct { MigrationFault AtSourceHost bool `xml:"atSourceHost"` FailedHost string `xml:"failedHost"` FailedHostEntity *ManagedObjectReference `xml:"failedHostEntity,omitempty"` } func init() { t["VMotionInterfaceIssue"] = reflect.TypeOf((*VMotionInterfaceIssue)(nil)).Elem() } type VMotionInterfaceIssueFault BaseVMotionInterfaceIssue func init() { t["VMotionInterfaceIssueFault"] = reflect.TypeOf((*VMotionInterfaceIssueFault)(nil)).Elem() } type VMotionLicenseExpiredEvent struct { LicenseEvent } func init() { t["VMotionLicenseExpiredEvent"] = reflect.TypeOf((*VMotionLicenseExpiredEvent)(nil)).Elem() } type VMotionLinkCapacityLow struct { VMotionInterfaceIssue Network string `xml:"network"` } func init() { t["VMotionLinkCapacityLow"] = reflect.TypeOf((*VMotionLinkCapacityLow)(nil)).Elem() } type VMotionLinkCapacityLowFault VMotionLinkCapacityLow func init() { t["VMotionLinkCapacityLowFault"] = reflect.TypeOf((*VMotionLinkCapacityLowFault)(nil)).Elem() } type VMotionLinkDown struct { VMotionInterfaceIssue Network string `xml:"network"` } func init() { t["VMotionLinkDown"] = reflect.TypeOf((*VMotionLinkDown)(nil)).Elem() } type VMotionLinkDownFault VMotionLinkDown func init() { t["VMotionLinkDownFault"] = reflect.TypeOf((*VMotionLinkDownFault)(nil)).Elem() } type VMotionNotConfigured struct { VMotionInterfaceIssue } func init() { t["VMotionNotConfigured"] = reflect.TypeOf((*VMotionNotConfigured)(nil)).Elem() } type VMotionNotConfiguredFault VMotionNotConfigured func init() { t["VMotionNotConfiguredFault"] = reflect.TypeOf((*VMotionNotConfiguredFault)(nil)).Elem() } type VMotionNotLicensed struct { VMotionInterfaceIssue } func init() { t["VMotionNotLicensed"] = reflect.TypeOf((*VMotionNotLicensed)(nil)).Elem() } type VMotionNotLicensedFault VMotionNotLicensed func init() { t["VMotionNotLicensedFault"] = reflect.TypeOf((*VMotionNotLicensedFault)(nil)).Elem() } type VMotionNotSupported struct { VMotionInterfaceIssue } func init() { t["VMotionNotSupported"] = reflect.TypeOf((*VMotionNotSupported)(nil)).Elem() } type VMotionNotSupportedFault VMotionNotSupported func init() { t["VMotionNotSupportedFault"] = reflect.TypeOf((*VMotionNotSupportedFault)(nil)).Elem() } type VMotionProtocolIncompatible struct { MigrationFault } func init() { t["VMotionProtocolIncompatible"] = reflect.TypeOf((*VMotionProtocolIncompatible)(nil)).Elem() } type VMotionProtocolIncompatibleFault VMotionProtocolIncompatible func init() { t["VMotionProtocolIncompatibleFault"] = reflect.TypeOf((*VMotionProtocolIncompatibleFault)(nil)).Elem() } type VMwareDVSConfigInfo struct { DVSConfigInfo VspanSession []VMwareVspanSession `xml:"vspanSession,omitempty"` PvlanConfig []VMwareDVSPvlanMapEntry `xml:"pvlanConfig,omitempty"` MaxMtu int32 `xml:"maxMtu"` LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"` IpfixConfig *VMwareIpfixConfig `xml:"ipfixConfig,omitempty"` LacpGroupConfig []VMwareDvsLacpGroupConfig `xml:"lacpGroupConfig,omitempty"` LacpApiVersion string `xml:"lacpApiVersion,omitempty"` MulticastFilteringMode string `xml:"multicastFilteringMode,omitempty"` } func init() { t["VMwareDVSConfigInfo"] = reflect.TypeOf((*VMwareDVSConfigInfo)(nil)).Elem() } type VMwareDVSConfigSpec struct { DVSConfigSpec PvlanConfigSpec []VMwareDVSPvlanConfigSpec `xml:"pvlanConfigSpec,omitempty"` VspanConfigSpec []VMwareDVSVspanConfigSpec `xml:"vspanConfigSpec,omitempty"` MaxMtu int32 `xml:"maxMtu,omitempty"` LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"` IpfixConfig *VMwareIpfixConfig `xml:"ipfixConfig,omitempty"` LacpApiVersion string `xml:"lacpApiVersion,omitempty"` MulticastFilteringMode string `xml:"multicastFilteringMode,omitempty"` } func init() { t["VMwareDVSConfigSpec"] = reflect.TypeOf((*VMwareDVSConfigSpec)(nil)).Elem() } type VMwareDVSFeatureCapability struct { DVSFeatureCapability VspanSupported *bool `xml:"vspanSupported"` LldpSupported *bool `xml:"lldpSupported"` IpfixSupported *bool `xml:"ipfixSupported"` IpfixCapability *VMwareDvsIpfixCapability `xml:"ipfixCapability,omitempty"` MulticastSnoopingSupported *bool `xml:"multicastSnoopingSupported"` VspanCapability *VMwareDVSVspanCapability `xml:"vspanCapability,omitempty"` LacpCapability *VMwareDvsLacpCapability `xml:"lacpCapability,omitempty"` } func init() { t["VMwareDVSFeatureCapability"] = reflect.TypeOf((*VMwareDVSFeatureCapability)(nil)).Elem() } type VMwareDVSHealthCheckCapability struct { DVSHealthCheckCapability VlanMtuSupported bool `xml:"vlanMtuSupported"` TeamingSupported bool `xml:"teamingSupported"` } func init() { t["VMwareDVSHealthCheckCapability"] = reflect.TypeOf((*VMwareDVSHealthCheckCapability)(nil)).Elem() } type VMwareDVSHealthCheckConfig struct { DVSHealthCheckConfig } func init() { t["VMwareDVSHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSHealthCheckConfig)(nil)).Elem() } type VMwareDVSMtuHealthCheckResult struct { HostMemberUplinkHealthCheckResult MtuMismatch bool `xml:"mtuMismatch"` VlanSupportSwitchMtu []NumericRange `xml:"vlanSupportSwitchMtu,omitempty"` VlanNotSupportSwitchMtu []NumericRange `xml:"vlanNotSupportSwitchMtu,omitempty"` } func init() { t["VMwareDVSMtuHealthCheckResult"] = reflect.TypeOf((*VMwareDVSMtuHealthCheckResult)(nil)).Elem() } type VMwareDVSPortSetting struct { DVPortSetting Vlan BaseVmwareDistributedVirtualSwitchVlanSpec `xml:"vlan,omitempty,typeattr"` QosTag *IntPolicy `xml:"qosTag,omitempty"` UplinkTeamingPolicy *VmwareUplinkPortTeamingPolicy `xml:"uplinkTeamingPolicy,omitempty"` SecurityPolicy *DVSSecurityPolicy `xml:"securityPolicy,omitempty"` IpfixEnabled *BoolPolicy `xml:"ipfixEnabled,omitempty"` TxUplink *BoolPolicy `xml:"txUplink,omitempty"` LacpPolicy *VMwareUplinkLacpPolicy `xml:"lacpPolicy,omitempty"` } func init() { t["VMwareDVSPortSetting"] = reflect.TypeOf((*VMwareDVSPortSetting)(nil)).Elem() } type VMwareDVSPortgroupPolicy struct { DVPortgroupPolicy VlanOverrideAllowed bool `xml:"vlanOverrideAllowed"` UplinkTeamingOverrideAllowed bool `xml:"uplinkTeamingOverrideAllowed"` SecurityPolicyOverrideAllowed bool `xml:"securityPolicyOverrideAllowed"` IpfixOverrideAllowed *bool `xml:"ipfixOverrideAllowed"` } func init() { t["VMwareDVSPortgroupPolicy"] = reflect.TypeOf((*VMwareDVSPortgroupPolicy)(nil)).Elem() } type VMwareDVSPvlanConfigSpec struct { DynamicData PvlanEntry VMwareDVSPvlanMapEntry `xml:"pvlanEntry"` Operation string `xml:"operation"` } func init() { t["VMwareDVSPvlanConfigSpec"] = reflect.TypeOf((*VMwareDVSPvlanConfigSpec)(nil)).Elem() } type VMwareDVSPvlanMapEntry struct { DynamicData PrimaryVlanId int32 `xml:"primaryVlanId"` SecondaryVlanId int32 `xml:"secondaryVlanId"` PvlanType string `xml:"pvlanType"` } func init() { t["VMwareDVSPvlanMapEntry"] = reflect.TypeOf((*VMwareDVSPvlanMapEntry)(nil)).Elem() } type VMwareDVSTeamingHealthCheckConfig struct { VMwareDVSHealthCheckConfig } func init() { t["VMwareDVSTeamingHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSTeamingHealthCheckConfig)(nil)).Elem() } type VMwareDVSTeamingHealthCheckResult struct { HostMemberHealthCheckResult TeamingStatus string `xml:"teamingStatus"` } func init() { t["VMwareDVSTeamingHealthCheckResult"] = reflect.TypeOf((*VMwareDVSTeamingHealthCheckResult)(nil)).Elem() } type VMwareDVSVlanHealthCheckResult struct { HostMemberUplinkHealthCheckResult TrunkedVlan []NumericRange `xml:"trunkedVlan,omitempty"` UntrunkedVlan []NumericRange `xml:"untrunkedVlan,omitempty"` } func init() { t["VMwareDVSVlanHealthCheckResult"] = reflect.TypeOf((*VMwareDVSVlanHealthCheckResult)(nil)).Elem() } type VMwareDVSVlanMtuHealthCheckConfig struct { VMwareDVSHealthCheckConfig } func init() { t["VMwareDVSVlanMtuHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSVlanMtuHealthCheckConfig)(nil)).Elem() } type VMwareDVSVspanCapability struct { DynamicData MixedDestSupported bool `xml:"mixedDestSupported"` DvportSupported bool `xml:"dvportSupported"` RemoteSourceSupported bool `xml:"remoteSourceSupported"` RemoteDestSupported bool `xml:"remoteDestSupported"` EncapRemoteSourceSupported bool `xml:"encapRemoteSourceSupported"` ErspanProtocolSupported *bool `xml:"erspanProtocolSupported"` } func init() { t["VMwareDVSVspanCapability"] = reflect.TypeOf((*VMwareDVSVspanCapability)(nil)).Elem() } type VMwareDVSVspanConfigSpec struct { DynamicData VspanSession VMwareVspanSession `xml:"vspanSession"` Operation string `xml:"operation"` } func init() { t["VMwareDVSVspanConfigSpec"] = reflect.TypeOf((*VMwareDVSVspanConfigSpec)(nil)).Elem() } type VMwareDvsIpfixCapability struct { DynamicData IpfixSupported *bool `xml:"ipfixSupported"` Ipv6ForIpfixSupported *bool `xml:"ipv6ForIpfixSupported"` ObservationDomainIdSupported *bool `xml:"observationDomainIdSupported"` } func init() { t["VMwareDvsIpfixCapability"] = reflect.TypeOf((*VMwareDvsIpfixCapability)(nil)).Elem() } type VMwareDvsLacpCapability struct { DynamicData LacpSupported *bool `xml:"lacpSupported"` MultiLacpGroupSupported *bool `xml:"multiLacpGroupSupported"` } func init() { t["VMwareDvsLacpCapability"] = reflect.TypeOf((*VMwareDvsLacpCapability)(nil)).Elem() } type VMwareDvsLacpGroupConfig struct { DynamicData Key string `xml:"key,omitempty"` Name string `xml:"name,omitempty"` Mode string `xml:"mode,omitempty"` UplinkNum int32 `xml:"uplinkNum,omitempty"` LoadbalanceAlgorithm string `xml:"loadbalanceAlgorithm,omitempty"` Vlan *VMwareDvsLagVlanConfig `xml:"vlan,omitempty"` Ipfix *VMwareDvsLagIpfixConfig `xml:"ipfix,omitempty"` UplinkName []string `xml:"uplinkName,omitempty"` UplinkPortKey []string `xml:"uplinkPortKey,omitempty"` } func init() { t["VMwareDvsLacpGroupConfig"] = reflect.TypeOf((*VMwareDvsLacpGroupConfig)(nil)).Elem() } type VMwareDvsLacpGroupSpec struct { DynamicData LacpGroupConfig VMwareDvsLacpGroupConfig `xml:"lacpGroupConfig"` Operation string `xml:"operation"` } func init() { t["VMwareDvsLacpGroupSpec"] = reflect.TypeOf((*VMwareDvsLacpGroupSpec)(nil)).Elem() } type VMwareDvsLagIpfixConfig struct { DynamicData IpfixEnabled *bool `xml:"ipfixEnabled"` } func init() { t["VMwareDvsLagIpfixConfig"] = reflect.TypeOf((*VMwareDvsLagIpfixConfig)(nil)).Elem() } type VMwareDvsLagVlanConfig struct { DynamicData VlanId []NumericRange `xml:"vlanId,omitempty"` } func init() { t["VMwareDvsLagVlanConfig"] = reflect.TypeOf((*VMwareDvsLagVlanConfig)(nil)).Elem() } type VMwareIpfixConfig struct { DynamicData CollectorIpAddress string `xml:"collectorIpAddress,omitempty"` CollectorPort int32 `xml:"collectorPort,omitempty"` ObservationDomainId int64 `xml:"observationDomainId,omitempty"` ActiveFlowTimeout int32 `xml:"activeFlowTimeout"` IdleFlowTimeout int32 `xml:"idleFlowTimeout"` SamplingRate int32 `xml:"samplingRate"` InternalFlowsOnly bool `xml:"internalFlowsOnly"` } func init() { t["VMwareIpfixConfig"] = reflect.TypeOf((*VMwareIpfixConfig)(nil)).Elem() } type VMwareUplinkLacpPolicy struct { InheritablePolicy Enable *BoolPolicy `xml:"enable,omitempty"` Mode *StringPolicy `xml:"mode,omitempty"` } func init() { t["VMwareUplinkLacpPolicy"] = reflect.TypeOf((*VMwareUplinkLacpPolicy)(nil)).Elem() } type VMwareUplinkPortOrderPolicy struct { InheritablePolicy ActiveUplinkPort []string `xml:"activeUplinkPort,omitempty"` StandbyUplinkPort []string `xml:"standbyUplinkPort,omitempty"` } func init() { t["VMwareUplinkPortOrderPolicy"] = reflect.TypeOf((*VMwareUplinkPortOrderPolicy)(nil)).Elem() } type VMwareVspanPort struct { DynamicData PortKey []string `xml:"portKey,omitempty"` UplinkPortName []string `xml:"uplinkPortName,omitempty"` WildcardPortConnecteeType []string `xml:"wildcardPortConnecteeType,omitempty"` Vlans []int32 `xml:"vlans,omitempty"` IpAddress []string `xml:"ipAddress,omitempty"` } func init() { t["VMwareVspanPort"] = reflect.TypeOf((*VMwareVspanPort)(nil)).Elem() } type VMwareVspanSession struct { DynamicData Key string `xml:"key,omitempty"` Name string `xml:"name,omitempty"` Description string `xml:"description,omitempty"` Enabled bool `xml:"enabled"` SourcePortTransmitted *VMwareVspanPort `xml:"sourcePortTransmitted,omitempty"` SourcePortReceived *VMwareVspanPort `xml:"sourcePortReceived,omitempty"` DestinationPort *VMwareVspanPort `xml:"destinationPort,omitempty"` EncapsulationVlanId int32 `xml:"encapsulationVlanId,omitempty"` StripOriginalVlan bool `xml:"stripOriginalVlan"` MirroredPacketLength int32 `xml:"mirroredPacketLength,omitempty"` NormalTrafficAllowed bool `xml:"normalTrafficAllowed"` SessionType string `xml:"sessionType,omitempty"` SamplingRate int32 `xml:"samplingRate,omitempty"` EncapType string `xml:"encapType,omitempty"` ErspanId int32 `xml:"erspanId,omitempty"` ErspanCOS int32 `xml:"erspanCOS,omitempty"` ErspanGraNanosec *bool `xml:"erspanGraNanosec"` } func init() { t["VMwareVspanSession"] = reflect.TypeOf((*VMwareVspanSession)(nil)).Elem() } type VRPEditSpec struct { DynamicData VrpId string `xml:"vrpId"` Description string `xml:"description,omitempty"` CpuAllocation *VrpResourceAllocationInfo `xml:"cpuAllocation,omitempty"` MemoryAllocation *VrpResourceAllocationInfo `xml:"memoryAllocation,omitempty"` AddedHubs []ManagedObjectReference `xml:"addedHubs,omitempty"` RemovedHubs []ManagedObjectReference `xml:"removedHubs,omitempty"` ChangeVersion int64 `xml:"changeVersion,omitempty"` } func init() { t["VRPEditSpec"] = reflect.TypeOf((*VRPEditSpec)(nil)).Elem() } type VStorageObject struct { DynamicData Config VStorageObjectConfigInfo `xml:"config"` } func init() { t["VStorageObject"] = reflect.TypeOf((*VStorageObject)(nil)).Elem() } type VStorageObjectConfigInfo struct { BaseConfigInfo CapacityInMB int64 `xml:"capacityInMB"` ConsumptionType []string `xml:"consumptionType,omitempty"` ConsumerId []ID `xml:"consumerId,omitempty"` } func init() { t["VStorageObjectConfigInfo"] = reflect.TypeOf((*VStorageObjectConfigInfo)(nil)).Elem() } type VStorageObjectStateInfo struct { DynamicData Tentative *bool `xml:"tentative"` } func init() { t["VStorageObjectStateInfo"] = reflect.TypeOf((*VStorageObjectStateInfo)(nil)).Elem() } type VVolHostPE struct { DynamicData Key ManagedObjectReference `xml:"key"` ProtocolEndpoint []HostProtocolEndpoint `xml:"protocolEndpoint"` } func init() { t["VVolHostPE"] = reflect.TypeOf((*VVolHostPE)(nil)).Elem() } type VVolVmConfigFileUpdateResult struct { DynamicData SucceededVmConfigFile []KeyValue `xml:"succeededVmConfigFile,omitempty"` FailedVmConfigFile []VVolVmConfigFileUpdateResultFailedVmConfigFileInfo `xml:"failedVmConfigFile,omitempty"` } func init() { t["VVolVmConfigFileUpdateResult"] = reflect.TypeOf((*VVolVmConfigFileUpdateResult)(nil)).Elem() } type VVolVmConfigFileUpdateResultFailedVmConfigFileInfo struct { DynamicData TargetConfigVVolId string `xml:"targetConfigVVolId"` Fault LocalizedMethodFault `xml:"fault"` } func init() { t["VVolVmConfigFileUpdateResultFailedVmConfigFileInfo"] = reflect.TypeOf((*VVolVmConfigFileUpdateResultFailedVmConfigFileInfo)(nil)).Elem() } type ValidateCredentialsInGuest ValidateCredentialsInGuestRequestType func init() { t["ValidateCredentialsInGuest"] = reflect.TypeOf((*ValidateCredentialsInGuest)(nil)).Elem() } type ValidateCredentialsInGuestRequestType struct { This ManagedObjectReference `xml:"_this"` Vm ManagedObjectReference `xml:"vm"` Auth BaseGuestAuthentication `xml:"auth,typeattr"` } func init() { t["ValidateCredentialsInGuestRequestType"] = reflect.TypeOf((*ValidateCredentialsInGuestRequestType)(nil)).Elem() } type ValidateCredentialsInGuestResponse struct { } type ValidateHost ValidateHostRequestType func init() { t["ValidateHost"] = reflect.TypeOf((*ValidateHost)(nil)).Elem() } type ValidateHostRequestType struct { This ManagedObjectReference `xml:"_this"` OvfDescriptor string `xml:"ovfDescriptor"` Host ManagedObjectReference `xml:"host"` Vhp OvfValidateHostParams `xml:"vhp"` } func init() { t["ValidateHostRequestType"] = reflect.TypeOf((*ValidateHostRequestType)(nil)).Elem() } type ValidateHostResponse struct { Returnval OvfValidateHostResult `xml:"returnval"` } type ValidateMigration ValidateMigrationRequestType func init() { t["ValidateMigration"] = reflect.TypeOf((*ValidateMigration)(nil)).Elem() } type ValidateMigrationRequestType struct { This ManagedObjectReference `xml:"_this"` Vm []ManagedObjectReference `xml:"vm"` State VirtualMachinePowerState `xml:"state,omitempty"` TestType []string `xml:"testType,omitempty"` Pool *ManagedObjectReference `xml:"pool,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` } func init() { t["ValidateMigrationRequestType"] = reflect.TypeOf((*ValidateMigrationRequestType)(nil)).Elem() } type ValidateMigrationResponse struct { Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` } type VasaProviderContainerSpec struct { DynamicData VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"` ScId string `xml:"scId"` Deleted bool `xml:"deleted"` } func init() { t["VasaProviderContainerSpec"] = reflect.TypeOf((*VasaProviderContainerSpec)(nil)).Elem() } type VcAgentUninstallFailedEvent struct { HostEvent Reason string `xml:"reason,omitempty"` } func init() { t["VcAgentUninstallFailedEvent"] = reflect.TypeOf((*VcAgentUninstallFailedEvent)(nil)).Elem() } type VcAgentUninstalledEvent struct { HostEvent } func init() { t["VcAgentUninstalledEvent"] = reflect.TypeOf((*VcAgentUninstalledEvent)(nil)).Elem() } type VcAgentUpgradeFailedEvent struct { HostEvent Reason string `xml:"reason,omitempty"` } func init() { t["VcAgentUpgradeFailedEvent"] = reflect.TypeOf((*VcAgentUpgradeFailedEvent)(nil)).Elem() } type VcAgentUpgradedEvent struct { HostEvent } func init() { t["VcAgentUpgradedEvent"] = reflect.TypeOf((*VcAgentUpgradedEvent)(nil)).Elem() } type VchaClusterConfigInfo struct { DynamicData FailoverNodeInfo1 *FailoverNodeInfo `xml:"failoverNodeInfo1,omitempty"` FailoverNodeInfo2 *FailoverNodeInfo `xml:"failoverNodeInfo2,omitempty"` WitnessNodeInfo *WitnessNodeInfo `xml:"witnessNodeInfo,omitempty"` State string `xml:"state"` } func init() { t["VchaClusterConfigInfo"] = reflect.TypeOf((*VchaClusterConfigInfo)(nil)).Elem() } type VchaClusterConfigSpec struct { DynamicData PassiveIp string `xml:"passiveIp"` WitnessIp string `xml:"witnessIp"` } func init() { t["VchaClusterConfigSpec"] = reflect.TypeOf((*VchaClusterConfigSpec)(nil)).Elem() } type VchaClusterDeploymentSpec struct { DynamicData PassiveDeploymentSpec PassiveNodeDeploymentSpec `xml:"passiveDeploymentSpec"` WitnessDeploymentSpec BaseNodeDeploymentSpec `xml:"witnessDeploymentSpec,typeattr"` ActiveVcSpec SourceNodeSpec `xml:"activeVcSpec"` ActiveVcNetworkConfig *ClusterNetworkConfigSpec `xml:"activeVcNetworkConfig,omitempty"` } func init() { t["VchaClusterDeploymentSpec"] = reflect.TypeOf((*VchaClusterDeploymentSpec)(nil)).Elem() } type VchaClusterHealth struct { DynamicData RuntimeInfo VchaClusterRuntimeInfo `xml:"runtimeInfo"` HealthMessages []LocalizableMessage `xml:"healthMessages,omitempty"` AdditionalInformation []LocalizableMessage `xml:"additionalInformation,omitempty"` } func init() { t["VchaClusterHealth"] = reflect.TypeOf((*VchaClusterHealth)(nil)).Elem() } type VchaClusterNetworkSpec struct { DynamicData WitnessNetworkSpec BaseNodeNetworkSpec `xml:"witnessNetworkSpec,typeattr"` PassiveNetworkSpec PassiveNodeNetworkSpec `xml:"passiveNetworkSpec"` } func init() { t["VchaClusterNetworkSpec"] = reflect.TypeOf((*VchaClusterNetworkSpec)(nil)).Elem() } type VchaClusterRuntimeInfo struct { DynamicData ClusterState string `xml:"clusterState"` NodeInfo []VchaNodeRuntimeInfo `xml:"nodeInfo,omitempty"` ClusterMode string `xml:"clusterMode"` } func init() { t["VchaClusterRuntimeInfo"] = reflect.TypeOf((*VchaClusterRuntimeInfo)(nil)).Elem() } type VchaNodeRuntimeInfo struct { DynamicData NodeState string `xml:"nodeState"` NodeRole string `xml:"nodeRole"` NodeIp string `xml:"nodeIp"` } func init() { t["VchaNodeRuntimeInfo"] = reflect.TypeOf((*VchaNodeRuntimeInfo)(nil)).Elem() } type VimAccountPasswordChangedEvent struct { HostEvent } func init() { t["VimAccountPasswordChangedEvent"] = reflect.TypeOf((*VimAccountPasswordChangedEvent)(nil)).Elem() } type VimFault struct { MethodFault } func init() { t["VimFault"] = reflect.TypeOf((*VimFault)(nil)).Elem() } type VimFaultFault BaseVimFault func init() { t["VimFaultFault"] = reflect.TypeOf((*VimFaultFault)(nil)).Elem() } type VimVasaProvider struct { DynamicData Url string `xml:"url"` Name string `xml:"name,omitempty"` SelfSignedCertificate string `xml:"selfSignedCertificate,omitempty"` } func init() { t["VimVasaProvider"] = reflect.TypeOf((*VimVasaProvider)(nil)).Elem() } type VimVasaProviderInfo struct { DynamicData Provider VimVasaProvider `xml:"provider"` ArrayState []VimVasaProviderStatePerArray `xml:"arrayState,omitempty"` } func init() { t["VimVasaProviderInfo"] = reflect.TypeOf((*VimVasaProviderInfo)(nil)).Elem() } type VimVasaProviderStatePerArray struct { DynamicData Priority int32 `xml:"priority"` ArrayId string `xml:"arrayId"` Active bool `xml:"active"` } func init() { t["VimVasaProviderStatePerArray"] = reflect.TypeOf((*VimVasaProviderStatePerArray)(nil)).Elem() } type VirtualAHCIController struct { VirtualSATAController } func init() { t["VirtualAHCIController"] = reflect.TypeOf((*VirtualAHCIController)(nil)).Elem() } type VirtualAHCIControllerOption struct { VirtualSATAControllerOption } func init() { t["VirtualAHCIControllerOption"] = reflect.TypeOf((*VirtualAHCIControllerOption)(nil)).Elem() } type VirtualAppImportSpec struct { ImportSpec Name string `xml:"name"` VAppConfigSpec VAppConfigSpec `xml:"vAppConfigSpec"` ResourcePoolSpec ResourceConfigSpec `xml:"resourcePoolSpec"` Child []BaseImportSpec `xml:"child,omitempty,typeattr"` } func init() { t["VirtualAppImportSpec"] = reflect.TypeOf((*VirtualAppImportSpec)(nil)).Elem() } type VirtualAppLinkInfo struct { DynamicData Key ManagedObjectReference `xml:"key"` DestroyWithParent *bool `xml:"destroyWithParent"` } func init() { t["VirtualAppLinkInfo"] = reflect.TypeOf((*VirtualAppLinkInfo)(nil)).Elem() } type VirtualAppSummary struct { ResourcePoolSummary Product *VAppProductInfo `xml:"product,omitempty"` VAppState VirtualAppVAppState `xml:"vAppState,omitempty"` Suspended *bool `xml:"suspended"` InstallBootRequired *bool `xml:"installBootRequired"` InstanceUuid string `xml:"instanceUuid,omitempty"` } func init() { t["VirtualAppSummary"] = reflect.TypeOf((*VirtualAppSummary)(nil)).Elem() } type VirtualBusLogicController struct { VirtualSCSIController } func init() { t["VirtualBusLogicController"] = reflect.TypeOf((*VirtualBusLogicController)(nil)).Elem() } type VirtualBusLogicControllerOption struct { VirtualSCSIControllerOption } func init() { t["VirtualBusLogicControllerOption"] = reflect.TypeOf((*VirtualBusLogicControllerOption)(nil)).Elem() } type VirtualCdrom struct { VirtualDevice } func init() { t["VirtualCdrom"] = reflect.TypeOf((*VirtualCdrom)(nil)).Elem() } type VirtualCdromAtapiBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualCdromAtapiBackingInfo"] = reflect.TypeOf((*VirtualCdromAtapiBackingInfo)(nil)).Elem() } type VirtualCdromAtapiBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualCdromAtapiBackingOption"] = reflect.TypeOf((*VirtualCdromAtapiBackingOption)(nil)).Elem() } type VirtualCdromIsoBackingInfo struct { VirtualDeviceFileBackingInfo } func init() { t["VirtualCdromIsoBackingInfo"] = reflect.TypeOf((*VirtualCdromIsoBackingInfo)(nil)).Elem() } type VirtualCdromIsoBackingOption struct { VirtualDeviceFileBackingOption } func init() { t["VirtualCdromIsoBackingOption"] = reflect.TypeOf((*VirtualCdromIsoBackingOption)(nil)).Elem() } type VirtualCdromOption struct { VirtualDeviceOption } func init() { t["VirtualCdromOption"] = reflect.TypeOf((*VirtualCdromOption)(nil)).Elem() } type VirtualCdromPassthroughBackingInfo struct { VirtualDeviceDeviceBackingInfo Exclusive bool `xml:"exclusive"` } func init() { t["VirtualCdromPassthroughBackingInfo"] = reflect.TypeOf((*VirtualCdromPassthroughBackingInfo)(nil)).Elem() } type VirtualCdromPassthroughBackingOption struct { VirtualDeviceDeviceBackingOption Exclusive BoolOption `xml:"exclusive"` } func init() { t["VirtualCdromPassthroughBackingOption"] = reflect.TypeOf((*VirtualCdromPassthroughBackingOption)(nil)).Elem() } type VirtualCdromRemoteAtapiBackingInfo struct { VirtualDeviceRemoteDeviceBackingInfo } func init() { t["VirtualCdromRemoteAtapiBackingInfo"] = reflect.TypeOf((*VirtualCdromRemoteAtapiBackingInfo)(nil)).Elem() } type VirtualCdromRemoteAtapiBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualCdromRemoteAtapiBackingOption"] = reflect.TypeOf((*VirtualCdromRemoteAtapiBackingOption)(nil)).Elem() } type VirtualCdromRemotePassthroughBackingInfo struct { VirtualDeviceRemoteDeviceBackingInfo Exclusive bool `xml:"exclusive"` } func init() { t["VirtualCdromRemotePassthroughBackingInfo"] = reflect.TypeOf((*VirtualCdromRemotePassthroughBackingInfo)(nil)).Elem() } type VirtualCdromRemotePassthroughBackingOption struct { VirtualDeviceRemoteDeviceBackingOption Exclusive BoolOption `xml:"exclusive"` } func init() { t["VirtualCdromRemotePassthroughBackingOption"] = reflect.TypeOf((*VirtualCdromRemotePassthroughBackingOption)(nil)).Elem() } type VirtualController struct { VirtualDevice BusNumber int32 `xml:"busNumber"` Device []int32 `xml:"device,omitempty"` } func init() { t["VirtualController"] = reflect.TypeOf((*VirtualController)(nil)).Elem() } type VirtualControllerOption struct { VirtualDeviceOption Devices IntOption `xml:"devices"` SupportedDevice []string `xml:"supportedDevice,omitempty"` } func init() { t["VirtualControllerOption"] = reflect.TypeOf((*VirtualControllerOption)(nil)).Elem() } type VirtualDevice struct { DynamicData Key int32 `xml:"key"` DeviceInfo BaseDescription `xml:"deviceInfo,omitempty,typeattr"` Backing BaseVirtualDeviceBackingInfo `xml:"backing,omitempty,typeattr"` Connectable *VirtualDeviceConnectInfo `xml:"connectable,omitempty"` SlotInfo BaseVirtualDeviceBusSlotInfo `xml:"slotInfo,omitempty,typeattr"` ControllerKey int32 `xml:"controllerKey,omitempty"` UnitNumber *int32 `xml:"unitNumber"` } func init() { t["VirtualDevice"] = reflect.TypeOf((*VirtualDevice)(nil)).Elem() } type VirtualDeviceBackingInfo struct { DynamicData } func init() { t["VirtualDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceBackingInfo)(nil)).Elem() } type VirtualDeviceBackingOption struct { DynamicData Type string `xml:"type"` } func init() { t["VirtualDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceBackingOption)(nil)).Elem() } type VirtualDeviceBusSlotInfo struct { DynamicData } func init() { t["VirtualDeviceBusSlotInfo"] = reflect.TypeOf((*VirtualDeviceBusSlotInfo)(nil)).Elem() } type VirtualDeviceBusSlotOption struct { DynamicData Type string `xml:"type"` } func init() { t["VirtualDeviceBusSlotOption"] = reflect.TypeOf((*VirtualDeviceBusSlotOption)(nil)).Elem() } type VirtualDeviceConfigSpec struct { DynamicData Operation VirtualDeviceConfigSpecOperation `xml:"operation,omitempty"` FileOperation VirtualDeviceConfigSpecFileOperation `xml:"fileOperation,omitempty"` Device BaseVirtualDevice `xml:"device,typeattr"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` Backing *VirtualDeviceConfigSpecBackingSpec `xml:"backing,omitempty"` } func init() { t["VirtualDeviceConfigSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpec)(nil)).Elem() } type VirtualDeviceConfigSpecBackingSpec struct { DynamicData Parent *VirtualDeviceConfigSpecBackingSpec `xml:"parent,omitempty"` Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` } func init() { t["VirtualDeviceConfigSpecBackingSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpecBackingSpec)(nil)).Elem() } type VirtualDeviceConnectInfo struct { DynamicData StartConnected bool `xml:"startConnected"` AllowGuestControl bool `xml:"allowGuestControl"` Connected bool `xml:"connected"` Status string `xml:"status,omitempty"` } func init() { t["VirtualDeviceConnectInfo"] = reflect.TypeOf((*VirtualDeviceConnectInfo)(nil)).Elem() } type VirtualDeviceConnectOption struct { DynamicData StartConnected BoolOption `xml:"startConnected"` AllowGuestControl BoolOption `xml:"allowGuestControl"` } func init() { t["VirtualDeviceConnectOption"] = reflect.TypeOf((*VirtualDeviceConnectOption)(nil)).Elem() } type VirtualDeviceDeviceBackingInfo struct { VirtualDeviceBackingInfo DeviceName string `xml:"deviceName"` UseAutoDetect *bool `xml:"useAutoDetect"` } func init() { t["VirtualDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceDeviceBackingInfo)(nil)).Elem() } type VirtualDeviceDeviceBackingOption struct { VirtualDeviceBackingOption AutoDetectAvailable BoolOption `xml:"autoDetectAvailable"` } func init() { t["VirtualDeviceDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceDeviceBackingOption)(nil)).Elem() } type VirtualDeviceFileBackingInfo struct { VirtualDeviceBackingInfo FileName string `xml:"fileName"` Datastore *ManagedObjectReference `xml:"datastore,omitempty"` BackingObjectId string `xml:"backingObjectId,omitempty"` } func init() { t["VirtualDeviceFileBackingInfo"] = reflect.TypeOf((*VirtualDeviceFileBackingInfo)(nil)).Elem() } type VirtualDeviceFileBackingOption struct { VirtualDeviceBackingOption FileNameExtensions *ChoiceOption `xml:"fileNameExtensions,omitempty"` } func init() { t["VirtualDeviceFileBackingOption"] = reflect.TypeOf((*VirtualDeviceFileBackingOption)(nil)).Elem() } type VirtualDeviceOption struct { DynamicData Type string `xml:"type"` ConnectOption *VirtualDeviceConnectOption `xml:"connectOption,omitempty"` BusSlotOption *VirtualDeviceBusSlotOption `xml:"busSlotOption,omitempty"` ControllerType string `xml:"controllerType,omitempty"` AutoAssignController *BoolOption `xml:"autoAssignController,omitempty"` BackingOption []BaseVirtualDeviceBackingOption `xml:"backingOption,omitempty,typeattr"` DefaultBackingOptionIndex int32 `xml:"defaultBackingOptionIndex,omitempty"` LicensingLimit []string `xml:"licensingLimit,omitempty"` Deprecated bool `xml:"deprecated"` PlugAndPlay bool `xml:"plugAndPlay"` HotRemoveSupported *bool `xml:"hotRemoveSupported"` } func init() { t["VirtualDeviceOption"] = reflect.TypeOf((*VirtualDeviceOption)(nil)).Elem() } type VirtualDevicePciBusSlotInfo struct { VirtualDeviceBusSlotInfo PciSlotNumber int32 `xml:"pciSlotNumber"` } func init() { t["VirtualDevicePciBusSlotInfo"] = reflect.TypeOf((*VirtualDevicePciBusSlotInfo)(nil)).Elem() } type VirtualDevicePipeBackingInfo struct { VirtualDeviceBackingInfo PipeName string `xml:"pipeName"` } func init() { t["VirtualDevicePipeBackingInfo"] = reflect.TypeOf((*VirtualDevicePipeBackingInfo)(nil)).Elem() } type VirtualDevicePipeBackingOption struct { VirtualDeviceBackingOption } func init() { t["VirtualDevicePipeBackingOption"] = reflect.TypeOf((*VirtualDevicePipeBackingOption)(nil)).Elem() } type VirtualDeviceRemoteDeviceBackingInfo struct { VirtualDeviceBackingInfo DeviceName string `xml:"deviceName"` UseAutoDetect *bool `xml:"useAutoDetect"` } func init() { t["VirtualDeviceRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingInfo)(nil)).Elem() } type VirtualDeviceRemoteDeviceBackingOption struct { VirtualDeviceBackingOption AutoDetectAvailable BoolOption `xml:"autoDetectAvailable"` } func init() { t["VirtualDeviceRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingOption)(nil)).Elem() } type VirtualDeviceURIBackingInfo struct { VirtualDeviceBackingInfo ServiceURI string `xml:"serviceURI"` Direction string `xml:"direction"` ProxyURI string `xml:"proxyURI,omitempty"` } func init() { t["VirtualDeviceURIBackingInfo"] = reflect.TypeOf((*VirtualDeviceURIBackingInfo)(nil)).Elem() } type VirtualDeviceURIBackingOption struct { VirtualDeviceBackingOption Directions ChoiceOption `xml:"directions"` } func init() { t["VirtualDeviceURIBackingOption"] = reflect.TypeOf((*VirtualDeviceURIBackingOption)(nil)).Elem() } type VirtualDisk struct { VirtualDevice CapacityInKB int64 `xml:"capacityInKB"` CapacityInBytes int64 `xml:"capacityInBytes,omitempty"` Shares *SharesInfo `xml:"shares,omitempty"` StorageIOAllocation *StorageIOAllocationInfo `xml:"storageIOAllocation,omitempty"` DiskObjectId string `xml:"diskObjectId,omitempty"` VFlashCacheConfigInfo *VirtualDiskVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"` Iofilter []string `xml:"iofilter,omitempty"` VDiskId *ID `xml:"vDiskId,omitempty"` } func init() { t["VirtualDisk"] = reflect.TypeOf((*VirtualDisk)(nil)).Elem() } type VirtualDiskAntiAffinityRuleSpec struct { ClusterRuleInfo DiskId []int32 `xml:"diskId"` } func init() { t["VirtualDiskAntiAffinityRuleSpec"] = reflect.TypeOf((*VirtualDiskAntiAffinityRuleSpec)(nil)).Elem() } type VirtualDiskBlocksNotFullyProvisioned struct { DeviceBackingNotSupported } func init() { t["VirtualDiskBlocksNotFullyProvisioned"] = reflect.TypeOf((*VirtualDiskBlocksNotFullyProvisioned)(nil)).Elem() } type VirtualDiskBlocksNotFullyProvisionedFault VirtualDiskBlocksNotFullyProvisioned func init() { t["VirtualDiskBlocksNotFullyProvisionedFault"] = reflect.TypeOf((*VirtualDiskBlocksNotFullyProvisionedFault)(nil)).Elem() } type VirtualDiskConfigSpec struct { VirtualDeviceConfigSpec DiskMoveType string `xml:"diskMoveType,omitempty"` MigrateCache *bool `xml:"migrateCache"` } func init() { t["VirtualDiskConfigSpec"] = reflect.TypeOf((*VirtualDiskConfigSpec)(nil)).Elem() } type VirtualDiskDeltaDiskFormatsSupported struct { DynamicData DatastoreType string `xml:"datastoreType"` DeltaDiskFormat ChoiceOption `xml:"deltaDiskFormat"` } func init() { t["VirtualDiskDeltaDiskFormatsSupported"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormatsSupported)(nil)).Elem() } type VirtualDiskFlatVer1BackingInfo struct { VirtualDeviceFileBackingInfo DiskMode string `xml:"diskMode"` Split *bool `xml:"split"` WriteThrough *bool `xml:"writeThrough"` ContentId string `xml:"contentId,omitempty"` Parent *VirtualDiskFlatVer1BackingInfo `xml:"parent,omitempty"` } func init() { t["VirtualDiskFlatVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskFlatVer1BackingInfo)(nil)).Elem() } type VirtualDiskFlatVer1BackingOption struct { VirtualDeviceFileBackingOption DiskMode ChoiceOption `xml:"diskMode"` Split BoolOption `xml:"split"` WriteThrough BoolOption `xml:"writeThrough"` Growable bool `xml:"growable"` } func init() { t["VirtualDiskFlatVer1BackingOption"] = reflect.TypeOf((*VirtualDiskFlatVer1BackingOption)(nil)).Elem() } type VirtualDiskFlatVer2BackingInfo struct { VirtualDeviceFileBackingInfo DiskMode string `xml:"diskMode"` Split *bool `xml:"split"` WriteThrough *bool `xml:"writeThrough"` ThinProvisioned *bool `xml:"thinProvisioned"` EagerlyScrub *bool `xml:"eagerlyScrub"` Uuid string `xml:"uuid,omitempty"` ContentId string `xml:"contentId,omitempty"` ChangeId string `xml:"changeId,omitempty"` Parent *VirtualDiskFlatVer2BackingInfo `xml:"parent,omitempty"` DeltaDiskFormat string `xml:"deltaDiskFormat,omitempty"` DigestEnabled *bool `xml:"digestEnabled"` DeltaGrainSize int32 `xml:"deltaGrainSize,omitempty"` DeltaDiskFormatVariant string `xml:"deltaDiskFormatVariant,omitempty"` Sharing string `xml:"sharing,omitempty"` KeyId *CryptoKeyId `xml:"keyId,omitempty"` } func init() { t["VirtualDiskFlatVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskFlatVer2BackingInfo)(nil)).Elem() } type VirtualDiskFlatVer2BackingOption struct { VirtualDeviceFileBackingOption DiskMode ChoiceOption `xml:"diskMode"` Split BoolOption `xml:"split"` WriteThrough BoolOption `xml:"writeThrough"` Growable bool `xml:"growable"` HotGrowable bool `xml:"hotGrowable"` Uuid bool `xml:"uuid"` ThinProvisioned *BoolOption `xml:"thinProvisioned,omitempty"` EagerlyScrub *BoolOption `xml:"eagerlyScrub,omitempty"` DeltaDiskFormat *ChoiceOption `xml:"deltaDiskFormat,omitempty"` DeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"deltaDiskFormatsSupported,omitempty"` } func init() { t["VirtualDiskFlatVer2BackingOption"] = reflect.TypeOf((*VirtualDiskFlatVer2BackingOption)(nil)).Elem() } type VirtualDiskId struct { DynamicData Vm ManagedObjectReference `xml:"vm"` DiskId int32 `xml:"diskId"` } func init() { t["VirtualDiskId"] = reflect.TypeOf((*VirtualDiskId)(nil)).Elem() } type VirtualDiskModeNotSupported struct { DeviceNotSupported Mode string `xml:"mode"` } func init() { t["VirtualDiskModeNotSupported"] = reflect.TypeOf((*VirtualDiskModeNotSupported)(nil)).Elem() } type VirtualDiskModeNotSupportedFault VirtualDiskModeNotSupported func init() { t["VirtualDiskModeNotSupportedFault"] = reflect.TypeOf((*VirtualDiskModeNotSupportedFault)(nil)).Elem() } type VirtualDiskOption struct { VirtualDeviceOption CapacityInKB LongOption `xml:"capacityInKB"` IoAllocationOption *StorageIOAllocationOption `xml:"ioAllocationOption,omitempty"` VFlashCacheConfigOption *VirtualDiskOptionVFlashCacheConfigOption `xml:"vFlashCacheConfigOption,omitempty"` } func init() { t["VirtualDiskOption"] = reflect.TypeOf((*VirtualDiskOption)(nil)).Elem() } type VirtualDiskOptionVFlashCacheConfigOption struct { DynamicData CacheConsistencyType ChoiceOption `xml:"cacheConsistencyType"` CacheMode ChoiceOption `xml:"cacheMode"` ReservationInMB LongOption `xml:"reservationInMB"` BlockSizeInKB LongOption `xml:"blockSizeInKB"` } func init() { t["VirtualDiskOptionVFlashCacheConfigOption"] = reflect.TypeOf((*VirtualDiskOptionVFlashCacheConfigOption)(nil)).Elem() } type VirtualDiskPartitionedRawDiskVer2BackingInfo struct { VirtualDiskRawDiskVer2BackingInfo Partition []int32 `xml:"partition"` } func init() { t["VirtualDiskPartitionedRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskPartitionedRawDiskVer2BackingInfo)(nil)).Elem() } type VirtualDiskPartitionedRawDiskVer2BackingOption struct { VirtualDiskRawDiskVer2BackingOption } func init() { t["VirtualDiskPartitionedRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskPartitionedRawDiskVer2BackingOption)(nil)).Elem() } type VirtualDiskRawDiskMappingVer1BackingInfo struct { VirtualDeviceFileBackingInfo LunUuid string `xml:"lunUuid,omitempty"` DeviceName string `xml:"deviceName,omitempty"` CompatibilityMode string `xml:"compatibilityMode,omitempty"` DiskMode string `xml:"diskMode,omitempty"` Uuid string `xml:"uuid,omitempty"` ContentId string `xml:"contentId,omitempty"` ChangeId string `xml:"changeId,omitempty"` Parent *VirtualDiskRawDiskMappingVer1BackingInfo `xml:"parent,omitempty"` Sharing string `xml:"sharing,omitempty"` } func init() { t["VirtualDiskRawDiskMappingVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskMappingVer1BackingInfo)(nil)).Elem() } type VirtualDiskRawDiskMappingVer1BackingOption struct { VirtualDeviceDeviceBackingOption DescriptorFileNameExtensions *ChoiceOption `xml:"descriptorFileNameExtensions,omitempty"` CompatibilityMode ChoiceOption `xml:"compatibilityMode"` DiskMode ChoiceOption `xml:"diskMode"` Uuid bool `xml:"uuid"` } func init() { t["VirtualDiskRawDiskMappingVer1BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskMappingVer1BackingOption)(nil)).Elem() } type VirtualDiskRawDiskVer2BackingInfo struct { VirtualDeviceDeviceBackingInfo DescriptorFileName string `xml:"descriptorFileName"` Uuid string `xml:"uuid,omitempty"` ChangeId string `xml:"changeId,omitempty"` Sharing string `xml:"sharing,omitempty"` } func init() { t["VirtualDiskRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingInfo)(nil)).Elem() } type VirtualDiskRawDiskVer2BackingOption struct { VirtualDeviceDeviceBackingOption DescriptorFileNameExtensions ChoiceOption `xml:"descriptorFileNameExtensions"` Uuid bool `xml:"uuid"` } func init() { t["VirtualDiskRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingOption)(nil)).Elem() } type VirtualDiskSeSparseBackingInfo struct { VirtualDeviceFileBackingInfo DiskMode string `xml:"diskMode"` WriteThrough *bool `xml:"writeThrough"` Uuid string `xml:"uuid,omitempty"` ContentId string `xml:"contentId,omitempty"` ChangeId string `xml:"changeId,omitempty"` Parent *VirtualDiskSeSparseBackingInfo `xml:"parent,omitempty"` DeltaDiskFormat string `xml:"deltaDiskFormat,omitempty"` DigestEnabled *bool `xml:"digestEnabled"` GrainSize int32 `xml:"grainSize,omitempty"` KeyId *CryptoKeyId `xml:"keyId,omitempty"` } func init() { t["VirtualDiskSeSparseBackingInfo"] = reflect.TypeOf((*VirtualDiskSeSparseBackingInfo)(nil)).Elem() } type VirtualDiskSeSparseBackingOption struct { VirtualDeviceFileBackingOption DiskMode ChoiceOption `xml:"diskMode"` WriteThrough BoolOption `xml:"writeThrough"` Growable bool `xml:"growable"` HotGrowable bool `xml:"hotGrowable"` Uuid bool `xml:"uuid"` DeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"deltaDiskFormatsSupported"` } func init() { t["VirtualDiskSeSparseBackingOption"] = reflect.TypeOf((*VirtualDiskSeSparseBackingOption)(nil)).Elem() } type VirtualDiskSparseVer1BackingInfo struct { VirtualDeviceFileBackingInfo DiskMode string `xml:"diskMode"` Split *bool `xml:"split"` WriteThrough *bool `xml:"writeThrough"` SpaceUsedInKB int64 `xml:"spaceUsedInKB,omitempty"` ContentId string `xml:"contentId,omitempty"` Parent *VirtualDiskSparseVer1BackingInfo `xml:"parent,omitempty"` } func init() { t["VirtualDiskSparseVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskSparseVer1BackingInfo)(nil)).Elem() } type VirtualDiskSparseVer1BackingOption struct { VirtualDeviceFileBackingOption DiskModes ChoiceOption `xml:"diskModes"` Split BoolOption `xml:"split"` WriteThrough BoolOption `xml:"writeThrough"` Growable bool `xml:"growable"` } func init() { t["VirtualDiskSparseVer1BackingOption"] = reflect.TypeOf((*VirtualDiskSparseVer1BackingOption)(nil)).Elem() } type VirtualDiskSparseVer2BackingInfo struct { VirtualDeviceFileBackingInfo DiskMode string `xml:"diskMode"` Split *bool `xml:"split"` WriteThrough *bool `xml:"writeThrough"` SpaceUsedInKB int64 `xml:"spaceUsedInKB,omitempty"` Uuid string `xml:"uuid,omitempty"` ContentId string `xml:"contentId,omitempty"` ChangeId string `xml:"changeId,omitempty"` Parent *VirtualDiskSparseVer2BackingInfo `xml:"parent,omitempty"` KeyId *CryptoKeyId `xml:"keyId,omitempty"` } func init() { t["VirtualDiskSparseVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskSparseVer2BackingInfo)(nil)).Elem() } type VirtualDiskSparseVer2BackingOption struct { VirtualDeviceFileBackingOption DiskMode ChoiceOption `xml:"diskMode"` Split BoolOption `xml:"split"` WriteThrough BoolOption `xml:"writeThrough"` Growable bool `xml:"growable"` HotGrowable bool `xml:"hotGrowable"` Uuid bool `xml:"uuid"` } func init() { t["VirtualDiskSparseVer2BackingOption"] = reflect.TypeOf((*VirtualDiskSparseVer2BackingOption)(nil)).Elem() } type VirtualDiskSpec struct { DynamicData DiskType string `xml:"diskType"` AdapterType string `xml:"adapterType"` } func init() { t["VirtualDiskSpec"] = reflect.TypeOf((*VirtualDiskSpec)(nil)).Elem() } type VirtualDiskVFlashCacheConfigInfo struct { DynamicData VFlashModule string `xml:"vFlashModule,omitempty"` ReservationInMB int64 `xml:"reservationInMB,omitempty"` CacheConsistencyType string `xml:"cacheConsistencyType,omitempty"` CacheMode string `xml:"cacheMode,omitempty"` BlockSizeInKB int64 `xml:"blockSizeInKB,omitempty"` } func init() { t["VirtualDiskVFlashCacheConfigInfo"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfo)(nil)).Elem() } type VirtualE1000 struct { VirtualEthernetCard } func init() { t["VirtualE1000"] = reflect.TypeOf((*VirtualE1000)(nil)).Elem() } type VirtualE1000Option struct { VirtualEthernetCardOption } func init() { t["VirtualE1000Option"] = reflect.TypeOf((*VirtualE1000Option)(nil)).Elem() } type VirtualE1000e struct { VirtualEthernetCard } func init() { t["VirtualE1000e"] = reflect.TypeOf((*VirtualE1000e)(nil)).Elem() } type VirtualE1000eOption struct { VirtualEthernetCardOption } func init() { t["VirtualE1000eOption"] = reflect.TypeOf((*VirtualE1000eOption)(nil)).Elem() } type VirtualEnsoniq1371 struct { VirtualSoundCard } func init() { t["VirtualEnsoniq1371"] = reflect.TypeOf((*VirtualEnsoniq1371)(nil)).Elem() } type VirtualEnsoniq1371Option struct { VirtualSoundCardOption } func init() { t["VirtualEnsoniq1371Option"] = reflect.TypeOf((*VirtualEnsoniq1371Option)(nil)).Elem() } type VirtualEthernetCard struct { VirtualDevice AddressType string `xml:"addressType,omitempty"` MacAddress string `xml:"macAddress,omitempty"` WakeOnLanEnabled *bool `xml:"wakeOnLanEnabled"` ResourceAllocation *VirtualEthernetCardResourceAllocation `xml:"resourceAllocation,omitempty"` ExternalId string `xml:"externalId,omitempty"` UptCompatibilityEnabled *bool `xml:"uptCompatibilityEnabled"` } func init() { t["VirtualEthernetCard"] = reflect.TypeOf((*VirtualEthernetCard)(nil)).Elem() } type VirtualEthernetCardDVPortBackingOption struct { VirtualDeviceBackingOption } func init() { t["VirtualEthernetCardDVPortBackingOption"] = reflect.TypeOf((*VirtualEthernetCardDVPortBackingOption)(nil)).Elem() } type VirtualEthernetCardDistributedVirtualPortBackingInfo struct { VirtualDeviceBackingInfo Port DistributedVirtualSwitchPortConnection `xml:"port"` } func init() { t["VirtualEthernetCardDistributedVirtualPortBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardDistributedVirtualPortBackingInfo)(nil)).Elem() } type VirtualEthernetCardLegacyNetworkBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualEthernetCardLegacyNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkBackingInfo)(nil)).Elem() } type VirtualEthernetCardLegacyNetworkBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualEthernetCardLegacyNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkBackingOption)(nil)).Elem() } type VirtualEthernetCardNetworkBackingInfo struct { VirtualDeviceDeviceBackingInfo Network *ManagedObjectReference `xml:"network,omitempty"` InPassthroughMode *bool `xml:"inPassthroughMode"` } func init() { t["VirtualEthernetCardNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardNetworkBackingInfo)(nil)).Elem() } type VirtualEthernetCardNetworkBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualEthernetCardNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardNetworkBackingOption)(nil)).Elem() } type VirtualEthernetCardNotSupported struct { DeviceNotSupported } func init() { t["VirtualEthernetCardNotSupported"] = reflect.TypeOf((*VirtualEthernetCardNotSupported)(nil)).Elem() } type VirtualEthernetCardNotSupportedFault VirtualEthernetCardNotSupported func init() { t["VirtualEthernetCardNotSupportedFault"] = reflect.TypeOf((*VirtualEthernetCardNotSupportedFault)(nil)).Elem() } type VirtualEthernetCardOpaqueNetworkBackingInfo struct { VirtualDeviceBackingInfo OpaqueNetworkId string `xml:"opaqueNetworkId"` OpaqueNetworkType string `xml:"opaqueNetworkType"` } func init() { t["VirtualEthernetCardOpaqueNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardOpaqueNetworkBackingInfo)(nil)).Elem() } type VirtualEthernetCardOpaqueNetworkBackingOption struct { VirtualDeviceBackingOption } func init() { t["VirtualEthernetCardOpaqueNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardOpaqueNetworkBackingOption)(nil)).Elem() } type VirtualEthernetCardOption struct { VirtualDeviceOption SupportedOUI ChoiceOption `xml:"supportedOUI"` MacType ChoiceOption `xml:"macType"` WakeOnLanEnabled BoolOption `xml:"wakeOnLanEnabled"` VmDirectPathGen2Supported *bool `xml:"vmDirectPathGen2Supported"` UptCompatibilityEnabled *BoolOption `xml:"uptCompatibilityEnabled,omitempty"` } func init() { t["VirtualEthernetCardOption"] = reflect.TypeOf((*VirtualEthernetCardOption)(nil)).Elem() } type VirtualEthernetCardResourceAllocation struct { DynamicData Reservation int64 `xml:"reservation,omitempty"` Share SharesInfo `xml:"share"` Limit int64 `xml:"limit,omitempty"` } func init() { t["VirtualEthernetCardResourceAllocation"] = reflect.TypeOf((*VirtualEthernetCardResourceAllocation)(nil)).Elem() } type VirtualFloppy struct { VirtualDevice } func init() { t["VirtualFloppy"] = reflect.TypeOf((*VirtualFloppy)(nil)).Elem() } type VirtualFloppyDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualFloppyDeviceBackingInfo"] = reflect.TypeOf((*VirtualFloppyDeviceBackingInfo)(nil)).Elem() } type VirtualFloppyDeviceBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualFloppyDeviceBackingOption"] = reflect.TypeOf((*VirtualFloppyDeviceBackingOption)(nil)).Elem() } type VirtualFloppyImageBackingInfo struct { VirtualDeviceFileBackingInfo } func init() { t["VirtualFloppyImageBackingInfo"] = reflect.TypeOf((*VirtualFloppyImageBackingInfo)(nil)).Elem() } type VirtualFloppyImageBackingOption struct { VirtualDeviceFileBackingOption } func init() { t["VirtualFloppyImageBackingOption"] = reflect.TypeOf((*VirtualFloppyImageBackingOption)(nil)).Elem() } type VirtualFloppyOption struct { VirtualDeviceOption } func init() { t["VirtualFloppyOption"] = reflect.TypeOf((*VirtualFloppyOption)(nil)).Elem() } type VirtualFloppyRemoteDeviceBackingInfo struct { VirtualDeviceRemoteDeviceBackingInfo } func init() { t["VirtualFloppyRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualFloppyRemoteDeviceBackingInfo)(nil)).Elem() } type VirtualFloppyRemoteDeviceBackingOption struct { VirtualDeviceRemoteDeviceBackingOption } func init() { t["VirtualFloppyRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualFloppyRemoteDeviceBackingOption)(nil)).Elem() } type VirtualHardware struct { DynamicData NumCPU int32 `xml:"numCPU"` NumCoresPerSocket int32 `xml:"numCoresPerSocket,omitempty"` MemoryMB int32 `xml:"memoryMB"` VirtualICH7MPresent *bool `xml:"virtualICH7MPresent"` VirtualSMCPresent *bool `xml:"virtualSMCPresent"` Device []BaseVirtualDevice `xml:"device,omitempty,typeattr"` } func init() { t["VirtualHardware"] = reflect.TypeOf((*VirtualHardware)(nil)).Elem() } type VirtualHardwareCompatibilityIssue struct { VmConfigFault } func init() { t["VirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem() } type VirtualHardwareCompatibilityIssueFault BaseVirtualHardwareCompatibilityIssue func init() { t["VirtualHardwareCompatibilityIssueFault"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssueFault)(nil)).Elem() } type VirtualHardwareOption struct { DynamicData HwVersion int32 `xml:"hwVersion"` VirtualDeviceOption []BaseVirtualDeviceOption `xml:"virtualDeviceOption,typeattr"` DeviceListReadonly bool `xml:"deviceListReadonly"` NumCPU []int32 `xml:"numCPU"` NumCoresPerSocket *IntOption `xml:"numCoresPerSocket,omitempty"` NumCpuReadonly bool `xml:"numCpuReadonly"` MemoryMB LongOption `xml:"memoryMB"` NumPCIControllers IntOption `xml:"numPCIControllers"` NumIDEControllers IntOption `xml:"numIDEControllers"` NumUSBControllers IntOption `xml:"numUSBControllers"` NumUSBXHCIControllers *IntOption `xml:"numUSBXHCIControllers,omitempty"` NumSIOControllers IntOption `xml:"numSIOControllers"` NumPS2Controllers IntOption `xml:"numPS2Controllers"` LicensingLimit []string `xml:"licensingLimit,omitempty"` NumSupportedWwnPorts *IntOption `xml:"numSupportedWwnPorts,omitempty"` NumSupportedWwnNodes *IntOption `xml:"numSupportedWwnNodes,omitempty"` ResourceConfigOption *ResourceConfigOption `xml:"resourceConfigOption,omitempty"` } func init() { t["VirtualHardwareOption"] = reflect.TypeOf((*VirtualHardwareOption)(nil)).Elem() } type VirtualHardwareVersionNotSupported struct { VirtualHardwareCompatibilityIssue HostName string `xml:"hostName"` Host ManagedObjectReference `xml:"host"` } func init() { t["VirtualHardwareVersionNotSupported"] = reflect.TypeOf((*VirtualHardwareVersionNotSupported)(nil)).Elem() } type VirtualHardwareVersionNotSupportedFault VirtualHardwareVersionNotSupported func init() { t["VirtualHardwareVersionNotSupportedFault"] = reflect.TypeOf((*VirtualHardwareVersionNotSupportedFault)(nil)).Elem() } type VirtualHdAudioCard struct { VirtualSoundCard } func init() { t["VirtualHdAudioCard"] = reflect.TypeOf((*VirtualHdAudioCard)(nil)).Elem() } type VirtualHdAudioCardOption struct { VirtualSoundCardOption } func init() { t["VirtualHdAudioCardOption"] = reflect.TypeOf((*VirtualHdAudioCardOption)(nil)).Elem() } type VirtualIDEController struct { VirtualController } func init() { t["VirtualIDEController"] = reflect.TypeOf((*VirtualIDEController)(nil)).Elem() } type VirtualIDEControllerOption struct { VirtualControllerOption NumIDEDisks IntOption `xml:"numIDEDisks"` NumIDECdroms IntOption `xml:"numIDECdroms"` } func init() { t["VirtualIDEControllerOption"] = reflect.TypeOf((*VirtualIDEControllerOption)(nil)).Elem() } type VirtualKeyboard struct { VirtualDevice } func init() { t["VirtualKeyboard"] = reflect.TypeOf((*VirtualKeyboard)(nil)).Elem() } type VirtualKeyboardOption struct { VirtualDeviceOption } func init() { t["VirtualKeyboardOption"] = reflect.TypeOf((*VirtualKeyboardOption)(nil)).Elem() } type VirtualLsiLogicController struct { VirtualSCSIController } func init() { t["VirtualLsiLogicController"] = reflect.TypeOf((*VirtualLsiLogicController)(nil)).Elem() } type VirtualLsiLogicControllerOption struct { VirtualSCSIControllerOption } func init() { t["VirtualLsiLogicControllerOption"] = reflect.TypeOf((*VirtualLsiLogicControllerOption)(nil)).Elem() } type VirtualLsiLogicSASController struct { VirtualSCSIController } func init() { t["VirtualLsiLogicSASController"] = reflect.TypeOf((*VirtualLsiLogicSASController)(nil)).Elem() } type VirtualLsiLogicSASControllerOption struct { VirtualSCSIControllerOption } func init() { t["VirtualLsiLogicSASControllerOption"] = reflect.TypeOf((*VirtualLsiLogicSASControllerOption)(nil)).Elem() } type VirtualMachineAffinityInfo struct { DynamicData AffinitySet []int32 `xml:"affinitySet,omitempty"` } func init() { t["VirtualMachineAffinityInfo"] = reflect.TypeOf((*VirtualMachineAffinityInfo)(nil)).Elem() } type VirtualMachineBootOptions struct { DynamicData BootDelay int64 `xml:"bootDelay,omitempty"` EnterBIOSSetup *bool `xml:"enterBIOSSetup"` EfiSecureBootEnabled *bool `xml:"efiSecureBootEnabled"` BootRetryEnabled *bool `xml:"bootRetryEnabled"` BootRetryDelay int64 `xml:"bootRetryDelay,omitempty"` BootOrder []BaseVirtualMachineBootOptionsBootableDevice `xml:"bootOrder,omitempty,typeattr"` NetworkBootProtocol string `xml:"networkBootProtocol,omitempty"` } func init() { t["VirtualMachineBootOptions"] = reflect.TypeOf((*VirtualMachineBootOptions)(nil)).Elem() } type VirtualMachineBootOptionsBootableCdromDevice struct { VirtualMachineBootOptionsBootableDevice } func init() { t["VirtualMachineBootOptionsBootableCdromDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableCdromDevice)(nil)).Elem() } type VirtualMachineBootOptionsBootableDevice struct { DynamicData } func init() { t["VirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDevice)(nil)).Elem() } type VirtualMachineBootOptionsBootableDiskDevice struct { VirtualMachineBootOptionsBootableDevice DeviceKey int32 `xml:"deviceKey"` } func init() { t["VirtualMachineBootOptionsBootableDiskDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDiskDevice)(nil)).Elem() } type VirtualMachineBootOptionsBootableEthernetDevice struct { VirtualMachineBootOptionsBootableDevice DeviceKey int32 `xml:"deviceKey"` } func init() { t["VirtualMachineBootOptionsBootableEthernetDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableEthernetDevice)(nil)).Elem() } type VirtualMachineBootOptionsBootableFloppyDevice struct { VirtualMachineBootOptionsBootableDevice } func init() { t["VirtualMachineBootOptionsBootableFloppyDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableFloppyDevice)(nil)).Elem() } type VirtualMachineCapability struct { DynamicData SnapshotOperationsSupported bool `xml:"snapshotOperationsSupported"` MultipleSnapshotsSupported bool `xml:"multipleSnapshotsSupported"` SnapshotConfigSupported bool `xml:"snapshotConfigSupported"` PoweredOffSnapshotsSupported bool `xml:"poweredOffSnapshotsSupported"` MemorySnapshotsSupported bool `xml:"memorySnapshotsSupported"` RevertToSnapshotSupported bool `xml:"revertToSnapshotSupported"` QuiescedSnapshotsSupported bool `xml:"quiescedSnapshotsSupported"` DisableSnapshotsSupported bool `xml:"disableSnapshotsSupported"` LockSnapshotsSupported bool `xml:"lockSnapshotsSupported"` ConsolePreferencesSupported bool `xml:"consolePreferencesSupported"` CpuFeatureMaskSupported bool `xml:"cpuFeatureMaskSupported"` S1AcpiManagementSupported bool `xml:"s1AcpiManagementSupported"` SettingScreenResolutionSupported bool `xml:"settingScreenResolutionSupported"` ToolsAutoUpdateSupported bool `xml:"toolsAutoUpdateSupported"` VmNpivWwnSupported bool `xml:"vmNpivWwnSupported"` NpivWwnOnNonRdmVmSupported bool `xml:"npivWwnOnNonRdmVmSupported"` VmNpivWwnDisableSupported *bool `xml:"vmNpivWwnDisableSupported"` VmNpivWwnUpdateSupported *bool `xml:"vmNpivWwnUpdateSupported"` SwapPlacementSupported bool `xml:"swapPlacementSupported"` ToolsSyncTimeSupported bool `xml:"toolsSyncTimeSupported"` VirtualMmuUsageSupported bool `xml:"virtualMmuUsageSupported"` DiskSharesSupported bool `xml:"diskSharesSupported"` BootOptionsSupported bool `xml:"bootOptionsSupported"` BootRetryOptionsSupported *bool `xml:"bootRetryOptionsSupported"` SettingVideoRamSizeSupported bool `xml:"settingVideoRamSizeSupported"` SettingDisplayTopologySupported *bool `xml:"settingDisplayTopologySupported"` RecordReplaySupported *bool `xml:"recordReplaySupported"` ChangeTrackingSupported *bool `xml:"changeTrackingSupported"` MultipleCoresPerSocketSupported *bool `xml:"multipleCoresPerSocketSupported"` HostBasedReplicationSupported *bool `xml:"hostBasedReplicationSupported"` GuestAutoLockSupported *bool `xml:"guestAutoLockSupported"` MemoryReservationLockSupported *bool `xml:"memoryReservationLockSupported"` FeatureRequirementSupported *bool `xml:"featureRequirementSupported"` PoweredOnMonitorTypeChangeSupported *bool `xml:"poweredOnMonitorTypeChangeSupported"` SeSparseDiskSupported *bool `xml:"seSparseDiskSupported"` NestedHVSupported *bool `xml:"nestedHVSupported"` VPMCSupported *bool `xml:"vPMCSupported"` SecureBootSupported *bool `xml:"secureBootSupported"` } func init() { t["VirtualMachineCapability"] = reflect.TypeOf((*VirtualMachineCapability)(nil)).Elem() } type VirtualMachineCdromInfo struct { VirtualMachineTargetInfo Description string `xml:"description,omitempty"` } func init() { t["VirtualMachineCdromInfo"] = reflect.TypeOf((*VirtualMachineCdromInfo)(nil)).Elem() } type VirtualMachineCloneSpec struct { DynamicData Location VirtualMachineRelocateSpec `xml:"location"` Template bool `xml:"template"` Config *VirtualMachineConfigSpec `xml:"config,omitempty"` Customization *CustomizationSpec `xml:"customization,omitempty"` PowerOn bool `xml:"powerOn"` Snapshot *ManagedObjectReference `xml:"snapshot,omitempty"` Memory *bool `xml:"memory"` } func init() { t["VirtualMachineCloneSpec"] = reflect.TypeOf((*VirtualMachineCloneSpec)(nil)).Elem() } type VirtualMachineConfigInfo struct { DynamicData ChangeVersion string `xml:"changeVersion"` Modified time.Time `xml:"modified"` Name string `xml:"name"` GuestFullName string `xml:"guestFullName"` Version string `xml:"version"` Uuid string `xml:"uuid"` InstanceUuid string `xml:"instanceUuid,omitempty"` NpivNodeWorldWideName []int64 `xml:"npivNodeWorldWideName,omitempty"` NpivPortWorldWideName []int64 `xml:"npivPortWorldWideName,omitempty"` NpivWorldWideNameType string `xml:"npivWorldWideNameType,omitempty"` NpivDesiredNodeWwns int16 `xml:"npivDesiredNodeWwns,omitempty"` NpivDesiredPortWwns int16 `xml:"npivDesiredPortWwns,omitempty"` NpivTemporaryDisabled *bool `xml:"npivTemporaryDisabled"` NpivOnNonRdmDisks *bool `xml:"npivOnNonRdmDisks"` LocationId string `xml:"locationId,omitempty"` Template bool `xml:"template"` GuestId string `xml:"guestId"` AlternateGuestName string `xml:"alternateGuestName"` Annotation string `xml:"annotation,omitempty"` Files VirtualMachineFileInfo `xml:"files"` Tools *ToolsConfigInfo `xml:"tools,omitempty"` Flags VirtualMachineFlagInfo `xml:"flags"` ConsolePreferences *VirtualMachineConsolePreferences `xml:"consolePreferences,omitempty"` DefaultPowerOps VirtualMachineDefaultPowerOpInfo `xml:"defaultPowerOps"` Hardware VirtualHardware `xml:"hardware"` CpuAllocation BaseResourceAllocationInfo `xml:"cpuAllocation,omitempty,typeattr"` MemoryAllocation BaseResourceAllocationInfo `xml:"memoryAllocation,omitempty,typeattr"` LatencySensitivity *LatencySensitivity `xml:"latencySensitivity,omitempty"` MemoryHotAddEnabled *bool `xml:"memoryHotAddEnabled"` CpuHotAddEnabled *bool `xml:"cpuHotAddEnabled"` CpuHotRemoveEnabled *bool `xml:"cpuHotRemoveEnabled"` HotPlugMemoryLimit int64 `xml:"hotPlugMemoryLimit,omitempty"` HotPlugMemoryIncrementSize int64 `xml:"hotPlugMemoryIncrementSize,omitempty"` CpuAffinity *VirtualMachineAffinityInfo `xml:"cpuAffinity,omitempty"` MemoryAffinity *VirtualMachineAffinityInfo `xml:"memoryAffinity,omitempty"` NetworkShaper *VirtualMachineNetworkShaperInfo `xml:"networkShaper,omitempty"` ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` CpuFeatureMask []HostCpuIdInfo `xml:"cpuFeatureMask,omitempty"` DatastoreUrl []VirtualMachineConfigInfoDatastoreUrlPair `xml:"datastoreUrl,omitempty"` SwapPlacement string `xml:"swapPlacement,omitempty"` BootOptions *VirtualMachineBootOptions `xml:"bootOptions,omitempty"` FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` RepConfig *ReplicationConfigSpec `xml:"repConfig,omitempty"` VAppConfig BaseVmConfigInfo `xml:"vAppConfig,omitempty,typeattr"` VAssertsEnabled *bool `xml:"vAssertsEnabled"` ChangeTrackingEnabled *bool `xml:"changeTrackingEnabled"` Firmware string `xml:"firmware,omitempty"` MaxMksConnections int32 `xml:"maxMksConnections,omitempty"` GuestAutoLockEnabled *bool `xml:"guestAutoLockEnabled"` ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` MemoryReservationLockedToMax *bool `xml:"memoryReservationLockedToMax"` InitialOverhead *VirtualMachineConfigInfoOverheadInfo `xml:"initialOverhead,omitempty"` NestedHVEnabled *bool `xml:"nestedHVEnabled"` VPMCEnabled *bool `xml:"vPMCEnabled"` ScheduledHardwareUpgradeInfo *ScheduledHardwareUpgradeInfo `xml:"scheduledHardwareUpgradeInfo,omitempty"` ForkConfigInfo *VirtualMachineForkConfigInfo `xml:"forkConfigInfo,omitempty"` VFlashCacheReservation int64 `xml:"vFlashCacheReservation,omitempty"` VmxConfigChecksum []byte `xml:"vmxConfigChecksum,omitempty"` MessageBusTunnelEnabled *bool `xml:"messageBusTunnelEnabled"` VmStorageObjectId string `xml:"vmStorageObjectId,omitempty"` SwapStorageObjectId string `xml:"swapStorageObjectId,omitempty"` KeyId *CryptoKeyId `xml:"keyId,omitempty"` GuestIntegrityInfo *VirtualMachineGuestIntegrityInfo `xml:"guestIntegrityInfo,omitempty"` MigrateEncryption string `xml:"migrateEncryption,omitempty"` } func init() { t["VirtualMachineConfigInfo"] = reflect.TypeOf((*VirtualMachineConfigInfo)(nil)).Elem() } type VirtualMachineConfigInfoDatastoreUrlPair struct { DynamicData Name string `xml:"name"` Url string `xml:"url"` } func init() { t["VirtualMachineConfigInfoDatastoreUrlPair"] = reflect.TypeOf((*VirtualMachineConfigInfoDatastoreUrlPair)(nil)).Elem() } type VirtualMachineConfigInfoOverheadInfo struct { DynamicData InitialMemoryReservation int64 `xml:"initialMemoryReservation,omitempty"` InitialSwapReservation int64 `xml:"initialSwapReservation,omitempty"` } func init() { t["VirtualMachineConfigInfoOverheadInfo"] = reflect.TypeOf((*VirtualMachineConfigInfoOverheadInfo)(nil)).Elem() } type VirtualMachineConfigOption struct { DynamicData Version string `xml:"version"` Description string `xml:"description"` GuestOSDescriptor []GuestOsDescriptor `xml:"guestOSDescriptor"` GuestOSDefaultIndex int32 `xml:"guestOSDefaultIndex"` HardwareOptions VirtualHardwareOption `xml:"hardwareOptions"` Capabilities VirtualMachineCapability `xml:"capabilities"` Datastore DatastoreOption `xml:"datastore"` DefaultDevice []BaseVirtualDevice `xml:"defaultDevice,omitempty,typeattr"` SupportedMonitorType []string `xml:"supportedMonitorType"` SupportedOvfEnvironmentTransport []string `xml:"supportedOvfEnvironmentTransport,omitempty"` SupportedOvfInstallTransport []string `xml:"supportedOvfInstallTransport,omitempty"` } func init() { t["VirtualMachineConfigOption"] = reflect.TypeOf((*VirtualMachineConfigOption)(nil)).Elem() } type VirtualMachineConfigOptionDescriptor struct { DynamicData Key string `xml:"key"` Description string `xml:"description,omitempty"` Host []ManagedObjectReference `xml:"host,omitempty"` CreateSupported *bool `xml:"createSupported"` DefaultConfigOption *bool `xml:"defaultConfigOption"` RunSupported *bool `xml:"runSupported"` UpgradeSupported *bool `xml:"upgradeSupported"` } func init() { t["VirtualMachineConfigOptionDescriptor"] = reflect.TypeOf((*VirtualMachineConfigOptionDescriptor)(nil)).Elem() } type VirtualMachineConfigSpec struct { DynamicData ChangeVersion string `xml:"changeVersion,omitempty"` Name string `xml:"name,omitempty"` Version string `xml:"version,omitempty"` Uuid string `xml:"uuid,omitempty"` InstanceUuid string `xml:"instanceUuid,omitempty"` NpivNodeWorldWideName []int64 `xml:"npivNodeWorldWideName,omitempty"` NpivPortWorldWideName []int64 `xml:"npivPortWorldWideName,omitempty"` NpivWorldWideNameType string `xml:"npivWorldWideNameType,omitempty"` NpivDesiredNodeWwns int16 `xml:"npivDesiredNodeWwns,omitempty"` NpivDesiredPortWwns int16 `xml:"npivDesiredPortWwns,omitempty"` NpivTemporaryDisabled *bool `xml:"npivTemporaryDisabled"` NpivOnNonRdmDisks *bool `xml:"npivOnNonRdmDisks"` NpivWorldWideNameOp string `xml:"npivWorldWideNameOp,omitempty"` LocationId string `xml:"locationId,omitempty"` GuestId string `xml:"guestId,omitempty"` AlternateGuestName string `xml:"alternateGuestName,omitempty"` Annotation string `xml:"annotation,omitempty"` Files *VirtualMachineFileInfo `xml:"files,omitempty"` Tools *ToolsConfigInfo `xml:"tools,omitempty"` Flags *VirtualMachineFlagInfo `xml:"flags,omitempty"` ConsolePreferences *VirtualMachineConsolePreferences `xml:"consolePreferences,omitempty"` PowerOpInfo *VirtualMachineDefaultPowerOpInfo `xml:"powerOpInfo,omitempty"` NumCPUs int32 `xml:"numCPUs,omitempty"` NumCoresPerSocket int32 `xml:"numCoresPerSocket,omitempty"` MemoryMB int64 `xml:"memoryMB,omitempty"` MemoryHotAddEnabled *bool `xml:"memoryHotAddEnabled"` CpuHotAddEnabled *bool `xml:"cpuHotAddEnabled"` CpuHotRemoveEnabled *bool `xml:"cpuHotRemoveEnabled"` VirtualICH7MPresent *bool `xml:"virtualICH7MPresent"` VirtualSMCPresent *bool `xml:"virtualSMCPresent"` DeviceChange []BaseVirtualDeviceConfigSpec `xml:"deviceChange,omitempty,typeattr"` CpuAllocation BaseResourceAllocationInfo `xml:"cpuAllocation,omitempty,typeattr"` MemoryAllocation BaseResourceAllocationInfo `xml:"memoryAllocation,omitempty,typeattr"` LatencySensitivity *LatencySensitivity `xml:"latencySensitivity,omitempty"` CpuAffinity *VirtualMachineAffinityInfo `xml:"cpuAffinity,omitempty"` MemoryAffinity *VirtualMachineAffinityInfo `xml:"memoryAffinity,omitempty"` NetworkShaper *VirtualMachineNetworkShaperInfo `xml:"networkShaper,omitempty"` CpuFeatureMask []VirtualMachineCpuIdInfoSpec `xml:"cpuFeatureMask,omitempty"` ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` SwapPlacement string `xml:"swapPlacement,omitempty"` BootOptions *VirtualMachineBootOptions `xml:"bootOptions,omitempty"` VAppConfig BaseVmConfigSpec `xml:"vAppConfig,omitempty,typeattr"` FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` RepConfig *ReplicationConfigSpec `xml:"repConfig,omitempty"` VAppConfigRemoved *bool `xml:"vAppConfigRemoved"` VAssertsEnabled *bool `xml:"vAssertsEnabled"` ChangeTrackingEnabled *bool `xml:"changeTrackingEnabled"` Firmware string `xml:"firmware,omitempty"` MaxMksConnections int32 `xml:"maxMksConnections,omitempty"` GuestAutoLockEnabled *bool `xml:"guestAutoLockEnabled"` ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` MemoryReservationLockedToMax *bool `xml:"memoryReservationLockedToMax"` NestedHVEnabled *bool `xml:"nestedHVEnabled"` VPMCEnabled *bool `xml:"vPMCEnabled"` ScheduledHardwareUpgradeInfo *ScheduledHardwareUpgradeInfo `xml:"scheduledHardwareUpgradeInfo,omitempty"` VmProfile []BaseVirtualMachineProfileSpec `xml:"vmProfile,omitempty,typeattr"` MessageBusTunnelEnabled *bool `xml:"messageBusTunnelEnabled"` Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` MigrateEncryption string `xml:"migrateEncryption,omitempty"` } func init() { t["VirtualMachineConfigSpec"] = reflect.TypeOf((*VirtualMachineConfigSpec)(nil)).Elem() } type VirtualMachineConfigSummary struct { DynamicData Name string `xml:"name"` Template bool `xml:"template"` VmPathName string `xml:"vmPathName"` MemorySizeMB int32 `xml:"memorySizeMB,omitempty"` CpuReservation int32 `xml:"cpuReservation,omitempty"` MemoryReservation int32 `xml:"memoryReservation,omitempty"` NumCpu int32 `xml:"numCpu,omitempty"` NumEthernetCards int32 `xml:"numEthernetCards,omitempty"` NumVirtualDisks int32 `xml:"numVirtualDisks,omitempty"` Uuid string `xml:"uuid,omitempty"` InstanceUuid string `xml:"instanceUuid,omitempty"` GuestId string `xml:"guestId,omitempty"` GuestFullName string `xml:"guestFullName,omitempty"` Annotation string `xml:"annotation,omitempty"` Product *VAppProductInfo `xml:"product,omitempty"` InstallBootRequired *bool `xml:"installBootRequired"` FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` } func init() { t["VirtualMachineConfigSummary"] = reflect.TypeOf((*VirtualMachineConfigSummary)(nil)).Elem() } type VirtualMachineConsolePreferences struct { DynamicData PowerOnWhenOpened *bool `xml:"powerOnWhenOpened"` EnterFullScreenOnPowerOn *bool `xml:"enterFullScreenOnPowerOn"` CloseOnPowerOffOrSuspend *bool `xml:"closeOnPowerOffOrSuspend"` } func init() { t["VirtualMachineConsolePreferences"] = reflect.TypeOf((*VirtualMachineConsolePreferences)(nil)).Elem() } type VirtualMachineCpuIdInfoSpec struct { ArrayUpdateSpec Info *HostCpuIdInfo `xml:"info,omitempty"` } func init() { t["VirtualMachineCpuIdInfoSpec"] = reflect.TypeOf((*VirtualMachineCpuIdInfoSpec)(nil)).Elem() } type VirtualMachineDatastoreInfo struct { VirtualMachineTargetInfo Datastore DatastoreSummary `xml:"datastore"` Capability DatastoreCapability `xml:"capability"` MaxFileSize int64 `xml:"maxFileSize"` MaxVirtualDiskCapacity int64 `xml:"maxVirtualDiskCapacity,omitempty"` MaxPhysicalRDMFileSize int64 `xml:"maxPhysicalRDMFileSize,omitempty"` MaxVirtualRDMFileSize int64 `xml:"maxVirtualRDMFileSize,omitempty"` Mode string `xml:"mode"` VStorageSupport string `xml:"vStorageSupport,omitempty"` } func init() { t["VirtualMachineDatastoreInfo"] = reflect.TypeOf((*VirtualMachineDatastoreInfo)(nil)).Elem() } type VirtualMachineDatastoreVolumeOption struct { DynamicData FileSystemType string `xml:"fileSystemType"` MajorVersion int32 `xml:"majorVersion,omitempty"` } func init() { t["VirtualMachineDatastoreVolumeOption"] = reflect.TypeOf((*VirtualMachineDatastoreVolumeOption)(nil)).Elem() } type VirtualMachineDefaultPowerOpInfo struct { DynamicData PowerOffType string `xml:"powerOffType,omitempty"` SuspendType string `xml:"suspendType,omitempty"` ResetType string `xml:"resetType,omitempty"` DefaultPowerOffType string `xml:"defaultPowerOffType,omitempty"` DefaultSuspendType string `xml:"defaultSuspendType,omitempty"` DefaultResetType string `xml:"defaultResetType,omitempty"` StandbyAction string `xml:"standbyAction,omitempty"` } func init() { t["VirtualMachineDefaultPowerOpInfo"] = reflect.TypeOf((*VirtualMachineDefaultPowerOpInfo)(nil)).Elem() } type VirtualMachineDefaultProfileSpec struct { VirtualMachineProfileSpec } func init() { t["VirtualMachineDefaultProfileSpec"] = reflect.TypeOf((*VirtualMachineDefaultProfileSpec)(nil)).Elem() } type VirtualMachineDefinedProfileSpec struct { VirtualMachineProfileSpec ProfileId string `xml:"profileId"` ReplicationSpec *ReplicationSpec `xml:"replicationSpec,omitempty"` ProfileData *VirtualMachineProfileRawData `xml:"profileData,omitempty"` } func init() { t["VirtualMachineDefinedProfileSpec"] = reflect.TypeOf((*VirtualMachineDefinedProfileSpec)(nil)).Elem() } type VirtualMachineDeviceRuntimeInfo struct { DynamicData RuntimeState BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState `xml:"runtimeState,typeattr"` Key int32 `xml:"key"` } func init() { t["VirtualMachineDeviceRuntimeInfo"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfo)(nil)).Elem() } type VirtualMachineDeviceRuntimeInfoDeviceRuntimeState struct { DynamicData } func init() { t["VirtualMachineDeviceRuntimeInfoDeviceRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoDeviceRuntimeState)(nil)).Elem() } type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState struct { VirtualMachineDeviceRuntimeInfoDeviceRuntimeState VmDirectPathGen2Active bool `xml:"vmDirectPathGen2Active"` VmDirectPathGen2InactiveReasonVm []string `xml:"vmDirectPathGen2InactiveReasonVm,omitempty"` VmDirectPathGen2InactiveReasonOther []string `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"` VmDirectPathGen2InactiveReasonExtended string `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"` ReservationStatus string `xml:"reservationStatus,omitempty"` } func init() { t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(nil)).Elem() } type VirtualMachineDiskDeviceInfo struct { VirtualMachineTargetInfo Capacity int64 `xml:"capacity,omitempty"` Vm []ManagedObjectReference `xml:"vm,omitempty"` } func init() { t["VirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem() } type VirtualMachineDisplayTopology struct { DynamicData X int32 `xml:"x"` Y int32 `xml:"y"` Width int32 `xml:"width"` Height int32 `xml:"height"` } func init() { t["VirtualMachineDisplayTopology"] = reflect.TypeOf((*VirtualMachineDisplayTopology)(nil)).Elem() } type VirtualMachineEmptyProfileSpec struct { VirtualMachineProfileSpec } func init() { t["VirtualMachineEmptyProfileSpec"] = reflect.TypeOf((*VirtualMachineEmptyProfileSpec)(nil)).Elem() } type VirtualMachineFeatureRequirement struct { DynamicData Key string `xml:"key"` FeatureName string `xml:"featureName"` Value string `xml:"value"` } func init() { t["VirtualMachineFeatureRequirement"] = reflect.TypeOf((*VirtualMachineFeatureRequirement)(nil)).Elem() } type VirtualMachineFileInfo struct { DynamicData VmPathName string `xml:"vmPathName,omitempty"` SnapshotDirectory string `xml:"snapshotDirectory,omitempty"` SuspendDirectory string `xml:"suspendDirectory,omitempty"` LogDirectory string `xml:"logDirectory,omitempty"` FtMetadataDirectory string `xml:"ftMetadataDirectory,omitempty"` } func init() { t["VirtualMachineFileInfo"] = reflect.TypeOf((*VirtualMachineFileInfo)(nil)).Elem() } type VirtualMachineFileLayout struct { DynamicData ConfigFile []string `xml:"configFile,omitempty"` LogFile []string `xml:"logFile,omitempty"` Disk []VirtualMachineFileLayoutDiskLayout `xml:"disk,omitempty"` Snapshot []VirtualMachineFileLayoutSnapshotLayout `xml:"snapshot,omitempty"` SwapFile string `xml:"swapFile,omitempty"` } func init() { t["VirtualMachineFileLayout"] = reflect.TypeOf((*VirtualMachineFileLayout)(nil)).Elem() } type VirtualMachineFileLayoutDiskLayout struct { DynamicData Key int32 `xml:"key"` DiskFile []string `xml:"diskFile"` } func init() { t["VirtualMachineFileLayoutDiskLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutDiskLayout)(nil)).Elem() } type VirtualMachineFileLayoutEx struct { DynamicData File []VirtualMachineFileLayoutExFileInfo `xml:"file,omitempty"` Disk []VirtualMachineFileLayoutExDiskLayout `xml:"disk,omitempty"` Snapshot []VirtualMachineFileLayoutExSnapshotLayout `xml:"snapshot,omitempty"` Timestamp time.Time `xml:"timestamp"` } func init() { t["VirtualMachineFileLayoutEx"] = reflect.TypeOf((*VirtualMachineFileLayoutEx)(nil)).Elem() } type VirtualMachineFileLayoutExDiskLayout struct { DynamicData Key int32 `xml:"key"` Chain []VirtualMachineFileLayoutExDiskUnit `xml:"chain,omitempty"` } func init() { t["VirtualMachineFileLayoutExDiskLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutExDiskLayout)(nil)).Elem() } type VirtualMachineFileLayoutExDiskUnit struct { DynamicData FileKey []int32 `xml:"fileKey"` } func init() { t["VirtualMachineFileLayoutExDiskUnit"] = reflect.TypeOf((*VirtualMachineFileLayoutExDiskUnit)(nil)).Elem() } type VirtualMachineFileLayoutExFileInfo struct { DynamicData Key int32 `xml:"key"` Name string `xml:"name"` Type string `xml:"type"` Size int64 `xml:"size"` UniqueSize int64 `xml:"uniqueSize,omitempty"` BackingObjectId string `xml:"backingObjectId,omitempty"` Accessible *bool `xml:"accessible"` } func init() { t["VirtualMachineFileLayoutExFileInfo"] = reflect.TypeOf((*VirtualMachineFileLayoutExFileInfo)(nil)).Elem() } type VirtualMachineFileLayoutExSnapshotLayout struct { DynamicData Key ManagedObjectReference `xml:"key"` DataKey int32 `xml:"dataKey"` MemoryKey int32 `xml:"memoryKey,omitempty"` Disk []VirtualMachineFileLayoutExDiskLayout `xml:"disk,omitempty"` } func init() { t["VirtualMachineFileLayoutExSnapshotLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutExSnapshotLayout)(nil)).Elem() } type VirtualMachineFileLayoutSnapshotLayout struct { DynamicData Key ManagedObjectReference `xml:"key"` SnapshotFile []string `xml:"snapshotFile"` } func init() { t["VirtualMachineFileLayoutSnapshotLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutSnapshotLayout)(nil)).Elem() } type VirtualMachineFlagInfo struct { DynamicData DisableAcceleration *bool `xml:"disableAcceleration"` EnableLogging *bool `xml:"enableLogging"` UseToe *bool `xml:"useToe"` RunWithDebugInfo *bool `xml:"runWithDebugInfo"` MonitorType string `xml:"monitorType,omitempty"` HtSharing string `xml:"htSharing,omitempty"` SnapshotDisabled *bool `xml:"snapshotDisabled"` SnapshotLocked *bool `xml:"snapshotLocked"` DiskUuidEnabled *bool `xml:"diskUuidEnabled"` VirtualMmuUsage string `xml:"virtualMmuUsage,omitempty"` VirtualExecUsage string `xml:"virtualExecUsage,omitempty"` SnapshotPowerOffBehavior string `xml:"snapshotPowerOffBehavior,omitempty"` RecordReplayEnabled *bool `xml:"recordReplayEnabled"` FaultToleranceType string `xml:"faultToleranceType,omitempty"` CbrcCacheEnabled *bool `xml:"cbrcCacheEnabled"` } func init() { t["VirtualMachineFlagInfo"] = reflect.TypeOf((*VirtualMachineFlagInfo)(nil)).Elem() } type VirtualMachineFloppyInfo struct { VirtualMachineTargetInfo } func init() { t["VirtualMachineFloppyInfo"] = reflect.TypeOf((*VirtualMachineFloppyInfo)(nil)).Elem() } type VirtualMachineForkConfigInfo struct { DynamicData ParentEnabled *bool `xml:"parentEnabled"` ChildForkGroupId string `xml:"childForkGroupId,omitempty"` ParentForkGroupId string `xml:"parentForkGroupId,omitempty"` ChildType string `xml:"childType,omitempty"` } func init() { t["VirtualMachineForkConfigInfo"] = reflect.TypeOf((*VirtualMachineForkConfigInfo)(nil)).Elem() } type VirtualMachineGuestIntegrityInfo struct { DynamicData Enabled *bool `xml:"enabled"` } func init() { t["VirtualMachineGuestIntegrityInfo"] = reflect.TypeOf((*VirtualMachineGuestIntegrityInfo)(nil)).Elem() } type VirtualMachineGuestQuiesceSpec struct { DynamicData Timeout int32 `xml:"timeout,omitempty"` } func init() { t["VirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem() } type VirtualMachineGuestSummary struct { DynamicData GuestId string `xml:"guestId,omitempty"` GuestFullName string `xml:"guestFullName,omitempty"` ToolsStatus VirtualMachineToolsStatus `xml:"toolsStatus,omitempty"` ToolsVersionStatus string `xml:"toolsVersionStatus,omitempty"` ToolsVersionStatus2 string `xml:"toolsVersionStatus2,omitempty"` ToolsRunningStatus string `xml:"toolsRunningStatus,omitempty"` HostName string `xml:"hostName,omitempty"` IpAddress string `xml:"ipAddress,omitempty"` } func init() { t["VirtualMachineGuestSummary"] = reflect.TypeOf((*VirtualMachineGuestSummary)(nil)).Elem() } type VirtualMachineIdeDiskDeviceInfo struct { VirtualMachineDiskDeviceInfo PartitionTable []VirtualMachineIdeDiskDevicePartitionInfo `xml:"partitionTable,omitempty"` } func init() { t["VirtualMachineIdeDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineIdeDiskDeviceInfo)(nil)).Elem() } type VirtualMachineIdeDiskDevicePartitionInfo struct { DynamicData Id int32 `xml:"id"` Capacity int32 `xml:"capacity"` } func init() { t["VirtualMachineIdeDiskDevicePartitionInfo"] = reflect.TypeOf((*VirtualMachineIdeDiskDevicePartitionInfo)(nil)).Elem() } type VirtualMachineImportSpec struct { ImportSpec ConfigSpec VirtualMachineConfigSpec `xml:"configSpec"` ResPoolEntity *ManagedObjectReference `xml:"resPoolEntity,omitempty"` } func init() { t["VirtualMachineImportSpec"] = reflect.TypeOf((*VirtualMachineImportSpec)(nil)).Elem() } type VirtualMachineLegacyNetworkSwitchInfo struct { DynamicData Name string `xml:"name"` } func init() { t["VirtualMachineLegacyNetworkSwitchInfo"] = reflect.TypeOf((*VirtualMachineLegacyNetworkSwitchInfo)(nil)).Elem() } type VirtualMachineMemoryReservationInfo struct { DynamicData VirtualMachineMin int64 `xml:"virtualMachineMin"` VirtualMachineMax int64 `xml:"virtualMachineMax"` VirtualMachineReserved int64 `xml:"virtualMachineReserved"` AllocationPolicy string `xml:"allocationPolicy"` } func init() { t["VirtualMachineMemoryReservationInfo"] = reflect.TypeOf((*VirtualMachineMemoryReservationInfo)(nil)).Elem() } type VirtualMachineMemoryReservationSpec struct { DynamicData VirtualMachineReserved int64 `xml:"virtualMachineReserved,omitempty"` AllocationPolicy string `xml:"allocationPolicy,omitempty"` } func init() { t["VirtualMachineMemoryReservationSpec"] = reflect.TypeOf((*VirtualMachineMemoryReservationSpec)(nil)).Elem() } type VirtualMachineMessage struct { DynamicData Id string `xml:"id"` Argument []AnyType `xml:"argument,omitempty,typeattr"` Text string `xml:"text,omitempty"` } func init() { t["VirtualMachineMessage"] = reflect.TypeOf((*VirtualMachineMessage)(nil)).Elem() } type VirtualMachineMetadataManagerVmMetadata struct { DynamicData VmId string `xml:"vmId"` Metadata string `xml:"metadata,omitempty"` } func init() { t["VirtualMachineMetadataManagerVmMetadata"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadata)(nil)).Elem() } type VirtualMachineMetadataManagerVmMetadataInput struct { DynamicData Operation string `xml:"operation"` VmMetadata VirtualMachineMetadataManagerVmMetadata `xml:"vmMetadata"` } func init() { t["VirtualMachineMetadataManagerVmMetadataInput"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataInput)(nil)).Elem() } type VirtualMachineMetadataManagerVmMetadataOwner struct { DynamicData Name string `xml:"name"` } func init() { t["VirtualMachineMetadataManagerVmMetadataOwner"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOwner)(nil)).Elem() } type VirtualMachineMetadataManagerVmMetadataResult struct { DynamicData VmMetadata VirtualMachineMetadataManagerVmMetadata `xml:"vmMetadata"` Error *LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["VirtualMachineMetadataManagerVmMetadataResult"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataResult)(nil)).Elem() } type VirtualMachineMksTicket struct { DynamicData Ticket string `xml:"ticket"` CfgFile string `xml:"cfgFile"` Host string `xml:"host,omitempty"` Port int32 `xml:"port,omitempty"` SslThumbprint string `xml:"sslThumbprint,omitempty"` } func init() { t["VirtualMachineMksTicket"] = reflect.TypeOf((*VirtualMachineMksTicket)(nil)).Elem() } type VirtualMachineNetworkInfo struct { VirtualMachineTargetInfo Network BaseNetworkSummary `xml:"network,typeattr"` Vswitch string `xml:"vswitch,omitempty"` } func init() { t["VirtualMachineNetworkInfo"] = reflect.TypeOf((*VirtualMachineNetworkInfo)(nil)).Elem() } type VirtualMachineNetworkShaperInfo struct { DynamicData Enabled *bool `xml:"enabled"` PeakBps int64 `xml:"peakBps,omitempty"` AverageBps int64 `xml:"averageBps,omitempty"` BurstSize int64 `xml:"burstSize,omitempty"` } func init() { t["VirtualMachineNetworkShaperInfo"] = reflect.TypeOf((*VirtualMachineNetworkShaperInfo)(nil)).Elem() } type VirtualMachineParallelInfo struct { VirtualMachineTargetInfo } func init() { t["VirtualMachineParallelInfo"] = reflect.TypeOf((*VirtualMachineParallelInfo)(nil)).Elem() } type VirtualMachinePciPassthroughInfo struct { VirtualMachineTargetInfo PciDevice HostPciDevice `xml:"pciDevice"` SystemId string `xml:"systemId"` } func init() { t["VirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciPassthroughInfo)(nil)).Elem() } type VirtualMachinePciSharedGpuPassthroughInfo struct { VirtualMachineTargetInfo Vgpu string `xml:"vgpu"` } func init() { t["VirtualMachinePciSharedGpuPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciSharedGpuPassthroughInfo)(nil)).Elem() } type VirtualMachineProfileRawData struct { DynamicData ExtensionKey string `xml:"extensionKey"` ObjectData string `xml:"objectData,omitempty"` } func init() { t["VirtualMachineProfileRawData"] = reflect.TypeOf((*VirtualMachineProfileRawData)(nil)).Elem() } type VirtualMachineProfileSpec struct { DynamicData } func init() { t["VirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem() } type VirtualMachineQuestionInfo struct { DynamicData Id string `xml:"id"` Text string `xml:"text"` Choice ChoiceOption `xml:"choice"` Message []VirtualMachineMessage `xml:"message,omitempty"` } func init() { t["VirtualMachineQuestionInfo"] = reflect.TypeOf((*VirtualMachineQuestionInfo)(nil)).Elem() } type VirtualMachineQuickStats struct { DynamicData OverallCpuUsage int32 `xml:"overallCpuUsage,omitempty"` OverallCpuDemand int32 `xml:"overallCpuDemand,omitempty"` GuestMemoryUsage int32 `xml:"guestMemoryUsage,omitempty"` HostMemoryUsage int32 `xml:"hostMemoryUsage,omitempty"` GuestHeartbeatStatus ManagedEntityStatus `xml:"guestHeartbeatStatus"` DistributedCpuEntitlement int32 `xml:"distributedCpuEntitlement,omitempty"` DistributedMemoryEntitlement int32 `xml:"distributedMemoryEntitlement,omitempty"` StaticCpuEntitlement int32 `xml:"staticCpuEntitlement,omitempty"` StaticMemoryEntitlement int32 `xml:"staticMemoryEntitlement,omitempty"` PrivateMemory int32 `xml:"privateMemory,omitempty"` SharedMemory int32 `xml:"sharedMemory,omitempty"` SwappedMemory int32 `xml:"swappedMemory,omitempty"` BalloonedMemory int32 `xml:"balloonedMemory,omitempty"` ConsumedOverheadMemory int32 `xml:"consumedOverheadMemory,omitempty"` FtLogBandwidth int32 `xml:"ftLogBandwidth,omitempty"` FtSecondaryLatency int32 `xml:"ftSecondaryLatency,omitempty"` FtLatencyStatus ManagedEntityStatus `xml:"ftLatencyStatus,omitempty"` CompressedMemory int64 `xml:"compressedMemory,omitempty"` UptimeSeconds int32 `xml:"uptimeSeconds,omitempty"` SsdSwappedMemory int64 `xml:"ssdSwappedMemory,omitempty"` } func init() { t["VirtualMachineQuickStats"] = reflect.TypeOf((*VirtualMachineQuickStats)(nil)).Elem() } type VirtualMachineRelocateSpec struct { DynamicData Service *ServiceLocator `xml:"service,omitempty"` Folder *ManagedObjectReference `xml:"folder,omitempty"` Datastore *ManagedObjectReference `xml:"datastore,omitempty"` DiskMoveType string `xml:"diskMoveType,omitempty"` Pool *ManagedObjectReference `xml:"pool,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` Disk []VirtualMachineRelocateSpecDiskLocator `xml:"disk,omitempty"` Transform VirtualMachineRelocateTransformation `xml:"transform,omitempty"` DeviceChange []BaseVirtualDeviceConfigSpec `xml:"deviceChange,omitempty,typeattr"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` } func init() { t["VirtualMachineRelocateSpec"] = reflect.TypeOf((*VirtualMachineRelocateSpec)(nil)).Elem() } type VirtualMachineRelocateSpecDiskLocator struct { DynamicData DiskId int32 `xml:"diskId"` Datastore ManagedObjectReference `xml:"datastore"` DiskMoveType string `xml:"diskMoveType,omitempty"` DiskBackingInfo BaseVirtualDeviceBackingInfo `xml:"diskBackingInfo,omitempty,typeattr"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` } func init() { t["VirtualMachineRelocateSpecDiskLocator"] = reflect.TypeOf((*VirtualMachineRelocateSpecDiskLocator)(nil)).Elem() } type VirtualMachineRuntimeInfo struct { DynamicData Device []VirtualMachineDeviceRuntimeInfo `xml:"device,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` ConnectionState VirtualMachineConnectionState `xml:"connectionState"` PowerState VirtualMachinePowerState `xml:"powerState"` FaultToleranceState VirtualMachineFaultToleranceState `xml:"faultToleranceState,omitempty"` DasVmProtection *VirtualMachineRuntimeInfoDasProtectionState `xml:"dasVmProtection,omitempty"` ToolsInstallerMounted bool `xml:"toolsInstallerMounted"` SuspendTime *time.Time `xml:"suspendTime"` BootTime *time.Time `xml:"bootTime"` SuspendInterval int64 `xml:"suspendInterval,omitempty"` Question *VirtualMachineQuestionInfo `xml:"question,omitempty"` MemoryOverhead int64 `xml:"memoryOverhead,omitempty"` MaxCpuUsage int32 `xml:"maxCpuUsage,omitempty"` MaxMemoryUsage int32 `xml:"maxMemoryUsage,omitempty"` NumMksConnections int32 `xml:"numMksConnections"` RecordReplayState VirtualMachineRecordReplayState `xml:"recordReplayState,omitempty"` CleanPowerOff *bool `xml:"cleanPowerOff"` NeedSecondaryReason string `xml:"needSecondaryReason,omitempty"` OnlineStandby *bool `xml:"onlineStandby"` MinRequiredEVCModeKey string `xml:"minRequiredEVCModeKey,omitempty"` ConsolidationNeeded *bool `xml:"consolidationNeeded"` OfflineFeatureRequirement []VirtualMachineFeatureRequirement `xml:"offlineFeatureRequirement,omitempty"` FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` FeatureMask []HostFeatureMask `xml:"featureMask,omitempty"` VFlashCacheAllocation int64 `xml:"vFlashCacheAllocation,omitempty"` Paused *bool `xml:"paused"` SnapshotInBackground *bool `xml:"snapshotInBackground"` QuiescedForkParent *bool `xml:"quiescedForkParent"` } func init() { t["VirtualMachineRuntimeInfo"] = reflect.TypeOf((*VirtualMachineRuntimeInfo)(nil)).Elem() } type VirtualMachineRuntimeInfoDasProtectionState struct { DynamicData DasProtected bool `xml:"dasProtected"` } func init() { t["VirtualMachineRuntimeInfoDasProtectionState"] = reflect.TypeOf((*VirtualMachineRuntimeInfoDasProtectionState)(nil)).Elem() } type VirtualMachineScsiDiskDeviceInfo struct { VirtualMachineDiskDeviceInfo Disk *HostScsiDisk `xml:"disk,omitempty"` TransportHint string `xml:"transportHint,omitempty"` LunNumber int32 `xml:"lunNumber,omitempty"` } func init() { t["VirtualMachineScsiDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineScsiDiskDeviceInfo)(nil)).Elem() } type VirtualMachineScsiPassthroughInfo struct { VirtualMachineTargetInfo ScsiClass string `xml:"scsiClass"` Vendor string `xml:"vendor"` PhysicalUnitNumber int32 `xml:"physicalUnitNumber"` } func init() { t["VirtualMachineScsiPassthroughInfo"] = reflect.TypeOf((*VirtualMachineScsiPassthroughInfo)(nil)).Elem() } type VirtualMachineSerialInfo struct { VirtualMachineTargetInfo } func init() { t["VirtualMachineSerialInfo"] = reflect.TypeOf((*VirtualMachineSerialInfo)(nil)).Elem() } type VirtualMachineSnapshotInfo struct { DynamicData CurrentSnapshot *ManagedObjectReference `xml:"currentSnapshot,omitempty"` RootSnapshotList []VirtualMachineSnapshotTree `xml:"rootSnapshotList"` } func init() { t["VirtualMachineSnapshotInfo"] = reflect.TypeOf((*VirtualMachineSnapshotInfo)(nil)).Elem() } type VirtualMachineSnapshotTree struct { DynamicData Snapshot ManagedObjectReference `xml:"snapshot"` Vm ManagedObjectReference `xml:"vm"` Name string `xml:"name"` Description string `xml:"description"` Id int32 `xml:"id,omitempty"` CreateTime time.Time `xml:"createTime"` State VirtualMachinePowerState `xml:"state"` Quiesced bool `xml:"quiesced"` BackupManifest string `xml:"backupManifest,omitempty"` ChildSnapshotList []VirtualMachineSnapshotTree `xml:"childSnapshotList,omitempty"` ReplaySupported *bool `xml:"replaySupported"` } func init() { t["VirtualMachineSnapshotTree"] = reflect.TypeOf((*VirtualMachineSnapshotTree)(nil)).Elem() } type VirtualMachineSoundInfo struct { VirtualMachineTargetInfo } func init() { t["VirtualMachineSoundInfo"] = reflect.TypeOf((*VirtualMachineSoundInfo)(nil)).Elem() } type VirtualMachineSriovDevicePoolInfo struct { DynamicData Key string `xml:"key"` } func init() { t["VirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem() } type VirtualMachineSriovInfo struct { VirtualMachinePciPassthroughInfo VirtualFunction bool `xml:"virtualFunction"` Pnic string `xml:"pnic,omitempty"` DevicePool BaseVirtualMachineSriovDevicePoolInfo `xml:"devicePool,omitempty,typeattr"` } func init() { t["VirtualMachineSriovInfo"] = reflect.TypeOf((*VirtualMachineSriovInfo)(nil)).Elem() } type VirtualMachineSriovNetworkDevicePoolInfo struct { VirtualMachineSriovDevicePoolInfo SwitchKey string `xml:"switchKey,omitempty"` SwitchUuid string `xml:"switchUuid,omitempty"` } func init() { t["VirtualMachineSriovNetworkDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovNetworkDevicePoolInfo)(nil)).Elem() } type VirtualMachineStorageInfo struct { DynamicData PerDatastoreUsage []VirtualMachineUsageOnDatastore `xml:"perDatastoreUsage,omitempty"` Timestamp time.Time `xml:"timestamp"` } func init() { t["VirtualMachineStorageInfo"] = reflect.TypeOf((*VirtualMachineStorageInfo)(nil)).Elem() } type VirtualMachineStorageSummary struct { DynamicData Committed int64 `xml:"committed"` Uncommitted int64 `xml:"uncommitted"` Unshared int64 `xml:"unshared"` Timestamp time.Time `xml:"timestamp"` } func init() { t["VirtualMachineStorageSummary"] = reflect.TypeOf((*VirtualMachineStorageSummary)(nil)).Elem() } type VirtualMachineSummary struct { DynamicData Vm *ManagedObjectReference `xml:"vm,omitempty"` Runtime VirtualMachineRuntimeInfo `xml:"runtime"` Guest *VirtualMachineGuestSummary `xml:"guest,omitempty"` Config VirtualMachineConfigSummary `xml:"config"` Storage *VirtualMachineStorageSummary `xml:"storage,omitempty"` QuickStats VirtualMachineQuickStats `xml:"quickStats"` OverallStatus ManagedEntityStatus `xml:"overallStatus"` CustomValue []BaseCustomFieldValue `xml:"customValue,omitempty,typeattr"` } func init() { t["VirtualMachineSummary"] = reflect.TypeOf((*VirtualMachineSummary)(nil)).Elem() } type VirtualMachineTargetInfo struct { DynamicData Name string `xml:"name"` ConfigurationTag []string `xml:"configurationTag,omitempty"` } func init() { t["VirtualMachineTargetInfo"] = reflect.TypeOf((*VirtualMachineTargetInfo)(nil)).Elem() } type VirtualMachineTicket struct { DynamicData Ticket string `xml:"ticket"` CfgFile string `xml:"cfgFile"` Host string `xml:"host,omitempty"` Port int32 `xml:"port,omitempty"` SslThumbprint string `xml:"sslThumbprint,omitempty"` } func init() { t["VirtualMachineTicket"] = reflect.TypeOf((*VirtualMachineTicket)(nil)).Elem() } type VirtualMachineUsageOnDatastore struct { DynamicData Datastore ManagedObjectReference `xml:"datastore"` Committed int64 `xml:"committed"` Uncommitted int64 `xml:"uncommitted"` Unshared int64 `xml:"unshared"` } func init() { t["VirtualMachineUsageOnDatastore"] = reflect.TypeOf((*VirtualMachineUsageOnDatastore)(nil)).Elem() } type VirtualMachineUsbInfo struct { VirtualMachineTargetInfo Description string `xml:"description"` Vendor int32 `xml:"vendor"` Product int32 `xml:"product"` PhysicalPath string `xml:"physicalPath"` Family []string `xml:"family,omitempty"` Speed []string `xml:"speed,omitempty"` Summary *VirtualMachineSummary `xml:"summary,omitempty"` } func init() { t["VirtualMachineUsbInfo"] = reflect.TypeOf((*VirtualMachineUsbInfo)(nil)).Elem() } type VirtualMachineVFlashModuleInfo struct { VirtualMachineTargetInfo VFlashModule HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"vFlashModule"` } func init() { t["VirtualMachineVFlashModuleInfo"] = reflect.TypeOf((*VirtualMachineVFlashModuleInfo)(nil)).Elem() } type VirtualMachineVMCIDevice struct { VirtualDevice Id int64 `xml:"id,omitempty"` AllowUnrestrictedCommunication *bool `xml:"allowUnrestrictedCommunication"` FilterEnable *bool `xml:"filterEnable"` FilterInfo *VirtualMachineVMCIDeviceFilterInfo `xml:"filterInfo,omitempty"` } func init() { t["VirtualMachineVMCIDevice"] = reflect.TypeOf((*VirtualMachineVMCIDevice)(nil)).Elem() } type VirtualMachineVMCIDeviceFilterInfo struct { DynamicData Filters []VirtualMachineVMCIDeviceFilterSpec `xml:"filters,omitempty"` } func init() { t["VirtualMachineVMCIDeviceFilterInfo"] = reflect.TypeOf((*VirtualMachineVMCIDeviceFilterInfo)(nil)).Elem() } type VirtualMachineVMCIDeviceFilterSpec struct { DynamicData Rank int64 `xml:"rank"` Action string `xml:"action"` Protocol string `xml:"protocol"` Direction string `xml:"direction"` LowerDstPortBoundary int64 `xml:"lowerDstPortBoundary,omitempty"` UpperDstPortBoundary int64 `xml:"upperDstPortBoundary,omitempty"` } func init() { t["VirtualMachineVMCIDeviceFilterSpec"] = reflect.TypeOf((*VirtualMachineVMCIDeviceFilterSpec)(nil)).Elem() } type VirtualMachineVMCIDeviceOption struct { VirtualDeviceOption AllowUnrestrictedCommunication BoolOption `xml:"allowUnrestrictedCommunication"` FilterSpecOption *VirtualMachineVMCIDeviceOptionFilterSpecOption `xml:"filterSpecOption,omitempty"` FilterSupported *BoolOption `xml:"filterSupported,omitempty"` } func init() { t["VirtualMachineVMCIDeviceOption"] = reflect.TypeOf((*VirtualMachineVMCIDeviceOption)(nil)).Elem() } type VirtualMachineVMCIDeviceOptionFilterSpecOption struct { DynamicData Action ChoiceOption `xml:"action"` Protocol ChoiceOption `xml:"protocol"` Direction ChoiceOption `xml:"direction"` LowerDstPortBoundary LongOption `xml:"lowerDstPortBoundary"` UpperDstPortBoundary LongOption `xml:"upperDstPortBoundary"` } func init() { t["VirtualMachineVMCIDeviceOptionFilterSpecOption"] = reflect.TypeOf((*VirtualMachineVMCIDeviceOptionFilterSpecOption)(nil)).Elem() } type VirtualMachineVMIROM struct { VirtualDevice } func init() { t["VirtualMachineVMIROM"] = reflect.TypeOf((*VirtualMachineVMIROM)(nil)).Elem() } type VirtualMachineVideoCard struct { VirtualDevice VideoRamSizeInKB int64 `xml:"videoRamSizeInKB,omitempty"` NumDisplays int32 `xml:"numDisplays,omitempty"` UseAutoDetect *bool `xml:"useAutoDetect"` Enable3DSupport *bool `xml:"enable3DSupport"` Use3dRenderer string `xml:"use3dRenderer,omitempty"` GraphicsMemorySizeInKB int64 `xml:"graphicsMemorySizeInKB,omitempty"` } func init() { t["VirtualMachineVideoCard"] = reflect.TypeOf((*VirtualMachineVideoCard)(nil)).Elem() } type VirtualMachineWindowsQuiesceSpec struct { VirtualMachineGuestQuiesceSpec VssBackupType int32 `xml:"vssBackupType,omitempty"` VssBootableSystemState *bool `xml:"vssBootableSystemState"` VssPartialFileSupport *bool `xml:"vssPartialFileSupport"` VssBackupContext string `xml:"vssBackupContext,omitempty"` } func init() { t["VirtualMachineWindowsQuiesceSpec"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpec)(nil)).Elem() } type VirtualMachineWipeResult struct { DynamicData DiskId int32 `xml:"diskId"` ShrinkableDiskSpace int64 `xml:"shrinkableDiskSpace"` } func init() { t["VirtualMachineWipeResult"] = reflect.TypeOf((*VirtualMachineWipeResult)(nil)).Elem() } type VirtualNVMEController struct { VirtualController } func init() { t["VirtualNVMEController"] = reflect.TypeOf((*VirtualNVMEController)(nil)).Elem() } type VirtualNVMEControllerOption struct { VirtualControllerOption NumNVMEDisks IntOption `xml:"numNVMEDisks"` } func init() { t["VirtualNVMEControllerOption"] = reflect.TypeOf((*VirtualNVMEControllerOption)(nil)).Elem() } type VirtualNicManagerNetConfig struct { DynamicData NicType string `xml:"nicType"` MultiSelectAllowed bool `xml:"multiSelectAllowed"` CandidateVnic []HostVirtualNic `xml:"candidateVnic,omitempty"` SelectedVnic []string `xml:"selectedVnic,omitempty"` } func init() { t["VirtualNicManagerNetConfig"] = reflect.TypeOf((*VirtualNicManagerNetConfig)(nil)).Elem() } type VirtualPCIController struct { VirtualController } func init() { t["VirtualPCIController"] = reflect.TypeOf((*VirtualPCIController)(nil)).Elem() } type VirtualPCIControllerOption struct { VirtualControllerOption NumSCSIControllers IntOption `xml:"numSCSIControllers"` NumEthernetCards IntOption `xml:"numEthernetCards"` NumVideoCards IntOption `xml:"numVideoCards"` NumSoundCards IntOption `xml:"numSoundCards"` NumVmiRoms IntOption `xml:"numVmiRoms"` NumVmciDevices *IntOption `xml:"numVmciDevices,omitempty"` NumPCIPassthroughDevices *IntOption `xml:"numPCIPassthroughDevices,omitempty"` NumSasSCSIControllers *IntOption `xml:"numSasSCSIControllers,omitempty"` NumVmxnet3EthernetCards *IntOption `xml:"numVmxnet3EthernetCards,omitempty"` NumParaVirtualSCSIControllers *IntOption `xml:"numParaVirtualSCSIControllers,omitempty"` NumSATAControllers *IntOption `xml:"numSATAControllers,omitempty"` NumNVMEControllers *IntOption `xml:"numNVMEControllers,omitempty"` } func init() { t["VirtualPCIControllerOption"] = reflect.TypeOf((*VirtualPCIControllerOption)(nil)).Elem() } type VirtualPCIPassthrough struct { VirtualDevice } func init() { t["VirtualPCIPassthrough"] = reflect.TypeOf((*VirtualPCIPassthrough)(nil)).Elem() } type VirtualPCIPassthroughDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo Id string `xml:"id"` DeviceId string `xml:"deviceId"` SystemId string `xml:"systemId"` VendorId int16 `xml:"vendorId"` } func init() { t["VirtualPCIPassthroughDeviceBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughDeviceBackingInfo)(nil)).Elem() } type VirtualPCIPassthroughDeviceBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualPCIPassthroughDeviceBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughDeviceBackingOption)(nil)).Elem() } type VirtualPCIPassthroughOption struct { VirtualDeviceOption } func init() { t["VirtualPCIPassthroughOption"] = reflect.TypeOf((*VirtualPCIPassthroughOption)(nil)).Elem() } type VirtualPCIPassthroughPluginBackingInfo struct { VirtualDeviceBackingInfo } func init() { t["VirtualPCIPassthroughPluginBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingInfo)(nil)).Elem() } type VirtualPCIPassthroughPluginBackingOption struct { VirtualDeviceBackingOption } func init() { t["VirtualPCIPassthroughPluginBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingOption)(nil)).Elem() } type VirtualPCIPassthroughVmiopBackingInfo struct { VirtualPCIPassthroughPluginBackingInfo Vgpu string `xml:"vgpu,omitempty"` } func init() { t["VirtualPCIPassthroughVmiopBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughVmiopBackingInfo)(nil)).Elem() } type VirtualPCIPassthroughVmiopBackingOption struct { VirtualPCIPassthroughPluginBackingOption Vgpu StringOption `xml:"vgpu"` MaxInstances int32 `xml:"maxInstances"` } func init() { t["VirtualPCIPassthroughVmiopBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughVmiopBackingOption)(nil)).Elem() } type VirtualPCNet32 struct { VirtualEthernetCard } func init() { t["VirtualPCNet32"] = reflect.TypeOf((*VirtualPCNet32)(nil)).Elem() } type VirtualPCNet32Option struct { VirtualEthernetCardOption SupportsMorphing bool `xml:"supportsMorphing"` } func init() { t["VirtualPCNet32Option"] = reflect.TypeOf((*VirtualPCNet32Option)(nil)).Elem() } type VirtualPS2Controller struct { VirtualController } func init() { t["VirtualPS2Controller"] = reflect.TypeOf((*VirtualPS2Controller)(nil)).Elem() } type VirtualPS2ControllerOption struct { VirtualControllerOption NumKeyboards IntOption `xml:"numKeyboards"` NumPointingDevices IntOption `xml:"numPointingDevices"` } func init() { t["VirtualPS2ControllerOption"] = reflect.TypeOf((*VirtualPS2ControllerOption)(nil)).Elem() } type VirtualParallelPort struct { VirtualDevice } func init() { t["VirtualParallelPort"] = reflect.TypeOf((*VirtualParallelPort)(nil)).Elem() } type VirtualParallelPortDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualParallelPortDeviceBackingInfo"] = reflect.TypeOf((*VirtualParallelPortDeviceBackingInfo)(nil)).Elem() } type VirtualParallelPortDeviceBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualParallelPortDeviceBackingOption"] = reflect.TypeOf((*VirtualParallelPortDeviceBackingOption)(nil)).Elem() } type VirtualParallelPortFileBackingInfo struct { VirtualDeviceFileBackingInfo } func init() { t["VirtualParallelPortFileBackingInfo"] = reflect.TypeOf((*VirtualParallelPortFileBackingInfo)(nil)).Elem() } type VirtualParallelPortFileBackingOption struct { VirtualDeviceFileBackingOption } func init() { t["VirtualParallelPortFileBackingOption"] = reflect.TypeOf((*VirtualParallelPortFileBackingOption)(nil)).Elem() } type VirtualParallelPortOption struct { VirtualDeviceOption } func init() { t["VirtualParallelPortOption"] = reflect.TypeOf((*VirtualParallelPortOption)(nil)).Elem() } type VirtualPointingDevice struct { VirtualDevice } func init() { t["VirtualPointingDevice"] = reflect.TypeOf((*VirtualPointingDevice)(nil)).Elem() } type VirtualPointingDeviceBackingOption struct { VirtualDeviceDeviceBackingOption HostPointingDevice ChoiceOption `xml:"hostPointingDevice"` } func init() { t["VirtualPointingDeviceBackingOption"] = reflect.TypeOf((*VirtualPointingDeviceBackingOption)(nil)).Elem() } type VirtualPointingDeviceDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo HostPointingDevice string `xml:"hostPointingDevice"` } func init() { t["VirtualPointingDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualPointingDeviceDeviceBackingInfo)(nil)).Elem() } type VirtualPointingDeviceOption struct { VirtualDeviceOption } func init() { t["VirtualPointingDeviceOption"] = reflect.TypeOf((*VirtualPointingDeviceOption)(nil)).Elem() } type VirtualResourcePoolSpec struct { DynamicData VrpId string `xml:"vrpId,omitempty"` VrpName string `xml:"vrpName,omitempty"` Description string `xml:"description,omitempty"` CpuAllocation VrpResourceAllocationInfo `xml:"cpuAllocation"` MemoryAllocation VrpResourceAllocationInfo `xml:"memoryAllocation"` RpList []ManagedObjectReference `xml:"rpList,omitempty"` HubList []ManagedObjectReference `xml:"hubList,omitempty"` RootVRP *bool `xml:"rootVRP"` StaticVRP *bool `xml:"staticVRP"` ChangeVersion int64 `xml:"changeVersion,omitempty"` } func init() { t["VirtualResourcePoolSpec"] = reflect.TypeOf((*VirtualResourcePoolSpec)(nil)).Elem() } type VirtualResourcePoolUsage struct { DynamicData VrpId string `xml:"vrpId"` CpuReservationMhz int64 `xml:"cpuReservationMhz"` MemReservationMB int64 `xml:"memReservationMB"` CpuReservationUsedMhz int64 `xml:"cpuReservationUsedMhz"` MemReservationUsedMB int64 `xml:"memReservationUsedMB"` } func init() { t["VirtualResourcePoolUsage"] = reflect.TypeOf((*VirtualResourcePoolUsage)(nil)).Elem() } type VirtualSATAController struct { VirtualController } func init() { t["VirtualSATAController"] = reflect.TypeOf((*VirtualSATAController)(nil)).Elem() } type VirtualSATAControllerOption struct { VirtualControllerOption NumSATADisks IntOption `xml:"numSATADisks"` NumSATACdroms IntOption `xml:"numSATACdroms"` } func init() { t["VirtualSATAControllerOption"] = reflect.TypeOf((*VirtualSATAControllerOption)(nil)).Elem() } type VirtualSCSIController struct { VirtualController HotAddRemove *bool `xml:"hotAddRemove"` SharedBus VirtualSCSISharing `xml:"sharedBus"` ScsiCtlrUnitNumber int32 `xml:"scsiCtlrUnitNumber,omitempty"` } func init() { t["VirtualSCSIController"] = reflect.TypeOf((*VirtualSCSIController)(nil)).Elem() } type VirtualSCSIControllerOption struct { VirtualControllerOption NumSCSIDisks IntOption `xml:"numSCSIDisks"` NumSCSICdroms IntOption `xml:"numSCSICdroms"` NumSCSIPassthrough IntOption `xml:"numSCSIPassthrough"` Sharing []VirtualSCSISharing `xml:"sharing"` DefaultSharedIndex int32 `xml:"defaultSharedIndex"` HotAddRemove BoolOption `xml:"hotAddRemove"` ScsiCtlrUnitNumber int32 `xml:"scsiCtlrUnitNumber"` } func init() { t["VirtualSCSIControllerOption"] = reflect.TypeOf((*VirtualSCSIControllerOption)(nil)).Elem() } type VirtualSCSIPassthrough struct { VirtualDevice } func init() { t["VirtualSCSIPassthrough"] = reflect.TypeOf((*VirtualSCSIPassthrough)(nil)).Elem() } type VirtualSCSIPassthroughDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualSCSIPassthroughDeviceBackingInfo"] = reflect.TypeOf((*VirtualSCSIPassthroughDeviceBackingInfo)(nil)).Elem() } type VirtualSCSIPassthroughDeviceBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualSCSIPassthroughDeviceBackingOption"] = reflect.TypeOf((*VirtualSCSIPassthroughDeviceBackingOption)(nil)).Elem() } type VirtualSCSIPassthroughOption struct { VirtualDeviceOption } func init() { t["VirtualSCSIPassthroughOption"] = reflect.TypeOf((*VirtualSCSIPassthroughOption)(nil)).Elem() } type VirtualSIOController struct { VirtualController } func init() { t["VirtualSIOController"] = reflect.TypeOf((*VirtualSIOController)(nil)).Elem() } type VirtualSIOControllerOption struct { VirtualControllerOption NumFloppyDrives IntOption `xml:"numFloppyDrives"` NumSerialPorts IntOption `xml:"numSerialPorts"` NumParallelPorts IntOption `xml:"numParallelPorts"` } func init() { t["VirtualSIOControllerOption"] = reflect.TypeOf((*VirtualSIOControllerOption)(nil)).Elem() } type VirtualSerialPort struct { VirtualDevice YieldOnPoll bool `xml:"yieldOnPoll"` } func init() { t["VirtualSerialPort"] = reflect.TypeOf((*VirtualSerialPort)(nil)).Elem() } type VirtualSerialPortDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualSerialPortDeviceBackingInfo"] = reflect.TypeOf((*VirtualSerialPortDeviceBackingInfo)(nil)).Elem() } type VirtualSerialPortDeviceBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualSerialPortDeviceBackingOption"] = reflect.TypeOf((*VirtualSerialPortDeviceBackingOption)(nil)).Elem() } type VirtualSerialPortFileBackingInfo struct { VirtualDeviceFileBackingInfo } func init() { t["VirtualSerialPortFileBackingInfo"] = reflect.TypeOf((*VirtualSerialPortFileBackingInfo)(nil)).Elem() } type VirtualSerialPortFileBackingOption struct { VirtualDeviceFileBackingOption } func init() { t["VirtualSerialPortFileBackingOption"] = reflect.TypeOf((*VirtualSerialPortFileBackingOption)(nil)).Elem() } type VirtualSerialPortOption struct { VirtualDeviceOption YieldOnPoll BoolOption `xml:"yieldOnPoll"` } func init() { t["VirtualSerialPortOption"] = reflect.TypeOf((*VirtualSerialPortOption)(nil)).Elem() } type VirtualSerialPortPipeBackingInfo struct { VirtualDevicePipeBackingInfo Endpoint string `xml:"endpoint"` NoRxLoss *bool `xml:"noRxLoss"` } func init() { t["VirtualSerialPortPipeBackingInfo"] = reflect.TypeOf((*VirtualSerialPortPipeBackingInfo)(nil)).Elem() } type VirtualSerialPortPipeBackingOption struct { VirtualDevicePipeBackingOption Endpoint ChoiceOption `xml:"endpoint"` NoRxLoss BoolOption `xml:"noRxLoss"` } func init() { t["VirtualSerialPortPipeBackingOption"] = reflect.TypeOf((*VirtualSerialPortPipeBackingOption)(nil)).Elem() } type VirtualSerialPortThinPrintBackingInfo struct { VirtualDeviceBackingInfo } func init() { t["VirtualSerialPortThinPrintBackingInfo"] = reflect.TypeOf((*VirtualSerialPortThinPrintBackingInfo)(nil)).Elem() } type VirtualSerialPortThinPrintBackingOption struct { VirtualDeviceBackingOption } func init() { t["VirtualSerialPortThinPrintBackingOption"] = reflect.TypeOf((*VirtualSerialPortThinPrintBackingOption)(nil)).Elem() } type VirtualSerialPortURIBackingInfo struct { VirtualDeviceURIBackingInfo } func init() { t["VirtualSerialPortURIBackingInfo"] = reflect.TypeOf((*VirtualSerialPortURIBackingInfo)(nil)).Elem() } type VirtualSerialPortURIBackingOption struct { VirtualDeviceURIBackingOption } func init() { t["VirtualSerialPortURIBackingOption"] = reflect.TypeOf((*VirtualSerialPortURIBackingOption)(nil)).Elem() } type VirtualSoundBlaster16 struct { VirtualSoundCard } func init() { t["VirtualSoundBlaster16"] = reflect.TypeOf((*VirtualSoundBlaster16)(nil)).Elem() } type VirtualSoundBlaster16Option struct { VirtualSoundCardOption } func init() { t["VirtualSoundBlaster16Option"] = reflect.TypeOf((*VirtualSoundBlaster16Option)(nil)).Elem() } type VirtualSoundCard struct { VirtualDevice } func init() { t["VirtualSoundCard"] = reflect.TypeOf((*VirtualSoundCard)(nil)).Elem() } type VirtualSoundCardDeviceBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualSoundCardDeviceBackingInfo"] = reflect.TypeOf((*VirtualSoundCardDeviceBackingInfo)(nil)).Elem() } type VirtualSoundCardDeviceBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualSoundCardDeviceBackingOption"] = reflect.TypeOf((*VirtualSoundCardDeviceBackingOption)(nil)).Elem() } type VirtualSoundCardOption struct { VirtualDeviceOption } func init() { t["VirtualSoundCardOption"] = reflect.TypeOf((*VirtualSoundCardOption)(nil)).Elem() } type VirtualSriovEthernetCard struct { VirtualEthernetCard AllowGuestOSMtuChange *bool `xml:"allowGuestOSMtuChange"` SriovBacking *VirtualSriovEthernetCardSriovBackingInfo `xml:"sriovBacking,omitempty"` } func init() { t["VirtualSriovEthernetCard"] = reflect.TypeOf((*VirtualSriovEthernetCard)(nil)).Elem() } type VirtualSriovEthernetCardOption struct { VirtualEthernetCardOption } func init() { t["VirtualSriovEthernetCardOption"] = reflect.TypeOf((*VirtualSriovEthernetCardOption)(nil)).Elem() } type VirtualSriovEthernetCardSriovBackingInfo struct { VirtualDeviceBackingInfo PhysicalFunctionBacking *VirtualPCIPassthroughDeviceBackingInfo `xml:"physicalFunctionBacking,omitempty"` VirtualFunctionBacking *VirtualPCIPassthroughDeviceBackingInfo `xml:"virtualFunctionBacking,omitempty"` VirtualFunctionIndex int32 `xml:"virtualFunctionIndex,omitempty"` } func init() { t["VirtualSriovEthernetCardSriovBackingInfo"] = reflect.TypeOf((*VirtualSriovEthernetCardSriovBackingInfo)(nil)).Elem() } type VirtualSriovEthernetCardSriovBackingOption struct { VirtualDeviceBackingOption } func init() { t["VirtualSriovEthernetCardSriovBackingOption"] = reflect.TypeOf((*VirtualSriovEthernetCardSriovBackingOption)(nil)).Elem() } type VirtualSwitchProfile struct { ApplyProfile Key string `xml:"key"` Name string `xml:"name"` Link LinkProfile `xml:"link"` NumPorts NumPortsProfile `xml:"numPorts"` NetworkPolicy NetworkPolicyProfile `xml:"networkPolicy"` } func init() { t["VirtualSwitchProfile"] = reflect.TypeOf((*VirtualSwitchProfile)(nil)).Elem() } type VirtualSwitchSelectionProfile struct { ApplyProfile } func init() { t["VirtualSwitchSelectionProfile"] = reflect.TypeOf((*VirtualSwitchSelectionProfile)(nil)).Elem() } type VirtualUSB struct { VirtualDevice Connected bool `xml:"connected"` Vendor int32 `xml:"vendor,omitempty"` Product int32 `xml:"product,omitempty"` Family []string `xml:"family,omitempty"` Speed []string `xml:"speed,omitempty"` } func init() { t["VirtualUSB"] = reflect.TypeOf((*VirtualUSB)(nil)).Elem() } type VirtualUSBController struct { VirtualController AutoConnectDevices *bool `xml:"autoConnectDevices"` EhciEnabled *bool `xml:"ehciEnabled"` } func init() { t["VirtualUSBController"] = reflect.TypeOf((*VirtualUSBController)(nil)).Elem() } type VirtualUSBControllerOption struct { VirtualControllerOption AutoConnectDevices BoolOption `xml:"autoConnectDevices"` EhciSupported BoolOption `xml:"ehciSupported"` SupportedSpeeds []string `xml:"supportedSpeeds,omitempty"` } func init() { t["VirtualUSBControllerOption"] = reflect.TypeOf((*VirtualUSBControllerOption)(nil)).Elem() } type VirtualUSBControllerPciBusSlotInfo struct { VirtualDevicePciBusSlotInfo EhciPciSlotNumber int32 `xml:"ehciPciSlotNumber,omitempty"` } func init() { t["VirtualUSBControllerPciBusSlotInfo"] = reflect.TypeOf((*VirtualUSBControllerPciBusSlotInfo)(nil)).Elem() } type VirtualUSBOption struct { VirtualDeviceOption } func init() { t["VirtualUSBOption"] = reflect.TypeOf((*VirtualUSBOption)(nil)).Elem() } type VirtualUSBRemoteClientBackingInfo struct { VirtualDeviceRemoteDeviceBackingInfo Hostname string `xml:"hostname"` } func init() { t["VirtualUSBRemoteClientBackingInfo"] = reflect.TypeOf((*VirtualUSBRemoteClientBackingInfo)(nil)).Elem() } type VirtualUSBRemoteClientBackingOption struct { VirtualDeviceRemoteDeviceBackingOption } func init() { t["VirtualUSBRemoteClientBackingOption"] = reflect.TypeOf((*VirtualUSBRemoteClientBackingOption)(nil)).Elem() } type VirtualUSBRemoteHostBackingInfo struct { VirtualDeviceDeviceBackingInfo Hostname string `xml:"hostname"` } func init() { t["VirtualUSBRemoteHostBackingInfo"] = reflect.TypeOf((*VirtualUSBRemoteHostBackingInfo)(nil)).Elem() } type VirtualUSBRemoteHostBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualUSBRemoteHostBackingOption"] = reflect.TypeOf((*VirtualUSBRemoteHostBackingOption)(nil)).Elem() } type VirtualUSBUSBBackingInfo struct { VirtualDeviceDeviceBackingInfo } func init() { t["VirtualUSBUSBBackingInfo"] = reflect.TypeOf((*VirtualUSBUSBBackingInfo)(nil)).Elem() } type VirtualUSBUSBBackingOption struct { VirtualDeviceDeviceBackingOption } func init() { t["VirtualUSBUSBBackingOption"] = reflect.TypeOf((*VirtualUSBUSBBackingOption)(nil)).Elem() } type VirtualUSBXHCIController struct { VirtualController AutoConnectDevices *bool `xml:"autoConnectDevices"` } func init() { t["VirtualUSBXHCIController"] = reflect.TypeOf((*VirtualUSBXHCIController)(nil)).Elem() } type VirtualUSBXHCIControllerOption struct { VirtualControllerOption AutoConnectDevices BoolOption `xml:"autoConnectDevices"` SupportedSpeeds []string `xml:"supportedSpeeds"` } func init() { t["VirtualUSBXHCIControllerOption"] = reflect.TypeOf((*VirtualUSBXHCIControllerOption)(nil)).Elem() } type VirtualVMIROMOption struct { VirtualDeviceOption } func init() { t["VirtualVMIROMOption"] = reflect.TypeOf((*VirtualVMIROMOption)(nil)).Elem() } type VirtualVideoCardOption struct { VirtualDeviceOption VideoRamSizeInKB *LongOption `xml:"videoRamSizeInKB,omitempty"` NumDisplays *IntOption `xml:"numDisplays,omitempty"` UseAutoDetect *BoolOption `xml:"useAutoDetect,omitempty"` Support3D *BoolOption `xml:"support3D,omitempty"` Use3dRendererSupported *BoolOption `xml:"use3dRendererSupported,omitempty"` GraphicsMemorySizeInKB *LongOption `xml:"graphicsMemorySizeInKB,omitempty"` GraphicsMemorySizeSupported *BoolOption `xml:"graphicsMemorySizeSupported,omitempty"` } func init() { t["VirtualVideoCardOption"] = reflect.TypeOf((*VirtualVideoCardOption)(nil)).Elem() } type VirtualVmxnet struct { VirtualEthernetCard } func init() { t["VirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem() } type VirtualVmxnet2 struct { VirtualVmxnet } func init() { t["VirtualVmxnet2"] = reflect.TypeOf((*VirtualVmxnet2)(nil)).Elem() } type VirtualVmxnet2Option struct { VirtualVmxnetOption } func init() { t["VirtualVmxnet2Option"] = reflect.TypeOf((*VirtualVmxnet2Option)(nil)).Elem() } type VirtualVmxnet3 struct { VirtualVmxnet } func init() { t["VirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem() } type VirtualVmxnet3Option struct { VirtualVmxnetOption } func init() { t["VirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem() } type VirtualVmxnet3Vrdma struct { VirtualVmxnet3 } func init() { t["VirtualVmxnet3Vrdma"] = reflect.TypeOf((*VirtualVmxnet3Vrdma)(nil)).Elem() } type VirtualVmxnet3VrdmaOption struct { VirtualVmxnet3Option } func init() { t["VirtualVmxnet3VrdmaOption"] = reflect.TypeOf((*VirtualVmxnet3VrdmaOption)(nil)).Elem() } type VirtualVmxnetOption struct { VirtualEthernetCardOption } func init() { t["VirtualVmxnetOption"] = reflect.TypeOf((*VirtualVmxnetOption)(nil)).Elem() } type VlanProfile struct { ApplyProfile } func init() { t["VlanProfile"] = reflect.TypeOf((*VlanProfile)(nil)).Elem() } type VmAcquiredMksTicketEvent struct { VmEvent } func init() { t["VmAcquiredMksTicketEvent"] = reflect.TypeOf((*VmAcquiredMksTicketEvent)(nil)).Elem() } type VmAcquiredTicketEvent struct { VmEvent TicketType string `xml:"ticketType"` } func init() { t["VmAcquiredTicketEvent"] = reflect.TypeOf((*VmAcquiredTicketEvent)(nil)).Elem() } type VmAlreadyExistsInDatacenter struct { InvalidFolder Host ManagedObjectReference `xml:"host"` Hostname string `xml:"hostname"` Vm []ManagedObjectReference `xml:"vm"` } func init() { t["VmAlreadyExistsInDatacenter"] = reflect.TypeOf((*VmAlreadyExistsInDatacenter)(nil)).Elem() } type VmAlreadyExistsInDatacenterFault VmAlreadyExistsInDatacenter func init() { t["VmAlreadyExistsInDatacenterFault"] = reflect.TypeOf((*VmAlreadyExistsInDatacenterFault)(nil)).Elem() } type VmAutoRenameEvent struct { VmEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["VmAutoRenameEvent"] = reflect.TypeOf((*VmAutoRenameEvent)(nil)).Elem() } type VmBeingClonedEvent struct { VmCloneEvent DestFolder FolderEventArgument `xml:"destFolder"` DestName string `xml:"destName"` DestHost HostEventArgument `xml:"destHost"` } func init() { t["VmBeingClonedEvent"] = reflect.TypeOf((*VmBeingClonedEvent)(nil)).Elem() } type VmBeingClonedNoFolderEvent struct { VmCloneEvent DestName string `xml:"destName"` DestHost HostEventArgument `xml:"destHost"` } func init() { t["VmBeingClonedNoFolderEvent"] = reflect.TypeOf((*VmBeingClonedNoFolderEvent)(nil)).Elem() } type VmBeingCreatedEvent struct { VmEvent ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` } func init() { t["VmBeingCreatedEvent"] = reflect.TypeOf((*VmBeingCreatedEvent)(nil)).Elem() } type VmBeingDeployedEvent struct { VmEvent SrcTemplate VmEventArgument `xml:"srcTemplate"` } func init() { t["VmBeingDeployedEvent"] = reflect.TypeOf((*VmBeingDeployedEvent)(nil)).Elem() } type VmBeingHotMigratedEvent struct { VmEvent DestHost HostEventArgument `xml:"destHost"` DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` } func init() { t["VmBeingHotMigratedEvent"] = reflect.TypeOf((*VmBeingHotMigratedEvent)(nil)).Elem() } type VmBeingMigratedEvent struct { VmEvent DestHost HostEventArgument `xml:"destHost"` DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` } func init() { t["VmBeingMigratedEvent"] = reflect.TypeOf((*VmBeingMigratedEvent)(nil)).Elem() } type VmBeingRelocatedEvent struct { VmRelocateSpecEvent DestHost HostEventArgument `xml:"destHost"` DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` } func init() { t["VmBeingRelocatedEvent"] = reflect.TypeOf((*VmBeingRelocatedEvent)(nil)).Elem() } type VmCloneEvent struct { VmEvent } func init() { t["VmCloneEvent"] = reflect.TypeOf((*VmCloneEvent)(nil)).Elem() } type VmCloneFailedEvent struct { VmCloneEvent DestFolder FolderEventArgument `xml:"destFolder"` DestName string `xml:"destName"` DestHost HostEventArgument `xml:"destHost"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmCloneFailedEvent"] = reflect.TypeOf((*VmCloneFailedEvent)(nil)).Elem() } type VmClonedEvent struct { VmCloneEvent SourceVm VmEventArgument `xml:"sourceVm"` } func init() { t["VmClonedEvent"] = reflect.TypeOf((*VmClonedEvent)(nil)).Elem() } type VmConfigFault struct { VimFault } func init() { t["VmConfigFault"] = reflect.TypeOf((*VmConfigFault)(nil)).Elem() } type VmConfigFaultFault BaseVmConfigFault func init() { t["VmConfigFaultFault"] = reflect.TypeOf((*VmConfigFaultFault)(nil)).Elem() } type VmConfigFileEncryptionInfo struct { DynamicData KeyId *CryptoKeyId `xml:"keyId,omitempty"` } func init() { t["VmConfigFileEncryptionInfo"] = reflect.TypeOf((*VmConfigFileEncryptionInfo)(nil)).Elem() } type VmConfigFileInfo struct { FileInfo ConfigVersion int32 `xml:"configVersion,omitempty"` Encryption *VmConfigFileEncryptionInfo `xml:"encryption,omitempty"` } func init() { t["VmConfigFileInfo"] = reflect.TypeOf((*VmConfigFileInfo)(nil)).Elem() } type VmConfigFileQuery struct { FileQuery Filter *VmConfigFileQueryFilter `xml:"filter,omitempty"` Details *VmConfigFileQueryFlags `xml:"details,omitempty"` } func init() { t["VmConfigFileQuery"] = reflect.TypeOf((*VmConfigFileQuery)(nil)).Elem() } type VmConfigFileQueryFilter struct { DynamicData MatchConfigVersion []int32 `xml:"matchConfigVersion,omitempty"` Encrypted *bool `xml:"encrypted"` } func init() { t["VmConfigFileQueryFilter"] = reflect.TypeOf((*VmConfigFileQueryFilter)(nil)).Elem() } type VmConfigFileQueryFlags struct { DynamicData ConfigVersion bool `xml:"configVersion"` Encryption *bool `xml:"encryption"` } func init() { t["VmConfigFileQueryFlags"] = reflect.TypeOf((*VmConfigFileQueryFlags)(nil)).Elem() } type VmConfigIncompatibleForFaultTolerance struct { VmConfigFault Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["VmConfigIncompatibleForFaultTolerance"] = reflect.TypeOf((*VmConfigIncompatibleForFaultTolerance)(nil)).Elem() } type VmConfigIncompatibleForFaultToleranceFault VmConfigIncompatibleForFaultTolerance func init() { t["VmConfigIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*VmConfigIncompatibleForFaultToleranceFault)(nil)).Elem() } type VmConfigIncompatibleForRecordReplay struct { VmConfigFault Fault *LocalizedMethodFault `xml:"fault,omitempty"` } func init() { t["VmConfigIncompatibleForRecordReplay"] = reflect.TypeOf((*VmConfigIncompatibleForRecordReplay)(nil)).Elem() } type VmConfigIncompatibleForRecordReplayFault VmConfigIncompatibleForRecordReplay func init() { t["VmConfigIncompatibleForRecordReplayFault"] = reflect.TypeOf((*VmConfigIncompatibleForRecordReplayFault)(nil)).Elem() } type VmConfigInfo struct { DynamicData Product []VAppProductInfo `xml:"product,omitempty"` Property []VAppPropertyInfo `xml:"property,omitempty"` IpAssignment VAppIPAssignmentInfo `xml:"ipAssignment"` Eula []string `xml:"eula,omitempty"` OvfSection []VAppOvfSectionInfo `xml:"ovfSection,omitempty"` OvfEnvironmentTransport []string `xml:"ovfEnvironmentTransport,omitempty"` InstallBootRequired bool `xml:"installBootRequired"` InstallBootStopDelay int32 `xml:"installBootStopDelay"` } func init() { t["VmConfigInfo"] = reflect.TypeOf((*VmConfigInfo)(nil)).Elem() } type VmConfigMissingEvent struct { VmEvent } func init() { t["VmConfigMissingEvent"] = reflect.TypeOf((*VmConfigMissingEvent)(nil)).Elem() } type VmConfigSpec struct { DynamicData Product []VAppProductSpec `xml:"product,omitempty"` Property []VAppPropertySpec `xml:"property,omitempty"` IpAssignment *VAppIPAssignmentInfo `xml:"ipAssignment,omitempty"` Eula []string `xml:"eula,omitempty"` OvfSection []VAppOvfSectionSpec `xml:"ovfSection,omitempty"` OvfEnvironmentTransport []string `xml:"ovfEnvironmentTransport,omitempty"` InstallBootRequired *bool `xml:"installBootRequired"` InstallBootStopDelay int32 `xml:"installBootStopDelay,omitempty"` } func init() { t["VmConfigSpec"] = reflect.TypeOf((*VmConfigSpec)(nil)).Elem() } type VmConnectedEvent struct { VmEvent } func init() { t["VmConnectedEvent"] = reflect.TypeOf((*VmConnectedEvent)(nil)).Elem() } type VmCreatedEvent struct { VmEvent } func init() { t["VmCreatedEvent"] = reflect.TypeOf((*VmCreatedEvent)(nil)).Elem() } type VmDasBeingResetEvent struct { VmEvent Reason string `xml:"reason,omitempty"` } func init() { t["VmDasBeingResetEvent"] = reflect.TypeOf((*VmDasBeingResetEvent)(nil)).Elem() } type VmDasBeingResetWithScreenshotEvent struct { VmDasBeingResetEvent ScreenshotFilePath string `xml:"screenshotFilePath"` } func init() { t["VmDasBeingResetWithScreenshotEvent"] = reflect.TypeOf((*VmDasBeingResetWithScreenshotEvent)(nil)).Elem() } type VmDasResetFailedEvent struct { VmEvent } func init() { t["VmDasResetFailedEvent"] = reflect.TypeOf((*VmDasResetFailedEvent)(nil)).Elem() } type VmDasUpdateErrorEvent struct { VmEvent } func init() { t["VmDasUpdateErrorEvent"] = reflect.TypeOf((*VmDasUpdateErrorEvent)(nil)).Elem() } type VmDasUpdateOkEvent struct { VmEvent } func init() { t["VmDasUpdateOkEvent"] = reflect.TypeOf((*VmDasUpdateOkEvent)(nil)).Elem() } type VmDateRolledBackEvent struct { VmEvent } func init() { t["VmDateRolledBackEvent"] = reflect.TypeOf((*VmDateRolledBackEvent)(nil)).Elem() } type VmDeployFailedEvent struct { VmEvent DestDatastore BaseEntityEventArgument `xml:"destDatastore,typeattr"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmDeployFailedEvent"] = reflect.TypeOf((*VmDeployFailedEvent)(nil)).Elem() } type VmDeployedEvent struct { VmEvent SrcTemplate VmEventArgument `xml:"srcTemplate"` } func init() { t["VmDeployedEvent"] = reflect.TypeOf((*VmDeployedEvent)(nil)).Elem() } type VmDisconnectedEvent struct { VmEvent } func init() { t["VmDisconnectedEvent"] = reflect.TypeOf((*VmDisconnectedEvent)(nil)).Elem() } type VmDiscoveredEvent struct { VmEvent } func init() { t["VmDiscoveredEvent"] = reflect.TypeOf((*VmDiscoveredEvent)(nil)).Elem() } type VmDiskFailedEvent struct { VmEvent Disk string `xml:"disk"` Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmDiskFailedEvent"] = reflect.TypeOf((*VmDiskFailedEvent)(nil)).Elem() } type VmDiskFileEncryptionInfo struct { DynamicData KeyId *CryptoKeyId `xml:"keyId,omitempty"` } func init() { t["VmDiskFileEncryptionInfo"] = reflect.TypeOf((*VmDiskFileEncryptionInfo)(nil)).Elem() } type VmDiskFileInfo struct { FileInfo DiskType string `xml:"diskType,omitempty"` CapacityKb int64 `xml:"capacityKb,omitempty"` HardwareVersion int32 `xml:"hardwareVersion,omitempty"` ControllerType string `xml:"controllerType,omitempty"` DiskExtents []string `xml:"diskExtents,omitempty"` Thin *bool `xml:"thin"` Encryption *VmDiskFileEncryptionInfo `xml:"encryption,omitempty"` } func init() { t["VmDiskFileInfo"] = reflect.TypeOf((*VmDiskFileInfo)(nil)).Elem() } type VmDiskFileQuery struct { FileQuery Filter *VmDiskFileQueryFilter `xml:"filter,omitempty"` Details *VmDiskFileQueryFlags `xml:"details,omitempty"` } func init() { t["VmDiskFileQuery"] = reflect.TypeOf((*VmDiskFileQuery)(nil)).Elem() } type VmDiskFileQueryFilter struct { DynamicData DiskType []string `xml:"diskType,omitempty"` MatchHardwareVersion []int32 `xml:"matchHardwareVersion,omitempty"` ControllerType []string `xml:"controllerType,omitempty"` Thin *bool `xml:"thin"` Encrypted *bool `xml:"encrypted"` } func init() { t["VmDiskFileQueryFilter"] = reflect.TypeOf((*VmDiskFileQueryFilter)(nil)).Elem() } type VmDiskFileQueryFlags struct { DynamicData DiskType bool `xml:"diskType"` CapacityKb bool `xml:"capacityKb"` HardwareVersion bool `xml:"hardwareVersion"` ControllerType *bool `xml:"controllerType"` DiskExtents *bool `xml:"diskExtents"` Thin *bool `xml:"thin"` Encryption *bool `xml:"encryption"` } func init() { t["VmDiskFileQueryFlags"] = reflect.TypeOf((*VmDiskFileQueryFlags)(nil)).Elem() } type VmEmigratingEvent struct { VmEvent } func init() { t["VmEmigratingEvent"] = reflect.TypeOf((*VmEmigratingEvent)(nil)).Elem() } type VmEndRecordingEvent struct { VmEvent } func init() { t["VmEndRecordingEvent"] = reflect.TypeOf((*VmEndRecordingEvent)(nil)).Elem() } type VmEndReplayingEvent struct { VmEvent } func init() { t["VmEndReplayingEvent"] = reflect.TypeOf((*VmEndReplayingEvent)(nil)).Elem() } type VmEvent struct { Event Template bool `xml:"template"` } func init() { t["VmEvent"] = reflect.TypeOf((*VmEvent)(nil)).Elem() } type VmEventArgument struct { EntityEventArgument Vm ManagedObjectReference `xml:"vm"` } func init() { t["VmEventArgument"] = reflect.TypeOf((*VmEventArgument)(nil)).Elem() } type VmFailedMigrateEvent struct { VmEvent DestHost HostEventArgument `xml:"destHost"` Reason LocalizedMethodFault `xml:"reason"` DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` } func init() { t["VmFailedMigrateEvent"] = reflect.TypeOf((*VmFailedMigrateEvent)(nil)).Elem() } type VmFailedRelayoutEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedRelayoutEvent"] = reflect.TypeOf((*VmFailedRelayoutEvent)(nil)).Elem() } type VmFailedRelayoutOnVmfs2DatastoreEvent struct { VmEvent } func init() { t["VmFailedRelayoutOnVmfs2DatastoreEvent"] = reflect.TypeOf((*VmFailedRelayoutOnVmfs2DatastoreEvent)(nil)).Elem() } type VmFailedStartingSecondaryEvent struct { VmEvent Reason string `xml:"reason,omitempty"` } func init() { t["VmFailedStartingSecondaryEvent"] = reflect.TypeOf((*VmFailedStartingSecondaryEvent)(nil)).Elem() } type VmFailedToPowerOffEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToPowerOffEvent"] = reflect.TypeOf((*VmFailedToPowerOffEvent)(nil)).Elem() } type VmFailedToPowerOnEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToPowerOnEvent"] = reflect.TypeOf((*VmFailedToPowerOnEvent)(nil)).Elem() } type VmFailedToRebootGuestEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToRebootGuestEvent"] = reflect.TypeOf((*VmFailedToRebootGuestEvent)(nil)).Elem() } type VmFailedToResetEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToResetEvent"] = reflect.TypeOf((*VmFailedToResetEvent)(nil)).Elem() } type VmFailedToShutdownGuestEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToShutdownGuestEvent"] = reflect.TypeOf((*VmFailedToShutdownGuestEvent)(nil)).Elem() } type VmFailedToStandbyGuestEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToStandbyGuestEvent"] = reflect.TypeOf((*VmFailedToStandbyGuestEvent)(nil)).Elem() } type VmFailedToSuspendEvent struct { VmEvent Reason LocalizedMethodFault `xml:"reason"` } func init() { t["VmFailedToSuspendEvent"] = reflect.TypeOf((*VmFailedToSuspendEvent)(nil)).Elem() } type VmFailedUpdatingSecondaryConfig struct { VmEvent } func init() { t["VmFailedUpdatingSecondaryConfig"] = reflect.TypeOf((*VmFailedUpdatingSecondaryConfig)(nil)).Elem() } type VmFailoverFailed struct { VmEvent Reason *LocalizedMethodFault `xml:"reason,omitempty"` } func init() { t["VmFailoverFailed"] = reflect.TypeOf((*VmFailoverFailed)(nil)).Elem() } type VmFaultToleranceConfigIssue struct { VmFaultToleranceIssue Reason string `xml:"reason,omitempty"` EntityName string `xml:"entityName,omitempty"` Entity *ManagedObjectReference `xml:"entity,omitempty"` } func init() { t["VmFaultToleranceConfigIssue"] = reflect.TypeOf((*VmFaultToleranceConfigIssue)(nil)).Elem() } type VmFaultToleranceConfigIssueFault VmFaultToleranceConfigIssue func init() { t["VmFaultToleranceConfigIssueFault"] = reflect.TypeOf((*VmFaultToleranceConfigIssueFault)(nil)).Elem() } type VmFaultToleranceConfigIssueWrapper struct { VmFaultToleranceIssue EntityName string `xml:"entityName,omitempty"` Entity *ManagedObjectReference `xml:"entity,omitempty"` Error *LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["VmFaultToleranceConfigIssueWrapper"] = reflect.TypeOf((*VmFaultToleranceConfigIssueWrapper)(nil)).Elem() } type VmFaultToleranceConfigIssueWrapperFault VmFaultToleranceConfigIssueWrapper func init() { t["VmFaultToleranceConfigIssueWrapperFault"] = reflect.TypeOf((*VmFaultToleranceConfigIssueWrapperFault)(nil)).Elem() } type VmFaultToleranceInvalidFileBacking struct { VmFaultToleranceIssue BackingType string `xml:"backingType,omitempty"` BackingFilename string `xml:"backingFilename,omitempty"` } func init() { t["VmFaultToleranceInvalidFileBacking"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBacking)(nil)).Elem() } type VmFaultToleranceInvalidFileBackingFault VmFaultToleranceInvalidFileBacking func init() { t["VmFaultToleranceInvalidFileBackingFault"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBackingFault)(nil)).Elem() } type VmFaultToleranceIssue struct { VimFault } func init() { t["VmFaultToleranceIssue"] = reflect.TypeOf((*VmFaultToleranceIssue)(nil)).Elem() } type VmFaultToleranceIssueFault BaseVmFaultToleranceIssue func init() { t["VmFaultToleranceIssueFault"] = reflect.TypeOf((*VmFaultToleranceIssueFault)(nil)).Elem() } type VmFaultToleranceOpIssuesList struct { VmFaultToleranceIssue Errors []LocalizedMethodFault `xml:"errors,omitempty"` Warnings []LocalizedMethodFault `xml:"warnings,omitempty"` } func init() { t["VmFaultToleranceOpIssuesList"] = reflect.TypeOf((*VmFaultToleranceOpIssuesList)(nil)).Elem() } type VmFaultToleranceOpIssuesListFault VmFaultToleranceOpIssuesList func init() { t["VmFaultToleranceOpIssuesListFault"] = reflect.TypeOf((*VmFaultToleranceOpIssuesListFault)(nil)).Elem() } type VmFaultToleranceStateChangedEvent struct { VmEvent OldState VirtualMachineFaultToleranceState `xml:"oldState"` NewState VirtualMachineFaultToleranceState `xml:"newState"` } func init() { t["VmFaultToleranceStateChangedEvent"] = reflect.TypeOf((*VmFaultToleranceStateChangedEvent)(nil)).Elem() } type VmFaultToleranceTooManyFtVcpusOnHost struct { InsufficientResourcesFault HostName string `xml:"hostName,omitempty"` MaxNumFtVcpus int32 `xml:"maxNumFtVcpus"` } func init() { t["VmFaultToleranceTooManyFtVcpusOnHost"] = reflect.TypeOf((*VmFaultToleranceTooManyFtVcpusOnHost)(nil)).Elem() } type VmFaultToleranceTooManyFtVcpusOnHostFault VmFaultToleranceTooManyFtVcpusOnHost func init() { t["VmFaultToleranceTooManyFtVcpusOnHostFault"] = reflect.TypeOf((*VmFaultToleranceTooManyFtVcpusOnHostFault)(nil)).Elem() } type VmFaultToleranceTooManyVMsOnHost struct { InsufficientResourcesFault HostName string `xml:"hostName,omitempty"` MaxNumFtVms int32 `xml:"maxNumFtVms"` } func init() { t["VmFaultToleranceTooManyVMsOnHost"] = reflect.TypeOf((*VmFaultToleranceTooManyVMsOnHost)(nil)).Elem() } type VmFaultToleranceTooManyVMsOnHostFault VmFaultToleranceTooManyVMsOnHost func init() { t["VmFaultToleranceTooManyVMsOnHostFault"] = reflect.TypeOf((*VmFaultToleranceTooManyVMsOnHostFault)(nil)).Elem() } type VmFaultToleranceTurnedOffEvent struct { VmEvent } func init() { t["VmFaultToleranceTurnedOffEvent"] = reflect.TypeOf((*VmFaultToleranceTurnedOffEvent)(nil)).Elem() } type VmFaultToleranceVmTerminatedEvent struct { VmEvent Reason string `xml:"reason,omitempty"` } func init() { t["VmFaultToleranceVmTerminatedEvent"] = reflect.TypeOf((*VmFaultToleranceVmTerminatedEvent)(nil)).Elem() } type VmGuestOSCrashedEvent struct { VmEvent } func init() { t["VmGuestOSCrashedEvent"] = reflect.TypeOf((*VmGuestOSCrashedEvent)(nil)).Elem() } type VmGuestRebootEvent struct { VmEvent } func init() { t["VmGuestRebootEvent"] = reflect.TypeOf((*VmGuestRebootEvent)(nil)).Elem() } type VmGuestShutdownEvent struct { VmEvent } func init() { t["VmGuestShutdownEvent"] = reflect.TypeOf((*VmGuestShutdownEvent)(nil)).Elem() } type VmGuestStandbyEvent struct { VmEvent } func init() { t["VmGuestStandbyEvent"] = reflect.TypeOf((*VmGuestStandbyEvent)(nil)).Elem() } type VmHealthMonitoringStateChangedEvent struct { ClusterEvent State string `xml:"state"` PrevState string `xml:"prevState,omitempty"` } func init() { t["VmHealthMonitoringStateChangedEvent"] = reflect.TypeOf((*VmHealthMonitoringStateChangedEvent)(nil)).Elem() } type VmHostAffinityRuleViolation struct { VmConfigFault VmName string `xml:"vmName"` HostName string `xml:"hostName"` } func init() { t["VmHostAffinityRuleViolation"] = reflect.TypeOf((*VmHostAffinityRuleViolation)(nil)).Elem() } type VmHostAffinityRuleViolationFault VmHostAffinityRuleViolation func init() { t["VmHostAffinityRuleViolationFault"] = reflect.TypeOf((*VmHostAffinityRuleViolationFault)(nil)).Elem() } type VmInstanceUuidAssignedEvent struct { VmEvent InstanceUuid string `xml:"instanceUuid"` } func init() { t["VmInstanceUuidAssignedEvent"] = reflect.TypeOf((*VmInstanceUuidAssignedEvent)(nil)).Elem() } type VmInstanceUuidChangedEvent struct { VmEvent OldInstanceUuid string `xml:"oldInstanceUuid"` NewInstanceUuid string `xml:"newInstanceUuid"` } func init() { t["VmInstanceUuidChangedEvent"] = reflect.TypeOf((*VmInstanceUuidChangedEvent)(nil)).Elem() } type VmInstanceUuidConflictEvent struct { VmEvent ConflictedVm VmEventArgument `xml:"conflictedVm"` InstanceUuid string `xml:"instanceUuid"` } func init() { t["VmInstanceUuidConflictEvent"] = reflect.TypeOf((*VmInstanceUuidConflictEvent)(nil)).Elem() } type VmLimitLicense struct { NotEnoughLicenses Limit int32 `xml:"limit"` } func init() { t["VmLimitLicense"] = reflect.TypeOf((*VmLimitLicense)(nil)).Elem() } type VmLimitLicenseFault VmLimitLicense func init() { t["VmLimitLicenseFault"] = reflect.TypeOf((*VmLimitLicenseFault)(nil)).Elem() } type VmLogFileInfo struct { FileInfo } func init() { t["VmLogFileInfo"] = reflect.TypeOf((*VmLogFileInfo)(nil)).Elem() } type VmLogFileQuery struct { FileQuery } func init() { t["VmLogFileQuery"] = reflect.TypeOf((*VmLogFileQuery)(nil)).Elem() } type VmMacAssignedEvent struct { VmEvent Adapter string `xml:"adapter"` Mac string `xml:"mac"` } func init() { t["VmMacAssignedEvent"] = reflect.TypeOf((*VmMacAssignedEvent)(nil)).Elem() } type VmMacChangedEvent struct { VmEvent Adapter string `xml:"adapter"` OldMac string `xml:"oldMac"` NewMac string `xml:"newMac"` } func init() { t["VmMacChangedEvent"] = reflect.TypeOf((*VmMacChangedEvent)(nil)).Elem() } type VmMacConflictEvent struct { VmEvent ConflictedVm VmEventArgument `xml:"conflictedVm"` Mac string `xml:"mac"` } func init() { t["VmMacConflictEvent"] = reflect.TypeOf((*VmMacConflictEvent)(nil)).Elem() } type VmMaxFTRestartCountReached struct { VmEvent } func init() { t["VmMaxFTRestartCountReached"] = reflect.TypeOf((*VmMaxFTRestartCountReached)(nil)).Elem() } type VmMaxRestartCountReached struct { VmEvent } func init() { t["VmMaxRestartCountReached"] = reflect.TypeOf((*VmMaxRestartCountReached)(nil)).Elem() } type VmMessageErrorEvent struct { VmEvent Message string `xml:"message"` MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"` } func init() { t["VmMessageErrorEvent"] = reflect.TypeOf((*VmMessageErrorEvent)(nil)).Elem() } type VmMessageEvent struct { VmEvent Message string `xml:"message"` MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"` } func init() { t["VmMessageEvent"] = reflect.TypeOf((*VmMessageEvent)(nil)).Elem() } type VmMessageWarningEvent struct { VmEvent Message string `xml:"message"` MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"` } func init() { t["VmMessageWarningEvent"] = reflect.TypeOf((*VmMessageWarningEvent)(nil)).Elem() } type VmMetadataManagerFault struct { VimFault } func init() { t["VmMetadataManagerFault"] = reflect.TypeOf((*VmMetadataManagerFault)(nil)).Elem() } type VmMetadataManagerFaultFault VmMetadataManagerFault func init() { t["VmMetadataManagerFaultFault"] = reflect.TypeOf((*VmMetadataManagerFaultFault)(nil)).Elem() } type VmMigratedEvent struct { VmEvent SourceHost HostEventArgument `xml:"sourceHost"` SourceDatacenter *DatacenterEventArgument `xml:"sourceDatacenter,omitempty"` SourceDatastore *DatastoreEventArgument `xml:"sourceDatastore,omitempty"` } func init() { t["VmMigratedEvent"] = reflect.TypeOf((*VmMigratedEvent)(nil)).Elem() } type VmMonitorIncompatibleForFaultTolerance struct { VimFault } func init() { t["VmMonitorIncompatibleForFaultTolerance"] = reflect.TypeOf((*VmMonitorIncompatibleForFaultTolerance)(nil)).Elem() } type VmMonitorIncompatibleForFaultToleranceFault VmMonitorIncompatibleForFaultTolerance func init() { t["VmMonitorIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*VmMonitorIncompatibleForFaultToleranceFault)(nil)).Elem() } type VmNoCompatibleHostForSecondaryEvent struct { VmEvent } func init() { t["VmNoCompatibleHostForSecondaryEvent"] = reflect.TypeOf((*VmNoCompatibleHostForSecondaryEvent)(nil)).Elem() } type VmNoNetworkAccessEvent struct { VmEvent DestHost HostEventArgument `xml:"destHost"` } func init() { t["VmNoNetworkAccessEvent"] = reflect.TypeOf((*VmNoNetworkAccessEvent)(nil)).Elem() } type VmNvramFileInfo struct { FileInfo } func init() { t["VmNvramFileInfo"] = reflect.TypeOf((*VmNvramFileInfo)(nil)).Elem() } type VmNvramFileQuery struct { FileQuery } func init() { t["VmNvramFileQuery"] = reflect.TypeOf((*VmNvramFileQuery)(nil)).Elem() } type VmOrphanedEvent struct { VmEvent } func init() { t["VmOrphanedEvent"] = reflect.TypeOf((*VmOrphanedEvent)(nil)).Elem() } type VmPodConfigForPlacement struct { DynamicData StoragePod ManagedObjectReference `xml:"storagePod"` Disk []PodDiskLocator `xml:"disk,omitempty"` VmConfig *StorageDrsVmConfigInfo `xml:"vmConfig,omitempty"` InterVmRule []BaseClusterRuleInfo `xml:"interVmRule,omitempty,typeattr"` } func init() { t["VmPodConfigForPlacement"] = reflect.TypeOf((*VmPodConfigForPlacement)(nil)).Elem() } type VmPortGroupProfile struct { PortGroupProfile } func init() { t["VmPortGroupProfile"] = reflect.TypeOf((*VmPortGroupProfile)(nil)).Elem() } type VmPowerOffOnIsolationEvent struct { VmPoweredOffEvent IsolatedHost HostEventArgument `xml:"isolatedHost"` } func init() { t["VmPowerOffOnIsolationEvent"] = reflect.TypeOf((*VmPowerOffOnIsolationEvent)(nil)).Elem() } type VmPowerOnDisabled struct { InvalidState } func init() { t["VmPowerOnDisabled"] = reflect.TypeOf((*VmPowerOnDisabled)(nil)).Elem() } type VmPowerOnDisabledFault VmPowerOnDisabled func init() { t["VmPowerOnDisabledFault"] = reflect.TypeOf((*VmPowerOnDisabledFault)(nil)).Elem() } type VmPoweredOffEvent struct { VmEvent } func init() { t["VmPoweredOffEvent"] = reflect.TypeOf((*VmPoweredOffEvent)(nil)).Elem() } type VmPoweredOnEvent struct { VmEvent } func init() { t["VmPoweredOnEvent"] = reflect.TypeOf((*VmPoweredOnEvent)(nil)).Elem() } type VmPoweringOnWithCustomizedDVPortEvent struct { VmEvent Vnic []VnicPortArgument `xml:"vnic"` } func init() { t["VmPoweringOnWithCustomizedDVPortEvent"] = reflect.TypeOf((*VmPoweringOnWithCustomizedDVPortEvent)(nil)).Elem() } type VmPrimaryFailoverEvent struct { VmEvent Reason string `xml:"reason,omitempty"` } func init() { t["VmPrimaryFailoverEvent"] = reflect.TypeOf((*VmPrimaryFailoverEvent)(nil)).Elem() } type VmReconfiguredEvent struct { VmEvent ConfigSpec VirtualMachineConfigSpec `xml:"configSpec"` ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["VmReconfiguredEvent"] = reflect.TypeOf((*VmReconfiguredEvent)(nil)).Elem() } type VmRegisteredEvent struct { VmEvent } func init() { t["VmRegisteredEvent"] = reflect.TypeOf((*VmRegisteredEvent)(nil)).Elem() } type VmRelayoutSuccessfulEvent struct { VmEvent } func init() { t["VmRelayoutSuccessfulEvent"] = reflect.TypeOf((*VmRelayoutSuccessfulEvent)(nil)).Elem() } type VmRelayoutUpToDateEvent struct { VmEvent } func init() { t["VmRelayoutUpToDateEvent"] = reflect.TypeOf((*VmRelayoutUpToDateEvent)(nil)).Elem() } type VmReloadFromPathEvent struct { VmEvent ConfigPath string `xml:"configPath"` } func init() { t["VmReloadFromPathEvent"] = reflect.TypeOf((*VmReloadFromPathEvent)(nil)).Elem() } type VmReloadFromPathFailedEvent struct { VmEvent ConfigPath string `xml:"configPath"` } func init() { t["VmReloadFromPathFailedEvent"] = reflect.TypeOf((*VmReloadFromPathFailedEvent)(nil)).Elem() } type VmRelocateFailedEvent struct { VmRelocateSpecEvent DestHost HostEventArgument `xml:"destHost"` Reason LocalizedMethodFault `xml:"reason"` DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` } func init() { t["VmRelocateFailedEvent"] = reflect.TypeOf((*VmRelocateFailedEvent)(nil)).Elem() } type VmRelocateSpecEvent struct { VmEvent } func init() { t["VmRelocateSpecEvent"] = reflect.TypeOf((*VmRelocateSpecEvent)(nil)).Elem() } type VmRelocatedEvent struct { VmRelocateSpecEvent SourceHost HostEventArgument `xml:"sourceHost"` SourceDatacenter *DatacenterEventArgument `xml:"sourceDatacenter,omitempty"` SourceDatastore *DatastoreEventArgument `xml:"sourceDatastore,omitempty"` } func init() { t["VmRelocatedEvent"] = reflect.TypeOf((*VmRelocatedEvent)(nil)).Elem() } type VmRemoteConsoleConnectedEvent struct { VmEvent } func init() { t["VmRemoteConsoleConnectedEvent"] = reflect.TypeOf((*VmRemoteConsoleConnectedEvent)(nil)).Elem() } type VmRemoteConsoleDisconnectedEvent struct { VmEvent } func init() { t["VmRemoteConsoleDisconnectedEvent"] = reflect.TypeOf((*VmRemoteConsoleDisconnectedEvent)(nil)).Elem() } type VmRemovedEvent struct { VmEvent } func init() { t["VmRemovedEvent"] = reflect.TypeOf((*VmRemovedEvent)(nil)).Elem() } type VmRenamedEvent struct { VmEvent OldName string `xml:"oldName"` NewName string `xml:"newName"` } func init() { t["VmRenamedEvent"] = reflect.TypeOf((*VmRenamedEvent)(nil)).Elem() } type VmRequirementsExceedCurrentEVCModeEvent struct { VmEvent } func init() { t["VmRequirementsExceedCurrentEVCModeEvent"] = reflect.TypeOf((*VmRequirementsExceedCurrentEVCModeEvent)(nil)).Elem() } type VmResettingEvent struct { VmEvent } func init() { t["VmResettingEvent"] = reflect.TypeOf((*VmResettingEvent)(nil)).Elem() } type VmResourcePoolMovedEvent struct { VmEvent OldParent ResourcePoolEventArgument `xml:"oldParent"` NewParent ResourcePoolEventArgument `xml:"newParent"` } func init() { t["VmResourcePoolMovedEvent"] = reflect.TypeOf((*VmResourcePoolMovedEvent)(nil)).Elem() } type VmResourceReallocatedEvent struct { VmEvent ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` } func init() { t["VmResourceReallocatedEvent"] = reflect.TypeOf((*VmResourceReallocatedEvent)(nil)).Elem() } type VmRestartedOnAlternateHostEvent struct { VmPoweredOnEvent SourceHost HostEventArgument `xml:"sourceHost"` } func init() { t["VmRestartedOnAlternateHostEvent"] = reflect.TypeOf((*VmRestartedOnAlternateHostEvent)(nil)).Elem() } type VmResumingEvent struct { VmEvent } func init() { t["VmResumingEvent"] = reflect.TypeOf((*VmResumingEvent)(nil)).Elem() } type VmSecondaryAddedEvent struct { VmEvent } func init() { t["VmSecondaryAddedEvent"] = reflect.TypeOf((*VmSecondaryAddedEvent)(nil)).Elem() } type VmSecondaryDisabledBySystemEvent struct { VmEvent Reason *LocalizedMethodFault `xml:"reason,omitempty"` } func init() { t["VmSecondaryDisabledBySystemEvent"] = reflect.TypeOf((*VmSecondaryDisabledBySystemEvent)(nil)).Elem() } type VmSecondaryDisabledEvent struct { VmEvent } func init() { t["VmSecondaryDisabledEvent"] = reflect.TypeOf((*VmSecondaryDisabledEvent)(nil)).Elem() } type VmSecondaryEnabledEvent struct { VmEvent } func init() { t["VmSecondaryEnabledEvent"] = reflect.TypeOf((*VmSecondaryEnabledEvent)(nil)).Elem() } type VmSecondaryStartedEvent struct { VmEvent } func init() { t["VmSecondaryStartedEvent"] = reflect.TypeOf((*VmSecondaryStartedEvent)(nil)).Elem() } type VmShutdownOnIsolationEvent struct { VmPoweredOffEvent IsolatedHost HostEventArgument `xml:"isolatedHost"` ShutdownResult string `xml:"shutdownResult,omitempty"` } func init() { t["VmShutdownOnIsolationEvent"] = reflect.TypeOf((*VmShutdownOnIsolationEvent)(nil)).Elem() } type VmSmpFaultToleranceTooManyVMsOnHost struct { InsufficientResourcesFault HostName string `xml:"hostName,omitempty"` MaxNumSmpFtVms int32 `xml:"maxNumSmpFtVms"` } func init() { t["VmSmpFaultToleranceTooManyVMsOnHost"] = reflect.TypeOf((*VmSmpFaultToleranceTooManyVMsOnHost)(nil)).Elem() } type VmSmpFaultToleranceTooManyVMsOnHostFault VmSmpFaultToleranceTooManyVMsOnHost func init() { t["VmSmpFaultToleranceTooManyVMsOnHostFault"] = reflect.TypeOf((*VmSmpFaultToleranceTooManyVMsOnHostFault)(nil)).Elem() } type VmSnapshotFileInfo struct { FileInfo } func init() { t["VmSnapshotFileInfo"] = reflect.TypeOf((*VmSnapshotFileInfo)(nil)).Elem() } type VmSnapshotFileQuery struct { FileQuery } func init() { t["VmSnapshotFileQuery"] = reflect.TypeOf((*VmSnapshotFileQuery)(nil)).Elem() } type VmStartRecordingEvent struct { VmEvent } func init() { t["VmStartRecordingEvent"] = reflect.TypeOf((*VmStartRecordingEvent)(nil)).Elem() } type VmStartReplayingEvent struct { VmEvent } func init() { t["VmStartReplayingEvent"] = reflect.TypeOf((*VmStartReplayingEvent)(nil)).Elem() } type VmStartingEvent struct { VmEvent } func init() { t["VmStartingEvent"] = reflect.TypeOf((*VmStartingEvent)(nil)).Elem() } type VmStartingSecondaryEvent struct { VmEvent } func init() { t["VmStartingSecondaryEvent"] = reflect.TypeOf((*VmStartingSecondaryEvent)(nil)).Elem() } type VmStaticMacConflictEvent struct { VmEvent ConflictedVm VmEventArgument `xml:"conflictedVm"` Mac string `xml:"mac"` } func init() { t["VmStaticMacConflictEvent"] = reflect.TypeOf((*VmStaticMacConflictEvent)(nil)).Elem() } type VmStoppingEvent struct { VmEvent } func init() { t["VmStoppingEvent"] = reflect.TypeOf((*VmStoppingEvent)(nil)).Elem() } type VmSuspendedEvent struct { VmEvent } func init() { t["VmSuspendedEvent"] = reflect.TypeOf((*VmSuspendedEvent)(nil)).Elem() } type VmSuspendingEvent struct { VmEvent } func init() { t["VmSuspendingEvent"] = reflect.TypeOf((*VmSuspendingEvent)(nil)).Elem() } type VmTimedoutStartingSecondaryEvent struct { VmEvent Timeout int64 `xml:"timeout,omitempty"` } func init() { t["VmTimedoutStartingSecondaryEvent"] = reflect.TypeOf((*VmTimedoutStartingSecondaryEvent)(nil)).Elem() } type VmToolsUpgradeFault struct { VimFault } func init() { t["VmToolsUpgradeFault"] = reflect.TypeOf((*VmToolsUpgradeFault)(nil)).Elem() } type VmToolsUpgradeFaultFault BaseVmToolsUpgradeFault func init() { t["VmToolsUpgradeFaultFault"] = reflect.TypeOf((*VmToolsUpgradeFaultFault)(nil)).Elem() } type VmUnsupportedStartingEvent struct { VmStartingEvent GuestId string `xml:"guestId"` } func init() { t["VmUnsupportedStartingEvent"] = reflect.TypeOf((*VmUnsupportedStartingEvent)(nil)).Elem() } type VmUpgradeCompleteEvent struct { VmEvent Version string `xml:"version"` } func init() { t["VmUpgradeCompleteEvent"] = reflect.TypeOf((*VmUpgradeCompleteEvent)(nil)).Elem() } type VmUpgradeFailedEvent struct { VmEvent } func init() { t["VmUpgradeFailedEvent"] = reflect.TypeOf((*VmUpgradeFailedEvent)(nil)).Elem() } type VmUpgradingEvent struct { VmEvent Version string `xml:"version"` } func init() { t["VmUpgradingEvent"] = reflect.TypeOf((*VmUpgradingEvent)(nil)).Elem() } type VmUuidAssignedEvent struct { VmEvent Uuid string `xml:"uuid"` } func init() { t["VmUuidAssignedEvent"] = reflect.TypeOf((*VmUuidAssignedEvent)(nil)).Elem() } type VmUuidChangedEvent struct { VmEvent OldUuid string `xml:"oldUuid"` NewUuid string `xml:"newUuid"` } func init() { t["VmUuidChangedEvent"] = reflect.TypeOf((*VmUuidChangedEvent)(nil)).Elem() } type VmUuidConflictEvent struct { VmEvent ConflictedVm VmEventArgument `xml:"conflictedVm"` Uuid string `xml:"uuid"` } func init() { t["VmUuidConflictEvent"] = reflect.TypeOf((*VmUuidConflictEvent)(nil)).Elem() } type VmValidateMaxDevice struct { VimFault Device string `xml:"device"` Max int32 `xml:"max"` Count int32 `xml:"count"` } func init() { t["VmValidateMaxDevice"] = reflect.TypeOf((*VmValidateMaxDevice)(nil)).Elem() } type VmValidateMaxDeviceFault VmValidateMaxDevice func init() { t["VmValidateMaxDeviceFault"] = reflect.TypeOf((*VmValidateMaxDeviceFault)(nil)).Elem() } type VmVnicPoolReservationViolationClearEvent struct { DvsEvent VmVnicResourcePoolKey string `xml:"vmVnicResourcePoolKey"` VmVnicResourcePoolName string `xml:"vmVnicResourcePoolName,omitempty"` } func init() { t["VmVnicPoolReservationViolationClearEvent"] = reflect.TypeOf((*VmVnicPoolReservationViolationClearEvent)(nil)).Elem() } type VmVnicPoolReservationViolationRaiseEvent struct { DvsEvent VmVnicResourcePoolKey string `xml:"vmVnicResourcePoolKey"` VmVnicResourcePoolName string `xml:"vmVnicResourcePoolName,omitempty"` } func init() { t["VmVnicPoolReservationViolationRaiseEvent"] = reflect.TypeOf((*VmVnicPoolReservationViolationRaiseEvent)(nil)).Elem() } type VmWwnAssignedEvent struct { VmEvent NodeWwns []int64 `xml:"nodeWwns"` PortWwns []int64 `xml:"portWwns"` } func init() { t["VmWwnAssignedEvent"] = reflect.TypeOf((*VmWwnAssignedEvent)(nil)).Elem() } type VmWwnChangedEvent struct { VmEvent OldNodeWwns []int64 `xml:"oldNodeWwns,omitempty"` OldPortWwns []int64 `xml:"oldPortWwns,omitempty"` NewNodeWwns []int64 `xml:"newNodeWwns,omitempty"` NewPortWwns []int64 `xml:"newPortWwns,omitempty"` } func init() { t["VmWwnChangedEvent"] = reflect.TypeOf((*VmWwnChangedEvent)(nil)).Elem() } type VmWwnConflict struct { InvalidVmConfig Vm *ManagedObjectReference `xml:"vm,omitempty"` Host *ManagedObjectReference `xml:"host,omitempty"` Name string `xml:"name,omitempty"` Wwn int64 `xml:"wwn,omitempty"` } func init() { t["VmWwnConflict"] = reflect.TypeOf((*VmWwnConflict)(nil)).Elem() } type VmWwnConflictEvent struct { VmEvent ConflictedVms []VmEventArgument `xml:"conflictedVms,omitempty"` ConflictedHosts []HostEventArgument `xml:"conflictedHosts,omitempty"` Wwn int64 `xml:"wwn"` } func init() { t["VmWwnConflictEvent"] = reflect.TypeOf((*VmWwnConflictEvent)(nil)).Elem() } type VmWwnConflictFault VmWwnConflict func init() { t["VmWwnConflictFault"] = reflect.TypeOf((*VmWwnConflictFault)(nil)).Elem() } type VmfsAlreadyMounted struct { VmfsMountFault } func init() { t["VmfsAlreadyMounted"] = reflect.TypeOf((*VmfsAlreadyMounted)(nil)).Elem() } type VmfsAlreadyMountedFault VmfsAlreadyMounted func init() { t["VmfsAlreadyMountedFault"] = reflect.TypeOf((*VmfsAlreadyMountedFault)(nil)).Elem() } type VmfsAmbiguousMount struct { VmfsMountFault } func init() { t["VmfsAmbiguousMount"] = reflect.TypeOf((*VmfsAmbiguousMount)(nil)).Elem() } type VmfsAmbiguousMountFault VmfsAmbiguousMount func init() { t["VmfsAmbiguousMountFault"] = reflect.TypeOf((*VmfsAmbiguousMountFault)(nil)).Elem() } type VmfsConfigOption struct { DynamicData BlockSizeOption int32 `xml:"blockSizeOption"` UnmapGranularityOption []int32 `xml:"unmapGranularityOption,omitempty"` } func init() { t["VmfsConfigOption"] = reflect.TypeOf((*VmfsConfigOption)(nil)).Elem() } type VmfsDatastoreAllExtentOption struct { VmfsDatastoreSingleExtentOption } func init() { t["VmfsDatastoreAllExtentOption"] = reflect.TypeOf((*VmfsDatastoreAllExtentOption)(nil)).Elem() } type VmfsDatastoreBaseOption struct { DynamicData Layout HostDiskPartitionLayout `xml:"layout"` PartitionFormatChange *bool `xml:"partitionFormatChange"` } func init() { t["VmfsDatastoreBaseOption"] = reflect.TypeOf((*VmfsDatastoreBaseOption)(nil)).Elem() } type VmfsDatastoreCreateSpec struct { VmfsDatastoreSpec Partition HostDiskPartitionSpec `xml:"partition"` Vmfs HostVmfsSpec `xml:"vmfs"` Extent []HostScsiDiskPartition `xml:"extent,omitempty"` } func init() { t["VmfsDatastoreCreateSpec"] = reflect.TypeOf((*VmfsDatastoreCreateSpec)(nil)).Elem() } type VmfsDatastoreExpandSpec struct { VmfsDatastoreSpec Partition HostDiskPartitionSpec `xml:"partition"` Extent HostScsiDiskPartition `xml:"extent"` } func init() { t["VmfsDatastoreExpandSpec"] = reflect.TypeOf((*VmfsDatastoreExpandSpec)(nil)).Elem() } type VmfsDatastoreExtendSpec struct { VmfsDatastoreSpec Partition HostDiskPartitionSpec `xml:"partition"` Extent []HostScsiDiskPartition `xml:"extent"` } func init() { t["VmfsDatastoreExtendSpec"] = reflect.TypeOf((*VmfsDatastoreExtendSpec)(nil)).Elem() } type VmfsDatastoreInfo struct { DatastoreInfo MaxPhysicalRDMFileSize int64 `xml:"maxPhysicalRDMFileSize,omitempty"` MaxVirtualRDMFileSize int64 `xml:"maxVirtualRDMFileSize,omitempty"` Vmfs *HostVmfsVolume `xml:"vmfs,omitempty"` } func init() { t["VmfsDatastoreInfo"] = reflect.TypeOf((*VmfsDatastoreInfo)(nil)).Elem() } type VmfsDatastoreMultipleExtentOption struct { VmfsDatastoreBaseOption VmfsExtent []HostDiskPartitionBlockRange `xml:"vmfsExtent"` } func init() { t["VmfsDatastoreMultipleExtentOption"] = reflect.TypeOf((*VmfsDatastoreMultipleExtentOption)(nil)).Elem() } type VmfsDatastoreOption struct { DynamicData Info BaseVmfsDatastoreBaseOption `xml:"info,typeattr"` Spec BaseVmfsDatastoreSpec `xml:"spec,typeattr"` } func init() { t["VmfsDatastoreOption"] = reflect.TypeOf((*VmfsDatastoreOption)(nil)).Elem() } type VmfsDatastoreSingleExtentOption struct { VmfsDatastoreBaseOption VmfsExtent HostDiskPartitionBlockRange `xml:"vmfsExtent"` } func init() { t["VmfsDatastoreSingleExtentOption"] = reflect.TypeOf((*VmfsDatastoreSingleExtentOption)(nil)).Elem() } type VmfsDatastoreSpec struct { DynamicData DiskUuid string `xml:"diskUuid"` } func init() { t["VmfsDatastoreSpec"] = reflect.TypeOf((*VmfsDatastoreSpec)(nil)).Elem() } type VmfsMountFault struct { HostConfigFault Uuid string `xml:"uuid"` } func init() { t["VmfsMountFault"] = reflect.TypeOf((*VmfsMountFault)(nil)).Elem() } type VmfsMountFaultFault BaseVmfsMountFault func init() { t["VmfsMountFaultFault"] = reflect.TypeOf((*VmfsMountFaultFault)(nil)).Elem() } type VmotionInterfaceNotEnabled struct { HostPowerOpFailed } func init() { t["VmotionInterfaceNotEnabled"] = reflect.TypeOf((*VmotionInterfaceNotEnabled)(nil)).Elem() } type VmotionInterfaceNotEnabledFault VmotionInterfaceNotEnabled func init() { t["VmotionInterfaceNotEnabledFault"] = reflect.TypeOf((*VmotionInterfaceNotEnabledFault)(nil)).Elem() } type VmwareDistributedVirtualSwitchPvlanSpec struct { VmwareDistributedVirtualSwitchVlanSpec PvlanId int32 `xml:"pvlanId"` } func init() { t["VmwareDistributedVirtualSwitchPvlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchPvlanSpec)(nil)).Elem() } type VmwareDistributedVirtualSwitchTrunkVlanSpec struct { VmwareDistributedVirtualSwitchVlanSpec VlanId []NumericRange `xml:"vlanId"` } func init() { t["VmwareDistributedVirtualSwitchTrunkVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchTrunkVlanSpec)(nil)).Elem() } type VmwareDistributedVirtualSwitchVlanIdSpec struct { VmwareDistributedVirtualSwitchVlanSpec VlanId int32 `xml:"vlanId"` } func init() { t["VmwareDistributedVirtualSwitchVlanIdSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanIdSpec)(nil)).Elem() } type VmwareDistributedVirtualSwitchVlanSpec struct { InheritablePolicy } func init() { t["VmwareDistributedVirtualSwitchVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanSpec)(nil)).Elem() } type VmwareUplinkPortTeamingPolicy struct { InheritablePolicy Policy *StringPolicy `xml:"policy,omitempty"` ReversePolicy *BoolPolicy `xml:"reversePolicy,omitempty"` NotifySwitches *BoolPolicy `xml:"notifySwitches,omitempty"` RollingOrder *BoolPolicy `xml:"rollingOrder,omitempty"` FailureCriteria *DVSFailureCriteria `xml:"failureCriteria,omitempty"` UplinkPortOrder *VMwareUplinkPortOrderPolicy `xml:"uplinkPortOrder,omitempty"` } func init() { t["VmwareUplinkPortTeamingPolicy"] = reflect.TypeOf((*VmwareUplinkPortTeamingPolicy)(nil)).Elem() } type VnicPortArgument struct { DynamicData Vnic string `xml:"vnic"` Port DistributedVirtualSwitchPortConnection `xml:"port"` } func init() { t["VnicPortArgument"] = reflect.TypeOf((*VnicPortArgument)(nil)).Elem() } type VolumeEditorError struct { CustomizationFault } func init() { t["VolumeEditorError"] = reflect.TypeOf((*VolumeEditorError)(nil)).Elem() } type VolumeEditorErrorFault VolumeEditorError func init() { t["VolumeEditorErrorFault"] = reflect.TypeOf((*VolumeEditorErrorFault)(nil)).Elem() } type VramLimitLicense struct { NotEnoughLicenses Limit int32 `xml:"limit"` } func init() { t["VramLimitLicense"] = reflect.TypeOf((*VramLimitLicense)(nil)).Elem() } type VramLimitLicenseFault VramLimitLicense func init() { t["VramLimitLicenseFault"] = reflect.TypeOf((*VramLimitLicenseFault)(nil)).Elem() } type VrpResourceAllocationInfo struct { ResourceAllocationInfo ReservationLimit int64 `xml:"reservationLimit,omitempty"` } func init() { t["VrpResourceAllocationInfo"] = reflect.TypeOf((*VrpResourceAllocationInfo)(nil)).Elem() } type VsanClusterConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` DefaultConfig *VsanClusterConfigInfoHostDefaultInfo `xml:"defaultConfig,omitempty"` } func init() { t["VsanClusterConfigInfo"] = reflect.TypeOf((*VsanClusterConfigInfo)(nil)).Elem() } type VsanClusterConfigInfoHostDefaultInfo struct { DynamicData Uuid string `xml:"uuid,omitempty"` AutoClaimStorage *bool `xml:"autoClaimStorage"` ChecksumEnabled *bool `xml:"checksumEnabled"` } func init() { t["VsanClusterConfigInfoHostDefaultInfo"] = reflect.TypeOf((*VsanClusterConfigInfoHostDefaultInfo)(nil)).Elem() } type VsanClusterUuidMismatch struct { CannotMoveVsanEnabledHost HostClusterUuid string `xml:"hostClusterUuid"` DestinationClusterUuid string `xml:"destinationClusterUuid"` } func init() { t["VsanClusterUuidMismatch"] = reflect.TypeOf((*VsanClusterUuidMismatch)(nil)).Elem() } type VsanClusterUuidMismatchFault VsanClusterUuidMismatch func init() { t["VsanClusterUuidMismatchFault"] = reflect.TypeOf((*VsanClusterUuidMismatchFault)(nil)).Elem() } type VsanDiskFault struct { VsanFault Device string `xml:"device,omitempty"` } func init() { t["VsanDiskFault"] = reflect.TypeOf((*VsanDiskFault)(nil)).Elem() } type VsanDiskFaultFault BaseVsanDiskFault func init() { t["VsanDiskFaultFault"] = reflect.TypeOf((*VsanDiskFaultFault)(nil)).Elem() } type VsanFault struct { VimFault } func init() { t["VsanFault"] = reflect.TypeOf((*VsanFault)(nil)).Elem() } type VsanFaultFault BaseVsanFault func init() { t["VsanFaultFault"] = reflect.TypeOf((*VsanFaultFault)(nil)).Elem() } type VsanHostClusterStatus struct { DynamicData Uuid string `xml:"uuid,omitempty"` NodeUuid string `xml:"nodeUuid,omitempty"` Health string `xml:"health"` NodeState VsanHostClusterStatusState `xml:"nodeState"` MemberUuid []string `xml:"memberUuid,omitempty"` } func init() { t["VsanHostClusterStatus"] = reflect.TypeOf((*VsanHostClusterStatus)(nil)).Elem() } type VsanHostClusterStatusState struct { DynamicData State string `xml:"state"` Completion *VsanHostClusterStatusStateCompletionEstimate `xml:"completion,omitempty"` } func init() { t["VsanHostClusterStatusState"] = reflect.TypeOf((*VsanHostClusterStatusState)(nil)).Elem() } type VsanHostClusterStatusStateCompletionEstimate struct { DynamicData CompleteTime *time.Time `xml:"completeTime"` PercentComplete int32 `xml:"percentComplete,omitempty"` } func init() { t["VsanHostClusterStatusStateCompletionEstimate"] = reflect.TypeOf((*VsanHostClusterStatusStateCompletionEstimate)(nil)).Elem() } type VsanHostConfigInfo struct { DynamicData Enabled *bool `xml:"enabled"` HostSystem *ManagedObjectReference `xml:"hostSystem,omitempty"` ClusterInfo *VsanHostConfigInfoClusterInfo `xml:"clusterInfo,omitempty"` StorageInfo *VsanHostConfigInfoStorageInfo `xml:"storageInfo,omitempty"` NetworkInfo *VsanHostConfigInfoNetworkInfo `xml:"networkInfo,omitempty"` FaultDomainInfo *VsanHostFaultDomainInfo `xml:"faultDomainInfo,omitempty"` } func init() { t["VsanHostConfigInfo"] = reflect.TypeOf((*VsanHostConfigInfo)(nil)).Elem() } type VsanHostConfigInfoClusterInfo struct { DynamicData Uuid string `xml:"uuid,omitempty"` NodeUuid string `xml:"nodeUuid,omitempty"` } func init() { t["VsanHostConfigInfoClusterInfo"] = reflect.TypeOf((*VsanHostConfigInfoClusterInfo)(nil)).Elem() } type VsanHostConfigInfoNetworkInfo struct { DynamicData Port []VsanHostConfigInfoNetworkInfoPortConfig `xml:"port,omitempty"` } func init() { t["VsanHostConfigInfoNetworkInfo"] = reflect.TypeOf((*VsanHostConfigInfoNetworkInfo)(nil)).Elem() } type VsanHostConfigInfoNetworkInfoPortConfig struct { DynamicData IpConfig *VsanHostIpConfig `xml:"ipConfig,omitempty"` Device string `xml:"device"` } func init() { t["VsanHostConfigInfoNetworkInfoPortConfig"] = reflect.TypeOf((*VsanHostConfigInfoNetworkInfoPortConfig)(nil)).Elem() } type VsanHostConfigInfoStorageInfo struct { DynamicData AutoClaimStorage *bool `xml:"autoClaimStorage"` DiskMapping []VsanHostDiskMapping `xml:"diskMapping,omitempty"` DiskMapInfo []VsanHostDiskMapInfo `xml:"diskMapInfo,omitempty"` ChecksumEnabled *bool `xml:"checksumEnabled"` } func init() { t["VsanHostConfigInfoStorageInfo"] = reflect.TypeOf((*VsanHostConfigInfoStorageInfo)(nil)).Elem() } type VsanHostDecommissionMode struct { DynamicData ObjectAction string `xml:"objectAction"` } func init() { t["VsanHostDecommissionMode"] = reflect.TypeOf((*VsanHostDecommissionMode)(nil)).Elem() } type VsanHostDiskMapInfo struct { DynamicData Mapping VsanHostDiskMapping `xml:"mapping"` Mounted bool `xml:"mounted"` } func init() { t["VsanHostDiskMapInfo"] = reflect.TypeOf((*VsanHostDiskMapInfo)(nil)).Elem() } type VsanHostDiskMapResult struct { DynamicData Mapping VsanHostDiskMapping `xml:"mapping"` DiskResult []VsanHostDiskResult `xml:"diskResult,omitempty"` Error *LocalizedMethodFault `xml:"error,omitempty"` } func init() { t["VsanHostDiskMapResult"] = reflect.TypeOf((*VsanHostDiskMapResult)(nil)).Elem() } type VsanHostDiskMapping struct { DynamicData Ssd HostScsiDisk `xml:"ssd"` NonSsd []HostScsiDisk `xml:"nonSsd"` } func init() { t["VsanHostDiskMapping"] = reflect.TypeOf((*VsanHostDiskMapping)(nil)).Elem() } type VsanHostDiskResult struct { DynamicData Disk HostScsiDisk `xml:"disk"` State string `xml:"state"` VsanUuid string `xml:"vsanUuid,omitempty"` Error *LocalizedMethodFault `xml:"error,omitempty"` Degraded *bool `xml:"degraded"` } func init() { t["VsanHostDiskResult"] = reflect.TypeOf((*VsanHostDiskResult)(nil)).Elem() } type VsanHostFaultDomainInfo struct { DynamicData Name string `xml:"name"` } func init() { t["VsanHostFaultDomainInfo"] = reflect.TypeOf((*VsanHostFaultDomainInfo)(nil)).Elem() } type VsanHostIpConfig struct { DynamicData UpstreamIpAddress string `xml:"upstreamIpAddress"` DownstreamIpAddress string `xml:"downstreamIpAddress"` } func init() { t["VsanHostIpConfig"] = reflect.TypeOf((*VsanHostIpConfig)(nil)).Elem() } type VsanHostMembershipInfo struct { DynamicData NodeUuid string `xml:"nodeUuid"` Hostname string `xml:"hostname"` } func init() { t["VsanHostMembershipInfo"] = reflect.TypeOf((*VsanHostMembershipInfo)(nil)).Elem() } type VsanHostRuntimeInfo struct { DynamicData MembershipList []VsanHostMembershipInfo `xml:"membershipList,omitempty"` DiskIssues []VsanHostRuntimeInfoDiskIssue `xml:"diskIssues,omitempty"` AccessGenNo int32 `xml:"accessGenNo,omitempty"` } func init() { t["VsanHostRuntimeInfo"] = reflect.TypeOf((*VsanHostRuntimeInfo)(nil)).Elem() } type VsanHostRuntimeInfoDiskIssue struct { DynamicData DiskId string `xml:"diskId"` Issue string `xml:"issue"` } func init() { t["VsanHostRuntimeInfoDiskIssue"] = reflect.TypeOf((*VsanHostRuntimeInfoDiskIssue)(nil)).Elem() } type VsanHostVsanDiskInfo struct { DynamicData VsanUuid string `xml:"vsanUuid"` FormatVersion int32 `xml:"formatVersion"` } func init() { t["VsanHostVsanDiskInfo"] = reflect.TypeOf((*VsanHostVsanDiskInfo)(nil)).Elem() } type VsanIncompatibleDiskMapping struct { VsanDiskFault } func init() { t["VsanIncompatibleDiskMapping"] = reflect.TypeOf((*VsanIncompatibleDiskMapping)(nil)).Elem() } type VsanIncompatibleDiskMappingFault VsanIncompatibleDiskMapping func init() { t["VsanIncompatibleDiskMappingFault"] = reflect.TypeOf((*VsanIncompatibleDiskMappingFault)(nil)).Elem() } type VsanNewPolicyBatch struct { DynamicData Size []int64 `xml:"size,omitempty"` Policy string `xml:"policy,omitempty"` } func init() { t["VsanNewPolicyBatch"] = reflect.TypeOf((*VsanNewPolicyBatch)(nil)).Elem() } type VsanPolicyChangeBatch struct { DynamicData Uuid []string `xml:"uuid,omitempty"` Policy string `xml:"policy,omitempty"` } func init() { t["VsanPolicyChangeBatch"] = reflect.TypeOf((*VsanPolicyChangeBatch)(nil)).Elem() } type VsanPolicyCost struct { DynamicData ChangeDataSize int64 `xml:"changeDataSize,omitempty"` CurrentDataSize int64 `xml:"currentDataSize,omitempty"` TempDataSize int64 `xml:"tempDataSize,omitempty"` CopyDataSize int64 `xml:"copyDataSize,omitempty"` ChangeFlashReadCacheSize int64 `xml:"changeFlashReadCacheSize,omitempty"` CurrentFlashReadCacheSize int64 `xml:"currentFlashReadCacheSize,omitempty"` CurrentDiskSpaceToAddressSpaceRatio float32 `xml:"currentDiskSpaceToAddressSpaceRatio,omitempty"` DiskSpaceToAddressSpaceRatio float32 `xml:"diskSpaceToAddressSpaceRatio,omitempty"` } func init() { t["VsanPolicyCost"] = reflect.TypeOf((*VsanPolicyCost)(nil)).Elem() } type VsanPolicySatisfiability struct { DynamicData Uuid string `xml:"uuid,omitempty"` IsSatisfiable bool `xml:"isSatisfiable"` Reason *LocalizableMessage `xml:"reason,omitempty"` Cost *VsanPolicyCost `xml:"cost,omitempty"` } func init() { t["VsanPolicySatisfiability"] = reflect.TypeOf((*VsanPolicySatisfiability)(nil)).Elem() } type VsanUpgradeSystemAPIBrokenIssue struct { VsanUpgradeSystemPreflightCheckIssue Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["VsanUpgradeSystemAPIBrokenIssue"] = reflect.TypeOf((*VsanUpgradeSystemAPIBrokenIssue)(nil)).Elem() } type VsanUpgradeSystemAutoClaimEnabledOnHostsIssue struct { VsanUpgradeSystemPreflightCheckIssue Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["VsanUpgradeSystemAutoClaimEnabledOnHostsIssue"] = reflect.TypeOf((*VsanUpgradeSystemAutoClaimEnabledOnHostsIssue)(nil)).Elem() } type VsanUpgradeSystemHostsDisconnectedIssue struct { VsanUpgradeSystemPreflightCheckIssue Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["VsanUpgradeSystemHostsDisconnectedIssue"] = reflect.TypeOf((*VsanUpgradeSystemHostsDisconnectedIssue)(nil)).Elem() } type VsanUpgradeSystemMissingHostsInClusterIssue struct { VsanUpgradeSystemPreflightCheckIssue Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["VsanUpgradeSystemMissingHostsInClusterIssue"] = reflect.TypeOf((*VsanUpgradeSystemMissingHostsInClusterIssue)(nil)).Elem() } type VsanUpgradeSystemNetworkPartitionInfo struct { DynamicData Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["VsanUpgradeSystemNetworkPartitionInfo"] = reflect.TypeOf((*VsanUpgradeSystemNetworkPartitionInfo)(nil)).Elem() } type VsanUpgradeSystemNetworkPartitionIssue struct { VsanUpgradeSystemPreflightCheckIssue Partitions []VsanUpgradeSystemNetworkPartitionInfo `xml:"partitions"` } func init() { t["VsanUpgradeSystemNetworkPartitionIssue"] = reflect.TypeOf((*VsanUpgradeSystemNetworkPartitionIssue)(nil)).Elem() } type VsanUpgradeSystemNotEnoughFreeCapacityIssue struct { VsanUpgradeSystemPreflightCheckIssue ReducedRedundancyUpgradePossible bool `xml:"reducedRedundancyUpgradePossible"` } func init() { t["VsanUpgradeSystemNotEnoughFreeCapacityIssue"] = reflect.TypeOf((*VsanUpgradeSystemNotEnoughFreeCapacityIssue)(nil)).Elem() } type VsanUpgradeSystemPreflightCheckIssue struct { DynamicData Msg string `xml:"msg"` } func init() { t["VsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckIssue)(nil)).Elem() } type VsanUpgradeSystemPreflightCheckResult struct { DynamicData Issues []BaseVsanUpgradeSystemPreflightCheckIssue `xml:"issues,omitempty,typeattr"` DiskMappingToRestore *VsanHostDiskMapping `xml:"diskMappingToRestore,omitempty"` } func init() { t["VsanUpgradeSystemPreflightCheckResult"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckResult)(nil)).Elem() } type VsanUpgradeSystemRogueHostsInClusterIssue struct { VsanUpgradeSystemPreflightCheckIssue Uuids []string `xml:"uuids"` } func init() { t["VsanUpgradeSystemRogueHostsInClusterIssue"] = reflect.TypeOf((*VsanUpgradeSystemRogueHostsInClusterIssue)(nil)).Elem() } type VsanUpgradeSystemUpgradeHistoryDiskGroupOp struct { VsanUpgradeSystemUpgradeHistoryItem Operation string `xml:"operation"` DiskMapping VsanHostDiskMapping `xml:"diskMapping"` } func init() { t["VsanUpgradeSystemUpgradeHistoryDiskGroupOp"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryDiskGroupOp)(nil)).Elem() } type VsanUpgradeSystemUpgradeHistoryItem struct { DynamicData Timestamp time.Time `xml:"timestamp"` Host *ManagedObjectReference `xml:"host,omitempty"` Message string `xml:"message"` Task *ManagedObjectReference `xml:"task,omitempty"` } func init() { t["VsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem() } type VsanUpgradeSystemUpgradeHistoryPreflightFail struct { VsanUpgradeSystemUpgradeHistoryItem PreflightResult VsanUpgradeSystemPreflightCheckResult `xml:"preflightResult"` } func init() { t["VsanUpgradeSystemUpgradeHistoryPreflightFail"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryPreflightFail)(nil)).Elem() } type VsanUpgradeSystemUpgradeStatus struct { DynamicData InProgress bool `xml:"inProgress"` History []BaseVsanUpgradeSystemUpgradeHistoryItem `xml:"history,omitempty,typeattr"` Aborted *bool `xml:"aborted"` Completed *bool `xml:"completed"` Progress int32 `xml:"progress,omitempty"` } func init() { t["VsanUpgradeSystemUpgradeStatus"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeStatus)(nil)).Elem() } type VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue struct { VsanUpgradeSystemPreflightCheckIssue Uuids []string `xml:"uuids"` } func init() { t["VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue"] = reflect.TypeOf((*VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue)(nil)).Elem() } type VsanUpgradeSystemWrongEsxVersionIssue struct { VsanUpgradeSystemPreflightCheckIssue Hosts []ManagedObjectReference `xml:"hosts"` } func init() { t["VsanUpgradeSystemWrongEsxVersionIssue"] = reflect.TypeOf((*VsanUpgradeSystemWrongEsxVersionIssue)(nil)).Elem() } type VslmCloneSpec struct { VslmMigrateSpec Name string `xml:"name"` } func init() { t["VslmCloneSpec"] = reflect.TypeOf((*VslmCloneSpec)(nil)).Elem() } type VslmCreateSpec struct { DynamicData Name string `xml:"name"` BackingSpec BaseVslmCreateSpecBackingSpec `xml:"backingSpec,typeattr"` CapacityInMB int64 `xml:"capacityInMB"` } func init() { t["VslmCreateSpec"] = reflect.TypeOf((*VslmCreateSpec)(nil)).Elem() } type VslmCreateSpecBackingSpec struct { DynamicData Datastore ManagedObjectReference `xml:"datastore"` } func init() { t["VslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem() } type VslmCreateSpecDiskFileBackingSpec struct { VslmCreateSpecBackingSpec ProvisioningType string `xml:"provisioningType,omitempty"` } func init() { t["VslmCreateSpecDiskFileBackingSpec"] = reflect.TypeOf((*VslmCreateSpecDiskFileBackingSpec)(nil)).Elem() } type VslmCreateSpecRawDiskMappingBackingSpec struct { VslmCreateSpecBackingSpec LunUuid string `xml:"lunUuid"` CompatibilityMode string `xml:"compatibilityMode"` } func init() { t["VslmCreateSpecRawDiskMappingBackingSpec"] = reflect.TypeOf((*VslmCreateSpecRawDiskMappingBackingSpec)(nil)).Elem() } type VslmMigrateSpec struct { DynamicData BackingSpec BaseVslmCreateSpecBackingSpec `xml:"backingSpec,typeattr"` Consolidate *bool `xml:"consolidate"` } func init() { t["VslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem() } type VslmRelocateSpec struct { VslmMigrateSpec } func init() { t["VslmRelocateSpec"] = reflect.TypeOf((*VslmRelocateSpec)(nil)).Elem() } type VslmTagEntry struct { DynamicData TagName string `xml:"tagName"` ParentCategoryName string `xml:"parentCategoryName"` } func init() { t["VslmTagEntry"] = reflect.TypeOf((*VslmTagEntry)(nil)).Elem() } type VspanDestPortConflict struct { DvsFault VspanSessionKey1 string `xml:"vspanSessionKey1"` VspanSessionKey2 string `xml:"vspanSessionKey2"` PortKey string `xml:"portKey"` } func init() { t["VspanDestPortConflict"] = reflect.TypeOf((*VspanDestPortConflict)(nil)).Elem() } type VspanDestPortConflictFault VspanDestPortConflict func init() { t["VspanDestPortConflictFault"] = reflect.TypeOf((*VspanDestPortConflictFault)(nil)).Elem() } type VspanPortConflict struct { DvsFault VspanSessionKey1 string `xml:"vspanSessionKey1"` VspanSessionKey2 string `xml:"vspanSessionKey2"` PortKey string `xml:"portKey"` } func init() { t["VspanPortConflict"] = reflect.TypeOf((*VspanPortConflict)(nil)).Elem() } type VspanPortConflictFault VspanPortConflict func init() { t["VspanPortConflictFault"] = reflect.TypeOf((*VspanPortConflictFault)(nil)).Elem() } type VspanPortMoveFault struct { DvsFault SrcPortgroupName string `xml:"srcPortgroupName"` DestPortgroupName string `xml:"destPortgroupName"` PortKey string `xml:"portKey"` } func init() { t["VspanPortMoveFault"] = reflect.TypeOf((*VspanPortMoveFault)(nil)).Elem() } type VspanPortMoveFaultFault VspanPortMoveFault func init() { t["VspanPortMoveFaultFault"] = reflect.TypeOf((*VspanPortMoveFaultFault)(nil)).Elem() } type VspanPortPromiscChangeFault struct { DvsFault PortKey string `xml:"portKey"` } func init() { t["VspanPortPromiscChangeFault"] = reflect.TypeOf((*VspanPortPromiscChangeFault)(nil)).Elem() } type VspanPortPromiscChangeFaultFault VspanPortPromiscChangeFault func init() { t["VspanPortPromiscChangeFaultFault"] = reflect.TypeOf((*VspanPortPromiscChangeFaultFault)(nil)).Elem() } type VspanPortgroupPromiscChangeFault struct { DvsFault PortgroupName string `xml:"portgroupName"` } func init() { t["VspanPortgroupPromiscChangeFault"] = reflect.TypeOf((*VspanPortgroupPromiscChangeFault)(nil)).Elem() } type VspanPortgroupPromiscChangeFaultFault VspanPortgroupPromiscChangeFault func init() { t["VspanPortgroupPromiscChangeFaultFault"] = reflect.TypeOf((*VspanPortgroupPromiscChangeFaultFault)(nil)).Elem() } type VspanPortgroupTypeChangeFault struct { DvsFault PortgroupName string `xml:"portgroupName"` } func init() { t["VspanPortgroupTypeChangeFault"] = reflect.TypeOf((*VspanPortgroupTypeChangeFault)(nil)).Elem() } type VspanPortgroupTypeChangeFaultFault VspanPortgroupTypeChangeFault func init() { t["VspanPortgroupTypeChangeFaultFault"] = reflect.TypeOf((*VspanPortgroupTypeChangeFaultFault)(nil)).Elem() } type VspanPromiscuousPortNotSupported struct { DvsFault VspanSessionKey string `xml:"vspanSessionKey"` PortKey string `xml:"portKey"` } func init() { t["VspanPromiscuousPortNotSupported"] = reflect.TypeOf((*VspanPromiscuousPortNotSupported)(nil)).Elem() } type VspanPromiscuousPortNotSupportedFault VspanPromiscuousPortNotSupported func init() { t["VspanPromiscuousPortNotSupportedFault"] = reflect.TypeOf((*VspanPromiscuousPortNotSupportedFault)(nil)).Elem() } type VspanSameSessionPortConflict struct { DvsFault VspanSessionKey string `xml:"vspanSessionKey"` PortKey string `xml:"portKey"` } func init() { t["VspanSameSessionPortConflict"] = reflect.TypeOf((*VspanSameSessionPortConflict)(nil)).Elem() } type VspanSameSessionPortConflictFault VspanSameSessionPortConflict func init() { t["VspanSameSessionPortConflictFault"] = reflect.TypeOf((*VspanSameSessionPortConflictFault)(nil)).Elem() } type VvolDatastoreInfo struct { DatastoreInfo VvolDS *HostVvolVolume `xml:"vvolDS,omitempty"` } func init() { t["VvolDatastoreInfo"] = reflect.TypeOf((*VvolDatastoreInfo)(nil)).Elem() } type WaitForUpdates WaitForUpdatesRequestType func init() { t["WaitForUpdates"] = reflect.TypeOf((*WaitForUpdates)(nil)).Elem() } type WaitForUpdatesEx WaitForUpdatesExRequestType func init() { t["WaitForUpdatesEx"] = reflect.TypeOf((*WaitForUpdatesEx)(nil)).Elem() } type WaitForUpdatesExRequestType struct { This ManagedObjectReference `xml:"_this"` Version string `xml:"version,omitempty"` Options *WaitOptions `xml:"options,omitempty"` } func init() { t["WaitForUpdatesExRequestType"] = reflect.TypeOf((*WaitForUpdatesExRequestType)(nil)).Elem() } type WaitForUpdatesExResponse struct { Returnval *UpdateSet `xml:"returnval,omitempty"` } type WaitForUpdatesRequestType struct { This ManagedObjectReference `xml:"_this"` Version string `xml:"version,omitempty"` } func init() { t["WaitForUpdatesRequestType"] = reflect.TypeOf((*WaitForUpdatesRequestType)(nil)).Elem() } type WaitForUpdatesResponse struct { Returnval UpdateSet `xml:"returnval"` } type WaitOptions struct { DynamicData MaxWaitSeconds *int32 `xml:"maxWaitSeconds"` MaxObjectUpdates int32 `xml:"maxObjectUpdates,omitempty"` } func init() { t["WaitOptions"] = reflect.TypeOf((*WaitOptions)(nil)).Elem() } type WakeOnLanNotSupported struct { VirtualHardwareCompatibilityIssue } func init() { t["WakeOnLanNotSupported"] = reflect.TypeOf((*WakeOnLanNotSupported)(nil)).Elem() } type WakeOnLanNotSupportedByVmotionNIC struct { HostPowerOpFailed } func init() { t["WakeOnLanNotSupportedByVmotionNIC"] = reflect.TypeOf((*WakeOnLanNotSupportedByVmotionNIC)(nil)).Elem() } type WakeOnLanNotSupportedByVmotionNICFault WakeOnLanNotSupportedByVmotionNIC func init() { t["WakeOnLanNotSupportedByVmotionNICFault"] = reflect.TypeOf((*WakeOnLanNotSupportedByVmotionNICFault)(nil)).Elem() } type WakeOnLanNotSupportedFault WakeOnLanNotSupported func init() { t["WakeOnLanNotSupportedFault"] = reflect.TypeOf((*WakeOnLanNotSupportedFault)(nil)).Elem() } type WarningUpgradeEvent struct { UpgradeEvent } func init() { t["WarningUpgradeEvent"] = reflect.TypeOf((*WarningUpgradeEvent)(nil)).Elem() } type WeeklyTaskScheduler struct { DailyTaskScheduler Sunday bool `xml:"sunday"` Monday bool `xml:"monday"` Tuesday bool `xml:"tuesday"` Wednesday bool `xml:"wednesday"` Thursday bool `xml:"thursday"` Friday bool `xml:"friday"` Saturday bool `xml:"saturday"` } func init() { t["WeeklyTaskScheduler"] = reflect.TypeOf((*WeeklyTaskScheduler)(nil)).Elem() } type WillLoseHAProtection struct { MigrationFault Resolution string `xml:"resolution"` } func init() { t["WillLoseHAProtection"] = reflect.TypeOf((*WillLoseHAProtection)(nil)).Elem() } type WillLoseHAProtectionFault WillLoseHAProtection func init() { t["WillLoseHAProtectionFault"] = reflect.TypeOf((*WillLoseHAProtectionFault)(nil)).Elem() } type WillModifyConfigCpuRequirements struct { MigrationFault } func init() { t["WillModifyConfigCpuRequirements"] = reflect.TypeOf((*WillModifyConfigCpuRequirements)(nil)).Elem() } type WillModifyConfigCpuRequirementsFault WillModifyConfigCpuRequirements func init() { t["WillModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*WillModifyConfigCpuRequirementsFault)(nil)).Elem() } type WillResetSnapshotDirectory struct { MigrationFault } func init() { t["WillResetSnapshotDirectory"] = reflect.TypeOf((*WillResetSnapshotDirectory)(nil)).Elem() } type WillResetSnapshotDirectoryFault WillResetSnapshotDirectory func init() { t["WillResetSnapshotDirectoryFault"] = reflect.TypeOf((*WillResetSnapshotDirectoryFault)(nil)).Elem() } type WinNetBIOSConfigInfo struct { NetBIOSConfigInfo PrimaryWINS string `xml:"primaryWINS"` SecondaryWINS string `xml:"secondaryWINS,omitempty"` } func init() { t["WinNetBIOSConfigInfo"] = reflect.TypeOf((*WinNetBIOSConfigInfo)(nil)).Elem() } type WipeDiskFault struct { VimFault } func init() { t["WipeDiskFault"] = reflect.TypeOf((*WipeDiskFault)(nil)).Elem() } type WipeDiskFaultFault WipeDiskFault func init() { t["WipeDiskFaultFault"] = reflect.TypeOf((*WipeDiskFaultFault)(nil)).Elem() } type WitnessNodeInfo struct { DynamicData IpSettings CustomizationIPSettings `xml:"ipSettings"` BiosUuid string `xml:"biosUuid,omitempty"` } func init() { t["WitnessNodeInfo"] = reflect.TypeOf((*WitnessNodeInfo)(nil)).Elem() } type XmlToCustomizationSpecItem XmlToCustomizationSpecItemRequestType func init() { t["XmlToCustomizationSpecItem"] = reflect.TypeOf((*XmlToCustomizationSpecItem)(nil)).Elem() } type XmlToCustomizationSpecItemRequestType struct { This ManagedObjectReference `xml:"_this"` SpecItemXml string `xml:"specItemXml"` } func init() { t["XmlToCustomizationSpecItemRequestType"] = reflect.TypeOf((*XmlToCustomizationSpecItemRequestType)(nil)).Elem() } type XmlToCustomizationSpecItemResponse struct { Returnval CustomizationSpecItem `xml:"returnval"` } type ZeroFillVirtualDiskRequestType struct { This ManagedObjectReference `xml:"_this"` Name string `xml:"name"` Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` } func init() { t["ZeroFillVirtualDiskRequestType"] = reflect.TypeOf((*ZeroFillVirtualDiskRequestType)(nil)).Elem() } type ZeroFillVirtualDisk_Task ZeroFillVirtualDiskRequestType func init() { t["ZeroFillVirtualDisk_Task"] = reflect.TypeOf((*ZeroFillVirtualDisk_Task)(nil)).Elem() } type ZeroFillVirtualDisk_TaskResponse struct { Returnval ManagedObjectReference `xml:"returnval"` } govmomi-0.15.0/vim25/types/types_test.go000066400000000000000000000051311312205533500201110ustar00rootroot00000000000000/* Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package types import ( "testing" "github.com/vmware/govmomi/vim25/xml" ) func TestVirtualMachineConfigSpec(t *testing.T) { spec := VirtualMachineConfigSpec{ Name: "vm-001", GuestId: "otherGuest", Files: &VirtualMachineFileInfo{VmPathName: "[datastore1]"}, NumCPUs: 1, MemoryMB: 128, DeviceChange: []BaseVirtualDeviceConfigSpec{ &VirtualDeviceConfigSpec{ Operation: VirtualDeviceConfigSpecOperationAdd, Device: &VirtualLsiLogicController{VirtualSCSIController{ SharedBus: VirtualSCSISharingNoSharing, VirtualController: VirtualController{ BusNumber: 0, VirtualDevice: VirtualDevice{ Key: 1000, }, }, }}, }, &VirtualDeviceConfigSpec{ Operation: VirtualDeviceConfigSpecOperationAdd, FileOperation: VirtualDeviceConfigSpecFileOperationCreate, Device: &VirtualDisk{ VirtualDevice: VirtualDevice{ Key: 0, ControllerKey: 1000, UnitNumber: new(int32), // zero default value Backing: &VirtualDiskFlatVer2BackingInfo{ DiskMode: string(VirtualDiskModePersistent), ThinProvisioned: NewBool(true), VirtualDeviceFileBackingInfo: VirtualDeviceFileBackingInfo{ FileName: "[datastore1]", }, }, }, CapacityInKB: 4000000, }, }, &VirtualDeviceConfigSpec{ Operation: VirtualDeviceConfigSpecOperationAdd, Device: &VirtualE1000{VirtualEthernetCard{ VirtualDevice: VirtualDevice{ Key: 0, DeviceInfo: &Description{ Label: "Network Adapter 1", Summary: "VM Network", }, Backing: &VirtualEthernetCardNetworkBackingInfo{ VirtualDeviceDeviceBackingInfo: VirtualDeviceDeviceBackingInfo{ DeviceName: "VM Network", }, }, }, AddressType: string(VirtualEthernetCardMacTypeGenerated), }}, }, }, ExtraConfig: []BaseOptionValue{ &OptionValue{Key: "bios.bootOrder", Value: "ethernet0"}, }, } _, err := xml.MarshalIndent(spec, "", " ") if err != nil { t.Fatal(err) } } govmomi-0.15.0/vim25/xml/000077500000000000000000000000001312205533500150135ustar00rootroot00000000000000govmomi-0.15.0/vim25/xml/LICENSE000066400000000000000000000027071312205533500160260ustar00rootroot00000000000000Copyright (c) 2012 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. govmomi-0.15.0/vim25/xml/atom_test.go000066400000000000000000000031261312205533500173430ustar00rootroot00000000000000// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import "time" var atomValue = &Feed{ XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, Title: "Example Feed", Link: []Link{{Href: "http://example.org/"}}, Updated: ParseTime("2003-12-13T18:30:02Z"), Author: Person{Name: "John Doe"}, Id: "urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6", Entry: []Entry{ { Title: "Atom-Powered Robots Run Amok", Link: []Link{{Href: "http://example.org/2003/12/13/atom03"}}, Id: "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", Updated: ParseTime("2003-12-13T18:30:02Z"), Summary: NewText("Some text."), }, }, } var atomXml = `` + `` + `Example Feed` + `urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6` + `` + `John Doe` + `` + `Atom-Powered Robots Run Amok` + `urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a` + `` + `2003-12-13T18:30:02Z` + `` + `Some text.` + `` + `` func ParseTime(str string) time.Time { t, err := time.Parse(time.RFC3339, str) if err != nil { panic(err) } return t } func NewText(text string) Text { return Text{ Body: text, } } govmomi-0.15.0/vim25/xml/example_test.go000066400000000000000000000073371312205533500200460ustar00rootroot00000000000000// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml_test import ( "encoding/xml" "fmt" "os" ) func ExampleMarshalIndent() { type Address struct { City, State string } type Person struct { XMLName xml.Name `xml:"person"` Id int `xml:"id,attr"` FirstName string `xml:"name>first"` LastName string `xml:"name>last"` Age int `xml:"age"` Height float32 `xml:"height,omitempty"` Married bool Address Comment string `xml:",comment"` } v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42} v.Comment = " Need more details. " v.Address = Address{"Hanga Roa", "Easter Island"} output, err := xml.MarshalIndent(v, " ", " ") if err != nil { fmt.Printf("error: %v\n", err) } os.Stdout.Write(output) // Output: // // // John // Doe // // 42 // false // Hanga Roa // Easter Island // // } func ExampleEncoder() { type Address struct { City, State string } type Person struct { XMLName xml.Name `xml:"person"` Id int `xml:"id,attr"` FirstName string `xml:"name>first"` LastName string `xml:"name>last"` Age int `xml:"age"` Height float32 `xml:"height,omitempty"` Married bool Address Comment string `xml:",comment"` } v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42} v.Comment = " Need more details. " v.Address = Address{"Hanga Roa", "Easter Island"} enc := xml.NewEncoder(os.Stdout) enc.Indent(" ", " ") if err := enc.Encode(v); err != nil { fmt.Printf("error: %v\n", err) } // Output: // // // John // Doe // // 42 // false // Hanga Roa // Easter Island // // } // This example demonstrates unmarshaling an XML excerpt into a value with // some preset fields. Note that the Phone field isn't modified and that // the XML element is ignored. Also, the Groups field is assigned // considering the element path provided in its tag. func ExampleUnmarshal() { type Email struct { Where string `xml:"where,attr"` Addr string } type Address struct { City, State string } type Result struct { XMLName xml.Name `xml:"Person"` Name string `xml:"FullName"` Phone string Email []Email Groups []string `xml:"Group>Value"` Address } v := Result{Name: "none", Phone: "none"} data := ` Grace R. Emlin Example Inc. gre@example.com gre@work.com Friends Squash Hanga Roa Easter Island ` err := xml.Unmarshal([]byte(data), &v) if err != nil { fmt.Printf("error: %v", err) return } fmt.Printf("XMLName: %#v\n", v.XMLName) fmt.Printf("Name: %q\n", v.Name) fmt.Printf("Phone: %q\n", v.Phone) fmt.Printf("Email: %v\n", v.Email) fmt.Printf("Groups: %v\n", v.Groups) fmt.Printf("Address: %v\n", v.Address) // Output: // XMLName: xml.Name{Space:"", Local:"Person"} // Name: "Grace R. Emlin" // Phone: "none" // Email: [{home gre@example.com} {work gre@work.com}] // Groups: [Friends Squash] // Address: {Hanga Roa Easter Island} } govmomi-0.15.0/vim25/xml/extras.go000066400000000000000000000056661312205533500166650ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package xml import ( "reflect" "time" ) var xmlSchemaInstance = Name{Space: "http://www.w3.org/2001/XMLSchema-instance", Local: "type"} var xsiType = Name{Space: "xsi", Local: "type"} var stringToTypeMap = map[string]reflect.Type{ "xsd:boolean": reflect.TypeOf((*bool)(nil)).Elem(), "xsd:byte": reflect.TypeOf((*int8)(nil)).Elem(), "xsd:short": reflect.TypeOf((*int16)(nil)).Elem(), "xsd:int": reflect.TypeOf((*int32)(nil)).Elem(), "xsd:long": reflect.TypeOf((*int64)(nil)).Elem(), "xsd:unsignedByte": reflect.TypeOf((*uint8)(nil)).Elem(), "xsd:unsignedShort": reflect.TypeOf((*uint16)(nil)).Elem(), "xsd:unsignedInt": reflect.TypeOf((*uint32)(nil)).Elem(), "xsd:unsignedLong": reflect.TypeOf((*uint64)(nil)).Elem(), "xsd:float": reflect.TypeOf((*float32)(nil)).Elem(), "xsd:double": reflect.TypeOf((*float64)(nil)).Elem(), "xsd:string": reflect.TypeOf((*string)(nil)).Elem(), "xsd:dateTime": reflect.TypeOf((*time.Time)(nil)).Elem(), "xsd:base64Binary": reflect.TypeOf((*[]byte)(nil)).Elem(), } // Return a reflect.Type for the specified type. Nil if unknown. func stringToType(s string) reflect.Type { return stringToTypeMap[s] } // Return a string for the specified reflect.Type. Panic if unknown. func typeToString(typ reflect.Type) string { switch typ.Kind() { case reflect.Bool: return "xsd:boolean" case reflect.Int8: return "xsd:byte" case reflect.Int16: return "xsd:short" case reflect.Int32: return "xsd:int" case reflect.Int, reflect.Int64: return "xsd:long" case reflect.Uint8: return "xsd:unsignedByte" case reflect.Uint16: return "xsd:unsignedShort" case reflect.Uint32: return "xsd:unsignedInt" case reflect.Uint, reflect.Uint64: return "xsd:unsignedLong" case reflect.Float32: return "xsd:float" case reflect.Float64: return "xsd:double" case reflect.String: name := typ.Name() if name == "string" { return "xsd:string" } return name case reflect.Struct: if typ == stringToTypeMap["xsd:dateTime"] { return "xsd:dateTime" } // Expect any other struct to be handled... return typ.Name() case reflect.Slice: if typ.Elem().Kind() == reflect.Uint8 { return "xsd:base64Binary" } case reflect.Array: if typ.Elem().Kind() == reflect.Uint8 { return "xsd:base64Binary" } } panic("don't know what to do for type: " + typ.String()) } govmomi-0.15.0/vim25/xml/extras_test.go000066400000000000000000000105351312205533500177130ustar00rootroot00000000000000/* Copyright (c) 2014 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package xml import ( "bytes" "reflect" "testing" "time" ) type MyType struct { Value string } var myTypes = map[string]reflect.Type{ "MyType": reflect.TypeOf(MyType{}), "ValueType": reflect.TypeOf(ValueType{}), "PointerType": reflect.TypeOf(PointerType{}), } func MyTypes(name string) (reflect.Type, bool) { t, ok := myTypes[name] return t, ok } func TestMarshalWithEmptyInterface(t *testing.T) { var r1, r2 struct { XMLName Name `xml:"root"` Values []interface{} `xml:"value,typeattr"` } var tests = []struct { Value interface{} }{ {Value: bool(true)}, {Value: int8(-8)}, {Value: int16(-16)}, {Value: int32(-32)}, {Value: int64(-64)}, {Value: uint8(8)}, {Value: uint16(16)}, {Value: uint32(32)}, {Value: uint64(64)}, {Value: float32(32.0)}, {Value: float64(64.0)}, {Value: string("string")}, {Value: time.Now()}, {Value: ParseTime("2009-10-04T01:35:58+00:00")}, {Value: []byte("bytes")}, {Value: MyType{Value: "v"}}, } for _, test := range tests { r1.XMLName.Local = "root" r1.Values = []interface{}{test.Value} r2.XMLName = Name{} r2.Values = nil b, err := Marshal(r1) if err != nil { t.Fatalf("Marshal: %s", err) } dec := NewDecoder(bytes.NewReader(b)) dec.TypeFunc = MyTypes err = dec.Decode(&r2) if err != nil { t.Fatalf("Unmarshal: %s", err) } switch r1.Values[0].(type) { case time.Time: if !r1.Values[0].(time.Time).Equal(r2.Values[0].(time.Time)) { t.Errorf("Expected: %#v, actual: %#v", r1, r2) } default: if !reflect.DeepEqual(r1, r2) { t.Errorf("Expected: %#v, actual: %#v", r1, r2) } } } } type VIntf interface { V() string } type ValueType struct { Value string `xml:",chardata"` } type PointerType struct { Value string `xml:",chardata"` } func (t ValueType) V() string { return t.Value } func (t *PointerType) V() string { return t.Value } func TestMarshalWithInterface(t *testing.T) { var r1, r2 struct { XMLName Name `xml:"root"` Values []VIntf `xml:"value,typeattr"` } r1.XMLName.Local = "root" r1.Values = []VIntf{ ValueType{"v1"}, &PointerType{"v2"}, } b, err := Marshal(r1) if err != nil { t.Fatalf("Marshal: %s", err) } dec := NewDecoder(bytes.NewReader(b)) dec.TypeFunc = MyTypes err = dec.Decode(&r2) if err != nil { t.Fatalf("Unmarshal: %s", err) } if !reflect.DeepEqual(r1, r2) { t.Errorf("expected: %#v, actual: %#v", r1, r2) } } type test3iface interface { Value() string } type test3a struct { V string `xml:",chardata"` } func (t test3a) Value() string { return t.V } type test3b struct { V string `xml:",chardata"` } func (t test3b) Value() string { return t.V } func TestUnmarshalInterfaceWithoutTypeAttr(t *testing.T) { var r struct { XMLName Name `xml:"root"` Values []test3iface `xml:"value,typeattr"` } b := ` A B ` fn := func(name string) (reflect.Type, bool) { switch name { case "test3a": return reflect.TypeOf(test3a{}), true case "test3iface": return reflect.TypeOf(test3b{}), true default: return nil, false } } dec := NewDecoder(bytes.NewReader([]byte(b))) dec.TypeFunc = fn err := dec.Decode(&r) if err != nil { t.Fatalf("Unmarshal: %s", err) } if len(r.Values) != 2 { t.Errorf("Expected 2 values") } exps := []struct { Typ reflect.Type Val string }{ { Typ: reflect.TypeOf(test3a{}), Val: "A", }, { Typ: reflect.TypeOf(test3b{}), Val: "B", }, } for i, e := range exps { if val := r.Values[i].Value(); val != e.Val { t.Errorf("Expected: %s, got: %s", e.Val, val) } if typ := reflect.TypeOf(r.Values[i]); typ.Name() != e.Typ.Name() { t.Errorf("Expected: %s, got: %s", e.Typ.Name(), typ.Name()) } } } govmomi-0.15.0/vim25/xml/marshal.go000066400000000000000000000646641312205533500170110ustar00rootroot00000000000000// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import ( "bufio" "bytes" "encoding" "fmt" "io" "reflect" "strconv" "strings" ) const ( // A generic XML header suitable for use with the output of Marshal. // This is not automatically added to any output of this package, // it is provided as a convenience. Header = `` + "\n" ) // Marshal returns the XML encoding of v. // // Marshal handles an array or slice by marshalling each of the elements. // Marshal handles a pointer by marshalling the value it points at or, if the // pointer is nil, by writing nothing. Marshal handles an interface value by // marshalling the value it contains or, if the interface value is nil, by // writing nothing. Marshal handles all other data by writing one or more XML // elements containing the data. // // The name for the XML elements is taken from, in order of preference: // - the tag on the XMLName field, if the data is a struct // - the value of the XMLName field of type xml.Name // - the tag of the struct field used to obtain the data // - the name of the struct field used to obtain the data // - the name of the marshalled type // // The XML element for a struct contains marshalled elements for each of the // exported fields of the struct, with these exceptions: // - the XMLName field, described above, is omitted. // - a field with tag "-" is omitted. // - a field with tag "name,attr" becomes an attribute with // the given name in the XML element. // - a field with tag ",attr" becomes an attribute with the // field name in the XML element. // - a field with tag ",chardata" is written as character data, // not as an XML element. // - a field with tag ",innerxml" is written verbatim, not subject // to the usual marshalling procedure. // - a field with tag ",comment" is written as an XML comment, not // subject to the usual marshalling procedure. It must not contain // the "--" string within it. // - a field with a tag including the "omitempty" option is omitted // if the field value is empty. The empty values are false, 0, any // nil pointer or interface value, and any array, slice, map, or // string of length zero. // - an anonymous struct field is handled as if the fields of its // value were part of the outer struct. // // If a field uses a tag "a>b>c", then the element c will be nested inside // parent elements a and b. Fields that appear next to each other that name // the same parent will be enclosed in one XML element. // // See MarshalIndent for an example. // // Marshal will return an error if asked to marshal a channel, function, or map. func Marshal(v interface{}) ([]byte, error) { var b bytes.Buffer if err := NewEncoder(&b).Encode(v); err != nil { return nil, err } return b.Bytes(), nil } // Marshaler is the interface implemented by objects that can marshal // themselves into valid XML elements. // // MarshalXML encodes the receiver as zero or more XML elements. // By convention, arrays or slices are typically encoded as a sequence // of elements, one per entry. // Using start as the element tag is not required, but doing so // will enable Unmarshal to match the XML elements to the correct // struct field. // One common implementation strategy is to construct a separate // value with a layout corresponding to the desired XML and then // to encode it using e.EncodeElement. // Another common strategy is to use repeated calls to e.EncodeToken // to generate the XML output one token at a time. // The sequence of encoded tokens must make up zero or more valid // XML elements. type Marshaler interface { MarshalXML(e *Encoder, start StartElement) error } // MarshalerAttr is the interface implemented by objects that can marshal // themselves into valid XML attributes. // // MarshalXMLAttr returns an XML attribute with the encoded value of the receiver. // Using name as the attribute name is not required, but doing so // will enable Unmarshal to match the attribute to the correct // struct field. // If MarshalXMLAttr returns the zero attribute Attr{}, no attribute // will be generated in the output. // MarshalXMLAttr is used only for struct fields with the // "attr" option in the field tag. type MarshalerAttr interface { MarshalXMLAttr(name Name) (Attr, error) } // MarshalIndent works like Marshal, but each XML element begins on a new // indented line that starts with prefix and is followed by one or more // copies of indent according to the nesting depth. func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { var b bytes.Buffer enc := NewEncoder(&b) enc.Indent(prefix, indent) if err := enc.Encode(v); err != nil { return nil, err } return b.Bytes(), nil } // An Encoder writes XML data to an output stream. type Encoder struct { p printer } // NewEncoder returns a new encoder that writes to w. func NewEncoder(w io.Writer) *Encoder { e := &Encoder{printer{Writer: bufio.NewWriter(w)}} e.p.encoder = e return e } // Indent sets the encoder to generate XML in which each element // begins on a new indented line that starts with prefix and is followed by // one or more copies of indent according to the nesting depth. func (enc *Encoder) Indent(prefix, indent string) { enc.p.prefix = prefix enc.p.indent = indent } // Encode writes the XML encoding of v to the stream. // // See the documentation for Marshal for details about the conversion // of Go values to XML. // // Encode calls Flush before returning. func (enc *Encoder) Encode(v interface{}) error { err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil) if err != nil { return err } return enc.p.Flush() } // EncodeElement writes the XML encoding of v to the stream, // using start as the outermost tag in the encoding. // // See the documentation for Marshal for details about the conversion // of Go values to XML. // // EncodeElement calls Flush before returning. func (enc *Encoder) EncodeElement(v interface{}, start StartElement) error { err := enc.p.marshalValue(reflect.ValueOf(v), nil, &start) if err != nil { return err } return enc.p.Flush() } var ( endComment = []byte("-->") endProcInst = []byte("?>") endDirective = []byte(">") ) // EncodeToken writes the given XML token to the stream. // It returns an error if StartElement and EndElement tokens are not properly matched. // // EncodeToken does not call Flush, because usually it is part of a larger operation // such as Encode or EncodeElement (or a custom Marshaler's MarshalXML invoked // during those), and those will call Flush when finished. // Callers that create an Encoder and then invoke EncodeToken directly, without // using Encode or EncodeElement, need to call Flush when finished to ensure // that the XML is written to the underlying writer. // // EncodeToken allows writing a ProcInst with Target set to "xml" only as the first token // in the stream. func (enc *Encoder) EncodeToken(t Token) error { p := &enc.p switch t := t.(type) { case StartElement: if err := p.writeStart(&t); err != nil { return err } case EndElement: if err := p.writeEnd(t.Name); err != nil { return err } case CharData: EscapeText(p, t) case Comment: if bytes.Contains(t, endComment) { return fmt.Errorf("xml: EncodeToken of Comment containing --> marker") } p.WriteString("") return p.cachedWriteError() case ProcInst: // First token to be encoded which is also a ProcInst with target of xml // is the xml declaration. The only ProcInst where target of xml is allowed. if t.Target == "xml" && p.Buffered() != 0 { return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded") } if !isNameString(t.Target) { return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target") } if bytes.Contains(t.Inst, endProcInst) { return fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker") } p.WriteString(" 0 { p.WriteByte(' ') p.Write(t.Inst) } p.WriteString("?>") case Directive: if bytes.Contains(t, endDirective) { return fmt.Errorf("xml: EncodeToken of Directive containing > marker") } p.WriteString("") } return p.cachedWriteError() } // Flush flushes any buffered XML to the underlying writer. // See the EncodeToken documentation for details about when it is necessary. func (enc *Encoder) Flush() error { return enc.p.Flush() } type printer struct { *bufio.Writer encoder *Encoder seq int indent string prefix string depth int indentedIn bool putNewline bool attrNS map[string]string // map prefix -> name space attrPrefix map[string]string // map name space -> prefix prefixes []string tags []Name } // createAttrPrefix finds the name space prefix attribute to use for the given name space, // defining a new prefix if necessary. It returns the prefix. func (p *printer) createAttrPrefix(url string) string { if prefix := p.attrPrefix[url]; prefix != "" { return prefix } // The "http://www.w3.org/XML/1998/namespace" name space is predefined as "xml" // and must be referred to that way. // (The "http://www.w3.org/2000/xmlns/" name space is also predefined as "xmlns", // but users should not be trying to use that one directly - that's our job.) if url == xmlURL { return "xml" } // Need to define a new name space. if p.attrPrefix == nil { p.attrPrefix = make(map[string]string) p.attrNS = make(map[string]string) } // Pick a name. We try to use the final element of the path // but fall back to _. prefix := strings.TrimRight(url, "/") if i := strings.LastIndex(prefix, "/"); i >= 0 { prefix = prefix[i+1:] } if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") { prefix = "_" } if strings.HasPrefix(prefix, "xml") { // xmlanything is reserved. prefix = "_" + prefix } if p.attrNS[prefix] != "" { // Name is taken. Find a better one. for p.seq++; ; p.seq++ { if id := prefix + "_" + strconv.Itoa(p.seq); p.attrNS[id] == "" { prefix = id break } } } p.attrPrefix[url] = prefix p.attrNS[prefix] = url p.WriteString(`xmlns:`) p.WriteString(prefix) p.WriteString(`="`) EscapeText(p, []byte(url)) p.WriteString(`" `) p.prefixes = append(p.prefixes, prefix) return prefix } // deleteAttrPrefix removes an attribute name space prefix. func (p *printer) deleteAttrPrefix(prefix string) { delete(p.attrPrefix, p.attrNS[prefix]) delete(p.attrNS, prefix) } func (p *printer) markPrefix() { p.prefixes = append(p.prefixes, "") } func (p *printer) popPrefix() { for len(p.prefixes) > 0 { prefix := p.prefixes[len(p.prefixes)-1] p.prefixes = p.prefixes[:len(p.prefixes)-1] if prefix == "" { break } p.deleteAttrPrefix(prefix) } } var ( marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() marshalerAttrType = reflect.TypeOf((*MarshalerAttr)(nil)).Elem() textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() ) // marshalValue writes one or more XML elements representing val. // If val was obtained from a struct field, finfo must have its details. func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplate *StartElement) error { if startTemplate != nil && startTemplate.Name.Local == "" { return fmt.Errorf("xml: EncodeElement of StartElement with missing name") } if !val.IsValid() { return nil } if finfo != nil && finfo.flags&fOmitEmpty != 0 && isEmptyValue(val) { return nil } // Drill into interfaces and pointers. // This can turn into an infinite loop given a cyclic chain, // but it matches the Go 1 behavior. for val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { if val.IsNil() { return nil } val = val.Elem() } kind := val.Kind() typ := val.Type() // Check for marshaler. if val.CanInterface() && typ.Implements(marshalerType) { return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(marshalerType) { return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate)) } } // Check for text marshaler. if val.CanInterface() && typ.Implements(textMarshalerType) { return p.marshalTextInterface(val.Interface().(encoding.TextMarshaler), defaultStart(typ, finfo, startTemplate)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { return p.marshalTextInterface(pv.Interface().(encoding.TextMarshaler), defaultStart(pv.Type(), finfo, startTemplate)) } } // Slices and arrays iterate over the elements. They do not have an enclosing tag. if (kind == reflect.Slice || kind == reflect.Array) && typ.Elem().Kind() != reflect.Uint8 { for i, n := 0, val.Len(); i < n; i++ { if err := p.marshalValue(val.Index(i), finfo, startTemplate); err != nil { return err } } return nil } tinfo, err := getTypeInfo(typ) if err != nil { return err } // Create start element. // Precedence for the XML element name is: // 0. startTemplate // 1. XMLName field in underlying struct; // 2. field name/tag in the struct field; and // 3. type name var start StartElement if startTemplate != nil { start.Name = startTemplate.Name start.Attr = append(start.Attr, startTemplate.Attr...) } else if tinfo.xmlname != nil { xmlname := tinfo.xmlname if xmlname.name != "" { start.Name.Space, start.Name.Local = xmlname.xmlns, xmlname.name } else if v, ok := xmlname.value(val).Interface().(Name); ok && v.Local != "" { start.Name = v } } if start.Name.Local == "" && finfo != nil { start.Name.Space, start.Name.Local = finfo.xmlns, finfo.name } if start.Name.Local == "" { name := typ.Name() if name == "" { return &UnsupportedTypeError{typ} } start.Name.Local = name } // Add type attribute if necessary if finfo != nil && finfo.flags&fTypeAttr != 0 { start.Attr = append(start.Attr, Attr{xmlSchemaInstance, typeToString(typ)}) } // Attributes for i := range tinfo.fields { finfo := &tinfo.fields[i] if finfo.flags&fAttr == 0 { continue } fv := finfo.value(val) name := Name{Space: finfo.xmlns, Local: finfo.name} if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) { continue } if fv.Kind() == reflect.Interface && fv.IsNil() { continue } if fv.CanInterface() && fv.Type().Implements(marshalerAttrType) { attr, err := fv.Interface().(MarshalerAttr).MarshalXMLAttr(name) if err != nil { return err } if attr.Name.Local != "" { start.Attr = append(start.Attr, attr) } continue } if fv.CanAddr() { pv := fv.Addr() if pv.CanInterface() && pv.Type().Implements(marshalerAttrType) { attr, err := pv.Interface().(MarshalerAttr).MarshalXMLAttr(name) if err != nil { return err } if attr.Name.Local != "" { start.Attr = append(start.Attr, attr) } continue } } if fv.CanInterface() && fv.Type().Implements(textMarshalerType) { text, err := fv.Interface().(encoding.TextMarshaler).MarshalText() if err != nil { return err } start.Attr = append(start.Attr, Attr{name, string(text)}) continue } if fv.CanAddr() { pv := fv.Addr() if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { text, err := pv.Interface().(encoding.TextMarshaler).MarshalText() if err != nil { return err } start.Attr = append(start.Attr, Attr{name, string(text)}) continue } } // Dereference or skip nil pointer, interface values. switch fv.Kind() { case reflect.Ptr, reflect.Interface: if fv.IsNil() { continue } fv = fv.Elem() } s, b, err := p.marshalSimple(fv.Type(), fv) if err != nil { return err } if b != nil { s = string(b) } start.Attr = append(start.Attr, Attr{name, s}) } if err := p.writeStart(&start); err != nil { return err } if val.Kind() == reflect.Struct { err = p.marshalStruct(tinfo, val) } else { s, b, err1 := p.marshalSimple(typ, val) if err1 != nil { err = err1 } else if b != nil { EscapeText(p, b) } else { p.EscapeString(s) } } if err != nil { return err } if err := p.writeEnd(start.Name); err != nil { return err } return p.cachedWriteError() } // defaultStart returns the default start element to use, // given the reflect type, field info, and start template. func defaultStart(typ reflect.Type, finfo *fieldInfo, startTemplate *StartElement) StartElement { var start StartElement // Precedence for the XML element name is as above, // except that we do not look inside structs for the first field. if startTemplate != nil { start.Name = startTemplate.Name start.Attr = append(start.Attr, startTemplate.Attr...) } else if finfo != nil && finfo.name != "" { start.Name.Local = finfo.name start.Name.Space = finfo.xmlns } else if typ.Name() != "" { start.Name.Local = typ.Name() } else { // Must be a pointer to a named type, // since it has the Marshaler methods. start.Name.Local = typ.Elem().Name() } // Add type attribute if necessary if finfo != nil && finfo.flags&fTypeAttr != 0 { start.Attr = append(start.Attr, Attr{xmlSchemaInstance, typeToString(typ)}) } return start } // marshalInterface marshals a Marshaler interface value. func (p *printer) marshalInterface(val Marshaler, start StartElement) error { // Push a marker onto the tag stack so that MarshalXML // cannot close the XML tags that it did not open. p.tags = append(p.tags, Name{}) n := len(p.tags) err := val.MarshalXML(p.encoder, start) if err != nil { return err } // Make sure MarshalXML closed all its tags. p.tags[n-1] is the mark. if len(p.tags) > n { return fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", receiverType(val), p.tags[len(p.tags)-1].Local) } p.tags = p.tags[:n-1] return nil } // marshalTextInterface marshals a TextMarshaler interface value. func (p *printer) marshalTextInterface(val encoding.TextMarshaler, start StartElement) error { if err := p.writeStart(&start); err != nil { return err } text, err := val.MarshalText() if err != nil { return err } EscapeText(p, text) return p.writeEnd(start.Name) } // writeStart writes the given start element. func (p *printer) writeStart(start *StartElement) error { if start.Name.Local == "" { return fmt.Errorf("xml: start tag with no name") } p.tags = append(p.tags, start.Name) p.markPrefix() p.writeIndent(1) p.WriteByte('<') p.WriteString(start.Name.Local) if start.Name.Space != "" { p.WriteString(` xmlns="`) p.EscapeString(start.Name.Space) p.WriteByte('"') } // Attributes for _, attr := range start.Attr { name := attr.Name if name.Local == "" { continue } p.WriteByte(' ') if name.Space != "" { p.WriteString(p.createAttrPrefix(name.Space)) p.WriteByte(':') } p.WriteString(name.Local) p.WriteString(`="`) p.EscapeString(attr.Value) p.WriteByte('"') } p.WriteByte('>') return nil } func (p *printer) writeEnd(name Name) error { if name.Local == "" { return fmt.Errorf("xml: end tag with no name") } if len(p.tags) == 0 || p.tags[len(p.tags)-1].Local == "" { return fmt.Errorf("xml: end tag without start tag", name.Local) } if top := p.tags[len(p.tags)-1]; top != name { if top.Local != name.Local { return fmt.Errorf("xml: end tag does not match start tag <%s>", name.Local, top.Local) } return fmt.Errorf("xml: end tag in namespace %s does not match start tag <%s> in namespace %s", name.Local, name.Space, top.Local, top.Space) } p.tags = p.tags[:len(p.tags)-1] p.writeIndent(-1) p.WriteByte('<') p.WriteByte('/') p.WriteString(name.Local) p.WriteByte('>') p.popPrefix() return nil } func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []byte, error) { switch val.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return strconv.FormatInt(val.Int(), 10), nil, nil case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return strconv.FormatUint(val.Uint(), 10), nil, nil case reflect.Float32, reflect.Float64: return strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits()), nil, nil case reflect.String: return val.String(), nil, nil case reflect.Bool: return strconv.FormatBool(val.Bool()), nil, nil case reflect.Array: if typ.Elem().Kind() != reflect.Uint8 { break } // [...]byte var bytes []byte if val.CanAddr() { bytes = val.Slice(0, val.Len()).Bytes() } else { bytes = make([]byte, val.Len()) reflect.Copy(reflect.ValueOf(bytes), val) } return "", bytes, nil case reflect.Slice: if typ.Elem().Kind() != reflect.Uint8 { break } // []byte return "", val.Bytes(), nil } return "", nil, &UnsupportedTypeError{typ} } var ddBytes = []byte("--") func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error { s := parentStack{p: p} for i := range tinfo.fields { finfo := &tinfo.fields[i] if finfo.flags&fAttr != 0 { continue } vf := finfo.value(val) // Dereference or skip nil pointer, interface values. switch vf.Kind() { case reflect.Ptr, reflect.Interface: if !vf.IsNil() { vf = vf.Elem() } } switch finfo.flags & fMode { case fCharData: if vf.CanInterface() && vf.Type().Implements(textMarshalerType) { data, err := vf.Interface().(encoding.TextMarshaler).MarshalText() if err != nil { return err } Escape(p, data) continue } if vf.CanAddr() { pv := vf.Addr() if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { data, err := pv.Interface().(encoding.TextMarshaler).MarshalText() if err != nil { return err } Escape(p, data) continue } } var scratch [64]byte switch vf.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: Escape(p, strconv.AppendInt(scratch[:0], vf.Int(), 10)) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: Escape(p, strconv.AppendUint(scratch[:0], vf.Uint(), 10)) case reflect.Float32, reflect.Float64: Escape(p, strconv.AppendFloat(scratch[:0], vf.Float(), 'g', -1, vf.Type().Bits())) case reflect.Bool: Escape(p, strconv.AppendBool(scratch[:0], vf.Bool())) case reflect.String: if err := EscapeText(p, []byte(vf.String())); err != nil { return err } case reflect.Slice: if elem, ok := vf.Interface().([]byte); ok { if err := EscapeText(p, elem); err != nil { return err } } } continue case fComment: k := vf.Kind() if !(k == reflect.String || k == reflect.Slice && vf.Type().Elem().Kind() == reflect.Uint8) { return fmt.Errorf("xml: bad type for comment field of %s", val.Type()) } if vf.Len() == 0 { continue } p.writeIndent(0) p.WriteString("" is invalid grammar. Make it "- -->" p.WriteByte(' ') } p.WriteString("-->") continue case fInnerXml: iface := vf.Interface() switch raw := iface.(type) { case []byte: p.Write(raw) continue case string: p.WriteString(raw) continue } case fElement, fElement | fAny: if err := s.trim(finfo.parents); err != nil { return err } if len(finfo.parents) > len(s.stack) { if vf.Kind() != reflect.Ptr && vf.Kind() != reflect.Interface || !vf.IsNil() { if err := s.push(finfo.parents[len(s.stack):]); err != nil { return err } } } } if err := p.marshalValue(vf, finfo, nil); err != nil { return err } } s.trim(nil) return p.cachedWriteError() } // return the bufio Writer's cached write error func (p *printer) cachedWriteError() error { _, err := p.Write(nil) return err } func (p *printer) writeIndent(depthDelta int) { if len(p.prefix) == 0 && len(p.indent) == 0 { return } if depthDelta < 0 { p.depth-- if p.indentedIn { p.indentedIn = false return } p.indentedIn = false } if p.putNewline { p.WriteByte('\n') } else { p.putNewline = true } if len(p.prefix) > 0 { p.WriteString(p.prefix) } if len(p.indent) > 0 { for i := 0; i < p.depth; i++ { p.WriteString(p.indent) } } if depthDelta > 0 { p.depth++ p.indentedIn = true } } type parentStack struct { p *printer stack []string } // trim updates the XML context to match the longest common prefix of the stack // and the given parents. A closing tag will be written for every parent // popped. Passing a zero slice or nil will close all the elements. func (s *parentStack) trim(parents []string) error { split := 0 for ; split < len(parents) && split < len(s.stack); split++ { if parents[split] != s.stack[split] { break } } for i := len(s.stack) - 1; i >= split; i-- { if err := s.p.writeEnd(Name{Local: s.stack[i]}); err != nil { return err } } s.stack = parents[:split] return nil } // push adds parent elements to the stack and writes open tags. func (s *parentStack) push(parents []string) error { for i := 0; i < len(parents); i++ { if err := s.p.writeStart(&StartElement{Name: Name{Local: parents[i]}}); err != nil { return err } } s.stack = append(s.stack, parents...) return nil } // A MarshalXMLError is returned when Marshal encounters a type // that cannot be converted into XML. type UnsupportedTypeError struct { Type reflect.Type } func (e *UnsupportedTypeError) Error() string { return "xml: unsupported type: " + e.Type.String() } func isEmptyValue(v reflect.Value) bool { switch v.Kind() { case reflect.Array, reflect.Map, reflect.Slice, reflect.String: return v.Len() == 0 case reflect.Bool: return !v.Bool() case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return v.Int() == 0 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return v.Uint() == 0 case reflect.Float32, reflect.Float64: return v.Float() == 0 case reflect.Interface, reflect.Ptr: return v.IsNil() } return false } govmomi-0.15.0/vim25/xml/marshal_test.go000066400000000000000000000750111312205533500200340ustar00rootroot00000000000000// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import ( "bytes" "errors" "fmt" "io" "reflect" "strconv" "strings" "testing" "time" ) type DriveType int const ( HyperDrive DriveType = iota ImprobabilityDrive ) type Passenger struct { Name []string `xml:"name"` Weight float32 `xml:"weight"` } type Ship struct { XMLName struct{} `xml:"spaceship"` Name string `xml:"name,attr"` Pilot string `xml:"pilot,attr"` Drive DriveType `xml:"drive"` Age uint `xml:"age"` Passenger []*Passenger `xml:"passenger"` secret string } type NamedType string type Port struct { XMLName struct{} `xml:"port"` Type string `xml:"type,attr,omitempty"` Comment string `xml:",comment"` Number string `xml:",chardata"` } type Domain struct { XMLName struct{} `xml:"domain"` Country string `xml:",attr,omitempty"` Name []byte `xml:",chardata"` Comment []byte `xml:",comment"` } type Book struct { XMLName struct{} `xml:"book"` Title string `xml:",chardata"` } type Event struct { XMLName struct{} `xml:"event"` Year int `xml:",chardata"` } type Movie struct { XMLName struct{} `xml:"movie"` Length uint `xml:",chardata"` } type Pi struct { XMLName struct{} `xml:"pi"` Approximation float32 `xml:",chardata"` } type Universe struct { XMLName struct{} `xml:"universe"` Visible float64 `xml:",chardata"` } type Particle struct { XMLName struct{} `xml:"particle"` HasMass bool `xml:",chardata"` } type Departure struct { XMLName struct{} `xml:"departure"` When time.Time `xml:",chardata"` } type SecretAgent struct { XMLName struct{} `xml:"agent"` Handle string `xml:"handle,attr"` Identity string Obfuscate string `xml:",innerxml"` } type NestedItems struct { XMLName struct{} `xml:"result"` Items []string `xml:">item"` Item1 []string `xml:"Items>item1"` } type NestedOrder struct { XMLName struct{} `xml:"result"` Field1 string `xml:"parent>c"` Field2 string `xml:"parent>b"` Field3 string `xml:"parent>a"` } type MixedNested struct { XMLName struct{} `xml:"result"` A string `xml:"parent1>a"` B string `xml:"b"` C string `xml:"parent1>parent2>c"` D string `xml:"parent1>d"` } type NilTest struct { A interface{} `xml:"parent1>parent2>a"` B interface{} `xml:"parent1>b"` C interface{} `xml:"parent1>parent2>c"` } type Service struct { XMLName struct{} `xml:"service"` Domain *Domain `xml:"host>domain"` Port *Port `xml:"host>port"` Extra1 interface{} Extra2 interface{} `xml:"host>extra2"` } var nilStruct *Ship type EmbedA struct { EmbedC EmbedB EmbedB FieldA string } type EmbedB struct { FieldB string *EmbedC } type EmbedC struct { FieldA1 string `xml:"FieldA>A1"` FieldA2 string `xml:"FieldA>A2"` FieldB string FieldC string } type NameCasing struct { XMLName struct{} `xml:"casing"` Xy string XY string XyA string `xml:"Xy,attr"` XYA string `xml:"XY,attr"` } type NamePrecedence struct { XMLName Name `xml:"Parent"` FromTag XMLNameWithoutTag `xml:"InTag"` FromNameVal XMLNameWithoutTag FromNameTag XMLNameWithTag InFieldName string } type XMLNameWithTag struct { XMLName Name `xml:"InXMLNameTag"` Value string `xml:",chardata"` } type XMLNameWithoutTag struct { XMLName Name Value string `xml:",chardata"` } type NameInField struct { Foo Name `xml:"ns foo"` } type AttrTest struct { Int int `xml:",attr"` Named int `xml:"int,attr"` Float float64 `xml:",attr"` Uint8 uint8 `xml:",attr"` Bool bool `xml:",attr"` Str string `xml:",attr"` Bytes []byte `xml:",attr"` } type OmitAttrTest struct { Int int `xml:",attr,omitempty"` Named int `xml:"int,attr,omitempty"` Float float64 `xml:",attr,omitempty"` Uint8 uint8 `xml:",attr,omitempty"` Bool bool `xml:",attr,omitempty"` Str string `xml:",attr,omitempty"` Bytes []byte `xml:",attr,omitempty"` } type OmitFieldTest struct { Int int `xml:",omitempty"` Named int `xml:"int,omitempty"` Float float64 `xml:",omitempty"` Uint8 uint8 `xml:",omitempty"` Bool bool `xml:",omitempty"` Str string `xml:",omitempty"` Bytes []byte `xml:",omitempty"` Ptr *PresenceTest `xml:",omitempty"` } type AnyTest struct { XMLName struct{} `xml:"a"` Nested string `xml:"nested>value"` AnyField AnyHolder `xml:",any"` } type AnyOmitTest struct { XMLName struct{} `xml:"a"` Nested string `xml:"nested>value"` AnyField *AnyHolder `xml:",any,omitempty"` } type AnySliceTest struct { XMLName struct{} `xml:"a"` Nested string `xml:"nested>value"` AnyField []AnyHolder `xml:",any"` } type AnyHolder struct { XMLName Name XML string `xml:",innerxml"` } type RecurseA struct { A string B *RecurseB } type RecurseB struct { A *RecurseA B string } type PresenceTest struct { Exists *struct{} } type IgnoreTest struct { PublicSecret string `xml:"-"` } type MyBytes []byte type Data struct { Bytes []byte Attr []byte `xml:",attr"` Custom MyBytes } type Plain struct { V interface{} } type MyInt int type EmbedInt struct { MyInt } type Strings struct { X []string `xml:"A>B,omitempty"` } type PointerFieldsTest struct { XMLName Name `xml:"dummy"` Name *string `xml:"name,attr"` Age *uint `xml:"age,attr"` Empty *string `xml:"empty,attr"` Contents *string `xml:",chardata"` } type ChardataEmptyTest struct { XMLName Name `xml:"test"` Contents *string `xml:",chardata"` } type MyMarshalerTest struct { } var _ Marshaler = (*MyMarshalerTest)(nil) func (m *MyMarshalerTest) MarshalXML(e *Encoder, start StartElement) error { e.EncodeToken(start) e.EncodeToken(CharData([]byte("hello world"))) e.EncodeToken(EndElement{start.Name}) return nil } type MyMarshalerAttrTest struct { } var _ MarshalerAttr = (*MyMarshalerAttrTest)(nil) func (m *MyMarshalerAttrTest) MarshalXMLAttr(name Name) (Attr, error) { return Attr{name, "hello world"}, nil } type MarshalerStruct struct { Foo MyMarshalerAttrTest `xml:",attr"` } type InnerStruct struct { XMLName Name `xml:"testns outer"` } type OuterStruct struct { InnerStruct IntAttr int `xml:"int,attr"` } type OuterNamedStruct struct { InnerStruct XMLName Name `xml:"outerns test"` IntAttr int `xml:"int,attr"` } type OuterNamedOrderedStruct struct { XMLName Name `xml:"outerns test"` InnerStruct IntAttr int `xml:"int,attr"` } type OuterOuterStruct struct { OuterStruct } func ifaceptr(x interface{}) interface{} { return &x } var ( nameAttr = "Sarah" ageAttr = uint(12) contentsAttr = "lorem ipsum" ) // Unless explicitly stated as such (or *Plain), all of the // tests below are two-way tests. When introducing new tests, // please try to make them two-way as well to ensure that // marshalling and unmarshalling are as symmetrical as feasible. var marshalTests = []struct { Value interface{} ExpectXML string MarshalOnly bool UnmarshalOnly bool }{ // Test nil marshals to nothing {Value: nil, ExpectXML: ``, MarshalOnly: true}, {Value: nilStruct, ExpectXML: ``, MarshalOnly: true}, // Test value types {Value: &Plain{true}, ExpectXML: `true`}, {Value: &Plain{false}, ExpectXML: `false`}, {Value: &Plain{int(42)}, ExpectXML: `42`}, {Value: &Plain{int8(42)}, ExpectXML: `42`}, {Value: &Plain{int16(42)}, ExpectXML: `42`}, {Value: &Plain{int32(42)}, ExpectXML: `42`}, {Value: &Plain{uint(42)}, ExpectXML: `42`}, {Value: &Plain{uint8(42)}, ExpectXML: `42`}, {Value: &Plain{uint16(42)}, ExpectXML: `42`}, {Value: &Plain{uint32(42)}, ExpectXML: `42`}, {Value: &Plain{float32(1.25)}, ExpectXML: `1.25`}, {Value: &Plain{float64(1.25)}, ExpectXML: `1.25`}, {Value: &Plain{uintptr(0xFFDD)}, ExpectXML: `65501`}, {Value: &Plain{"gopher"}, ExpectXML: `gopher`}, {Value: &Plain{[]byte("gopher")}, ExpectXML: `gopher`}, {Value: &Plain{""}, ExpectXML: `</>`}, {Value: &Plain{[]byte("")}, ExpectXML: `</>`}, {Value: &Plain{[3]byte{'<', '/', '>'}}, ExpectXML: `</>`}, {Value: &Plain{NamedType("potato")}, ExpectXML: `potato`}, {Value: &Plain{[]int{1, 2, 3}}, ExpectXML: `123`}, {Value: &Plain{[3]int{1, 2, 3}}, ExpectXML: `123`}, {Value: ifaceptr(true), MarshalOnly: true, ExpectXML: `true`}, // Test time. { Value: &Plain{time.Unix(1e9, 123456789).UTC()}, ExpectXML: `2001-09-09T01:46:40.123456789Z`, }, // A pointer to struct{} may be used to test for an element's presence. { Value: &PresenceTest{new(struct{})}, ExpectXML: ``, }, { Value: &PresenceTest{}, ExpectXML: ``, }, // A pointer to struct{} may be used to test for an element's presence. { Value: &PresenceTest{new(struct{})}, ExpectXML: ``, }, { Value: &PresenceTest{}, ExpectXML: ``, }, // A []byte field is only nil if the element was not found. { Value: &Data{}, ExpectXML: ``, UnmarshalOnly: true, }, { Value: &Data{Bytes: []byte{}, Custom: MyBytes{}, Attr: []byte{}}, ExpectXML: ``, UnmarshalOnly: true, }, // Check that []byte works, including named []byte types. { Value: &Data{Bytes: []byte("ab"), Custom: MyBytes("cd"), Attr: []byte{'v'}}, ExpectXML: `abcd`, }, // Test innerxml { Value: &SecretAgent{ Handle: "007", Identity: "James Bond", Obfuscate: "", }, ExpectXML: `James Bond`, MarshalOnly: true, }, { Value: &SecretAgent{ Handle: "007", Identity: "James Bond", Obfuscate: "James Bond", }, ExpectXML: `James Bond`, UnmarshalOnly: true, }, // Test structs {Value: &Port{Type: "ssl", Number: "443"}, ExpectXML: `443`}, {Value: &Port{Number: "443"}, ExpectXML: `443`}, {Value: &Port{Type: ""}, ExpectXML: ``}, {Value: &Port{Number: "443", Comment: "https"}, ExpectXML: `443`}, {Value: &Port{Number: "443", Comment: "add space-"}, ExpectXML: `443`, MarshalOnly: true}, {Value: &Domain{Name: []byte("google.com&friends")}, ExpectXML: `google.com&friends`}, {Value: &Domain{Name: []byte("google.com"), Comment: []byte(" &friends ")}, ExpectXML: `google.com`}, {Value: &Book{Title: "Pride & Prejudice"}, ExpectXML: `Pride & Prejudice`}, {Value: &Event{Year: -3114}, ExpectXML: `-3114`}, {Value: &Movie{Length: 13440}, ExpectXML: `13440`}, {Value: &Pi{Approximation: 3.14159265}, ExpectXML: `3.1415927`}, {Value: &Universe{Visible: 9.3e13}, ExpectXML: `9.3e+13`}, {Value: &Particle{HasMass: true}, ExpectXML: `true`}, {Value: &Departure{When: ParseTime("2013-01-09T00:15:00-09:00")}, ExpectXML: `2013-01-09T00:15:00-09:00`}, {Value: atomValue, ExpectXML: atomXml}, { Value: &Ship{ Name: "Heart of Gold", Pilot: "Computer", Age: 1, Drive: ImprobabilityDrive, Passenger: []*Passenger{ { Name: []string{"Zaphod", "Beeblebrox"}, Weight: 7.25, }, { Name: []string{"Trisha", "McMillen"}, Weight: 5.5, }, { Name: []string{"Ford", "Prefect"}, Weight: 7, }, { Name: []string{"Arthur", "Dent"}, Weight: 6.75, }, }, }, ExpectXML: `` + `` + strconv.Itoa(int(ImprobabilityDrive)) + `` + `1` + `` + `Zaphod` + `Beeblebrox` + `7.25` + `` + `` + `Trisha` + `McMillen` + `5.5` + `` + `` + `Ford` + `Prefect` + `7` + `` + `` + `Arthur` + `Dent` + `6.75` + `` + ``, }, // Test a>b { Value: &NestedItems{Items: nil, Item1: nil}, ExpectXML: `` + `` + `` + ``, }, { Value: &NestedItems{Items: []string{}, Item1: []string{}}, ExpectXML: `` + `` + `` + ``, MarshalOnly: true, }, { Value: &NestedItems{Items: nil, Item1: []string{"A"}}, ExpectXML: `` + `` + `A` + `` + ``, }, { Value: &NestedItems{Items: []string{"A", "B"}, Item1: nil}, ExpectXML: `` + `` + `A` + `B` + `` + ``, }, { Value: &NestedItems{Items: []string{"A", "B"}, Item1: []string{"C"}}, ExpectXML: `` + `` + `A` + `B` + `C` + `` + ``, }, { Value: &NestedOrder{Field1: "C", Field2: "B", Field3: "A"}, ExpectXML: `` + `` + `C` + `B` + `A` + `` + ``, }, { Value: &NilTest{A: "A", B: nil, C: "C"}, ExpectXML: `` + `` + `A` + `C` + `` + ``, MarshalOnly: true, // Uses interface{} }, { Value: &MixedNested{A: "A", B: "B", C: "C", D: "D"}, ExpectXML: `` + `A` + `B` + `` + `C` + `D` + `` + ``, }, { Value: &Service{Port: &Port{Number: "80"}}, ExpectXML: `80`, }, { Value: &Service{}, ExpectXML: ``, }, { Value: &Service{Port: &Port{Number: "80"}, Extra1: "A", Extra2: "B"}, ExpectXML: `` + `80` + `A` + `B` + ``, MarshalOnly: true, }, { Value: &Service{Port: &Port{Number: "80"}, Extra2: "example"}, ExpectXML: `` + `80` + `example` + ``, MarshalOnly: true, }, // Test struct embedding { Value: &EmbedA{ EmbedC: EmbedC{ FieldA1: "", // Shadowed by A.A FieldA2: "", // Shadowed by A.A FieldB: "A.C.B", FieldC: "A.C.C", }, EmbedB: EmbedB{ FieldB: "A.B.B", EmbedC: &EmbedC{ FieldA1: "A.B.C.A1", FieldA2: "A.B.C.A2", FieldB: "", // Shadowed by A.B.B FieldC: "A.B.C.C", }, }, FieldA: "A.A", }, ExpectXML: `` + `A.C.B` + `A.C.C` + `` + `A.B.B` + `` + `A.B.C.A1` + `A.B.C.A2` + `` + `A.B.C.C` + `` + `A.A` + ``, }, // Test that name casing matters { Value: &NameCasing{Xy: "mixed", XY: "upper", XyA: "mixedA", XYA: "upperA"}, ExpectXML: `mixedupper`, }, // Test the order in which the XML element name is chosen { Value: &NamePrecedence{ FromTag: XMLNameWithoutTag{Value: "A"}, FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "InXMLName"}, Value: "B"}, FromNameTag: XMLNameWithTag{Value: "C"}, InFieldName: "D", }, ExpectXML: `` + `A` + `B` + `C` + `D` + ``, MarshalOnly: true, }, { Value: &NamePrecedence{ XMLName: Name{Local: "Parent"}, FromTag: XMLNameWithoutTag{XMLName: Name{Local: "InTag"}, Value: "A"}, FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "FromNameVal"}, Value: "B"}, FromNameTag: XMLNameWithTag{XMLName: Name{Local: "InXMLNameTag"}, Value: "C"}, InFieldName: "D", }, ExpectXML: `` + `A` + `B` + `C` + `D` + ``, UnmarshalOnly: true, }, // xml.Name works in a plain field as well. { Value: &NameInField{Name{Space: "ns", Local: "foo"}}, ExpectXML: ``, }, { Value: &NameInField{Name{Space: "ns", Local: "foo"}}, ExpectXML: ``, UnmarshalOnly: true, }, // Marshaling zero xml.Name uses the tag or field name. { Value: &NameInField{}, ExpectXML: ``, MarshalOnly: true, }, // Test attributes { Value: &AttrTest{ Int: 8, Named: 9, Float: 23.5, Uint8: 255, Bool: true, Str: "str", Bytes: []byte("byt"), }, ExpectXML: ``, }, { Value: &AttrTest{Bytes: []byte{}}, ExpectXML: ``, }, { Value: &OmitAttrTest{ Int: 8, Named: 9, Float: 23.5, Uint8: 255, Bool: true, Str: "str", Bytes: []byte("byt"), }, ExpectXML: ``, }, { Value: &OmitAttrTest{}, ExpectXML: ``, }, // pointer fields { Value: &PointerFieldsTest{Name: &nameAttr, Age: &ageAttr, Contents: &contentsAttr}, ExpectXML: `lorem ipsum`, MarshalOnly: true, }, // empty chardata pointer field { Value: &ChardataEmptyTest{}, ExpectXML: ``, MarshalOnly: true, }, // omitempty on fields { Value: &OmitFieldTest{ Int: 8, Named: 9, Float: 23.5, Uint8: 255, Bool: true, Str: "str", Bytes: []byte("byt"), Ptr: &PresenceTest{}, }, ExpectXML: `` + `8` + `9` + `23.5` + `255` + `true` + `str` + `byt` + `` + ``, }, { Value: &OmitFieldTest{}, ExpectXML: ``, }, // Test ",any" { ExpectXML: `knownunknown`, Value: &AnyTest{ Nested: "known", AnyField: AnyHolder{ XMLName: Name{Local: "other"}, XML: "unknown", }, }, }, { Value: &AnyTest{Nested: "known", AnyField: AnyHolder{ XML: "", XMLName: Name{Local: "AnyField"}, }, }, ExpectXML: `known`, }, { ExpectXML: `b`, Value: &AnyOmitTest{ Nested: "b", }, }, { ExpectXML: `bei`, Value: &AnySliceTest{ Nested: "b", AnyField: []AnyHolder{ { XMLName: Name{Local: "c"}, XML: "e", }, { XMLName: Name{Space: "f", Local: "g"}, XML: "i", }, }, }, }, { ExpectXML: `b`, Value: &AnySliceTest{ Nested: "b", }, }, // Test recursive types. { Value: &RecurseA{ A: "a1", B: &RecurseB{ A: &RecurseA{"a2", nil}, B: "b1", }, }, ExpectXML: `a1a2b1`, }, // Test ignoring fields via "-" tag { ExpectXML: ``, Value: &IgnoreTest{}, }, { ExpectXML: ``, Value: &IgnoreTest{PublicSecret: "can't tell"}, MarshalOnly: true, }, { ExpectXML: `ignore me`, Value: &IgnoreTest{}, UnmarshalOnly: true, }, // Test escaping. { ExpectXML: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`, Value: &AnyTest{ Nested: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`, AnyField: AnyHolder{XMLName: Name{Local: "empty"}}, }, }, { ExpectXML: `newline: ; cr: ; tab: ;`, Value: &AnyTest{ Nested: "newline: \n; cr: \r; tab: \t;", AnyField: AnyHolder{XMLName: Name{Local: "AnyField"}}, }, }, { ExpectXML: "1\r2\r\n3\n\r4\n5", Value: &AnyTest{ Nested: "1\n2\n3\n\n4\n5", }, UnmarshalOnly: true, }, { ExpectXML: `42`, Value: &EmbedInt{ MyInt: 42, }, }, // Test omitempty with parent chain; see golang.org/issue/4168. { ExpectXML: ``, Value: &Strings{}, }, // Custom marshalers. { ExpectXML: `hello world`, Value: &MyMarshalerTest{}, }, { ExpectXML: ``, Value: &MarshalerStruct{}, }, { ExpectXML: ``, Value: &OuterStruct{IntAttr: 10}, }, { ExpectXML: ``, Value: &OuterNamedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10}, }, { ExpectXML: ``, Value: &OuterNamedOrderedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10}, }, { ExpectXML: ``, Value: &OuterOuterStruct{OuterStruct{IntAttr: 10}}, }, } func TestMarshal(t *testing.T) { for idx, test := range marshalTests { if test.UnmarshalOnly { continue } data, err := Marshal(test.Value) if err != nil { t.Errorf("#%d: Error: %s", idx, err) continue } if got, want := string(data), test.ExpectXML; got != want { if strings.Contains(want, "\n") { t.Errorf("#%d: marshal(%#v):\nHAVE:\n%s\nWANT:\n%s", idx, test.Value, got, want) } else { t.Errorf("#%d: marshal(%#v):\nhave %#q\nwant %#q", idx, test.Value, got, want) } } } } type AttrParent struct { X string `xml:"X>Y,attr"` } type BadAttr struct { Name []string `xml:"name,attr"` } var marshalErrorTests = []struct { Value interface{} Err string Kind reflect.Kind }{ { Value: make(chan bool), Err: "xml: unsupported type: chan bool", Kind: reflect.Chan, }, { Value: map[string]string{ "question": "What do you get when you multiply six by nine?", "answer": "42", }, Err: "xml: unsupported type: map[string]string", Kind: reflect.Map, }, { Value: map[*Ship]bool{nil: false}, Err: "xml: unsupported type: map[*xml.Ship]bool", Kind: reflect.Map, }, { Value: &Domain{Comment: []byte("f--bar")}, Err: `xml: comments must not contain "--"`, }, // Reject parent chain with attr, never worked; see golang.org/issue/5033. { Value: &AttrParent{}, Err: `xml: X>Y chain not valid with attr flag`, }, { Value: BadAttr{[]string{"X", "Y"}}, Err: `xml: unsupported type: []string`, }, } var marshalIndentTests = []struct { Value interface{} Prefix string Indent string ExpectXML string }{ { Value: &SecretAgent{ Handle: "007", Identity: "James Bond", Obfuscate: "", }, Prefix: "", Indent: "\t", ExpectXML: fmt.Sprintf("\n\tJames Bond\n"), }, } func TestMarshalErrors(t *testing.T) { for idx, test := range marshalErrorTests { data, err := Marshal(test.Value) if err == nil { t.Errorf("#%d: marshal(%#v) = [success] %q, want error %v", idx, test.Value, data, test.Err) continue } if err.Error() != test.Err { t.Errorf("#%d: marshal(%#v) = [error] %v, want %v", idx, test.Value, err, test.Err) } if test.Kind != reflect.Invalid { if kind := err.(*UnsupportedTypeError).Type.Kind(); kind != test.Kind { t.Errorf("#%d: marshal(%#v) = [error kind] %s, want %s", idx, test.Value, kind, test.Kind) } } } } // Do invertibility testing on the various structures that we test func TestUnmarshal(t *testing.T) { for i, test := range marshalTests { if test.MarshalOnly { continue } if _, ok := test.Value.(*Plain); ok { continue } vt := reflect.TypeOf(test.Value) dest := reflect.New(vt.Elem()).Interface() err := Unmarshal([]byte(test.ExpectXML), dest) switch fix := dest.(type) { case *Feed: fix.Author.InnerXML = "" for i := range fix.Entry { fix.Entry[i].Author.InnerXML = "" } } if err != nil { t.Errorf("#%d: unexpected error: %#v", i, err) } else if got, want := dest, test.Value; !reflect.DeepEqual(got, want) { t.Errorf("#%d: unmarshal(%q):\nhave %#v\nwant %#v", i, test.ExpectXML, got, want) } } } func TestMarshalIndent(t *testing.T) { for i, test := range marshalIndentTests { data, err := MarshalIndent(test.Value, test.Prefix, test.Indent) if err != nil { t.Errorf("#%d: Error: %s", i, err) continue } if got, want := string(data), test.ExpectXML; got != want { t.Errorf("#%d: MarshalIndent:\nGot:%s\nWant:\n%s", i, got, want) } } } type limitedBytesWriter struct { w io.Writer remain int // until writes fail } func (lw *limitedBytesWriter) Write(p []byte) (n int, err error) { if lw.remain <= 0 { println("error") return 0, errors.New("write limit hit") } if len(p) > lw.remain { p = p[:lw.remain] n, _ = lw.w.Write(p) lw.remain = 0 return n, errors.New("write limit hit") } n, err = lw.w.Write(p) lw.remain -= n return n, err } func TestMarshalWriteErrors(t *testing.T) { var buf bytes.Buffer const writeCap = 1024 w := &limitedBytesWriter{&buf, writeCap} enc := NewEncoder(w) var err error var i int const n = 4000 for i = 1; i <= n; i++ { err = enc.Encode(&Passenger{ Name: []string{"Alice", "Bob"}, Weight: 5, }) if err != nil { break } } if err == nil { t.Error("expected an error") } if i == n { t.Errorf("expected to fail before the end") } if buf.Len() != writeCap { t.Errorf("buf.Len() = %d; want %d", buf.Len(), writeCap) } } func TestMarshalWriteIOErrors(t *testing.T) { enc := NewEncoder(errWriter{}) expectErr := "unwritable" err := enc.Encode(&Passenger{}) if err == nil || err.Error() != expectErr { t.Errorf("EscapeTest = [error] %v, want %v", err, expectErr) } } func TestMarshalFlush(t *testing.T) { var buf bytes.Buffer enc := NewEncoder(&buf) if err := enc.EncodeToken(CharData("hello world")); err != nil { t.Fatalf("enc.EncodeToken: %v", err) } if buf.Len() > 0 { t.Fatalf("enc.EncodeToken caused actual write: %q", buf.Bytes()) } if err := enc.Flush(); err != nil { t.Fatalf("enc.Flush: %v", err) } if buf.String() != "hello world" { t.Fatalf("after enc.Flush, buf.String() = %q, want %q", buf.String(), "hello world") } } func BenchmarkMarshal(b *testing.B) { for i := 0; i < b.N; i++ { Marshal(atomValue) } } func BenchmarkUnmarshal(b *testing.B) { xml := []byte(atomXml) for i := 0; i < b.N; i++ { Unmarshal(xml, &Feed{}) } } // golang.org/issue/6556 func TestStructPointerMarshal(t *testing.T) { type A struct { XMLName string `xml:"a"` B []interface{} } type C struct { XMLName Name Value string `xml:"value"` } a := new(A) a.B = append(a.B, &C{ XMLName: Name{Local: "c"}, Value: "x", }) b, err := Marshal(a) if err != nil { t.Fatal(err) } if x := string(b); x != "x" { t.Fatal(x) } var v A err = Unmarshal(b, &v) if err != nil { t.Fatal(err) } } var encodeTokenTests = []struct { tok Token want string ok bool }{ {StartElement{Name{"space", "local"}, nil}, "", true}, {StartElement{Name{"space", ""}, nil}, "", false}, {EndElement{Name{"space", ""}}, "", false}, {CharData("foo"), "foo", true}, {Comment("foo"), "", true}, {Comment("foo-->"), "", false}, {ProcInst{"Target", []byte("Instruction")}, "", true}, {ProcInst{"", []byte("Instruction")}, "", false}, {ProcInst{"Target", []byte("Instruction?>")}, "", false}, {Directive("foo"), "", true}, {Directive("foo>"), "", false}, } func TestEncodeToken(t *testing.T) { for _, tt := range encodeTokenTests { var buf bytes.Buffer enc := NewEncoder(&buf) err := enc.EncodeToken(tt.tok) switch { case !tt.ok && err == nil: t.Errorf("enc.EncodeToken(%#v): expected error; got none", tt.tok) case tt.ok && err != nil: t.Fatalf("enc.EncodeToken: %v", err) case !tt.ok && err != nil: // expected error, got one } if err := enc.Flush(); err != nil { t.Fatalf("enc.EncodeToken: %v", err) } if got := buf.String(); got != tt.want { t.Errorf("enc.EncodeToken = %s; want: %s", got, tt.want) } } } func TestProcInstEncodeToken(t *testing.T) { var buf bytes.Buffer enc := NewEncoder(&buf) if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err != nil { t.Fatalf("enc.EncodeToken: expected to be able to encode xml target ProcInst as first token, %s", err) } if err := enc.EncodeToken(ProcInst{"Target", []byte("Instruction")}); err != nil { t.Fatalf("enc.EncodeToken: expected to be able to add non-xml target ProcInst") } if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err == nil { t.Fatalf("enc.EncodeToken: expected to not be allowed to encode xml target ProcInst when not first token") } } func TestDecodeEncode(t *testing.T) { var in, out bytes.Buffer in.WriteString(` `) dec := NewDecoder(&in) enc := NewEncoder(&out) for tok, err := dec.Token(); err == nil; tok, err = dec.Token() { err = enc.EncodeToken(tok) if err != nil { t.Fatalf("enc.EncodeToken: Unable to encode token (%#v), %v", tok, err) } } } govmomi-0.15.0/vim25/xml/read.go000066400000000000000000000540321312205533500162610ustar00rootroot00000000000000// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import ( "bytes" "encoding" "errors" "fmt" "reflect" "strconv" "strings" ) // BUG(rsc): Mapping between XML elements and data structures is inherently flawed: // an XML element is an order-dependent collection of anonymous // values, while a data structure is an order-independent collection // of named values. // See package json for a textual representation more suitable // to data structures. // Unmarshal parses the XML-encoded data and stores the result in // the value pointed to by v, which must be an arbitrary struct, // slice, or string. Well-formed data that does not fit into v is // discarded. // // Because Unmarshal uses the reflect package, it can only assign // to exported (upper case) fields. Unmarshal uses a case-sensitive // comparison to match XML element names to tag values and struct // field names. // // Unmarshal maps an XML element to a struct using the following rules. // In the rules, the tag of a field refers to the value associated with the // key 'xml' in the struct field's tag (see the example above). // // * If the struct has a field of type []byte or string with tag // ",innerxml", Unmarshal accumulates the raw XML nested inside the // element in that field. The rest of the rules still apply. // // * If the struct has a field named XMLName of type xml.Name, // Unmarshal records the element name in that field. // // * If the XMLName field has an associated tag of the form // "name" or "namespace-URL name", the XML element must have // the given name (and, optionally, name space) or else Unmarshal // returns an error. // // * If the XML element has an attribute whose name matches a // struct field name with an associated tag containing ",attr" or // the explicit name in a struct field tag of the form "name,attr", // Unmarshal records the attribute value in that field. // // * If the XML element contains character data, that data is // accumulated in the first struct field that has tag ",chardata". // The struct field may have type []byte or string. // If there is no such field, the character data is discarded. // // * If the XML element contains comments, they are accumulated in // the first struct field that has tag ",comment". The struct // field may have type []byte or string. If there is no such // field, the comments are discarded. // // * If the XML element contains a sub-element whose name matches // the prefix of a tag formatted as "a" or "a>b>c", unmarshal // will descend into the XML structure looking for elements with the // given names, and will map the innermost elements to that struct // field. A tag starting with ">" is equivalent to one starting // with the field name followed by ">". // // * If the XML element contains a sub-element whose name matches // a struct field's XMLName tag and the struct field has no // explicit name tag as per the previous rule, unmarshal maps // the sub-element to that struct field. // // * If the XML element contains a sub-element whose name matches a // field without any mode flags (",attr", ",chardata", etc), Unmarshal // maps the sub-element to that struct field. // // * If the XML element contains a sub-element that hasn't matched any // of the above rules and the struct has a field with tag ",any", // unmarshal maps the sub-element to that struct field. // // * An anonymous struct field is handled as if the fields of its // value were part of the outer struct. // // * A struct field with tag "-" is never unmarshalled into. // // Unmarshal maps an XML element to a string or []byte by saving the // concatenation of that element's character data in the string or // []byte. The saved []byte is never nil. // // Unmarshal maps an attribute value to a string or []byte by saving // the value in the string or slice. // // Unmarshal maps an XML element to a slice by extending the length of // the slice and mapping the element to the newly created value. // // Unmarshal maps an XML element or attribute value to a bool by // setting it to the boolean value represented by the string. // // Unmarshal maps an XML element or attribute value to an integer or // floating-point field by setting the field to the result of // interpreting the string value in decimal. There is no check for // overflow. // // Unmarshal maps an XML element to an xml.Name by recording the // element name. // // Unmarshal maps an XML element to a pointer by setting the pointer // to a freshly allocated value and then mapping the element to that value. // func Unmarshal(data []byte, v interface{}) error { return NewDecoder(bytes.NewReader(data)).Decode(v) } // Decode works like xml.Unmarshal, except it reads the decoder // stream to find the start element. func (d *Decoder) Decode(v interface{}) error { return d.DecodeElement(v, nil) } // DecodeElement works like xml.Unmarshal except that it takes // a pointer to the start XML element to decode into v. // It is useful when a client reads some raw XML tokens itself // but also wants to defer to Unmarshal for some elements. func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error { val := reflect.ValueOf(v) if val.Kind() != reflect.Ptr { return errors.New("non-pointer passed to Unmarshal") } return d.unmarshal(val.Elem(), start) } // An UnmarshalError represents an error in the unmarshalling process. type UnmarshalError string func (e UnmarshalError) Error() string { return string(e) } // Unmarshaler is the interface implemented by objects that can unmarshal // an XML element description of themselves. // // UnmarshalXML decodes a single XML element // beginning with the given start element. // If it returns an error, the outer call to Unmarshal stops and // returns that error. // UnmarshalXML must consume exactly one XML element. // One common implementation strategy is to unmarshal into // a separate value with a layout matching the expected XML // using d.DecodeElement, and then to copy the data from // that value into the receiver. // Another common strategy is to use d.Token to process the // XML object one token at a time. // UnmarshalXML may not use d.RawToken. type Unmarshaler interface { UnmarshalXML(d *Decoder, start StartElement) error } // UnmarshalerAttr is the interface implemented by objects that can unmarshal // an XML attribute description of themselves. // // UnmarshalXMLAttr decodes a single XML attribute. // If it returns an error, the outer call to Unmarshal stops and // returns that error. // UnmarshalXMLAttr is used only for struct fields with the // "attr" option in the field tag. type UnmarshalerAttr interface { UnmarshalXMLAttr(attr Attr) error } // receiverType returns the receiver type to use in an expression like "%s.MethodName". func receiverType(val interface{}) string { t := reflect.TypeOf(val) if t.Name() != "" { return t.String() } return "(" + t.String() + ")" } // unmarshalInterface unmarshals a single XML element into val. // start is the opening tag of the element. func (p *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error { // Record that decoder must stop at end tag corresponding to start. p.pushEOF() p.unmarshalDepth++ err := val.UnmarshalXML(p, *start) p.unmarshalDepth-- if err != nil { p.popEOF() return err } if !p.popEOF() { return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local) } return nil } // unmarshalTextInterface unmarshals a single XML element into val. // The chardata contained in the element (but not its children) // is passed to the text unmarshaler. func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler, start *StartElement) error { var buf []byte depth := 1 for depth > 0 { t, err := p.Token() if err != nil { return err } switch t := t.(type) { case CharData: if depth == 1 { buf = append(buf, t...) } case StartElement: depth++ case EndElement: depth-- } } return val.UnmarshalText(buf) } // unmarshalAttr unmarshals a single XML attribute into val. func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error { if val.Kind() == reflect.Ptr { if val.IsNil() { val.Set(reflect.New(val.Type().Elem())) } val = val.Elem() } if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) { // This is an unmarshaler with a non-pointer receiver, // so it's likely to be incorrect, but we do what we're told. return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) { return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) } } // Not an UnmarshalerAttr; try encoding.TextUnmarshaler. if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { // This is an unmarshaler with a non-pointer receiver, // so it's likely to be incorrect, but we do what we're told. return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) } } copyValue(val, []byte(attr.Value)) return nil } var ( unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem() textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() ) // Find reflect.Type for an element's type attribute. func (p *Decoder) typeForElement(val reflect.Value, start *StartElement) reflect.Type { t := "" for i, a := range start.Attr { if a.Name == xmlSchemaInstance || a.Name == xsiType { t = a.Value // HACK: ensure xsi:type is last in the list to avoid using that value for // a "type" attribute, such as ManagedObjectReference.Type for example. // Note that xsi:type is already the last attribute in VC/ESX responses. // This is only an issue with govmomi simulator generated responses. // Proper fix will require finding a few needles in this xml package haystack. // Note: govmomi uses xmlSchemaInstance, other clients (e.g. rbvmomi) use xsiType. // They are the same thing to XML parsers, but not to this hack here. x := len(start.Attr) - 1 if i != x { start.Attr[i] = start.Attr[x] start.Attr[x] = a } break } } if t == "" { // No type attribute; fall back to looking up type by interface name. t = val.Type().Name() } // Maybe the type is a basic xsd:* type. typ := stringToType(t) if typ != nil { return typ } // Maybe the type is a custom type. if p.TypeFunc != nil { if typ, ok := p.TypeFunc(t); ok { return typ } } return nil } // Unmarshal a single XML element into val. func (p *Decoder) unmarshal(val reflect.Value, start *StartElement) error { // Find start element if we need it. if start == nil { for { tok, err := p.Token() if err != nil { return err } if t, ok := tok.(StartElement); ok { start = &t break } } } // Try to figure out type for empty interface values. if val.Kind() == reflect.Interface && val.IsNil() { typ := p.typeForElement(val, start) if typ != nil { pval := reflect.New(typ).Elem() err := p.unmarshal(pval, start) if err != nil { return err } for i := 0; i < 2; i++ { if typ.Implements(val.Type()) { val.Set(pval) return nil } typ = reflect.PtrTo(typ) pval = pval.Addr() } val.Set(pval) return nil } } // Load value from interface, but only if the result will be // usefully addressable. if val.Kind() == reflect.Interface && !val.IsNil() { e := val.Elem() if e.Kind() == reflect.Ptr && !e.IsNil() { val = e } } if val.Kind() == reflect.Ptr { if val.IsNil() { val.Set(reflect.New(val.Type().Elem())) } val = val.Elem() } if val.CanInterface() && val.Type().Implements(unmarshalerType) { // This is an unmarshaler with a non-pointer receiver, // so it's likely to be incorrect, but we do what we're told. return p.unmarshalInterface(val.Interface().(Unmarshaler), start) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(unmarshalerType) { return p.unmarshalInterface(pv.Interface().(Unmarshaler), start) } } if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler), start) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler), start) } } var ( data []byte saveData reflect.Value comment []byte saveComment reflect.Value saveXML reflect.Value saveXMLIndex int saveXMLData []byte saveAny reflect.Value sv reflect.Value tinfo *typeInfo err error ) switch v := val; v.Kind() { default: return errors.New("unknown type " + v.Type().String()) case reflect.Interface: // TODO: For now, simply ignore the field. In the near // future we may choose to unmarshal the start // element on it, if not nil. return p.Skip() case reflect.Slice: typ := v.Type() if typ.Elem().Kind() == reflect.Uint8 { // []byte saveData = v break } // Slice of element values. // Grow slice. n := v.Len() if n >= v.Cap() { ncap := 2 * n if ncap < 4 { ncap = 4 } new := reflect.MakeSlice(typ, n, ncap) reflect.Copy(new, v) v.Set(new) } v.SetLen(n + 1) // Recur to read element into slice. if err := p.unmarshal(v.Index(n), start); err != nil { v.SetLen(n) return err } return nil case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String: saveData = v case reflect.Struct: typ := v.Type() if typ == nameType { v.Set(reflect.ValueOf(start.Name)) break } sv = v tinfo, err = getTypeInfo(typ) if err != nil { return err } // Validate and assign element name. if tinfo.xmlname != nil { finfo := tinfo.xmlname if finfo.name != "" && finfo.name != start.Name.Local { return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">") } if finfo.xmlns != "" && finfo.xmlns != start.Name.Space { e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have " if start.Name.Space == "" { e += "no name space" } else { e += start.Name.Space } return UnmarshalError(e) } fv := finfo.value(sv) if _, ok := fv.Interface().(Name); ok { fv.Set(reflect.ValueOf(start.Name)) } } // Assign attributes. // Also, determine whether we need to save character data or comments. for i := range tinfo.fields { finfo := &tinfo.fields[i] switch finfo.flags & fMode { case fAttr: strv := finfo.value(sv) // Look for attribute. for _, a := range start.Attr { if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) { if err := p.unmarshalAttr(strv, a); err != nil { return err } break } } case fCharData: if !saveData.IsValid() { saveData = finfo.value(sv) } case fComment: if !saveComment.IsValid() { saveComment = finfo.value(sv) } case fAny, fAny | fElement: if !saveAny.IsValid() { saveAny = finfo.value(sv) } case fInnerXml: if !saveXML.IsValid() { saveXML = finfo.value(sv) if p.saved == nil { saveXMLIndex = 0 p.saved = new(bytes.Buffer) } else { saveXMLIndex = p.savedOffset() } } } } } // Find end element. // Process sub-elements along the way. Loop: for { var savedOffset int if saveXML.IsValid() { savedOffset = p.savedOffset() } tok, err := p.Token() if err != nil { return err } switch t := tok.(type) { case StartElement: consumed := false if sv.IsValid() { consumed, err = p.unmarshalPath(tinfo, sv, nil, &t) if err != nil { return err } if !consumed && saveAny.IsValid() { consumed = true if err := p.unmarshal(saveAny, &t); err != nil { return err } } } if !consumed { if err := p.Skip(); err != nil { return err } } case EndElement: if saveXML.IsValid() { saveXMLData = p.saved.Bytes()[saveXMLIndex:savedOffset] if saveXMLIndex == 0 { p.saved = nil } } break Loop case CharData: if saveData.IsValid() { data = append(data, t...) } case Comment: if saveComment.IsValid() { comment = append(comment, t...) } } } if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) { if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { return err } saveData = reflect.Value{} } if saveData.IsValid() && saveData.CanAddr() { pv := saveData.Addr() if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { return err } saveData = reflect.Value{} } } if err := copyValue(saveData, data); err != nil { return err } switch t := saveComment; t.Kind() { case reflect.String: t.SetString(string(comment)) case reflect.Slice: t.Set(reflect.ValueOf(comment)) } switch t := saveXML; t.Kind() { case reflect.String: t.SetString(string(saveXMLData)) case reflect.Slice: t.Set(reflect.ValueOf(saveXMLData)) } return nil } func copyValue(dst reflect.Value, src []byte) (err error) { dst0 := dst if dst.Kind() == reflect.Ptr { if dst.IsNil() { dst.Set(reflect.New(dst.Type().Elem())) } dst = dst.Elem() } // Save accumulated data. switch dst.Kind() { case reflect.Invalid: // Probably a comment. default: return errors.New("cannot unmarshal into " + dst0.Type().String()) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits()) if err != nil { return err } dst.SetInt(itmp) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: var utmp uint64 if len(src) > 0 && src[0] == '-' { // Negative value for unsigned field. // Assume it was serialized following two's complement. itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits()) if err != nil { return err } // Reinterpret value based on type width. switch dst.Type().Bits() { case 8: utmp = uint64(uint8(itmp)) case 16: utmp = uint64(uint16(itmp)) case 32: utmp = uint64(uint32(itmp)) case 64: utmp = uint64(uint64(itmp)) } } else { utmp, err = strconv.ParseUint(string(src), 10, dst.Type().Bits()) if err != nil { return err } } dst.SetUint(utmp) case reflect.Float32, reflect.Float64: ftmp, err := strconv.ParseFloat(string(src), dst.Type().Bits()) if err != nil { return err } dst.SetFloat(ftmp) case reflect.Bool: value, err := strconv.ParseBool(strings.TrimSpace(string(src))) if err != nil { return err } dst.SetBool(value) case reflect.String: dst.SetString(string(src)) case reflect.Slice: if len(src) == 0 { // non-nil to flag presence src = []byte{} } dst.SetBytes(src) } return nil } // unmarshalPath walks down an XML structure looking for wanted // paths, and calls unmarshal on them. // The consumed result tells whether XML elements have been consumed // from the Decoder until start's matching end element, or if it's // still untouched because start is uninteresting for sv's fields. func (p *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) { recurse := false Loop: for i := range tinfo.fields { finfo := &tinfo.fields[i] if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space { continue } for j := range parents { if parents[j] != finfo.parents[j] { continue Loop } } if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local { // It's a perfect match, unmarshal the field. return true, p.unmarshal(finfo.value(sv), start) } if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local { // It's a prefix for the field. Break and recurse // since it's not ok for one field path to be itself // the prefix for another field path. recurse = true // We can reuse the same slice as long as we // don't try to append to it. parents = finfo.parents[:len(parents)+1] break } } if !recurse { // We have no business with this element. return false, nil } // The element is not a perfect match for any field, but one // or more fields have the path to this element as a parent // prefix. Recurse and attempt to match these. for { var tok Token tok, err = p.Token() if err != nil { return true, err } switch t := tok.(type) { case StartElement: consumed2, err := p.unmarshalPath(tinfo, sv, parents, &t) if err != nil { return true, err } if !consumed2 { if err := p.Skip(); err != nil { return true, err } } case EndElement: return true, nil } } } // Skip reads tokens until it has consumed the end element // matching the most recent start element already consumed. // It recurs if it encounters a start element, so it can be used to // skip nested structures. // It returns nil if it finds an end element matching the start // element; otherwise it returns an error describing the problem. func (d *Decoder) Skip() error { for { tok, err := d.Token() if err != nil { return err } switch tok.(type) { case StartElement: if err := d.Skip(); err != nil { return err } case EndElement: return nil } } } govmomi-0.15.0/vim25/xml/read_test.go000066400000000000000000000521331312205533500173200ustar00rootroot00000000000000// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import ( "io" "reflect" "strings" "testing" "time" ) // Stripped down Atom feed data structures. func TestUnmarshalFeed(t *testing.T) { var f Feed if err := Unmarshal([]byte(atomFeedString), &f); err != nil { t.Fatalf("Unmarshal: %s", err) } if !reflect.DeepEqual(f, atomFeed) { t.Fatalf("have %#v\nwant %#v", f, atomFeed) } } // hget http://codereview.appspot.com/rss/mine/rsc const atomFeedString = ` Code Review - My issueshttp://codereview.appspot.com/rietveld<>rietveld: an attempt at pubsubhubbub 2009-10-04T01:35:58+00:00email-address-removedurn:md5:134d9179c41f806be79b3a5f7877d19a An attempt at adding pubsubhubbub support to Rietveld. http://code.google.com/p/pubsubhubbub http://code.google.com/p/rietveld/issues/detail?id=155 The server side of the protocol is trivial: 1. add a &lt;link rel=&quot;hub&quot; href=&quot;hub-server&quot;&gt; tag to all feeds that will be pubsubhubbubbed. 2. every time one of those feeds changes, tell the hub with a simple POST request. I have tested this by adding debug prints to a local hub server and checking that the server got the right publish requests. I can&#39;t quite get the server to work, but I think the bug is not in my code. I think that the server expects to be able to grab the feed and see the feed&#39;s actual URL in the link rel=&quot;self&quot;, but the default value for that drops the :port from the URL, and I cannot for the life of me figure out how to get the Atom generator deep inside django not to do that, or even where it is doing that, or even what code is running to generate the Atom feed. (I thought I knew but I added some assert False statements and it kept running!) Ignoring that particular problem, I would appreciate feedback on the right way to get the two values at the top of feeds.py marked NOTE(rsc). rietveld: correct tab handling 2009-10-03T23:02:17+00:00email-address-removedurn:md5:0a2a4f19bb815101f0ba2904aed7c35a This fixes the buggy tab rendering that can be seen at http://codereview.appspot.com/116075/diff/1/2 The fundamental problem was that the tab code was not being told what column the text began in, so it didn&#39;t know where to put the tab stops. Another problem was that some of the code assumed that string byte offsets were the same as column offsets, which is only true if there are no tabs. In the process of fixing this, I cleaned up the arguments to Fold and ExpandTabs and renamed them Break and _ExpandTabs so that I could be sure that I found all the call sites. I also wanted to verify that ExpandTabs was not being used from outside intra_region_diff.py. ` type Feed struct { XMLName Name `xml:"http://www.w3.org/2005/Atom feed"` Title string `xml:"title"` Id string `xml:"id"` Link []Link `xml:"link"` Updated time.Time `xml:"updated,attr"` Author Person `xml:"author"` Entry []Entry `xml:"entry"` } type Entry struct { Title string `xml:"title"` Id string `xml:"id"` Link []Link `xml:"link"` Updated time.Time `xml:"updated"` Author Person `xml:"author"` Summary Text `xml:"summary"` } type Link struct { Rel string `xml:"rel,attr,omitempty"` Href string `xml:"href,attr"` } type Person struct { Name string `xml:"name"` URI string `xml:"uri"` Email string `xml:"email"` InnerXML string `xml:",innerxml"` } type Text struct { Type string `xml:"type,attr,omitempty"` Body string `xml:",chardata"` } var atomFeed = Feed{ XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, Title: "Code Review - My issues", Link: []Link{ {Rel: "alternate", Href: "http://codereview.appspot.com/"}, {Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"}, }, Id: "http://codereview.appspot.com/", Updated: ParseTime("2009-10-04T01:35:58+00:00"), Author: Person{ Name: "rietveld<>", InnerXML: "rietveld<>", }, Entry: []Entry{ { Title: "rietveld: an attempt at pubsubhubbub\n", Link: []Link{ {Rel: "alternate", Href: "http://codereview.appspot.com/126085"}, }, Updated: ParseTime("2009-10-04T01:35:58+00:00"), Author: Person{ Name: "email-address-removed", InnerXML: "email-address-removed", }, Id: "urn:md5:134d9179c41f806be79b3a5f7877d19a", Summary: Text{ Type: "html", Body: ` An attempt at adding pubsubhubbub support to Rietveld. http://code.google.com/p/pubsubhubbub http://code.google.com/p/rietveld/issues/detail?id=155 The server side of the protocol is trivial: 1. add a <link rel="hub" href="hub-server"> tag to all feeds that will be pubsubhubbubbed. 2. every time one of those feeds changes, tell the hub with a simple POST request. I have tested this by adding debug prints to a local hub server and checking that the server got the right publish requests. I can't quite get the server to work, but I think the bug is not in my code. I think that the server expects to be able to grab the feed and see the feed's actual URL in the link rel="self", but the default value for that drops the :port from the URL, and I cannot for the life of me figure out how to get the Atom generator deep inside django not to do that, or even where it is doing that, or even what code is running to generate the Atom feed. (I thought I knew but I added some assert False statements and it kept running!) Ignoring that particular problem, I would appreciate feedback on the right way to get the two values at the top of feeds.py marked NOTE(rsc). `, }, }, { Title: "rietveld: correct tab handling\n", Link: []Link{ {Rel: "alternate", Href: "http://codereview.appspot.com/124106"}, }, Updated: ParseTime("2009-10-03T23:02:17+00:00"), Author: Person{ Name: "email-address-removed", InnerXML: "email-address-removed", }, Id: "urn:md5:0a2a4f19bb815101f0ba2904aed7c35a", Summary: Text{ Type: "html", Body: ` This fixes the buggy tab rendering that can be seen at http://codereview.appspot.com/116075/diff/1/2 The fundamental problem was that the tab code was not being told what column the text began in, so it didn't know where to put the tab stops. Another problem was that some of the code assumed that string byte offsets were the same as column offsets, which is only true if there are no tabs. In the process of fixing this, I cleaned up the arguments to Fold and ExpandTabs and renamed them Break and _ExpandTabs so that I could be sure that I found all the call sites. I also wanted to verify that ExpandTabs was not being used from outside intra_region_diff.py. `, }, }, }, } const pathTestString = ` 1 A B C D <_> E 2 ` type PathTestItem struct { Value string } type PathTestA struct { Items []PathTestItem `xml:">Item1"` Before, After string } type PathTestB struct { Other []PathTestItem `xml:"Items>Item1"` Before, After string } type PathTestC struct { Values1 []string `xml:"Items>Item1>Value"` Values2 []string `xml:"Items>Item2>Value"` Before, After string } type PathTestSet struct { Item1 []PathTestItem } type PathTestD struct { Other PathTestSet `xml:"Items"` Before, After string } type PathTestE struct { Underline string `xml:"Items>_>Value"` Before, After string } var pathTests = []interface{}{ &PathTestA{Items: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"}, &PathTestB{Other: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"}, &PathTestC{Values1: []string{"A", "C", "D"}, Values2: []string{"B"}, Before: "1", After: "2"}, &PathTestD{Other: PathTestSet{Item1: []PathTestItem{{"A"}, {"D"}}}, Before: "1", After: "2"}, &PathTestE{Underline: "E", Before: "1", After: "2"}, } func TestUnmarshalPaths(t *testing.T) { for _, pt := range pathTests { v := reflect.New(reflect.TypeOf(pt).Elem()).Interface() if err := Unmarshal([]byte(pathTestString), v); err != nil { t.Fatalf("Unmarshal: %s", err) } if !reflect.DeepEqual(v, pt) { t.Fatalf("have %#v\nwant %#v", v, pt) } } } type BadPathTestA struct { First string `xml:"items>item1"` Other string `xml:"items>item2"` Second string `xml:"items"` } type BadPathTestB struct { Other string `xml:"items>item2>value"` First string `xml:"items>item1"` Second string `xml:"items>item1>value"` } type BadPathTestC struct { First string Second string `xml:"First"` } type BadPathTestD struct { BadPathEmbeddedA BadPathEmbeddedB } type BadPathEmbeddedA struct { First string } type BadPathEmbeddedB struct { Second string `xml:"First"` } var badPathTests = []struct { v, e interface{} }{ {&BadPathTestA{}, &TagPathError{reflect.TypeOf(BadPathTestA{}), "First", "items>item1", "Second", "items"}}, {&BadPathTestB{}, &TagPathError{reflect.TypeOf(BadPathTestB{}), "First", "items>item1", "Second", "items>item1>value"}}, {&BadPathTestC{}, &TagPathError{reflect.TypeOf(BadPathTestC{}), "First", "", "Second", "First"}}, {&BadPathTestD{}, &TagPathError{reflect.TypeOf(BadPathTestD{}), "First", "", "Second", "First"}}, } func TestUnmarshalBadPaths(t *testing.T) { for _, tt := range badPathTests { err := Unmarshal([]byte(pathTestString), tt.v) if !reflect.DeepEqual(err, tt.e) { t.Fatalf("Unmarshal with %#v didn't fail properly:\nhave %#v,\nwant %#v", tt.v, err, tt.e) } } } const OK = "OK" const withoutNameTypeData = ` ` type TestThree struct { XMLName Name `xml:"Test3"` Attr string `xml:",attr"` } func TestUnmarshalWithoutNameType(t *testing.T) { var x TestThree if err := Unmarshal([]byte(withoutNameTypeData), &x); err != nil { t.Fatalf("Unmarshal: %s", err) } if x.Attr != OK { t.Fatalf("have %v\nwant %v", x.Attr, OK) } } func TestUnmarshalAttr(t *testing.T) { type ParamVal struct { Int int `xml:"int,attr"` } type ParamPtr struct { Int *int `xml:"int,attr"` } type ParamStringPtr struct { Int *string `xml:"int,attr"` } x := []byte(``) p1 := &ParamPtr{} if err := Unmarshal(x, p1); err != nil { t.Fatalf("Unmarshal: %s", err) } if p1.Int == nil { t.Fatalf("Unmarshal failed in to *int field") } else if *p1.Int != 1 { t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p1.Int, 1) } p2 := &ParamVal{} if err := Unmarshal(x, p2); err != nil { t.Fatalf("Unmarshal: %s", err) } if p2.Int != 1 { t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p2.Int, 1) } p3 := &ParamStringPtr{} if err := Unmarshal(x, p3); err != nil { t.Fatalf("Unmarshal: %s", err) } if p3.Int == nil { t.Fatalf("Unmarshal failed in to *string field") } else if *p3.Int != "1" { t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p3.Int, 1) } } type Tables struct { HTable string `xml:"http://www.w3.org/TR/html4/ table"` FTable string `xml:"http://www.w3schools.com/furniture table"` } var tables = []struct { xml string tab Tables ns string }{ { xml: `` + `hello
` + `world
` + `
`, tab: Tables{"hello", "world"}, }, { xml: `` + `world
` + `hello
` + `
`, tab: Tables{"hello", "world"}, }, { xml: `` + `world` + `hello` + ``, tab: Tables{"hello", "world"}, }, { xml: `` + `bogus
` + `
`, tab: Tables{}, }, { xml: `` + `only
` + `
`, tab: Tables{HTable: "only"}, ns: "http://www.w3.org/TR/html4/", }, { xml: `` + `only
` + `
`, tab: Tables{FTable: "only"}, ns: "http://www.w3schools.com/furniture", }, { xml: `` + `only
` + `
`, tab: Tables{}, ns: "something else entirely", }, } func TestUnmarshalNS(t *testing.T) { for i, tt := range tables { var dst Tables var err error if tt.ns != "" { d := NewDecoder(strings.NewReader(tt.xml)) d.DefaultSpace = tt.ns err = d.Decode(&dst) } else { err = Unmarshal([]byte(tt.xml), &dst) } if err != nil { t.Errorf("#%d: Unmarshal: %v", i, err) continue } want := tt.tab if dst != want { t.Errorf("#%d: dst=%+v, want %+v", i, dst, want) } } } func TestMarshalNS(t *testing.T) { dst := Tables{"hello", "world"} data, err := Marshal(&dst) if err != nil { t.Fatalf("Marshal: %v", err) } want := `hello
world
` str := string(data) if str != want { t.Errorf("have: %q\nwant: %q\n", str, want) } } type TableAttrs struct { TAttr TAttr } type TAttr struct { HTable string `xml:"http://www.w3.org/TR/html4/ table,attr"` FTable string `xml:"http://www.w3schools.com/furniture table,attr"` Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` Other1 string `xml:"http://golang.org/xml/ other,attr,omitempty"` Other2 string `xml:"http://golang.org/xmlfoo/ other,attr,omitempty"` Other3 string `xml:"http://golang.org/json/ other,attr,omitempty"` Other4 string `xml:"http://golang.org/2/json/ other,attr,omitempty"` } var tableAttrs = []struct { xml string tab TableAttrs ns string }{ { xml: ``, tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, }, { xml: ``, tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, }, { xml: ``, tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, }, { // Default space does not apply to attribute names. xml: ``, tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}}, }, { // Default space does not apply to attribute names. xml: ``, tab: TableAttrs{TAttr{HTable: "", FTable: "world"}}, }, { xml: ``, tab: TableAttrs{}, }, { // Default space does not apply to attribute names. xml: ``, tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}}, ns: "http://www.w3schools.com/furniture", }, { // Default space does not apply to attribute names. xml: ``, tab: TableAttrs{TAttr{HTable: "", FTable: "world"}}, ns: "http://www.w3.org/TR/html4/", }, { xml: ``, tab: TableAttrs{}, ns: "something else entirely", }, } func TestUnmarshalNSAttr(t *testing.T) { for i, tt := range tableAttrs { var dst TableAttrs var err error if tt.ns != "" { d := NewDecoder(strings.NewReader(tt.xml)) d.DefaultSpace = tt.ns err = d.Decode(&dst) } else { err = Unmarshal([]byte(tt.xml), &dst) } if err != nil { t.Errorf("#%d: Unmarshal: %v", i, err) continue } want := tt.tab if dst != want { t.Errorf("#%d: dst=%+v, want %+v", i, dst, want) } } } func TestMarshalNSAttr(t *testing.T) { src := TableAttrs{TAttr{"hello", "world", "en_US", "other1", "other2", "other3", "other4"}} data, err := Marshal(&src) if err != nil { t.Fatalf("Marshal: %v", err) } want := `` str := string(data) if str != want { t.Errorf("Marshal:\nhave: %#q\nwant: %#q\n", str, want) } var dst TableAttrs if err := Unmarshal(data, &dst); err != nil { t.Errorf("Unmarshal: %v", err) } if dst != src { t.Errorf("Unmarshal = %q, want %q", dst, src) } } type MyCharData struct { body string } func (m *MyCharData) UnmarshalXML(d *Decoder, start StartElement) error { for { t, err := d.Token() if err == io.EOF { // found end of element break } if err != nil { return err } if char, ok := t.(CharData); ok { m.body += string(char) } } return nil } var _ Unmarshaler = (*MyCharData)(nil) func (m *MyCharData) UnmarshalXMLAttr(attr Attr) error { panic("must not call") } type MyAttr struct { attr string } func (m *MyAttr) UnmarshalXMLAttr(attr Attr) error { m.attr = attr.Value return nil } var _ UnmarshalerAttr = (*MyAttr)(nil) type MyStruct struct { Data *MyCharData Attr *MyAttr `xml:",attr"` Data2 MyCharData Attr2 MyAttr `xml:",attr"` } func TestUnmarshaler(t *testing.T) { xml := ` hello world howdy world ` var m MyStruct if err := Unmarshal([]byte(xml), &m); err != nil { t.Fatal(err) } if m.Data == nil || m.Attr == nil || m.Data.body != "hello world" || m.Attr.attr != "attr1" || m.Data2.body != "howdy world" || m.Attr2.attr != "attr2" { t.Errorf("m=%#+v\n", m) } } type Pea struct { Cotelydon string } type Pod struct { Pea interface{} `xml:"Pea"` } // https://code.google.com/p/go/issues/detail?id=6836 func TestUnmarshalIntoInterface(t *testing.T) { pod := new(Pod) pod.Pea = new(Pea) xml := `Green stuff` err := Unmarshal([]byte(xml), pod) if err != nil { t.Fatalf("failed to unmarshal %q: %v", xml, err) } pea, ok := pod.Pea.(*Pea) if !ok { t.Fatalf("unmarshalled into wrong type: have %T want *Pea", pod.Pea) } have, want := pea.Cotelydon, "Green stuff" if have != want { t.Errorf("failed to unmarshal into interface, have %q want %q", have, want) } } // https://github.com/vmware/govmomi/issues/246 func TestNegativeValuesUnsignedFields(t *testing.T) { type T struct { I string O interface{} U8 uint8 `xml:"u8"` U16 uint16 `xml:"u16"` U32 uint32 `xml:"u32"` U64 uint64 `xml:"u64"` } var tests = []T{ {I: "-128", O: uint8(0x80)}, {I: "-1", O: uint8(0xff)}, {I: "-32768", O: uint16(0x8000)}, {I: "-1", O: uint16(0xffff)}, {I: "-2147483648", O: uint32(0x80000000)}, {I: "-1", O: uint32(0xffffffff)}, {I: "-9223372036854775808", O: uint64(0x8000000000000000)}, {I: "-1", O: uint64(0xffffffffffffffff)}, } for _, test := range tests { err := Unmarshal([]byte(test.I), &test) if err != nil { t.Errorf("Unmarshal error: %v", err) continue } var expected = test.O var actual interface{} switch reflect.ValueOf(test.O).Type().Kind() { case reflect.Uint8: actual = test.U8 case reflect.Uint16: actual = test.U16 case reflect.Uint32: actual = test.U32 case reflect.Uint64: actual = test.U64 } if !reflect.DeepEqual(actual, expected) { t.Errorf("Actual: %v, expected: %v", actual, expected) } } } govmomi-0.15.0/vim25/xml/typeinfo.go000066400000000000000000000224761312205533500172120ustar00rootroot00000000000000// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import ( "fmt" "reflect" "strings" "sync" ) // typeInfo holds details for the xml representation of a type. type typeInfo struct { xmlname *fieldInfo fields []fieldInfo } // fieldInfo holds details for the xml representation of a single field. type fieldInfo struct { idx []int name string xmlns string flags fieldFlags parents []string } type fieldFlags int const ( fElement fieldFlags = 1 << iota fAttr fCharData fInnerXml fComment fAny fOmitEmpty fTypeAttr fMode = fElement | fAttr | fCharData | fInnerXml | fComment | fAny ) var tinfoMap = make(map[reflect.Type]*typeInfo) var tinfoLock sync.RWMutex var nameType = reflect.TypeOf(Name{}) // getTypeInfo returns the typeInfo structure with details necessary // for marshalling and unmarshalling typ. func getTypeInfo(typ reflect.Type) (*typeInfo, error) { tinfoLock.RLock() tinfo, ok := tinfoMap[typ] tinfoLock.RUnlock() if ok { return tinfo, nil } tinfo = &typeInfo{} if typ.Kind() == reflect.Struct && typ != nameType { n := typ.NumField() for i := 0; i < n; i++ { f := typ.Field(i) if f.PkgPath != "" || f.Tag.Get("xml") == "-" { continue // Private field } // For embedded structs, embed its fields. if f.Anonymous { t := f.Type if t.Kind() == reflect.Ptr { t = t.Elem() } if t.Kind() == reflect.Struct { inner, err := getTypeInfo(t) if err != nil { return nil, err } if tinfo.xmlname == nil { tinfo.xmlname = inner.xmlname } for _, finfo := range inner.fields { finfo.idx = append([]int{i}, finfo.idx...) if err := addFieldInfo(typ, tinfo, &finfo); err != nil { return nil, err } } continue } } finfo, err := structFieldInfo(typ, &f) if err != nil { return nil, err } if f.Name == "XMLName" { tinfo.xmlname = finfo continue } // Add the field if it doesn't conflict with other fields. if err := addFieldInfo(typ, tinfo, finfo); err != nil { return nil, err } } } tinfoLock.Lock() tinfoMap[typ] = tinfo tinfoLock.Unlock() return tinfo, nil } // structFieldInfo builds and returns a fieldInfo for f. func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, error) { finfo := &fieldInfo{idx: f.Index} // Split the tag from the xml namespace if necessary. tag := f.Tag.Get("xml") if i := strings.Index(tag, " "); i >= 0 { finfo.xmlns, tag = tag[:i], tag[i+1:] } // Parse flags. tokens := strings.Split(tag, ",") if len(tokens) == 1 { finfo.flags = fElement } else { tag = tokens[0] for _, flag := range tokens[1:] { switch flag { case "attr": finfo.flags |= fAttr case "chardata": finfo.flags |= fCharData case "innerxml": finfo.flags |= fInnerXml case "comment": finfo.flags |= fComment case "any": finfo.flags |= fAny case "omitempty": finfo.flags |= fOmitEmpty case "typeattr": finfo.flags |= fTypeAttr } } // Validate the flags used. valid := true switch mode := finfo.flags & fMode; mode { case 0: finfo.flags |= fElement case fAttr, fCharData, fInnerXml, fComment, fAny: if f.Name == "XMLName" || tag != "" && mode != fAttr { valid = false } default: // This will also catch multiple modes in a single field. valid = false } if finfo.flags&fMode == fAny { finfo.flags |= fElement } if finfo.flags&fOmitEmpty != 0 && finfo.flags&(fElement|fAttr) == 0 { valid = false } if !valid { return nil, fmt.Errorf("xml: invalid tag in field %s of type %s: %q", f.Name, typ, f.Tag.Get("xml")) } } // Use of xmlns without a name is not allowed. if finfo.xmlns != "" && tag == "" { return nil, fmt.Errorf("xml: namespace without name in field %s of type %s: %q", f.Name, typ, f.Tag.Get("xml")) } if f.Name == "XMLName" { // The XMLName field records the XML element name. Don't // process it as usual because its name should default to // empty rather than to the field name. finfo.name = tag return finfo, nil } if tag == "" { // If the name part of the tag is completely empty, get // default from XMLName of underlying struct if feasible, // or field name otherwise. if xmlname := lookupXMLName(f.Type); xmlname != nil { finfo.xmlns, finfo.name = xmlname.xmlns, xmlname.name } else { finfo.name = f.Name } return finfo, nil } // Prepare field name and parents. parents := strings.Split(tag, ">") if parents[0] == "" { parents[0] = f.Name } if parents[len(parents)-1] == "" { return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ) } finfo.name = parents[len(parents)-1] if len(parents) > 1 { if (finfo.flags & fElement) == 0 { return nil, fmt.Errorf("xml: %s chain not valid with %s flag", tag, strings.Join(tokens[1:], ",")) } finfo.parents = parents[:len(parents)-1] } // If the field type has an XMLName field, the names must match // so that the behavior of both marshalling and unmarshalling // is straightforward and unambiguous. if finfo.flags&fElement != 0 { ftyp := f.Type xmlname := lookupXMLName(ftyp) if xmlname != nil && xmlname.name != finfo.name { return nil, fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName", finfo.name, typ, f.Name, xmlname.name, ftyp) } } return finfo, nil } // lookupXMLName returns the fieldInfo for typ's XMLName field // in case it exists and has a valid xml field tag, otherwise // it returns nil. func lookupXMLName(typ reflect.Type) (xmlname *fieldInfo) { for typ.Kind() == reflect.Ptr { typ = typ.Elem() } if typ.Kind() != reflect.Struct { return nil } for i, n := 0, typ.NumField(); i < n; i++ { f := typ.Field(i) if f.Name != "XMLName" { continue } finfo, err := structFieldInfo(typ, &f) if finfo.name != "" && err == nil { return finfo } // Also consider errors as a non-existent field tag // and let getTypeInfo itself report the error. break } return nil } func min(a, b int) int { if a <= b { return a } return b } // addFieldInfo adds finfo to tinfo.fields if there are no // conflicts, or if conflicts arise from previous fields that were // obtained from deeper embedded structures than finfo. In the latter // case, the conflicting entries are dropped. // A conflict occurs when the path (parent + name) to a field is // itself a prefix of another path, or when two paths match exactly. // It is okay for field paths to share a common, shorter prefix. func addFieldInfo(typ reflect.Type, tinfo *typeInfo, newf *fieldInfo) error { var conflicts []int Loop: // First, figure all conflicts. Most working code will have none. for i := range tinfo.fields { oldf := &tinfo.fields[i] if oldf.flags&fMode != newf.flags&fMode { continue } if oldf.xmlns != "" && newf.xmlns != "" && oldf.xmlns != newf.xmlns { continue } minl := min(len(newf.parents), len(oldf.parents)) for p := 0; p < minl; p++ { if oldf.parents[p] != newf.parents[p] { continue Loop } } if len(oldf.parents) > len(newf.parents) { if oldf.parents[len(newf.parents)] == newf.name { conflicts = append(conflicts, i) } } else if len(oldf.parents) < len(newf.parents) { if newf.parents[len(oldf.parents)] == oldf.name { conflicts = append(conflicts, i) } } else { if newf.name == oldf.name { conflicts = append(conflicts, i) } } } // Without conflicts, add the new field and return. if conflicts == nil { tinfo.fields = append(tinfo.fields, *newf) return nil } // If any conflict is shallower, ignore the new field. // This matches the Go field resolution on embedding. for _, i := range conflicts { if len(tinfo.fields[i].idx) < len(newf.idx) { return nil } } // Otherwise, if any of them is at the same depth level, it's an error. for _, i := range conflicts { oldf := &tinfo.fields[i] if len(oldf.idx) == len(newf.idx) { f1 := typ.FieldByIndex(oldf.idx) f2 := typ.FieldByIndex(newf.idx) return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")} } } // Otherwise, the new field is shallower, and thus takes precedence, // so drop the conflicting fields from tinfo and append the new one. for c := len(conflicts) - 1; c >= 0; c-- { i := conflicts[c] copy(tinfo.fields[i:], tinfo.fields[i+1:]) tinfo.fields = tinfo.fields[:len(tinfo.fields)-1] } tinfo.fields = append(tinfo.fields, *newf) return nil } // A TagPathError represents an error in the unmarshalling process // caused by the use of field tags with conflicting paths. type TagPathError struct { Struct reflect.Type Field1, Tag1 string Field2, Tag2 string } func (e *TagPathError) Error() string { return fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", e.Struct, e.Field1, e.Tag1, e.Field2, e.Tag2) } // value returns v's field value corresponding to finfo. // It's equivalent to v.FieldByIndex(finfo.idx), but initializes // and dereferences pointers as necessary. func (finfo *fieldInfo) value(v reflect.Value) reflect.Value { for i, x := range finfo.idx { if i > 0 { t := v.Type() if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct { if v.IsNil() { v.Set(reflect.New(v.Type().Elem())) } v = v.Elem() } } v = v.Field(x) } return v } govmomi-0.15.0/vim25/xml/xml.go000066400000000000000000001263771312205533500161620ustar00rootroot00000000000000// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package xml implements a simple XML 1.0 parser that // understands XML name spaces. package xml // References: // Annotated XML spec: http://www.xml.com/axml/testaxml.htm // XML name spaces: http://www.w3.org/TR/REC-xml-names/ // TODO(rsc): // Test error handling. import ( "bufio" "bytes" "errors" "fmt" "io" "reflect" "strconv" "strings" "unicode" "unicode/utf8" ) // A SyntaxError represents a syntax error in the XML input stream. type SyntaxError struct { Msg string Line int } func (e *SyntaxError) Error() string { return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg } // A Name represents an XML name (Local) annotated // with a name space identifier (Space). // In tokens returned by Decoder.Token, the Space identifier // is given as a canonical URL, not the short prefix used // in the document being parsed. type Name struct { Space, Local string } // An Attr represents an attribute in an XML element (Name=Value). type Attr struct { Name Name Value string } // A Token is an interface holding one of the token types: // StartElement, EndElement, CharData, Comment, ProcInst, or Directive. type Token interface{} // A StartElement represents an XML start element. type StartElement struct { Name Name Attr []Attr } func (e StartElement) Copy() StartElement { attrs := make([]Attr, len(e.Attr)) copy(attrs, e.Attr) e.Attr = attrs return e } // End returns the corresponding XML end element. func (e StartElement) End() EndElement { return EndElement{e.Name} } // An EndElement represents an XML end element. type EndElement struct { Name Name } // A CharData represents XML character data (raw text), // in which XML escape sequences have been replaced by // the characters they represent. type CharData []byte func makeCopy(b []byte) []byte { b1 := make([]byte, len(b)) copy(b1, b) return b1 } func (c CharData) Copy() CharData { return CharData(makeCopy(c)) } // A Comment represents an XML comment of the form . // The bytes do not include the comment markers. type Comment []byte func (c Comment) Copy() Comment { return Comment(makeCopy(c)) } // A ProcInst represents an XML processing instruction of the form type ProcInst struct { Target string Inst []byte } func (p ProcInst) Copy() ProcInst { p.Inst = makeCopy(p.Inst) return p } // A Directive represents an XML directive of the form . // The bytes do not include the markers. type Directive []byte func (d Directive) Copy() Directive { return Directive(makeCopy(d)) } // CopyToken returns a copy of a Token. func CopyToken(t Token) Token { switch v := t.(type) { case CharData: return v.Copy() case Comment: return v.Copy() case Directive: return v.Copy() case ProcInst: return v.Copy() case StartElement: return v.Copy() } return t } // A Decoder represents an XML parser reading a particular input stream. // The parser assumes that its input is encoded in UTF-8. type Decoder struct { // Strict defaults to true, enforcing the requirements // of the XML specification. // If set to false, the parser allows input containing common // mistakes: // * If an element is missing an end tag, the parser invents // end tags as necessary to keep the return values from Token // properly balanced. // * In attribute values and character data, unknown or malformed // character entities (sequences beginning with &) are left alone. // // Setting: // // d.Strict = false; // d.AutoClose = HTMLAutoClose; // d.Entity = HTMLEntity // // creates a parser that can handle typical HTML. // // Strict mode does not enforce the requirements of the XML name spaces TR. // In particular it does not reject name space tags using undefined prefixes. // Such tags are recorded with the unknown prefix as the name space URL. Strict bool // When Strict == false, AutoClose indicates a set of elements to // consider closed immediately after they are opened, regardless // of whether an end element is present. AutoClose []string // Entity can be used to map non-standard entity names to string replacements. // The parser behaves as if these standard mappings are present in the map, // regardless of the actual map content: // // "lt": "<", // "gt": ">", // "amp": "&", // "apos": "'", // "quot": `"`, Entity map[string]string // CharsetReader, if non-nil, defines a function to generate // charset-conversion readers, converting from the provided // non-UTF-8 charset into UTF-8. If CharsetReader is nil or // returns an error, parsing stops with an error. One of the // the CharsetReader's result values must be non-nil. CharsetReader func(charset string, input io.Reader) (io.Reader, error) // DefaultSpace sets the default name space used for unadorned tags, // as if the entire XML stream were wrapped in an element containing // the attribute xmlns="DefaultSpace". DefaultSpace string // TypeFunc is used to map type names to actual types. TypeFunc func(string) (reflect.Type, bool) r io.ByteReader buf bytes.Buffer saved *bytes.Buffer stk *stack free *stack needClose bool toClose Name nextToken Token nextByte int ns map[string]string err error line int unmarshalDepth int } // NewDecoder creates a new XML parser reading from r. // If r does not implement io.ByteReader, NewDecoder will // do its own buffering. func NewDecoder(r io.Reader) *Decoder { d := &Decoder{ ns: make(map[string]string), nextByte: -1, line: 1, Strict: true, } d.switchToReader(r) return d } // Token returns the next XML token in the input stream. // At the end of the input stream, Token returns nil, io.EOF. // // Slices of bytes in the returned token data refer to the // parser's internal buffer and remain valid only until the next // call to Token. To acquire a copy of the bytes, call CopyToken // or the token's Copy method. // // Token expands self-closing elements such as
// into separate start and end elements returned by successive calls. // // Token guarantees that the StartElement and EndElement // tokens it returns are properly nested and matched: // if Token encounters an unexpected end element, // it will return an error. // // Token implements XML name spaces as described by // http://www.w3.org/TR/REC-xml-names/. Each of the // Name structures contained in the Token has the Space // set to the URL identifying its name space when known. // If Token encounters an unrecognized name space prefix, // it uses the prefix as the Space rather than report an error. func (d *Decoder) Token() (t Token, err error) { if d.stk != nil && d.stk.kind == stkEOF { err = io.EOF return } if d.nextToken != nil { t = d.nextToken d.nextToken = nil } else if t, err = d.rawToken(); err != nil { return } if !d.Strict { if t1, ok := d.autoClose(t); ok { d.nextToken = t t = t1 } } switch t1 := t.(type) { case StartElement: // In XML name spaces, the translations listed in the // attributes apply to the element name and // to the other attribute names, so process // the translations first. for _, a := range t1.Attr { if a.Name.Space == "xmlns" { v, ok := d.ns[a.Name.Local] d.pushNs(a.Name.Local, v, ok) d.ns[a.Name.Local] = a.Value } if a.Name.Space == "" && a.Name.Local == "xmlns" { // Default space for untagged names v, ok := d.ns[""] d.pushNs("", v, ok) d.ns[""] = a.Value } } d.translate(&t1.Name, true) for i := range t1.Attr { d.translate(&t1.Attr[i].Name, false) } d.pushElement(t1.Name) t = t1 case EndElement: d.translate(&t1.Name, true) if !d.popElement(&t1) { return nil, d.err } t = t1 } return } const xmlURL = "http://www.w3.org/XML/1998/namespace" // Apply name space translation to name n. // The default name space (for Space=="") // applies only to element names, not to attribute names. func (d *Decoder) translate(n *Name, isElementName bool) { switch { case n.Space == "xmlns": return case n.Space == "" && !isElementName: return case n.Space == "xml": n.Space = xmlURL case n.Space == "" && n.Local == "xmlns": return } if v, ok := d.ns[n.Space]; ok { n.Space = v } else if n.Space == "" { n.Space = d.DefaultSpace } } func (d *Decoder) switchToReader(r io.Reader) { // Get efficient byte at a time reader. // Assume that if reader has its own // ReadByte, it's efficient enough. // Otherwise, use bufio. if rb, ok := r.(io.ByteReader); ok { d.r = rb } else { d.r = bufio.NewReader(r) } } // Parsing state - stack holds old name space translations // and the current set of open elements. The translations to pop when // ending a given tag are *below* it on the stack, which is // more work but forced on us by XML. type stack struct { next *stack kind int name Name ok bool } const ( stkStart = iota stkNs stkEOF ) func (d *Decoder) push(kind int) *stack { s := d.free if s != nil { d.free = s.next } else { s = new(stack) } s.next = d.stk s.kind = kind d.stk = s return s } func (d *Decoder) pop() *stack { s := d.stk if s != nil { d.stk = s.next s.next = d.free d.free = s } return s } // Record that after the current element is finished // (that element is already pushed on the stack) // Token should return EOF until popEOF is called. func (d *Decoder) pushEOF() { // Walk down stack to find Start. // It might not be the top, because there might be stkNs // entries above it. start := d.stk for start.kind != stkStart { start = start.next } // The stkNs entries below a start are associated with that // element too; skip over them. for start.next != nil && start.next.kind == stkNs { start = start.next } s := d.free if s != nil { d.free = s.next } else { s = new(stack) } s.kind = stkEOF s.next = start.next start.next = s } // Undo a pushEOF. // The element must have been finished, so the EOF should be at the top of the stack. func (d *Decoder) popEOF() bool { if d.stk == nil || d.stk.kind != stkEOF { return false } d.pop() return true } // Record that we are starting an element with the given name. func (d *Decoder) pushElement(name Name) { s := d.push(stkStart) s.name = name } // Record that we are changing the value of ns[local]. // The old value is url, ok. func (d *Decoder) pushNs(local string, url string, ok bool) { s := d.push(stkNs) s.name.Local = local s.name.Space = url s.ok = ok } // Creates a SyntaxError with the current line number. func (d *Decoder) syntaxError(msg string) error { return &SyntaxError{Msg: msg, Line: d.line} } // Record that we are ending an element with the given name. // The name must match the record at the top of the stack, // which must be a pushElement record. // After popping the element, apply any undo records from // the stack to restore the name translations that existed // before we saw this element. func (d *Decoder) popElement(t *EndElement) bool { s := d.pop() name := t.Name switch { case s == nil || s.kind != stkStart: d.err = d.syntaxError("unexpected end element ") return false case s.name.Local != name.Local: if !d.Strict { d.needClose = true d.toClose = t.Name t.Name = s.name return true } d.err = d.syntaxError("element <" + s.name.Local + "> closed by ") return false case s.name.Space != name.Space: d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space + "closed by in space " + name.Space) return false } // Pop stack until a Start or EOF is on the top, undoing the // translations that were associated with the element we just closed. for d.stk != nil && d.stk.kind != stkStart && d.stk.kind != stkEOF { s := d.pop() if s.ok { d.ns[s.name.Local] = s.name.Space } else { delete(d.ns, s.name.Local) } } return true } // If the top element on the stack is autoclosing and // t is not the end tag, invent the end tag. func (d *Decoder) autoClose(t Token) (Token, bool) { if d.stk == nil || d.stk.kind != stkStart { return nil, false } name := strings.ToLower(d.stk.name.Local) for _, s := range d.AutoClose { if strings.ToLower(s) == name { // This one should be auto closed if t doesn't close it. et, ok := t.(EndElement) if !ok || et.Name.Local != name { return EndElement{d.stk.name}, true } break } } return nil, false } var errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method") // RawToken is like Token but does not verify that // start and end elements match and does not translate // name space prefixes to their corresponding URLs. func (d *Decoder) RawToken() (Token, error) { if d.unmarshalDepth > 0 { return nil, errRawToken } return d.rawToken() } func (d *Decoder) rawToken() (Token, error) { if d.err != nil { return nil, d.err } if d.needClose { // The last element we read was self-closing and // we returned just the StartElement half. // Return the EndElement half now. d.needClose = false return EndElement{d.toClose}, nil } b, ok := d.getc() if !ok { return nil, d.err } if b != '<' { // Text section. d.ungetc(b) data := d.text(-1, false) if data == nil { return nil, d.err } return CharData(data), nil } if b, ok = d.mustgetc(); !ok { return nil, d.err } switch b { case '/': // ' { d.err = d.syntaxError("invalid characters between ") return nil, d.err } return EndElement{name}, nil case '?': // ' { break } b0 = b } data := d.buf.Bytes() data = data[0 : len(data)-2] // chop ?> if target == "xml" { enc := procInstEncoding(string(data)) if enc != "" && enc != "utf-8" && enc != "UTF-8" { if d.CharsetReader == nil { d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc) return nil, d.err } newr, err := d.CharsetReader(enc, d.r.(io.Reader)) if err != nil { d.err = fmt.Errorf("xml: opening charset %q: %v", enc, err) return nil, d.err } if newr == nil { panic("CharsetReader returned a nil Reader for charset " + enc) } d.switchToReader(newr) } } return ProcInst{target, data}, nil case '!': // ' { break } b0, b1 = b1, b } data := d.buf.Bytes() data = data[0 : len(data)-3] // chop --> return Comment(data), nil case '[': // . data := d.text(-1, true) if data == nil { return nil, d.err } return CharData(data), nil } // Probably a directive: , , etc. // We don't care, but accumulate for caller. Quoted angle // brackets do not count for nesting. d.buf.Reset() d.buf.WriteByte(b) inquote := uint8(0) depth := 0 for { if b, ok = d.mustgetc(); !ok { return nil, d.err } if inquote == 0 && b == '>' && depth == 0 { break } HandleB: d.buf.WriteByte(b) switch { case b == inquote: inquote = 0 case inquote != 0: // in quotes, no special action case b == '\'' || b == '"': inquote = b case b == '>' && inquote == 0: depth-- case b == '<' && inquote == 0: // Look for ` var testEntity = map[string]string{"何": "What", "is-it": "is it?"} var rawTokens = []Token{ CharData("\n"), ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)}, CharData("\n"), Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`), CharData("\n"), StartElement{Name{"", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}}, CharData("\n "), StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}, CharData("World <>'\" 白鵬翔"), EndElement{Name{"", "hello"}}, CharData("\n "), StartElement{Name{"", "query"}, []Attr{}}, CharData("What is it?"), EndElement{Name{"", "query"}}, CharData("\n "), StartElement{Name{"", "goodbye"}, []Attr{}}, EndElement{Name{"", "goodbye"}}, CharData("\n "), StartElement{Name{"", "outer"}, []Attr{{Name{"foo", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}}, CharData("\n "), StartElement{Name{"", "inner"}, []Attr{}}, EndElement{Name{"", "inner"}}, CharData("\n "), EndElement{Name{"", "outer"}}, CharData("\n "), StartElement{Name{"tag", "name"}, []Attr{}}, CharData("\n "), CharData("Some text here."), CharData("\n "), EndElement{Name{"tag", "name"}}, CharData("\n"), EndElement{Name{"", "body"}}, Comment(" missing final newline "), } var cookedTokens = []Token{ CharData("\n"), ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)}, CharData("\n"), Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`), CharData("\n"), StartElement{Name{"ns2", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}}, CharData("\n "), StartElement{Name{"ns2", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}, CharData("World <>'\" 白鵬翔"), EndElement{Name{"ns2", "hello"}}, CharData("\n "), StartElement{Name{"ns2", "query"}, []Attr{}}, CharData("What is it?"), EndElement{Name{"ns2", "query"}}, CharData("\n "), StartElement{Name{"ns2", "goodbye"}, []Attr{}}, EndElement{Name{"ns2", "goodbye"}}, CharData("\n "), StartElement{Name{"ns2", "outer"}, []Attr{{Name{"ns1", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}}, CharData("\n "), StartElement{Name{"ns2", "inner"}, []Attr{}}, EndElement{Name{"ns2", "inner"}}, CharData("\n "), EndElement{Name{"ns2", "outer"}}, CharData("\n "), StartElement{Name{"ns3", "name"}, []Attr{}}, CharData("\n "), CharData("Some text here."), CharData("\n "), EndElement{Name{"ns3", "name"}}, CharData("\n"), EndElement{Name{"ns2", "body"}}, Comment(" missing final newline "), } const testInputAltEncoding = ` VALUE` var rawTokensAltEncoding = []Token{ CharData("\n"), ProcInst{"xml", []byte(`version="1.0" encoding="x-testing-uppercase"`)}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("value"), EndElement{Name{"", "tag"}}, } var xmlInput = []string{ // unexpected EOF cases "<", "", "", "", // "", // let the Token() caller handle "", "", "", "", " c;", "", "", "", // "", // let the Token() caller handle "", "", "cdata]]>", } func TestRawToken(t *testing.T) { d := NewDecoder(strings.NewReader(testInput)) d.Entity = testEntity testRawToken(t, d, rawTokens) } const nonStrictInput = ` non&entity &unknown;entity { &#zzz; &なまえ3; <-gt; &; &0a; ` var nonStringEntity = map[string]string{"": "oops!", "0a": "oops!"} var nonStrictTokens = []Token{ CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("non&entity"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("&unknown;entity"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("{"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("&#zzz;"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("&なまえ3;"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("<-gt;"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("&;"), EndElement{Name{"", "tag"}}, CharData("\n"), StartElement{Name{"", "tag"}, []Attr{}}, CharData("&0a;"), EndElement{Name{"", "tag"}}, CharData("\n"), } func TestNonStrictRawToken(t *testing.T) { d := NewDecoder(strings.NewReader(nonStrictInput)) d.Strict = false testRawToken(t, d, nonStrictTokens) } type downCaser struct { t *testing.T r io.ByteReader } func (d *downCaser) ReadByte() (c byte, err error) { c, err = d.r.ReadByte() if c >= 'A' && c <= 'Z' { c += 'a' - 'A' } return } func (d *downCaser) Read(p []byte) (int, error) { d.t.Fatalf("unexpected Read call on downCaser reader") panic("unreachable") } func TestRawTokenAltEncoding(t *testing.T) { d := NewDecoder(strings.NewReader(testInputAltEncoding)) d.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) { if charset != "x-testing-uppercase" { t.Fatalf("unexpected charset %q", charset) } return &downCaser{t, input.(io.ByteReader)}, nil } testRawToken(t, d, rawTokensAltEncoding) } func TestRawTokenAltEncodingNoConverter(t *testing.T) { d := NewDecoder(strings.NewReader(testInputAltEncoding)) token, err := d.RawToken() if token == nil { t.Fatalf("expected a token on first RawToken call") } if err != nil { t.Fatal(err) } token, err = d.RawToken() if token != nil { t.Errorf("expected a nil token; got %#v", token) } if err == nil { t.Fatalf("expected an error on second RawToken call") } const encoding = "x-testing-uppercase" if !strings.Contains(err.Error(), encoding) { t.Errorf("expected error to contain %q; got error: %v", encoding, err) } } func testRawToken(t *testing.T, d *Decoder, rawTokens []Token) { for i, want := range rawTokens { have, err := d.RawToken() if err != nil { t.Fatalf("token %d: unexpected error: %s", i, err) } if !reflect.DeepEqual(have, want) { var shave, swant string if _, ok := have.(CharData); ok { shave = fmt.Sprintf("CharData(%q)", have) } else { shave = fmt.Sprintf("%#v", have) } if _, ok := want.(CharData); ok { swant = fmt.Sprintf("CharData(%q)", want) } else { swant = fmt.Sprintf("%#v", want) } t.Errorf("token %d = %s, want %s", i, shave, swant) } } } // Ensure that directives (specifically !DOCTYPE) include the complete // text of any nested directives, noting that < and > do not change // nesting depth if they are in single or double quotes. var nestedDirectivesInput = ` ]> ">]> ]> '>]> ]> '>]> ]> ` var nestedDirectivesTokens = []Token{ CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), Directive(`DOCTYPE [">]`), CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), Directive(`DOCTYPE ['>]`), CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), Directive(`DOCTYPE ['>]`), CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), } func TestNestedDirectives(t *testing.T) { d := NewDecoder(strings.NewReader(nestedDirectivesInput)) for i, want := range nestedDirectivesTokens { have, err := d.Token() if err != nil { t.Fatalf("token %d: unexpected error: %s", i, err) } if !reflect.DeepEqual(have, want) { t.Errorf("token %d = %#v want %#v", i, have, want) } } } func TestToken(t *testing.T) { d := NewDecoder(strings.NewReader(testInput)) d.Entity = testEntity for i, want := range cookedTokens { have, err := d.Token() if err != nil { t.Fatalf("token %d: unexpected error: %s", i, err) } if !reflect.DeepEqual(have, want) { t.Errorf("token %d = %#v want %#v", i, have, want) } } } func TestSyntax(t *testing.T) { for i := range xmlInput { d := NewDecoder(strings.NewReader(xmlInput[i])) var err error for _, err = d.Token(); err == nil; _, err = d.Token() { } if _, ok := err.(*SyntaxError); !ok { t.Fatalf(`xmlInput "%s": expected SyntaxError not received`, xmlInput[i]) } } } type allScalars struct { True1 bool True2 bool False1 bool False2 bool Int int Int8 int8 Int16 int16 Int32 int32 Int64 int64 Uint int Uint8 uint8 Uint16 uint16 Uint32 uint32 Uint64 uint64 Uintptr uintptr Float32 float32 Float64 float64 String string PtrString *string } var all = allScalars{ True1: true, True2: true, False1: false, False2: false, Int: 1, Int8: -2, Int16: 3, Int32: -4, Int64: 5, Uint: 6, Uint8: 7, Uint16: 8, Uint32: 9, Uint64: 10, Uintptr: 11, Float32: 13.0, Float64: 14.0, String: "15", PtrString: &sixteen, } var sixteen = "16" const testScalarsInput = ` true 1 false 0 1 -2 3 -4 5 6 7 8 9 10 11 12.0 13.0 14.0 15 16 ` func TestAllScalars(t *testing.T) { var a allScalars err := Unmarshal([]byte(testScalarsInput), &a) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(a, all) { t.Errorf("have %+v want %+v", a, all) } } type item struct { Field_a string } func TestIssue569(t *testing.T) { data := `abcd` var i item err := Unmarshal([]byte(data), &i) if err != nil || i.Field_a != "abcd" { t.Fatal("Expecting abcd") } } func TestUnquotedAttrs(t *testing.T) { data := "" d := NewDecoder(strings.NewReader(data)) d.Strict = false token, err := d.Token() if _, ok := err.(*SyntaxError); ok { t.Errorf("Unexpected error: %v", err) } if token.(StartElement).Name.Local != "tag" { t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local) } attr := token.(StartElement).Attr[0] if attr.Value != "azAZ09:-_" { t.Errorf("Unexpected attribute value: %v", attr.Value) } if attr.Name.Local != "attr" { t.Errorf("Unexpected attribute name: %v", attr.Name.Local) } } func TestValuelessAttrs(t *testing.T) { tests := [][3]string{ {"

", "p", "nowrap"}, {"

", "p", "nowrap"}, {"", "input", "checked"}, {"", "input", "checked"}, } for _, test := range tests { d := NewDecoder(strings.NewReader(test[0])) d.Strict = false token, err := d.Token() if _, ok := err.(*SyntaxError); ok { t.Errorf("Unexpected error: %v", err) } if token.(StartElement).Name.Local != test[1] { t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local) } attr := token.(StartElement).Attr[0] if attr.Value != test[2] { t.Errorf("Unexpected attribute value: %v", attr.Value) } if attr.Name.Local != test[2] { t.Errorf("Unexpected attribute name: %v", attr.Name.Local) } } } func TestCopyTokenCharData(t *testing.T) { data := []byte("same data") var tok1 Token = CharData(data) tok2 := CopyToken(tok1) if !reflect.DeepEqual(tok1, tok2) { t.Error("CopyToken(CharData) != CharData") } data[1] = 'o' if reflect.DeepEqual(tok1, tok2) { t.Error("CopyToken(CharData) uses same buffer.") } } func TestCopyTokenStartElement(t *testing.T) { elt := StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}} var tok1 Token = elt tok2 := CopyToken(tok1) if tok1.(StartElement).Attr[0].Value != "en" { t.Error("CopyToken overwrote Attr[0]") } if !reflect.DeepEqual(tok1, tok2) { t.Error("CopyToken(StartElement) != StartElement") } tok1.(StartElement).Attr[0] = Attr{Name{"", "lang"}, "de"} if reflect.DeepEqual(tok1, tok2) { t.Error("CopyToken(CharData) uses same buffer.") } } func TestSyntaxErrorLineNum(t *testing.T) { testInput := "

Foo

\n\n

Bar\n" d := NewDecoder(strings.NewReader(testInput)) var err error for _, err = d.Token(); err == nil; _, err = d.Token() { } synerr, ok := err.(*SyntaxError) if !ok { t.Error("Expected SyntaxError.") } if synerr.Line != 3 { t.Error("SyntaxError didn't have correct line number.") } } func TestTrailingRawToken(t *testing.T) { input := ` ` d := NewDecoder(strings.NewReader(input)) var err error for _, err = d.RawToken(); err == nil; _, err = d.RawToken() { } if err != io.EOF { t.Fatalf("d.RawToken() = _, %v, want _, io.EOF", err) } } func TestTrailingToken(t *testing.T) { input := ` ` d := NewDecoder(strings.NewReader(input)) var err error for _, err = d.Token(); err == nil; _, err = d.Token() { } if err != io.EOF { t.Fatalf("d.Token() = _, %v, want _, io.EOF", err) } } func TestEntityInsideCDATA(t *testing.T) { input := `` d := NewDecoder(strings.NewReader(input)) var err error for _, err = d.Token(); err == nil; _, err = d.Token() { } if err != io.EOF { t.Fatalf("d.Token() = _, %v, want _, io.EOF", err) } } var characterTests = []struct { in string err string }{ {"\x12", "illegal character code U+0012"}, {"\x0b", "illegal character code U+000B"}, {"\xef\xbf\xbe", "illegal character code U+FFFE"}, {"\r\n\x07", "illegal character code U+0007"}, {"what's up", "expected attribute name in element"}, {"&abc\x01;", "invalid character entity &abc (no semicolon)"}, {"&\x01;", "invalid character entity & (no semicolon)"}, {"&\xef\xbf\xbe;", "invalid character entity &\uFFFE;"}, {"&hello;", "invalid character entity &hello;"}, } func TestDisallowedCharacters(t *testing.T) { for i, tt := range characterTests { d := NewDecoder(strings.NewReader(tt.in)) var err error for err == nil { _, err = d.Token() } synerr, ok := err.(*SyntaxError) if !ok { t.Fatalf("input %d d.Token() = _, %v, want _, *SyntaxError", i, err) } if synerr.Msg != tt.err { t.Fatalf("input %d synerr.Msg wrong: want %q, got %q", i, tt.err, synerr.Msg) } } } type procInstEncodingTest struct { expect, got string } var procInstTests = []struct { input, expect string }{ {`version="1.0" encoding="utf-8"`, "utf-8"}, {`version="1.0" encoding='utf-8'`, "utf-8"}, {`version="1.0" encoding='utf-8' `, "utf-8"}, {`version="1.0" encoding=utf-8`, ""}, {`encoding="FOO" `, "FOO"}, } func TestProcInstEncoding(t *testing.T) { for _, test := range procInstTests { got := procInstEncoding(test.input) if got != test.expect { t.Errorf("procInstEncoding(%q) = %q; want %q", test.input, got, test.expect) } } } // Ensure that directives with comments include the complete // text of any nested directives. var directivesWithCommentsInput = ` ]> ]> --> --> []> ` var directivesWithCommentsTokens = []Token{ CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), Directive(`DOCTYPE []`), CharData("\n"), } func TestDirectivesWithComments(t *testing.T) { d := NewDecoder(strings.NewReader(directivesWithCommentsInput)) for i, want := range directivesWithCommentsTokens { have, err := d.Token() if err != nil { t.Fatalf("token %d: unexpected error: %s", i, err) } if !reflect.DeepEqual(have, want) { t.Errorf("token %d = %#v want %#v", i, have, want) } } } // Writer whose Write method always returns an error. type errWriter struct{} func (errWriter) Write(p []byte) (n int, err error) { return 0, fmt.Errorf("unwritable") } func TestEscapeTextIOErrors(t *testing.T) { expectErr := "unwritable" err := EscapeText(errWriter{}, []byte{'A'}) if err == nil || err.Error() != expectErr { t.Errorf("have %v, want %v", err, expectErr) } } func TestEscapeTextInvalidChar(t *testing.T) { input := []byte("A \x00 terminated string.") expected := "A \uFFFD terminated string." buff := new(bytes.Buffer) if err := EscapeText(buff, input); err != nil { t.Fatalf("have %v, want nil", err) } text := buff.String() if text != expected { t.Errorf("have %v, want %v", text, expected) } } func TestIssue5880(t *testing.T) { type T []byte data, err := Marshal(T{192, 168, 0, 1}) if err != nil { t.Errorf("Marshal error: %v", err) } if !utf8.Valid(data) { t.Errorf("Marshal generated invalid UTF-8: %x", data) } }