diff --git a/.gitignore b/.gitignore
index c3dea6687..6ab3cdfb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
test/.env
*~
*.received.*
+*.swp
website/.bundle
website/vendor
@@ -21,3 +22,5 @@ packer-test*.log
.idea/
*.iml
+Thumbs.db
+/packer.exe
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 0133518e9..5e753eb01 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ language: go
go:
- 1.7.4
- 1.8.3
+ - 1.9
install:
- make deps
@@ -21,5 +22,3 @@ branches:
matrix:
fast_finish: true
- allow_failures:
- - go: 1.4.3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 677cab2fb..61e9a1ed0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,20 +1,208 @@
## (UNRELEASED)
-### IMRPOVEMENTS:
+## 1.1.0 (October 13, 2017)
+
+### IMPROVEMENTS:
+
+* **New builder:** `hyperv-vmcx` for building images from existing VMs.
+ [GH-4944] [GH-5444]
+* builder/amazon-instance: Add `.Token` as a variable in the
+ `BundleUploadCommand` template. [GH-5288]
+* builder/amazon: Add `temporary_security_group_source_cidr` option to control
+ ingress to source instances. [GH-5384]
+* builder/amazon: Output AMI Name during prevalidation. [GH-5389]
+* builder/amazon: Support template functions in tag keys. [GH-5381]
+* builder/amazon: Tag volumes on creation instead of as a separate step.
+ [GH-5417]
+* builder/docker: Add option to set `--user` flag when running `exec`.
+ [GH-5406]
+* builder/docker: Set file owner to container user when uploading. Can be
+ disabled by setting `fix_upload_owner` to `false`. [GH-5422]
+* builder/googlecompute: Support setting labels on the resulting image.
+ [GH-5356]
+* builder/hyper-v: Add `vhd_temp_path` option to control where the VHD resides
+ while it's being provisioned. [GH-5206]
+* builder/hyper-v: Allow vhd or vhdx source images instead of just ISO.
+ [GH-4944] [GH-5444]
+* builder/hyper-v: Disable automatic checkpoints. [GH-5374]
+* builder/virtualbox-ovf: Add `keep_registered` option. [GH-5336]
+* builder/vmware: Add `disable_vnc` option to prevent VNC connections from
+ being made. [GH-5436]
+* core: Releases will now be built for ppc64le.
+* post-processor/vagrant: When building from a builder/hyper-v artifact, link
+ instead of copy when available. [GH-5207]
-* builder/googlecompute: Allow using URL's for network and subnetwork. [GH-5035]
### BUG FIXES:
+* builder/cloudstack: Fix panic if build is aborted. [GH-5388]
+* builder/hyper-v: Respect `enable_dynamic_memory` flag. [GH-5363]
+* builder/puppet-masterless: Make sure directories created with sudo are
+ writable by the packer user. [GH-5351]
+* provisioner/chef-solo: Fix issue installing chef-solo on Windows. [GH-5357]
+* provisioner/powershell: Fix issue setting environment variables by writing
+ them to a file, instead of the command line. [GH-5345]
+* provisioner/powershell: Fix issue where powershell scripts could hang.
+ [GH-5082]
+* provisioner/powershell: Fix Powershell progress stream leak to stderr for
+ normal and elevated commands. [GH-5365]
+* provisioner/puppet-masterless: Fix bug where `puppet_bin_dir` wasn't being
+ respected. [GH-5340]
+* provisioner/puppet: Fix setting facter vars on Windows. [GH-5341]
+
+
+## 1.1.0 (September 12, 2017)
+
+### IMPROVEMENTS:
+
+* builder/alicloud: Update alicloud go sdk and enable multi sites support for
+ alicloud [GH-5219]
+* builder/amazon: Upgrade aws-sdk-go to 1.10.14, add tags at instance run time.
+ [GH-5196]
+* builder/azure: Add object_id to windows_custom_image.json. [GH-5285]
+* builder/azure: Add support for storage account for managed images. [GH-5244]
+* builder/azure: Update pkcs12 package. [GH-5301]
+* builder/cloudstack: Add support for Security Groups. [GH-5175]
+* builder/docker: Uploading files and directories now use docker cp. [GH-5273]
+ [GH-5333]
+* builder/googlecompute: Add `labels` option for labeling launched instances.
+ [GH-5308]
+* builder/googlecompute: Add support for accelerator api. [GH-5137]
+* builder/profitbricks: added support for Cloud API v4. [GH-5233]
+* builder/vmware-esxi: Remote builds now respect `output_directory` [GH-4592]
+* builder/vmware: Set artifact ID to `VMName`. [GH-5187]
+* core: Build solaris binary by default. [GH-5268] [GH-5248]
+* core: Remove LGPL dependencies. [GH-5262]
+* provisioner/puppet: Add `guest_os_type` option to add support for Windows.
+ [GH-5252]
+* provisioner/salt-masterless: Also use sudo to clean up if we used sudo to
+ install. [GH-5240]
+
+### BACKWARDS INCOMPATIBILITIES:
+
+* builder/amazon: Changes way that AMI artifacts are printed out after build,
+ aligning them to builder. Could affect output parsing. [GH-5281]
+* builder/amazon: Split `enhanced_networking` into `sriov_support` and
+ `ena_support` to support finer grained control. Use `packer fix
+ ` to automatically update your template to use `ena_support`
+ where previously there was only `enhanced_networking`. Make sure to also
+ add `sriov_support` if you need that feature, and to ensure `ena_support`
+ is what you intended to be in your template. [GH-5284]
+* builder/cloudstack: Setup temporary SSH keypair; backwards incompatible in
+ the uncommon case that the source image allowed SSH auth with password but
+ not with keypair. [GH-5174]
+* communicator/ssh: Renamed `ssh_disable_agent` to
+ `ssh_disable_agent_forwarding`. Need to run fixer on packer configs that
+ use `ssh_disable_agent`. [GH-5024]
+* communicator: Preserve left-sided white-space in remote command output. Make
+ sure any scripts that parse this output can handle the new whitespace
+ before upgrading. [GH-5167]
+* provisioner/shell: Set default for `ExpectDisconnect` to `false`. If your
+ script causes the connection to be reset, you should set this to `true` to
+ prevent errors. [GH-5283]
+
+### BUG FIXES:
+
+* builder/amazon: `force_deregister` works in all regions, not just original
+ region. [GH-5250]
+* builder/docker: Directory uploads now use the same semantics as the rest of
+ the communicators. [GH-5333]
+* builder/vmware: Fix timestamp in default VMName. [GH-5274]
+* builder/winrm: WinRM now waits to make sure commands can run successfully
+ before considering itself connected. [GH-5300]
+* core: Fix issue where some builders wouldn't respect `-on-error` behavior.
+ [GH-5297]
+* provisioner/windows-restart: The first powershell provisioner after a restart
+ now works. [GH-5272]
+
+### FEATURES:
+
+* **New builder**: Oracle Cloud Infrastructure (OCI) builder for creating
+ custom images. [GH-4554]
+* **New builder:** `lxc` for building lxc images. [GH-3523]
+* **New builder:** `lxd` for building lxd images. [GH-3625]
+* **New post-processor**: vSphere Template post-processor to be used with
+ vmware-iso builder enabling user to mark a VM as a template. [GH-5114]
+
+## 1.0.4 (August 11, 2017)
+
+### IMPROVEMENTS:
+
+* builder/alicloud: Increase polling timeout. [GH-5148]
+* builder/azure: Add `private_virtual_network_with_public_ip` option to
+ optionally obtain a public IP. [GH-5222]
+* builder/googlecompute: use a more portable method of obtaining zone.
+ [GH-5192]
+* builder/hyperv: Properly interpolate user variables in template. [GH-5184]
+* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
+ [GH-5172]
+* contrib: add json files to zsh completion. [GH-5195]
+
+### BUG FIXES:
+
+* builder/amazon: Don't delete snapshots we didn't create. [GH-5211]
+* builder/amazon: fix builds when using the null communicator. [GH-5217]
+* builder/docker: Correctly handle case when uploading an empty directory.
+ [GH-5234]
+* command/push: Don't push variables if they are unspecified. Reverts to
+ behavior in 1.0.1. [GH-5235]
+* command/push: fix handling of symlinks. [GH-5226]
+* core: Strip query parameters from ISO URLs when checking against a checksum
+ file. [GH-5181]
+* provisioner/ansible-remote: Fix issue where packer could hang communicating
+ with ansible-remote. [GH-5146]
+
+## 1.0.3 (July 17, 2017)
+
+### IMPROVEMENTS:
+* builder/azure: Update to latest Azure SDK, enabling support for managed
+ disks. [GH-4511]
+* builder/cloudstack: Add default cidr_list [ 0.0.0.0/0 ]. [GH-5125]
+* builder/cloudstack: Add support for ssh_agent_auth. [GH-5130]
+* builder/cloudstack: Add support for using a HTTP server. [GH-5017]
+* builder/cloudstack: Allow reading api_url, api_key, and secret_key from env
+ vars. [GH-5124]
+* builder/cloudstack: Make expunge optional and improve logging output.
+ [GH-5099]
+* builder/googlecompute: Allow using URL's for network and subnetwork.
+ [GH-5035]
+* builder/hyperv: Add support for floppy_dirs with hyperv-iso builder.
+* builder/hyperv: Add support for override of system %temp% path.
+* core: Experimental Android ARM support. [GH-5111]
+* post-processor/atlas: Disallow packer push of vagrant.box artifacts to atlas.
+ [GH-4780]
+* postprocessor/atlas: Disallow pushing vagrant.box artifacts now that Vagrant
+ cloud is live. [GH-4780]
+
+### BUG FIXES:
+* builder/amazon: Fix panic that happens if ami_block_device_mappings is empty.
+ [GH-5059]
* builder/azure: Write private SSH to file in debug mode. [GH-5070] [GH-5074]
-* builder/parallels: Skip missing paths when looking for unnecessary files. [GH-5058]
+* builder/cloudstack: Properly report back errors. [GH-5103] [GH-5123]
+* builder/docker: Fix windows filepath in docker-toolbox call [GH-4887]
+* builder/docker: Fix windows filepath in docker-toolbox call. [GH-4887]
+* builder/hyperv: Use SID to verify membersip in Admin group, fixing for non-
+ english users. [GH-5022]
+* builder/hyperv: Verify membership in the group Hyper-V Administrators by SID
+ not name. [GH-5022]
+* builder/openstack: Update gophercloud version, fixing builds > 1 hr long.
+ [GH-5046]
+* builder/parallels: Skip missing paths when looking for unnecessary files.
+ [GH-5058]
* builder/vmware-esxi: Fix VNC port discovery default timeout. [GH-5051]
+* communicator/ssh: Add ProvisionerTypes to communicator tests, resolving panic
+ [GH-5116]
+* communicator/ssh: Resolve race condition that sometimes truncates ssh
+ provisioner stdout [GH-4719]
+* post-processor/checksum: Fix interpolation of "output". [GH-5112]
+* push: Push vars in packer config, not just those set from command line and in
+ var-file. [GH-5101]
## 1.0.2 (June 21, 2017)
### BUG FIXES:
-
-* builder/amazon: Fix bugs related to stop instance command. [GH-5029]
+* communicator/ssh: Fix truncated stdout from remote ssh provisioner. [GH-5050]
+* builder/amazon: Fix bugs related to stop instance command. [GH-4719]
* communicator/ssh: Fix ssh connection errors. [GH-5038]
* core: Remove logging that shouldn't be there when running commands. [GH-5042]
* provisioner/shell: Fix bug where scripts were being run under `sh`. [GH-5043]
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b4025859e..acababe3f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -54,7 +54,7 @@ If you have never worked with Go before, you will have to complete the
following steps in order to be able to compile and test Packer. These instructions target POSIX-like environments (Mac OS X, Linux, Cygwin, etc.) so you may need to adjust them for Windows or other shells.
1. [Download](https://golang.org/dl) and install Go. The instructions below
- are for go 1.6. Earlier versions of Go are no longer supported.
+ are for go 1.7. Earlier versions of Go are no longer supported.
2. Set and export the `GOPATH` environment variable and update your `PATH`. For
example, you can add to your `.bash_profile`.
diff --git a/Makefile b/Makefile
index f86b30e06..3a68f0ba5 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ GITBRANCH:=$(shell git symbolic-ref --short HEAD 2>/dev/null)
GOFMT_FILES?=$$(find . -not -path "./vendor/*" -name "*.go")
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)
+GOPATH=$(shell go env GOPATH)
# Get the git commit
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
@@ -50,8 +51,9 @@ dev: deps ## Build and install a development build
exit 1; \
fi
@mkdir -p pkg/$(GOOS)_$(GOARCH)
+ @mkdir -p bin
@go install -ldflags '$(GOLDFLAGS)'
- @cp $(GOPATH)/bin/packer bin
+ @cp $(GOPATH)/bin/packer bin/packer
@cp $(GOPATH)/bin/packer pkg/$(GOOS)_$(GOARCH)
fmt: ## Format Go code
diff --git a/README.md b/README.md
index 64b28076c..8dac199dc 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,7 @@ comes out of the box with support for the following platforms:
* Hyper-V
* 1&1
* OpenStack
+* Oracle Bare Metal Cloud Services
* Parallels
* ProfitBricks
* QEMU. Both KVM and Xen images.
diff --git a/builder/alicloud/ecs/access_config.go b/builder/alicloud/ecs/access_config.go
index 33d4ff52d..bcc7ba76f 100644
--- a/builder/alicloud/ecs/access_config.go
+++ b/builder/alicloud/ecs/access_config.go
@@ -22,7 +22,7 @@ func (c *AlicloudAccessConfig) Client() (*ecs.Client, error) {
if err := c.loadAndValidate(); err != nil {
return nil, err
}
- client := ecs.NewClient(c.AlicloudAccessKey, c.AlicloudSecretKey)
+ client := ecs.NewECSClient(c.AlicloudAccessKey, c.AlicloudSecretKey, common.Region(c.AlicloudRegion))
client.SetBusinessInfo("Packer")
if _, err := client.DescribeRegions(); err != nil {
return nil, err
diff --git a/builder/alicloud/ecs/builder.go b/builder/alicloud/ecs/builder.go
index af40c92fc..8650dc2d1 100644
--- a/builder/alicloud/ecs/builder.go
+++ b/builder/alicloud/ecs/builder.go
@@ -5,6 +5,7 @@ package ecs
import (
"log"
+ "fmt"
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/communicator"
"github.com/hashicorp/packer/helper/config"
@@ -98,8 +99,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
PrivateKeyFile: b.config.Comm.SSHPrivateKey,
TemporaryKeyPairName: b.config.TemporaryKeyPairName,
SSHAgentAuth: b.config.Comm.SSHAgentAuth,
- //DebugKeyPath: b.config.Com
- RegionId: b.config.AlicloudRegion,
+ DebugKeyPath: fmt.Sprintf("ecs_%s.pem", b.config.PackerBuildName),
+ RegionId: b.config.AlicloudRegion,
},
}
if b.chooseNetworkType() == VpcNet {
diff --git a/builder/alicloud/ecs/step_attach_keypair.go b/builder/alicloud/ecs/step_attach_keypair.go
index 551c74cdf..a6cc01381 100644
--- a/builder/alicloud/ecs/step_attach_keypair.go
+++ b/builder/alicloud/ecs/step_attach_keypair.go
@@ -7,6 +7,7 @@ import (
"github.com/denverdino/aliyungo/ecs"
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
+ "time"
)
type stepAttachKeyPar struct {
@@ -21,7 +22,7 @@ func (s *stepAttachKeyPar) Run(state multistep.StateBag) multistep.StepAction {
client := state.Get("client").(*ecs.Client)
config := state.Get("config").(Config)
instance := state.Get("instance").(*ecs.InstanceAttributesType)
- retry_times := 3
+ timeoutPoint := time.Now().Add(120 * time.Second)
for {
err := client.AttachKeyPair(&ecs.AttachKeyPairArgs{RegionId: common.Region(config.AlicloudRegion),
KeyPairName: keyPairName, InstanceIds: "[\"" + instance.InstanceId + "\"]"})
@@ -29,8 +30,8 @@ func (s *stepAttachKeyPar) Run(state multistep.StateBag) multistep.StepAction {
e, _ := err.(*common.Error)
if (!(e.Code == "MissingParameter" || e.Code == "DependencyViolation.WindowsInstance" ||
e.Code == "InvalidKeyPairName.NotFound" || e.Code == "InvalidRegionId.NotFound")) &&
- retry_times > 0 {
- retry_times = retry_times - 1
+ time.Now().Before(timeoutPoint) {
+ time.Sleep(5 * time.Second)
continue
}
err := fmt.Errorf("Error attaching keypair %s to instance %s : %s",
diff --git a/builder/alicloud/ecs/step_config_security_group.go b/builder/alicloud/ecs/step_config_security_group.go
index 6bfbb386a..dc8c083b2 100644
--- a/builder/alicloud/ecs/step_config_security_group.go
+++ b/builder/alicloud/ecs/step_config_security_group.go
@@ -121,12 +121,12 @@ func (s *stepConfigAlicloudSecurityGroup) Cleanup(state multistep.StateBag) {
ui := state.Get("ui").(packer.Ui)
message(state, "security group")
- start := time.Now().Add(10 * time.Second)
+ timeoutPoint := time.Now().Add(120 * time.Second)
for {
if err := client.DeleteSecurityGroup(common.Region(s.RegionId), s.SecurityGroupId); err != nil {
e, _ := err.(*common.Error)
- if e.Code == "DependencyViolation" && time.Now().Before(start) {
- time.Sleep(1 * time.Second)
+ if e.Code == "DependencyViolation" && time.Now().Before(timeoutPoint) {
+ time.Sleep(5 * time.Second)
continue
}
ui.Error(fmt.Sprintf("Failed to delete security group, it may still be around: %s", err))
diff --git a/builder/alicloud/ecs/step_config_vpc.go b/builder/alicloud/ecs/step_config_vpc.go
index 0dce325a4..c4bdd59a3 100644
--- a/builder/alicloud/ecs/step_config_vpc.go
+++ b/builder/alicloud/ecs/step_config_vpc.go
@@ -78,13 +78,13 @@ func (s *stepConfigAlicloudVPC) Cleanup(state multistep.StateBag) {
ui := state.Get("ui").(packer.Ui)
message(state, "VPC")
- start := time.Now().Add(10 * time.Second)
+ timeoutPoint := time.Now().Add(60 * time.Second)
for {
if err := client.DeleteVpc(s.VpcId); err != nil {
e, _ := err.(*common.Error)
if (e.Code == "DependencyViolation.Instance" || e.Code == "DependencyViolation.RouteEntry" ||
e.Code == "DependencyViolation.VSwitch" ||
- e.Code == "DependencyViolation.SecurityGroup") && time.Now().Before(start) {
+ e.Code == "DependencyViolation.SecurityGroup") && time.Now().Before(timeoutPoint) {
time.Sleep(1 * time.Second)
continue
}
diff --git a/builder/alicloud/ecs/step_config_vswitch.go b/builder/alicloud/ecs/step_config_vswitch.go
index 0705fb45a..dfa858d0b 100644
--- a/builder/alicloud/ecs/step_config_vswitch.go
+++ b/builder/alicloud/ecs/step_config_vswitch.go
@@ -113,7 +113,7 @@ func (s *stepConfigAlicloudVSwitch) Run(state multistep.StateBag) multistep.Step
}
if err := client.WaitForVSwitchAvailable(vpcId, s.VSwitchId, ALICLOUD_DEFAULT_TIMEOUT); err != nil {
state.Put("error", err)
- ui.Error(fmt.Sprintf("Timeout waiting for vswitch to become avaiable: %v", err))
+ ui.Error(fmt.Sprintf("Timeout waiting for vswitch to become available: %v", err))
return multistep.ActionHalt
}
state.Put("vswitchid", vswitchId)
@@ -130,13 +130,13 @@ func (s *stepConfigAlicloudVSwitch) Cleanup(state multistep.StateBag) {
client := state.Get("client").(*ecs.Client)
ui := state.Get("ui").(packer.Ui)
message(state, "vSwitch")
- start := time.Now().Add(10 * time.Second)
+ timeoutPoint := time.Now().Add(10 * time.Second)
for {
if err := client.DeleteVSwitch(s.VSwitchId); err != nil {
e, _ := err.(*common.Error)
if (e.Code == "IncorrectVSwitchStatus" || e.Code == "DependencyViolation" ||
e.Code == "DependencyViolation.HaVip" ||
- e.Code == "IncorretRouteEntryStatus") && time.Now().Before(start) {
+ e.Code == "IncorretRouteEntryStatus") && time.Now().Before(timeoutPoint) {
time.Sleep(1 * time.Second)
continue
}
diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go
index 65660cf4f..a259960d1 100644
--- a/builder/amazon/chroot/builder.go
+++ b/builder/amazon/chroot/builder.go
@@ -213,9 +213,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
if !b.config.FromScratch {
steps = append(steps,
&awscommon.StepSourceAMIInfo{
- SourceAmi: b.config.SourceAmi,
- EnhancedNetworking: b.config.AMIEnhancedNetworking,
- AmiFilters: b.config.SourceAmiFilter,
+ SourceAmi: b.config.SourceAmi,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
+ AmiFilters: b.config.SourceAmiFilter,
},
&StepCheckRootDevice{},
)
@@ -245,17 +246,22 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&StepEarlyCleanup{},
&StepSnapshot{},
&awscommon.StepDeregisterAMI{
+ AccessConfig: &b.config.AccessConfig,
ForceDeregister: b.config.AMIForceDeregister,
ForceDeleteSnapshot: b.config.AMIForceDeleteSnapshot,
AMIName: b.config.AMIName,
+ Regions: b.config.AMIRegions,
},
&StepRegisterAMI{
- RootVolumeSize: b.config.RootVolumeSize,
+ RootVolumeSize: b.config.RootVolumeSize,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
},
&awscommon.StepCreateEncryptedAMICopy{
KeyID: b.config.AMIKmsKeyId,
EncryptBootVolume: b.config.AMIEncryptBootVolume,
Name: b.config.AMIName,
+ AMIMappings: b.config.AMIBlockDevices.AMIMappings,
},
&awscommon.StepAMIRegionCopy{
AccessConfig: &b.config.AccessConfig,
diff --git a/builder/amazon/chroot/lockfile_unix.go b/builder/amazon/chroot/lockfile_unix.go
index 43e92af21..0d0f8c8f7 100644
--- a/builder/amazon/chroot/lockfile_unix.go
+++ b/builder/amazon/chroot/lockfile_unix.go
@@ -4,7 +4,8 @@ package chroot
import (
"os"
- "syscall"
+
+ "golang.org/x/sys/unix"
)
// See: http://linux.die.net/include/sys/file.h
@@ -13,7 +14,7 @@ const LOCK_NB = 4
const LOCK_UN = 8
func lockFile(f *os.File) error {
- err := syscall.Flock(int(f.Fd()), LOCK_EX)
+ err := unix.Flock(int(f.Fd()), LOCK_EX)
if err != nil {
return err
}
@@ -22,5 +23,5 @@ func lockFile(f *os.File) error {
}
func unlockFile(f *os.File) error {
- return syscall.Flock(int(f.Fd()), LOCK_UN)
+ return unix.Flock(int(f.Fd()), LOCK_UN)
}
diff --git a/builder/amazon/chroot/step_register_ami.go b/builder/amazon/chroot/step_register_ami.go
index d387eada8..a19266f57 100644
--- a/builder/amazon/chroot/step_register_ami.go
+++ b/builder/amazon/chroot/step_register_ami.go
@@ -12,7 +12,9 @@ import (
// StepRegisterAMI creates the AMI.
type StepRegisterAMI struct {
- RootVolumeSize int64
+ RootVolumeSize int64
+ EnableAMIENASupport bool
+ EnableAMISriovNetSupport bool
}
func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
@@ -75,11 +77,12 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
registerOpts = buildRegisterOpts(config, image, newMappings)
}
- if config.AMIEnhancedNetworking {
+ if s.EnableAMISriovNetSupport {
// Set SriovNetSupport to "simple". See http://goo.gl/icuXh5
// As of February 2017, this applies to C3, C4, D2, I2, R3, and M4 (excluding m4.16xlarge)
registerOpts.SriovNetSupport = aws.String("simple")
-
+ }
+ if s.EnableAMIENASupport {
// Set EnaSupport to true
// As of February 2017, this applies to C5, I3, P2, R4, X1, and m4.16xlarge
registerOpts.EnaSupport = aws.Bool(true)
diff --git a/builder/amazon/common/ami_config.go b/builder/amazon/common/ami_config.go
index 72fd07046..f59cb1d61 100644
--- a/builder/amazon/common/ami_config.go
+++ b/builder/amazon/common/ami_config.go
@@ -17,7 +17,8 @@ type AMIConfig struct {
AMIRegions []string `mapstructure:"ami_regions"`
AMISkipRegionValidation bool `mapstructure:"skip_region_validation"`
AMITags map[string]string `mapstructure:"tags"`
- AMIEnhancedNetworking bool `mapstructure:"enhanced_networking"`
+ AMIENASupport bool `mapstructure:"ena_support"`
+ AMISriovNetSupport bool `mapstructure:"sriov_support"`
AMIForceDeregister bool `mapstructure:"force_deregister"`
AMIForceDeleteSnapshot bool `mapstructure:"force_delete_snapshot"`
AMIEncryptBootVolume bool `mapstructure:"encrypt_boot"`
diff --git a/builder/amazon/common/artifact.go b/builder/amazon/common/artifact.go
index c9f9a08b5..dc50f7721 100644
--- a/builder/amazon/common/artifact.go
+++ b/builder/amazon/common/artifact.go
@@ -51,7 +51,7 @@ func (a *Artifact) String() string {
}
sort.Strings(amiStrings)
- return fmt.Sprintf("AMIs were created:\n\n%s", strings.Join(amiStrings, "\n"))
+ return fmt.Sprintf("AMIs were created:\n%s\n", strings.Join(amiStrings, "\n"))
}
func (a *Artifact) State(name string) interface{} {
diff --git a/builder/amazon/common/artifact_test.go b/builder/amazon/common/artifact_test.go
index ccbf0a1e3..d70754eba 100644
--- a/builder/amazon/common/artifact_test.go
+++ b/builder/amazon/common/artifact_test.go
@@ -48,9 +48,9 @@ func TestArtifactState_atlasMetadata(t *testing.T) {
func TestArtifactString(t *testing.T) {
expected := `AMIs were created:
-
east: foo
-west: bar`
+west: bar
+`
amis := make(map[string]string)
amis["east"] = "foo"
diff --git a/builder/amazon/common/run_config.go b/builder/amazon/common/run_config.go
index 0190df9f3..73970e59e 100644
--- a/builder/amazon/common/run_config.go
+++ b/builder/amazon/common/run_config.go
@@ -3,6 +3,7 @@ package common
import (
"errors"
"fmt"
+ "net"
"os"
"regexp"
"time"
@@ -40,6 +41,7 @@ type RunConfig struct {
DisableStopInstance bool `mapstructure:"disable_stop_instance"`
SecurityGroupId string `mapstructure:"security_group_id"`
SecurityGroupIds []string `mapstructure:"security_group_ids"`
+ TemporarySGSourceCidr string `mapstructure:"temporary_security_group_source_cidr"`
SubnetId string `mapstructure:"subnet_id"`
TemporaryKeyPairName string `mapstructure:"temporary_key_pair_name"`
UserData string `mapstructure:"user_data"`
@@ -115,6 +117,14 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
}
}
+ if c.TemporarySGSourceCidr == "" {
+ c.TemporarySGSourceCidr = "0.0.0.0/0"
+ } else {
+ if _, _, err := net.ParseCIDR(c.TemporarySGSourceCidr); err != nil {
+ errs = append(errs, fmt.Errorf("Error parsing temporary_security_group_source_cidr: %s", err.Error()))
+ }
+ }
+
if c.InstanceInitiatedShutdownBehavior == "" {
c.InstanceInitiatedShutdownBehavior = "stop"
} else if !reShutdownBehavior.MatchString(c.InstanceInitiatedShutdownBehavior) {
diff --git a/builder/amazon/common/step_create_tags.go b/builder/amazon/common/step_create_tags.go
index 29e8a8c73..791227260 100644
--- a/builder/amazon/common/step_create_tags.go
+++ b/builder/amazon/common/step_create_tags.go
@@ -166,13 +166,17 @@ func ConvertToEC2Tags(tags map[string]string, region, sourceAmiId string, ctx in
SourceAMI: sourceAmiId,
BuildRegion: region,
}
+ interpolatedKey, err := interpolate.Render(key, &ctx)
+ if err != nil {
+ return ec2Tags, fmt.Errorf("Error processing tag: %s:%s - %s", key, value, err)
+ }
interpolatedValue, err := interpolate.Render(value, &ctx)
if err != nil {
return ec2Tags, fmt.Errorf("Error processing tag: %s:%s - %s", key, value, err)
}
ec2Tags = append(ec2Tags, &ec2.Tag{
- Key: aws.String(key),
+ Key: aws.String(interpolatedKey),
Value: aws.String(interpolatedValue),
})
}
diff --git a/builder/amazon/common/step_deregister_ami.go b/builder/amazon/common/step_deregister_ami.go
index 7dc39e288..3ad8711aa 100644
--- a/builder/amazon/common/step_deregister_ami.go
+++ b/builder/amazon/common/step_deregister_ami.go
@@ -10,59 +10,76 @@ import (
)
type StepDeregisterAMI struct {
+ AccessConfig *AccessConfig
ForceDeregister bool
ForceDeleteSnapshot bool
AMIName string
+ Regions []string
}
func (s *StepDeregisterAMI) Run(state multistep.StateBag) multistep.StepAction {
- ec2conn := state.Get("ec2").(*ec2.EC2)
ui := state.Get("ui").(packer.Ui)
+ regions := s.Regions
+ if len(regions) == 0 {
+ regions = append(regions, s.AccessConfig.RawRegion)
+ }
// Check for force deregister
if s.ForceDeregister {
- resp, err := ec2conn.DescribeImages(&ec2.DescribeImagesInput{
- Filters: []*ec2.Filter{{
- Name: aws.String("name"),
- Values: []*string{aws.String(s.AMIName)},
- }}})
+ for _, region := range regions {
+ // get new connection for each region in which we need to deregister vms
+ session, err := s.AccessConfig.Session()
+ if err != nil {
+ return multistep.ActionHalt
+ }
- if err != nil {
- err := fmt.Errorf("Error describing AMI: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
+ regionconn := ec2.New(session.Copy(&aws.Config{
+ Region: aws.String(region)},
+ ))
- // Deregister image(s) by name
- for _, i := range resp.Images {
- _, err := ec2conn.DeregisterImage(&ec2.DeregisterImageInput{
- ImageId: i.ImageId,
- })
+ resp, err := regionconn.DescribeImages(&ec2.DescribeImagesInput{
+ Filters: []*ec2.Filter{{
+ Name: aws.String("name"),
+ Values: []*string{aws.String(s.AMIName)},
+ }}})
if err != nil {
- err := fmt.Errorf("Error deregistering existing AMI: %s", err)
+ err := fmt.Errorf("Error describing AMI: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
- ui.Say(fmt.Sprintf("Deregistered AMI %s, id: %s", s.AMIName, *i.ImageId))
- // Delete snapshot(s) by image
- if s.ForceDeleteSnapshot {
- for _, b := range i.BlockDeviceMappings {
- if b.Ebs != nil && aws.StringValue(b.Ebs.SnapshotId) != "" {
- _, err := ec2conn.DeleteSnapshot(&ec2.DeleteSnapshotInput{
- SnapshotId: b.Ebs.SnapshotId,
- })
+ // Deregister image(s) by name
+ for _, i := range resp.Images {
+ _, err := regionconn.DeregisterImage(&ec2.DeregisterImageInput{
+ ImageId: i.ImageId,
+ })
- if err != nil {
- err := fmt.Errorf("Error deleting existing snapshot: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
+ if err != nil {
+ err := fmt.Errorf("Error deregistering existing AMI: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ ui.Say(fmt.Sprintf("Deregistered AMI %s, id: %s", s.AMIName, *i.ImageId))
+
+ // Delete snapshot(s) by image
+ if s.ForceDeleteSnapshot {
+ for _, b := range i.BlockDeviceMappings {
+ if b.Ebs != nil && aws.StringValue(b.Ebs.SnapshotId) != "" {
+ _, err := regionconn.DeleteSnapshot(&ec2.DeleteSnapshotInput{
+ SnapshotId: b.Ebs.SnapshotId,
+ })
+
+ if err != nil {
+ err := fmt.Errorf("Error deleting existing snapshot: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ ui.Say(fmt.Sprintf("Deleted snapshot: %s", *b.Ebs.SnapshotId))
}
- ui.Say(fmt.Sprintf("Deleted snapshot: %s", *b.Ebs.SnapshotId))
}
}
}
diff --git a/builder/amazon/common/step_encrypted_ami.go b/builder/amazon/common/step_encrypted_ami.go
index fec882b67..16c4ce7a8 100644
--- a/builder/amazon/common/step_encrypted_ami.go
+++ b/builder/amazon/common/step_encrypted_ami.go
@@ -15,6 +15,7 @@ type StepCreateEncryptedAMICopy struct {
KeyID string
EncryptBootVolume bool
Name string
+ AMIMappings []BlockDevice
}
func (s *StepCreateEncryptedAMICopy) Run(state multistep.StateBag) multistep.StepAction {
@@ -116,9 +117,18 @@ func (s *StepCreateEncryptedAMICopy) Run(state multistep.StateBag) multistep.Ste
ui.Say("Deleting unencrypted snapshots")
snapshots := state.Get("snapshots").(map[string][]string)
+OuterLoop:
for _, blockDevice := range unencImage.BlockDeviceMappings {
if blockDevice.Ebs != nil && blockDevice.Ebs.SnapshotId != nil {
- ui.Message(fmt.Sprintf("Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
+ // If this packer run didn't create it, then don't delete it
+ for _, origDevice := range s.AMIMappings {
+ if origDevice.SnapshotId == *blockDevice.Ebs.SnapshotId {
+ ui.Message(fmt.Sprintf("Keeping Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
+ continue OuterLoop
+ }
+ }
+
+ ui.Message(fmt.Sprintf("Deleting Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
deleteSnapOpts := &ec2.DeleteSnapshotInput{
SnapshotId: aws.String(*blockDevice.Ebs.SnapshotId),
}
diff --git a/builder/amazon/common/step_modify_ebs_instance.go b/builder/amazon/common/step_modify_ebs_instance.go
index 11fa629d9..12c2367aa 100644
--- a/builder/amazon/common/step_modify_ebs_instance.go
+++ b/builder/amazon/common/step_modify_ebs_instance.go
@@ -10,7 +10,8 @@ import (
)
type StepModifyEBSBackedInstance struct {
- EnableEnhancedNetworking bool
+ EnableAMIENASupport bool
+ EnableAMISriovNetSupport bool
}
func (s *StepModifyEBSBackedInstance) Run(state multistep.StateBag) multistep.StepAction {
@@ -18,9 +19,9 @@ func (s *StepModifyEBSBackedInstance) Run(state multistep.StateBag) multistep.St
instance := state.Get("instance").(*ec2.Instance)
ui := state.Get("ui").(packer.Ui)
- if s.EnableEnhancedNetworking {
- // Set SriovNetSupport to "simple". See http://goo.gl/icuXh5
- // As of February 2017, this applies to C3, C4, D2, I2, R3, and M4 (excluding m4.16xlarge)
+ // Set SriovNetSupport to "simple". See http://goo.gl/icuXh5
+ // As of February 2017, this applies to C3, C4, D2, I2, R3, and M4 (excluding m4.16xlarge)
+ if s.EnableAMISriovNetSupport {
ui.Say("Enabling Enhanced Networking (SR-IOV)...")
simple := "simple"
_, err := ec2conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{
@@ -33,11 +34,13 @@ func (s *StepModifyEBSBackedInstance) Run(state multistep.StateBag) multistep.St
ui.Error(err.Error())
return multistep.ActionHalt
}
+ }
- // Set EnaSupport to true.
- // As of February 2017, this applies to C5, I3, P2, R4, X1, and m4.16xlarge
+ // Set EnaSupport to true.
+ // As of February 2017, this applies to C5, I3, P2, R4, X1, and m4.16xlarge
+ if s.EnableAMIENASupport {
ui.Say("Enabling Enhanced Networking (ENA)...")
- _, err = ec2conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{
+ _, err := ec2conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{
InstanceId: instance.InstanceId,
EnaSupport: &ec2.AttributeBooleanValue{Value: aws.Bool(true)},
})
diff --git a/builder/amazon/common/step_pre_validate.go b/builder/amazon/common/step_pre_validate.go
index 01e1c6ddc..4c57cce0b 100644
--- a/builder/amazon/common/step_pre_validate.go
+++ b/builder/amazon/common/step_pre_validate.go
@@ -26,7 +26,7 @@ func (s *StepPreValidate) Run(state multistep.StateBag) multistep.StepAction {
ec2conn := state.Get("ec2").(*ec2.EC2)
- ui.Say("Prevalidating AMI Name...")
+ ui.Say(fmt.Sprintf("Prevalidating AMI Name: %s", s.DestAmiName))
resp, err := ec2conn.DescribeImages(&ec2.DescribeImagesInput{
Filters: []*ec2.Filter{{
Name: aws.String("name"),
diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go
index 1aecd75f5..a3dca8057 100644
--- a/builder/amazon/common/step_run_source_instance.go
+++ b/builder/amazon/common/step_run_source_instance.go
@@ -5,14 +5,10 @@ import (
"fmt"
"io/ioutil"
"log"
- "strconv"
- "time"
"github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
- retry "github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/packer"
"github.com/hashicorp/packer/template/interpolate"
"github.com/mitchellh/multistep"
@@ -29,16 +25,14 @@ type StepRunSourceInstance struct {
InstanceInitiatedShutdownBehavior string
InstanceType string
SourceAMI string
- SpotPrice string
- SpotPriceProduct string
SubnetId string
Tags map[string]string
+ VolumeTags map[string]string
UserData string
UserDataFile string
Ctx interpolate.Context
- instanceId string
- spotRequest *ec2.SpotInstanceRequest
+ instanceId string
}
func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepAction {
@@ -83,180 +77,98 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
return multistep.ActionHalt
}
- spotPrice := s.SpotPrice
- availabilityZone := s.AvailabilityZone
- if spotPrice == "auto" {
- ui.Message(fmt.Sprintf(
- "Finding spot price for %s %s...",
- s.SpotPriceProduct, s.InstanceType))
-
- // Detect the spot price
- startTime := time.Now().Add(-1 * time.Hour)
- resp, err := ec2conn.DescribeSpotPriceHistory(&ec2.DescribeSpotPriceHistoryInput{
- InstanceTypes: []*string{&s.InstanceType},
- ProductDescriptions: []*string{&s.SpotPriceProduct},
- AvailabilityZone: &s.AvailabilityZone,
- StartTime: &startTime,
- })
- if err != nil {
- err := fmt.Errorf("Error finding spot price: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
- var price float64
- for _, history := range resp.SpotPriceHistory {
- log.Printf("[INFO] Candidate spot price: %s", *history.SpotPrice)
- current, err := strconv.ParseFloat(*history.SpotPrice, 64)
- if err != nil {
- log.Printf("[ERR] Error parsing spot price: %s", err)
- continue
- }
- if price == 0 || current < price {
- price = current
- if s.AvailabilityZone == "" {
- availabilityZone = *history.AvailabilityZone
- }
- }
- }
- if price == 0 {
- err := fmt.Errorf("No candidate spot prices found!")
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- } else {
- // Add 0.5 cents to minimum spot bid to ensure capacity will be available
- // Avoids price-too-low error in active markets which can fluctuate
- price = price + 0.005
- }
-
- spotPrice = strconv.FormatFloat(price, 'f', -1, 64)
- }
-
var instanceId string
- if spotPrice == "" || spotPrice == "0" {
- runOpts := &ec2.RunInstancesInput{
- ImageId: &s.SourceAMI,
- InstanceType: &s.InstanceType,
- UserData: &userData,
- MaxCount: aws.Int64(1),
- MinCount: aws.Int64(1),
- IamInstanceProfile: &ec2.IamInstanceProfileSpecification{Name: &s.IamInstanceProfile},
- BlockDeviceMappings: s.BlockDevices.BuildLaunchDevices(),
- Placement: &ec2.Placement{AvailabilityZone: &s.AvailabilityZone},
- EbsOptimized: &s.EbsOptimized,
- }
-
- if keyName != "" {
- runOpts.KeyName = &keyName
- }
-
- if s.SubnetId != "" && s.AssociatePublicIpAddress {
- runOpts.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{
- {
- DeviceIndex: aws.Int64(0),
- AssociatePublicIpAddress: &s.AssociatePublicIpAddress,
- SubnetId: &s.SubnetId,
- Groups: securityGroupIds,
- DeleteOnTermination: aws.Bool(true),
- },
- }
- } else {
- runOpts.SubnetId = &s.SubnetId
- runOpts.SecurityGroupIds = securityGroupIds
- }
-
- if s.ExpectedRootDevice == "ebs" {
- runOpts.InstanceInitiatedShutdownBehavior = &s.InstanceInitiatedShutdownBehavior
- }
-
- runResp, err := ec2conn.RunInstances(runOpts)
- if err != nil {
- err := fmt.Errorf("Error launching source instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
- instanceId = *runResp.Instances[0].InstanceId
- } else {
- ui.Message(fmt.Sprintf(
- "Requesting spot instance '%s' for: %s",
- s.InstanceType, spotPrice))
-
- runOpts := &ec2.RequestSpotLaunchSpecification{
- ImageId: &s.SourceAMI,
- InstanceType: &s.InstanceType,
- UserData: &userData,
- IamInstanceProfile: &ec2.IamInstanceProfileSpecification{Name: &s.IamInstanceProfile},
- Placement: &ec2.SpotPlacement{
- AvailabilityZone: &availabilityZone,
- },
- BlockDeviceMappings: s.BlockDevices.BuildLaunchDevices(),
- EbsOptimized: &s.EbsOptimized,
- }
-
- if s.SubnetId != "" && s.AssociatePublicIpAddress {
- runOpts.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{
- {
- DeviceIndex: aws.Int64(0),
- AssociatePublicIpAddress: &s.AssociatePublicIpAddress,
- SubnetId: &s.SubnetId,
- Groups: securityGroupIds,
- DeleteOnTermination: aws.Bool(true),
- },
- }
- } else {
- runOpts.SubnetId = &s.SubnetId
- runOpts.SecurityGroupIds = securityGroupIds
- }
-
- if keyName != "" {
- runOpts.KeyName = &keyName
- }
-
- runSpotResp, err := ec2conn.RequestSpotInstances(&ec2.RequestSpotInstancesInput{
- SpotPrice: &spotPrice,
- LaunchSpecification: runOpts,
- })
- if err != nil {
- err := fmt.Errorf("Error launching source spot instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
- s.spotRequest = runSpotResp.SpotInstanceRequests[0]
-
- spotRequestId := s.spotRequest.SpotInstanceRequestId
- ui.Message(fmt.Sprintf("Waiting for spot request (%s) to become active...", *spotRequestId))
- stateChange := StateChangeConf{
- Pending: []string{"open"},
- Target: "active",
- Refresh: SpotRequestStateRefreshFunc(ec2conn, *spotRequestId),
- StepState: state,
- }
- _, err = WaitForState(&stateChange)
- if err != nil {
- err := fmt.Errorf("Error waiting for spot request (%s) to become ready: %s", *spotRequestId, err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
- spotResp, err := ec2conn.DescribeSpotInstanceRequests(&ec2.DescribeSpotInstanceRequestsInput{
- SpotInstanceRequestIds: []*string{spotRequestId},
- })
- if err != nil {
- err := fmt.Errorf("Error finding spot request (%s): %s", *spotRequestId, err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
- instanceId = *spotResp.SpotInstanceRequests[0].InstanceId
+ ui.Say("Adding tags to source instance")
+ if _, exists := s.Tags["Name"]; !exists {
+ s.Tags["Name"] = "Packer Builder"
}
+ ec2Tags, err := ConvertToEC2Tags(s.Tags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
+ if err != nil {
+ err := fmt.Errorf("Error tagging source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ ReportTags(ui, ec2Tags)
+
+ volTags, err := ConvertToEC2Tags(s.VolumeTags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
+ if err != nil {
+ err := fmt.Errorf("Error tagging volumes: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ runOpts := &ec2.RunInstancesInput{
+ ImageId: &s.SourceAMI,
+ InstanceType: &s.InstanceType,
+ UserData: &userData,
+ MaxCount: aws.Int64(1),
+ MinCount: aws.Int64(1),
+ IamInstanceProfile: &ec2.IamInstanceProfileSpecification{Name: &s.IamInstanceProfile},
+ BlockDeviceMappings: s.BlockDevices.BuildLaunchDevices(),
+ Placement: &ec2.Placement{AvailabilityZone: &s.AvailabilityZone},
+ EbsOptimized: &s.EbsOptimized,
+ }
+
+ var tagSpecs []*ec2.TagSpecification
+
+ if len(ec2Tags) > 0 {
+ runTags := &ec2.TagSpecification{
+ ResourceType: aws.String("instance"),
+ Tags: ec2Tags,
+ }
+
+ tagSpecs = append(tagSpecs, runTags)
+ }
+
+ if len(volTags) > 0 {
+ runVolTags := &ec2.TagSpecification{
+ ResourceType: aws.String("volume"),
+ Tags: volTags,
+ }
+
+ tagSpecs = append(tagSpecs, runVolTags)
+ }
+
+ if len(tagSpecs) > 0 {
+ runOpts.SetTagSpecifications(tagSpecs)
+ }
+
+ if keyName != "" {
+ runOpts.KeyName = &keyName
+ }
+
+ if s.SubnetId != "" && s.AssociatePublicIpAddress {
+ runOpts.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{
+ {
+ DeviceIndex: aws.Int64(0),
+ AssociatePublicIpAddress: &s.AssociatePublicIpAddress,
+ SubnetId: &s.SubnetId,
+ Groups: securityGroupIds,
+ DeleteOnTermination: aws.Bool(true),
+ },
+ }
+ } else {
+ runOpts.SubnetId = &s.SubnetId
+ runOpts.SecurityGroupIds = securityGroupIds
+ }
+
+ if s.ExpectedRootDevice == "ebs" {
+ runOpts.InstanceInitiatedShutdownBehavior = &s.InstanceInitiatedShutdownBehavior
+ }
+
+ runResp, err := ec2conn.RunInstances(runOpts)
+ if err != nil {
+ err := fmt.Errorf("Error launching source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ instanceId = *runResp.Instances[0].InstanceId
+
// Set the instance ID so that the cleanup works properly
s.instanceId = instanceId
@@ -278,45 +190,6 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
instance := latestInstance.(*ec2.Instance)
- ui.Say("Adding tags to source instance")
- if _, exists := s.Tags["Name"]; !exists {
- s.Tags["Name"] = "Packer Builder"
- }
-
- ec2Tags, err := ConvertToEC2Tags(s.Tags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
- if err != nil {
- err := fmt.Errorf("Error tagging source instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
- ReportTags(ui, ec2Tags)
-
- // Retry creating tags for about 2.5 minutes
- err = retry.Retry(0.2, 30, 11, func(_ uint) (bool, error) {
- _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{
- Tags: ec2Tags,
- Resources: []*string{instance.InstanceId},
- })
- if err == nil {
- return true, nil
- }
- if awsErr, ok := err.(awserr.Error); ok {
- if awsErr.Code() == "InvalidInstanceID.NotFound" {
- return false, nil
- }
- }
- return true, err
- })
-
- if err != nil {
- err := fmt.Errorf("Error tagging source instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
if s.Debug {
if instance.PublicDnsName != nil && *instance.PublicDnsName != "" {
ui.Message(fmt.Sprintf("Public DNS: %s", *instance.PublicDnsName))
@@ -341,29 +214,6 @@ func (s *StepRunSourceInstance) Cleanup(state multistep.StateBag) {
ec2conn := state.Get("ec2").(*ec2.EC2)
ui := state.Get("ui").(packer.Ui)
- // Cancel the spot request if it exists
- if s.spotRequest != nil {
- ui.Say("Cancelling the spot request...")
- input := &ec2.CancelSpotInstanceRequestsInput{
- SpotInstanceRequestIds: []*string{s.spotRequest.SpotInstanceRequestId},
- }
- if _, err := ec2conn.CancelSpotInstanceRequests(input); err != nil {
- ui.Error(fmt.Sprintf("Error cancelling the spot request, may still be around: %s", err))
- return
- }
- stateChange := StateChangeConf{
- Pending: []string{"active", "open"},
- Refresh: SpotRequestStateRefreshFunc(ec2conn, *s.spotRequest.SpotInstanceRequestId),
- Target: "cancelled",
- }
-
- _, err := WaitForState(&stateChange)
- if err != nil {
- ui.Error(err.Error())
- }
-
- }
-
// Terminate the source instance if it exists
if s.instanceId != "" {
ui.Say("Terminating the source AWS instance...")
diff --git a/builder/amazon/common/step_run_spot_instance.go b/builder/amazon/common/step_run_spot_instance.go
new file mode 100644
index 000000000..2af83d98f
--- /dev/null
+++ b/builder/amazon/common/step_run_spot_instance.go
@@ -0,0 +1,372 @@
+package common
+
+import (
+ "encoding/base64"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "strconv"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/service/ec2"
+
+ retry "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/multistep"
+)
+
+type StepRunSpotInstance struct {
+ AssociatePublicIpAddress bool
+ AvailabilityZone string
+ BlockDevices BlockDevices
+ Debug bool
+ EbsOptimized bool
+ ExpectedRootDevice string
+ IamInstanceProfile string
+ InstanceInitiatedShutdownBehavior string
+ InstanceType string
+ SourceAMI string
+ SpotPrice string
+ SpotPriceProduct string
+ SubnetId string
+ Tags map[string]string
+ VolumeTags map[string]string
+ UserData string
+ UserDataFile string
+ Ctx interpolate.Context
+
+ instanceId string
+ spotRequest *ec2.SpotInstanceRequest
+}
+
+func (s *StepRunSpotInstance) Run(state multistep.StateBag) multistep.StepAction {
+ ec2conn := state.Get("ec2").(*ec2.EC2)
+ var keyName string
+ if name, ok := state.GetOk("keyPair"); ok {
+ keyName = name.(string)
+ }
+ securityGroupIds := aws.StringSlice(state.Get("securityGroupIds").([]string))
+ ui := state.Get("ui").(packer.Ui)
+
+ userData := s.UserData
+ if s.UserDataFile != "" {
+ contents, err := ioutil.ReadFile(s.UserDataFile)
+ if err != nil {
+ state.Put("error", fmt.Errorf("Problem reading user data file: %s", err))
+ return multistep.ActionHalt
+ }
+
+ userData = string(contents)
+ }
+
+ // Test if it is encoded already, and if not, encode it
+ if _, err := base64.StdEncoding.DecodeString(userData); err != nil {
+ log.Printf("[DEBUG] base64 encoding user data...")
+ userData = base64.StdEncoding.EncodeToString([]byte(userData))
+ }
+
+ ui.Say("Launching a source AWS instance...")
+ image, ok := state.Get("source_image").(*ec2.Image)
+ if !ok {
+ state.Put("error", fmt.Errorf("source_image type assertion failed"))
+ return multistep.ActionHalt
+ }
+ s.SourceAMI = *image.ImageId
+
+ if s.ExpectedRootDevice != "" && *image.RootDeviceType != s.ExpectedRootDevice {
+ state.Put("error", fmt.Errorf(
+ "The provided source AMI has an invalid root device type.\n"+
+ "Expected '%s', got '%s'.",
+ s.ExpectedRootDevice, *image.RootDeviceType))
+ return multistep.ActionHalt
+ }
+
+ spotPrice := s.SpotPrice
+ availabilityZone := s.AvailabilityZone
+ if spotPrice == "auto" {
+ ui.Message(fmt.Sprintf(
+ "Finding spot price for %s %s...",
+ s.SpotPriceProduct, s.InstanceType))
+
+ // Detect the spot price
+ startTime := time.Now().Add(-1 * time.Hour)
+ resp, err := ec2conn.DescribeSpotPriceHistory(&ec2.DescribeSpotPriceHistoryInput{
+ InstanceTypes: []*string{&s.InstanceType},
+ ProductDescriptions: []*string{&s.SpotPriceProduct},
+ AvailabilityZone: &s.AvailabilityZone,
+ StartTime: &startTime,
+ })
+ if err != nil {
+ err := fmt.Errorf("Error finding spot price: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ var price float64
+ for _, history := range resp.SpotPriceHistory {
+ log.Printf("[INFO] Candidate spot price: %s", *history.SpotPrice)
+ current, err := strconv.ParseFloat(*history.SpotPrice, 64)
+ if err != nil {
+ log.Printf("[ERR] Error parsing spot price: %s", err)
+ continue
+ }
+ if price == 0 || current < price {
+ price = current
+ if s.AvailabilityZone == "" {
+ availabilityZone = *history.AvailabilityZone
+ }
+ }
+ }
+ if price == 0 {
+ err := fmt.Errorf("No candidate spot prices found!")
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ } else {
+ // Add 0.5 cents to minimum spot bid to ensure capacity will be available
+ // Avoids price-too-low error in active markets which can fluctuate
+ price = price + 0.005
+ }
+
+ spotPrice = strconv.FormatFloat(price, 'f', -1, 64)
+ }
+
+ var instanceId string
+
+ ui.Say("Adding tags to source instance")
+ if _, exists := s.Tags["Name"]; !exists {
+ s.Tags["Name"] = "Packer Builder"
+ }
+
+ ec2Tags, err := ConvertToEC2Tags(s.Tags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
+ if err != nil {
+ err := fmt.Errorf("Error tagging source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ ReportTags(ui, ec2Tags)
+
+ ui.Message(fmt.Sprintf(
+ "Requesting spot instance '%s' for: %s",
+ s.InstanceType, spotPrice))
+
+ runOpts := &ec2.RequestSpotLaunchSpecification{
+ ImageId: &s.SourceAMI,
+ InstanceType: &s.InstanceType,
+ UserData: &userData,
+ IamInstanceProfile: &ec2.IamInstanceProfileSpecification{Name: &s.IamInstanceProfile},
+ Placement: &ec2.SpotPlacement{
+ AvailabilityZone: &availabilityZone,
+ },
+ BlockDeviceMappings: s.BlockDevices.BuildLaunchDevices(),
+ EbsOptimized: &s.EbsOptimized,
+ }
+
+ if s.SubnetId != "" && s.AssociatePublicIpAddress {
+ runOpts.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{
+ {
+ DeviceIndex: aws.Int64(0),
+ AssociatePublicIpAddress: &s.AssociatePublicIpAddress,
+ SubnetId: &s.SubnetId,
+ Groups: securityGroupIds,
+ DeleteOnTermination: aws.Bool(true),
+ },
+ }
+ } else {
+ runOpts.SubnetId = &s.SubnetId
+ runOpts.SecurityGroupIds = securityGroupIds
+ }
+
+ if keyName != "" {
+ runOpts.KeyName = &keyName
+ }
+
+ runSpotResp, err := ec2conn.RequestSpotInstances(&ec2.RequestSpotInstancesInput{
+ SpotPrice: &spotPrice,
+ LaunchSpecification: runOpts,
+ })
+ if err != nil {
+ err := fmt.Errorf("Error launching source spot instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ s.spotRequest = runSpotResp.SpotInstanceRequests[0]
+
+ spotRequestId := s.spotRequest.SpotInstanceRequestId
+ ui.Message(fmt.Sprintf("Waiting for spot request (%s) to become active...", *spotRequestId))
+ stateChange := StateChangeConf{
+ Pending: []string{"open"},
+ Target: "active",
+ Refresh: SpotRequestStateRefreshFunc(ec2conn, *spotRequestId),
+ StepState: state,
+ }
+ _, err = WaitForState(&stateChange)
+ if err != nil {
+ err := fmt.Errorf("Error waiting for spot request (%s) to become ready: %s", *spotRequestId, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ spotResp, err := ec2conn.DescribeSpotInstanceRequests(&ec2.DescribeSpotInstanceRequestsInput{
+ SpotInstanceRequestIds: []*string{spotRequestId},
+ })
+ if err != nil {
+ err := fmt.Errorf("Error finding spot request (%s): %s", *spotRequestId, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ instanceId = *spotResp.SpotInstanceRequests[0].InstanceId
+
+ // Set the instance ID so that the cleanup works properly
+ s.instanceId = instanceId
+
+ ui.Message(fmt.Sprintf("Instance ID: %s", instanceId))
+ ui.Say(fmt.Sprintf("Waiting for instance (%v) to become ready...", instanceId))
+ stateChangeSpot := StateChangeConf{
+ Pending: []string{"pending"},
+ Target: "running",
+ Refresh: InstanceStateRefreshFunc(ec2conn, instanceId),
+ StepState: state,
+ }
+ latestInstance, err := WaitForState(&stateChangeSpot)
+ if err != nil {
+ err := fmt.Errorf("Error waiting for instance (%s) to become ready: %s", instanceId, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ instance := latestInstance.(*ec2.Instance)
+
+ // Retry creating tags for about 2.5 minutes
+ err = retry.Retry(0.2, 30, 11, func(_ uint) (bool, error) {
+ _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{
+ Tags: ec2Tags,
+ Resources: []*string{instance.InstanceId},
+ })
+ if err == nil {
+ return true, nil
+ }
+ if awsErr, ok := err.(awserr.Error); ok {
+ if awsErr.Code() == "InvalidInstanceID.NotFound" {
+ return false, nil
+ }
+ }
+ return true, err
+ })
+
+ if err != nil {
+ err := fmt.Errorf("Error tagging source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ volumeIds := make([]*string, 0)
+ for _, v := range instance.BlockDeviceMappings {
+ if ebs := v.Ebs; ebs != nil {
+ volumeIds = append(volumeIds, ebs.VolumeId)
+ }
+ }
+
+ if len(volumeIds) > 0 {
+ ui.Say("Adding tags to source EBS Volumes")
+ tags, err := ConvertToEC2Tags(s.VolumeTags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
+ if err != nil {
+ err := fmt.Errorf("Error tagging source EBS Volumes on %s: %s", *instance.InstanceId, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ ReportTags(ui, tags)
+
+ _, err = ec2conn.CreateTags(&ec2.CreateTagsInput{
+ Resources: volumeIds,
+ Tags: tags,
+ })
+
+ if err != nil {
+ err := fmt.Errorf("Error tagging source EBS Volumes on %s: %s", *instance.InstanceId, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ }
+
+ if s.Debug {
+ if instance.PublicDnsName != nil && *instance.PublicDnsName != "" {
+ ui.Message(fmt.Sprintf("Public DNS: %s", *instance.PublicDnsName))
+ }
+
+ if instance.PublicIpAddress != nil && *instance.PublicIpAddress != "" {
+ ui.Message(fmt.Sprintf("Public IP: %s", *instance.PublicIpAddress))
+ }
+
+ if instance.PrivateIpAddress != nil && *instance.PrivateIpAddress != "" {
+ ui.Message(fmt.Sprintf("Private IP: %s", *instance.PrivateIpAddress))
+ }
+ }
+
+ state.Put("instance", instance)
+
+ return multistep.ActionContinue
+}
+
+func (s *StepRunSpotInstance) Cleanup(state multistep.StateBag) {
+
+ ec2conn := state.Get("ec2").(*ec2.EC2)
+ ui := state.Get("ui").(packer.Ui)
+
+ // Cancel the spot request if it exists
+ if s.spotRequest != nil {
+ ui.Say("Cancelling the spot request...")
+ input := &ec2.CancelSpotInstanceRequestsInput{
+ SpotInstanceRequestIds: []*string{s.spotRequest.SpotInstanceRequestId},
+ }
+ if _, err := ec2conn.CancelSpotInstanceRequests(input); err != nil {
+ ui.Error(fmt.Sprintf("Error cancelling the spot request, may still be around: %s", err))
+ return
+ }
+ stateChange := StateChangeConf{
+ Pending: []string{"active", "open"},
+ Refresh: SpotRequestStateRefreshFunc(ec2conn, *s.spotRequest.SpotInstanceRequestId),
+ Target: "cancelled",
+ }
+
+ _, err := WaitForState(&stateChange)
+ if err != nil {
+ ui.Error(err.Error())
+ }
+
+ }
+
+ // Terminate the source instance if it exists
+ if s.instanceId != "" {
+ ui.Say("Terminating the source AWS instance...")
+ if _, err := ec2conn.TerminateInstances(&ec2.TerminateInstancesInput{InstanceIds: []*string{&s.instanceId}}); err != nil {
+ ui.Error(fmt.Sprintf("Error terminating instance, may still be around: %s", err))
+ return
+ }
+ stateChange := StateChangeConf{
+ Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"},
+ Refresh: InstanceStateRefreshFunc(ec2conn, s.instanceId),
+ Target: "terminated",
+ }
+
+ _, err := WaitForState(&stateChange)
+ if err != nil {
+ ui.Error(err.Error())
+ }
+ }
+}
diff --git a/builder/amazon/common/step_security_group.go b/builder/amazon/common/step_security_group.go
index 7e4071370..5e47f44c2 100644
--- a/builder/amazon/common/step_security_group.go
+++ b/builder/amazon/common/step_security_group.go
@@ -6,7 +6,7 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/private/waiter"
+ "github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/packer/common/uuid"
"github.com/hashicorp/packer/helper/communicator"
@@ -15,9 +15,10 @@ import (
)
type StepSecurityGroup struct {
- CommConfig *communicator.Config
- SecurityGroupIds []string
- VpcId string
+ CommConfig *communicator.Config
+ SecurityGroupIds []string
+ VpcId string
+ TemporarySGSourceCidr string
createdGroupId string
}
@@ -45,7 +46,9 @@ func (s *StepSecurityGroup) Run(state multistep.StateBag) multistep.StepAction {
port := s.CommConfig.Port()
if port == 0 {
- panic("port must be set to a non-zero value.")
+ if s.CommConfig.Type != "none" {
+ panic("port must be set to a non-zero value.")
+ }
}
// Create the group
@@ -76,15 +79,15 @@ func (s *StepSecurityGroup) Run(state multistep.StateBag) multistep.StepAction {
IpProtocol: aws.String("tcp"),
FromPort: aws.Int64(int64(port)),
ToPort: aws.Int64(int64(port)),
- CidrIp: aws.String("0.0.0.0/0"),
+ CidrIp: aws.String(s.TemporarySGSourceCidr),
}
// We loop and retry this a few times because sometimes the security
// group isn't available immediately because AWS resources are eventually
// consistent.
ui.Say(fmt.Sprintf(
- "Authorizing access to port %d on the temporary security group...",
- port))
+ "Authorizing access to port %d from %s in the temporary security group...",
+ port, s.TemporarySGSourceCidr))
for i := 0; i < 5; i++ {
_, err = ec2conn.AuthorizeSecurityGroupIngress(req)
if err == nil {
@@ -151,36 +154,42 @@ func (s *StepSecurityGroup) Cleanup(state multistep.StateBag) {
}
func waitUntilSecurityGroupExists(c *ec2.EC2, input *ec2.DescribeSecurityGroupsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSecurityGroups",
- Delay: 15,
+ ctx := aws.BackgroundContext()
+ w := request.Waiter{
+ Name: "DescribeSecurityGroups",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch,
Argument: "length(SecurityGroups[]) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Argument: "",
Expected: "InvalidGroup.NotFound",
},
{
- State: "retry",
- Matcher: "error",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Argument: "",
Expected: "InvalidSecurityGroupID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *ec2.DescribeSecurityGroupsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSecurityGroupsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
-
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
diff --git a/builder/amazon/common/step_source_ami_info.go b/builder/amazon/common/step_source_ami_info.go
index 386e8e8db..c7e9f733e 100644
--- a/builder/amazon/common/step_source_ami_info.go
+++ b/builder/amazon/common/step_source_ami_info.go
@@ -17,9 +17,10 @@ import (
// Produces:
// source_image *ec2.Image - the source AMI info
type StepSourceAMIInfo struct {
- SourceAmi string
- EnhancedNetworking bool
- AmiFilters AmiFilterOptions
+ SourceAmi string
+ EnableAMISriovNetSupport bool
+ EnableAMIENASupport bool
+ AmiFilters AmiFilterOptions
}
// Build a slice of AMI filter options from the filters provided.
@@ -103,7 +104,7 @@ func (s *StepSourceAMIInfo) Run(state multistep.StateBag) multistep.StepAction {
// Enhanced Networking can only be enabled on HVM AMIs.
// See http://goo.gl/icuXh5
- if s.EnhancedNetworking && *image.VirtualizationType != "hvm" {
+ if (s.EnableAMIENASupport || s.EnableAMISriovNetSupport) && *image.VirtualizationType != "hvm" {
err := fmt.Errorf("Cannot enable enhanced networking, source AMI '%s' is not HVM", s.SourceAmi)
state.Put("error", err)
ui.Error(err.Error())
diff --git a/builder/amazon/common/step_tag_ebs_volumes.go b/builder/amazon/common/step_tag_ebs_volumes.go
deleted file mode 100644
index cf4c69a17..000000000
--- a/builder/amazon/common/step_tag_ebs_volumes.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package common
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/service/ec2"
- "github.com/hashicorp/packer/packer"
- "github.com/hashicorp/packer/template/interpolate"
- "github.com/mitchellh/multistep"
-)
-
-type StepTagEBSVolumes struct {
- VolumeRunTags map[string]string
- Ctx interpolate.Context
-}
-
-func (s *StepTagEBSVolumes) Run(state multistep.StateBag) multistep.StepAction {
- ec2conn := state.Get("ec2").(*ec2.EC2)
- instance := state.Get("instance").(*ec2.Instance)
- sourceAMI := state.Get("source_image").(*ec2.Image)
- ui := state.Get("ui").(packer.Ui)
-
- if len(s.VolumeRunTags) == 0 {
- return multistep.ActionContinue
- }
-
- volumeIds := make([]*string, 0)
- for _, v := range instance.BlockDeviceMappings {
- if ebs := v.Ebs; ebs != nil {
- volumeIds = append(volumeIds, ebs.VolumeId)
- }
- }
-
- if len(volumeIds) == 0 {
- return multistep.ActionContinue
- }
-
- ui.Say("Adding tags to source EBS Volumes")
- tags, err := ConvertToEC2Tags(s.VolumeRunTags, *ec2conn.Config.Region, *sourceAMI.ImageId, s.Ctx)
- if err != nil {
- err := fmt.Errorf("Error tagging source EBS Volumes on %s: %s", *instance.InstanceId, err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
- ReportTags(ui, tags)
-
- _, err = ec2conn.CreateTags(&ec2.CreateTagsInput{
- Resources: volumeIds,
- Tags: tags,
- })
- if err != nil {
- err := fmt.Errorf("Error tagging source EBS Volumes on %s: %s", *instance.InstanceId, err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
- return multistep.ActionContinue
-}
-
-func (s *StepTagEBSVolumes) Cleanup(state multistep.StateBag) {
- // No cleanup...
-}
diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go
index 79ef6e687..beaa4a276 100644
--- a/builder/amazon/ebs/builder.go
+++ b/builder/amazon/ebs/builder.go
@@ -108,34 +108,29 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state.Put("hook", hook)
state.Put("ui", ui)
- // Build the steps
- steps := []multistep.Step{
- &awscommon.StepPreValidate{
- DestAmiName: b.config.AMIName,
- ForceDeregister: b.config.AMIForceDeregister,
- },
- &awscommon.StepSourceAMIInfo{
- SourceAmi: b.config.SourceAmi,
- EnhancedNetworking: b.config.AMIEnhancedNetworking,
- AmiFilters: b.config.SourceAmiFilter,
- },
- &awscommon.StepKeyPair{
- Debug: b.config.PackerDebug,
- SSHAgentAuth: b.config.Comm.SSHAgentAuth,
- DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName),
- KeyPairName: b.config.SSHKeyPairName,
- TemporaryKeyPairName: b.config.TemporaryKeyPairName,
- PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
- },
- &awscommon.StepSecurityGroup{
- SecurityGroupIds: b.config.SecurityGroupIds,
- CommConfig: &b.config.RunConfig.Comm,
- VpcId: b.config.VpcId,
- },
- &stepCleanupVolumes{
- BlockDevices: b.config.BlockDevices,
- },
- &awscommon.StepRunSourceInstance{
+ var instanceStep multistep.Step
+
+ if b.config.SpotPrice == "" || b.config.SpotPrice == "0" {
+ instanceStep = &awscommon.StepRunSourceInstance{
+ Debug: b.config.PackerDebug,
+ ExpectedRootDevice: "ebs",
+ InstanceType: b.config.InstanceType,
+ UserData: b.config.UserData,
+ UserDataFile: b.config.UserDataFile,
+ SourceAMI: b.config.SourceAmi,
+ IamInstanceProfile: b.config.IamInstanceProfile,
+ SubnetId: b.config.SubnetId,
+ AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
+ EbsOptimized: b.config.EbsOptimized,
+ AvailabilityZone: b.config.AvailabilityZone,
+ BlockDevices: b.config.BlockDevices,
+ Tags: b.config.RunTags,
+ VolumeTags: b.config.VolumeRunTags,
+ Ctx: b.config.ctx,
+ InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ } else {
+ instanceStep = &awscommon.StepRunSpotInstance{
Debug: b.config.PackerDebug,
ExpectedRootDevice: "ebs",
SpotPrice: b.config.SpotPrice,
@@ -151,13 +146,42 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
AvailabilityZone: b.config.AvailabilityZone,
BlockDevices: b.config.BlockDevices,
Tags: b.config.RunTags,
+ VolumeTags: b.config.VolumeRunTags,
Ctx: b.config.ctx,
InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ }
+
+ // Build the steps
+ steps := []multistep.Step{
+ &awscommon.StepPreValidate{
+ DestAmiName: b.config.AMIName,
+ ForceDeregister: b.config.AMIForceDeregister,
},
- &awscommon.StepTagEBSVolumes{
- VolumeRunTags: b.config.VolumeRunTags,
- Ctx: b.config.ctx,
+ &awscommon.StepSourceAMIInfo{
+ SourceAmi: b.config.SourceAmi,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
+ AmiFilters: b.config.SourceAmiFilter,
},
+ &awscommon.StepKeyPair{
+ Debug: b.config.PackerDebug,
+ SSHAgentAuth: b.config.Comm.SSHAgentAuth,
+ DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName),
+ KeyPairName: b.config.SSHKeyPairName,
+ TemporaryKeyPairName: b.config.TemporaryKeyPairName,
+ PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
+ },
+ &awscommon.StepSecurityGroup{
+ SecurityGroupIds: b.config.SecurityGroupIds,
+ CommConfig: &b.config.RunConfig.Comm,
+ VpcId: b.config.VpcId,
+ TemporarySGSourceCidr: b.config.TemporarySGSourceCidr,
+ },
+ &stepCleanupVolumes{
+ BlockDevices: b.config.BlockDevices,
+ },
+ instanceStep,
&awscommon.StepGetPassword{
Debug: b.config.PackerDebug,
Comm: &b.config.RunConfig.Comm,
@@ -179,18 +203,22 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
DisableStopInstance: b.config.DisableStopInstance,
},
&awscommon.StepModifyEBSBackedInstance{
- EnableEnhancedNetworking: b.config.AMIEnhancedNetworking,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
},
&awscommon.StepDeregisterAMI{
+ AccessConfig: &b.config.AccessConfig,
ForceDeregister: b.config.AMIForceDeregister,
ForceDeleteSnapshot: b.config.AMIForceDeleteSnapshot,
AMIName: b.config.AMIName,
+ Regions: b.config.AMIRegions,
},
&stepCreateAMI{},
&awscommon.StepCreateEncryptedAMICopy{
KeyID: b.config.AMIKmsKeyId,
EncryptBootVolume: b.config.AMIEncryptBootVolume,
Name: b.config.AMIName,
+ AMIMappings: b.config.AMIBlockDevices.AMIMappings,
},
&awscommon.StepAMIRegionCopy{
AccessConfig: &b.config.AccessConfig,
diff --git a/builder/amazon/ebssurrogate/builder.go b/builder/amazon/ebssurrogate/builder.go
index 5508abde3..f61b2d43e 100644
--- a/builder/amazon/ebssurrogate/builder.go
+++ b/builder/amazon/ebssurrogate/builder.go
@@ -122,31 +122,29 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state.Put("hook", hook)
state.Put("ui", ui)
- // Build the steps
- steps := []multistep.Step{
- &awscommon.StepPreValidate{
- DestAmiName: b.config.AMIName,
- ForceDeregister: b.config.AMIForceDeregister,
- },
- &awscommon.StepSourceAMIInfo{
- SourceAmi: b.config.SourceAmi,
- EnhancedNetworking: b.config.AMIEnhancedNetworking,
- AmiFilters: b.config.SourceAmiFilter,
- },
- &awscommon.StepKeyPair{
- Debug: b.config.PackerDebug,
- SSHAgentAuth: b.config.Comm.SSHAgentAuth,
- DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName),
- KeyPairName: b.config.SSHKeyPairName,
- TemporaryKeyPairName: b.config.TemporaryKeyPairName,
- PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
- },
- &awscommon.StepSecurityGroup{
- SecurityGroupIds: b.config.SecurityGroupIds,
- CommConfig: &b.config.RunConfig.Comm,
- VpcId: b.config.VpcId,
- },
- &awscommon.StepRunSourceInstance{
+ var instanceStep multistep.Step
+
+ if b.config.SpotPrice == "" || b.config.SpotPrice == "0" {
+ instanceStep = &awscommon.StepRunSourceInstance{
+ Debug: b.config.PackerDebug,
+ ExpectedRootDevice: "ebs",
+ InstanceType: b.config.InstanceType,
+ UserData: b.config.UserData,
+ UserDataFile: b.config.UserDataFile,
+ SourceAMI: b.config.SourceAmi,
+ IamInstanceProfile: b.config.IamInstanceProfile,
+ SubnetId: b.config.SubnetId,
+ AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
+ EbsOptimized: b.config.EbsOptimized,
+ AvailabilityZone: b.config.AvailabilityZone,
+ BlockDevices: b.config.BlockDevices,
+ Tags: b.config.RunTags,
+ VolumeTags: b.config.VolumeRunTags,
+ Ctx: b.config.ctx,
+ InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ } else {
+ instanceStep = &awscommon.StepRunSpotInstance{
Debug: b.config.PackerDebug,
ExpectedRootDevice: "ebs",
SpotPrice: b.config.SpotPrice,
@@ -162,12 +160,39 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
AvailabilityZone: b.config.AvailabilityZone,
BlockDevices: b.config.BlockDevices,
Tags: b.config.RunTags,
+ VolumeTags: b.config.VolumeRunTags,
+ Ctx: b.config.ctx,
InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ }
+
+ // Build the steps
+ steps := []multistep.Step{
+ &awscommon.StepPreValidate{
+ DestAmiName: b.config.AMIName,
+ ForceDeregister: b.config.AMIForceDeregister,
},
- &awscommon.StepTagEBSVolumes{
- VolumeRunTags: b.config.VolumeRunTags,
- Ctx: b.config.ctx,
+ &awscommon.StepSourceAMIInfo{
+ SourceAmi: b.config.SourceAmi,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
+ AmiFilters: b.config.SourceAmiFilter,
},
+ &awscommon.StepKeyPair{
+ Debug: b.config.PackerDebug,
+ SSHAgentAuth: b.config.Comm.SSHAgentAuth,
+ DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName),
+ KeyPairName: b.config.SSHKeyPairName,
+ TemporaryKeyPairName: b.config.TemporaryKeyPairName,
+ PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
+ },
+ &awscommon.StepSecurityGroup{
+ SecurityGroupIds: b.config.SecurityGroupIds,
+ CommConfig: &b.config.RunConfig.Comm,
+ VpcId: b.config.VpcId,
+ TemporarySGSourceCidr: b.config.TemporarySGSourceCidr,
+ },
+ instanceStep,
&awscommon.StepGetPassword{
Debug: b.config.PackerDebug,
Comm: &b.config.RunConfig.Comm,
@@ -189,19 +214,24 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
DisableStopInstance: b.config.DisableStopInstance,
},
&awscommon.StepModifyEBSBackedInstance{
- EnableEnhancedNetworking: b.config.AMIEnhancedNetworking,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
},
&StepSnapshotNewRootVolume{
NewRootMountPoint: b.config.RootDevice.SourceDeviceName,
},
&awscommon.StepDeregisterAMI{
+ AccessConfig: &b.config.AccessConfig,
ForceDeregister: b.config.AMIForceDeregister,
ForceDeleteSnapshot: b.config.AMIForceDeleteSnapshot,
AMIName: b.config.AMIName,
+ Regions: b.config.AMIRegions,
},
&StepRegisterAMI{
- RootDevice: b.config.RootDevice,
- BlockDevices: b.config.BlockDevices.BuildAMIDevices(),
+ RootDevice: b.config.RootDevice,
+ BlockDevices: b.config.BlockDevices.BuildAMIDevices(),
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
},
&awscommon.StepCreateEncryptedAMICopy{
KeyID: b.config.AMIKmsKeyId,
diff --git a/builder/amazon/ebssurrogate/step_register_ami.go b/builder/amazon/ebssurrogate/step_register_ami.go
index 2f3b9d776..f0d145f35 100644
--- a/builder/amazon/ebssurrogate/step_register_ami.go
+++ b/builder/amazon/ebssurrogate/step_register_ami.go
@@ -12,9 +12,11 @@ import (
// StepRegisterAMI creates the AMI.
type StepRegisterAMI struct {
- RootDevice RootBlockDevice
- BlockDevices []*ec2.BlockDeviceMapping
- image *ec2.Image
+ RootDevice RootBlockDevice
+ BlockDevices []*ec2.BlockDeviceMapping
+ EnableAMIENASupport bool
+ EnableAMISriovNetSupport bool
+ image *ec2.Image
}
func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
@@ -25,16 +27,7 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
ui.Say("Registering the AMI...")
- blockDevicesExcludingRoot := make([]*ec2.BlockDeviceMapping, 0, len(s.BlockDevices)-1)
- for _, blockDevice := range s.BlockDevices {
- if *blockDevice.DeviceName == s.RootDevice.SourceDeviceName {
- continue
- }
-
- blockDevicesExcludingRoot = append(blockDevicesExcludingRoot, blockDevice)
- }
-
- blockDevicesExcludingRoot = append(blockDevicesExcludingRoot, s.RootDevice.createBlockDeviceMapping(snapshotId))
+ blockDevicesExcludingRoot := DeduplicateRootVolume(s.BlockDevices, s.RootDevice, snapshotId)
registerOpts := &ec2.RegisterImageInput{
Name: &config.AMIName,
@@ -44,16 +37,16 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
BlockDeviceMappings: blockDevicesExcludingRoot,
}
- if config.AMIEnhancedNetworking {
+ if s.EnableAMISriovNetSupport {
// Set SriovNetSupport to "simple". See http://goo.gl/icuXh5
// As of February 2017, this applies to C3, C4, D2, I2, R3, and M4 (excluding m4.16xlarge)
registerOpts.SriovNetSupport = aws.String("simple")
-
+ }
+ if s.EnableAMIENASupport {
// Set EnaSupport to true
// As of February 2017, this applies to C5, I3, P2, R4, X1, and m4.16xlarge
registerOpts.EnaSupport = aws.Bool(true)
}
-
registerResp, err := ec2conn.RegisterImage(registerOpts)
if err != nil {
state.Put("error", fmt.Errorf("Error registering AMI: %s", err))
@@ -125,3 +118,18 @@ func (s *StepRegisterAMI) Cleanup(state multistep.StateBag) {
return
}
}
+
+func DeduplicateRootVolume(BlockDevices []*ec2.BlockDeviceMapping, RootDevice RootBlockDevice, snapshotId string) []*ec2.BlockDeviceMapping {
+ // Defensive coding to make sure we only add the root volume once
+ blockDevicesExcludingRoot := make([]*ec2.BlockDeviceMapping, 0, len(BlockDevices))
+ for _, blockDevice := range BlockDevices {
+ if *blockDevice.DeviceName == RootDevice.SourceDeviceName {
+ continue
+ }
+
+ blockDevicesExcludingRoot = append(blockDevicesExcludingRoot, blockDevice)
+ }
+
+ blockDevicesExcludingRoot = append(blockDevicesExcludingRoot, RootDevice.createBlockDeviceMapping(snapshotId))
+ return blockDevicesExcludingRoot
+}
diff --git a/builder/amazon/ebssurrogate/step_register_ami_test.go b/builder/amazon/ebssurrogate/step_register_ami_test.go
new file mode 100644
index 000000000..b2abd7827
--- /dev/null
+++ b/builder/amazon/ebssurrogate/step_register_ami_test.go
@@ -0,0 +1,37 @@
+package ebssurrogate
+
+import (
+ "testing"
+
+ "github.com/aws/aws-sdk-go/service/ec2"
+)
+
+func GetStringPointer() *string {
+ tmp := "/dev/name"
+ return &tmp
+}
+
+func GetTestDevice() *ec2.BlockDeviceMapping {
+ TestDev := ec2.BlockDeviceMapping{
+ DeviceName: GetStringPointer(),
+ }
+ return &TestDev
+}
+
+func TestStepRegisterAmi_DeduplicateRootVolume(t *testing.T) {
+ TestRootDevice := RootBlockDevice{}
+ TestRootDevice.SourceDeviceName = "/dev/name"
+
+ blockDevices := []*ec2.BlockDeviceMapping{}
+ blockDevicesExcludingRoot := DeduplicateRootVolume(blockDevices, TestRootDevice, "12342351")
+ if len(blockDevicesExcludingRoot) != 1 {
+ t.Fatalf("Unexpected length of block devices list")
+ }
+
+ TestBlockDevice := GetTestDevice()
+ blockDevices = append(blockDevices, TestBlockDevice)
+ blockDevicesExcludingRoot = DeduplicateRootVolume(blockDevices, TestRootDevice, "12342351")
+ if len(blockDevicesExcludingRoot) != 1 {
+ t.Fatalf("Unexpected length of block devices list")
+ }
+}
diff --git a/builder/amazon/ebsvolume/builder.go b/builder/amazon/ebsvolume/builder.go
index 098cb4c9e..7cab85e91 100644
--- a/builder/amazon/ebsvolume/builder.go
+++ b/builder/amazon/ebsvolume/builder.go
@@ -23,8 +23,9 @@ type Config struct {
awscommon.AccessConfig `mapstructure:",squash"`
awscommon.RunConfig `mapstructure:",squash"`
- VolumeMappings []BlockDevice `mapstructure:"ebs_volumes"`
- AMIEnhancedNetworking bool `mapstructure:"enhanced_networking"`
+ VolumeMappings []BlockDevice `mapstructure:"ebs_volumes"`
+ AMIENASupport bool `mapstructure:"ena_support"`
+ AMISriovNetSupport bool `mapstructure:"sriov_support"`
launchBlockDevices awscommon.BlockDevices
ctx interpolate.Context
@@ -100,27 +101,27 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state.Put("hook", hook)
state.Put("ui", ui)
- // Build the steps
- steps := []multistep.Step{
- &awscommon.StepSourceAMIInfo{
- SourceAmi: b.config.SourceAmi,
- EnhancedNetworking: b.config.AMIEnhancedNetworking,
- AmiFilters: b.config.SourceAmiFilter,
- },
- &awscommon.StepKeyPair{
- Debug: b.config.PackerDebug,
- SSHAgentAuth: b.config.Comm.SSHAgentAuth,
- DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName),
- KeyPairName: b.config.SSHKeyPairName,
- TemporaryKeyPairName: b.config.TemporaryKeyPairName,
- PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
- },
- &awscommon.StepSecurityGroup{
- SecurityGroupIds: b.config.SecurityGroupIds,
- CommConfig: &b.config.RunConfig.Comm,
- VpcId: b.config.VpcId,
- },
- &awscommon.StepRunSourceInstance{
+ var instanceStep multistep.Step
+
+ if b.config.SpotPrice == "" || b.config.SpotPrice == "0" {
+ instanceStep = &awscommon.StepRunSourceInstance{
+ Debug: b.config.PackerDebug,
+ ExpectedRootDevice: "ebs",
+ InstanceType: b.config.InstanceType,
+ UserData: b.config.UserData,
+ UserDataFile: b.config.UserDataFile,
+ SourceAMI: b.config.SourceAmi,
+ IamInstanceProfile: b.config.IamInstanceProfile,
+ SubnetId: b.config.SubnetId,
+ AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
+ EbsOptimized: b.config.EbsOptimized,
+ AvailabilityZone: b.config.AvailabilityZone,
+ Tags: b.config.RunTags,
+ Ctx: b.config.ctx,
+ InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ } else {
+ instanceStep = &awscommon.StepRunSpotInstance{
Debug: b.config.PackerDebug,
ExpectedRootDevice: "ebs",
SpotPrice: b.config.SpotPrice,
@@ -134,15 +135,35 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
EbsOptimized: b.config.EbsOptimized,
AvailabilityZone: b.config.AvailabilityZone,
- BlockDevices: b.config.launchBlockDevices,
Tags: b.config.RunTags,
Ctx: b.config.ctx,
InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ }
+
+ // Build the steps
+ steps := []multistep.Step{
+ &awscommon.StepSourceAMIInfo{
+ SourceAmi: b.config.SourceAmi,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
+ AmiFilters: b.config.SourceAmiFilter,
},
- &stepTagEBSVolumes{
- VolumeMapping: b.config.VolumeMappings,
- Ctx: b.config.ctx,
+ &awscommon.StepKeyPair{
+ Debug: b.config.PackerDebug,
+ SSHAgentAuth: b.config.Comm.SSHAgentAuth,
+ DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName),
+ KeyPairName: b.config.SSHKeyPairName,
+ TemporaryKeyPairName: b.config.TemporaryKeyPairName,
+ PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
},
+ &awscommon.StepSecurityGroup{
+ SecurityGroupIds: b.config.SecurityGroupIds,
+ CommConfig: &b.config.RunConfig.Comm,
+ VpcId: b.config.VpcId,
+ TemporarySGSourceCidr: b.config.TemporarySGSourceCidr,
+ },
+ instanceStep,
&awscommon.StepGetPassword{
Debug: b.config.PackerDebug,
Comm: &b.config.RunConfig.Comm,
@@ -164,7 +185,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
DisableStopInstance: b.config.DisableStopInstance,
},
&awscommon.StepModifyEBSBackedInstance{
- EnableEnhancedNetworking: b.config.AMIEnhancedNetworking,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
},
}
diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go
index d45dc64d8..ebc93751e 100644
--- a/builder/amazon/instance/builder.go
+++ b/builder/amazon/instance/builder.go
@@ -193,6 +193,48 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state.Put("hook", hook)
state.Put("ui", ui)
+ var instanceStep multistep.Step
+
+ if b.config.SpotPrice == "" || b.config.SpotPrice == "0" {
+ instanceStep = &awscommon.StepRunSourceInstance{
+ Debug: b.config.PackerDebug,
+ ExpectedRootDevice: "ebs",
+ InstanceType: b.config.InstanceType,
+ UserData: b.config.UserData,
+ UserDataFile: b.config.UserDataFile,
+ SourceAMI: b.config.SourceAmi,
+ IamInstanceProfile: b.config.IamInstanceProfile,
+ SubnetId: b.config.SubnetId,
+ AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
+ EbsOptimized: b.config.EbsOptimized,
+ AvailabilityZone: b.config.AvailabilityZone,
+ BlockDevices: b.config.BlockDevices,
+ Tags: b.config.RunTags,
+ Ctx: b.config.ctx,
+ InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ } else {
+ instanceStep = &awscommon.StepRunSpotInstance{
+ Debug: b.config.PackerDebug,
+ ExpectedRootDevice: "ebs",
+ SpotPrice: b.config.SpotPrice,
+ SpotPriceProduct: b.config.SpotPriceAutoProduct,
+ InstanceType: b.config.InstanceType,
+ UserData: b.config.UserData,
+ UserDataFile: b.config.UserDataFile,
+ SourceAMI: b.config.SourceAmi,
+ IamInstanceProfile: b.config.IamInstanceProfile,
+ SubnetId: b.config.SubnetId,
+ AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
+ EbsOptimized: b.config.EbsOptimized,
+ AvailabilityZone: b.config.AvailabilityZone,
+ BlockDevices: b.config.BlockDevices,
+ Tags: b.config.RunTags,
+ Ctx: b.config.ctx,
+ InstanceInitiatedShutdownBehavior: b.config.InstanceInitiatedShutdownBehavior,
+ }
+ }
+
// Build the steps
steps := []multistep.Step{
&awscommon.StepPreValidate{
@@ -200,9 +242,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
ForceDeregister: b.config.AMIForceDeregister,
},
&awscommon.StepSourceAMIInfo{
- SourceAmi: b.config.SourceAmi,
- EnhancedNetworking: b.config.AMIEnhancedNetworking,
- AmiFilters: b.config.SourceAmiFilter,
+ SourceAmi: b.config.SourceAmi,
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
+ AmiFilters: b.config.SourceAmiFilter,
},
&awscommon.StepKeyPair{
Debug: b.config.PackerDebug,
@@ -216,24 +259,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
CommConfig: &b.config.RunConfig.Comm,
SecurityGroupIds: b.config.SecurityGroupIds,
VpcId: b.config.VpcId,
+ TemporarySGSourceCidr: b.config.TemporarySGSourceCidr,
},
- &awscommon.StepRunSourceInstance{
- Debug: b.config.PackerDebug,
- SpotPrice: b.config.SpotPrice,
- SpotPriceProduct: b.config.SpotPriceAutoProduct,
- InstanceType: b.config.InstanceType,
- IamInstanceProfile: b.config.IamInstanceProfile,
- UserData: b.config.UserData,
- UserDataFile: b.config.UserDataFile,
- SourceAMI: b.config.SourceAmi,
- SubnetId: b.config.SubnetId,
- AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
- EbsOptimized: b.config.EbsOptimized,
- AvailabilityZone: b.config.AvailabilityZone,
- BlockDevices: b.config.BlockDevices,
- Tags: b.config.RunTags,
- Ctx: b.config.ctx,
- },
+ instanceStep,
&awscommon.StepGetPassword{
Debug: b.config.PackerDebug,
Comm: &b.config.RunConfig.Comm,
@@ -258,11 +286,16 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
Debug: b.config.PackerDebug,
},
&awscommon.StepDeregisterAMI{
+ AccessConfig: &b.config.AccessConfig,
ForceDeregister: b.config.AMIForceDeregister,
ForceDeleteSnapshot: b.config.AMIForceDeleteSnapshot,
AMIName: b.config.AMIName,
+ Regions: b.config.AMIRegions,
+ },
+ &StepRegisterAMI{
+ EnableAMISriovNetSupport: b.config.AMISriovNetSupport,
+ EnableAMIENASupport: b.config.AMIENASupport,
},
- &StepRegisterAMI{},
&awscommon.StepAMIRegionCopy{
AccessConfig: &b.config.AccessConfig,
Regions: b.config.AMIRegions,
diff --git a/builder/amazon/instance/step_register_ami.go b/builder/amazon/instance/step_register_ami.go
index 01ba46bd9..d363bdfdd 100644
--- a/builder/amazon/instance/step_register_ami.go
+++ b/builder/amazon/instance/step_register_ami.go
@@ -10,7 +10,10 @@ import (
"github.com/mitchellh/multistep"
)
-type StepRegisterAMI struct{}
+type StepRegisterAMI struct {
+ EnableAMIENASupport bool
+ EnableAMISriovNetSupport bool
+}
func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
config := state.Get("config").(*Config)
@@ -29,12 +32,13 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
registerOpts.VirtualizationType = aws.String(config.AMIVirtType)
}
- if config.AMIEnhancedNetworking {
+ if s.EnableAMISriovNetSupport {
// Set SriovNetSupport to "simple". See http://goo.gl/icuXh5
// As of February 2017, this applies to C3, C4, D2, I2, R3, and M4 (excluding m4.16xlarge)
registerOpts.SriovNetSupport = aws.String("simple")
-
- // Set EnaSupport to true.
+ }
+ if s.EnableAMIENASupport {
+ // Set EnaSupport to true
// As of February 2017, this applies to C5, I3, P2, R4, X1, and m4.16xlarge
registerOpts.EnaSupport = aws.Bool(true)
}
diff --git a/builder/amazon/instance/step_upload_bundle.go b/builder/amazon/instance/step_upload_bundle.go
index ef4aed5e0..91abfc9b6 100644
--- a/builder/amazon/instance/step_upload_bundle.go
+++ b/builder/amazon/instance/step_upload_bundle.go
@@ -15,6 +15,7 @@ type uploadCmdData struct {
ManifestPath string
Region string
SecretKey string
+ Token string
}
type StepUploadBundle struct {
@@ -40,11 +41,13 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
secretKey := config.SecretKey
session, err := config.AccessConfig.Session()
accessConfig := session.Config
+ var token string
if err == nil && accessKey == "" && secretKey == "" {
credentials, err := accessConfig.Credentials.Get()
if err == nil {
accessKey = credentials.AccessKeyID
secretKey = credentials.SecretAccessKey
+ token = credentials.SessionToken
}
}
@@ -55,6 +58,7 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
ManifestPath: manifestPath,
Region: region,
SecretKey: secretKey,
+ Token: token,
}
config.BundleUploadCommand, err = interpolate.Render(config.BundleUploadCommand, &config.ctx)
if err != nil {
@@ -78,6 +82,12 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
}
if cmd.ExitStatus != 0 {
+ if cmd.ExitStatus == 3 {
+ ui.Error(fmt.Sprintf("Please check that the bucket `%s` "+
+ "does not exist, or exists and is writable. This error "+
+ "indicates that the bucket may be owned by somebody else.",
+ config.S3Bucket))
+ }
state.Put("error", fmt.Errorf(
"Bundle upload failed. Please see the output above for more\n"+
"details on what went wrong."))
diff --git a/builder/azure/arm/artifact.go b/builder/azure/arm/artifact.go
index eade5017b..e8a72091f 100644
--- a/builder/azure/arm/artifact.go
+++ b/builder/azure/arm/artifact.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/artifact_test.go b/builder/azure/arm/artifact_test.go
index 7202b6529..1b9a472af 100644
--- a/builder/azure/arm/artifact_test.go
+++ b/builder/azure/arm/artifact_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/authenticate.go b/builder/azure/arm/authenticate.go
index d89a12540..7f0b5bdc9 100644
--- a/builder/azure/arm/authenticate.go
+++ b/builder/azure/arm/authenticate.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/azure_client.go b/builder/azure/arm/azure_client.go
index 10c8d4bbe..3fd58bc34 100644
--- a/builder/azure/arm/azure_client.go
+++ b/builder/azure/arm/azure_client.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go
index 5377b7bb6..e6993cfb5 100644
--- a/builder/azure/arm/builder.go
+++ b/builder/azure/arm/builder.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
@@ -119,7 +116,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}
endpointConnectType := PublicEndpoint
- if b.isPrivateNetworkCommunication() {
+ if b.isPublicPrivateNetworkCommunication() && b.isPrivateNetworkCommunication() {
+ endpointConnectType = PublicEndpointInPrivateNetwork
+ } else if b.isPrivateNetworkCommunication() {
endpointConnectType = PrivateEndpoint
}
@@ -245,6 +244,10 @@ func (b *Builder) writeSSHPrivateKey(ui packer.Ui, debugKeyPath string) {
}
}
+func (b *Builder) isPublicPrivateNetworkCommunication() bool {
+ return DefaultPrivateVirtualNetworkWithPublicIp != b.config.PrivateVirtualNetworkWithPublicIp
+}
+
func (b *Builder) isPrivateNetworkCommunication() bool {
return b.config.VirtualNetworkName != ""
}
diff --git a/builder/azure/arm/builder_test.go b/builder/azure/arm/builder_test.go
index 47f7a74b5..a44d363d0 100644
--- a/builder/azure/arm/builder_test.go
+++ b/builder/azure/arm/builder_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/capture_template.go b/builder/azure/arm/capture_template.go
index 23e70199d..0332a02f4 100644
--- a/builder/azure/arm/capture_template.go
+++ b/builder/azure/arm/capture_template.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
type CaptureTemplateParameter struct {
diff --git a/builder/azure/arm/capture_template_test.go b/builder/azure/arm/capture_template_test.go
index 6d2e53b1e..8c7a71405 100644
--- a/builder/azure/arm/capture_template_test.go
+++ b/builder/azure/arm/capture_template_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go
index 1d0c98d14..3fc4f13b9 100644
--- a/builder/azure/arm/config.go
+++ b/builder/azure/arm/config.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
@@ -34,10 +31,11 @@ import (
)
const (
- DefaultCloudEnvironmentName = "Public"
- DefaultImageVersion = "latest"
- DefaultUserName = "packer"
- DefaultVMSize = "Standard_A1"
+ DefaultCloudEnvironmentName = "Public"
+ DefaultImageVersion = "latest"
+ DefaultUserName = "packer"
+ DefaultPrivateVirtualNetworkWithPublicIp = false
+ DefaultVMSize = "Standard_A1"
)
var (
@@ -73,24 +71,27 @@ type Config struct {
Location string `mapstructure:"location"`
VMSize string `mapstructure:"vm_size"`
- ManagedImageResourceGroupName string `mapstructure:"managed_image_resource_group_name"`
- ManagedImageName string `mapstructure:"managed_image_name"`
- manageImageLocation string
+ ManagedImageResourceGroupName string `mapstructure:"managed_image_resource_group_name"`
+ ManagedImageName string `mapstructure:"managed_image_name"`
+ ManagedImageStorageAccountType string `mapstructure:"managed_image_storage_account_type"`
+ managedImageStorageAccountType compute.StorageAccountTypes
+ manageImageLocation string
// Deployment
- AzureTags map[string]*string `mapstructure:"azure_tags"`
- ResourceGroupName string `mapstructure:"resource_group_name"`
- StorageAccount string `mapstructure:"storage_account"`
- TempComputeName string `mapstructure:"temp_compute_name"`
- TempResourceGroupName string `mapstructure:"temp_resource_group_name"`
- storageAccountBlobEndpoint string
- CloudEnvironmentName string `mapstructure:"cloud_environment_name"`
- cloudEnvironment *azure.Environment
- VirtualNetworkName string `mapstructure:"virtual_network_name"`
- VirtualNetworkSubnetName string `mapstructure:"virtual_network_subnet_name"`
- VirtualNetworkResourceGroupName string `mapstructure:"virtual_network_resource_group_name"`
- CustomDataFile string `mapstructure:"custom_data_file"`
- customData string
+ AzureTags map[string]*string `mapstructure:"azure_tags"`
+ ResourceGroupName string `mapstructure:"resource_group_name"`
+ StorageAccount string `mapstructure:"storage_account"`
+ TempComputeName string `mapstructure:"temp_compute_name"`
+ TempResourceGroupName string `mapstructure:"temp_resource_group_name"`
+ storageAccountBlobEndpoint string
+ CloudEnvironmentName string `mapstructure:"cloud_environment_name"`
+ cloudEnvironment *azure.Environment
+ PrivateVirtualNetworkWithPublicIp bool `mapstructure:"private_virtual_network_with_public_ip"`
+ VirtualNetworkName string `mapstructure:"virtual_network_name"`
+ VirtualNetworkSubnetName string `mapstructure:"virtual_network_subnet_name"`
+ VirtualNetworkResourceGroupName string `mapstructure:"virtual_network_resource_group_name"`
+ CustomDataFile string `mapstructure:"custom_data_file"`
+ customData string
// OS
OSType string `mapstructure:"os_type"`
@@ -403,6 +404,10 @@ func provideDefaultValues(c *Config) {
c.VMSize = DefaultVMSize
}
+ if c.ManagedImageStorageAccountType == "" {
+ c.managedImageStorageAccountType = compute.StandardLRS
+ }
+
if c.ImagePublisher != "" && c.ImageVersion == "" {
c.ImageVersion = DefaultImageVersion
}
@@ -526,6 +531,10 @@ func assertRequiredParametersSet(c *Config, errs *packer.MultiError) {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("Specify either a VHD (image_url), Image Reference (image_publisher, image_offer, image_sku) or a Managed Disk (custom_managed_disk_image_name, custom_managed_disk_resource_group_name"))
}
+ if isImageUrl && c.ManagedImageResourceGroupName != "" {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("A managed image must be created from a managed image, it cannot be created from a VHD."))
+ }
+
if c.ImageUrl == "" && c.CustomManagedImageName == "" {
if c.ImagePublisher == "" {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("An image_publisher must be specified"))
@@ -596,4 +605,13 @@ func assertRequiredParametersSet(c *Config, errs *packer.MultiError) {
} else {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("The os_type %q is invalid", c.OSType))
}
+
+ switch c.ManagedImageStorageAccountType {
+ case "", string(compute.StandardLRS):
+ c.managedImageStorageAccountType = compute.StandardLRS
+ case string(compute.PremiumLRS):
+ c.managedImageStorageAccountType = compute.PremiumLRS
+ default:
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("The managed_image_storage_account_type %q is invalid", c.ManagedImageStorageAccountType))
+ }
}
diff --git a/builder/azure/arm/config_test.go b/builder/azure/arm/config_test.go
index 835454718..b7523f655 100644
--- a/builder/azure/arm/config_test.go
+++ b/builder/azure/arm/config_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
@@ -9,6 +6,7 @@ import (
"testing"
"time"
+ "github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/hashicorp/packer/builder/azure/common/constants"
"github.com/hashicorp/packer/packer"
)
@@ -48,6 +46,10 @@ func TestConfigShouldProvideReasonableDefaultValues(t *testing.T) {
if c.ObjectID != "" {
t.Errorf("Expected 'ObjectID' to be nil, but it was '%s'!", c.ObjectID)
}
+
+ if c.managedImageStorageAccountType == "" {
+ t.Errorf("Expected 'managedImageStorageAccountType' to be populated, but it was empty!")
+ }
}
func TestConfigShouldBeAbleToOverrideDefaultedValues(t *testing.T) {
@@ -56,6 +58,7 @@ func TestConfigShouldBeAbleToOverrideDefaultedValues(t *testing.T) {
builderValues["ssh_username"] = "override_username"
builderValues["vm_size"] = "override_vm_size"
builderValues["communicator"] = "ssh"
+ builderValues["managed_image_storage_account_type"] = "Premium_LRS"
c, _, err := newConfig(builderValues, getPackerConfiguration())
@@ -64,23 +67,27 @@ func TestConfigShouldBeAbleToOverrideDefaultedValues(t *testing.T) {
}
if c.Password != "override_password" {
- t.Errorf("Expected 'Password' to be set to 'override_password', but found '%s'!", c.Password)
+ t.Errorf("Expected 'Password' to be set to 'override_password', but found %q!", c.Password)
}
if c.Comm.SSHPassword != "override_password" {
- t.Errorf("Expected 'c.Comm.SSHPassword' to be set to 'override_password', but found '%s'!", c.Comm.SSHPassword)
+ t.Errorf("Expected 'c.Comm.SSHPassword' to be set to 'override_password', but found %q!", c.Comm.SSHPassword)
}
if c.UserName != "override_username" {
- t.Errorf("Expected 'UserName' to be set to 'override_username', but found '%s'!", c.UserName)
+ t.Errorf("Expected 'UserName' to be set to 'override_username', but found %q!", c.UserName)
}
if c.Comm.SSHUsername != "override_username" {
- t.Errorf("Expected 'c.Comm.SSHUsername' to be set to 'override_username', but found '%s'!", c.Comm.SSHUsername)
+ t.Errorf("Expected 'c.Comm.SSHUsername' to be set to 'override_username', but found %q!", c.Comm.SSHUsername)
}
if c.VMSize != "override_vm_size" {
- t.Errorf("Expected 'vm_size' to be set to 'override_vm_size', but found '%s'!", c.VMSize)
+ t.Errorf("Expected 'vm_size' to be set to 'override_vm_size', but found %q!", c.VMSize)
+ }
+
+ if c.managedImageStorageAccountType != compute.PremiumLRS {
+ t.Errorf("Expected 'managed_image_storage_account_type' to be set to 'Premium_LRS', but found %q!", c.managedImageStorageAccountType)
}
}
@@ -782,6 +789,26 @@ func TestConfigShouldRejectVhdAndManagedImageOutput(t *testing.T) {
}
}
+// If the user specified a build of a VHD, but started with a managed image it should be rejected.
+func TestConfigShouldRejectManagedImageSourceAndVhdOutput(t *testing.T) {
+ config := map[string]interface{}{
+ "image_url": "ignore",
+ "location": "ignore",
+ "subscription_id": "ignore",
+ "communicator": "none",
+ "managed_image_resource_group_name": "ignore",
+ "managed_image_name": "ignore",
+
+ // Does not matter for this test case, just pick one.
+ "os_type": constants.Target_Linux,
+ }
+
+ _, _, err := newConfig(config, getPackerConfiguration())
+ if err == nil {
+ t.Fatal("expected config to reject VHD and Managed Image build")
+ }
+}
+
func TestConfigShouldRejectCustomAndPlatformManagedImageBuild(t *testing.T) {
config := map[string]interface{}{
"custom_managed_image_resource_group_name": "ignore",
@@ -826,6 +853,52 @@ func TestConfigShouldRejectCustomAndImageUrlForManagedImageBuild(t *testing.T) {
}
}
+func TestConfigShouldRejectMalformedManageImageStorageAccountTypes(t *testing.T) {
+ config := map[string]interface{}{
+ "custom_managed_image_resource_group_name": "ignore",
+ "custom_managed_image_name": "ignore",
+ "location": "ignore",
+ "subscription_id": "ignore",
+ "communicator": "none",
+ "managed_image_resource_group_name": "ignore",
+ "managed_image_name": "ignore",
+ "managed_image_storage_account_type": "--invalid--",
+
+ // Does not matter for this test case, just pick one.
+ "os_type": constants.Target_Linux,
+ }
+
+ _, _, err := newConfig(config, getPackerConfiguration())
+ if err == nil {
+ t.Fatal("expected config to reject custom and platform input for a managed image build")
+ }
+}
+
+func TestConfigShouldAcceptManagedImageStorageAccountTypes(t *testing.T) {
+ config := map[string]interface{}{
+ "custom_managed_image_resource_group_name": "ignore",
+ "custom_managed_image_name": "ignore",
+ "location": "ignore",
+ "subscription_id": "ignore",
+ "communicator": "none",
+ "managed_image_resource_group_name": "ignore",
+ "managed_image_name": "ignore",
+
+ // Does not matter for this test case, just pick one.
+ "os_type": constants.Target_Linux,
+ }
+
+ storage_account_types := []string{"Premium_LRS", "Standard_LRS"}
+
+ for _, x := range storage_account_types {
+ config["managed_image_storage_account_type"] = x
+ _, _, err := newConfig(config, getPackerConfiguration())
+ if err != nil {
+ t.Fatalf("expected config to accept a managed_image_storage_account_type of %q", x)
+ }
+ }
+}
+
func getArmBuilderConfiguration() map[string]string {
m := make(map[string]string)
for _, v := range requiredConfigValues {
diff --git a/builder/azure/arm/openssh_key_pair.go b/builder/azure/arm/openssh_key_pair.go
index 4f8c8d22c..e3b296f33 100644
--- a/builder/azure/arm/openssh_key_pair.go
+++ b/builder/azure/arm/openssh_key_pair.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/openssh_key_pair_test.go b/builder/azure/arm/openssh_key_pair_test.go
index 7e2f69573..fae03105e 100644
--- a/builder/azure/arm/openssh_key_pair_test.go
+++ b/builder/azure/arm/openssh_key_pair_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step.go b/builder/azure/arm/step.go
index 574527f8d..707a1a07e 100644
--- a/builder/azure/arm/step.go
+++ b/builder/azure/arm/step.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_capture_image.go b/builder/azure/arm/step_capture_image.go
index eac4b5c63..10d29069e 100644
--- a/builder/azure/arm/step_capture_image.go
+++ b/builder/azure/arm/step_capture_image.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_capture_image_test.go b/builder/azure/arm/step_capture_image_test.go
index 24bba776e..4527627a3 100644
--- a/builder/azure/arm/step_capture_image_test.go
+++ b/builder/azure/arm/step_capture_image_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_create_resource_group.go b/builder/azure/arm/step_create_resource_group.go
index b8e24149a..079ad5279 100644
--- a/builder/azure/arm/step_create_resource_group.go
+++ b/builder/azure/arm/step_create_resource_group.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_create_resource_group_test.go b/builder/azure/arm/step_create_resource_group_test.go
index ca0c8f18b..4e6b7592f 100644
--- a/builder/azure/arm/step_create_resource_group_test.go
+++ b/builder/azure/arm/step_create_resource_group_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_delete_os_disk.go b/builder/azure/arm/step_delete_os_disk.go
index 0041a8ec6..1dd28ec85 100644
--- a/builder/azure/arm/step_delete_os_disk.go
+++ b/builder/azure/arm/step_delete_os_disk.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_delete_os_disk_test.go b/builder/azure/arm/step_delete_os_disk_test.go
index 6e2e2d9a9..2724ee611 100644
--- a/builder/azure/arm/step_delete_os_disk_test.go
+++ b/builder/azure/arm/step_delete_os_disk_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_delete_resource_group.go b/builder/azure/arm/step_delete_resource_group.go
index 5a1683287..2606b9fc8 100644
--- a/builder/azure/arm/step_delete_resource_group.go
+++ b/builder/azure/arm/step_delete_resource_group.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_delete_resource_group_test.go b/builder/azure/arm/step_delete_resource_group_test.go
index fb2882a49..25ab14e4d 100644
--- a/builder/azure/arm/step_delete_resource_group_test.go
+++ b/builder/azure/arm/step_delete_resource_group_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_deploy_template.go b/builder/azure/arm/step_deploy_template.go
index 962486846..8d73402b7 100644
--- a/builder/azure/arm/step_deploy_template.go
+++ b/builder/azure/arm/step_deploy_template.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_deploy_template_test.go b/builder/azure/arm/step_deploy_template_test.go
index 57bfce7d4..3a1d0c0bc 100644
--- a/builder/azure/arm/step_deploy_template_test.go
+++ b/builder/azure/arm/step_deploy_template_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_get_certificate.go b/builder/azure/arm/step_get_certificate.go
index ffc27b141..b9126da36 100644
--- a/builder/azure/arm/step_get_certificate.go
+++ b/builder/azure/arm/step_get_certificate.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_get_certificate_test.go b/builder/azure/arm/step_get_certificate_test.go
index 46c921a36..553806c5e 100644
--- a/builder/azure/arm/step_get_certificate_test.go
+++ b/builder/azure/arm/step_get_certificate_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_get_ip_address.go b/builder/azure/arm/step_get_ip_address.go
index fed78afbb..2c8165b0b 100644
--- a/builder/azure/arm/step_get_ip_address.go
+++ b/builder/azure/arm/step_get_ip_address.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
@@ -16,12 +13,14 @@ type EndpointType int
const (
PublicEndpoint EndpointType = iota
PrivateEndpoint
+ PublicEndpointInPrivateNetwork
)
var (
EndpointCommunicationText = map[EndpointType]string{
- PublicEndpoint: "PublicEndpoint",
- PrivateEndpoint: "PrivateEndpoint",
+ PublicEndpoint: "PublicEndpoint",
+ PrivateEndpoint: "PrivateEndpoint",
+ PublicEndpointInPrivateNetwork: "PublicEndpointInPrivateNetwork",
}
)
@@ -46,6 +45,8 @@ func NewStepGetIPAddress(client *AzureClient, ui packer.Ui, endpoint EndpointTyp
step.get = step.getPrivateIP
case PublicEndpoint:
step.get = step.getPublicIP
+ case PublicEndpointInPrivateNetwork:
+ step.get = step.getPublicIPInPrivateNetwork
}
return step
@@ -70,6 +71,11 @@ func (s *StepGetIPAddress) getPublicIP(resourceGroupName string, ipAddressName s
return *resp.IPAddress, nil
}
+func (s *StepGetIPAddress) getPublicIPInPrivateNetwork(resourceGroupName string, ipAddressName string, interfaceName string) (string, error) {
+ s.getPrivateIP(resourceGroupName, ipAddressName, interfaceName)
+ return s.getPublicIP(resourceGroupName, ipAddressName, interfaceName)
+}
+
func (s *StepGetIPAddress) Run(state multistep.StateBag) multistep.StepAction {
s.say("Getting the VM's IP address ...")
diff --git a/builder/azure/arm/step_get_ip_address_test.go b/builder/azure/arm/step_get_ip_address_test.go
index a0b854ed0..1403e9a51 100644
--- a/builder/azure/arm/step_get_ip_address_test.go
+++ b/builder/azure/arm/step_get_ip_address_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
@@ -12,42 +9,50 @@ import (
)
func TestStepGetIPAddressShouldFailIfGetFails(t *testing.T) {
- var testSubject = &StepGetIPAddress{
- get: func(string, string, string) (string, error) { return "", fmt.Errorf("!! Unit Test FAIL !!") },
- endpoint: PublicEndpoint,
- say: func(message string) {},
- error: func(e error) {},
- }
+ endpoints := []EndpointType{PublicEndpoint, PublicEndpointInPrivateNetwork}
- stateBag := createTestStateBagStepGetIPAddress()
+ for _, endpoint := range endpoints {
+ var testSubject = &StepGetIPAddress{
+ get: func(string, string, string) (string, error) { return "", fmt.Errorf("!! Unit Test FAIL !!") },
+ endpoint: endpoint,
+ say: func(message string) {},
+ error: func(e error) {},
+ }
- var result = testSubject.Run(stateBag)
- if result != multistep.ActionHalt {
- t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
- }
+ stateBag := createTestStateBagStepGetIPAddress()
- if _, ok := stateBag.GetOk(constants.Error); ok == false {
- t.Fatalf("Expected the step to set stateBag['%s'], but it was not.", constants.Error)
+ var result = testSubject.Run(stateBag)
+ if result != multistep.ActionHalt {
+ t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
+ }
+
+ if _, ok := stateBag.GetOk(constants.Error); ok == false {
+ t.Fatalf("Expected the step to set stateBag['%s'], but it was not.", constants.Error)
+ }
}
}
func TestStepGetIPAddressShouldPassIfGetPasses(t *testing.T) {
- var testSubject = &StepGetIPAddress{
- get: func(string, string, string) (string, error) { return "", nil },
- endpoint: PublicEndpoint,
- say: func(message string) {},
- error: func(e error) {},
- }
+ endpoints := []EndpointType{PublicEndpoint, PublicEndpointInPrivateNetwork}
- stateBag := createTestStateBagStepGetIPAddress()
+ for _, endpoint := range endpoints {
+ var testSubject = &StepGetIPAddress{
+ get: func(string, string, string) (string, error) { return "", nil },
+ endpoint: endpoint,
+ say: func(message string) {},
+ error: func(e error) {},
+ }
- var result = testSubject.Run(stateBag)
- if result != multistep.ActionContinue {
- t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
- }
+ stateBag := createTestStateBagStepGetIPAddress()
- if _, ok := stateBag.GetOk(constants.Error); ok == true {
- t.Fatalf("Expected the step to not set stateBag['%s'], but it was.", constants.Error)
+ var result = testSubject.Run(stateBag)
+ if result != multistep.ActionContinue {
+ t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
+ }
+
+ if _, ok := stateBag.GetOk(constants.Error); ok == true {
+ t.Fatalf("Expected the step to not set stateBag['%s'], but it was.", constants.Error)
+ }
}
}
@@ -55,50 +60,53 @@ func TestStepGetIPAddressShouldTakeStepArgumentsFromStateBag(t *testing.T) {
var actualResourceGroupName string
var actualIPAddressName string
var actualNicName string
+ endpoints := []EndpointType{PublicEndpoint, PublicEndpointInPrivateNetwork}
- var testSubject = &StepGetIPAddress{
- get: func(resourceGroupName string, ipAddressName string, nicName string) (string, error) {
- actualResourceGroupName = resourceGroupName
- actualIPAddressName = ipAddressName
- actualNicName = nicName
+ for _, endpoint := range endpoints {
+ var testSubject = &StepGetIPAddress{
+ get: func(resourceGroupName string, ipAddressName string, nicName string) (string, error) {
+ actualResourceGroupName = resourceGroupName
+ actualIPAddressName = ipAddressName
+ actualNicName = nicName
- return "127.0.0.1", nil
- },
- endpoint: PublicEndpoint,
- say: func(message string) {},
- error: func(e error) {},
- }
+ return "127.0.0.1", nil
+ },
+ endpoint: endpoint,
+ say: func(message string) {},
+ error: func(e error) {},
+ }
- stateBag := createTestStateBagStepGetIPAddress()
- var result = testSubject.Run(stateBag)
+ stateBag := createTestStateBagStepGetIPAddress()
+ var result = testSubject.Run(stateBag)
- if result != multistep.ActionContinue {
- t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
- }
+ if result != multistep.ActionContinue {
+ t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
+ }
- var expectedResourceGroupName = stateBag.Get(constants.ArmResourceGroupName).(string)
- var expectedIPAddressName = stateBag.Get(constants.ArmPublicIPAddressName).(string)
- var expectedNicName = stateBag.Get(constants.ArmNicName).(string)
+ var expectedResourceGroupName = stateBag.Get(constants.ArmResourceGroupName).(string)
+ var expectedIPAddressName = stateBag.Get(constants.ArmPublicIPAddressName).(string)
+ var expectedNicName = stateBag.Get(constants.ArmNicName).(string)
- if actualIPAddressName != expectedIPAddressName {
- t.Fatal("Expected StepGetIPAddress to source 'constants.ArmIPAddressName' from the state bag, but it did not.")
- }
+ if actualIPAddressName != expectedIPAddressName {
+ t.Fatal("Expected StepGetIPAddress to source 'constants.ArmIPAddressName' from the state bag, but it did not.")
+ }
- if actualResourceGroupName != expectedResourceGroupName {
- t.Fatal("Expected StepGetIPAddress to source 'constants.ArmResourceGroupName' from the state bag, but it did not.")
- }
+ if actualResourceGroupName != expectedResourceGroupName {
+ t.Fatal("Expected StepGetIPAddress to source 'constants.ArmResourceGroupName' from the state bag, but it did not.")
+ }
- if actualNicName != expectedNicName {
- t.Fatalf("Expected StepGetIPAddress to source 'constants.ArmNetworkInterfaceName' from the state bag, but it did not.")
- }
+ if actualNicName != expectedNicName {
+ t.Fatalf("Expected StepGetIPAddress to source 'constants.ArmNetworkInterfaceName' from the state bag, but it did not.")
+ }
- expectedIPAddress, ok := stateBag.GetOk(constants.SSHHost)
- if !ok {
- t.Fatalf("Expected the state bag to have a value for '%s', but it did not.", constants.SSHHost)
- }
+ expectedIPAddress, ok := stateBag.GetOk(constants.SSHHost)
+ if !ok {
+ t.Fatalf("Expected the state bag to have a value for '%s', but it did not.", constants.SSHHost)
+ }
- if expectedIPAddress != "127.0.0.1" {
- t.Fatalf("Expected the value of stateBag[%s] to be '127.0.0.1', but got '%s'.", constants.SSHHost, expectedIPAddress)
+ if expectedIPAddress != "127.0.0.1" {
+ t.Fatalf("Expected the value of stateBag[%s] to be '127.0.0.1', but got '%s'.", constants.SSHHost, expectedIPAddress)
+ }
}
}
diff --git a/builder/azure/arm/step_get_os_disk.go b/builder/azure/arm/step_get_os_disk.go
index 6b21d57de..511ab5c51 100644
--- a/builder/azure/arm/step_get_os_disk.go
+++ b/builder/azure/arm/step_get_os_disk.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_get_os_disk_test.go b/builder/azure/arm/step_get_os_disk_test.go
index 9b647492e..2b3a4d5d6 100644
--- a/builder/azure/arm/step_get_os_disk_test.go
+++ b/builder/azure/arm/step_get_os_disk_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_power_off_compute.go b/builder/azure/arm/step_power_off_compute.go
index a1d38f349..931050e04 100644
--- a/builder/azure/arm/step_power_off_compute.go
+++ b/builder/azure/arm/step_power_off_compute.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_power_off_compute_test.go b/builder/azure/arm/step_power_off_compute_test.go
index 71004256c..2dcdac7f6 100644
--- a/builder/azure/arm/step_power_off_compute_test.go
+++ b/builder/azure/arm/step_power_off_compute_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_set_certificate.go b/builder/azure/arm/step_set_certificate.go
index a2263d12a..5e865b882 100644
--- a/builder/azure/arm/step_set_certificate.go
+++ b/builder/azure/arm/step_set_certificate.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_set_certificate_test.go b/builder/azure/arm/step_set_certificate_test.go
index 5bcb7dffa..1ad9b7dbe 100644
--- a/builder/azure/arm/step_set_certificate_test.go
+++ b/builder/azure/arm/step_set_certificate_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_test.go b/builder/azure/arm/step_test.go
index 060c12355..2b10c8781 100644
--- a/builder/azure/arm/step_test.go
+++ b/builder/azure/arm/step_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_validate_template.go b/builder/azure/arm/step_validate_template.go
index 5a041f912..d2b98638b 100644
--- a/builder/azure/arm/step_validate_template.go
+++ b/builder/azure/arm/step_validate_template.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/step_validate_template_test.go b/builder/azure/arm/step_validate_template_test.go
index 071d10d86..a56030787 100644
--- a/builder/azure/arm/step_validate_template_test.go
+++ b/builder/azure/arm/step_validate_template_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/template_factory.go b/builder/azure/arm/template_factory.go
index 3cd00845f..16fe7bf93 100644
--- a/builder/azure/arm/template_factory.go
+++ b/builder/azure/arm/template_factory.go
@@ -53,7 +53,7 @@ func GetVirtualMachineDeployment(config *Config) (*resources.Deployment, error)
if config.ImageUrl != "" {
builder.SetImageUrl(config.ImageUrl, osType)
} else if config.CustomManagedImageName != "" {
- builder.SetManagedDiskUrl(config.customManagedImageID)
+ builder.SetManagedDiskUrl(config.customManagedImageID, config.managedImageStorageAccountType)
} else if config.ManagedImageName != "" && config.ImagePublisher != "" {
imageID := fmt.Sprintf("/subscriptions/%s/providers/Microsoft.Compute/locations/%s/publishers/%s/ArtifactTypes/vmimage/offers/%s/skus/%s/versions/%s",
config.SubscriptionID,
@@ -63,7 +63,7 @@ func GetVirtualMachineDeployment(config *Config) (*resources.Deployment, error)
config.ImageSku,
config.ImageVersion)
- builder.SetManagedMarketplaceImage(config.Location, config.ImagePublisher, config.ImageOffer, config.ImageSku, config.ImageVersion, imageID)
+ builder.SetManagedMarketplaceImage(config.Location, config.ImagePublisher, config.ImageOffer, config.ImageSku, config.ImageVersion, imageID, config.managedImageStorageAccountType)
} else {
builder.SetMarketPlaceImage(config.ImagePublisher, config.ImageOffer, config.ImageSku, config.ImageVersion)
}
@@ -76,7 +76,12 @@ func GetVirtualMachineDeployment(config *Config) (*resources.Deployment, error)
builder.SetCustomData(config.customData)
}
- if config.VirtualNetworkName != "" {
+ if config.VirtualNetworkName != "" && DefaultPrivateVirtualNetworkWithPublicIp != config.PrivateVirtualNetworkWithPublicIp {
+ builder.SetPrivateVirtualNetworWithPublicIp(
+ config.VirtualNetworkResourceGroupName,
+ config.VirtualNetworkName,
+ config.VirtualNetworkSubnetName)
+ } else if config.VirtualNetworkName != "" {
builder.SetVirtualNetwork(
config.VirtualNetworkResourceGroupName,
config.VirtualNetworkName,
diff --git a/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment08.approved.json b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment08.approved.json
index 7089ed59c..c567b774c 100644
--- a/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment08.approved.json
+++ b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment08.approved.json
@@ -129,6 +129,9 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "fromImage",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
"name": "osdisk",
"osType": "Linux"
}
diff --git a/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment09.approved.json b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment09.approved.json
index 03a00fa32..fbbb7384e 100644
--- a/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment09.approved.json
+++ b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment09.approved.json
@@ -132,6 +132,9 @@
"osDisk": {
"caching": "ReadWrite",
"createOption": "fromImage",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
"name": "osdisk",
"osType": "Linux"
}
diff --git a/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json
new file mode 100644
index 000000000..0eb130138
--- /dev/null
+++ b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json
@@ -0,0 +1,144 @@
+{
+ "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "adminPassword": {
+ "type": "string"
+ },
+ "adminUsername": {
+ "type": "string"
+ },
+ "dnsNameForPublicIP": {
+ "type": "string"
+ },
+ "osDiskName": {
+ "type": "string"
+ },
+ "storageAccountBlobEndpoint": {
+ "type": "string"
+ },
+ "vmName": {
+ "type": "string"
+ },
+ "vmSize": {
+ "type": "string"
+ }
+ },
+ "resources": [
+ {
+ "apiVersion": "[variables('publicIPAddressApiVersion')]",
+ "location": "[variables('location')]",
+ "name": "[variables('publicIPAddressName')]",
+ "properties": {
+ "dnsSettings": {
+ "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
+ },
+ "publicIPAllocationMethod": "[variables('publicIPAddressType')]"
+ },
+ "type": "Microsoft.Network/publicIPAddresses"
+ },
+ {
+ "apiVersion": "[variables('networkInterfacesApiVersion')]",
+ "dependsOn": [
+ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
+ ],
+ "location": "[variables('location')]",
+ "name": "[variables('nicName')]",
+ "properties": {
+ "ipConfigurations": [
+ {
+ "name": "ipconfig",
+ "properties": {
+ "privateIPAllocationMethod": "Dynamic",
+ "publicIPAddress": {
+ "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
+ },
+ "subnet": {
+ "id": "[variables('subnetRef')]"
+ }
+ }
+ }
+ ]
+ },
+ "type": "Microsoft.Network/networkInterfaces"
+ },
+ {
+ "apiVersion": "[variables('apiVersion')]",
+ "dependsOn": [
+ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
+ ],
+ "location": "[variables('location')]",
+ "name": "[parameters('vmName')]",
+ "properties": {
+ "diagnosticsProfile": {
+ "bootDiagnostics": {
+ "enabled": false
+ }
+ },
+ "hardwareProfile": {
+ "vmSize": "[parameters('vmSize')]"
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
+ }
+ ]
+ },
+ "osProfile": {
+ "adminPassword": "[parameters('adminPassword')]",
+ "adminUsername": "[parameters('adminUsername')]",
+ "computerName": "[parameters('vmName')]",
+ "linuxConfiguration": {
+ "ssh": {
+ "publicKeys": [
+ {
+ "keyData": "",
+ "path": "[variables('sshKeyPath')]"
+ }
+ ]
+ }
+ }
+ },
+ "storageProfile": {
+ "imageReference": {
+ "offer": "--image-offer--",
+ "publisher": "--image-publisher--",
+ "sku": "--image-sku--",
+ "version": "--version--"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "createOption": "fromImage",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
+ "name": "osdisk",
+ "osType": "Linux"
+ }
+ }
+ },
+ "type": "Microsoft.Compute/virtualMachines"
+ }
+ ],
+ "variables": {
+ "addressPrefix": "10.0.0.0/16",
+ "apiVersion": "2017-03-30",
+ "location": "[resourceGroup().location]",
+ "managedDiskApiVersion": "2017-03-30",
+ "networkInterfacesApiVersion": "2017-04-01",
+ "nicName": "packerNic",
+ "publicIPAddressApiVersion": "2017-04-01",
+ "publicIPAddressName": "packerPublicIP",
+ "publicIPAddressType": "Dynamic",
+ "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
+ "subnetAddressPrefix": "10.0.0.0/24",
+ "subnetName": "--virtual_network_subnet_name--",
+ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
+ "virtualNetworkName": "--virtual_network_name--",
+ "virtualNetworkResourceGroup": "--virtual_network_resource_group_name--",
+ "virtualNetworksApiVersion": "2017-04-01",
+ "vmStorageAccountContainerName": "images",
+ "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
+ }
+}
\ No newline at end of file
diff --git a/builder/azure/arm/template_factory_test.go b/builder/azure/arm/template_factory_test.go
index 8a6e0c650..b571871ef 100644
--- a/builder/azure/arm/template_factory_test.go
+++ b/builder/azure/arm/template_factory_test.go
@@ -318,6 +318,43 @@ func TestVirtualMachineDeployment09(t *testing.T) {
}
}
+// Ensure the VM template is correct when building with PublicIp and connect to Private Network
+func TestVirtualMachineDeployment10(t *testing.T) {
+ config := map[string]interface{}{
+ "location": "ignore",
+ "subscription_id": "ignore",
+ "os_type": constants.Target_Linux,
+ "communicator": "none",
+ "image_publisher": "--image-publisher--",
+ "image_offer": "--image-offer--",
+ "image_sku": "--image-sku--",
+ "image_version": "--version--",
+
+ "virtual_network_resource_group_name": "--virtual_network_resource_group_name--",
+ "virtual_network_name": "--virtual_network_name--",
+ "virtual_network_subnet_name": "--virtual_network_subnet_name--",
+ "private_virtual_network_with_public_ip": true,
+
+ "managed_image_name": "ManagedImageName",
+ "managed_image_resource_group_name": "ManagedImageResourceGroupName",
+ }
+
+ c, _, err := newConfig(config, getPackerConfiguration())
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ deployment, err := GetVirtualMachineDeployment(c)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = approvaltests.VerifyJSONStruct(t, deployment.Properties.Template)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
// Ensure the link values are not set, and the concrete values are set.
func TestKeyVaultDeployment00(t *testing.T) {
c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration())
diff --git a/builder/azure/arm/tempname.go b/builder/azure/arm/tempname.go
index 22e14097d..734cd74aa 100644
--- a/builder/azure/arm/tempname.go
+++ b/builder/azure/arm/tempname.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/arm/tempname_test.go b/builder/azure/arm/tempname_test.go
index c812e6c7d..e9a49b429 100644
--- a/builder/azure/arm/tempname_test.go
+++ b/builder/azure/arm/tempname_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package arm
import (
diff --git a/builder/azure/common/constants/stateBag.go b/builder/azure/common/constants/stateBag.go
index b1289547f..a6eef5bd4 100644
--- a/builder/azure/common/constants/stateBag.go
+++ b/builder/azure/common/constants/stateBag.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package constants
// complete flags
diff --git a/builder/azure/common/constants/targetplatforms.go b/builder/azure/common/constants/targetplatforms.go
index 953f3d320..515eb7466 100644
--- a/builder/azure/common/constants/targetplatforms.go
+++ b/builder/azure/common/constants/targetplatforms.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package constants
// Target types
diff --git a/builder/azure/common/gluestrings.go b/builder/azure/common/gluestrings.go
index b59b15fcf..e3b6963d3 100644
--- a/builder/azure/common/gluestrings.go
+++ b/builder/azure/common/gluestrings.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
// removes overlap between the end of a and the start of b and
diff --git a/builder/azure/common/gluestrings_test.go b/builder/azure/common/gluestrings_test.go
index 63379d475..0e7a633d4 100644
--- a/builder/azure/common/gluestrings_test.go
+++ b/builder/azure/common/gluestrings_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
import (
diff --git a/builder/azure/common/interruptible_task.go b/builder/azure/common/interruptible_task.go
index 32acb0992..94edc63c8 100644
--- a/builder/azure/common/interruptible_task.go
+++ b/builder/azure/common/interruptible_task.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
import (
diff --git a/builder/azure/common/interruptible_task_test.go b/builder/azure/common/interruptible_task_test.go
index 44e849f62..d2090d87b 100644
--- a/builder/azure/common/interruptible_task_test.go
+++ b/builder/azure/common/interruptible_task_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
import (
diff --git a/builder/azure/common/lin/ssh.go b/builder/azure/common/lin/ssh.go
index 7ee5a6064..1600c2f4f 100644
--- a/builder/azure/common/lin/ssh.go
+++ b/builder/azure/common/lin/ssh.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package lin
import (
diff --git a/builder/azure/common/lin/step_create_cert.go b/builder/azure/common/lin/step_create_cert.go
index 6ef4ff560..6f6a685d3 100644
--- a/builder/azure/common/lin/step_create_cert.go
+++ b/builder/azure/common/lin/step_create_cert.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package lin
import (
diff --git a/builder/azure/common/lin/step_generalize_os.go b/builder/azure/common/lin/step_generalize_os.go
index 1c355c2c6..c4dacc47f 100644
--- a/builder/azure/common/lin/step_generalize_os.go
+++ b/builder/azure/common/lin/step_generalize_os.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package lin
import (
diff --git a/builder/azure/common/logutil/logfields.go b/builder/azure/common/logutil/logfields.go
index 4e63d5218..b450594de 100644
--- a/builder/azure/common/logutil/logfields.go
+++ b/builder/azure/common/logutil/logfields.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package logutil
import "fmt"
diff --git a/builder/azure/common/randomstring.go b/builder/azure/common/randomstring.go
index 6d8d752d8..a81f5b3c4 100644
--- a/builder/azure/common/randomstring.go
+++ b/builder/azure/common/randomstring.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
import (
diff --git a/builder/azure/common/randomstring_test.go b/builder/azure/common/randomstring_test.go
index ce375e7b6..c3e0fae51 100644
--- a/builder/azure/common/randomstring_test.go
+++ b/builder/azure/common/randomstring_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
import (
diff --git a/builder/azure/common/state_bag.go b/builder/azure/common/state_bag.go
index 128ee1e91..a402518a1 100644
--- a/builder/azure/common/state_bag.go
+++ b/builder/azure/common/state_bag.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package common
import "github.com/mitchellh/multistep"
diff --git a/builder/azure/common/template/template.go b/builder/azure/common/template/template.go
index 0ce9d2045..cdea487f0 100644
--- a/builder/azure/common/template/template.go
+++ b/builder/azure/common/template/template.go
@@ -45,6 +45,7 @@ type OSDiskUnion struct {
Caching compute.CachingTypes `json:"caching,omitempty"`
CreateOption compute.DiskCreateOptionTypes `json:"createOption,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ ManagedDisk *compute.ManagedDiskParameters `json:"managedDisk,omitempty"`
}
// Union of the StorageProfile and ImageStorageProfile types.
diff --git a/builder/azure/common/template/template_builder.go b/builder/azure/common/template/template_builder.go
index 898bf77e9..7311817c2 100644
--- a/builder/azure/common/template/template_builder.go
+++ b/builder/azure/common/template/template_builder.go
@@ -101,7 +101,7 @@ func (s *TemplateBuilder) BuildWindows(keyVaultName, winRMCertificateUrl string)
return nil
}
-func (s *TemplateBuilder) SetManagedDiskUrl(managedImageId string) error {
+func (s *TemplateBuilder) SetManagedDiskUrl(managedImageId string, storageAccountType compute.StorageAccountTypes) error {
resource, err := s.getResourceByType(resourceVirtualMachine)
if err != nil {
return err
@@ -115,11 +115,14 @@ func (s *TemplateBuilder) SetManagedDiskUrl(managedImageId string) error {
profile.OsDisk.OsType = s.osType
profile.OsDisk.CreateOption = compute.FromImage
profile.OsDisk.Vhd = nil
+ profile.OsDisk.ManagedDisk = &compute.ManagedDiskParameters{
+ StorageAccountType: storageAccountType,
+ }
return nil
}
-func (s *TemplateBuilder) SetManagedMarketplaceImage(location, publisher, offer, sku, version, imageID string) error {
+func (s *TemplateBuilder) SetManagedMarketplaceImage(location, publisher, offer, sku, version, imageID string, storageAccountType compute.StorageAccountTypes) error {
resource, err := s.getResourceByType(resourceVirtualMachine)
if err != nil {
return err
@@ -137,6 +140,9 @@ func (s *TemplateBuilder) SetManagedMarketplaceImage(location, publisher, offer,
profile.OsDisk.OsType = s.osType
profile.OsDisk.CreateOption = compute.FromImage
profile.OsDisk.Vhd = nil
+ profile.OsDisk.ManagedDisk = &compute.ManagedDiskParameters{
+ StorageAccountType: storageAccountType,
+ }
return nil
}
@@ -219,6 +225,24 @@ func (s *TemplateBuilder) SetVirtualNetwork(virtualNetworkResourceGroup, virtual
return nil
}
+func (s *TemplateBuilder) SetPrivateVirtualNetworWithPublicIp(virtualNetworkResourceGroup, virtualNetworkName, subnetName string) error {
+ s.setVariable("virtualNetworkResourceGroup", virtualNetworkResourceGroup)
+ s.setVariable("virtualNetworkName", virtualNetworkName)
+ s.setVariable("subnetName", subnetName)
+
+ s.deleteResourceByType(resourceVirtualNetworks)
+ resource, err := s.getResourceByType(resourceNetworkInterfaces)
+ if err != nil {
+ return err
+ }
+
+ s.deleteResourceDependency(resource, func(s string) bool {
+ return strings.Contains(s, "Microsoft.Network/virtualNetworks")
+ })
+
+ return nil
+}
+
func (s *TemplateBuilder) SetTags(tags *map[string]*string) error {
if tags == nil || len(*tags) == 0 {
return nil
diff --git a/builder/azure/common/template/template_parameters.go b/builder/azure/common/template/template_parameters.go
index 50bc05cdc..424a30c89 100644
--- a/builder/azure/common/template/template_parameters.go
+++ b/builder/azure/common/template/template_parameters.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package template
// The intent of these types to facilitate interchange with Azure in the
diff --git a/builder/azure/common/template/template_parameters_test.go b/builder/azure/common/template/template_parameters_test.go
index d9f12ad82..1c24e5bb7 100644
--- a/builder/azure/common/template/template_parameters_test.go
+++ b/builder/azure/common/template/template_parameters_test.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
package template
import (
diff --git a/builder/azure/common/vault.go b/builder/azure/common/vault.go
index c00eadbb6..db5c6db0c 100644
--- a/builder/azure/common/vault.go
+++ b/builder/azure/common/vault.go
@@ -1,6 +1,3 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
-
// NOTE: vault APIs do not yet exist in the SDK, but once they do this code
// should be removed.
diff --git a/builder/azure/pkcs12/LICENSE b/builder/azure/pkcs12/LICENSE
new file mode 100644
index 000000000..6a66aea5e
--- /dev/null
+++ b/builder/azure/pkcs12/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2009 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.
diff --git a/builder/azure/pkcs12/README.md b/builder/azure/pkcs12/README.md
deleted file mode 100644
index c8b4603e9..000000000
--- a/builder/azure/pkcs12/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-This is a fork of the from the original PKCS#12 parsing code
-published in the Azure repository [go-pkcs12](https://github.com/Azure/go-pkcs12).
-This fork adds serializing a x509 certificate and private key as PKCS#12 binary blob
-(aka .PFX file). Due to the specific nature of this code it was not accepted for
-inclusion in the official Go crypto repository.
-
-The methods used for decoding PKCS#12 have been moved to the test files to further
-discourage the use of this library for decoding. Please use the official
-[pkcs12](https://godoc.org/golang.org/x/crypto/pkcs12) library for decode support.
diff --git a/builder/azure/pkcs12/bmp-string.go b/builder/azure/pkcs12/bmp-string.go
index e98069b82..284d2a68f 100644
--- a/builder/azure/pkcs12/bmp-string.go
+++ b/builder/azure/pkcs12/bmp-string.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 pkcs12
import (
@@ -5,6 +9,7 @@ import (
"unicode/utf16"
)
+// bmpString returns s encoded in UCS-2 with a zero terminator.
func bmpString(s string) ([]byte, error) {
// References:
// https://tools.ietf.org/html/rfc7292#appendix-B.1
@@ -13,14 +18,33 @@ func bmpString(s string) ([]byte, error) {
// EncodeRune returns 0xfffd if the rune does not need special encoding
// - the above RFC provides the info that BMPStrings are NULL terminated.
- rv := make([]byte, 0, 2*len(s)+2)
+ ret := make([]byte, 0, 2*len(s)+2)
for _, r := range s {
if t, _ := utf16.EncodeRune(r); t != 0xfffd {
- return nil, errors.New("string contains characters that cannot be encoded in UCS-2")
+ return nil, errors.New("pkcs12: string contains characters that cannot be encoded in UCS-2")
}
- rv = append(rv, byte(r/256), byte(r%256))
+ ret = append(ret, byte(r/256), byte(r%256))
}
- rv = append(rv, 0, 0)
- return rv, nil
+
+ return append(ret, 0, 0), nil
+}
+
+func decodeBMPString(bmpString []byte) (string, error) {
+ if len(bmpString)%2 != 0 {
+ return "", errors.New("pkcs12: odd-length BMP string")
+ }
+
+ // strip terminator if present
+ if l := len(bmpString); l >= 2 && bmpString[l-1] == 0 && bmpString[l-2] == 0 {
+ bmpString = bmpString[:l-2]
+ }
+
+ s := make([]uint16, 0, len(bmpString)/2)
+ for len(bmpString) > 0 {
+ s = append(s, uint16(bmpString[0])<<8+uint16(bmpString[1]))
+ bmpString = bmpString[2:]
+ }
+
+ return string(utf16.Decode(s)), nil
}
diff --git a/builder/azure/pkcs12/bmp-string_test.go b/builder/azure/pkcs12/bmp-string_test.go
index 8d4599e91..711528b81 100644
--- a/builder/azure/pkcs12/bmp-string_test.go
+++ b/builder/azure/pkcs12/bmp-string_test.go
@@ -1,70 +1,69 @@
+// Copyright 2015 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 pkcs12
import (
"bytes"
- "errors"
+ "encoding/hex"
"testing"
- "unicode/utf16"
)
-func decodeBMPString(bmpString []byte) (string, error) {
- if len(bmpString)%2 != 0 {
- return "", errors.New("expected BMP byte string to be an even length")
- }
-
- // strip terminator if present
- if terminator := bmpString[len(bmpString)-2:]; terminator[0] == terminator[1] && terminator[1] == 0 {
- bmpString = bmpString[:len(bmpString)-2]
- }
-
- s := make([]uint16, 0, len(bmpString)/2)
- for len(bmpString) > 0 {
- s = append(s, uint16(bmpString[0])*265+uint16(bmpString[1]))
- bmpString = bmpString[2:]
- }
-
- return string(utf16.Decode(s)), nil
+var bmpStringTests = []struct {
+ in string
+ expectedHex string
+ shouldFail bool
+}{
+ {"", "0000", false},
+ // Example from https://tools.ietf.org/html/rfc7292#appendix-B.
+ {"Beavis", "0042006500610076006900730000", false},
+ // Some characters from the "Letterlike Symbols Unicode block".
+ {"\u2115 - Double-struck N", "21150020002d00200044006f00750062006c0065002d00730074007200750063006b0020004e0000", false},
+ // any character outside the BMP should trigger an error.
+ {"\U0001f000 East wind (Mahjong)", "", true},
}
func TestBMPStringDecode(t *testing.T) {
- _, err := decodeBMPString([]byte("a"))
- if err == nil {
- t.Fatal("expected decode to fail, but it succeeded")
+ if _, err := decodeBMPString([]byte("a")); err == nil {
+ t.Fatalf("expected decode to fail, but it succeeded")
}
}
func TestBMPString(t *testing.T) {
- str, err := bmpString("")
- if !bytes.Equal(str, []byte{0, 0}) {
- t.Errorf("expected empty string to return double 0, but found: % x", str)
- }
- if err != nil {
- t.Errorf("err: %v", err)
- }
+ for i, test := range bmpStringTests {
+ expected, err := hex.DecodeString(test.expectedHex)
+ if err != nil {
+ t.Fatalf("#%d: failed to decode expectation", i)
+ }
- // Example from https://tools.ietf.org/html/rfc7292#appendix-B
- str, err = bmpString("Beavis")
- if !bytes.Equal(str, []byte{0x00, 0x42, 0x00, 0x65, 0x00, 0x61, 0x00, 0x0076, 0x00, 0x69, 0x00, 0x73, 0x00, 0x00}) {
- t.Errorf("expected 'Beavis' to return 0x00 0x42 0x00 0x65 0x00 0x61 0x00 0x76 0x00 0x69 0x00 0x73 0x00 0x00, but found: % x", str)
- }
- if err != nil {
- t.Errorf("err: %v", err)
- }
+ out, err := bmpString(test.in)
+ if err == nil && test.shouldFail {
+ t.Errorf("#%d: expected to fail, but produced %x", i, out)
+ continue
+ }
- // some characters from the "Letterlike Symbols Unicode block"
- tst := "\u2115 - Double-struck N"
- str, err = bmpString(tst)
- if !bytes.Equal(str, []byte{0x21, 0x15, 0x00, 0x20, 0x00, 0x2d, 0x00, 0x20, 0x00, 0x44, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x2d, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x75, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x20, 0x00, 0x4e, 0x00, 0x00}) {
- t.Errorf("expected '%s' to return 0x21 0x15 0x00 0x20 0x00 0x2d 0x00 0x20 0x00 0x44 0x00 0x6f 0x00 0x75 0x00 0x62 0x00 0x6c 0x00 0x65 0x00 0x2d 0x00 0x73 0x00 0x74 0x00 0x72 0x00 0x75 0x00 0x63 0x00 0x6b 0x00 0x20 0x00 0x4e 0x00 0x00, but found: % x", tst, str)
- }
- if err != nil {
- t.Errorf("err: %v", err)
- }
+ if err != nil && !test.shouldFail {
+ t.Errorf("#%d: failed unexpectedly: %s", i, err)
+ continue
+ }
- // some character outside the BMP should error
- tst = "\U0001f000 East wind (Mahjong)"
- str, err = bmpString(tst)
- if err == nil {
- t.Errorf("expected '%s' to throw error because the first character is not in the BMP", tst)
+ if !test.shouldFail {
+ if !bytes.Equal(out, expected) {
+ t.Errorf("#%d: expected %s, got %x", i, test.expectedHex, out)
+ continue
+ }
+
+ roundTrip, err := decodeBMPString(out)
+ if err != nil {
+ t.Errorf("#%d: decoding output gave an error: %s", i, err)
+ continue
+ }
+
+ if roundTrip != test.in {
+ t.Errorf("#%d: decoding output resulted in %q, but it should have been %q", i, roundTrip, test.in)
+ continue
+ }
+ }
}
}
diff --git a/builder/azure/pkcs12/crypto.go b/builder/azure/pkcs12/crypto.go
index 5095a4f7f..6c81eb774 100644
--- a/builder/azure/pkcs12/crypto.go
+++ b/builder/azure/pkcs12/crypto.go
@@ -1,4 +1,6 @@
-// implementation of https://tools.ietf.org/html/rfc2898#section-6.1.2
+// Copyright 2015 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 pkcs12
@@ -15,31 +17,52 @@ import (
"github.com/hashicorp/packer/builder/azure/pkcs12/rc2"
)
-const (
- pbeWithSHAAnd3KeyTripleDESCBC = "pbeWithSHAAnd3-KeyTripleDES-CBC"
- pbewithSHAAnd40BitRC2CBC = "pbewithSHAAnd40BitRC2-CBC"
-)
-
const (
pbeIterationCount = 2048
pbeSaltSizeBytes = 8
)
var (
- oidPbeWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 12, 1, 3}
- oidPbewithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 12, 1, 6}
+ oidPBEWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3})
+ oidPBEWithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 6})
)
-var algByOID = map[string]string{
- oidPbeWithSHAAnd3KeyTripleDESCBC.String(): pbeWithSHAAnd3KeyTripleDESCBC,
- oidPbewithSHAAnd40BitRC2CBC.String(): pbewithSHAAnd40BitRC2CBC,
+// pbeCipher is an abstraction of a PKCS#12 cipher.
+type pbeCipher interface {
+ // create returns a cipher.Block given a key.
+ create(key []byte) (cipher.Block, error)
+ // deriveKey returns a key derived from the given password and salt.
+ deriveKey(salt, password []byte, iterations int) []byte
+ // deriveKey returns an IV derived from the given password and salt.
+ deriveIV(salt, password []byte, iterations int) []byte
}
-var blockcodeByAlg = map[string]func(key []byte) (cipher.Block, error){
- pbeWithSHAAnd3KeyTripleDESCBC: des.NewTripleDESCipher,
- pbewithSHAAnd40BitRC2CBC: func(key []byte) (cipher.Block, error) {
- return rc2.New(key, len(key)*8)
- },
+type shaWithTripleDESCBC struct{}
+
+func (shaWithTripleDESCBC) create(key []byte) (cipher.Block, error) {
+ return des.NewTripleDESCipher(key)
+}
+
+func (shaWithTripleDESCBC) deriveKey(salt, password []byte, iterations int) []byte {
+ return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 24)
+}
+
+func (shaWithTripleDESCBC) deriveIV(salt, password []byte, iterations int) []byte {
+ return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8)
+}
+
+type shaWith40BitRC2CBC struct{}
+
+func (shaWith40BitRC2CBC) create(key []byte) (cipher.Block, error) {
+ return rc2.New(key, len(key)*8)
+}
+
+func (shaWith40BitRC2CBC) deriveKey(salt, password []byte, iterations int) []byte {
+ return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 5)
+}
+
+func (shaWith40BitRC2CBC) deriveIV(salt, password []byte, iterations int) []byte {
+ return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8)
}
type pbeParams struct {
@@ -47,6 +70,67 @@ type pbeParams struct {
Iterations int
}
+func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher.BlockMode, int, error) {
+ var cipherType pbeCipher
+
+ switch {
+ case algorithm.Algorithm.Equal(oidPBEWithSHAAnd3KeyTripleDESCBC):
+ cipherType = shaWithTripleDESCBC{}
+ case algorithm.Algorithm.Equal(oidPBEWithSHAAnd40BitRC2CBC):
+ cipherType = shaWith40BitRC2CBC{}
+ default:
+ return nil, 0, NotImplementedError("algorithm " + algorithm.Algorithm.String() + " is not supported")
+ }
+
+ var params pbeParams
+ if err := unmarshal(algorithm.Parameters.FullBytes, ¶ms); err != nil {
+ return nil, 0, err
+ }
+
+ key := cipherType.deriveKey(params.Salt, password, params.Iterations)
+ iv := cipherType.deriveIV(params.Salt, password, params.Iterations)
+
+ block, err := cipherType.create(key)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ return cipher.NewCBCDecrypter(block, iv), block.BlockSize(), nil
+}
+
+func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) {
+ cbc, blockSize, err := pbDecrypterFor(info.Algorithm(), password)
+ if err != nil {
+ return nil, err
+ }
+
+ encrypted := info.Data()
+ if len(encrypted) == 0 {
+ return nil, errors.New("pkcs12: empty encrypted data")
+ }
+ if len(encrypted)%blockSize != 0 {
+ return nil, errors.New("pkcs12: input is not a multiple of the block size")
+ }
+ decrypted = make([]byte, len(encrypted))
+ cbc.CryptBlocks(decrypted, encrypted)
+
+ psLen := int(decrypted[len(decrypted)-1])
+ if psLen == 0 || psLen > blockSize {
+ return nil, ErrDecryption
+ }
+
+ if len(decrypted) < psLen {
+ return nil, ErrDecryption
+ }
+ ps := decrypted[len(decrypted)-psLen:]
+ decrypted = decrypted[:len(decrypted)-psLen]
+ if bytes.Compare(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) != 0 {
+ return nil, ErrDecryption
+ }
+
+ return
+}
+
func pad(src []byte, blockSize int) []byte {
paddingLength := blockSize - len(src)%blockSize
paddingText := bytes.Repeat([]byte{byte(paddingLength)}, paddingLength)
@@ -54,15 +138,15 @@ func pad(src []byte, blockSize int) []byte {
}
func pbEncrypt(plainText, salt, password []byte, iterations int) (cipherText []byte, err error) {
- _, err = io.ReadFull(rand.Reader, salt)
- if err != nil {
+ if _, err := io.ReadFull(rand.Reader, salt); err != nil {
return nil, errors.New("pkcs12: failed to create a random salt value: " + err.Error())
}
- key := deriveKeyByAlg[pbeWithSHAAnd3KeyTripleDESCBC](salt, password, iterations)
- iv := deriveIVByAlg[pbeWithSHAAnd3KeyTripleDESCBC](salt, password, iterations)
+ cipherType := shaWithTripleDESCBC{}
+ key := cipherType.deriveKey(salt, password, iterations)
+ iv := cipherType.deriveIV(salt, password, iterations)
- block, err := des.NewTripleDESCipher(key)
+ block, err := cipherType.create(key)
if err != nil {
return nil, errors.New("pkcs12: failed to create a block cipher: " + err.Error())
}
@@ -76,7 +160,8 @@ func pbEncrypt(plainText, salt, password []byte, iterations int) (cipherText []b
return cipherText, nil
}
+// decryptable abstracts a object that contains ciphertext.
type decryptable interface {
- GetAlgorithm() pkix.AlgorithmIdentifier
- GetData() []byte
+ Algorithm() pkix.AlgorithmIdentifier
+ Data() []byte
}
diff --git a/builder/azure/pkcs12/crypto_test.go b/builder/azure/pkcs12/crypto_test.go
index fb7f8484d..efcd90820 100644
--- a/builder/azure/pkcs12/crypto_test.go
+++ b/builder/azure/pkcs12/crypto_test.go
@@ -1,62 +1,19 @@
+// Copyright 2015 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 pkcs12
import (
"bytes"
- "crypto/cipher"
+ "crypto/rand"
"crypto/x509/pkix"
"encoding/asn1"
+ "io"
"testing"
)
-func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher.BlockMode, error) {
- algorithmName, supported := algByOID[algorithm.Algorithm.String()]
- if !supported {
- return nil, NotImplementedError("algorithm " + algorithm.Algorithm.String() + " is not supported")
- }
-
- var params pbeParams
- if _, err := asn1.Unmarshal(algorithm.Parameters.FullBytes, ¶ms); err != nil {
- return nil, err
- }
-
- k := deriveKeyByAlg[algorithmName](params.Salt, password, params.Iterations)
- iv := deriveIVByAlg[algorithmName](params.Salt, password, params.Iterations)
- password = nil
-
- code, err := blockcodeByAlg[algorithmName](k)
- if err != nil {
- return nil, err
- }
-
- cbc := cipher.NewCBCDecrypter(code, iv)
- return cbc, nil
-}
-
-func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) {
- cbc, err := pbDecrypterFor(info.GetAlgorithm(), password)
- password = nil
- if err != nil {
- return nil, err
- }
-
- encrypted := info.GetData()
-
- decrypted = make([]byte, len(encrypted))
- cbc.CryptBlocks(decrypted, encrypted)
-
- if psLen := int(decrypted[len(decrypted)-1]); psLen > 0 && psLen <= cbc.BlockSize() {
- m := decrypted[:len(decrypted)-psLen]
- ps := decrypted[len(decrypted)-psLen:]
- if !bytes.Equal(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) {
- return nil, ErrDecryption
- }
- decrypted = m
- } else {
- return nil, ErrDecryption
- }
-
- return
-}
+var sha1WithTripleDES = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3})
func TestPbDecrypterFor(t *testing.T) {
params, _ := asn1.Marshal(pbeParams{
@@ -72,79 +29,131 @@ func TestPbDecrypterFor(t *testing.T) {
pass, _ := bmpString("Sesame open")
- _, err := pbDecrypterFor(alg, pass)
+ _, _, err := pbDecrypterFor(alg, pass)
if _, ok := err.(NotImplementedError); !ok {
t.Errorf("expected not implemented error, got: %T %s", err, err)
}
- alg.Algorithm = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3})
- cbc, err := pbDecrypterFor(alg, pass)
+ alg.Algorithm = sha1WithTripleDES
+ cbc, blockSize, err := pbDecrypterFor(alg, pass)
if err != nil {
- t.Errorf("err: %v", err)
+ t.Errorf("unexpected error from pbDecrypterFor %v", err)
+ }
+ if blockSize != 8 {
+ t.Errorf("unexpected block size %d, wanted 8", blockSize)
}
- M := []byte{1, 2, 3, 4, 5, 6, 7, 8}
- expectedM := []byte{185, 73, 135, 249, 137, 1, 122, 247}
- cbc.CryptBlocks(M, M)
+ plaintext := []byte{1, 2, 3, 4, 5, 6, 7, 8}
+ expectedCiphertext := []byte{185, 73, 135, 249, 137, 1, 122, 247}
+ ciphertext := make([]byte, len(plaintext))
+ cbc.CryptBlocks(ciphertext, plaintext)
- if !bytes.Equal(M, expectedM) {
- t.Errorf("expected M to be '%d', but found '%d", expectedM, M)
+ if bytes.Compare(ciphertext, expectedCiphertext) != 0 {
+ t.Errorf("bad ciphertext, got %x but wanted %x", ciphertext, expectedCiphertext)
}
}
-func TestPbDecrypt(t *testing.T) {
-
- tests := [][]byte{
+var pbDecryptTests = []struct {
+ in []byte
+ expected []byte
+ expectedError error
+}{
+ {
[]byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\xa0\x9a\xdf\x5a\x58\xa0\xea\x46"), // 7 padding bytes
- []byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\x96\x24\x2f\x71\x7e\x32\x3f\xe7"), // 8 padding bytes
- []byte("\x35\x0c\xc0\x8d\xab\xa9\x5d\x30\x7f\x9a\xec\x6a\xd8\x9b\x9c\xd9"), // 9 padding bytes, incorrect
- []byte("\xb2\xf9\x6e\x06\x60\xae\x20\xcf\x08\xa0\x7b\xd9\x6b\x20\xef\x41"), // incorrect padding bytes: [ ... 0x04 0x02 ]
- }
- expected := []interface{}{
[]byte("A secret!"),
+ nil,
+ },
+ {
+ []byte("\x33\x73\xf3\x9f\xda\x49\xae\xfc\x96\x24\x2f\x71\x7e\x32\x3f\xe7"), // 8 padding bytes
[]byte("A secret"),
+ nil,
+ },
+ {
+ []byte("\x35\x0c\xc0\x8d\xab\xa9\x5d\x30\x7f\x9a\xec\x6a\xd8\x9b\x9c\xd9"), // 9 padding bytes, incorrect
+ nil,
ErrDecryption,
+ },
+ {
+ []byte("\xb2\xf9\x6e\x06\x60\xae\x20\xcf\x08\xa0\x7b\xd9\x6b\x20\xef\x41"), // incorrect padding bytes: [ ... 0x04 0x02 ]
+ nil,
ErrDecryption,
- }
+ },
+}
- for i, c := range tests {
- td := testDecryptable{
- data: c,
- algorithm: pkix.AlgorithmIdentifier{
- Algorithm: asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3}), // SHA1/3TDES
- Parameters: pbeParams{
- Salt: []byte("\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8"),
- Iterations: 4096,
- }.RawASN1(),
- },
+func TestPbDecrypt(t *testing.T) {
+ salt := []byte("\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8")
+
+ for i, test := range pbDecryptTests {
+ decryptable := makeTestDecryptable(test.in, salt)
+ password, _ := bmpString("sesame")
+
+ plaintext, err := pbDecrypt(decryptable, password)
+ if err != test.expectedError {
+ t.Errorf("#%d: got error %q, but wanted %q", i, err, test.expectedError)
+ continue
}
- p, _ := bmpString("sesame")
- m, err := pbDecrypt(td, p)
-
- switch e := expected[i].(type) {
- case []byte:
- if err != nil {
- t.Errorf("error decrypting C=%x: %v", c, err)
- }
- if !bytes.Equal(m, e) {
- t.Errorf("expected C=%x to be decoded to M=%x, but found %x", c, e, m)
- }
- case error:
- if err == nil || err.Error() != e.Error() {
- t.Errorf("expecting error '%v' during decryption of c=%x, but found err='%v'", e, c, err)
- }
+ if !bytes.Equal(plaintext, test.expected) {
+ t.Errorf("#%d: got %x, but wanted %x", i, plaintext, test.expected)
}
}
}
+func TestRoundTripPkc12EncryptDecrypt(t *testing.T) {
+ salt := []byte{0xfe, 0xee, 0xfa, 0xce}
+ password := salt
+
+ // Sweep the possible padding lengths
+ for i := 0; i < 9; i++ {
+ bs := make([]byte, i)
+ _, err := io.ReadFull(rand.Reader, bs)
+ if err != nil {
+ t.Fatalf("failed to read: %s", err)
+ }
+
+ cipherText, err := pbEncrypt(bs, salt, password, 4096)
+ if err != nil {
+ t.Fatalf("failed to encrypt: %s\n", err)
+ }
+
+ if len(cipherText)%8 != 0 {
+ t.Fatalf("plain text was not padded as expected")
+ }
+
+ decryptable := makeTestDecryptable(cipherText, salt)
+ plainText, err := pbDecrypt(decryptable, password)
+ if err != nil {
+ t.Fatalf("failed to decrypt: %s\n", err)
+ }
+
+ if !bytes.Equal(bs, plainText) {
+ t.Fatalf("got %x, but wanted %x", bs, plainText)
+ }
+ }
+}
+
+func makeTestDecryptable(bytes, salt []byte) testDecryptable {
+ decryptable := testDecryptable{
+ data: bytes,
+ algorithm: pkix.AlgorithmIdentifier{
+ Algorithm: sha1WithTripleDES,
+ Parameters: pbeParams{
+ Salt: salt,
+ Iterations: 4096,
+ }.RawASN1(),
+ },
+ }
+
+ return decryptable
+}
+
type testDecryptable struct {
data []byte
algorithm pkix.AlgorithmIdentifier
}
-func (d testDecryptable) GetAlgorithm() pkix.AlgorithmIdentifier { return d.algorithm }
-func (d testDecryptable) GetData() []byte { return d.data }
+func (d testDecryptable) Algorithm() pkix.AlgorithmIdentifier { return d.algorithm }
+func (d testDecryptable) Data() []byte { return d.data }
func (params pbeParams) RawASN1() (raw asn1.RawValue) {
asn1Bytes, err := asn1.Marshal(params)
diff --git a/builder/azure/pkcs12/errors.go b/builder/azure/pkcs12/errors.go
index 64a9433ef..36ad6e957 100644
--- a/builder/azure/pkcs12/errors.go
+++ b/builder/azure/pkcs12/errors.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 pkcs12
import "errors"
@@ -16,7 +20,7 @@ type NotImplementedError string
type EncodeError string
func (e NotImplementedError) Error() string {
- return string(e)
+ return "pkcs12: " + string(e)
}
func (e EncodeError) Error() string {
diff --git a/builder/azure/pkcs12/mac.go b/builder/azure/pkcs12/mac.go
index c7e428117..76ad0cdc5 100644
--- a/builder/azure/pkcs12/mac.go
+++ b/builder/azure/pkcs12/mac.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 pkcs12
import (
@@ -7,10 +11,6 @@ import (
"encoding/asn1"
)
-var (
- oidSha1Algorithm = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 26}
-)
-
type macData struct {
Mac digestInfo
MacSalt []byte
@@ -23,6 +23,23 @@ type digestInfo struct {
Digest []byte
}
+var (
+ oidSHA1 = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26})
+)
+
+func verifyMac(macData *macData, message, password []byte) error {
+ if !macData.Mac.Algorithm.Algorithm.Equal(oidSHA1) {
+ return NotImplementedError("unknown digest algorithm: " + macData.Mac.Algorithm.Algorithm.String())
+ }
+
+ expectedMAC := computeMac(message, macData.Iterations, macData.MacSalt, password)
+
+ if !hmac.Equal(macData.Mac.Digest, expectedMAC) {
+ return ErrIncorrectPassword
+ }
+ return nil
+}
+
func computeMac(message []byte, iterations int, salt, password []byte) []byte {
key := pbkdf(sha1Sum, 20, 64, salt, password, iterations, 3, 20)
diff --git a/builder/azure/pkcs12/mac_test.go b/builder/azure/pkcs12/mac_test.go
index 0ccea7104..1ed4ff21e 100644
--- a/builder/azure/pkcs12/mac_test.go
+++ b/builder/azure/pkcs12/mac_test.go
@@ -1,24 +1,14 @@
+// Copyright 2015 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 pkcs12
import (
- "crypto/hmac"
"encoding/asn1"
"testing"
)
-func verifyMac(macData *macData, message, password []byte) error {
- if !macData.Mac.Algorithm.Algorithm.Equal(oidSha1Algorithm) {
- return NotImplementedError("unknown digest algorithm: " + macData.Mac.Algorithm.Algorithm.String())
- }
-
- expectedMAC := computeMac(message, macData.Iterations, macData.MacSalt, password)
-
- if !hmac.Equal(macData.Mac.Digest, expectedMAC) {
- return ErrIncorrectPassword
- }
- return nil
-}
-
func TestVerifyMac(t *testing.T) {
td := macData{
Mac: digestInfo{
diff --git a/builder/azure/pkcs12/pbkdf.go b/builder/azure/pkcs12/pbkdf.go
index 29685723f..5c419d41e 100644
--- a/builder/azure/pkcs12/pbkdf.go
+++ b/builder/azure/pkcs12/pbkdf.go
@@ -1,34 +1,35 @@
+// Copyright 2015 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 pkcs12
import (
+ "bytes"
"crypto/sha1"
"math/big"
)
var (
- deriveKeyByAlg = map[string]func(salt, password []byte, iterations int) []byte{
- pbeWithSHAAnd3KeyTripleDESCBC: func(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 24)
- },
- pbewithSHAAnd40BitRC2CBC: func(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 5)
- },
- }
- deriveIVByAlg = map[string]func(salt, password []byte, iterations int) []byte{
- pbeWithSHAAnd3KeyTripleDESCBC: func(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8)
- },
- pbewithSHAAnd40BitRC2CBC: func(salt, password []byte, iterations int) []byte {
- return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8)
- },
- }
+ one = big.NewInt(1)
)
+// sha1Sum returns the SHA-1 hash of in.
func sha1Sum(in []byte) []byte {
sum := sha1.Sum(in)
return sum[:]
}
+// fillWithRepeats returns v*ceiling(len(pattern) / v) bytes consisting of
+// repeats of pattern.
+func fillWithRepeats(pattern []byte, v int) []byte {
+ if len(pattern) == 0 {
+ return nil
+ }
+ outputLen := v * ((len(pattern) + v - 1) / v)
+ return bytes.Repeat(pattern, (outputLen+len(pattern)-1)/len(pattern))[:outputLen]
+}
+
func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID byte, size int) (key []byte) {
// implementation of https://tools.ietf.org/html/rfc7292#appendix-B.2 , RFC text verbatim in comments
@@ -75,7 +76,7 @@ func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID
// 1. Construct a string, D (the "diversifier"), by concatenating v/8
// copies of ID.
- D := []byte{}
+ var D []byte
for i := 0; i < v; i++ {
D = append(D, ID)
}
@@ -85,87 +86,71 @@ func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID
// truncated to create S). Note that if the salt is the empty
// string, then so is S.
- S := []byte{}
- {
- s := len(salt)
- times := s / v
- if s%v > 0 {
- times++
- }
- for len(S) < times*v {
- S = append(S, salt...)
- }
- S = S[:times*v]
- }
+ S := fillWithRepeats(salt, v)
// 3. Concatenate copies of the password together to create a string P
// of length v(ceiling(p/v)) bits (the final copy of the password
// may be truncated to create P). Note that if the password is the
// empty string, then so is P.
- P := []byte{}
- {
- s := len(password)
- times := s / v
- if s%v > 0 {
- times++
- }
- for len(P) < times*v {
- P = append(P, password...)
- }
- password = nil
- P = P[:times*v]
- }
+ P := fillWithRepeats(password, v)
// 4. Set I=S||P to be the concatenation of S and P.
I := append(S, P...)
// 5. Set c=ceiling(n/u).
- c := size / u
- if size%u > 0 {
- c++
- }
+ c := (size + u - 1) / u
// 6. For i=1, 2, ..., c, do the following:
A := make([]byte, c*20)
+ var IjBuf []byte
for i := 0; i < c; i++ {
-
// A. Set A2=H^r(D||I). (i.e., the r-th hash of D||1,
// H(H(H(... H(D||I))))
Ai := hash(append(D, I...))
for j := 1; j < r; j++ {
- Ai = hash(Ai[:])
+ Ai = hash(Ai)
}
copy(A[i*20:], Ai[:])
if i < c-1 { // skip on last iteration
-
- // B. Concatenate copies of Ai to create a string B of length v
- // bits (the final copy of Ai may be truncated to create B).
- B := []byte{}
+ // B. Concatenate copies of Ai to create a string B of length v
+ // bits (the final copy of Ai may be truncated to create B).
+ var B []byte
for len(B) < v {
B = append(B, Ai[:]...)
}
B = B[:v]
- // C. Treating I as a concatenation I_0, I_1, ..., I_(k-1) of v-bit
- // blocks, where k=ceiling(s/v)+ceiling(p/v), modify I by
- // setting I_j=(I_j+B+1) mod 2^v for each j.
+ // C. Treating I as a concatenation I_0, I_1, ..., I_(k-1) of v-bit
+ // blocks, where k=ceiling(s/v)+ceiling(p/v), modify I by
+ // setting I_j=(I_j+B+1) mod 2^v for each j.
{
- Bbi := new(big.Int)
- Bbi.SetBytes(B)
-
- one := big.NewInt(1)
+ Bbi := new(big.Int).SetBytes(B)
+ Ij := new(big.Int)
for j := 0; j < len(I)/v; j++ {
- Ij := new(big.Int)
Ij.SetBytes(I[j*v : (j+1)*v])
Ij.Add(Ij, Bbi)
Ij.Add(Ij, one)
Ijb := Ij.Bytes()
+ // We expect Ijb to be exactly v bytes,
+ // if it is longer or shorter we must
+ // adjust it accordingly.
if len(Ijb) > v {
Ijb = Ijb[len(Ijb)-v:]
}
+ if len(Ijb) < v {
+ if IjBuf == nil {
+ IjBuf = make([]byte, v)
+ }
+ bytesShort := v - len(Ijb)
+ for i := 0; i < bytesShort; i++ {
+ IjBuf[i] = 0
+ }
+ copy(IjBuf[bytesShort:], Ijb)
+ Ijb = IjBuf
+ }
copy(I[j*v:(j+1)*v], Ijb)
}
}
@@ -175,9 +160,7 @@ func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID
// bit string, A.
// 8. Use the first n bits of A as the output of this entire process.
- A = A[:size]
-
- return A
+ return A[:size]
// If the above process is being used to generate a DES key, the process
// should be used to create 64 random bits, and the key's parity bits
diff --git a/builder/azure/pkcs12/pbkdf_test.go b/builder/azure/pkcs12/pbkdf_test.go
index cd66e059e..262037d7e 100644
--- a/builder/azure/pkcs12/pbkdf_test.go
+++ b/builder/azure/pkcs12/pbkdf_test.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 pkcs12
import (
@@ -6,13 +10,25 @@ import (
)
func TestThatPBKDFWorksCorrectlyForLongKeys(t *testing.T) {
- pbkdf := deriveKeyByAlg[pbeWithSHAAnd3KeyTripleDESCBC]
+ cipherInfo := shaWithTripleDESCBC{}
salt := []byte("\xff\xff\xff\xff\xff\xff\xff\xff")
password, _ := bmpString("sesame")
- key := pbkdf(salt, password, 2048)
+ key := cipherInfo.deriveKey(salt, password, 2048)
- if expected := []byte("\x7c\xd9\xfd\x3e\x2b\x3b\xe7\x69\x1a\x44\xe3\xbe\xf0\xf9\xea\x0f\xb9\xb8\x97\xd4\xe3\x25\xd9\xd1"); !bytes.Equal(key, expected) {
- t.Fatalf("expected key '% x', but found '% x'", key, expected)
+ if expected := []byte("\x7c\xd9\xfd\x3e\x2b\x3b\xe7\x69\x1a\x44\xe3\xbe\xf0\xf9\xea\x0f\xb9\xb8\x97\xd4\xe3\x25\xd9\xd1"); bytes.Compare(key, expected) != 0 {
+ t.Fatalf("expected key '%x', but found '%x'", expected, key)
+ }
+}
+
+func TestThatPBKDFHandlesLeadingZeros(t *testing.T) {
+ // This test triggers a case where I_j (in step 6C) ends up with leading zero
+ // byte, meaning that len(Ijb) < v (leading zeros get stripped by big.Int).
+ // This was previously causing bug whereby certain inputs would break the
+ // derivation and produce the wrong output.
+ key := pbkdf(sha1Sum, 20, 64, []byte("\xf3\x7e\x05\xb5\x18\x32\x4b\x4b"), []byte("\x00\x00"), 2048, 1, 24)
+ expected := []byte("\x00\xf7\x59\xff\x47\xd1\x4d\xd0\x36\x65\xd5\x94\x3c\xb3\xc4\xa3\x9a\x25\x55\xc0\x2a\xed\x66\xe1")
+ if bytes.Compare(key, expected) != 0 {
+ t.Fatalf("expected key '%x', but found '%x'", expected, key)
}
}
diff --git a/builder/azure/pkcs12/pkcs12.go b/builder/azure/pkcs12/pkcs12.go
index 7db1a2e05..8279cb572 100644
--- a/builder/azure/pkcs12/pkcs12.go
+++ b/builder/azure/pkcs12/pkcs12.go
@@ -1,20 +1,34 @@
-// Package pkcs12 provides some implementations of PKCS#12.
+// Copyright 2015 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 pkcs12 implements some of PKCS#12.
//
-// This implementation is distilled from https://tools.ietf.org/html/rfc7292 and referenced documents.
-// It is intended for decoding P12/PFX-stored certificate+key for use with the crypto/tls package.
+// This implementation is distilled from https://tools.ietf.org/html/rfc7292
+// and referenced documents. It is intended for decoding P12/PFX-stored
+// certificates and keys for use with the crypto/tls package.
package pkcs12
import (
+ "crypto/ecdsa"
"crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
+ "encoding/hex"
+ "encoding/pem"
"errors"
"io"
)
var (
- oidLocalKeyID = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 21}
- oidDataContentType = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 1}
+ oidDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 1})
+ oidEncryptedDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 6})
+
+ oidFriendlyName = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 20})
+ oidLocalKeyID = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 21})
+ oidMicrosoftCSPName = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 17, 1})
localKeyId = []byte{0x01, 0x00, 0x00, 0x00}
)
@@ -30,6 +44,23 @@ type contentInfo struct {
Content asn1.RawValue `asn1:"tag:0,explicit,optional"`
}
+type encryptedData struct {
+ Version int
+ EncryptedContentInfo encryptedContentInfo
+}
+
+type encryptedContentInfo struct {
+ ContentType asn1.ObjectIdentifier
+ ContentEncryptionAlgorithm pkix.AlgorithmIdentifier
+ EncryptedContent []byte `asn1:"tag:0,optional"`
+}
+
+func (i encryptedContentInfo) Algorithm() pkix.AlgorithmIdentifier {
+ return i.ContentEncryptionAlgorithm
+}
+
+func (i encryptedContentInfo) Data() []byte { return i.EncryptedContent }
+
type safeBag struct {
Id asn1.ObjectIdentifier
Value asn1.RawValue `asn1:"tag:0,explicit"`
@@ -38,7 +69,7 @@ type safeBag struct {
type pkcs12Attribute struct {
Id asn1.ObjectIdentifier
- Value asn1.RawValue `ans1:"set"`
+ Value asn1.RawValue `asn1:"set"`
}
type encryptedPrivateKeyInfo struct {
@@ -46,8 +77,19 @@ type encryptedPrivateKeyInfo struct {
EncryptedData []byte
}
-func (i encryptedPrivateKeyInfo) GetAlgorithm() pkix.AlgorithmIdentifier { return i.AlgorithmIdentifier }
-func (i encryptedPrivateKeyInfo) GetData() []byte { return i.EncryptedData }
+func (i encryptedPrivateKeyInfo) Algorithm() pkix.AlgorithmIdentifier {
+ return i.AlgorithmIdentifier
+}
+
+func (i encryptedPrivateKeyInfo) Data() []byte {
+ return i.EncryptedData
+}
+
+// PEM block types
+const (
+ certificateType = "CERTIFICATE"
+ privateKeyType = "PRIVATE KEY"
+)
// unmarshal calls asn1.Unmarshal, but also returns an error if there is any
// trailing data after unmarshaling.
@@ -62,6 +104,168 @@ func unmarshal(in []byte, out interface{}) error {
return nil
}
+// ConvertToPEM converts all "safe bags" contained in pfxData to PEM blocks.
+func ToPEM(pfxData []byte, password string) ([]*pem.Block, error) {
+ encodedPassword, err := bmpString(password)
+ if err != nil {
+ return nil, ErrIncorrectPassword
+ }
+
+ bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword)
+
+ blocks := make([]*pem.Block, 0, len(bags))
+ for _, bag := range bags {
+ block, err := convertBag(&bag, encodedPassword)
+ if err != nil {
+ return nil, err
+ }
+ blocks = append(blocks, block)
+ }
+
+ return blocks, nil
+}
+
+func convertBag(bag *safeBag, password []byte) (*pem.Block, error) {
+ block := &pem.Block{
+ Headers: make(map[string]string),
+ }
+
+ for _, attribute := range bag.Attributes {
+ k, v, err := convertAttribute(&attribute)
+ if err != nil {
+ return nil, err
+ }
+ block.Headers[k] = v
+ }
+
+ switch {
+ case bag.Id.Equal(oidCertBag):
+ block.Type = certificateType
+ certsData, err := decodeCertBag(bag.Value.Bytes)
+ if err != nil {
+ return nil, err
+ }
+ block.Bytes = certsData
+ case bag.Id.Equal(oidPKCS8ShroudedKeyBag):
+ block.Type = privateKeyType
+
+ key, err := decodePkcs8ShroudedKeyBag(bag.Value.Bytes, password)
+ if err != nil {
+ return nil, err
+ }
+
+ switch key := key.(type) {
+ case *rsa.PrivateKey:
+ block.Bytes = x509.MarshalPKCS1PrivateKey(key)
+ case *ecdsa.PrivateKey:
+ block.Bytes, err = x509.MarshalECPrivateKey(key)
+ if err != nil {
+ return nil, err
+ }
+ default:
+ return nil, errors.New("found unknown private key type in PKCS#8 wrapping")
+ }
+ default:
+ return nil, errors.New("don't know how to convert a safe bag of type " + bag.Id.String())
+ }
+ return block, nil
+}
+
+func convertAttribute(attribute *pkcs12Attribute) (key, value string, err error) {
+ isString := false
+
+ switch {
+ case attribute.Id.Equal(oidFriendlyName):
+ key = "friendlyName"
+ isString = true
+ case attribute.Id.Equal(oidLocalKeyID):
+ key = "localKeyId"
+ case attribute.Id.Equal(oidMicrosoftCSPName):
+ // This key is chosen to match OpenSSL.
+ key = "Microsoft CSP Name"
+ isString = true
+ default:
+ return "", "", errors.New("pkcs12: unknown attribute with OID " + attribute.Id.String())
+ }
+
+ if isString {
+ if err := unmarshal(attribute.Value.Bytes, &attribute.Value); err != nil {
+ return "", "", err
+ }
+ if value, err = decodeBMPString(attribute.Value.Bytes); err != nil {
+ return "", "", err
+ }
+ } else {
+ var id []byte
+ if err := unmarshal(attribute.Value.Bytes, &id); err != nil {
+ return "", "", err
+ }
+ value = hex.EncodeToString(id)
+ }
+
+ return key, value, nil
+}
+
+// Decode extracts a certificate and private key from pfxData. This function
+// assumes that there is only one certificate and only one private key in the
+// pfxData.
+func Decode(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, err error) {
+ encodedPassword, err := bmpString(password)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ if len(bags) != 2 {
+ err = errors.New("pkcs12: expected exactly two safe bags in the PFX PDU")
+ return
+ }
+
+ for _, bag := range bags {
+ switch {
+ case bag.Id.Equal(oidCertBag):
+ if certificate != nil {
+ err = errors.New("pkcs12: expected exactly one certificate bag")
+ }
+
+ certsData, err := decodeCertBag(bag.Value.Bytes)
+ if err != nil {
+ return nil, nil, err
+ }
+ certs, err := x509.ParseCertificates(certsData)
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(certs) != 1 {
+ err = errors.New("pkcs12: expected exactly one certificate in the certBag")
+ return nil, nil, err
+ }
+ certificate = certs[0]
+
+ case bag.Id.Equal(oidPKCS8ShroudedKeyBag):
+ if privateKey != nil {
+ err = errors.New("pkcs12: expected exactly one key bag")
+ }
+ if privateKey, err = decodePkcs8ShroudedKeyBag(bag.Value.Bytes, encodedPassword); err != nil {
+ return nil, nil, err
+ }
+ }
+ }
+
+ if certificate == nil {
+ return nil, nil, errors.New("pkcs12: certificate missing")
+ }
+ if privateKey == nil {
+ return nil, nil, errors.New("pkcs12: private key missing")
+ }
+
+ return
+}
+
func getLocalKeyId(id []byte) (attribute pkcs12Attribute, err error) {
octetString := asn1.RawValue{Tag: 4, Class: 0, IsCompound: false, Bytes: id}
bytes, err := asn1.Marshal(octetString)
@@ -115,7 +319,7 @@ func makeCertBagContentInfo(derBytes []byte) (*contentInfo, error) {
return nil, EncodeError("encoding cert bag: " + err.Error())
}
- certSafeBags, err := makeSafeBags(oidCertBagType, bytes)
+ certSafeBags, err := makeSafeBags(oidCertBag, bytes)
if err != nil {
return nil, EncodeError("safe bags: " + err.Error())
}
@@ -129,7 +333,7 @@ func makeShroudedKeyBagContentInfo(privateKey interface{}, password []byte) (*co
return nil, EncodeError("encode PKCS#8 shrouded key bag: " + err.Error())
}
- safeBags, err := makeSafeBags(oidPkcs8ShroudedKeyBagType, shroudedKeyBagBytes)
+ safeBags, err := makeSafeBags(oidPKCS8ShroudedKeyBag, shroudedKeyBagBytes)
if err != nil {
return nil, EncodeError("safe bags: " + err.Error())
}
@@ -183,7 +387,7 @@ func makeSalt(saltByteCount int) ([]byte, error) {
//
// derBytes is a DER encoded certificate.
// privateKey is an RSA
-func Encode(derBytes []byte, privateKey interface{}, password string) ([]byte, error) {
+func Encode(derBytes []byte, privateKey interface{}, password string) (pfxBytes []byte, err error) {
secret, err := bmpString(password)
if err != nil {
return nil, ErrIncorrectPassword
@@ -230,7 +434,7 @@ func Encode(derBytes []byte, privateKey interface{}, password string) ([]byte, e
MacSalt: salt,
Mac: digestInfo{
Algorithm: pkix.AlgorithmIdentifier{
- Algorithm: oidSha1Algorithm,
+ Algorithm: oidSHA1,
},
Digest: digest,
},
@@ -244,3 +448,83 @@ func Encode(derBytes []byte, privateKey interface{}, password string) ([]byte, e
return bytes, err
}
+
+func getSafeContents(p12Data, password []byte) (bags []safeBag, updatedPassword []byte, err error) {
+ pfx := new(pfxPdu)
+
+ if err := unmarshal(p12Data, pfx); err != nil {
+ return nil, nil, errors.New("pkcs12: error reading P12 data: " + err.Error())
+ }
+
+ if pfx.Version != 3 {
+ return nil, nil, NotImplementedError("can only decode v3 PFX PDU's")
+ }
+
+ if !pfx.AuthSafe.ContentType.Equal(oidDataContentType) {
+ return nil, nil, NotImplementedError("only password-protected PFX is implemented")
+ }
+
+ // unmarshal the explicit bytes in the content for type 'data'
+ if err := unmarshal(pfx.AuthSafe.Content.Bytes, &pfx.AuthSafe.Content); err != nil {
+ return nil, nil, err
+ }
+
+ if len(pfx.MacData.Mac.Algorithm.Algorithm) == 0 {
+ return nil, nil, errors.New("pkcs12: no MAC in data")
+ }
+
+ if err := verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password); err != nil {
+ if err == ErrIncorrectPassword && len(password) == 2 && password[0] == 0 && password[1] == 0 {
+ // some implementations use an empty byte array
+ // for the empty string password try one more
+ // time with empty-empty password
+ password = nil
+ err = verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password)
+ }
+ if err != nil {
+ return nil, nil, err
+ }
+ }
+
+ var authenticatedSafe []contentInfo
+ if err := unmarshal(pfx.AuthSafe.Content.Bytes, &authenticatedSafe); err != nil {
+ return nil, nil, err
+ }
+
+ if len(authenticatedSafe) != 2 {
+ return nil, nil, NotImplementedError("expected exactly two items in the authenticated safe")
+ }
+
+ for _, ci := range authenticatedSafe {
+ var data []byte
+
+ switch {
+ case ci.ContentType.Equal(oidDataContentType):
+ if err := unmarshal(ci.Content.Bytes, &data); err != nil {
+ return nil, nil, err
+ }
+ case ci.ContentType.Equal(oidEncryptedDataContentType):
+ var encryptedData encryptedData
+ if err := unmarshal(ci.Content.Bytes, &encryptedData); err != nil {
+ return nil, nil, err
+ }
+ if encryptedData.Version != 0 {
+ return nil, nil, NotImplementedError("only version 0 of EncryptedData is supported")
+ }
+ if data, err = pbDecrypt(encryptedData.EncryptedContentInfo, password); err != nil {
+ return nil, nil, err
+ }
+ default:
+ return nil, nil, NotImplementedError("only data and encryptedData content types are supported in authenticated safe")
+ }
+
+ var safeContents []safeBag
+ if err := unmarshal(data, &safeContents); err != nil {
+ return nil, nil, err
+ }
+
+ bags = append(bags, safeContents...)
+ }
+
+ return bags, password, nil
+}
diff --git a/builder/azure/pkcs12/pkcs12_test.go b/builder/azure/pkcs12/pkcs12_test.go
index 2cfbc44d8..2ac382a0b 100644
--- a/builder/azure/pkcs12/pkcs12_test.go
+++ b/builder/azure/pkcs12/pkcs12_test.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 pkcs12
import (
@@ -5,16 +9,36 @@ import (
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
+ "crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
+ "encoding/base64"
+ "encoding/pem"
"fmt"
"math/big"
"testing"
"time"
-
- gopkcs12 "golang.org/x/crypto/pkcs12"
)
+func TestPfx(t *testing.T) {
+ for commonName, base64P12 := range testdata {
+ p12, _ := base64.StdEncoding.DecodeString(base64P12)
+
+ priv, cert, err := Decode(p12, "")
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if err := priv.(*rsa.PrivateKey).Validate(); err != nil {
+ t.Errorf("error while validating private key: %v", err)
+ }
+
+ if cert.Subject.CommonName != commonName {
+ t.Errorf("expected common name to be %q, but found %q", commonName, cert.Subject.CommonName)
+ }
+ }
+}
+
func TestPfxRoundTriRsa(t *testing.T) {
privateKey, err := rsa.GenerateKey(rand.Reader, 512)
if err != nil {
@@ -25,7 +49,7 @@ func TestPfxRoundTriRsa(t *testing.T) {
actualPrivateKey, ok := key.(*rsa.PrivateKey)
if !ok {
- t.Fatal("failed to decode private key")
+ t.Fatalf("failed to decode private key")
}
if privateKey.D.Cmp(actualPrivateKey.D) != 0 {
@@ -62,7 +86,7 @@ func testPfxRoundTrip(t *testing.T, privateKey interface{}) interface{} {
t.Fatal(err.Error())
}
- key, _, err := gopkcs12.Decode(bytes, "sesame")
+ key, _, err := Decode(bytes, "sesame")
if err != nil {
t.Fatalf(err.Error())
}
@@ -70,6 +94,61 @@ func testPfxRoundTrip(t *testing.T, privateKey interface{}) interface{} {
return key
}
+func TestPEM(t *testing.T) {
+ for commonName, base64P12 := range testdata {
+ p12, _ := base64.StdEncoding.DecodeString(base64P12)
+
+ blocks, err := ToPEM(p12, "")
+ if err != nil {
+ t.Fatalf("error while converting to PEM: %s", err)
+ }
+
+ var pemData []byte
+ for _, b := range blocks {
+ pemData = append(pemData, pem.EncodeToMemory(b)...)
+ }
+
+ cert, err := tls.X509KeyPair(pemData, pemData)
+ if err != nil {
+ t.Errorf("err while converting to key pair: %v", err)
+ }
+ config := tls.Config{
+ Certificates: []tls.Certificate{cert},
+ }
+ config.BuildNameToCertificate()
+
+ if _, exists := config.NameToCertificate[commonName]; !exists {
+ t.Errorf("did not find our cert in PEM?: %v", config.NameToCertificate)
+ }
+ }
+}
+
+func ExampleToPEM() {
+ p12, _ := base64.StdEncoding.DecodeString(`MIIJzgIBAzCCCZQGCS ... CA+gwggPk==`)
+
+ blocks, err := ToPEM(p12, "password")
+ if err != nil {
+ panic(err)
+ }
+
+ var pemData []byte
+ for _, b := range blocks {
+ pemData = append(pemData, pem.EncodeToMemory(b)...)
+ }
+
+ // then use PEM data for tls to construct tls certificate:
+ cert, err := tls.X509KeyPair(pemData, pemData)
+ if err != nil {
+ panic(err)
+ }
+
+ config := &tls.Config{
+ Certificates: []tls.Certificate{cert},
+ }
+
+ _ = config
+}
+
func newCertificate(hostname string, privateKey interface{}) ([]byte, error) {
t, _ := time.Parse("2006-01-02", "2016-01-01")
notBefore := t
@@ -115,3 +194,54 @@ func newCertificate(hostname string, privateKey interface{}) ([]byte, error) {
return derBytes, nil
}
+
+var testdata = map[string]string{
+ // 'null' password test case
+ "Windows Azure Tools": `MIIKDAIBAzCCCcwGCSqGSIb3DQEHAaCCCb0Eggm5MIIJtTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAhStUNnlTGV+gICB9AEggTIJ81JIossF6boFWpPtkiQRPtI6DW6e9QD4/WvHAVrM2bKdpMzSMsCML5NyuddANTKHBVq00Jc9keqGNAqJPKkjhSUebzQFyhe0E1oI9T4zY5UKr/I8JclOeccH4QQnsySzYUG2SnniXnQ+JrG3juetli7EKth9h6jLc6xbubPadY5HMB3wL/eG/kJymiXwU2KQ9Mgd4X6jbcV+NNCE/8jbZHvSTCPeYTJIjxfeX61Sj5kFKUCzERbsnpyevhY3X0eYtEDezZQarvGmXtMMdzf8HJHkWRdk9VLDLgjk8uiJif/+X4FohZ37ig0CpgC2+dP4DGugaZZ51hb8tN9GeCKIsrmWogMXDIVd0OACBp/EjJVmFB6y0kUCXxUE0TZt0XA1tjAGJcjDUpBvTntZjPsnH/4ZySy+s2d9OOhJ6pzRQBRm360TzkFdSwk9DLiLdGfv4pwMMu/vNGBlqjP/1sQtj+jprJiD1sDbCl4AdQZVoMBQHadF2uSD4/o17XG/Ci0r2h6Htc2yvZMAbEY4zMjjIn2a+vqIxD6onexaek1R3zbkS9j19D6EN9EWn8xgz80YRCyW65znZk8xaIhhvlU/mg7sTxeyuqroBZNcq6uDaQTehDpyH7bY2l4zWRpoj10a6JfH2q5shYz8Y6UZC/kOTfuGqbZDNZWro/9pYquvNNW0M847E5t9bsf9VkAAMHRGBbWoVoU9VpI0UnoXSfvpOo+aXa2DSq5sHHUTVY7A9eov3z5IqT+pligx11xcs+YhDWcU8di3BTJisohKvv5Y8WSkm/rloiZd4ig269k0jTRk1olP/vCksPli4wKG2wdsd5o42nX1yL7mFfXocOANZbB+5qMkiwdyoQSk+Vq+C8nAZx2bbKhUq2MbrORGMzOe0Hh0x2a0PeObycN1Bpyv7Mp3ZI9h5hBnONKCnqMhtyQHUj/nNvbJUnDVYNfoOEqDiEqqEwB7YqWzAKz8KW0OIqdlM8uiQ4JqZZlFllnWJUfaiDrdFM3lYSnFQBkzeVlts6GpDOOBjCYd7dcCNS6kq6pZC6p6HN60Twu0JnurZD6RT7rrPkIGE8vAenFt4iGe/yF52fahCSY8Ws4K0UTwN7bAS+4xRHVCWvE8sMRZsRCHizb5laYsVrPZJhE6+hux6OBb6w8kwPYXc+ud5v6UxawUWgt6uPwl8mlAtU9Z7Miw4Nn/wtBkiLL/ke1UI1gqJtcQXgHxx6mzsjh41+nAgTvdbsSEyU6vfOmxGj3Rwc1eOrIhJUqn5YjOWfzzsz/D5DzWKmwXIwdspt1p+u+kol1N3f2wT9fKPnd/RGCb4g/1hc3Aju4DQYgGY782l89CEEdalpQ/35bQczMFk6Fje12HykakWEXd/bGm9Unh82gH84USiRpeOfQvBDYoqEyrY3zkFZzBjhDqa+jEcAj41tcGx47oSfDq3iVYCdL7HSIjtnyEktVXd7mISZLoMt20JACFcMw+mrbjlug+eU7o2GR7T+LwtOp/p4LZqyLa7oQJDwde1BNZtm3TCK2P1mW94QDL0nDUps5KLtr1DaZXEkRbjSJub2ZE9WqDHyU3KA8G84Tq/rN1IoNu/if45jacyPje1Npj9IftUZSP22nV7HMwZtwQ4P4MYHRMBMGCSqGSIb3DQEJFTEGBAQBAAAAMFsGCSqGSIb3DQEJFDFOHkwAewBCADQAQQA0AEYARQBCADAALQBBADEAOABBAC0ANAA0AEIAQgAtAEIANQBGADIALQA0ADkAMQBFAEYAMQA1ADIAQgBBADEANgB9MF0GCSsGAQQBgjcRATFQHk4ATQBpAGMAcgBvAHMAbwBmAHQAIABTAG8AZgB0AHcAYQByAGUAIABLAGUAeQAgAFMAdABvAHIAYQBnAGUAIABQAHIAbwB2AGkAZABlAHIwggO/BgkqhkiG9w0BBwagggOwMIIDrAIBADCCA6UGCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECEBk5ZAYpu0WAgIH0ICCA3hik4mQFGpw9Ha8TQPtk+j2jwWdxfF0+sTk6S8PTsEfIhB7wPltjiCK92Uv2tCBQnodBUmatIfkpnRDEySmgmdglmOCzj204lWAMRs94PoALGn3JVBXbO1vIDCbAPOZ7Z0Hd0/1t2hmk8v3//QJGUg+qr59/4y/MuVfIg4qfkPcC2QSvYWcK3oTf6SFi5rv9B1IOWFgN5D0+C+x/9Lb/myPYX+rbOHrwtJ4W1fWKoz9g7wwmGFA9IJ2DYGuH8ifVFbDFT1Vcgsvs8arSX7oBsJVW0qrP7XkuDRe3EqCmKW7rBEwYrFznhxZcRDEpMwbFoSvgSIZ4XhFY9VKYglT+JpNH5iDceYEBOQL4vBLpxNUk3l5jKaBNxVa14AIBxq18bVHJ+STInhLhad4u10v/Xbx7wIL3f9DX1yLAkPrpBYbNHS2/ew6H/ySDJnoIDxkw2zZ4qJ+qUJZ1S0lbZVG+VT0OP5uF6tyOSpbMlcGkdl3z254n6MlCrTifcwkzscysDsgKXaYQw06rzrPW6RDub+t+hXzGny799fS9jhQMLDmOggaQ7+LA4oEZsfT89HLMWxJYDqjo3gIfjciV2mV54R684qLDS+AO09U49e6yEbwGlq8lpmO/pbXCbpGbB1b3EomcQbxdWxW2WEkkEd/VBn81K4M3obmywwXJkw+tPXDXfBmzzaqqCR+onMQ5ME1nMkY8ybnfoCc1bDIupjVWsEL2Wvq752RgI6KqzVNr1ew1IdqV5AWN2fOfek+0vi3Jd9FHF3hx8JMwjJL9dZsETV5kHtYJtE7wJ23J68BnCt2eI0GEuwXcCf5EdSKN/xXCTlIokc4Qk/gzRdIZsvcEJ6B1lGovKG54X4IohikqTjiepjbsMWj38yxDmK3mtENZ9ci8FPfbbvIEcOCZIinuY3qFUlRSbx7VUerEoV1IP3clUwexVQo4lHFee2jd7ocWsdSqSapW7OWUupBtDzRkqVhE7tGria+i1W2d6YLlJ21QTjyapWJehAMO637OdbJCCzDs1cXbodRRE7bsP492ocJy8OX66rKdhYbg8srSFNKdb3pF3UDNbN9jhI/t8iagRhNBhlQtTr1me2E/c86Q18qcRXl4bcXTt6acgCeffK6Y26LcVlrgjlD33AEYRRUeyC+rpxbT0aMjdFderlndKRIyG23mSp0HaUwNzAfMAcGBSsOAwIaBBRlviCbIyRrhIysg2dc/KbLFTc2vQQUg4rfwHMM4IKYRD/fsd1x6dda+wQ=`,
+ // empty string password test case
+ "testing@example.com": `MIIJzgIBAzCCCZQGCSqGSIb3DQEHAaCCCYUEggmBMIIJfTCCA/cGCSqGSIb3DQEHBqCCA+gwggPk
+AgEAMIID3QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIIszfRGqcmPcCAggAgIIDsOZ9Eg1L
+s5Wx8JhYoV3HAL4aRnkAWvTYB5NISZOgSgIQTssmt/3A7134dibTmaT/93LikkL3cTKLnQzJ4wDf
+YZ1bprpVJvUqz+HFT79m27bP9zYXFrvxWBJbxjYKTSjQMgz+h8LAEpXXGajCmxMJ1oCOtdXkhhzc
+LdZN6SAYgtmtyFnCdMEDskSggGuLb3fw84QEJ/Sj6FAULXunW/CPaS7Ce0TMsKmNU/jfFWj3yXXw
+ro0kwjKiVLpVFlnBlHo2OoVU7hmkm59YpGhLgS7nxLD3n7nBroQ0ID1+8R01NnV9XLGoGzxMm1te
+6UyTCkr5mj+kEQ8EP1Ys7g/TC411uhVWySMt/rcpkx7Vz1r9kYEAzJpONAfr6cuEVkPKrxpq4Fh0
+2fzlKBky0i/hrfIEUmngh+ERHUb/Mtv/fkv1j5w9suESbhsMLLiCXAlsP1UWMX+3bNizi3WVMEts
+FM2k9byn+p8IUD/A8ULlE4kEaWeoc+2idkCNQkLGuIdGUXUFVm58se0auUkVRoRJx8x4CkMesT8j
+b1H831W66YRWoEwwDQp2kK1lA2vQXxdVHWlFevMNxJeromLzj3ayiaFrfByeUXhR2S+Hpm+c0yNR
+4UVU9WED2kacsZcpRm9nlEa5sr28mri5JdBrNa/K02OOhvKCxr5ZGmbOVzUQKla2z4w+Ku9k8POm
+dfDNU/fGx1b5hcFWtghXe3msWVsSJrQihnN6q1ughzNiYZlJUGcHdZDRtiWwCFI0bR8h/Dmg9uO9
+4rawQQrjIRT7B8yF3UbkZyAqs8Ppb1TsMeNPHh1rxEfGVQknh/48ouJYsmtbnzugTUt3mJCXXiL+
+XcPMV6bBVAUu4aaVKSmg9+yJtY4/VKv10iw88ktv29fViIdBe3t6l/oPuvQgbQ8dqf4T8w0l/uKZ
+9lS1Na9jfT1vCoS7F5TRi+tmyj1vL5kr/amEIW6xKEP6oeAMvCMtbPAzVEj38zdJ1R22FfuIBxkh
+f0Zl7pdVbmzRxl/SBx9iIBJSqAvcXItiT0FIj8HxQ+0iZKqMQMiBuNWJf5pYOLWGrIyntCWwHuaQ
+wrx0sTGuEL9YXLEAsBDrsvzLkx/56E4INGZFrH8G7HBdW6iGqb22IMI4GHltYSyBRKbB0gadYTyv
+abPEoqww8o7/85aPSzOTJ/53ozD438Q+d0u9SyDuOb60SzCD/zPuCEd78YgtXJwBYTuUNRT27FaM
+3LGMX8Hz+6yPNRnmnA2XKPn7dx/IlaqAjIs8MIIFfgYJKoZIhvcNAQcBoIIFbwSCBWswggVnMIIF
+YwYLKoZIhvcNAQwKAQKgggTuMIIE6jAcBgoqhkiG9w0BDAEDMA4ECJr0cClYqOlcAgIIAASCBMhe
+OQSiP2s0/46ONXcNeVAkz2ksW3u/+qorhSiskGZ0b3dFa1hhgBU2Q7JVIkc4Hf7OXaT1eVQ8oqND
+uhqsNz83/kqYo70+LS8Hocj49jFgWAKrf/yQkdyP1daHa2yzlEw4mkpqOfnIORQHvYCa8nEApspZ
+wVu8y6WVuLHKU67mel7db2xwstQp7PRuSAYqGjTfAylElog8ASdaqqYbYIrCXucF8iF9oVgmb/Qo
+xrXshJ9aSLO4MuXlTPELmWgj07AXKSb90FKNihE+y0bWb9LPVFY1Sly3AX9PfrtkSXIZwqW3phpv
+MxGxQl/R6mr1z+hlTfY9Wdpb5vlKXPKA0L0Rt8d2pOesylFi6esJoS01QgP1kJILjbrV731kvDc0
+Jsd+Oxv4BMwA7ClG8w1EAOInc/GrV1MWFGw/HeEqj3CZ/l/0jv9bwkbVeVCiIhoL6P6lVx9pXq4t
+KZ0uKg/tk5TVJmG2vLcMLvezD0Yk3G2ZOMrywtmskrwoF7oAUpO9e87szoH6fEvUZlkDkPVW1NV4
+cZk3DBSQiuA3VOOg8qbo/tx/EE3H59P0axZWno2GSB0wFPWd1aj+b//tJEJHaaNR6qPRj4IWj9ru
+Qbc8eRAcVWleHg8uAehSvUXlFpyMQREyrnpvMGddpiTC8N4UMrrBRhV7+UbCOWhxPCbItnInBqgl
+1JpSZIP7iUtsIMdu3fEC2cdbXMTRul+4rdzUR7F9OaezV3jjvcAbDvgbK1CpyC+MJ1Mxm/iTgk9V
+iUArydhlR8OniN84GyGYoYCW9O/KUwb6ASmeFOu/msx8x6kAsSQHIkKqMKv0TUR3kZnkxUvdpBGP
+KTl4YCTvNGX4dYALBqrAETRDhua2KVBD/kEttDHwBNVbN2xi81+Mc7ml461aADfk0c66R/m2sjHB
+2tN9+wG12OIWFQjL6wF/UfJMYamxx2zOOExiId29Opt57uYiNVLOO4ourPewHPeH0u8Gz35aero7
+lkt7cZAe1Q0038JUuE/QGlnK4lESK9UkSIQAjSaAlTsrcfwtQxB2EjoOoLhwH5mvxUEmcNGNnXUc
+9xj3M5BD3zBz3Ft7G3YMMDwB1+zC2l+0UG0MGVjMVaeoy32VVNvxgX7jk22OXG1iaOB+PY9kdk+O
+X+52BGSf/rD6X0EnqY7XuRPkMGgjtpZeAYxRQnFtCZgDY4wYheuxqSSpdF49yNczSPLkgB3CeCfS
++9NTKN7aC6hBbmW/8yYh6OvSiCEwY0lFS/T+7iaVxr1loE4zI1y/FFp4Pe1qfLlLttVlkygga2UU
+SCunTQ8UB/M5IXWKkhMOO11dP4niWwb39Y7pCWpau7mwbXOKfRPX96cgHnQJK5uG+BesDD1oYnX0
+6frN7FOnTSHKruRIwuI8KnOQ/I+owmyz71wiv5LMQt+yM47UrEjB/EZa5X8dpEwOZvkdqL7utcyo
+l0XH5kWMXdW856LL/FYftAqJIDAmtX1TXF/rbP6mPyN/IlDC0gjP84Uzd/a2UyTIWr+wk49Ek3vQ
+/uDamq6QrwAxVmNh5Tset5Vhpc1e1kb7mRMZIzxSP8JcTuYd45oFKi98I8YjvueHVZce1g7OudQP
+SbFQoJvdT46iBg1TTatlltpOiH2mFaxWVS0xYjAjBgkqhkiG9w0BCRUxFgQUdA9eVqvETX4an/c8
+p8SsTugkit8wOwYJKoZIhvcNAQkUMS4eLABGAHIAaQBlAG4AZABsAHkAIABuAGEAbQBlACAAZgBv
+AHIAIABjAGUAcgB0MDEwITAJBgUrDgMCGgUABBRFsNz3Zd1O1GI8GTuFwCWuDOjEEwQIuBEfIcAy
+HQ8CAggA`,
+}
diff --git a/builder/azure/pkcs12/pkcs8.go b/builder/azure/pkcs12/pkcs8.go
index 5203d394f..22ab14d25 100644
--- a/builder/azure/pkcs12/pkcs8.go
+++ b/builder/azure/pkcs12/pkcs8.go
@@ -1,3 +1,6 @@
+// Copyright 2016 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 pkcs12
import (
@@ -28,7 +31,7 @@ var (
// marshalPKCS8PrivateKey converts a private key to PKCS#8 encoded form.
// See http://www.rsa.com/rsalabs/node.asp?id=2130 and RFC5208.
-func marshalPKCS8PrivateKey(key interface{}) ([]byte, error) {
+func marshalPKCS8PrivateKey(key interface{}) (der []byte, err error) {
pkcs := pkcs8{
Version: 0,
}
diff --git a/builder/azure/pkcs12/pkcs8_test.go b/builder/azure/pkcs12/pkcs8_test.go
index 1f891ef80..7d12119f5 100644
--- a/builder/azure/pkcs12/pkcs8_test.go
+++ b/builder/azure/pkcs12/pkcs8_test.go
@@ -35,7 +35,7 @@ func TestRoundTripPkcs8Rsa(t *testing.T) {
}
if actualPrivateKey.Validate() != nil {
- t.Fatal("private key did not validate")
+ t.Fatalf("private key did not validate")
}
if actualPrivateKey.N.Cmp(privateKey.N) != 0 {
diff --git a/builder/azure/pkcs12/rc2/bench_test.go b/builder/azure/pkcs12/rc2/bench_test.go
new file mode 100644
index 000000000..3347f338c
--- /dev/null
+++ b/builder/azure/pkcs12/rc2/bench_test.go
@@ -0,0 +1,27 @@
+// Copyright 2015 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 rc2
+
+import (
+ "testing"
+)
+
+func BenchmarkEncrypt(b *testing.B) {
+ r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
+ b.ResetTimer()
+ var src [8]byte
+ for i := 0; i < b.N; i++ {
+ r.Encrypt(src[:], src[:])
+ }
+}
+
+func BenchmarkDecrypt(b *testing.B) {
+ r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
+ b.ResetTimer()
+ var src [8]byte
+ for i := 0; i < b.N; i++ {
+ r.Decrypt(src[:], src[:])
+ }
+}
diff --git a/builder/azure/pkcs12/rc2/rc2.go b/builder/azure/pkcs12/rc2/rc2.go
index aa194e501..8c7090258 100644
--- a/builder/azure/pkcs12/rc2/rc2.go
+++ b/builder/azure/pkcs12/rc2/rc2.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 rc2 implements the RC2 cipher
/*
https://www.ietf.org/rfc/rfc2268.txt
@@ -10,7 +14,6 @@ package rc2
import (
"crypto/cipher"
"encoding/binary"
- "strconv"
)
// The rc2 block size in bytes
@@ -20,34 +23,15 @@ type rc2Cipher struct {
k [64]uint16
}
-// KeySizeError indicates the supplied key was invalid
-type KeySizeError int
-
-func (k KeySizeError) Error() string { return "rc2: invalid key size " + strconv.Itoa(int(k)) }
-
-// EffectiveKeySizeError indicates the supplied effective key length was invalid
-type EffectiveKeySizeError int
-
-func (k EffectiveKeySizeError) Error() string {
- return "rc2: invalid effective key size " + strconv.Itoa(int(k))
-}
-
// New returns a new rc2 cipher with the given key and effective key length t1
func New(key []byte, t1 int) (cipher.Block, error) {
- if l := len(key); l == 0 || l > 128 {
- return nil, KeySizeError(l)
- }
-
- if t1 < 8 || t1 > 1024 {
- return nil, EffectiveKeySizeError(t1)
- }
-
+ // TODO(dgryski): error checking for key length
return &rc2Cipher{
k: expandKey(key, t1),
}, nil
}
-func (c *rc2Cipher) BlockSize() int { return BlockSize }
+func (*rc2Cipher) BlockSize() int { return BlockSize }
var piTable = [256]byte{
0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d,
@@ -109,7 +93,6 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) {
var j int
- // These three mix blocks have not been extracted to a common function for to performance reasons.
for j <= 16 {
// mix r0
r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1)
@@ -130,6 +113,7 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) {
r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0)
r3 = rotl16(r3, 5)
j++
+
}
r0 = r0 + c.k[r3&63]
@@ -138,6 +122,7 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) {
r3 = r3 + c.k[r2&63]
for j <= 40 {
+
// mix r0
r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1)
r0 = rotl16(r0, 1)
@@ -157,6 +142,7 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) {
r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0)
r3 = rotl16(r3, 5)
j++
+
}
r0 = r0 + c.k[r3&63]
@@ -165,6 +151,7 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) {
r3 = r3 + c.k[r2&63]
for j <= 60 {
+
// mix r0
r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1)
r0 = rotl16(r0, 1)
@@ -248,6 +235,7 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) {
r0 = rotl16(r0, 16-1)
r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1)
j--
+
}
r3 = r3 - c.k[r2&63]
@@ -256,6 +244,7 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) {
r0 = r0 - c.k[r3&63]
for j >= 0 {
+
// unmix r3
r3 = rotl16(r3, 16-5)
r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0)
@@ -275,6 +264,7 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) {
r0 = rotl16(r0, 16-1)
r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1)
j--
+
}
binary.LittleEndian.PutUint16(dst[0:], r0)
diff --git a/builder/azure/pkcs12/rc2/rc2_test.go b/builder/azure/pkcs12/rc2/rc2_test.go
index adb73c592..8a49dfaf3 100644
--- a/builder/azure/pkcs12/rc2/rc2_test.go
+++ b/builder/azure/pkcs12/rc2/rc2_test.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 rc2
import (
@@ -8,6 +12,7 @@ import (
func TestEncryptDecrypt(t *testing.T) {
+ // TODO(dgryski): add the rest of the test vectors from the RFC
var tests = []struct {
key string
plain string
@@ -86,20 +91,3 @@ func TestEncryptDecrypt(t *testing.T) {
}
}
}
-
-func BenchmarkEncrypt(b *testing.B) {
- r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
- b.ResetTimer()
- var src [8]byte
- for i := 0; i < b.N; i++ {
- r.Encrypt(src[:], src[:])
- }
-}
-func BenchmarkDecrypt(b *testing.B) {
- r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
- b.ResetTimer()
- var src [8]byte
- for i := 0; i < b.N; i++ {
- r.Decrypt(src[:], src[:])
- }
-}
diff --git a/builder/azure/pkcs12/safebags.go b/builder/azure/pkcs12/safebags.go
index 5d4793b3e..bbd1526b8 100644
--- a/builder/azure/pkcs12/safebags.go
+++ b/builder/azure/pkcs12/safebags.go
@@ -1,17 +1,21 @@
+// Copyright 2015 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 pkcs12
import (
+ "crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"errors"
)
-//see https://tools.ietf.org/html/rfc7292#appendix-D
var (
- oidPkcs8ShroudedKeyBagType = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 12, 10, 1, 2}
- oidCertBagType = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 12, 10, 1, 3}
-
- oidCertTypeX509Certificate = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 22, 1}
+ // see https://tools.ietf.org/html/rfc7292#appendix-D
+ oidCertTypeX509Certificate = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 22, 1})
+ oidPKCS8ShroudedKeyBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 2})
+ oidCertBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 3})
)
type certBag struct {
@@ -52,7 +56,7 @@ func encodePkcs8ShroudedKeyBag(privateKey interface{}, password []byte) (bytes [
pkinfo := encryptedPrivateKeyInfo{
AlgorithmIdentifier: pkix.AlgorithmIdentifier{
- Algorithm: oidPbeWithSHAAnd3KeyTripleDESCBC,
+ Algorithm: oidPBEWithSHAAnd3KeyTripleDESCBC,
Parameters: params,
},
EncryptedData: pkData,
@@ -65,3 +69,37 @@ func encodePkcs8ShroudedKeyBag(privateKey interface{}, password []byte) (bytes [
return bytes, err
}
+
+func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{}, err error) {
+ pkinfo := new(encryptedPrivateKeyInfo)
+ if err = unmarshal(asn1Data, pkinfo); err != nil {
+ return nil, errors.New("pkcs12: error decoding PKCS#8 shrouded key bag: " + err.Error())
+ }
+
+ pkData, err := pbDecrypt(pkinfo, password)
+ if err != nil {
+ return nil, errors.New("pkcs12: error decrypting PKCS#8 shrouded key bag: " + err.Error())
+ }
+
+ ret := new(asn1.RawValue)
+ if err = unmarshal(pkData, ret); err != nil {
+ return nil, errors.New("pkcs12: error unmarshaling decrypted private key: " + err.Error())
+ }
+
+ if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil {
+ return nil, errors.New("pkcs12: error parsing PKCS#8 private key: " + err.Error())
+ }
+
+ return privateKey, nil
+}
+
+func decodeCertBag(asn1Data []byte) (x509Certificates []byte, err error) {
+ bag := new(certBag)
+ if err := unmarshal(asn1Data, bag); err != nil {
+ return nil, errors.New("pkcs12: error decoding cert bag: " + err.Error())
+ }
+ if !bag.Id.Equal(oidCertTypeX509Certificate) {
+ return nil, NotImplementedError("only X509 certificates are supported")
+ }
+ return bag.Data, nil
+}
diff --git a/builder/azure/pkcs12/safebags_test.go b/builder/azure/pkcs12/safebags_test.go
index 384dd5ce3..f21a83c68 100644
--- a/builder/azure/pkcs12/safebags_test.go
+++ b/builder/azure/pkcs12/safebags_test.go
@@ -1,39 +1,15 @@
+// Copyright 2016 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 pkcs12
import (
"crypto/rand"
"crypto/rsa"
- "crypto/x509"
"encoding/asn1"
- "fmt"
"testing"
)
-func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{}, err error) {
- pkinfo := new(encryptedPrivateKeyInfo)
- if _, err = asn1.Unmarshal(asn1Data, pkinfo); err != nil {
- err = fmt.Errorf("error decoding PKCS8 shrouded key bag: %v", err)
- return nil, err
- }
-
- pkData, err := pbDecrypt(pkinfo, password)
- if err != nil {
- err = fmt.Errorf("error decrypting PKCS8 shrouded key bag: %v", err)
- return
- }
-
- rv := new(asn1.RawValue)
- if _, err = asn1.Unmarshal(pkData, rv); err != nil {
- err = fmt.Errorf("could not decode decrypted private key data")
- }
-
- if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil {
- err = fmt.Errorf("error parsing PKCS8 private key: %v", err)
- return nil, err
- }
- return
-}
-
// Assert the default algorithm parameters are in the correct order,
// and default to the correct value. Defaults are based on OpenSSL.
// 1. IterationCount, defaults to 2,048 long.
@@ -61,7 +37,7 @@ func TestDefaultAlgorithmParametersPkcs8ShroudedKeyBag(t *testing.T) {
}
var params pbeParams
- rest, err = asn1.Unmarshal(pkinfo.GetAlgorithm().Parameters.FullBytes, ¶ms)
+ rest, err = asn1.Unmarshal(pkinfo.Algorithm().Parameters.FullBytes, ¶ms)
if err != nil {
t.Fatalf("failed to unmarshal encryptedPrivateKeyInfo %s", err)
}
@@ -97,6 +73,6 @@ func TestRoundTripPkcs8ShroudedKeyBag(t *testing.T) {
actualPrivateKey := key.(*rsa.PrivateKey)
if actualPrivateKey.D.Cmp(privateKey.D) != 0 {
- t.Fatal("failed to round-trip rsa.PrivateKey.D")
+ t.Fatalf("failed to round-trip rsa.PrivateKey.D")
}
}
diff --git a/builder/cloudstack/builder.go b/builder/cloudstack/builder.go
index 8e562354e..27af37d17 100644
--- a/builder/cloudstack/builder.go
+++ b/builder/cloudstack/builder.go
@@ -1,6 +1,8 @@
package cloudstack
import (
+ "fmt"
+
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/communicator"
"github.com/hashicorp/packer/packer"
@@ -56,34 +58,52 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
// Build the steps.
steps := []multistep.Step{
&stepPrepareConfig{},
- &stepCreateInstance{},
+ &common.StepHTTPServer{
+ HTTPDir: b.config.HTTPDir,
+ HTTPPortMin: b.config.HTTPPortMin,
+ HTTPPortMax: b.config.HTTPPortMax,
+ },
+ &stepKeypair{
+ Debug: b.config.PackerDebug,
+ DebugKeyPath: fmt.Sprintf("cs_%s.pem", b.config.PackerBuildName),
+ KeyPair: b.config.Keypair,
+ PrivateKeyFile: b.config.Comm.SSHPrivateKey,
+ SSHAgentAuth: b.config.Comm.SSHAgentAuth,
+ TemporaryKeyPairName: b.config.TemporaryKeypairName,
+ },
+ &stepCreateSecurityGroup{},
+ &stepCreateInstance{
+ Ctx: b.config.ctx,
+ Debug: b.config.PackerDebug,
+ },
&stepSetupNetworking{},
&communicator.StepConnect{
- Config: &b.config.Comm,
- Host: commHost,
- SSHConfig: sshConfig,
+ Config: &b.config.Comm,
+ Host: commHost,
+ SSHConfig: sshConfig(
+ b.config.Comm.SSHAgentAuth,
+ b.config.Comm.SSHUsername,
+ b.config.Comm.SSHPassword),
+ SSHPort: commPort,
+ WinRMPort: commPort,
},
&common.StepProvision{},
&stepShutdownInstance{},
&stepCreateTemplate{},
}
- // Configure the runner.
- if b.config.PackerDebug {
- b.runner = &multistep.DebugRunner{
- Steps: steps,
- PauseFn: common.MultistepDebugFn(ui),
- }
- } else {
- b.runner = &multistep.BasicRunner{Steps: steps}
- }
-
- // Run the steps.
+ // Configure the runner and run the steps.
+ b.runner = common.NewRunner(steps, b.config.PackerConfig, ui)
b.runner.Run(state)
- // If there are no templates, then just return
- template, ok := state.Get("template").(*cloudstack.CreateTemplateResponse)
- if !ok || template == nil {
+ // If there was an error, return that
+ if rawErr, ok := state.GetOk("error"); ok {
+ ui.Error(rawErr.(error).Error())
+ return nil, rawErr.(error)
+ }
+
+ // If there was no template created, just return
+ if _, ok := state.GetOk("template"); !ok {
return nil, nil
}
@@ -91,7 +111,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
artifact := &Artifact{
client: client,
config: b.config,
- template: template,
+ template: state.Get("template").(*cloudstack.CreateTemplateResponse),
}
return artifact, nil
diff --git a/builder/cloudstack/config.go b/builder/cloudstack/config.go
index 5394d3c9c..7a617c6cd 100644
--- a/builder/cloudstack/config.go
+++ b/builder/cloudstack/config.go
@@ -17,6 +17,7 @@ import (
// Config holds all the details needed to configure the builder.
type Config struct {
common.PackerConfig `mapstructure:",squash"`
+ common.HTTPConfig `mapstructure:",squash"`
Comm communicator.Config `mapstructure:",squash"`
APIURL string `mapstructure:"api_url"`
@@ -26,22 +27,26 @@ type Config struct {
HTTPGetOnly bool `mapstructure:"http_get_only"`
SSLNoVerify bool `mapstructure:"ssl_no_verify"`
- DiskOffering string `mapstructure:"disk_offering"`
- DiskSize int64 `mapstructure:"disk_size"`
- CIDRList []string `mapstructure:"cidr_list"`
- Hypervisor string `mapstructure:"hypervisor"`
- InstanceName string `mapstructure:"instance_name"`
- Keypair string `mapstructure:"keypair"`
- Network string `mapstructure:"network"`
- Project string `mapstructure:"project"`
- PublicIPAddress string `mapstructure:"public_ip_address"`
- ServiceOffering string `mapstructure:"service_offering"`
- SourceTemplate string `mapstructure:"source_template"`
- SourceISO string `mapstructure:"source_iso"`
- UserData string `mapstructure:"user_data"`
- UserDataFile string `mapstructure:"user_data_file"`
- UseLocalIPAddress bool `mapstructure:"use_local_ip_address"`
- Zone string `mapstructure:"zone"`
+ CIDRList []string `mapstructure:"cidr_list"`
+ CreateSecurityGroup bool `mapstructure:"create_security_group"`
+ DiskOffering string `mapstructure:"disk_offering"`
+ DiskSize int64 `mapstructure:"disk_size"`
+ Expunge bool `mapstructure:"expunge"`
+ Hypervisor string `mapstructure:"hypervisor"`
+ InstanceName string `mapstructure:"instance_name"`
+ Keypair string `mapstructure:"keypair"`
+ Network string `mapstructure:"network"`
+ Project string `mapstructure:"project"`
+ PublicIPAddress string `mapstructure:"public_ip_address"`
+ SecurityGroups []string `mapstructure:"security_groups"`
+ ServiceOffering string `mapstructure:"service_offering"`
+ SourceISO string `mapstructure:"source_iso"`
+ SourceTemplate string `mapstructure:"source_template"`
+ TemporaryKeypairName string `mapstructure:"temporary_keypair_name"`
+ UseLocalIPAddress bool `mapstructure:"use_local_ip_address"`
+ UserData string `mapstructure:"user_data"`
+ UserDataFile string `mapstructure:"user_data_file"`
+ Zone string `mapstructure:"zone"`
TemplateName string `mapstructure:"template_name"`
TemplateDisplayText string `mapstructure:"template_display_text"`
@@ -53,9 +58,7 @@ type Config struct {
TemplateScalable bool `mapstructure:"template_scalable"`
TemplateTag string `mapstructure:"template_tag"`
- ctx interpolate.Context
- hostAddress string // The host address used by the communicators.
- instanceSource string // This can be either a template ID or an ISO ID.
+ ctx interpolate.Context
}
// NewConfig parses and validates the given config.
@@ -64,6 +67,11 @@ func NewConfig(raws ...interface{}) (*Config, error) {
err := config.Decode(c, &config.DecodeOpts{
Interpolate: true,
InterpolateContext: &c.ctx,
+ InterpolateFilter: &interpolate.RenderFilter{
+ Exclude: []string{
+ "user_data",
+ },
+ },
}, raws...)
if err != nil {
return nil, err
@@ -72,10 +80,29 @@ func NewConfig(raws ...interface{}) (*Config, error) {
var errs *packer.MultiError
// Set some defaults.
+ if c.APIURL == "" {
+ // Default to environment variable for api_url, if it exists
+ c.APIURL = os.Getenv("CLOUDSTACK_API_URL")
+ }
+
+ if c.APIKey == "" {
+ // Default to environment variable for api_key, if it exists
+ c.APIKey = os.Getenv("CLOUDSTACK_API_KEY")
+ }
+
+ if c.SecretKey == "" {
+ // Default to environment variable for secret_key, if it exists
+ c.SecretKey = os.Getenv("CLOUDSTACK_SECRET_KEY")
+ }
+
if c.AsyncTimeout == 0 {
c.AsyncTimeout = 30 * time.Minute
}
+ if len(c.CIDRList) == 0 {
+ c.CIDRList = []string{"0.0.0.0/0"}
+ }
+
if c.InstanceName == "" {
c.InstanceName = fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID())
}
@@ -94,6 +121,14 @@ func NewConfig(raws ...interface{}) (*Config, error) {
c.TemplateDisplayText = c.TemplateName
}
+ // If we are not given an explicit keypair, ssh_password or ssh_private_key_file,
+ // then create a temporary one, but only if the temporary_keypair_name has not
+ // been provided.
+ if c.Keypair == "" && c.TemporaryKeypairName == "" &&
+ c.Comm.SSHPrivateKey == "" && c.Comm.SSHPassword == "" {
+ c.TemporaryKeypairName = fmt.Sprintf("packer_%s", uuid.TimeOrderedUUID())
+ }
+
// Process required parameters.
if c.APIURL == "" {
errs = packer.MultiErrorAppend(errs, errors.New("a api_url must be specified"))
@@ -107,14 +142,14 @@ func NewConfig(raws ...interface{}) (*Config, error) {
errs = packer.MultiErrorAppend(errs, errors.New("a secret_key must be specified"))
}
- if len(c.CIDRList) == 0 && !c.UseLocalIPAddress {
- errs = packer.MultiErrorAppend(errs, errors.New("a cidr_list must be specified"))
- }
-
if c.Network == "" {
errs = packer.MultiErrorAppend(errs, errors.New("a network must be specified"))
}
+ if c.CreateSecurityGroup && !c.Expunge {
+ errs = packer.MultiErrorAppend(errs, errors.New("auto creating a temporary security group requires expunge"))
+ }
+
if c.ServiceOffering == "" {
errs = packer.MultiErrorAppend(errs, errors.New("a service_offering must be specified"))
}
diff --git a/builder/cloudstack/config_test.go b/builder/cloudstack/config_test.go
index ea98ad70d..54fb3248a 100644
--- a/builder/cloudstack/config_test.go
+++ b/builder/cloudstack/config_test.go
@@ -38,7 +38,7 @@ func TestNewConfig(t *testing.T) {
"source_template": "d31e6af5-94a8-4756-abf3-6493c38db7e5",
},
Nullify: "cidr_list",
- Err: true,
+ Err: false,
},
"no_cidr_list_with_use_local_ip_address": {
Config: map[string]interface{}{
diff --git a/builder/cloudstack/ssh.go b/builder/cloudstack/ssh.go
index 83243a407..7a4c2fcba 100644
--- a/builder/cloudstack/ssh.go
+++ b/builder/cloudstack/ssh.go
@@ -2,56 +2,81 @@ package cloudstack
import (
"fmt"
- "io/ioutil"
+ "net"
+ "os"
packerssh "github.com/hashicorp/packer/communicator/ssh"
"github.com/mitchellh/multistep"
- "github.com/xanzy/go-cloudstack/cloudstack"
"golang.org/x/crypto/ssh"
+ "golang.org/x/crypto/ssh/agent"
)
func commHost(state multistep.StateBag) (string, error) {
- client := state.Get("client").(*cloudstack.CloudStackClient)
- config := state.Get("config").(*Config)
-
- if config.hostAddress == "" {
- ipAddr, _, err := client.Address.GetPublicIpAddressByID(config.PublicIPAddress)
- if err != nil {
- return "", fmt.Errorf("Failed to retrieve IP address: %s", err)
- }
-
- config.hostAddress = ipAddr.Ipaddress
+ ip, hasIP := state.Get("ipaddress").(string)
+ if !hasIP {
+ return "", fmt.Errorf("Failed to retrieve IP address")
}
- return config.hostAddress, nil
+ return ip, nil
}
-func sshConfig(state multistep.StateBag) (*ssh.ClientConfig, error) {
- config := state.Get("config").(*Config)
-
- clientConfig := &ssh.ClientConfig{
- User: config.Comm.SSHUsername,
- Auth: []ssh.AuthMethod{
- ssh.Password(config.Comm.SSHPassword),
- ssh.KeyboardInteractive(
- packerssh.PasswordKeyboardInteractive(config.Comm.SSHPassword)),
- },
- HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+func commPort(state multistep.StateBag) (int, error) {
+ commPort, hasPort := state.Get("commPort").(int)
+ if !hasPort {
+ return 0, fmt.Errorf("Failed to retrieve communication port")
}
- if config.Comm.SSHPrivateKey != "" {
- privateKey, err := ioutil.ReadFile(config.Comm.SSHPrivateKey)
- if err != nil {
- return nil, fmt.Errorf("Error loading configured private key file: %s", err)
- }
-
- signer, err := ssh.ParsePrivateKey(privateKey)
- if err != nil {
- return nil, fmt.Errorf("Error setting up SSH config: %s", err)
- }
-
- clientConfig.Auth = []ssh.AuthMethod{ssh.PublicKeys(signer)}
- }
-
- return clientConfig, nil
+ return commPort, nil
+}
+
+func sshConfig(useAgent bool, username, password string) func(state multistep.StateBag) (*ssh.ClientConfig, error) {
+ return func(state multistep.StateBag) (*ssh.ClientConfig, error) {
+ if useAgent {
+ authSock := os.Getenv("SSH_AUTH_SOCK")
+ if authSock == "" {
+ return nil, fmt.Errorf("SSH_AUTH_SOCK is not set")
+ }
+
+ sshAgent, err := net.Dial("unix", authSock)
+ if err != nil {
+ return nil, fmt.Errorf("Cannot connect to SSH Agent socket %q: %s", authSock, err)
+ }
+
+ return &ssh.ClientConfig{
+ User: username,
+ Auth: []ssh.AuthMethod{
+ ssh.PublicKeysCallback(agent.NewClient(sshAgent).Signers),
+ },
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ }, nil
+ }
+
+ privateKey, hasKey := state.GetOk("privateKey")
+
+ if hasKey {
+ signer, err := ssh.ParsePrivateKey([]byte(privateKey.(string)))
+ if err != nil {
+ return nil, fmt.Errorf("Error setting up SSH config: %s", err)
+ }
+
+ return &ssh.ClientConfig{
+ User: username,
+ Auth: []ssh.AuthMethod{
+ ssh.PublicKeys(signer),
+ },
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ }, nil
+
+ } else {
+
+ return &ssh.ClientConfig{
+ User: username,
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ Auth: []ssh.AuthMethod{
+ ssh.Password(password),
+ ssh.KeyboardInteractive(
+ packerssh.PasswordKeyboardInteractive(password)),
+ }}, nil
+ }
+ }
}
diff --git a/builder/cloudstack/step_configure_networking.go b/builder/cloudstack/step_configure_networking.go
index 9d525c255..d9a6a365c 100644
--- a/builder/cloudstack/step_configure_networking.go
+++ b/builder/cloudstack/step_configure_networking.go
@@ -25,6 +25,7 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
if config.UseLocalIPAddress {
ui.Message("Using the local IP address...")
+ state.Put("commPort", config.Comm.Port())
ui.Message("Networking has been setup!")
return multistep.ActionContinue
}
@@ -32,22 +33,17 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Generate a random public port used to configure our port forward.
rand.Seed(time.Now().UnixNano())
s.publicPort = 50000 + rand.Intn(10000)
+ state.Put("commPort", s.publicPort)
// Set the currently configured port to be the private port.
s.privatePort = config.Comm.Port()
- // Set the SSH or WinRM port to be the randomly generated public port.
- switch config.Comm.Type {
- case "ssh":
- config.Comm.SSHPort = s.publicPort
- case "winrm":
- config.Comm.WinRMPort = s.publicPort
- }
-
// Retrieve the instance ID from the previously saved state.
instanceID, ok := state.Get("instance_id").(string)
if !ok || instanceID == "" {
- ui.Error("Could not retrieve instance_id from state!")
+ err := fmt.Errorf("Could not retrieve instance_id from state!")
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -56,7 +52,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
cloudstack.WithProject(config.Project),
)
if err != nil {
- ui.Error(fmt.Sprintf("Failed to retrieve the network object: %s", err))
+ err := fmt.Errorf("Failed to retrieve the network object: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -79,13 +77,15 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Associate a new public IP address.
ipAddr, err := client.Address.AssociateIpAddress(p)
if err != nil {
- ui.Error(fmt.Sprintf("Failed to associate public IP address: %s", err))
+ err := fmt.Errorf("Failed to associate public IP address: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
// Set the IP address and it's ID.
config.PublicIPAddress = ipAddr.Id
- config.hostAddress = ipAddr.Ipaddress
+ state.Put("ipaddress", ipAddr.Ipaddress)
// Store the IP address ID.
state.Put("ip_address_id", ipAddr.Id)
@@ -107,7 +107,10 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Create the port forward.
forward, err := client.Firewall.CreatePortForwardingRule(p)
if err != nil {
- ui.Error(fmt.Sprintf("Failed to create port forward: %s", err))
+ err := fmt.Errorf("Failed to create port forward: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
}
// Store the port forward ID.
@@ -117,7 +120,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
ui.Message("Creating network ACL rule...")
if network.Aclid == "" {
- ui.Error("Failed to configure the firewall: no ACL connected to the VPC network")
+ err := fmt.Errorf("Failed to configure the firewall: no ACL connected to the VPC network")
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -135,7 +140,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Create the network ACL rule.
aclRule, err := client.NetworkACL.CreateNetworkACL(p)
if err != nil {
- ui.Error(fmt.Sprintf("Failed to create network ACL rule: %s", err))
+ err := fmt.Errorf("Failed to create network ACL rule: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -154,7 +161,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
fwRule, err := client.Firewall.CreateFirewallRule(p)
if err != nil {
- ui.Error(fmt.Sprintf("Failed to create firewall rule: %s", err))
+ err := fmt.Errorf("Failed to create firewall rule: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -163,7 +172,6 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
}
ui.Message("Networking has been setup!")
-
return multistep.ActionContinue
}
@@ -235,6 +243,5 @@ func (s *stepSetupNetworking) Cleanup(state multistep.StateBag) {
}
ui.Message("Networking has been cleaned!")
-
return
}
diff --git a/builder/cloudstack/step_create_instance.go b/builder/cloudstack/step_create_instance.go
index c1caa9f36..3e37fad14 100644
--- a/builder/cloudstack/step_create_instance.go
+++ b/builder/cloudstack/step_create_instance.go
@@ -2,16 +2,29 @@ package cloudstack
import (
"encoding/base64"
+ "errors"
"fmt"
+ "net"
"strings"
+ "github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
"github.com/mitchellh/multistep"
"github.com/xanzy/go-cloudstack/cloudstack"
)
+// userDataTemplateData represents variables for user_data interpolation
+type userDataTemplateData struct {
+ HTTPIP string
+ HTTPPort uint
+}
+
// stepCreateInstance represents a Packer build step that creates CloudStack instances.
-type stepCreateInstance struct{}
+type stepCreateInstance struct {
+ Debug bool
+ Ctx interpolate.Context
+}
// Run executes the Packer build step that creates a CloudStack instance.
func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction {
@@ -24,7 +37,7 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Create a new parameter struct.
p := client.VirtualMachine.NewDeployVirtualMachineParams(
config.ServiceOffering,
- config.instanceSource,
+ state.Get("source").(string),
config.Zone,
)
@@ -32,8 +45,12 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
p.SetName(config.InstanceName)
p.SetDisplayname("Created by Packer")
- if config.Keypair != "" {
- p.SetKeypair(config.Keypair)
+ if keypair, ok := state.GetOk("keypair"); ok {
+ p.SetKeypair(keypair.(string))
+ }
+
+ if securitygroups, ok := state.GetOk("security_groups"); ok {
+ p.SetSecuritygroupids(securitygroups.([]string))
}
// If we use an ISO, configure the disk offering.
@@ -50,6 +67,8 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Retrieve the zone object.
zone, _, err := client.Zone.GetZoneByID(config.Zone)
if err != nil {
+ err := fmt.Errorf("Failed to get zone %s by ID: %s", config.Zone, err)
+ state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -65,8 +84,24 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
}
if config.UserData != "" {
- ud, err := getUserData(config.UserData, config.HTTPGetOnly)
+ httpPort := state.Get("http_port").(uint)
+ httpIP, err := hostIP()
if err != nil {
+ err := fmt.Errorf("Failed to determine host IP: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ common.SetHTTPIP(httpIP)
+
+ s.Ctx.Data = &userDataTemplateData{
+ httpIP,
+ httpPort,
+ }
+
+ ud, err := s.generateUserData(config.UserData, config.HTTPGetOnly)
+ if err != nil {
+ state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -77,12 +112,20 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Create the new instance.
instance, err := client.VirtualMachine.DeployVirtualMachine(p)
if err != nil {
- ui.Error(fmt.Sprintf("Error creating new instance %s: %s", config.InstanceName, err))
+ err := fmt.Errorf("Error creating new instance %s: %s", config.InstanceName, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
ui.Message("Instance has been created!")
+ // In debug-mode, we output the password
+ if s.Debug {
+ ui.Message(fmt.Sprintf(
+ "Password (since debug is enabled) \"%s\"", instance.Password))
+ }
+
// Set the auto generated password if a password was not explicitly configured.
switch config.Comm.Type {
case "ssh":
@@ -97,7 +140,7 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Set the host address when using the local IP address to connect.
if config.UseLocalIPAddress {
- config.hostAddress = instance.Nic[0].Ipaddress
+ state.Put("ipaddress", instance.Nic[0].Ipaddress)
}
// Store the instance ID so we can remove it later.
@@ -109,6 +152,7 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Cleanup any resources that may have been created during the Run phase.
func (s *stepCreateInstance) Cleanup(state multistep.StateBag) {
client := state.Get("client").(*cloudstack.CloudStackClient)
+ config := state.Get("config").(*Config)
ui := state.Get("ui").(packer.Ui)
instanceID, ok := state.Get("instance_id").(string)
@@ -119,9 +163,6 @@ func (s *stepCreateInstance) Cleanup(state multistep.StateBag) {
// Create a new parameter struct.
p := client.VirtualMachine.NewDestroyVirtualMachineParams(instanceID)
- // Set expunge so the instance is completely removed
- p.SetExpunge(true)
-
ui.Say("Deleting instance...")
if _, err := client.VirtualMachine.DestroyVirtualMachine(p); err != nil {
// This is a very poor way to be told the ID does no longer exist :(
@@ -131,23 +172,53 @@ func (s *stepCreateInstance) Cleanup(state multistep.StateBag) {
return
}
- ui.Error(fmt.Sprintf("Error destroying instance: %s", err))
+ ui.Error(fmt.Sprintf("Error destroying instance. Please destroy it manually.\n\n"+
+ "\tName: %s\n"+
+ "\tError: %s", config.InstanceName, err))
+ return
+ }
+
+ // We could expunge the VM while destroying it, but if the user doesn't have
+ // rights that single call could error out leaving the VM running. So but
+ // splitting these calls we make sure the VM is always deleted, even when the
+ // expunge fails.
+ if config.Expunge {
+ // Create a new parameter struct.
+ p := client.VirtualMachine.NewExpungeVirtualMachineParams(instanceID)
+
+ ui.Say("Expunging instance...")
+ if _, err := client.VirtualMachine.ExpungeVirtualMachine(p); err != nil {
+ // This is a very poor way to be told the ID does no longer exist :(
+ if strings.Contains(err.Error(), fmt.Sprintf(
+ "Invalid parameter id value=%s due to incorrect long value format, "+
+ "or entity does not exist", instanceID)) {
+ return
+ }
+
+ ui.Error(fmt.Sprintf("Error expunging instance. Please expunge it manually.\n\n"+
+ "\tName: %s\n"+
+ "\tError: %s", config.InstanceName, err))
+ return
+ }
}
ui.Message("Instance has been deleted!")
-
return
}
-// getUserData returns the user data as a base64 encoded string.
-func getUserData(userData string, httpGETOnly bool) (string, error) {
- ud := base64.StdEncoding.EncodeToString([]byte(userData))
+// generateUserData returns the user data as a base64 encoded string.
+func (s *stepCreateInstance) generateUserData(userData string, httpGETOnly bool) (string, error) {
+ renderedUserData, err := interpolate.Render(userData, &s.Ctx)
+ if err != nil {
+ return "", fmt.Errorf("Error rendering user_data: %s", err)
+ }
- // deployVirtualMachine uses POST by default, so max userdata is 32K
+ ud := base64.StdEncoding.EncodeToString([]byte(renderedUserData))
+
+ // DeployVirtualMachine uses POST by default which allows 32K of
+ // userdata. If using GET instead the userdata is limited to 2K.
maxUD := 32768
-
if httpGETOnly {
- // deployVirtualMachine using GET instead, so max userdata is 2K
maxUD = 2048
}
@@ -159,3 +230,20 @@ func getUserData(userData string, httpGETOnly bool) (string, error) {
return ud, nil
}
+
+func hostIP() (string, error) {
+ addrs, err := net.InterfaceAddrs()
+ if err != nil {
+ return "", err
+ }
+
+ for _, addr := range addrs {
+ if ipnet, ok := addr.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
+ if ipnet.IP.To4() != nil {
+ return ipnet.IP.String(), nil
+ }
+ }
+ }
+
+ return "", errors.New("No host IP found")
+}
diff --git a/builder/cloudstack/step_create_security_group.go b/builder/cloudstack/step_create_security_group.go
new file mode 100644
index 000000000..1bf23100b
--- /dev/null
+++ b/builder/cloudstack/step_create_security_group.go
@@ -0,0 +1,94 @@
+package cloudstack
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/packer/common/uuid"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "github.com/xanzy/go-cloudstack/cloudstack"
+)
+
+type stepCreateSecurityGroup struct {
+ tempSG string
+}
+
+func (s *stepCreateSecurityGroup) Run(state multistep.StateBag) multistep.StepAction {
+ client := state.Get("client").(*cloudstack.CloudStackClient)
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ if len(config.SecurityGroups) > 0 {
+ state.Put("security_groups", config.SecurityGroups)
+ return multistep.ActionContinue
+ }
+
+ if !config.CreateSecurityGroup {
+ return multistep.ActionContinue
+ }
+
+ ui.Say("Creating temporary Security Group...")
+
+ p := client.SecurityGroup.NewCreateSecurityGroupParams(
+ fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID()),
+ )
+ p.SetDescription("Temporary SG created by Packer")
+ if config.Project != "" {
+ p.SetProjectid(config.Project)
+ }
+
+ sg, err := client.SecurityGroup.CreateSecurityGroup(p)
+ if err != nil {
+ err := fmt.Errorf("Failed to create security group: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ s.tempSG = sg.Id
+ state.Put("security_groups", []string{sg.Id})
+
+ // Create Ingress rule
+ i := client.SecurityGroup.NewAuthorizeSecurityGroupIngressParams()
+ i.SetCidrlist(config.CIDRList)
+ i.SetProtocol("TCP")
+ i.SetSecuritygroupid(sg.Id)
+ i.SetStartport(config.Comm.Port())
+ i.SetEndport(config.Comm.Port())
+ if config.Project != "" {
+ i.SetProjectid(config.Project)
+ }
+
+ _, err = client.SecurityGroup.AuthorizeSecurityGroupIngress(i)
+ if err != nil {
+ err := fmt.Errorf("Failed to authorize security group ingress rule: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ return multistep.ActionContinue
+}
+
+// Cleanup any resources that may have been created during the Run phase.
+func (s *stepCreateSecurityGroup) Cleanup(state multistep.StateBag) {
+ client := state.Get("client").(*cloudstack.CloudStackClient)
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ if s.tempSG == "" {
+ return
+ }
+
+ ui.Say(fmt.Sprintf("Cleanup temporary security group: %s ...", s.tempSG))
+ p := client.SecurityGroup.NewDeleteSecurityGroupParams()
+ p.SetId(s.tempSG)
+ if config.Project != "" {
+ p.SetProjectid(config.Project)
+ }
+
+ if _, err := client.SecurityGroup.DeleteSecurityGroup(p); err != nil {
+ ui.Error(err.Error())
+ ui.Error(fmt.Sprintf("Error deleting security group: %s. Please destroy it manually.\n", s.tempSG))
+ }
+}
diff --git a/builder/cloudstack/step_create_template.go b/builder/cloudstack/step_create_template.go
index 9845a3166..18d6c1fb0 100644
--- a/builder/cloudstack/step_create_template.go
+++ b/builder/cloudstack/step_create_template.go
@@ -21,7 +21,9 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
// Retrieve the instance ID from the previously saved state.
instanceID, ok := state.Get("instance_id").(string)
if !ok || instanceID == "" {
- ui.Error("Could not retrieve instance_id from state!")
+ err := fmt.Errorf("Could not retrieve instance_id from state!")
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -50,6 +52,7 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
ui.Message("Retrieving the ROOT volume ID...")
volumeID, err := getRootVolumeID(client, instanceID)
if err != nil {
+ state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -60,7 +63,9 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
ui.Message("Creating the new template...")
template, err := client.Template.CreateTemplate(p)
if err != nil {
- ui.Error(fmt.Sprintf("Error creating the new template %s: %s", config.TemplateName, err))
+ err := fmt.Errorf("Error creating the new template %s: %s", config.TemplateName, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -72,7 +77,7 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
ui.Message("Template has been created!")
- // Store the template ID.
+ // Store the template.
state.Put("template", template)
return multistep.ActionContinue
diff --git a/builder/cloudstack/step_keypair.go b/builder/cloudstack/step_keypair.go
new file mode 100644
index 000000000..675994fc1
--- /dev/null
+++ b/builder/cloudstack/step_keypair.go
@@ -0,0 +1,133 @@
+package cloudstack
+
+import (
+ "fmt"
+ "io/ioutil"
+ "os"
+ "runtime"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "github.com/xanzy/go-cloudstack/cloudstack"
+)
+
+type stepKeypair struct {
+ Debug bool
+ DebugKeyPath string
+ KeyPair string
+ PrivateKeyFile string
+ SSHAgentAuth bool
+ TemporaryKeyPairName string
+}
+
+func (s *stepKeypair) Run(state multistep.StateBag) multistep.StepAction {
+ ui := state.Get("ui").(packer.Ui)
+
+ if s.PrivateKeyFile != "" {
+ privateKeyBytes, err := ioutil.ReadFile(s.PrivateKeyFile)
+ if err != nil {
+ state.Put("error", fmt.Errorf(
+ "Error loading configured private key file: %s", err))
+ return multistep.ActionHalt
+ }
+
+ state.Put("keypair", s.KeyPair)
+ state.Put("privateKey", string(privateKeyBytes))
+
+ return multistep.ActionContinue
+ }
+
+ if s.SSHAgentAuth && s.KeyPair == "" {
+ ui.Say("Using SSH Agent with keypair in Source image")
+ return multistep.ActionContinue
+ }
+
+ if s.SSHAgentAuth && s.KeyPair != "" {
+ ui.Say(fmt.Sprintf("Using SSH Agent for existing keypair %s", s.KeyPair))
+ state.Put("keypair", s.KeyPair)
+ return multistep.ActionContinue
+ }
+
+ if s.TemporaryKeyPairName == "" {
+ ui.Say("Not using a keypair")
+ state.Put("keypair", "")
+ return multistep.ActionContinue
+ }
+
+ client := state.Get("client").(*cloudstack.CloudStackClient)
+
+ ui.Say(fmt.Sprintf("Creating temporary keypair: %s ...", s.TemporaryKeyPairName))
+
+ p := client.SSH.NewCreateSSHKeyPairParams(s.TemporaryKeyPairName)
+ keypair, err := client.SSH.CreateSSHKeyPair(p)
+ if err != nil {
+ err := fmt.Errorf("Error creating temporary keypair: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ if keypair.Privatekey == "" {
+ err := fmt.Errorf("The temporary keypair returned was blank")
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ ui.Say(fmt.Sprintf("Created temporary keypair: %s", s.TemporaryKeyPairName))
+
+ // If we're in debug mode, output the private key to the working directory.
+ if s.Debug {
+ ui.Message(fmt.Sprintf("Saving key for debug purposes: %s", s.DebugKeyPath))
+ f, err := os.Create(s.DebugKeyPath)
+ if err != nil {
+ state.Put("error", fmt.Errorf("Error saving debug key: %s", err))
+ return multistep.ActionHalt
+ }
+ defer f.Close()
+
+ // Write the key out
+ if _, err := f.Write([]byte(keypair.Privatekey)); err != nil {
+ err := fmt.Errorf("Error saving debug key: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ // Chmod it so that it is SSH ready
+ if runtime.GOOS != "windows" {
+ if err := f.Chmod(0600); err != nil {
+ err := fmt.Errorf("Error setting permissions of debug key: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+ }
+
+ // Set some state data for use in future steps
+ state.Put("keypair", s.TemporaryKeyPairName)
+ state.Put("privateKey", keypair.Privatekey)
+
+ return multistep.ActionContinue
+}
+
+func (s *stepKeypair) Cleanup(state multistep.StateBag) {
+ if s.TemporaryKeyPairName == "" {
+ return
+ }
+
+ ui := state.Get("ui").(packer.Ui)
+ client := state.Get("client").(*cloudstack.CloudStackClient)
+
+ ui.Say(fmt.Sprintf("Deleting temporary keypair: %s ...", s.TemporaryKeyPairName))
+
+ _, err := client.SSH.DeleteSSHKeyPair(client.SSH.NewDeleteSSHKeyPairParams(
+ s.TemporaryKeyPairName,
+ ))
+ if err != nil {
+ ui.Error(err.Error())
+ ui.Error(fmt.Sprintf(
+ "Error cleaning up keypair. Please delete the key manually: %s", s.TemporaryKeyPairName))
+ }
+}
diff --git a/builder/cloudstack/step_prepare_config.go b/builder/cloudstack/step_prepare_config.go
index 82b75dccf..4d6353c6a 100644
--- a/builder/cloudstack/step_prepare_config.go
+++ b/builder/cloudstack/step_prepare_config.go
@@ -53,26 +53,34 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
}
}
- if config.PublicIPAddress != "" && !isUUID(config.PublicIPAddress) {
- // Save the public IP address before replacing it with it's UUID.
- config.hostAddress = config.PublicIPAddress
+ if config.PublicIPAddress != "" {
+ if isUUID(config.PublicIPAddress) {
+ ip, _, err := client.Address.GetPublicIpAddressByID(config.PublicIPAddress)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed to retrieve IP address: %s", err))
+ }
+ state.Put("ipaddress", ip.Ipaddress)
+ } else {
+ // Save the public IP address before replacing it with it's UUID.
+ state.Put("ipaddress", config.PublicIPAddress)
- p := client.Address.NewListPublicIpAddressesParams()
- p.SetIpaddress(config.PublicIPAddress)
+ p := client.Address.NewListPublicIpAddressesParams()
+ p.SetIpaddress(config.PublicIPAddress)
- if config.Project != "" {
- p.SetProjectid(config.Project)
- }
+ if config.Project != "" {
+ p.SetProjectid(config.Project)
+ }
- ipAddrs, err := client.Address.ListPublicIpAddresses(p)
- if err != nil {
- errs = packer.MultiErrorAppend(errs, &retrieveErr{"IP address", config.PublicIPAddress, err})
- }
- if err == nil && ipAddrs.Count != 1 {
- errs = packer.MultiErrorAppend(errs, &retrieveErr{"IP address", config.PublicIPAddress, ipAddrs})
- }
- if err == nil && ipAddrs.Count == 1 {
- config.PublicIPAddress = ipAddrs.PublicIpAddresses[0].Id
+ ipAddrs, err := client.Address.ListPublicIpAddresses(p)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, &retrieveErr{"IP address", config.PublicIPAddress, err})
+ }
+ if err == nil && ipAddrs.Count != 1 {
+ errs = packer.MultiErrorAppend(errs, &retrieveErr{"IP address", config.PublicIPAddress, ipAddrs})
+ }
+ if err == nil && ipAddrs.Count == 1 {
+ config.PublicIPAddress = ipAddrs.PublicIpAddresses[0].Id
+ }
}
}
@@ -83,6 +91,18 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
}
}
+ // Then try to get the SG's UUID's.
+ if len(config.SecurityGroups) > 0 {
+ for i := range config.SecurityGroups {
+ if !isUUID(config.SecurityGroups[i]) {
+ config.SecurityGroups[i], _, err = client.SecurityGroup.GetSecurityGroupID(config.SecurityGroups[i], cloudstack.WithProject(config.Project))
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, &retrieveErr{"network", config.SecurityGroups[i], err})
+ }
+ }
+ }
+ }
+
if !isUUID(config.ServiceOffering) {
config.ServiceOffering, _, err = client.ServiceOffering.GetServiceOfferingID(config.ServiceOffering)
if err != nil {
@@ -92,23 +112,25 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.SourceISO != "" {
if isUUID(config.SourceISO) {
- config.instanceSource = config.SourceISO
+ state.Put("source", config.SourceISO)
} else {
- config.instanceSource, _, err = client.ISO.GetIsoID(config.SourceISO, "executable", config.Zone)
+ isoID, _, err := client.ISO.GetIsoID(config.SourceISO, "executable", config.Zone)
if err != nil {
errs = packer.MultiErrorAppend(errs, &retrieveErr{"ISO", config.SourceISO, err})
}
+ state.Put("source", isoID)
}
}
if config.SourceTemplate != "" {
if isUUID(config.SourceTemplate) {
- config.instanceSource = config.SourceTemplate
+ state.Put("source", config.SourceTemplate)
} else {
- config.instanceSource, _, err = client.Template.GetTemplateID(config.SourceTemplate, "executable", config.Zone)
+ templateID, _, err := client.Template.GetTemplateID(config.SourceTemplate, "executable", config.Zone)
if err != nil {
errs = packer.MultiErrorAppend(errs, &retrieveErr{"template", config.SourceTemplate, err})
}
+ state.Put("source", templateID)
}
}
@@ -133,12 +155,12 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
// an interface with type *packer.MultiError and value nil which is different then a
// nil interface.
if errs != nil && len(errs.Errors) > 0 {
+ state.Put("error", errs)
ui.Error(errs.Error())
return multistep.ActionHalt
}
ui.Message("Config has been prepared!")
-
return multistep.ActionContinue
}
diff --git a/builder/cloudstack/step_shutdown_instance.go b/builder/cloudstack/step_shutdown_instance.go
index d472a79d8..b090a5836 100644
--- a/builder/cloudstack/step_shutdown_instance.go
+++ b/builder/cloudstack/step_shutdown_instance.go
@@ -20,7 +20,7 @@ func (s *stepShutdownInstance) Run(state multistep.StateBag) multistep.StepActio
// Retrieve the instance ID from the previously saved state.
instanceID, ok := state.Get("instance_id").(string)
if !ok || instanceID == "" {
- ui.Error("Could not retrieve instance_id from state!")
+ state.Put("error", fmt.Errorf("Could not retrieve instance_id from state!"))
return multistep.ActionHalt
}
@@ -30,12 +30,13 @@ func (s *stepShutdownInstance) Run(state multistep.StateBag) multistep.StepActio
// Shutdown the virtual machine.
_, err := client.VirtualMachine.StopVirtualMachine(p)
if err != nil {
- ui.Error(fmt.Sprintf("Error shutting down instance %s: %s", config.InstanceName, err))
+ err := fmt.Errorf("Error shutting down instance %s: %s", config.InstanceName, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
ui.Message("Instance has been shutdown!")
-
return multistep.ActionContinue
}
diff --git a/builder/digitalocean/step_snapshot.go b/builder/digitalocean/step_snapshot.go
index bd5298137..eb91fdead 100644
--- a/builder/digitalocean/step_snapshot.go
+++ b/builder/digitalocean/step_snapshot.go
@@ -85,12 +85,12 @@ func (s *stepSnapshot) Run(state multistep.StateBag) multistep.StepAction {
}
imageTransfer, _, err := client.ImageActions.Transfer(context.TODO(), images[0].ID, transferRequest)
if err != nil {
- err := fmt.Errorf("Error transfering snapshot: %s", err)
+ err := fmt.Errorf("Error transferring snapshot: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
- ui.Say(fmt.Sprintf("Transfering Snapshot ID: %d", imageTransfer.ID))
+ ui.Say(fmt.Sprintf("transferring Snapshot ID: %d", imageTransfer.ID))
if err := waitForImageState(godo.ActionCompleted, imageTransfer.ID, action.ID,
client, 20*time.Minute); err != nil {
// If we get an error the first time, actually report it
diff --git a/builder/docker/communicator.go b/builder/docker/communicator.go
index d33f79e95..d15143172 100644
--- a/builder/docker/communicator.go
+++ b/builder/docker/communicator.go
@@ -18,22 +18,36 @@ import (
)
type Communicator struct {
- ContainerId string
- HostDir string
- ContainerDir string
- Version *version.Version
- Config *Config
- lock sync.Mutex
+ ContainerID string
+ HostDir string
+ ContainerDir string
+ Version *version.Version
+ Config *Config
+ ContainerUser string
+ lock sync.Mutex
}
func (c *Communicator) Start(remote *packer.RemoteCmd) error {
- var cmd *exec.Cmd
- if c.Config.Pty {
- cmd = exec.Command("docker", "exec", "-i", "-t", c.ContainerId, "/bin/sh", "-c", fmt.Sprintf("(%s)", remote.Command))
- } else {
- cmd = exec.Command("docker", "exec", "-i", c.ContainerId, "/bin/sh", "-c", fmt.Sprintf("(%s)", remote.Command))
+ dockerArgs := []string{
+ "exec",
+ "-i",
+ c.ContainerID,
+ "/bin/sh",
+ "-c",
+ fmt.Sprintf("(%s)", remote.Command),
}
+ if c.Config.Pty {
+ dockerArgs = append(dockerArgs[:2], append([]string{"-t"}, dockerArgs[2:]...)...)
+ }
+
+ if c.Config.ExecUser != "" {
+ dockerArgs = append(dockerArgs[:2],
+ append([]string{"-u", c.Config.ExecUser}, dockerArgs[2:]...)...)
+ }
+
+ cmd := exec.Command("docker", dockerArgs...)
+
var (
stdin_w io.WriteCloser
err error
@@ -60,130 +74,146 @@ func (c *Communicator) Start(remote *packer.RemoteCmd) error {
return nil
}
+// Upload uploads a file to the docker container
func (c *Communicator) Upload(dst string, src io.Reader, fi *os.FileInfo) error {
+ if fi == nil {
+ return c.uploadReader(dst, src)
+ }
+ return c.uploadFile(dst, src, fi)
+}
+
+// uploadReader writes an io.Reader to a temporary file before uploading
+func (c *Communicator) uploadReader(dst string, src io.Reader) error {
// Create a temporary file to store the upload
tempfile, err := ioutil.TempFile(c.HostDir, "upload")
if err != nil {
- return err
+ return fmt.Errorf("Failed to open temp file for writing: %s", err)
}
defer os.Remove(tempfile.Name())
+ defer tempfile.Close()
- // Copy the contents to the temporary file
- _, err = io.Copy(tempfile, src)
+ if _, err := io.Copy(tempfile, src); err != nil {
+ return fmt.Errorf("Failed to copy upload file to tempfile: %s", err)
+ }
+ tempfile.Seek(0, 0)
+ fi, err := tempfile.Stat()
+ if err != nil {
+ return fmt.Errorf("Error getting tempfile info: %s", err)
+ }
+ return c.uploadFile(dst, tempfile, &fi)
+}
+
+// uploadFile uses docker cp to copy the file from the host to the container
+func (c *Communicator) uploadFile(dst string, src io.Reader, fi *os.FileInfo) error {
+
+ // command format: docker cp /path/to/infile containerid:/path/to/outfile
+ log.Printf("Copying to %s on container %s.", dst, c.ContainerID)
+
+ localCmd := exec.Command("docker", "cp", "-",
+ fmt.Sprintf("%s:%s", c.ContainerID, filepath.Dir(dst)))
+
+ stderrP, err := localCmd.StderrPipe()
+ if err != nil {
+ return fmt.Errorf("Failed to open pipe: %s", err)
+ }
+
+ stdin, err := localCmd.StdinPipe()
+ if err != nil {
+ return fmt.Errorf("Failed to open pipe: %s", err)
+ }
+
+ if err := localCmd.Start(); err != nil {
+ return err
+ }
+
+ archive := tar.NewWriter(stdin)
+ header, err := tar.FileInfoHeader(*fi, "")
+ if err != nil {
+ return err
+ }
+ header.Name = filepath.Base(dst)
+ archive.WriteHeader(header)
+ numBytes, err := io.Copy(archive, src)
+ if err != nil {
+ return fmt.Errorf("Failed to pipe upload: %s", err)
+ }
+ log.Printf("Copied %d bytes for %s", numBytes, dst)
+
+ if err := archive.Close(); err != nil {
+ return fmt.Errorf("Failed to close archive: %s", err)
+ }
+ if err := stdin.Close(); err != nil {
+ return fmt.Errorf("Failed to close stdin: %s", err)
+ }
+
+ stderrOut, err := ioutil.ReadAll(stderrP)
if err != nil {
return err
}
- if fi != nil {
- tempfile.Chmod((*fi).Mode())
- }
- tempfile.Close()
-
- // Copy the file into place by copying the temporary file we put
- // into the shared folder into the proper location in the container
- cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("command cp %s/%s %s", c.ContainerDir,
- filepath.Base(tempfile.Name()), dst),
+ if err := localCmd.Wait(); err != nil {
+ return fmt.Errorf("Failed to upload to '%s' in container: %s. %s.", dst, stderrOut, err)
}
- if err := c.Start(cmd); err != nil {
+ if err := c.fixDestinationOwner(dst); err != nil {
return err
}
- // Wait for the copy to complete
- cmd.Wait()
- if cmd.ExitStatus != 0 {
- return fmt.Errorf("Upload failed with non-zero exit status: %d", cmd.ExitStatus)
- }
-
return nil
}
func (c *Communicator) UploadDir(dst string, src string, exclude []string) error {
- // Create the temporary directory that will store the contents of "src"
- // for copying into the container.
- td, err := ioutil.TempDir(c.HostDir, "dirupload")
- if err != nil {
- return err
- }
- defer os.RemoveAll(td)
+ /*
+ from https://docs.docker.com/engine/reference/commandline/cp/#extended-description
+ SRC_PATH specifies a directory
+ DEST_PATH does not exist
+ DEST_PATH is created as a directory and the contents of the source directory are copied into this directory
+ DEST_PATH exists and is a file
+ Error condition: cannot copy a directory to a file
+ DEST_PATH exists and is a directory
+ SRC_PATH does not end with /. (that is: slash followed by dot)
+ the source directory is copied into this directory
+ SRC_PATH does end with /. (that is: slash followed by dot)
+ the content of the source directory is copied into this directory
- walkFn := func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
+ translating that in to our semantics:
- relpath, err := filepath.Rel(src, path)
- if err != nil {
- return err
- }
- hostpath := filepath.Join(td, relpath)
+ if source ends in /
+ docker cp src. dest
+ otherwise, cp source dest
- // If it is a directory, just create it
- if info.IsDir() {
- return os.MkdirAll(hostpath, info.Mode())
- }
+ */
- if info.Mode()&os.ModeSymlink == os.ModeSymlink {
- dest, err := os.Readlink(path)
+ var dockerSource string
- if err != nil {
- return err
- }
-
- return os.Symlink(dest, hostpath)
- }
-
- // It is a file, copy it over, including mode.
- src, err := os.Open(path)
- if err != nil {
- return err
- }
- defer src.Close()
-
- dst, err := os.Create(hostpath)
- if err != nil {
- return err
- }
- defer dst.Close()
-
- if _, err := io.Copy(dst, src); err != nil {
- return err
- }
-
- si, err := src.Stat()
- if err != nil {
- return err
- }
-
- return dst.Chmod(si.Mode())
- }
-
- // Copy the entire directory tree to the temporary directory
- if err := filepath.Walk(src, walkFn); err != nil {
- return err
- }
-
- // Determine the destination directory
- containerSrc := filepath.Join(c.ContainerDir, filepath.Base(td))
- containerDst := dst
- if src[len(src)-1] != '/' {
- containerDst = filepath.Join(dst, filepath.Base(src))
+ if src[len(src)-1] == '/' {
+ dockerSource = fmt.Sprintf("%s.", src)
+ } else {
+ dockerSource = fmt.Sprintf("%s", src)
}
// Make the directory, then copy into it
- cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("set -e; mkdir -p %s; cd %s; command cp -R `ls -A .` %s",
- containerDst, containerSrc, containerDst),
+ localCmd := exec.Command("docker", "cp", dockerSource, fmt.Sprintf("%s:%s", c.ContainerID, dst))
+
+ stderrP, err := localCmd.StderrPipe()
+ if err != nil {
+ return fmt.Errorf("Failed to open pipe: %s", err)
}
- if err := c.Start(cmd); err != nil {
+ if err := localCmd.Start(); err != nil {
+ return fmt.Errorf("Failed to copy: %s", err)
+ }
+ stderrOut, err := ioutil.ReadAll(stderrP)
+ if err != nil {
return err
}
// Wait for the copy to complete
- cmd.Wait()
- if cmd.ExitStatus != 0 {
- return fmt.Errorf("Upload failed with non-zero exit status: %d", cmd.ExitStatus)
+ if err := localCmd.Wait(); err != nil {
+ return fmt.Errorf("Failed to upload to '%s' in container: %s. %s.", dst, stderrOut, err)
+ }
+
+ if err := c.fixDestinationOwner(dst); err != nil {
+ return err
}
return nil
@@ -193,8 +223,8 @@ func (c *Communicator) UploadDir(dst string, src string, exclude []string) error
// path and want to write to an io.Writer, not a file. We use - to make docker
// cp to write to stdout, and then copy the stream to our destination io.Writer.
func (c *Communicator) Download(src string, dst io.Writer) error {
- log.Printf("Downloading file from container: %s:%s", c.ContainerId, src)
- localCmd := exec.Command("docker", "cp", fmt.Sprintf("%s:%s", c.ContainerId, src), "-")
+ log.Printf("Downloading file from container: %s:%s", c.ContainerID, src)
+ localCmd := exec.Command("docker", "cp", fmt.Sprintf("%s:%s", c.ContainerID, src), "-")
pipe, err := localCmd.StdoutPipe()
if err != nil {
@@ -289,3 +319,25 @@ func (c *Communicator) run(cmd *exec.Cmd, remote *packer.RemoteCmd, stdin io.Wri
// Set the exit status which triggers waiters
remote.SetExited(exitStatus)
}
+
+// TODO Workaround for #5307. Remove once #5409 is fixed.
+func (c *Communicator) fixDestinationOwner(destination string) error {
+ if !c.Config.FixUploadOwner {
+ return nil
+ }
+
+ owner := c.ContainerUser
+ if owner == "" {
+ owner = "root"
+ }
+
+ chownArgs := []string{
+ "docker", "exec", "--user", "root", c.ContainerID, "/bin/sh", "-c",
+ fmt.Sprintf("chown -R %s %s", owner, destination),
+ }
+ if output, err := exec.Command(chownArgs[0], chownArgs[1:]...).CombinedOutput(); err != nil {
+ return fmt.Errorf("Failed to set owner of the uploaded file: %s, %s", err, output)
+ }
+
+ return nil
+}
diff --git a/builder/docker/communicator_test.go b/builder/docker/communicator_test.go
index 908593a5e..bdfaef996 100644
--- a/builder/docker/communicator_test.go
+++ b/builder/docker/communicator_test.go
@@ -71,6 +71,7 @@ func TestUploadDownload(t *testing.T) {
upload,
download,
},
+ ProvisionerTypes: []string{"", ""},
},
}
hook := &packer.DispatchHook{Mapping: hooks}
@@ -161,6 +162,7 @@ func TestLargeDownload(t *testing.T) {
downloadCupcake,
downloadBigcake,
},
+ ProvisionerTypes: []string{"", "", ""},
},
}
hook := &packer.DispatchHook{Mapping: hooks}
@@ -207,6 +209,82 @@ func TestLargeDownload(t *testing.T) {
}
+// TestFixUploadOwner verifies that owner of uploaded files is the user the container is running as.
+func TestFixUploadOwner(t *testing.T) {
+ ui := packer.TestUi(t)
+ cache := &packer.FileCache{CacheDir: os.TempDir()}
+
+ tpl, err := template.Parse(strings.NewReader(testFixUploadOwnerTemplate))
+ if err != nil {
+ t.Fatalf("Unable to parse config: %s", err)
+ }
+
+ if os.Getenv("PACKER_ACC") == "" {
+ t.Skip("This test is only run with PACKER_ACC=1")
+ }
+ cmd := exec.Command("docker", "-v")
+ cmd.Run()
+ if !cmd.ProcessState.Success() {
+ t.Error("docker command not found; please make sure docker is installed")
+ }
+
+ // Setup the builder
+ builder := &Builder{}
+ warnings, err := builder.Prepare(tpl.Builders["docker"].Config)
+ if err != nil {
+ t.Fatalf("Error preparing configuration %s", err)
+ }
+ if len(warnings) > 0 {
+ t.Fatal("Encountered configuration warnings; aborting")
+ }
+
+ // Setup the provisioners
+ fileProvisioner := &file.Provisioner{}
+ err = fileProvisioner.Prepare(tpl.Provisioners[0].Config)
+ if err != nil {
+ t.Fatalf("Error preparing single file upload provisioner: %s", err)
+ }
+
+ dirProvisioner := &file.Provisioner{}
+ err = dirProvisioner.Prepare(tpl.Provisioners[1].Config)
+ if err != nil {
+ t.Fatalf("Error preparing directory upload provisioner: %s", err)
+ }
+
+ shellProvisioner := &shell.Provisioner{}
+ err = shellProvisioner.Prepare(tpl.Provisioners[2].Config)
+ if err != nil {
+ t.Fatalf("Error preparing shell provisioner: %s", err)
+ }
+
+ verifyProvisioner := &shell.Provisioner{}
+ err = verifyProvisioner.Prepare(tpl.Provisioners[3].Config)
+ if err != nil {
+ t.Fatalf("Error preparing verification provisioner: %s", err)
+ }
+
+ // Add hooks so the provisioners run during the build
+ hooks := map[string][]packer.Hook{}
+ hooks[packer.HookProvision] = []packer.Hook{
+ &packer.ProvisionHook{
+ Provisioners: []packer.Provisioner{
+ fileProvisioner,
+ dirProvisioner,
+ shellProvisioner,
+ verifyProvisioner,
+ },
+ ProvisionerTypes: []string{"", "", "", ""},
+ },
+ }
+ hook := &packer.DispatchHook{Mapping: hooks}
+
+ artifact, err := builder.Run(ui, hook, cache)
+ if err != nil {
+ t.Fatalf("Error running build %s", err)
+ }
+ defer artifact.Destroy()
+}
+
const dockerBuilderConfig = `
{
"builders": [
@@ -267,3 +345,40 @@ const dockerLargeBuilderConfig = `
]
}
`
+
+const testFixUploadOwnerTemplate = `
+{
+ "builders": [
+ {
+ "type": "docker",
+ "image": "ubuntu",
+ "discard": true,
+ "run_command": ["-d", "-i", "-t", "-u", "42", "{{.Image}}", "/bin/sh"]
+ }
+ ],
+ "provisioners": [
+ {
+ "type": "file",
+ "source": "test-fixtures/onecakes/strawberry",
+ "destination": "/tmp/strawberry-cake"
+ },
+ {
+ "type": "file",
+ "source": "test-fixtures/manycakes",
+ "destination": "/tmp/"
+ },
+ {
+ "type": "shell",
+ "inline": "touch /tmp/testUploadOwner"
+ },
+ {
+ "type": "shell",
+ "inline": [
+ "[ $(stat -c %u /tmp/strawberry-cake) -eq 42 ] || (echo 'Invalid owner of /tmp/strawberry-cake' && exit 1)",
+ "[ $(stat -c %u /tmp/testUploadOwner) -eq 42 ] || (echo 'Invalid owner of /tmp/testUploadOwner' && exit 1)",
+ "find /tmp/manycakes | xargs -n1 -IFILE /bin/sh -c '[ $(stat -c %u FILE) -eq 42 ] || (echo \"Invalid owner of FILE\" && exit 1)'"
+ ]
+ }
+ ]
+}
+`
diff --git a/builder/docker/config.go b/builder/docker/config.go
index 7ba1f4587..fee08929d 100644
--- a/builder/docker/config.go
+++ b/builder/docker/config.go
@@ -23,18 +23,21 @@ type Config struct {
common.PackerConfig `mapstructure:",squash"`
Comm communicator.Config `mapstructure:",squash"`
- Commit bool
- Discard bool
- ExportPath string `mapstructure:"export_path"`
- Image string
- Pty bool
- Pull bool
- RunCommand []string `mapstructure:"run_command"`
- Volumes map[string]string
- Privileged bool `mapstructure:"privileged"`
- Author string
- Changes []string
- Message string
+ Author string
+ Changes []string
+ Commit bool
+ ContainerDir string `mapstructure:"container_dir"`
+ Discard bool
+ ExecUser string `mapstructure:"exec_user"`
+ ExportPath string `mapstructure:"export_path"`
+ Image string
+ Message string
+ Privileged bool `mapstructure:"privileged"`
+ Pty bool
+ Pull bool
+ RunCommand []string `mapstructure:"run_command"`
+ Volumes map[string]string
+ FixUploadOwner bool `mapstructure:"fix_upload_owner"`
// This is used to login to dockerhub to pull a private base container. For
// pushing to dockerhub, see the docker post-processors
@@ -52,6 +55,8 @@ type Config struct {
func NewConfig(raws ...interface{}) (*Config, []string, error) {
c := new(Config)
+ c.FixUploadOwner = true
+
var md mapstructure.Metadata
err := config.Decode(c, &config.DecodeOpts{
Metadata: &md,
@@ -112,6 +117,10 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
}
+ if c.ContainerDir == "" {
+ c.ContainerDir = "/packer-files"
+ }
+
if c.EcrLogin && c.LoginServer == "" {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("ECR login requires login server to be provided."))
}
diff --git a/builder/docker/step_connect_docker.go b/builder/docker/step_connect_docker.go
index f84d369c2..45cf2d25d 100644
--- a/builder/docker/step_connect_docker.go
+++ b/builder/docker/step_connect_docker.go
@@ -1,7 +1,10 @@
package docker
import (
+ "fmt"
"github.com/mitchellh/multistep"
+ "os/exec"
+ "strings"
)
type StepConnectDocker struct{}
@@ -19,14 +22,21 @@ func (s *StepConnectDocker) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt
}
+ containerUser, err := getContainerUser(containerId)
+ if err != nil {
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
// Create the communicator that talks to Docker via various
// os/exec tricks.
comm := &Communicator{
- ContainerId: containerId,
- HostDir: tempDir,
- ContainerDir: "/packer-files",
- Version: version,
- Config: config,
+ ContainerID: containerId,
+ HostDir: tempDir,
+ ContainerDir: config.ContainerDir,
+ Version: version,
+ Config: config,
+ ContainerUser: containerUser,
}
state.Put("communicator", comm)
@@ -34,3 +44,16 @@ func (s *StepConnectDocker) Run(state multistep.StateBag) multistep.StepAction {
}
func (s *StepConnectDocker) Cleanup(state multistep.StateBag) {}
+
+func getContainerUser(containerId string) (string, error) {
+ inspectArgs := []string{"docker", "inspect", "--format", "{{.Config.User}}", containerId}
+ stdout, err := exec.Command(inspectArgs[0], inspectArgs[1:]...).Output()
+ if err != nil {
+ errStr := fmt.Sprintf("Failed to inspect the container: %s", err)
+ if ee, ok := err.(*exec.ExitError); ok {
+ errStr = fmt.Sprintf("%s, %s", errStr, ee.Stderr)
+ }
+ return "", fmt.Errorf(errStr)
+ }
+ return strings.TrimSpace(string(stdout)), nil
+}
diff --git a/builder/docker/step_run.go b/builder/docker/step_run.go
index 92803f932..5a56d8d7d 100644
--- a/builder/docker/step_run.go
+++ b/builder/docker/step_run.go
@@ -26,7 +26,7 @@ func (s *StepRun) Run(state multistep.StateBag) multistep.StepAction {
for host, container := range config.Volumes {
runConfig.Volumes[host] = container
}
- runConfig.Volumes[tempDir] = "/packer-files"
+ runConfig.Volumes[tempDir] = config.ContainerDir
ui.Say("Starting docker container...")
containerId, err := driver.StartContainer(&runConfig)
diff --git a/builder/googlecompute/config.go b/builder/googlecompute/config.go
index 4250f1824..020ec9ab8 100644
--- a/builder/googlecompute/config.go
+++ b/builder/googlecompute/config.go
@@ -26,6 +26,8 @@ type Config struct {
AccountFile string `mapstructure:"account_file"`
ProjectId string `mapstructure:"project_id"`
+ AcceleratorType string `mapstructure:"accelerator_type"`
+ AcceleratorCount int64 `mapstructure:"accelerator_count"`
Address string `mapstructure:"address"`
DiskName string `mapstructure:"disk_name"`
DiskSizeGb int64 `mapstructure:"disk_size"`
@@ -33,7 +35,9 @@ type Config struct {
ImageName string `mapstructure:"image_name"`
ImageDescription string `mapstructure:"image_description"`
ImageFamily string `mapstructure:"image_family"`
+ ImageLabels map[string]string `mapstructure:"image_labels"`
InstanceName string `mapstructure:"instance_name"`
+ Labels map[string]string `mapstructure:"labels"`
MachineType string `mapstructure:"machine_type"`
Metadata map[string]string `mapstructure:"metadata"`
Network string `mapstructure:"network"`
@@ -205,6 +209,14 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
errs = packer.MultiErrorAppend(fmt.Errorf("'use_internal_ip' must be true if 'omit_external_ip' is true"))
}
+ if c.AcceleratorCount > 0 && len(c.AcceleratorType) == 0 {
+ errs = packer.MultiErrorAppend(fmt.Errorf("'accelerator_type' must be set when 'accelerator_count' is more than 0"))
+ }
+
+ if c.AcceleratorCount > 0 && c.OnHostMaintenance != "TERMINATE" {
+ errs = packer.MultiErrorAppend(fmt.Errorf("'on_host_maintenance' must be set to 'TERMINATE' when 'accelerator_count' is more than 0"))
+ }
+
// Check for any errors.
if errs != nil && len(errs.Errors) > 0 {
return nil, nil, errs
diff --git a/builder/googlecompute/config_test.go b/builder/googlecompute/config_test.go
index e65da2794..551692b29 100644
--- a/builder/googlecompute/config_test.go
+++ b/builder/googlecompute/config_test.go
@@ -1,6 +1,7 @@
package googlecompute
import (
+ "fmt"
"io/ioutil"
"strings"
"testing"
@@ -190,6 +191,65 @@ func TestConfigPrepare(t *testing.T) {
}
}
+func TestConfigPrepareAccelerator(t *testing.T) {
+ cases := []struct {
+ Keys []string
+ Values []interface{}
+ Err bool
+ }{
+ {
+ []string{"accelerator_count", "on_host_maintenance", "accelerator_type"},
+ []interface{}{1, "MIGRATE", "something_valid"},
+ true,
+ },
+ {
+ []string{"accelerator_count", "on_host_maintenance", "accelerator_type"},
+ []interface{}{1, "TERMINATE", "something_valid"},
+ false,
+ },
+ {
+ []string{"accelerator_count", "on_host_maintenance", "accelerator_type"},
+ []interface{}{1, "TERMINATE", nil},
+ true,
+ },
+ {
+ []string{"accelerator_count", "on_host_maintenance", "accelerator_type"},
+ []interface{}{1, "TERMINATE", ""},
+ true,
+ },
+ {
+ []string{"accelerator_count", "on_host_maintenance", "accelerator_type"},
+ []interface{}{1, "TERMINATE", "something_valid"},
+ false,
+ },
+ }
+
+ for _, tc := range cases {
+ raw := testConfig(t)
+
+ errStr := ""
+ for k := range tc.Keys {
+
+ // Create the string for error reporting
+ // convert value to string if it can be converted
+ errStr += fmt.Sprintf("%s:%v, ", tc.Keys[k], tc.Values[k])
+ if tc.Values[k] == nil {
+ delete(raw, tc.Keys[k])
+ } else {
+ raw[tc.Keys[k]] = tc.Values[k]
+ }
+ }
+
+ _, warns, errs := NewConfig(raw)
+
+ if tc.Err {
+ testConfigErr(t, warns, errs, strings.TrimRight(errStr, ", "))
+ } else {
+ testConfigOk(t, warns, errs)
+ }
+ }
+}
+
func TestConfigDefaults(t *testing.T) {
cases := []struct {
Read func(c *Config) interface{}
@@ -245,7 +305,11 @@ func testConfig(t *testing.T) map[string]interface{} {
"source_image": "foo",
"ssh_username": "root",
"image_family": "bar",
- "zone": "us-east1-a",
+ "image_labels": map[string]string{
+ "label-1": "value-1",
+ "label-2": "value-2",
+ },
+ "zone": "us-east1-a",
}
}
diff --git a/builder/googlecompute/driver.go b/builder/googlecompute/driver.go
index b07c9d77b..bd302ddc0 100644
--- a/builder/googlecompute/driver.go
+++ b/builder/googlecompute/driver.go
@@ -11,7 +11,7 @@ import (
type Driver interface {
// CreateImage creates an image from the given disk in Google Compute
// Engine.
- CreateImage(name, description, family, zone, disk string) (<-chan *Image, <-chan error)
+ CreateImage(name, description, family, zone, disk string, image_labels map[string]string) (<-chan *Image, <-chan error)
// DeleteImage deletes the image with the given name.
DeleteImage(name string) <-chan error
@@ -58,11 +58,14 @@ type Driver interface {
}
type InstanceConfig struct {
+ AcceleratorType string
+ AcceleratorCount int64
Address string
Description string
DiskSizeGb int64
DiskType string
Image *Image
+ Labels map[string]string
MachineType string
Metadata map[string]string
Name string
diff --git a/builder/googlecompute/driver_gce.go b/builder/googlecompute/driver_gce.go
index fe3987a1a..02a230cfe 100644
--- a/builder/googlecompute/driver_gce.go
+++ b/builder/googlecompute/driver_gce.go
@@ -98,11 +98,12 @@ func NewDriverGCE(ui packer.Ui, p string, a *AccountFile) (Driver, error) {
}, nil
}
-func (d *driverGCE) CreateImage(name, description, family, zone, disk string) (<-chan *Image, <-chan error) {
+func (d *driverGCE) CreateImage(name, description, family, zone, disk string, image_labels map[string]string) (<-chan *Image, <-chan error) {
gce_image := &compute.Image{
Description: description,
Name: name,
Family: family,
+ Labels: image_labels,
SourceDisk: fmt.Sprintf("%s%s/zones/%s/disks/%s", d.service.BasePath, d.projectId, zone, disk),
SourceType: "RAW",
}
@@ -380,6 +381,15 @@ func (d *driverGCE) RunInstance(c *InstanceConfig) (<-chan error, error) {
})
}
+ var guestAccelerators []*compute.AcceleratorConfig
+ if c.AcceleratorCount > 0 {
+ ac := &compute.AcceleratorConfig{
+ AcceleratorCount: c.AcceleratorCount,
+ AcceleratorType: c.AcceleratorType,
+ }
+ guestAccelerators = append(guestAccelerators, ac)
+ }
+
// Create the instance information
instance := compute.Instance{
Description: c.Description,
@@ -397,7 +407,9 @@ func (d *driverGCE) RunInstance(c *InstanceConfig) (<-chan error, error) {
},
},
},
- MachineType: machineType.SelfLink,
+ GuestAccelerators: guestAccelerators,
+ Labels: c.Labels,
+ MachineType: machineType.SelfLink,
Metadata: &compute.Metadata{
Items: metadata,
},
diff --git a/builder/googlecompute/driver_mock.go b/builder/googlecompute/driver_mock.go
index f9423b8aa..895775da5 100644
--- a/builder/googlecompute/driver_mock.go
+++ b/builder/googlecompute/driver_mock.go
@@ -8,6 +8,7 @@ type DriverMock struct {
CreateImageName string
CreateImageDesc string
CreateImageFamily string
+ CreateImageLabels map[string]string
CreateImageZone string
CreateImageDisk string
CreateImageResultLicenses []string
@@ -81,10 +82,11 @@ type DriverMock struct {
WaitForInstanceErrCh <-chan error
}
-func (d *DriverMock) CreateImage(name, description, family, zone, disk string) (<-chan *Image, <-chan error) {
+func (d *DriverMock) CreateImage(name, description, family, zone, disk string, image_labels map[string]string) (<-chan *Image, <-chan error) {
d.CreateImageName = name
d.CreateImageDesc = description
d.CreateImageFamily = family
+ d.CreateImageLabels = image_labels
d.CreateImageZone = zone
d.CreateImageDisk = disk
if d.CreateImageResultProjectId == "" {
@@ -103,6 +105,7 @@ func (d *DriverMock) CreateImage(name, description, family, zone, disk string) (
if resultCh == nil {
ch := make(chan *Image, 1)
ch <- &Image{
+ Labels: d.CreateImageLabels,
Licenses: d.CreateImageResultLicenses,
Name: name,
ProjectId: d.CreateImageResultProjectId,
diff --git a/builder/googlecompute/image.go b/builder/googlecompute/image.go
index 11fe7df55..fae69db75 100644
--- a/builder/googlecompute/image.go
+++ b/builder/googlecompute/image.go
@@ -5,6 +5,7 @@ import (
)
type Image struct {
+ Labels map[string]string
Licenses []string
Name string
ProjectId string
diff --git a/builder/googlecompute/startup.go b/builder/googlecompute/startup.go
index a94c91141..687afec98 100644
--- a/builder/googlecompute/startup.go
+++ b/builder/googlecompute/startup.go
@@ -21,7 +21,7 @@ GetMetadata () {
echo "$(curl -f -H "Metadata-Flavor: Google" ${BASEMETADATAURL}/${1} 2> /dev/null)"
}
-ZONE=$(GetMetadata zone | grep -oP "[^/]*$")
+ZONE=$(basename $(GetMetadata zone))
SetMetadata () {
gcloud compute instances add-metadata ${HOSTNAME} --metadata ${1}=${2} --zone ${ZONE}
diff --git a/builder/googlecompute/step_create_image.go b/builder/googlecompute/step_create_image.go
index 13339d82f..bcb840e78 100644
--- a/builder/googlecompute/step_create_image.go
+++ b/builder/googlecompute/step_create_image.go
@@ -39,7 +39,7 @@ func (s *StepCreateImage) Run(state multistep.StateBag) multistep.StepAction {
imageCh, errCh := driver.CreateImage(
config.ImageName, config.ImageDescription, config.ImageFamily, config.Zone,
- config.DiskName)
+ config.DiskName, config.ImageLabels)
var err error
select {
case err = <-errCh:
diff --git a/builder/googlecompute/step_create_image_test.go b/builder/googlecompute/step_create_image_test.go
index 63c962904..639b25255 100644
--- a/builder/googlecompute/step_create_image_test.go
+++ b/builder/googlecompute/step_create_image_test.go
@@ -46,6 +46,7 @@ func TestStepCreateImage(t *testing.T) {
assert.Equal(t, d.CreateImageFamily, c.ImageFamily, "Incorrect image family passed to driver.")
assert.Equal(t, d.CreateImageZone, c.Zone, "Incorrect image zone passed to driver.")
assert.Equal(t, d.CreateImageDisk, c.DiskName, "Incorrect disk passed to driver.")
+ assert.Equal(t, d.CreateImageLabels, c.ImageLabels, "Incorrect image_labels passed to driver.")
}
func TestStepCreateImage_errorOnChannel(t *testing.T) {
diff --git a/builder/googlecompute/step_create_instance.go b/builder/googlecompute/step_create_instance.go
index adb08e7bd..a4509354e 100644
--- a/builder/googlecompute/step_create_instance.go
+++ b/builder/googlecompute/step_create_instance.go
@@ -99,11 +99,14 @@ func (s *StepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
var metadata map[string]string
metadata, err = c.createInstanceMetadata(sourceImage, sshPublicKey)
errCh, err = d.RunInstance(&InstanceConfig{
+ AcceleratorType: c.AcceleratorType,
+ AcceleratorCount: c.AcceleratorCount,
Address: c.Address,
Description: "New instance created by Packer",
DiskSizeGb: c.DiskSizeGb,
DiskType: c.DiskType,
Image: sourceImage,
+ Labels: c.Labels,
MachineType: c.MachineType,
Metadata: metadata,
Name: name,
diff --git a/builder/googlecompute/step_create_instance_test.go b/builder/googlecompute/step_create_instance_test.go
index 00e842963..a9a91d692 100644
--- a/builder/googlecompute/step_create_instance_test.go
+++ b/builder/googlecompute/step_create_instance_test.go
@@ -229,10 +229,6 @@ func TestStepCreateInstance_errorTimeout(t *testing.T) {
state.Put("ssh_public_key", "key")
errCh := make(chan error, 1)
- go func() {
- <-time.After(10 * time.Millisecond)
- errCh <- nil
- }()
config := state.Get("config").(*Config)
config.stateTimeout = 1 * time.Microsecond
diff --git a/builder/hyperv/common/driver.go b/builder/hyperv/common/driver.go
index 9446c0410..ba9ab5c4c 100644
--- a/builder/hyperv/common/driver.go
+++ b/builder/hyperv/common/driver.go
@@ -64,10 +64,14 @@ type Driver interface {
DeleteVirtualSwitch(string) error
- CreateVirtualMachine(string, string, int64, int64, string, uint) error
+ CreateVirtualMachine(string, string, string, string, int64, int64, string, uint) error
+
+ CloneVirtualMachine(string, string, string, bool, string, string, string, int64, string) error
DeleteVirtualMachine(string) error
+ GetVirtualMachineGeneration(string) (uint, error)
+
SetVirtualMachineCpuCount(string, uint) error
SetVirtualMachineMacSpoofing(string, bool) error
diff --git a/builder/hyperv/common/driver_ps_4.go b/builder/hyperv/common/driver_ps_4.go
index b608c2afd..c836137d2 100644
--- a/builder/hyperv/common/driver_ps_4.go
+++ b/builder/hyperv/common/driver_ps_4.go
@@ -107,6 +107,10 @@ func (d *HypervPS4Driver) GetHostName(ip string) (string, error) {
return powershell.GetHostName(ip)
}
+func (d *HypervPS4Driver) GetVirtualMachineGeneration(vmName string) (uint, error) {
+ return hyperv.GetVirtualMachineGeneration(vmName)
+}
+
// Finds the IP address of a host adapter connected to switch
func (d *HypervPS4Driver) GetHostAdapterIpAddressForSwitch(switchName string) (string, error) {
res, err := hyperv.GetHostAdapterIpAddressForSwitch(switchName)
@@ -166,8 +170,12 @@ func (d *HypervPS4Driver) CreateVirtualSwitch(switchName string, switchType stri
return hyperv.CreateVirtualSwitch(switchName, switchType)
}
-func (d *HypervPS4Driver) CreateVirtualMachine(vmName string, path string, ram int64, diskSize int64, switchName string, generation uint) error {
- return hyperv.CreateVirtualMachine(vmName, path, ram, diskSize, switchName, generation)
+func (d *HypervPS4Driver) CreateVirtualMachine(vmName string, path string, harddrivePath string, vhdPath string, ram int64, diskSize int64, switchName string, generation uint) error {
+ return hyperv.CreateVirtualMachine(vmName, path, harddrivePath, vhdPath, ram, diskSize, switchName, generation)
+}
+
+func (d *HypervPS4Driver) CloneVirtualMachine(cloneFromVmxcPath string, cloneFromVmName string, cloneFromSnapshotName string, cloneAllSnapshots bool, vmName string, path string, harddrivePath string, ram int64, switchName string) error {
+ return hyperv.CloneVirtualMachine(cloneFromVmxcPath, cloneFromVmName, cloneFromSnapshotName, cloneAllSnapshots, vmName, path, harddrivePath, ram, switchName)
}
func (d *HypervPS4Driver) DeleteVirtualMachine(vmName string) error {
diff --git a/builder/hyperv/common/step_clone_vm.go b/builder/hyperv/common/step_clone_vm.go
new file mode 100644
index 000000000..4a5b55566
--- /dev/null
+++ b/builder/hyperv/common/step_clone_vm.go
@@ -0,0 +1,139 @@
+package common
+
+import (
+ "fmt"
+ "log"
+ "path/filepath"
+ "strings"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+)
+
+// This step clones an existing virtual machine.
+//
+// Produces:
+// VMName string - The name of the VM
+type StepCloneVM struct {
+ CloneFromVMXCPath string
+ CloneFromVMName string
+ CloneFromSnapshotName string
+ CloneAllSnapshots bool
+ VMName string
+ SwitchName string
+ RamSize uint
+ Cpu uint
+ EnableMacSpoofing bool
+ EnableDynamicMemory bool
+ EnableSecureBoot bool
+ EnableVirtualizationExtensions bool
+}
+
+func (s *StepCloneVM) Run(state multistep.StateBag) multistep.StepAction {
+ driver := state.Get("driver").(Driver)
+ ui := state.Get("ui").(packer.Ui)
+ ui.Say("Cloning virtual machine...")
+
+ path := state.Get("packerTempDir").(string)
+
+ // Determine if we even have an existing virtual harddrive to attach
+ harddrivePath := ""
+ if harddrivePathRaw, ok := state.GetOk("iso_path"); ok {
+ extension := strings.ToLower(filepath.Ext(harddrivePathRaw.(string)))
+ if extension == ".vhd" || extension == ".vhdx" {
+ harddrivePath = harddrivePathRaw.(string)
+ } else {
+ log.Println("No existing virtual harddrive, not attaching.")
+ }
+ } else {
+ log.Println("No existing virtual harddrive, not attaching.")
+ }
+
+ // convert the MB to bytes
+ ramSize := int64(s.RamSize * 1024 * 1024)
+
+ err := driver.CloneVirtualMachine(s.CloneFromVMXCPath, s.CloneFromVMName, s.CloneFromSnapshotName, s.CloneAllSnapshots, s.VMName, path, harddrivePath, ramSize, s.SwitchName)
+ if err != nil {
+ err := fmt.Errorf("Error cloning virtual machine: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ err = driver.SetVirtualMachineCpuCount(s.VMName, s.Cpu)
+ if err != nil {
+ err := fmt.Errorf("Error creating setting virtual machine cpu: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ if s.EnableDynamicMemory {
+ err = driver.SetVirtualMachineDynamicMemory(s.VMName, s.EnableDynamicMemory)
+ if err != nil {
+ err := fmt.Errorf("Error creating setting virtual machine dynamic memory: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+
+ if s.EnableMacSpoofing {
+ err = driver.SetVirtualMachineMacSpoofing(s.VMName, s.EnableMacSpoofing)
+ if err != nil {
+ err := fmt.Errorf("Error creating setting virtual machine mac spoofing: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+
+ generation, err := driver.GetVirtualMachineGeneration(s.VMName)
+ if err != nil {
+ err := fmt.Errorf("Error detecting vm generation: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ if generation == 2 {
+ err = driver.SetVirtualMachineSecureBoot(s.VMName, s.EnableSecureBoot)
+ if err != nil {
+ err := fmt.Errorf("Error setting secure boot: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+
+ if s.EnableVirtualizationExtensions {
+ //This is only supported on Windows 10 and Windows Server 2016 onwards
+ err = driver.SetVirtualMachineVirtualizationExtensions(s.VMName, s.EnableVirtualizationExtensions)
+ if err != nil {
+ err := fmt.Errorf("Error creating setting virtual machine virtualization extensions: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+
+ // Set the final name in the state bag so others can use it
+ state.Put("vmName", s.VMName)
+
+ return multistep.ActionContinue
+}
+
+func (s *StepCloneVM) Cleanup(state multistep.StateBag) {
+ if s.VMName == "" {
+ return
+ }
+
+ driver := state.Get("driver").(Driver)
+ ui := state.Get("ui").(packer.Ui)
+ ui.Say("Unregistering and deleting virtual machine...")
+
+ err := driver.DeleteVirtualMachine(s.VMName)
+ if err != nil {
+ ui.Error(fmt.Sprintf("Error deleting virtual machine: %s", err))
+ }
+}
diff --git a/builder/hyperv/common/step_create_tempdir.go b/builder/hyperv/common/step_create_tempdir.go
index c1ca46fa2..c2ac9f719 100644
--- a/builder/hyperv/common/step_create_tempdir.go
+++ b/builder/hyperv/common/step_create_tempdir.go
@@ -10,8 +10,12 @@ import (
)
type StepCreateTempDir struct {
- TempPath string
- dirPath string
+ // The user-supplied root directores into which we create subdirectories.
+ TempPath string
+ VhdTempPath string
+ // The subdirectories with the randomly generated name.
+ dirPath string
+ vhdDirPath string
}
func (s *StepCreateTempDir) Run(state multistep.StateBag) multistep.StepAction {
@@ -34,23 +38,47 @@ func (s *StepCreateTempDir) Run(state multistep.StateBag) multistep.StepAction {
s.dirPath = packerTempDir
state.Put("packerTempDir", packerTempDir)
+ if s.VhdTempPath == "" {
+ // Fall back to regular temp dir if no separate VHD temp dir set.
+ state.Put("packerVhdTempDir", packerTempDir)
+ } else {
+ packerVhdTempDir, err := ioutil.TempDir(s.VhdTempPath, "packerhv-vhd")
+ if err != nil {
+ err := fmt.Errorf("Error creating temporary VHD directory: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ s.vhdDirPath = packerVhdTempDir
+ state.Put("packerVhdTempDir", packerVhdTempDir)
+ }
+
// ui.Say("packerTempDir = '" + packerTempDir + "'")
return multistep.ActionContinue
}
func (s *StepCreateTempDir) Cleanup(state multistep.StateBag) {
- if s.dirPath == "" {
- return
- }
-
ui := state.Get("ui").(packer.Ui)
- ui.Say("Deleting temporary directory...")
+ if s.dirPath != "" {
+ ui.Say("Deleting temporary directory...")
- err := os.RemoveAll(s.dirPath)
+ err := os.RemoveAll(s.dirPath)
- if err != nil {
- ui.Error(fmt.Sprintf("Error deleting temporary directory: %s", err))
+ if err != nil {
+ ui.Error(fmt.Sprintf("Error deleting temporary directory: %s", err))
+ }
+ }
+
+ if s.vhdDirPath != "" && s.dirPath != s.vhdDirPath {
+ ui.Say("Deleting temporary VHD directory...")
+
+ err := os.RemoveAll(s.vhdDirPath)
+
+ if err != nil {
+ ui.Error(fmt.Sprintf("Error deleting temporary VHD directory: %s", err))
+ }
}
}
diff --git a/builder/hyperv/common/step_create_vm.go b/builder/hyperv/common/step_create_vm.go
index 13dd37e1f..d88de5558 100644
--- a/builder/hyperv/common/step_create_vm.go
+++ b/builder/hyperv/common/step_create_vm.go
@@ -2,6 +2,9 @@ package common
import (
"fmt"
+ "log"
+ "path/filepath"
+ "strings"
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
@@ -14,6 +17,7 @@ import (
type StepCreateVM struct {
VMName string
SwitchName string
+ HarddrivePath string
RamSize uint
DiskSize uint
Generation uint
@@ -31,11 +35,25 @@ func (s *StepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
path := state.Get("packerTempDir").(string)
+ // Determine if we even have an existing virtual harddrive to attach
+ harddrivePath := ""
+ if harddrivePathRaw, ok := state.GetOk("iso_path"); ok {
+ extension := strings.ToLower(filepath.Ext(harddrivePathRaw.(string)))
+ if extension == ".vhd" || extension == ".vhdx" {
+ harddrivePath = harddrivePathRaw.(string)
+ } else {
+ log.Println("No existing virtual harddrive, not attaching.")
+ }
+ } else {
+ log.Println("No existing virtual harddrive, not attaching.")
+ }
+
+ vhdPath := state.Get("packerVhdTempDir").(string)
// convert the MB to bytes
ramSize := int64(s.RamSize * 1024 * 1024)
diskSize := int64(s.DiskSize * 1024 * 1024)
- err := driver.CreateVirtualMachine(s.VMName, path, ramSize, diskSize, s.SwitchName, s.Generation)
+ err := driver.CreateVirtualMachine(s.VMName, path, harddrivePath, vhdPath, ramSize, diskSize, s.SwitchName, s.Generation)
if err != nil {
err := fmt.Errorf("Error creating virtual machine: %s", err)
state.Put("error", err)
@@ -45,26 +63,24 @@ func (s *StepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
err = driver.SetVirtualMachineCpuCount(s.VMName, s.Cpu)
if err != nil {
- err := fmt.Errorf("Error creating setting virtual machine cpu: %s", err)
+ err := fmt.Errorf("Error setting virtual machine cpu count: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
- if s.EnableDynamicMemory {
- err = driver.SetVirtualMachineDynamicMemory(s.VMName, s.EnableDynamicMemory)
- if err != nil {
- err := fmt.Errorf("Error creating setting virtual machine dynamic memory: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
+ err = driver.SetVirtualMachineDynamicMemory(s.VMName, s.EnableDynamicMemory)
+ if err != nil {
+ err := fmt.Errorf("Error setting virtual machine dynamic memory: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
}
if s.EnableMacSpoofing {
err = driver.SetVirtualMachineMacSpoofing(s.VMName, s.EnableMacSpoofing)
if err != nil {
- err := fmt.Errorf("Error creating setting virtual machine mac spoofing: %s", err)
+ err := fmt.Errorf("Error setting virtual machine mac spoofing: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
@@ -85,7 +101,7 @@ func (s *StepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
//This is only supported on Windows 10 and Windows Server 2016 onwards
err = driver.SetVirtualMachineVirtualizationExtensions(s.VMName, s.EnableVirtualizationExtensions)
if err != nil {
- err := fmt.Errorf("Error creating setting virtual machine virtualization extensions: %s", err)
+ err := fmt.Errorf("Error setting virtual machine virtualization extensions: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
diff --git a/builder/hyperv/common/step_mount_dvddrive.go b/builder/hyperv/common/step_mount_dvddrive.go
index 632120053..1535e86b4 100644
--- a/builder/hyperv/common/step_mount_dvddrive.go
+++ b/builder/hyperv/common/step_mount_dvddrive.go
@@ -5,6 +5,8 @@ import (
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
"log"
+ "path/filepath"
+ "strings"
)
type StepMountDvdDrive struct {
@@ -17,7 +19,21 @@ func (s *StepMountDvdDrive) Run(state multistep.StateBag) multistep.StepAction {
errorMsg := "Error mounting dvd drive: %s"
vmName := state.Get("vmName").(string)
- isoPath := state.Get("iso_path").(string)
+
+ // Determine if we even have a dvd disk to attach
+ var isoPath string
+ if isoPathRaw, ok := state.GetOk("iso_path"); ok {
+ isoPath = isoPathRaw.(string)
+ } else {
+ log.Println("No dvd disk, not attaching.")
+ return multistep.ActionContinue
+ }
+
+ // Determine if its a virtual hdd to mount
+ if strings.ToLower(filepath.Ext(isoPath)) == ".vhd" || strings.ToLower(filepath.Ext(isoPath)) == ".vhdx" {
+ log.Println("Its a hard disk, not attaching.")
+ return multistep.ActionContinue
+ }
// should be able to mount up to 60 additional iso images using SCSI
// but Windows would only allow a max of 22 due to available drive letters
diff --git a/builder/hyperv/iso/builder.go b/builder/hyperv/iso/builder.go
index e6c8d4d67..2cd786a42 100644
--- a/builder/hyperv/iso/builder.go
+++ b/builder/hyperv/iso/builder.go
@@ -5,6 +5,7 @@ import (
"fmt"
"log"
"os"
+ "path/filepath"
"strings"
hypervcommon "github.com/hashicorp/packer/builder/hyperv/common"
@@ -82,6 +83,11 @@ type Config struct {
EnableVirtualizationExtensions bool `mapstructure:"enable_virtualization_extensions"`
TempPath string `mapstructure:"temp_path"`
+ // A separate path can be used for storing the VM's disk image. The purpose is to enable
+ // reading and writing to take place on different physical disks (read from VHD temp path
+ // write to regular temp path while exporting the VM) to eliminate a single-disk bottleneck.
+ VhdTempPath string `mapstructure:"vhd_temp_path"`
+
Communicator string `mapstructure:"communicator"`
SkipCompaction bool `mapstructure:"skip_compaction"`
@@ -92,7 +98,8 @@ type Config struct {
// Prepare processes the build configuration parameters.
func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
err := config.Decode(&b.config, &config.DecodeOpts{
- Interpolate: true,
+ Interpolate: true,
+ InterpolateContext: &b.config.ctx,
InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{
"boot_command",
@@ -118,9 +125,12 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
errs = packer.MultiErrorAppend(errs, b.config.SSHConfig.Prepare(&b.config.ctx)...)
errs = packer.MultiErrorAppend(errs, b.config.ShutdownConfig.Prepare(&b.config.ctx)...)
- err = b.checkDiskSize()
- if err != nil {
- errs = packer.MultiErrorAppend(errs, err)
+ if len(b.config.ISOConfig.ISOUrls) < 1 || (strings.ToLower(filepath.Ext(b.config.ISOConfig.ISOUrls[0])) != ".vhd" && strings.ToLower(filepath.Ext(b.config.ISOConfig.ISOUrls[0])) != ".vhdx") {
+ //We only create a new hard drive if an existing one to copy from does not exist
+ err = b.checkDiskSize()
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, err)
+ }
}
err = b.checkRamSize()
@@ -142,7 +152,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
b.config.Cpu = 1
}
- if b.config.Generation != 2 {
+ if b.config.Generation < 1 || b.config.Generation > 2 {
b.config.Generation = 1
}
@@ -157,6 +167,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
log.Println(fmt.Sprintf("%s: %v", "SwitchName", b.config.SwitchName))
// Errors
+
if b.config.GuestAdditionsMode == "" {
if b.config.GuestAdditionsPath != "" {
b.config.GuestAdditionsMode = "attach"
@@ -295,7 +306,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
steps := []multistep.Step{
&hypervcommon.StepCreateTempDir{
- TempPath: b.config.TempPath,
+ TempPath: b.config.TempPath,
+ VhdTempPath: b.config.VhdTempPath,
},
&hypervcommon.StepOutputDir{
Force: b.config.PackerForce,
@@ -404,17 +416,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}
// Run the steps.
- if b.config.PackerDebug {
- pauseFn := common.MultistepDebugFn(ui)
- state.Put("pauseFn", pauseFn)
- b.runner = &multistep.DebugRunner{
- Steps: steps,
- PauseFn: pauseFn,
- }
- } else {
- b.runner = &multistep.BasicRunner{Steps: steps}
- }
-
+ b.runner = common.NewRunner(steps, b.config.PackerConfig, ui)
b.runner.Run(state)
// Report any errors.
diff --git a/builder/hyperv/iso/builder_test.go b/builder/hyperv/iso/builder_test.go
index 70df63832..3fc17a8b7 100644
--- a/builder/hyperv/iso/builder_test.go
+++ b/builder/hyperv/iso/builder_test.go
@@ -235,7 +235,7 @@ func TestBuilderPrepare_ISOUrl(t *testing.T) {
delete(config, "iso_url")
delete(config, "iso_urls")
- // Test both epty
+ // Test both empty
config["iso_url"] = ""
b = Builder{}
warns, err := b.Prepare(config)
@@ -298,3 +298,153 @@ func TestBuilderPrepare_ISOUrl(t *testing.T) {
t.Fatalf("bad: %#v", b.config.ISOUrls)
}
}
+
+func TestBuilderPrepare_SizeNotRequiredWhenUsingExistingHarddrive(t *testing.T) {
+ var b Builder
+ config := testConfig()
+ delete(config, "iso_url")
+ delete(config, "iso_urls")
+ delete(config, "disk_size")
+
+ config["disk_size"] = 1
+
+ // Test just iso_urls set but with vhdx
+ delete(config, "iso_url")
+ config["iso_urls"] = []string{
+ "http://www.packer.io/hdd.vhdx",
+ "http://www.hashicorp.com/dvd.iso",
+ }
+
+ b = Builder{}
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Errorf("should not have error: %s", err)
+ }
+
+ expected := []string{
+ "http://www.packer.io/hdd.vhdx",
+ "http://www.hashicorp.com/dvd.iso",
+ }
+ if !reflect.DeepEqual(b.config.ISOUrls, expected) {
+ t.Fatalf("bad: %#v", b.config.ISOUrls)
+ }
+
+ // Test just iso_urls set but with vhd
+ delete(config, "iso_url")
+ config["iso_urls"] = []string{
+ "http://www.packer.io/hdd.vhd",
+ "http://www.hashicorp.com/dvd.iso",
+ }
+
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Errorf("should not have error: %s", err)
+ }
+
+ expected = []string{
+ "http://www.packer.io/hdd.vhd",
+ "http://www.hashicorp.com/dvd.iso",
+ }
+ if !reflect.DeepEqual(b.config.ISOUrls, expected) {
+ t.Fatalf("bad: %#v", b.config.ISOUrls)
+ }
+}
+
+func TestBuilderPrepare_SizeIsRequiredWhenNotUsingExistingHarddrive(t *testing.T) {
+ var b Builder
+ config := testConfig()
+ delete(config, "iso_url")
+ delete(config, "iso_urls")
+ delete(config, "disk_size")
+
+ config["disk_size"] = 1
+
+ // Test just iso_urls set but with vhdx
+ delete(config, "iso_url")
+ config["iso_urls"] = []string{
+ "http://www.packer.io/os.iso",
+ "http://www.hashicorp.com/dvd.iso",
+ }
+
+ b = Builder{}
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Errorf("should have error")
+ }
+
+ expected := []string{
+ "http://www.packer.io/os.iso",
+ "http://www.hashicorp.com/dvd.iso",
+ }
+ if !reflect.DeepEqual(b.config.ISOUrls, expected) {
+ t.Fatalf("bad: %#v", b.config.ISOUrls)
+ }
+}
+
+func TestBuilderPrepare_CommConfig(t *testing.T) {
+ // Test Winrm
+ {
+ config := testConfig()
+ config["communicator"] = "winrm"
+ config["winrm_username"] = "username"
+ config["winrm_password"] = "password"
+ config["winrm_host"] = "1.2.3.4"
+
+ var b Builder
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.Comm.WinRMUser != "username" {
+ t.Errorf("bad winrm_username: %s", b.config.Comm.WinRMUser)
+ }
+ if b.config.Comm.WinRMPassword != "password" {
+ t.Errorf("bad winrm_password: %s", b.config.Comm.WinRMPassword)
+ }
+ if host := b.config.Comm.Host(); host != "1.2.3.4" {
+ t.Errorf("bad host: %s", host)
+ }
+ }
+
+ // Test SSH
+ {
+ config := testConfig()
+ config["communicator"] = "ssh"
+ config["ssh_username"] = "username"
+ config["ssh_password"] = "password"
+ config["ssh_host"] = "1.2.3.4"
+
+ var b Builder
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.Comm.SSHUsername != "username" {
+ t.Errorf("bad ssh_username: %s", b.config.Comm.SSHUsername)
+ }
+ if b.config.Comm.SSHPassword != "password" {
+ t.Errorf("bad ssh_password: %s", b.config.Comm.SSHPassword)
+ }
+ if host := b.config.Comm.Host(); host != "1.2.3.4" {
+ t.Errorf("bad host: %s", host)
+ }
+ }
+}
diff --git a/builder/hyperv/vmcx/builder.go b/builder/hyperv/vmcx/builder.go
new file mode 100644
index 000000000..a9583327a
--- /dev/null
+++ b/builder/hyperv/vmcx/builder.go
@@ -0,0 +1,558 @@
+package vmcx
+
+import (
+ "errors"
+ "fmt"
+ "log"
+ "os"
+ "strings"
+
+ hypervcommon "github.com/hashicorp/packer/builder/hyperv/common"
+ "github.com/hashicorp/packer/common"
+ powershell "github.com/hashicorp/packer/common/powershell"
+ "github.com/hashicorp/packer/common/powershell/hyperv"
+ "github.com/hashicorp/packer/helper/communicator"
+ "github.com/hashicorp/packer/helper/config"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/multistep"
+)
+
+const (
+ DefaultRamSize = 1 * 1024 // 1GB
+ MinRamSize = 32 // 32MB
+ MaxRamSize = 32 * 1024 // 32GB
+ MinNestedVirtualizationRamSize = 4 * 1024 // 4GB
+
+ LowRam = 256 // 256MB
+
+ DefaultUsername = ""
+ DefaultPassword = ""
+)
+
+// Builder implements packer.Builder and builds the actual Hyperv
+// images.
+type Builder struct {
+ config Config
+ runner multistep.Runner
+}
+
+type Config struct {
+ common.PackerConfig `mapstructure:",squash"`
+ common.HTTPConfig `mapstructure:",squash"`
+ common.ISOConfig `mapstructure:",squash"`
+ common.FloppyConfig `mapstructure:",squash"`
+ hypervcommon.OutputConfig `mapstructure:",squash"`
+ hypervcommon.SSHConfig `mapstructure:",squash"`
+ hypervcommon.RunConfig `mapstructure:",squash"`
+ hypervcommon.ShutdownConfig `mapstructure:",squash"`
+
+ // The size, in megabytes, of the computer memory in the VM.
+ // By default, this is 1024 (about 1 GB).
+ RamSize uint `mapstructure:"ram_size"`
+
+ //
+ SecondaryDvdImages []string `mapstructure:"secondary_iso_images"`
+
+ // Should integration services iso be mounted
+ GuestAdditionsMode string `mapstructure:"guest_additions_mode"`
+
+ // The path to the integration services iso
+ GuestAdditionsPath string `mapstructure:"guest_additions_path"`
+
+ // This is the path to a directory containing an exported virtual machine.
+ CloneFromVMXCPath string `mapstructure:"clone_from_vmxc_path"`
+
+ // This is the name of the virtual machine to clone from.
+ CloneFromVMName string `mapstructure:"clone_from_vm_name"`
+
+ // This is the name of the snapshot to clone from. A blank snapshot name will use the latest snapshot.
+ CloneFromSnapshotName string `mapstructure:"clone_from_snapshot_name"`
+
+ // This will clone all snapshots if true. It will clone latest snapshot if false.
+ CloneAllSnapshots bool `mapstructure:"clone_all_snapshots"`
+
+ // This is the name of the new virtual machine.
+ // By default this is "packer-BUILDNAME", where "BUILDNAME" is the name of the build.
+ VMName string `mapstructure:"vm_name"`
+
+ BootCommand []string `mapstructure:"boot_command"`
+ SwitchName string `mapstructure:"switch_name"`
+ SwitchVlanId string `mapstructure:"switch_vlan_id"`
+ VlanId string `mapstructure:"vlan_id"`
+ Cpu uint `mapstructure:"cpu"`
+ Generation uint
+ EnableMacSpoofing bool `mapstructure:"enable_mac_spoofing"`
+ EnableDynamicMemory bool `mapstructure:"enable_dynamic_memory"`
+ EnableSecureBoot bool `mapstructure:"enable_secure_boot"`
+ EnableVirtualizationExtensions bool `mapstructure:"enable_virtualization_extensions"`
+
+ Communicator string `mapstructure:"communicator"`
+
+ SkipCompaction bool `mapstructure:"skip_compaction"`
+
+ ctx interpolate.Context
+}
+
+// Prepare processes the build configuration parameters.
+func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
+ err := config.Decode(&b.config, &config.DecodeOpts{
+ Interpolate: true,
+ InterpolateFilter: &interpolate.RenderFilter{
+ Exclude: []string{
+ "boot_command",
+ },
+ },
+ }, raws...)
+ if err != nil {
+ return nil, err
+ }
+
+ // Accumulate any errors and warnings
+ var errs *packer.MultiError
+ warnings := make([]string, 0)
+
+ if b.config.RawSingleISOUrl != "" || len(b.config.ISOUrls) > 0 {
+ isoWarnings, isoErrs := b.config.ISOConfig.Prepare(&b.config.ctx)
+ warnings = append(warnings, isoWarnings...)
+ errs = packer.MultiErrorAppend(errs, isoErrs...)
+ }
+
+ errs = packer.MultiErrorAppend(errs, b.config.FloppyConfig.Prepare(&b.config.ctx)...)
+ errs = packer.MultiErrorAppend(errs, b.config.HTTPConfig.Prepare(&b.config.ctx)...)
+ errs = packer.MultiErrorAppend(errs, b.config.RunConfig.Prepare(&b.config.ctx)...)
+ errs = packer.MultiErrorAppend(errs, b.config.OutputConfig.Prepare(&b.config.ctx, &b.config.PackerConfig)...)
+ errs = packer.MultiErrorAppend(errs, b.config.SSHConfig.Prepare(&b.config.ctx)...)
+ errs = packer.MultiErrorAppend(errs, b.config.ShutdownConfig.Prepare(&b.config.ctx)...)
+
+ err = b.checkRamSize()
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, err)
+ }
+
+ if b.config.VMName == "" {
+ b.config.VMName = fmt.Sprintf("packer-%s", b.config.PackerBuildName)
+ }
+
+ log.Println(fmt.Sprintf("%s: %v", "VMName", b.config.VMName))
+
+ if b.config.SwitchName == "" {
+ b.config.SwitchName = b.detectSwitchName()
+ }
+
+ if b.config.Cpu < 1 {
+ b.config.Cpu = 1
+ }
+
+ b.config.Generation = 1
+
+ if b.config.CloneFromVMName == "" {
+ if b.config.CloneFromVMXCPath == "" {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("The clone_from_vm_name must be specified if clone_from_vmxc_path is not specified."))
+ }
+ } else {
+ virtualMachineExists, err := powershell.DoesVirtualMachineExist(b.config.CloneFromVMName)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed detecting if virtual machine to clone from exists: %s", err))
+ } else {
+ if !virtualMachineExists {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Virtual machine '%s' to clone from does not exist.", b.config.CloneFromVMName))
+ } else {
+ b.config.Generation, err = powershell.GetVirtualMachineGeneration(b.config.CloneFromVMName)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed detecting virtual machine to clone from generation: %s", err))
+ }
+
+ if b.config.CloneFromSnapshotName != "" {
+ virtualMachineSnapshotExists, err := powershell.DoesVirtualMachineSnapshotExist(b.config.CloneFromVMName, b.config.CloneFromSnapshotName)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed detecting if virtual machine snapshot to clone from exists: %s", err))
+ } else {
+ if !virtualMachineSnapshotExists {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Virtual machine snapshot '%s' on virtual machine '%s' to clone from does not exist.", b.config.CloneFromSnapshotName, b.config.CloneFromVMName))
+ }
+ }
+ }
+
+ virtualMachineOn, err := powershell.IsVirtualMachineOn(b.config.CloneFromVMName)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed detecting if virtual machine to clone is running: %s", err))
+ } else {
+ if virtualMachineOn {
+ warning := fmt.Sprintf("Cloning from a virtual machine that is running.")
+ warnings = appendWarnings(warnings, warning)
+ }
+ }
+ }
+ }
+ }
+
+ if b.config.CloneFromVMXCPath == "" {
+ if b.config.CloneFromVMName == "" {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("The clone_from_vmxc_path be specified if clone_from_vm_name must is not specified."))
+ }
+ } else {
+ if _, err := os.Stat(b.config.CloneFromVMXCPath); os.IsNotExist(err) {
+ if err != nil {
+ errs = packer.MultiErrorAppend(
+ errs, fmt.Errorf("CloneFromVMXCPath does not exist: %s", err))
+ }
+ }
+ }
+
+ if b.config.Generation < 1 || b.config.Generation > 2 {
+ b.config.Generation = 1
+ }
+
+ if b.config.Generation == 2 {
+ if len(b.config.FloppyFiles) > 0 || len(b.config.FloppyDirectories) > 0 {
+ err = errors.New("Generation 2 vms don't support floppy drives. Use ISO image instead.")
+ errs = packer.MultiErrorAppend(errs, err)
+ }
+ }
+
+ log.Println(fmt.Sprintf("Using switch %s", b.config.SwitchName))
+ log.Println(fmt.Sprintf("%s: %v", "SwitchName", b.config.SwitchName))
+
+ // Errors
+ if b.config.GuestAdditionsMode == "" {
+ if b.config.GuestAdditionsPath != "" {
+ b.config.GuestAdditionsMode = "attach"
+ } else {
+ b.config.GuestAdditionsPath = os.Getenv("WINDIR") + "\\system32\\vmguest.iso"
+
+ if _, err := os.Stat(b.config.GuestAdditionsPath); os.IsNotExist(err) {
+ if err != nil {
+ b.config.GuestAdditionsPath = ""
+ b.config.GuestAdditionsMode = "none"
+ } else {
+ b.config.GuestAdditionsMode = "attach"
+ }
+ }
+ }
+ }
+
+ if b.config.GuestAdditionsPath == "" && b.config.GuestAdditionsMode == "attach" {
+ b.config.GuestAdditionsPath = os.Getenv("WINDIR") + "\\system32\\vmguest.iso"
+
+ if _, err := os.Stat(b.config.GuestAdditionsPath); os.IsNotExist(err) {
+ if err != nil {
+ b.config.GuestAdditionsPath = ""
+ }
+ }
+ }
+
+ for _, isoPath := range b.config.SecondaryDvdImages {
+ if _, err := os.Stat(isoPath); os.IsNotExist(err) {
+ if err != nil {
+ errs = packer.MultiErrorAppend(
+ errs, fmt.Errorf("Secondary Dvd image does not exist: %s", err))
+ }
+ }
+ }
+
+ numberOfIsos := len(b.config.SecondaryDvdImages)
+
+ if b.config.GuestAdditionsMode == "attach" {
+ if _, err := os.Stat(b.config.GuestAdditionsPath); os.IsNotExist(err) {
+ if err != nil {
+ errs = packer.MultiErrorAppend(
+ errs, fmt.Errorf("Guest additions iso does not exist: %s", err))
+ }
+ }
+
+ numberOfIsos = numberOfIsos + 1
+ }
+
+ if b.config.Generation < 2 && numberOfIsos > 2 {
+ if b.config.GuestAdditionsMode == "attach" {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("There are only 2 ide controllers available, so we can't support guest additions and these secondary dvds: %s", strings.Join(b.config.SecondaryDvdImages, ", ")))
+ } else {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("There are only 2 ide controllers available, so we can't support these secondary dvds: %s", strings.Join(b.config.SecondaryDvdImages, ", ")))
+ }
+ } else if b.config.Generation > 1 && len(b.config.SecondaryDvdImages) > 16 {
+ if b.config.GuestAdditionsMode == "attach" {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("There are not enough drive letters available for scsi (limited to 16), so we can't support guest additions and these secondary dvds: %s", strings.Join(b.config.SecondaryDvdImages, ", ")))
+ } else {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("There are not enough drive letters available for scsi (limited to 16), so we can't support these secondary dvds: %s", strings.Join(b.config.SecondaryDvdImages, ", ")))
+ }
+ }
+
+ if b.config.EnableVirtualizationExtensions {
+ hasVirtualMachineVirtualizationExtensions, err := powershell.HasVirtualMachineVirtualizationExtensions()
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed detecting virtual machine virtualization extensions support: %s", err))
+ } else {
+ if !hasVirtualMachineVirtualizationExtensions {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("This version of Hyper-V does not support virtual machine virtualization extension. Please use Windows 10 or Windows Server 2016 or newer."))
+ }
+ }
+ }
+
+ // Warnings
+
+ if b.config.ShutdownCommand == "" {
+ warnings = appendWarnings(warnings,
+ "A shutdown_command was not specified. Without a shutdown command, Packer\n"+
+ "will forcibly halt the virtual machine, which may result in data loss.")
+ }
+
+ warning := b.checkHostAvailableMemory()
+ if warning != "" {
+ warnings = appendWarnings(warnings, warning)
+ }
+
+ if b.config.EnableVirtualizationExtensions {
+ if b.config.EnableDynamicMemory {
+ warning = fmt.Sprintf("For nested virtualization, when virtualization extension is enabled, dynamic memory should not be allowed.")
+ warnings = appendWarnings(warnings, warning)
+ }
+
+ if !b.config.EnableMacSpoofing {
+ warning = fmt.Sprintf("For nested virtualization, when virtualization extension is enabled, mac spoofing should be allowed.")
+ warnings = appendWarnings(warnings, warning)
+ }
+
+ if b.config.RamSize < MinNestedVirtualizationRamSize {
+ warning = fmt.Sprintf("For nested virtualization, when virtualization extension is enabled, there should be 4GB or more memory set for the vm, otherwise Hyper-V may fail to start any nested VMs.")
+ warnings = appendWarnings(warnings, warning)
+ }
+ }
+
+ if b.config.SwitchVlanId != "" {
+ if b.config.SwitchVlanId != b.config.VlanId {
+ warning = fmt.Sprintf("Switch network adaptor vlan should match virtual machine network adaptor vlan. The switch will not be able to see traffic from the VM.")
+ warnings = appendWarnings(warnings, warning)
+ }
+ }
+
+ if errs != nil && len(errs.Errors) > 0 {
+ return warnings, errs
+ }
+
+ return warnings, nil
+}
+
+// Run executes a Packer build and returns a packer.Artifact representing
+// a Hyperv appliance.
+func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error) {
+ // Create the driver that we'll use to communicate with Hyperv
+ driver, err := hypervcommon.NewHypervPS4Driver()
+ if err != nil {
+ return nil, fmt.Errorf("Failed creating Hyper-V driver: %s", err)
+ }
+
+ // Set up the state.
+ state := new(multistep.BasicStateBag)
+ state.Put("cache", cache)
+ state.Put("config", &b.config)
+ state.Put("debug", b.config.PackerDebug)
+ state.Put("driver", driver)
+ state.Put("hook", hook)
+ state.Put("ui", ui)
+
+ steps := []multistep.Step{
+ &hypervcommon.StepCreateTempDir{},
+ &hypervcommon.StepOutputDir{
+ Force: b.config.PackerForce,
+ Path: b.config.OutputDir,
+ },
+ }
+
+ if b.config.RawSingleISOUrl != "" || len(b.config.ISOUrls) > 0 {
+ steps = append(steps,
+ &common.StepDownload{
+ Checksum: b.config.ISOChecksum,
+ ChecksumType: b.config.ISOChecksumType,
+ Description: "ISO",
+ ResultKey: "iso_path",
+ Url: b.config.ISOUrls,
+ Extension: b.config.TargetExtension,
+ TargetPath: b.config.TargetPath,
+ },
+ )
+ }
+
+ steps = append(steps,
+ &common.StepCreateFloppy{
+ Files: b.config.FloppyFiles,
+ Directories: b.config.FloppyConfig.FloppyDirectories,
+ },
+ &common.StepHTTPServer{
+ HTTPDir: b.config.HTTPDir,
+ HTTPPortMin: b.config.HTTPPortMin,
+ HTTPPortMax: b.config.HTTPPortMax,
+ },
+ &hypervcommon.StepCreateSwitch{
+ SwitchName: b.config.SwitchName,
+ },
+ &hypervcommon.StepCloneVM{
+ CloneFromVMXCPath: b.config.CloneFromVMXCPath,
+ CloneFromVMName: b.config.CloneFromVMName,
+ CloneFromSnapshotName: b.config.CloneFromSnapshotName,
+ CloneAllSnapshots: b.config.CloneAllSnapshots,
+ VMName: b.config.VMName,
+ SwitchName: b.config.SwitchName,
+ RamSize: b.config.RamSize,
+ Cpu: b.config.Cpu,
+ EnableMacSpoofing: b.config.EnableMacSpoofing,
+ EnableDynamicMemory: b.config.EnableDynamicMemory,
+ EnableSecureBoot: b.config.EnableSecureBoot,
+ EnableVirtualizationExtensions: b.config.EnableVirtualizationExtensions,
+ },
+
+ &hypervcommon.StepEnableIntegrationService{},
+
+ &hypervcommon.StepMountDvdDrive{
+ Generation: b.config.Generation,
+ },
+ &hypervcommon.StepMountFloppydrive{
+ Generation: b.config.Generation,
+ },
+
+ &hypervcommon.StepMountGuestAdditions{
+ GuestAdditionsMode: b.config.GuestAdditionsMode,
+ GuestAdditionsPath: b.config.GuestAdditionsPath,
+ Generation: b.config.Generation,
+ },
+
+ &hypervcommon.StepMountSecondaryDvdImages{
+ IsoPaths: b.config.SecondaryDvdImages,
+ Generation: b.config.Generation,
+ },
+
+ &hypervcommon.StepConfigureVlan{
+ VlanId: b.config.VlanId,
+ SwitchVlanId: b.config.SwitchVlanId,
+ },
+
+ &hypervcommon.StepRun{
+ BootWait: b.config.BootWait,
+ },
+
+ &hypervcommon.StepTypeBootCommand{
+ BootCommand: b.config.BootCommand,
+ SwitchName: b.config.SwitchName,
+ Ctx: b.config.ctx,
+ },
+
+ // configure the communicator ssh, winrm
+ &communicator.StepConnect{
+ Config: &b.config.SSHConfig.Comm,
+ Host: hypervcommon.CommHost,
+ SSHConfig: hypervcommon.SSHConfigFunc(&b.config.SSHConfig),
+ },
+
+ // provision requires communicator to be setup
+ &common.StepProvision{},
+
+ &hypervcommon.StepShutdown{
+ Command: b.config.ShutdownCommand,
+ Timeout: b.config.ShutdownTimeout,
+ },
+
+ // wait for the vm to be powered off
+ &hypervcommon.StepWaitForPowerOff{},
+
+ // remove the secondary dvd images
+ // after we power down
+ &hypervcommon.StepUnmountSecondaryDvdImages{},
+ &hypervcommon.StepUnmountGuestAdditions{},
+ &hypervcommon.StepUnmountDvdDrive{},
+ &hypervcommon.StepUnmountFloppyDrive{
+ Generation: b.config.Generation,
+ },
+ &hypervcommon.StepExportVm{
+ OutputDir: b.config.OutputDir,
+ SkipCompaction: b.config.SkipCompaction,
+ },
+
+ // the clean up actions for each step will be executed reverse order
+ )
+
+ // Run the steps.
+ b.runner = common.NewRunner(steps, b.config.PackerConfig, ui)
+ b.runner.Run(state)
+
+ // Report any errors.
+ if rawErr, ok := state.GetOk("error"); ok {
+ return nil, rawErr.(error)
+ }
+
+ // If we were interrupted or cancelled, then just exit.
+ if _, ok := state.GetOk(multistep.StateCancelled); ok {
+ return nil, errors.New("Build was cancelled.")
+ }
+
+ if _, ok := state.GetOk(multistep.StateHalted); ok {
+ return nil, errors.New("Build was halted.")
+ }
+
+ return hypervcommon.NewArtifact(b.config.OutputDir)
+}
+
+// Cancel.
+func (b *Builder) Cancel() {
+ if b.runner != nil {
+ log.Println("Cancelling the step runner...")
+ b.runner.Cancel()
+ }
+}
+
+func appendWarnings(slice []string, data ...string) []string {
+ m := len(slice)
+ n := m + len(data)
+ if n > cap(slice) { // if necessary, reallocate
+ // allocate double what's needed, for future growth.
+ newSlice := make([]string, (n+1)*2)
+ copy(newSlice, slice)
+ slice = newSlice
+ }
+ slice = slice[0:n]
+ copy(slice[m:n], data)
+ return slice
+}
+
+func (b *Builder) checkRamSize() error {
+ if b.config.RamSize == 0 {
+ b.config.RamSize = DefaultRamSize
+ }
+
+ log.Println(fmt.Sprintf("%s: %v", "RamSize", b.config.RamSize))
+
+ if b.config.RamSize < MinRamSize {
+ return fmt.Errorf("ram_size: Virtual machine requires memory size >= %v MB, but defined: %v", MinRamSize, b.config.RamSize)
+ } else if b.config.RamSize > MaxRamSize {
+ return fmt.Errorf("ram_size: Virtual machine requires memory size <= %v MB, but defined: %v", MaxRamSize, b.config.RamSize)
+ }
+
+ return nil
+}
+
+func (b *Builder) checkHostAvailableMemory() string {
+ powershellAvailable, _, _ := powershell.IsPowershellAvailable()
+
+ if powershellAvailable {
+ freeMB := powershell.GetHostAvailableMemory()
+
+ if (freeMB - float64(b.config.RamSize)) < LowRam {
+ return fmt.Sprintf("Hyper-V might fail to create a VM if there is not enough free memory in the system.")
+ }
+ }
+
+ return ""
+}
+
+func (b *Builder) detectSwitchName() string {
+ powershellAvailable, _, _ := powershell.IsPowershellAvailable()
+
+ if powershellAvailable {
+ // no switch name, try to get one attached to a online network adapter
+ onlineSwitchName, err := hyperv.GetExternalOnlineVirtualSwitch()
+ if onlineSwitchName != "" && err == nil {
+ return onlineSwitchName
+ }
+ }
+
+ return fmt.Sprintf("packer-%s", b.config.PackerBuildName)
+}
diff --git a/builder/hyperv/vmcx/builder_test.go b/builder/hyperv/vmcx/builder_test.go
new file mode 100644
index 000000000..209094bf3
--- /dev/null
+++ b/builder/hyperv/vmcx/builder_test.go
@@ -0,0 +1,488 @@
+package vmcx
+
+import (
+ "reflect"
+ "testing"
+
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "io/ioutil"
+ "os"
+)
+
+func testConfig() map[string]interface{} {
+ return map[string]interface{}{
+ "iso_checksum": "foo",
+ "iso_checksum_type": "md5",
+ "iso_url": "http://www.packer.io",
+ "shutdown_command": "yes",
+ "ssh_username": "foo",
+ "ram_size": 64,
+ "guest_additions_mode": "none",
+ "clone_from_vmxc_path": "generated",
+ packer.BuildNameConfigKey: "foo",
+ }
+}
+
+func TestBuilder_ImplementsBuilder(t *testing.T) {
+ var raw interface{}
+ raw = &Builder{}
+ if _, ok := raw.(packer.Builder); !ok {
+ t.Error("Builder must implement builder.")
+ }
+}
+
+func TestBuilderPrepare_Defaults(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.VMName != "packer-foo" {
+ t.Errorf("bad vm name: %s", b.config.VMName)
+ }
+}
+
+func TestBuilderPrepare_InvalidKey(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ // Add a random key
+ config["i_should_not_be_valid"] = true
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+}
+
+func TestBuilderPrepare_CloneFromExistingMachineOrImportFromExportedMachineSettingsRequired(t *testing.T) {
+ var b Builder
+ config := testConfig()
+ delete(config, "clone_from_vmxc_path")
+
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+}
+
+func TestBuilderPrepare_ExportedMachinePathDoesNotExist(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ //Delete the folder immediately
+ os.RemoveAll(td)
+
+ config["clone_from_vmxc_path"] = td
+
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+}
+
+func TestBuilderPrepare_ExportedMachinePathExists(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ //Only delete afterwards
+ defer os.RemoveAll(td)
+
+ config["clone_from_vmxc_path"] = td
+
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+}
+
+func disabled_TestBuilderPrepare_CloneFromVmSettingUsedSoNoCloneFromVmxcPathRequired(t *testing.T) {
+ var b Builder
+ config := testConfig()
+ delete(config, "clone_from_vmxc_path")
+
+ config["clone_from_vm_name"] = "test_machine_name_that_does_not_exist"
+
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+
+ if err == nil {
+ t.Fatal("should have error")
+ } else {
+ errorMessage := err.Error()
+ if errorMessage != "1 error(s) occurred:\n\n* Virtual machine 'test_machine_name_that_does_not_exist' to clone from does not exist." {
+ t.Fatalf("should not have error: %s", err)
+ }
+ }
+}
+
+func TestBuilderPrepare_ISOChecksum(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ // Test bad
+ config["iso_checksum"] = ""
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+
+ // Test good
+ config["iso_checksum"] = "FOo"
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.ISOChecksum != "foo" {
+ t.Fatalf("should've lowercased: %s", b.config.ISOChecksum)
+ }
+}
+
+func TestBuilderPrepare_ISOChecksumType(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ // Test bad
+ config["iso_checksum_type"] = ""
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+
+ // Test good
+ config["iso_checksum_type"] = "mD5"
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.ISOChecksumType != "md5" {
+ t.Fatalf("should've lowercased: %s", b.config.ISOChecksumType)
+ }
+
+ // Test unknown
+ config["iso_checksum_type"] = "fake"
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+
+ // Test none
+ config["iso_checksum_type"] = "none"
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) == 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.ISOChecksumType != "none" {
+ t.Fatalf("should've lowercased: %s", b.config.ISOChecksumType)
+ }
+}
+
+func TestBuilderPrepare_ISOUrl(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ delete(config, "iso_url")
+ delete(config, "iso_urls")
+
+ // Test both empty (should be allowed, as we cloning a vm so we probably don't need an ISO file)
+ config["iso_url"] = ""
+ b = Builder{}
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatal("should not have an error")
+ }
+
+ // Test iso_url set
+ config["iso_url"] = "http://www.packer.io"
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Errorf("should not have error: %s", err)
+ }
+
+ expected := []string{"http://www.packer.io"}
+ if !reflect.DeepEqual(b.config.ISOUrls, expected) {
+ t.Fatalf("bad: %#v", b.config.ISOUrls)
+ }
+
+ // Test both set
+ config["iso_url"] = "http://www.packer.io"
+ config["iso_urls"] = []string{"http://www.packer.io"}
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err == nil {
+ t.Fatal("should have error")
+ }
+
+ // Test just iso_urls set
+ delete(config, "iso_url")
+ config["iso_urls"] = []string{
+ "http://www.packer.io",
+ "http://www.hashicorp.com",
+ }
+
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Errorf("should not have error: %s", err)
+ }
+
+ expected = []string{
+ "http://www.packer.io",
+ "http://www.hashicorp.com",
+ }
+ if !reflect.DeepEqual(b.config.ISOUrls, expected) {
+ t.Fatalf("bad: %#v", b.config.ISOUrls)
+ }
+}
+
+func TestBuilderPrepare_FloppyFiles(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ delete(config, "floppy_files")
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("bad err: %s", err)
+ }
+
+ if len(b.config.FloppyFiles) != 0 {
+ t.Fatalf("bad: %#v", b.config.FloppyFiles)
+ }
+
+ floppies_path := "../../../common/test-fixtures/floppies"
+ config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
+ b = Builder{}
+ warns, err = b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ expected := []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
+ if !reflect.DeepEqual(b.config.FloppyFiles, expected) {
+ t.Fatalf("bad: %#v", b.config.FloppyFiles)
+ }
+}
+
+func TestBuilderPrepare_InvalidFloppies(t *testing.T) {
+ var b Builder
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ config["floppy_files"] = []string{"nonexistent.bat", "nonexistent.ps1"}
+ b = Builder{}
+ _, errs := b.Prepare(config)
+ if errs == nil {
+ t.Fatalf("Nonexistent floppies should trigger multierror")
+ }
+
+ if len(errs.(*packer.MultiError).Errors) != 2 {
+ t.Fatalf("Multierror should work and report 2 errors")
+ }
+}
+
+func TestBuilderPrepare_CommConfig(t *testing.T) {
+ // Test Winrm
+ {
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ config["communicator"] = "winrm"
+ config["winrm_username"] = "username"
+ config["winrm_password"] = "password"
+ config["winrm_host"] = "1.2.3.4"
+
+ var b Builder
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.Comm.WinRMUser != "username" {
+ t.Errorf("bad winrm_username: %s", b.config.Comm.WinRMUser)
+ }
+ if b.config.Comm.WinRMPassword != "password" {
+ t.Errorf("bad winrm_password: %s", b.config.Comm.WinRMPassword)
+ }
+ if host := b.config.Comm.Host(); host != "1.2.3.4" {
+ t.Errorf("bad host: %s", host)
+ }
+ }
+
+ // Test SSH
+ {
+ config := testConfig()
+
+ //Create vmxc folder
+ td, err := ioutil.TempDir("", "packer")
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ defer os.RemoveAll(td)
+ config["clone_from_vmxc_path"] = td
+
+ config["communicator"] = "ssh"
+ config["ssh_username"] = "username"
+ config["ssh_password"] = "password"
+ config["ssh_host"] = "1.2.3.4"
+
+ var b Builder
+ warns, err := b.Prepare(config)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if b.config.Comm.SSHUsername != "username" {
+ t.Errorf("bad ssh_username: %s", b.config.Comm.SSHUsername)
+ }
+ if b.config.Comm.SSHPassword != "password" {
+ t.Errorf("bad ssh_password: %s", b.config.Comm.SSHPassword)
+ }
+ if host := b.config.Comm.Host(); host != "1.2.3.4" {
+ t.Errorf("bad host: %s", host)
+ }
+ }
+}
diff --git a/builder/lxc/artifact.go b/builder/lxc/artifact.go
new file mode 100644
index 000000000..0a53f70e0
--- /dev/null
+++ b/builder/lxc/artifact.go
@@ -0,0 +1,35 @@
+package lxc
+
+import (
+ "fmt"
+ "os"
+)
+
+type Artifact struct {
+ dir string
+ f []string
+}
+
+func (*Artifact) BuilderId() string {
+ return BuilderId
+}
+
+func (a *Artifact) Files() []string {
+ return a.f
+}
+
+func (*Artifact) Id() string {
+ return "VM"
+}
+
+func (a *Artifact) String() string {
+ return fmt.Sprintf("VM files in directory: %s", a.dir)
+}
+
+func (a *Artifact) State(name string) interface{} {
+ return nil
+}
+
+func (a *Artifact) Destroy() error {
+ return os.RemoveAll(a.dir)
+}
diff --git a/builder/lxc/builder.go b/builder/lxc/builder.go
new file mode 100644
index 000000000..31770b740
--- /dev/null
+++ b/builder/lxc/builder.go
@@ -0,0 +1,95 @@
+package lxc
+
+import (
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/multistep"
+ "log"
+ "os"
+ "path/filepath"
+)
+
+// The unique ID for this builder
+const BuilderId = "ustream.lxc"
+
+type wrappedCommandTemplate struct {
+ Command string
+}
+
+type Builder struct {
+ config *Config
+ runner multistep.Runner
+}
+
+func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
+ c, errs := NewConfig(raws...)
+ if errs != nil {
+ return nil, errs
+ }
+ b.config = c
+
+ return nil, nil
+}
+
+func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error) {
+ wrappedCommand := func(command string) (string, error) {
+ b.config.ctx.Data = &wrappedCommandTemplate{Command: command}
+ return interpolate.Render(b.config.CommandWrapper, &b.config.ctx)
+ }
+
+ steps := []multistep.Step{
+ new(stepPrepareOutputDir),
+ new(stepLxcCreate),
+ &StepWaitInit{
+ WaitTimeout: b.config.InitTimeout,
+ },
+ new(StepProvision),
+ new(stepExport),
+ }
+
+ // Setup the state bag
+ state := new(multistep.BasicStateBag)
+ state.Put("config", b.config)
+ state.Put("cache", cache)
+ state.Put("hook", hook)
+ state.Put("ui", ui)
+ state.Put("wrappedCommand", CommandWrapper(wrappedCommand))
+
+ // Run
+ b.runner = common.NewRunnerWithPauseFn(steps, b.config.PackerConfig, ui, state)
+ b.runner.Run(state)
+
+ // If there was an error, return that
+ if rawErr, ok := state.GetOk("error"); ok {
+ return nil, rawErr.(error)
+ }
+
+ // Compile the artifact list
+ files := make([]string, 0, 5)
+ visit := func(path string, info os.FileInfo, err error) error {
+ if !info.IsDir() {
+ files = append(files, path)
+ }
+
+ return err
+ }
+
+ if err := filepath.Walk(b.config.OutputDir, visit); err != nil {
+ return nil, err
+ }
+
+ artifact := &Artifact{
+ dir: b.config.OutputDir,
+ f: files,
+ }
+
+ return artifact, nil
+}
+
+func (b *Builder) Cancel() {
+ if b.runner != nil {
+ log.Println("Cancelling the step runner...")
+ b.runner.Cancel()
+ }
+}
diff --git a/builder/lxc/builder_test.go b/builder/lxc/builder_test.go
new file mode 100644
index 000000000..4eeb27594
--- /dev/null
+++ b/builder/lxc/builder_test.go
@@ -0,0 +1,56 @@
+package lxc
+
+import (
+ "os"
+ "testing"
+
+ "github.com/hashicorp/packer/packer"
+)
+
+func testConfig() map[string]interface{} {
+ return map[string]interface{}{
+ "config_file": "builder_test.go",
+ "template_name": "debian",
+ "template_environment_vars": "SUITE=jessie",
+ }
+}
+
+func TestBuilder_Foo(t *testing.T) {
+ if os.Getenv("PACKER_ACC") == "" {
+ t.Skip("This test is only run with PACKER_ACC=1")
+ }
+}
+
+func TestBuilderPrepare_ConfigFile(t *testing.T) {
+ var b Builder
+ // Good
+ config := testConfig()
+ warnings, err := b.Prepare(config)
+ if len(warnings) > 0 {
+ t.Fatalf("bad: %#v", warnings)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ // Bad, missing config file
+ config = testConfig()
+ delete(config, "config_file")
+ b = Builder{}
+ warnings, err = b.Prepare(config)
+ if len(warnings) > 0 {
+ t.Fatalf("bad: %#v", warnings)
+ }
+ if err == nil {
+ t.Fatalf("should have error")
+ }
+
+}
+
+func TestBuilder_ImplementsBuilder(t *testing.T) {
+ var raw interface{}
+ raw = &Builder{}
+ if _, ok := raw.(packer.Builder); !ok {
+ t.Fatalf("Builder should be a builder")
+ }
+}
diff --git a/builder/lxc/command.go b/builder/lxc/command.go
new file mode 100644
index 000000000..af81cff83
--- /dev/null
+++ b/builder/lxc/command.go
@@ -0,0 +1,15 @@
+package lxc
+
+import (
+ "os/exec"
+)
+
+// CommandWrapper is a type that given a command, will possibly modify that
+// command in-flight. This might return an error.
+type CommandWrapper func(string) (string, error)
+
+// ShellCommand takes a command string and returns an *exec.Cmd to execute
+// it within the context of a shell (/bin/sh).
+func ShellCommand(command string) *exec.Cmd {
+ return exec.Command("/bin/sh", "-c", command)
+}
diff --git a/builder/lxc/communicator.go b/builder/lxc/communicator.go
new file mode 100644
index 000000000..8d9765979
--- /dev/null
+++ b/builder/lxc/communicator.go
@@ -0,0 +1,151 @@
+package lxc
+
+import (
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "io"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+ "syscall"
+)
+
+type LxcAttachCommunicator struct {
+ RootFs string
+ ContainerName string
+ CmdWrapper CommandWrapper
+}
+
+func (c *LxcAttachCommunicator) Start(cmd *packer.RemoteCmd) error {
+ localCmd, err := c.Execute(cmd.Command)
+
+ if err != nil {
+ return err
+ }
+
+ localCmd.Stdin = cmd.Stdin
+ localCmd.Stdout = cmd.Stdout
+ localCmd.Stderr = cmd.Stderr
+ if err := localCmd.Start(); err != nil {
+ return err
+ }
+
+ go func() {
+ exitStatus := 0
+ if err := localCmd.Wait(); err != nil {
+ if exitErr, ok := err.(*exec.ExitError); ok {
+ exitStatus = 1
+
+ // There is no process-independent way to get the REAL
+ // exit status so we just try to go deeper.
+ if status, ok := exitErr.Sys().(syscall.WaitStatus); ok {
+ exitStatus = status.ExitStatus()
+ }
+ }
+ }
+
+ log.Printf(
+ "lxc-attach execution exited with '%d': '%s'",
+ exitStatus, cmd.Command)
+ cmd.SetExited(exitStatus)
+ }()
+
+ return nil
+}
+
+func (c *LxcAttachCommunicator) Upload(dst string, r io.Reader, fi *os.FileInfo) error {
+ dst = filepath.Join(c.RootFs, dst)
+ log.Printf("Uploading to rootfs: %s", dst)
+ tf, err := ioutil.TempFile("", "packer-lxc-attach")
+ if err != nil {
+ return fmt.Errorf("Error uploading file to rootfs: %s", err)
+ }
+ defer os.Remove(tf.Name())
+ io.Copy(tf, r)
+
+ cpCmd, err := c.CmdWrapper(fmt.Sprintf("sudo cp %s %s", tf.Name(), dst))
+ if err != nil {
+ return err
+ }
+
+ log.Printf("Running copy command: %s", dst)
+
+ return ShellCommand(cpCmd).Run()
+}
+
+func (c *LxcAttachCommunicator) UploadDir(dst string, src string, exclude []string) error {
+ // TODO: remove any file copied if it appears in `exclude`
+ dest := filepath.Join(c.RootFs, dst)
+ log.Printf("Uploading directory '%s' to rootfs '%s'", src, dest)
+ cpCmd, err := c.CmdWrapper(fmt.Sprintf("sudo cp -R %s/. %s", src, dest))
+ if err != nil {
+ return err
+ }
+
+ return ShellCommand(cpCmd).Run()
+}
+
+func (c *LxcAttachCommunicator) Download(src string, w io.Writer) error {
+ src = filepath.Join(c.RootFs, src)
+ log.Printf("Downloading from rootfs dir: %s", src)
+ f, err := os.Open(src)
+ if err != nil {
+ return err
+ }
+ defer f.Close()
+
+ if _, err := io.Copy(w, f); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (c *LxcAttachCommunicator) DownloadDir(src string, dst string, exclude []string) error {
+ return fmt.Errorf("DownloadDir is not implemented for lxc")
+}
+
+func (c *LxcAttachCommunicator) Execute(commandString string) (*exec.Cmd, error) {
+ log.Printf("Executing with lxc-attach in container: %s %s %s", c.ContainerName, c.RootFs, commandString)
+ command, err := c.CmdWrapper(
+ fmt.Sprintf("sudo lxc-attach --name %s -- /bin/sh -c \"%s\"", c.ContainerName, commandString))
+ if err != nil {
+ return nil, err
+ }
+
+ localCmd := ShellCommand(command)
+ log.Printf("Executing lxc-attach: %s %#v", localCmd.Path, localCmd.Args)
+
+ return localCmd, nil
+}
+
+func (c *LxcAttachCommunicator) CheckInit() (string, error) {
+ log.Printf("Debug runlevel exec")
+ localCmd, err := c.Execute("/sbin/runlevel")
+
+ if err != nil {
+ return "", err
+ }
+
+ pr, _ := localCmd.StdoutPipe()
+ if err = localCmd.Start(); err != nil {
+ return "", err
+ }
+
+ output, err := ioutil.ReadAll(pr)
+
+ if err != nil {
+ return "", err
+ }
+
+ err = localCmd.Wait()
+
+ if err != nil {
+ return "", err
+ }
+
+ return strings.TrimSpace(string(output)), nil
+}
diff --git a/builder/lxc/communicator_test.go b/builder/lxc/communicator_test.go
new file mode 100644
index 000000000..854ba6680
--- /dev/null
+++ b/builder/lxc/communicator_test.go
@@ -0,0 +1,14 @@
+package lxc
+
+import (
+ "github.com/hashicorp/packer/packer"
+ "testing"
+)
+
+func TestCommunicator_ImplementsCommunicator(t *testing.T) {
+ var raw interface{}
+ raw = &LxcAttachCommunicator{}
+ if _, ok := raw.(packer.Communicator); !ok {
+ t.Fatalf("Communicator should be a communicator")
+ }
+}
diff --git a/builder/lxc/config.go b/builder/lxc/config.go
new file mode 100644
index 000000000..c3c28d4fb
--- /dev/null
+++ b/builder/lxc/config.go
@@ -0,0 +1,79 @@
+package lxc
+
+import (
+ "fmt"
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/helper/config"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/mapstructure"
+ "os"
+ "time"
+)
+
+type Config struct {
+ common.PackerConfig `mapstructure:",squash"`
+ ConfigFile string `mapstructure:"config_file"`
+ OutputDir string `mapstructure:"output_directory"`
+ ContainerName string `mapstructure:"container_name"`
+ CommandWrapper string `mapstructure:"command_wrapper"`
+ RawInitTimeout string `mapstructure:"init_timeout"`
+ Name string `mapstructure:"template_name"`
+ Parameters []string `mapstructure:"template_parameters"`
+ EnvVars []string `mapstructure:"template_environment_vars"`
+ TargetRunlevel int `mapstructure:"target_runlevel"`
+ InitTimeout time.Duration
+
+ ctx interpolate.Context
+}
+
+func NewConfig(raws ...interface{}) (*Config, error) {
+ var c Config
+
+ var md mapstructure.Metadata
+ err := config.Decode(&c, &config.DecodeOpts{
+ Metadata: &md,
+ Interpolate: true,
+ }, raws...)
+ if err != nil {
+ return nil, err
+ }
+
+ // Accumulate any errors
+ var errs *packer.MultiError
+
+ if c.OutputDir == "" {
+ c.OutputDir = fmt.Sprintf("output-%s", c.PackerBuildName)
+ }
+
+ if c.ContainerName == "" {
+ c.ContainerName = fmt.Sprintf("packer-%s", c.PackerBuildName)
+ }
+
+ if c.TargetRunlevel == 0 {
+ c.TargetRunlevel = 3
+ }
+
+ if c.CommandWrapper == "" {
+ c.CommandWrapper = "{{.Command}}"
+ }
+
+ if c.RawInitTimeout == "" {
+ c.RawInitTimeout = "20s"
+ }
+
+ c.InitTimeout, err = time.ParseDuration(c.RawInitTimeout)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Failed parsing init_timeout: %s", err))
+ }
+
+ if _, err := os.Stat(c.ConfigFile); os.IsNotExist(err) {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("LXC Config file appears to be missing: %s", c.ConfigFile))
+ }
+
+ if errs != nil && len(errs.Errors) > 0 {
+ return nil, errs
+ }
+
+ return &c, nil
+}
diff --git a/builder/lxc/step_export.go b/builder/lxc/step_export.go
new file mode 100644
index 000000000..59e4b79e9
--- /dev/null
+++ b/builder/lxc/step_export.go
@@ -0,0 +1,98 @@
+package lxc
+
+import (
+ "bytes"
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "io"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+)
+
+type stepExport struct{}
+
+func (s *stepExport) Run(state multistep.StateBag) multistep.StepAction {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ name := config.ContainerName
+
+ containerDir := fmt.Sprintf("/var/lib/lxc/%s", name)
+ outputPath := filepath.Join(config.OutputDir, "rootfs.tar.gz")
+ configFilePath := filepath.Join(config.OutputDir, "lxc-config")
+
+ configFile, err := os.Create(configFilePath)
+
+ if err != nil {
+ err := fmt.Errorf("Error creating config file: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ originalConfigFile, err := os.Open(config.ConfigFile)
+
+ if err != nil {
+ err := fmt.Errorf("Error opening config file: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ _, err = io.Copy(configFile, originalConfigFile)
+
+ commands := make([][]string, 4)
+ commands[0] = []string{
+ "lxc-stop", "--name", name,
+ }
+ commands[1] = []string{
+ "tar", "-C", containerDir, "--numeric-owner", "--anchored", "--exclude=./rootfs/dev/log", "-czf", outputPath, "./rootfs",
+ }
+ commands[2] = []string{
+ "chmod", "+x", configFilePath,
+ }
+ commands[3] = []string{
+ "sh", "-c", "chown $USER:`id -gn` " + filepath.Join(config.OutputDir, "*"),
+ }
+
+ ui.Say("Exporting container...")
+ for _, command := range commands {
+ err := s.SudoCommand(command...)
+ if err != nil {
+ err := fmt.Errorf("Error exporting container: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+
+ return multistep.ActionContinue
+}
+
+func (s *stepExport) Cleanup(state multistep.StateBag) {}
+
+func (s *stepExport) SudoCommand(args ...string) error {
+ var stdout, stderr bytes.Buffer
+
+ log.Printf("Executing sudo command: %#v", args)
+ cmd := exec.Command("sudo", args...)
+ cmd.Stdout = &stdout
+ cmd.Stderr = &stderr
+ err := cmd.Run()
+
+ stdoutString := strings.TrimSpace(stdout.String())
+ stderrString := strings.TrimSpace(stderr.String())
+
+ if _, ok := err.(*exec.ExitError); ok {
+ err = fmt.Errorf("Sudo command error: %s", stderrString)
+ }
+
+ log.Printf("stdout: %s", stdoutString)
+ log.Printf("stderr: %s", stderrString)
+
+ return err
+}
diff --git a/builder/lxc/step_lxc_create.go b/builder/lxc/step_lxc_create.go
new file mode 100644
index 000000000..a98926ffa
--- /dev/null
+++ b/builder/lxc/step_lxc_create.go
@@ -0,0 +1,89 @@
+package lxc
+
+import (
+ "bytes"
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "log"
+ "os/exec"
+ "path/filepath"
+ "strings"
+)
+
+type stepLxcCreate struct{}
+
+func (s *stepLxcCreate) Run(state multistep.StateBag) multistep.StepAction {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ name := config.ContainerName
+
+ // TODO: read from env
+ lxc_dir := "/var/lib/lxc"
+ rootfs := filepath.Join(lxc_dir, name, "rootfs")
+
+ if config.PackerForce {
+ s.Cleanup(state)
+ }
+
+ commands := make([][]string, 3)
+ commands[0] = append(config.EnvVars, []string{"lxc-create", "-n", name, "-t", config.Name, "--"}...)
+ commands[0] = append(commands[0], config.Parameters...)
+ // prevent tmp from being cleaned on boot, we put provisioning scripts there
+ // todo: wait for init to finish before moving on to provisioning instead of this
+ commands[1] = []string{"touch", filepath.Join(rootfs, "tmp", ".tmpfs")}
+ commands[2] = []string{"lxc-start", "-d", "--name", name}
+
+ ui.Say("Creating container...")
+ for _, command := range commands {
+ log.Printf("Executing sudo command: %#v", command)
+ err := s.SudoCommand(command...)
+ if err != nil {
+ err := fmt.Errorf("Error creating container: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ }
+
+ state.Put("mount_path", rootfs)
+
+ return multistep.ActionContinue
+}
+
+func (s *stepLxcCreate) Cleanup(state multistep.StateBag) {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ command := []string{
+ "lxc-destroy", "-f", "-n", config.ContainerName,
+ }
+
+ ui.Say("Unregistering and deleting virtual machine...")
+ if err := s.SudoCommand(command...); err != nil {
+ ui.Error(fmt.Sprintf("Error deleting virtual machine: %s", err))
+ }
+}
+
+func (s *stepLxcCreate) SudoCommand(args ...string) error {
+ var stdout, stderr bytes.Buffer
+
+ log.Printf("Executing sudo command: %#v", args)
+ cmd := exec.Command("sudo", args...)
+ cmd.Stdout = &stdout
+ cmd.Stderr = &stderr
+ err := cmd.Run()
+
+ stdoutString := strings.TrimSpace(stdout.String())
+ stderrString := strings.TrimSpace(stderr.String())
+
+ if _, ok := err.(*exec.ExitError); ok {
+ err = fmt.Errorf("Sudo command error: %s", stderrString)
+ }
+
+ log.Printf("stdout: %s", stdoutString)
+ log.Printf("stderr: %s", stderrString)
+
+ return err
+}
diff --git a/builder/lxc/step_prepare_output_dir.go b/builder/lxc/step_prepare_output_dir.go
new file mode 100644
index 000000000..07c6f08b7
--- /dev/null
+++ b/builder/lxc/step_prepare_output_dir.go
@@ -0,0 +1,49 @@
+package lxc
+
+import (
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "log"
+ "os"
+ "time"
+)
+
+type stepPrepareOutputDir struct{}
+
+func (stepPrepareOutputDir) Run(state multistep.StateBag) multistep.StepAction {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ if _, err := os.Stat(config.OutputDir); err == nil && config.PackerForce {
+ ui.Say("Deleting previous output directory...")
+ os.RemoveAll(config.OutputDir)
+ }
+
+ if err := os.MkdirAll(config.OutputDir, 0755); err != nil {
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ return multistep.ActionContinue
+}
+
+func (stepPrepareOutputDir) Cleanup(state multistep.StateBag) {
+ _, cancelled := state.GetOk(multistep.StateCancelled)
+ _, halted := state.GetOk(multistep.StateHalted)
+
+ if cancelled || halted {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ ui.Say("Deleting output directory...")
+ for i := 0; i < 5; i++ {
+ err := os.RemoveAll(config.OutputDir)
+ if err == nil {
+ break
+ }
+
+ log.Printf("Error removing output dir: %s", err)
+ time.Sleep(2 * time.Second)
+ }
+ }
+}
diff --git a/builder/lxc/step_provision.go b/builder/lxc/step_provision.go
new file mode 100644
index 000000000..f91eb56ce
--- /dev/null
+++ b/builder/lxc/step_provision.go
@@ -0,0 +1,36 @@
+package lxc
+
+import (
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "log"
+)
+
+// StepProvision provisions the instance within a chroot.
+type StepProvision struct{}
+
+func (s *StepProvision) Run(state multistep.StateBag) multistep.StepAction {
+ hook := state.Get("hook").(packer.Hook)
+ config := state.Get("config").(*Config)
+ mountPath := state.Get("mount_path").(string)
+ ui := state.Get("ui").(packer.Ui)
+ wrappedCommand := state.Get("wrappedCommand").(CommandWrapper)
+
+ // Create our communicator
+ comm := &LxcAttachCommunicator{
+ ContainerName: config.ContainerName,
+ RootFs: mountPath,
+ CmdWrapper: wrappedCommand,
+ }
+
+ // Provision
+ log.Println("Running the provision hook")
+ if err := hook.Run(packer.HookProvision, ui, comm, nil); err != nil {
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ return multistep.ActionContinue
+}
+
+func (s *StepProvision) Cleanup(state multistep.StateBag) {}
diff --git a/builder/lxc/step_wait_init.go b/builder/lxc/step_wait_init.go
new file mode 100644
index 000000000..e5d375312
--- /dev/null
+++ b/builder/lxc/step_wait_init.go
@@ -0,0 +1,102 @@
+package lxc
+
+import (
+ "errors"
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "log"
+ "strings"
+ "time"
+)
+
+type StepWaitInit struct {
+ WaitTimeout time.Duration
+}
+
+func (s *StepWaitInit) Run(state multistep.StateBag) multistep.StepAction {
+ ui := state.Get("ui").(packer.Ui)
+
+ var err error
+
+ cancel := make(chan struct{})
+ waitDone := make(chan bool, 1)
+ go func() {
+ ui.Say("Waiting for container to finish init...")
+ err = s.waitForInit(state, cancel)
+ waitDone <- true
+ }()
+
+ log.Printf("Waiting for container to finish init, up to timeout: %s", s.WaitTimeout)
+ timeout := time.After(s.WaitTimeout)
+WaitLoop:
+ for {
+ select {
+ case <-waitDone:
+ if err != nil {
+ ui.Error(fmt.Sprintf("Error waiting for container to finish init: %s", err))
+ return multistep.ActionHalt
+ }
+
+ ui.Say("Container finished init!")
+ break WaitLoop
+ case <-timeout:
+ err := fmt.Errorf("Timeout waiting for container to finish init.")
+ state.Put("error", err)
+ ui.Error(err.Error())
+ close(cancel)
+ return multistep.ActionHalt
+ case <-time.After(1 * time.Second):
+ if _, ok := state.GetOk(multistep.StateCancelled); ok {
+ close(cancel)
+ log.Println("Interrupt detected, quitting waiting for container to finish init.")
+ return multistep.ActionHalt
+ }
+ }
+ }
+
+ return multistep.ActionContinue
+}
+
+func (s *StepWaitInit) Cleanup(multistep.StateBag) {
+}
+
+func (s *StepWaitInit) waitForInit(state multistep.StateBag, cancel <-chan struct{}) error {
+ config := state.Get("config").(*Config)
+ mountPath := state.Get("mount_path").(string)
+ wrappedCommand := state.Get("wrappedCommand").(CommandWrapper)
+
+ for {
+ select {
+ case <-cancel:
+ log.Println("Cancelled. Exiting loop.")
+ return errors.New("Wait cancelled")
+ case <-time.After(1 * time.Second):
+ }
+
+ comm := &LxcAttachCommunicator{
+ ContainerName: config.ContainerName,
+ RootFs: mountPath,
+ CmdWrapper: wrappedCommand,
+ }
+
+ runlevel, _ := comm.CheckInit()
+ currentRunlevel := "unknown"
+ if arr := strings.Split(runlevel, " "); len(arr) >= 2 {
+ currentRunlevel = arr[1]
+ }
+
+ log.Printf("Current runlevel in container: '%s'", runlevel)
+
+ targetRunlevel := fmt.Sprintf("%d", config.TargetRunlevel)
+ if currentRunlevel == targetRunlevel {
+ log.Printf("Container finished init.")
+ break
+ } else if currentRunlevel > targetRunlevel {
+ log.Printf("Expected Runlevel %s, Got Runlevel %s, continuing", targetRunlevel, currentRunlevel)
+ break
+ }
+ }
+
+ return nil
+}
diff --git a/builder/lxd/artifact.go b/builder/lxd/artifact.go
new file mode 100644
index 000000000..481f0758e
--- /dev/null
+++ b/builder/lxd/artifact.go
@@ -0,0 +1,34 @@
+package lxd
+
+import (
+ "fmt"
+)
+
+type Artifact struct {
+ id string
+}
+
+func (*Artifact) BuilderId() string {
+ return BuilderId
+}
+
+func (a *Artifact) Files() []string {
+ return nil
+}
+
+func (a *Artifact) Id() string {
+ return a.id
+}
+
+func (a *Artifact) String() string {
+ return fmt.Sprintf("image: %s", a.id)
+}
+
+func (a *Artifact) State(name string) interface{} {
+ return nil
+}
+
+func (a *Artifact) Destroy() error {
+ _, err := LXDCommand("image", "delete", a.id)
+ return err
+}
diff --git a/builder/lxd/builder.go b/builder/lxd/builder.go
new file mode 100644
index 000000000..d59cf5bcf
--- /dev/null
+++ b/builder/lxd/builder.go
@@ -0,0 +1,74 @@
+package lxd
+
+import (
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/multistep"
+ "log"
+)
+
+// The unique ID for this builder
+const BuilderId = "lxd"
+
+type wrappedCommandTemplate struct {
+ Command string
+}
+
+type Builder struct {
+ config *Config
+ runner multistep.Runner
+}
+
+func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
+ c, errs := NewConfig(raws...)
+ if errs != nil {
+ return nil, errs
+ }
+ b.config = c
+
+ return nil, nil
+}
+
+func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error) {
+ wrappedCommand := func(command string) (string, error) {
+ b.config.ctx.Data = &wrappedCommandTemplate{Command: command}
+ return interpolate.Render(b.config.CommandWrapper, &b.config.ctx)
+ }
+
+ steps := []multistep.Step{
+ &stepLxdLaunch{},
+ &StepProvision{},
+ &stepPublish{},
+ }
+
+ // Setup the state bag
+ state := new(multistep.BasicStateBag)
+ state.Put("config", b.config)
+ state.Put("cache", cache)
+ state.Put("hook", hook)
+ state.Put("ui", ui)
+ state.Put("wrappedCommand", CommandWrapper(wrappedCommand))
+
+ // Run
+ b.runner = common.NewRunnerWithPauseFn(steps, b.config.PackerConfig, ui, state)
+ b.runner.Run(state)
+
+ // If there was an error, return that
+ if rawErr, ok := state.GetOk("error"); ok {
+ return nil, rawErr.(error)
+ }
+
+ artifact := &Artifact{
+ id: state.Get("imageFingerprint").(string),
+ }
+
+ return artifact, nil
+}
+
+func (b *Builder) Cancel() {
+ if b.runner != nil {
+ log.Println("Cancelling the step runner...")
+ b.runner.Cancel()
+ }
+}
diff --git a/builder/lxd/builder_test.go b/builder/lxd/builder_test.go
new file mode 100644
index 000000000..b2ea70e55
--- /dev/null
+++ b/builder/lxd/builder_test.go
@@ -0,0 +1,77 @@
+package lxd
+
+import (
+ "os"
+ "testing"
+
+ "github.com/hashicorp/packer/packer"
+)
+
+func testConfig() map[string]interface{} {
+ return map[string]interface{}{
+ "output_image": "foo",
+ "image": "bar",
+ }
+}
+
+func TestBuilder_Foo(t *testing.T) {
+ if os.Getenv("PACKER_ACC") == "" {
+ t.Skip("This test is only run with PACKER_ACC=1")
+ }
+}
+
+func TestBuilderPrepare_ConfigFile(t *testing.T) {
+ var b Builder
+ // Good
+ config := testConfig()
+ warnings, err := b.Prepare(config)
+ if len(warnings) > 0 {
+ t.Fatalf("bad: %#v", warnings)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ // Good, remote image
+ config = testConfig()
+ config["image"] = "remote:bar"
+ warnings, err = b.Prepare(config)
+ if len(warnings) > 0 {
+ t.Fatalf("bad: %#v", warnings)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ // Good, remote output image
+ config = testConfig()
+ config["output_image"] = "remote:foo"
+ warnings, err = b.Prepare(config)
+ if len(warnings) > 0 {
+ t.Fatalf("bad: %#v", warnings)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ // Bad, missing image name
+ config = testConfig()
+ delete(config, "image")
+ b = Builder{}
+ warnings, err = b.Prepare(config)
+ if len(warnings) > 0 {
+ t.Fatalf("bad: %#v", warnings)
+ }
+ if err == nil {
+ t.Fatalf("should have error")
+ }
+
+}
+
+func TestBuilder_ImplementsBuilder(t *testing.T) {
+ var raw interface{}
+ raw = &Builder{}
+ if _, ok := raw.(packer.Builder); !ok {
+ t.Fatalf("Builder should be a builder")
+ }
+}
diff --git a/builder/lxd/command.go b/builder/lxd/command.go
new file mode 100644
index 000000000..c9a39279d
--- /dev/null
+++ b/builder/lxd/command.go
@@ -0,0 +1,43 @@
+package lxd
+
+import (
+ "bytes"
+ "fmt"
+ "log"
+ "os/exec"
+ "strings"
+)
+
+// CommandWrapper is a type that given a command, will possibly modify that
+// command in-flight. This might return an error.
+type CommandWrapper func(string) (string, error)
+
+// ShellCommand takes a command string and returns an *exec.Cmd to execute
+// it within the context of a shell (/bin/sh).
+func ShellCommand(command string) *exec.Cmd {
+ return exec.Command("/bin/sh", "-c", command)
+}
+
+// Yeah...LXD calls `lxc` because the command line is different between the
+// packages. This should also avoid a naming collision between the LXC builder.
+func LXDCommand(args ...string) (string, error) {
+ var stdout, stderr bytes.Buffer
+
+ log.Printf("Executing lxc command: %#v", args)
+ cmd := exec.Command("lxc", args...)
+ cmd.Stdout = &stdout
+ cmd.Stderr = &stderr
+ err := cmd.Run()
+
+ stdoutString := strings.TrimSpace(stdout.String())
+ stderrString := strings.TrimSpace(stderr.String())
+
+ if _, ok := err.(*exec.ExitError); ok {
+ err = fmt.Errorf("LXD command error: %s", stderrString)
+ }
+
+ log.Printf("stdout: %s", stdoutString)
+ log.Printf("stderr: %s", stderrString)
+
+ return stdoutString, err
+}
diff --git a/builder/lxd/communicator.go b/builder/lxd/communicator.go
new file mode 100644
index 000000000..8eaa47a5f
--- /dev/null
+++ b/builder/lxd/communicator.go
@@ -0,0 +1,142 @@
+package lxd
+
+import (
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "io"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "syscall"
+)
+
+type Communicator struct {
+ ContainerName string
+ CmdWrapper CommandWrapper
+}
+
+func (c *Communicator) Start(cmd *packer.RemoteCmd) error {
+ localCmd, err := c.Execute(cmd.Command)
+
+ if err != nil {
+ return err
+ }
+
+ localCmd.Stdin = cmd.Stdin
+ localCmd.Stdout = cmd.Stdout
+ localCmd.Stderr = cmd.Stderr
+ if err := localCmd.Start(); err != nil {
+ return err
+ }
+
+ go func() {
+ exitStatus := 0
+ if err := localCmd.Wait(); err != nil {
+ if exitErr, ok := err.(*exec.ExitError); ok {
+ exitStatus = 1
+
+ // There is no process-independent way to get the REAL
+ // exit status so we just try to go deeper.
+ if status, ok := exitErr.Sys().(syscall.WaitStatus); ok {
+ exitStatus = status.ExitStatus()
+ }
+ }
+ }
+
+ log.Printf(
+ "lxc exec execution exited with '%d': '%s'",
+ exitStatus, cmd.Command)
+ cmd.SetExited(exitStatus)
+ }()
+
+ return nil
+}
+
+func (c *Communicator) Upload(dst string, r io.Reader, fi *os.FileInfo) error {
+ cpCmd, err := c.CmdWrapper(fmt.Sprintf("lxc file push - %s", filepath.Join(c.ContainerName, dst)))
+ if err != nil {
+ return err
+ }
+
+ log.Printf("Running copy command: %s", cpCmd)
+ command := ShellCommand(cpCmd)
+ command.Stdin = r
+
+ return command.Run()
+}
+
+func (c *Communicator) UploadDir(dst string, src string, exclude []string) error {
+ // NOTE:lxc file push doesn't yet support directory uploads.
+ // As a work around, we tar up the folder, upload it as a file, then extract it
+
+ // Don't use 'z' flag as compressing may take longer and the transfer is likely local.
+ // If this isn't the case, it is possible for the user to compress in another step then transfer.
+ // It wouldn't be possibe to disable compression, without exposing this option.
+ tar, err := c.CmdWrapper(fmt.Sprintf("tar -cf - -C %s .", src))
+ if err != nil {
+ return err
+ }
+
+ cp, err := c.CmdWrapper(fmt.Sprintf("lxc exec %s -- tar -xf - -C %s", c.ContainerName, dst))
+ if err != nil {
+ return err
+ }
+
+ tarCmd := ShellCommand(tar)
+ cpCmd := ShellCommand(cp)
+
+ cpCmd.Stdin, _ = tarCmd.StdoutPipe()
+ log.Printf("Starting tar command: %s", tar)
+ err = tarCmd.Start()
+ if err != nil {
+ return err
+ }
+
+ log.Printf("Running cp command: %s", cp)
+ err = cpCmd.Run()
+ if err != nil {
+ log.Printf("Error running cp command: %s", err)
+ return err
+ }
+
+ err = tarCmd.Wait()
+ if err != nil {
+ log.Printf("Error running tar command: %s", err)
+ return err
+ }
+
+ return nil
+}
+
+func (c *Communicator) Download(src string, w io.Writer) error {
+ cpCmd, err := c.CmdWrapper(fmt.Sprintf("lxc file pull %s -", filepath.Join(c.ContainerName, src)))
+ if err != nil {
+ return err
+ }
+
+ log.Printf("Running copy command: %s", cpCmd)
+ command := ShellCommand(cpCmd)
+ command.Stdout = w
+
+ return command.Run()
+}
+
+func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error {
+ // TODO This could probably be "lxc exec -- cd && tar -czf - | tar -xzf - -C "
+ return fmt.Errorf("DownloadDir is not implemented for lxc")
+}
+
+func (c *Communicator) Execute(commandString string) (*exec.Cmd, error) {
+ log.Printf("Executing with lxc exec in container: %s %s", c.ContainerName, commandString)
+ command, err := c.CmdWrapper(
+ fmt.Sprintf("lxc exec %s -- /bin/sh -c \"%s\"", c.ContainerName, commandString))
+ if err != nil {
+ return nil, err
+ }
+
+ localCmd := ShellCommand(command)
+ log.Printf("Executing lxc exec: %s %#v", localCmd.Path, localCmd.Args)
+
+ return localCmd, nil
+}
diff --git a/builder/lxd/communicator_test.go b/builder/lxd/communicator_test.go
new file mode 100644
index 000000000..4a70160b7
--- /dev/null
+++ b/builder/lxd/communicator_test.go
@@ -0,0 +1,20 @@
+package lxd
+
+import (
+ "github.com/hashicorp/packer/packer"
+ "testing"
+)
+
+func TestCommunicator_ImplementsCommunicator(t *testing.T) {
+ var raw interface{}
+ raw = &Communicator{}
+ if _, ok := raw.(packer.Communicator); !ok {
+ t.Fatalf("Communicator should be a communicator")
+ }
+}
+
+// Acceptance tests
+// TODO Execute a command
+// TODO Upload a file
+// TODO Download a file
+// TODO Upload a Directory
diff --git a/builder/lxd/config.go b/builder/lxd/config.go
new file mode 100644
index 000000000..73de7212e
--- /dev/null
+++ b/builder/lxd/config.go
@@ -0,0 +1,60 @@
+package lxd
+
+import (
+ "fmt"
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/helper/config"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/mapstructure"
+ "time"
+)
+
+type Config struct {
+ common.PackerConfig `mapstructure:",squash"`
+ OutputImage string `mapstructure:"output_image"`
+ ContainerName string `mapstructure:"container_name"`
+ CommandWrapper string `mapstructure:"command_wrapper"`
+ Image string `mapstructure:"image"`
+ InitTimeout time.Duration
+
+ ctx interpolate.Context
+}
+
+func NewConfig(raws ...interface{}) (*Config, error) {
+ var c Config
+
+ var md mapstructure.Metadata
+ err := config.Decode(&c, &config.DecodeOpts{
+ Metadata: &md,
+ Interpolate: true,
+ }, raws...)
+ if err != nil {
+ return nil, err
+ }
+
+ // Accumulate any errors
+ var errs *packer.MultiError
+
+ if c.ContainerName == "" {
+ c.ContainerName = fmt.Sprintf("packer-%s", c.PackerBuildName)
+ }
+
+ if c.OutputImage == "" {
+ c.OutputImage = c.ContainerName
+ }
+
+ if c.CommandWrapper == "" {
+ c.CommandWrapper = "{{.Command}}"
+ }
+
+ if c.Image == "" {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("`image` is a required parameter for LXD. Please specify an image by alias or fingerprint. e.g. `ubuntu-daily:x`"))
+ }
+
+ if errs != nil && len(errs.Errors) > 0 {
+ return nil, errs
+ }
+
+ return &c, nil
+}
diff --git a/builder/lxd/step_lxd_launch.go b/builder/lxd/step_lxd_launch.go
new file mode 100644
index 000000000..1ec573b18
--- /dev/null
+++ b/builder/lxd/step_lxd_launch.go
@@ -0,0 +1,50 @@
+package lxd
+
+import (
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "time"
+)
+
+type stepLxdLaunch struct{}
+
+func (s *stepLxdLaunch) Run(state multistep.StateBag) multistep.StepAction {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ name := config.ContainerName
+ image := config.Image
+
+ args := []string{
+ "launch", "--ephemeral=false", image, name,
+ }
+
+ ui.Say("Creating container...")
+ _, err := LXDCommand(args...)
+ if err != nil {
+ err := fmt.Errorf("Error creating container: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+ // TODO: Should we check `lxc info ` for "Running"?
+ // We have to do this so /tmp doens't get cleared and lose our provisioner scripts.
+ time.Sleep(1 * time.Second)
+
+ return multistep.ActionContinue
+}
+
+func (s *stepLxdLaunch) Cleanup(state multistep.StateBag) {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ args := []string{
+ "delete", "--force", config.ContainerName,
+ }
+
+ ui.Say("Unregistering and deleting deleting container...")
+ if _, err := LXDCommand(args...); err != nil {
+ ui.Error(fmt.Sprintf("Error deleting container: %s", err))
+ }
+}
diff --git a/builder/lxd/step_provision.go b/builder/lxd/step_provision.go
new file mode 100644
index 000000000..c46b900e7
--- /dev/null
+++ b/builder/lxd/step_provision.go
@@ -0,0 +1,34 @@
+package lxd
+
+import (
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "log"
+)
+
+// StepProvision provisions the container
+type StepProvision struct{}
+
+func (s *StepProvision) Run(state multistep.StateBag) multistep.StepAction {
+ hook := state.Get("hook").(packer.Hook)
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+ wrappedCommand := state.Get("wrappedCommand").(CommandWrapper)
+
+ // Create our communicator
+ comm := &Communicator{
+ ContainerName: config.ContainerName,
+ CmdWrapper: wrappedCommand,
+ }
+
+ // Provision
+ log.Println("Running the provision hook")
+ if err := hook.Run(packer.HookProvision, ui, comm, nil); err != nil {
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ return multistep.ActionContinue
+}
+
+func (s *StepProvision) Cleanup(state multistep.StateBag) {}
diff --git a/builder/lxd/step_publish.go b/builder/lxd/step_publish.go
new file mode 100644
index 000000000..0c0aabd3f
--- /dev/null
+++ b/builder/lxd/step_publish.go
@@ -0,0 +1,54 @@
+package lxd
+
+import (
+ "fmt"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "regexp"
+)
+
+type stepPublish struct{}
+
+func (s *stepPublish) Run(state multistep.StateBag) multistep.StepAction {
+ config := state.Get("config").(*Config)
+ ui := state.Get("ui").(packer.Ui)
+
+ name := config.ContainerName
+ stop_args := []string{
+ // We created the container with "--ephemeral=false" so we know it is safe to stop.
+ "stop", name,
+ }
+
+ ui.Say("Stopping container...")
+ _, err := LXDCommand(stop_args...)
+ if err != nil {
+ err := fmt.Errorf("Error stopping container: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ publish_args := []string{
+ "publish", name, "--alias", config.OutputImage,
+ }
+
+ ui.Say("Publishing container...")
+ stdoutString, err := LXDCommand(publish_args...)
+ if err != nil {
+ err := fmt.Errorf("Error publishing container: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ r := regexp.MustCompile("([0-9a-fA-F]+)$")
+ fingerprint := r.FindAllStringSubmatch(stdoutString, -1)[0][0]
+
+ ui.Say(fmt.Sprintf("Created image: %s", fingerprint))
+
+ state.Put("imageFingerprint", fingerprint)
+
+ return multistep.ActionContinue
+}
+
+func (s *stepPublish) Cleanup(state multistep.StateBag) {}
diff --git a/builder/oneandone/builder.go b/builder/oneandone/builder.go
index f4f8e1dc3..ad470c152 100644
--- a/builder/oneandone/builder.go
+++ b/builder/oneandone/builder.go
@@ -50,15 +50,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
new(stepTakeSnapshot),
}
- if b.config.PackerDebug {
- b.runner = &multistep.DebugRunner{
- Steps: steps,
- PauseFn: common.MultistepDebugFn(ui),
- }
- } else {
- b.runner = &multistep.BasicRunner{Steps: steps}
- }
-
+ b.runner = common.NewRunner(steps, b.config.PackerConfig, ui)
b.runner.Run(state)
if rawErr, ok := state.GetOk("error"); ok {
diff --git a/builder/oracle/oci/LICENSE b/builder/oracle/oci/LICENSE
new file mode 100644
index 000000000..0ddc33c23
--- /dev/null
+++ b/builder/oracle/oci/LICENSE
@@ -0,0 +1,375 @@
+Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/builder/oracle/oci/artifact.go b/builder/oracle/oci/artifact.go
new file mode 100644
index 000000000..6684468fc
--- /dev/null
+++ b/builder/oracle/oci/artifact.go
@@ -0,0 +1,45 @@
+package oci
+
+import (
+ "fmt"
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+)
+
+// Artifact is an artifact implementation that contains a built Custom Image.
+type Artifact struct {
+ Image client.Image
+ Region string
+ driver Driver
+}
+
+// BuilderId uniquely identifies the builder.
+func (a *Artifact) BuilderId() string {
+ return BuilderId
+}
+
+// Files lists the files associated with an artifact. We don't have any files
+// as the custom image is stored server side.
+func (a *Artifact) Files() []string {
+ return nil
+}
+
+// Id returns the OCID of the associated Image.
+func (a *Artifact) Id() string {
+ return a.Image.ID
+}
+
+func (a *Artifact) String() string {
+ return fmt.Sprintf(
+ "An image was created: '%v' (OCID: %v) in region '%v'",
+ a.Image.DisplayName, a.Image.ID, a.Region,
+ )
+}
+
+func (a *Artifact) State(name string) interface{} {
+ return nil
+}
+
+// Destroy deletes the custom image associated with the artifact.
+func (a *Artifact) Destroy() error {
+ return a.driver.DeleteImage(a.Image.ID)
+}
diff --git a/builder/oracle/oci/artifact_test.go b/builder/oracle/oci/artifact_test.go
new file mode 100644
index 000000000..5cfbc1cb8
--- /dev/null
+++ b/builder/oracle/oci/artifact_test.go
@@ -0,0 +1,15 @@
+package oci
+
+import (
+ "testing"
+
+ "github.com/hashicorp/packer/packer"
+)
+
+func TestArtifactImpl(t *testing.T) {
+ var raw interface{}
+ raw = &Artifact{}
+ if _, ok := raw.(packer.Artifact); !ok {
+ t.Fatalf("Artifact should be artifact")
+ }
+}
diff --git a/builder/oracle/oci/builder.go b/builder/oracle/oci/builder.go
new file mode 100644
index 000000000..5eedaa0b1
--- /dev/null
+++ b/builder/oracle/oci/builder.go
@@ -0,0 +1,96 @@
+// Package oci contains a packer.Builder implementation that builds Oracle
+// Bare Metal Cloud Services (OCI) images.
+package oci
+
+import (
+ "fmt"
+ "log"
+
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/helper/communicator"
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+)
+
+// BuilderId uniquely identifies the builder
+const BuilderId = "packer.oracle.oci"
+
+// OCI API version
+const ociAPIVersion = "20160918"
+
+// Builder is a builder implementation that creates Oracle OCI custom images.
+type Builder struct {
+ config *Config
+ runner multistep.Runner
+}
+
+func (b *Builder) Prepare(rawConfig ...interface{}) ([]string, error) {
+ config, err := NewConfig(rawConfig...)
+ if err != nil {
+ return nil, err
+ }
+ b.config = config
+
+ return nil, nil
+}
+
+func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error) {
+ driver, err := NewDriverOCI(b.config)
+ if err != nil {
+ return nil, err
+ }
+
+ // Populate the state bag
+ state := new(multistep.BasicStateBag)
+ state.Put("config", b.config)
+ state.Put("driver", driver)
+ state.Put("hook", hook)
+ state.Put("ui", ui)
+
+ // Build the steps
+ steps := []multistep.Step{
+ &stepKeyPair{
+ Debug: b.config.PackerDebug,
+ DebugKeyPath: fmt.Sprintf("oci_%s.pem", b.config.PackerBuildName),
+ PrivateKeyFile: b.config.Comm.SSHPrivateKey,
+ },
+ &stepCreateInstance{},
+ &stepInstanceInfo{},
+ &communicator.StepConnect{
+ Config: &b.config.Comm,
+ Host: commHost,
+ SSHConfig: SSHConfig(
+ b.config.Comm.SSHUsername,
+ b.config.Comm.SSHPassword),
+ },
+ &common.StepProvision{},
+ &stepImage{},
+ }
+
+ // Run the steps
+ b.runner = common.NewRunnerWithPauseFn(steps, b.config.PackerConfig, ui, state)
+ b.runner.Run(state)
+
+ // If there was an error, return that
+ if rawErr, ok := state.GetOk("error"); ok {
+ return nil, rawErr.(error)
+ }
+
+ // Build the artifact and return it
+ artifact := &Artifact{
+ Image: state.Get("image").(client.Image),
+ Region: b.config.AccessCfg.Region,
+ driver: driver,
+ }
+
+ return artifact, nil
+}
+
+// Cancel terminates a running build.
+func (b *Builder) Cancel() {
+ if b.runner != nil {
+ log.Println("Cancelling the step runner...")
+ b.runner.Cancel()
+ }
+}
diff --git a/builder/oracle/oci/builder_test.go b/builder/oracle/oci/builder_test.go
new file mode 100644
index 000000000..80500ef55
--- /dev/null
+++ b/builder/oracle/oci/builder_test.go
@@ -0,0 +1,15 @@
+package oci
+
+import (
+ "testing"
+
+ "github.com/hashicorp/packer/packer"
+)
+
+func TestBuilder_ImplementsBuilder(t *testing.T) {
+ var raw interface{}
+ raw = &Builder{}
+ if _, ok := raw.(packer.Builder); !ok {
+ t.Fatalf("Builder should be a builder")
+ }
+}
diff --git a/builder/oracle/oci/client/base_client.go b/builder/oracle/oci/client/base_client.go
new file mode 100644
index 000000000..7270687e7
--- /dev/null
+++ b/builder/oracle/oci/client/base_client.go
@@ -0,0 +1,215 @@
+package oci
+
+import (
+ "bytes"
+ "encoding/json"
+ "github.com/google/go-querystring/query"
+ "net/http"
+ "net/url"
+)
+
+const (
+ contentType = "Content-Type"
+ jsonContentType = "application/json"
+)
+
+// baseClient provides a basic (AND INTENTIONALLY INCOMPLETE) JSON REST client
+// that abstracts away some of the repetitive code required in the OCI Client.
+type baseClient struct {
+ httpClient *http.Client
+ method string
+ url string
+ queryStruct interface{}
+ header http.Header
+ body interface{}
+}
+
+// newBaseClient constructs a default baseClient.
+func newBaseClient() *baseClient {
+ return &baseClient{
+ httpClient: http.DefaultClient,
+ method: "GET",
+ header: make(http.Header),
+ }
+}
+
+// New creates a copy of an existing baseClient.
+func (c *baseClient) New() *baseClient {
+ // Copy headers
+ header := make(http.Header)
+ for k, v := range c.header {
+ header[k] = v
+ }
+
+ return &baseClient{
+ httpClient: c.httpClient,
+ method: c.method,
+ url: c.url,
+ header: header,
+ }
+}
+
+// Client sets the http Client used to perform requests.
+func (c *baseClient) Client(httpClient *http.Client) *baseClient {
+ if httpClient == nil {
+ c.httpClient = http.DefaultClient
+ } else {
+ c.httpClient = httpClient
+ }
+ return c
+}
+
+// Base sets the base client url.
+func (c *baseClient) Base(path string) *baseClient {
+ c.url = path
+ return c
+}
+
+// Path extends the client url.
+func (c *baseClient) Path(path string) *baseClient {
+ baseURL, baseErr := url.Parse(c.url)
+ pathURL, pathErr := url.Parse(path)
+ // Bail on parsing error leaving the client's url unmodified
+ if baseErr != nil || pathErr != nil {
+ return c
+ }
+
+ c.url = baseURL.ResolveReference(pathURL).String()
+ return c
+}
+
+// QueryStruct sets the struct from which the request querystring is built.
+func (c *baseClient) QueryStruct(params interface{}) *baseClient {
+ c.queryStruct = params
+ return c
+}
+
+// SetBody wraps a given struct for serialisation and sets the client body.
+func (c *baseClient) SetBody(params interface{}) *baseClient {
+ c.body = params
+ return c
+}
+
+// Header
+
+// AddHeader adds a HTTP header to the client. Existing keys will be extended.
+func (c *baseClient) AddHeader(key, value string) *baseClient {
+ c.header.Add(key, value)
+ return c
+}
+
+// SetHeader sets a HTTP header on the client. Existing keys will be
+// overwritten.
+func (c *baseClient) SetHeader(key, value string) *baseClient {
+ c.header.Add(key, value)
+ return c
+}
+
+// HTTP methods (subset)
+
+// Get sets the client's HTTP method to GET.
+func (c *baseClient) Get(path string) *baseClient {
+ c.method = "GET"
+ return c.Path(path)
+}
+
+// Post sets the client's HTTP method to POST.
+func (c *baseClient) Post(path string) *baseClient {
+ c.method = "POST"
+ return c.Path(path)
+}
+
+// Delete sets the client's HTTP method to DELETE.
+func (c *baseClient) Delete(path string) *baseClient {
+ c.method = "DELETE"
+ return c.Path(path)
+}
+
+// Do executes a HTTP request and returns the response encoded as either error
+// or success values.
+func (c *baseClient) Do(req *http.Request, successV, failureV interface{}) (*http.Response, error) {
+ resp, err := c.httpClient.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+
+ if resp.StatusCode >= 200 && resp.StatusCode < 300 {
+ if successV != nil {
+ err = json.NewDecoder(resp.Body).Decode(successV)
+ }
+ } else {
+ if failureV != nil {
+ err = json.NewDecoder(resp.Body).Decode(failureV)
+ }
+ }
+
+ return resp, err
+}
+
+// Request builds a http.Request from the baseClient instance.
+func (c *baseClient) Request() (*http.Request, error) {
+ reqURL, err := url.Parse(c.url)
+ if err != nil {
+ return nil, err
+ }
+
+ if c.queryStruct != nil {
+ err = addQueryStruct(reqURL, c.queryStruct)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ body := &bytes.Buffer{}
+ if c.body != nil {
+ if err := json.NewEncoder(body).Encode(c.body); err != nil {
+ return nil, err
+ }
+ }
+
+ req, err := http.NewRequest(c.method, reqURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ // Add headers to request
+ for k, vs := range c.header {
+ for _, v := range vs {
+ req.Header.Add(k, v)
+ }
+ }
+
+ return req, nil
+}
+
+// Recieve creates a http request from the client and executes it returning the
+// response.
+func (c *baseClient) Receive(successV, failureV interface{}) (*http.Response, error) {
+ req, err := c.Request()
+ if err != nil {
+ return nil, err
+ }
+ return c.Do(req, successV, failureV)
+}
+
+// addQueryStruct converts a struct to a querystring and merges any values
+// provided in the URL itself.
+func addQueryStruct(reqURL *url.URL, queryStruct interface{}) error {
+ urlValues, err := url.ParseQuery(reqURL.RawQuery)
+ if err != nil {
+ return err
+ }
+ queryValues, err := query.Values(queryStruct)
+ if err != nil {
+ return err
+ }
+
+ for k, vs := range queryValues {
+ for _, v := range vs {
+ urlValues.Add(k, v)
+ }
+ }
+ reqURL.RawQuery = urlValues.Encode()
+ return nil
+}
diff --git a/builder/oracle/oci/client/client.go b/builder/oracle/oci/client/client.go
new file mode 100644
index 000000000..8e6c1762d
--- /dev/null
+++ b/builder/oracle/oci/client/client.go
@@ -0,0 +1,31 @@
+package oci
+
+import (
+ "net/http"
+)
+
+const (
+ apiVersion = "20160918"
+ userAgent = "go-oci/" + apiVersion
+ baseURLPattern = "https://%s.%s.oraclecloud.com/%s/"
+)
+
+// Client is the main interface through which consumers interact with the OCI
+// API.
+type Client struct {
+ UserAgent string
+ Compute *ComputeClient
+ Config *Config
+}
+
+// NewClient creates a new Client for communicating with the OCI API.
+func NewClient(config *Config) (*Client, error) {
+ transport := NewTransport(http.DefaultTransport, config)
+ base := newBaseClient().Client(&http.Client{Transport: transport})
+
+ return &Client{
+ UserAgent: userAgent,
+ Compute: NewComputeClient(base.New().Base(config.getBaseURL("iaas"))),
+ Config: config,
+ }, nil
+}
diff --git a/builder/oracle/oci/client/client_test.go b/builder/oracle/oci/client/client_test.go
new file mode 100644
index 000000000..f2ebd8f87
--- /dev/null
+++ b/builder/oracle/oci/client/client_test.go
@@ -0,0 +1,49 @@
+package oci
+
+import (
+ "net/http"
+ "net/http/httptest"
+ "net/url"
+ "os"
+
+ "github.com/go-ini/ini"
+)
+
+var (
+ mux *http.ServeMux
+ client *Client
+ server *httptest.Server
+ keyFile *os.File
+)
+
+// setup sets up a test HTTP server along with a oci.Client that is
+// configured to talk to that test server. Tests should register handlers on
+// mux which provide mock responses for the API method being tested.
+func setup() {
+ mux = http.NewServeMux()
+ server = httptest.NewServer(mux)
+ parsedURL, _ := url.Parse(server.URL)
+
+ config := &Config{}
+ config.baseURL = parsedURL.String()
+
+ var cfg *ini.File
+ var err error
+ cfg, keyFile, err = BaseTestConfig()
+
+ config, err = loadConfigSection(cfg, "DEFAULT", config)
+ if err != nil {
+ panic(err)
+ }
+
+ client, err = NewClient(config)
+ if err != nil {
+ panic("Failed to instantiate test client")
+ }
+}
+
+// teardown closes the test HTTP server
+func teardown() {
+ server.Close()
+ os.Remove(keyFile.Name())
+}
diff --git a/builder/oracle/oci/client/compute.go b/builder/oracle/oci/client/compute.go
new file mode 100644
index 000000000..183a3794f
--- /dev/null
+++ b/builder/oracle/oci/client/compute.go
@@ -0,0 +1,21 @@
+package oci
+
+// ComputeClient is a client for the OCI Compute API.
+type ComputeClient struct {
+ BaseURL string
+ Instances *InstanceService
+ Images *ImageService
+ VNICAttachments *VNICAttachmentService
+ VNICs *VNICService
+}
+
+// NewComputeClient creates a new client for communicating with the OCI
+// Compute API.
+func NewComputeClient(s *baseClient) *ComputeClient {
+ return &ComputeClient{
+ Instances: NewInstanceService(s),
+ Images: NewImageService(s),
+ VNICAttachments: NewVNICAttachmentService(s),
+ VNICs: NewVNICService(s),
+ }
+}
diff --git a/builder/oracle/oci/client/config.go b/builder/oracle/oci/client/config.go
new file mode 100644
index 000000000..580cd9f77
--- /dev/null
+++ b/builder/oracle/oci/client/config.go
@@ -0,0 +1,240 @@
+package oci
+
+import (
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "os"
+
+ "github.com/go-ini/ini"
+ "github.com/mitchellh/go-homedir"
+)
+
+// Config API authentication and target configuration
+type Config struct {
+ // User OCID e.g. ocid1.user.oc1..aaaaaaaadcshyehbkvxl7arse3lv7z5oknexjgfhnhwidtugsxhlm4247
+ User string `ini:"user"`
+
+ // User's Tenancy OCID e.g. ocid1.tenancy.oc1..aaaaaaaagtgvshv6opxzjyzkupkt64ymd32n6kbomadanpcg43d
+ Tenancy string `ini:"tenancy"`
+
+ // Bare metal region identifier (e.g. us-phoenix-1)
+ Region string `ini:"region"`
+
+ // Hex key fingerprint (e.g. b5:a0:62:57:28:0d:fd:c9:59:16:eb:d4:51:9f:70:e4)
+ Fingerprint string `ini:"fingerprint"`
+
+ // Path to OCI config file (e.g. ~/.oci/config)
+ KeyFile string `ini:"key_file"`
+
+ // Passphrase used for the key, if it is encrypted.
+ PassPhrase string `ini:"pass_phrase"`
+
+ // Private key (loaded via LoadPrivateKey or ParsePrivateKey)
+ Key *rsa.PrivateKey
+
+ // Used to override base API URL.
+ baseURL string
+}
+
+// getBaseURL returns either the specified base URL or builds the appropriate
+// URL based on service, region, and API version.
+func (c *Config) getBaseURL(service string) string {
+ if c.baseURL != "" {
+ return c.baseURL
+ }
+ return fmt.Sprintf(baseURLPattern, service, c.Region, apiVersion)
+}
+
+// LoadConfigsFromFile loads all oracle oci configurations from a file
+// (generally ~/.oci/config).
+func LoadConfigsFromFile(path string) (map[string]*Config, error) {
+ if _, err := os.Stat(path); err != nil {
+ return nil, fmt.Errorf("Oracle OCI config file is missing: %s", path)
+ }
+
+ cfgFile, err := ini.Load(path)
+ if err != nil {
+ err := fmt.Errorf("Failed to parse config file %s: %s", path, err.Error())
+ return nil, err
+ }
+
+ configs := make(map[string]*Config)
+
+ // Load DEFAULT section to populate defaults for all other configs
+ config, err := loadConfigSection(cfgFile, "DEFAULT", nil)
+ if err != nil {
+ return nil, err
+ }
+ configs["DEFAULT"] = config
+
+ // Load other sections.
+ for _, sectionName := range cfgFile.SectionStrings() {
+ if sectionName == "DEFAULT" {
+ continue
+ }
+
+ // Map to Config struct with defaults from DEFAULT section.
+ config, err := loadConfigSection(cfgFile, sectionName, configs["DEFAULT"])
+ if err != nil {
+ return nil, err
+ }
+ configs[sectionName] = config
+ }
+
+ return configs, nil
+}
+
+// Loads an individual Config object from a ini.Section in the Oracle OCI config
+// file.
+func loadConfigSection(f *ini.File, sectionName string, config *Config) (*Config, error) {
+ if config == nil {
+ config = &Config{}
+ }
+
+ section, err := f.GetSection(sectionName)
+ if err != nil {
+ return nil, fmt.Errorf("Config file does not contain a %s section", sectionName)
+ }
+
+ if err := section.MapTo(config); err != nil {
+ return nil, err
+ }
+
+ config.Key, err = LoadPrivateKey(config)
+ if err != nil {
+ return nil, err
+ }
+
+ return config, err
+}
+
+// LoadPrivateKey loads private key from disk and parses it.
+func LoadPrivateKey(config *Config) (*rsa.PrivateKey, error) {
+ // Expand '~' to $HOME
+ path, err := homedir.Expand(config.KeyFile)
+ if err != nil {
+ return nil, err
+ }
+
+ // Read and parse API signing key
+ keyContent, err := ioutil.ReadFile(path)
+ if err != nil {
+ return nil, err
+ }
+ key, err := ParsePrivateKey(keyContent, []byte(config.PassPhrase))
+
+ return key, err
+}
+
+// ParsePrivateKey parses a PEM encoded array of bytes into an rsa.PrivateKey.
+// Attempts to decrypt the PEM encoded array of bytes with the given password
+// if the PEM encoded byte array is encrypted.
+func ParsePrivateKey(content, password []byte) (*rsa.PrivateKey, error) {
+ keyBlock, _ := pem.Decode(content)
+
+ if keyBlock == nil {
+ return nil, errors.New("could not decode PEM private key")
+ }
+
+ var der []byte
+ var err error
+ if x509.IsEncryptedPEMBlock(keyBlock) {
+ if len(password) < 1 {
+ return nil, errors.New("encrypted private key but no pass phrase provided")
+ }
+ der, err = x509.DecryptPEMBlock(keyBlock, password)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ der = keyBlock.Bytes
+ }
+
+ if key, err := x509.ParsePKCS1PrivateKey(der); err == nil {
+ return key, nil
+ }
+
+ key, err := x509.ParsePKCS8PrivateKey(der)
+ if err == nil {
+ switch key := key.(type) {
+ case *rsa.PrivateKey:
+ return key, nil
+ default:
+ return nil, errors.New("Private key is not an RSA private key")
+ }
+ }
+ return nil, fmt.Errorf("Failed to parse private key :%s", err)
+}
+
+// BaseTestConfig creates the base (DEFAULT) config including a temporary key
+// file.
+// NOTE: Caller is responsible for removing temporary key file.
+func BaseTestConfig() (*ini.File, *os.File, error) {
+ keyFile, err := generateRSAKeyFile()
+ if err != nil {
+ return nil, keyFile, err
+ }
+ // Build ini
+ cfg := ini.Empty()
+ section, _ := cfg.NewSection("DEFAULT")
+ section.NewKey("region", "us-phoenix-1")
+ section.NewKey("tenancy", "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
+ section.NewKey("user", "ocid1.user.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
+ section.NewKey("fingerprint", "3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55")
+ section.NewKey("key_file", keyFile.Name())
+
+ return cfg, keyFile, nil
+}
+
+// WriteTestConfig writes a ini.File to a temporary file for use in unit tests.
+// NOTE: Caller is responsible for removing temporary file.
+func WriteTestConfig(cfg *ini.File) (*os.File, error) {
+ confFile, err := ioutil.TempFile("", "config_file")
+ if err != nil {
+ return nil, err
+ }
+
+ _, err = cfg.WriteTo(confFile)
+ if err != nil {
+ os.Remove(confFile.Name())
+ return nil, err
+ }
+
+ return confFile, nil
+}
+
+// generateRSAKeyFile generates an RSA key file for use in unit tests.
+// NOTE: The caller is responsible for deleting the temporary file.
+func generateRSAKeyFile() (*os.File, error) {
+ // Create temporary file for the key
+ f, err := ioutil.TempFile("", "key")
+ if err != nil {
+ return nil, err
+ }
+
+ // Generate key
+ priv, err := rsa.GenerateKey(rand.Reader, 2014)
+ if err != nil {
+ return nil, err
+ }
+
+ // ASN.1 DER encoded form
+ privDer := x509.MarshalPKCS1PrivateKey(priv)
+ privBlk := pem.Block{
+ Type: "RSA PRIVATE KEY",
+ Headers: nil,
+ Bytes: privDer,
+ }
+
+ // Write the key out
+ if _, err := f.Write(pem.EncodeToMemory(&privBlk)); err != nil {
+ return nil, err
+ }
+
+ return f, nil
+}
diff --git a/builder/oracle/oci/client/config_test.go b/builder/oracle/oci/client/config_test.go
new file mode 100644
index 000000000..08f0b806d
--- /dev/null
+++ b/builder/oracle/oci/client/config_test.go
@@ -0,0 +1,283 @@
+package oci
+
+import (
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "encoding/asn1"
+ "encoding/pem"
+ "os"
+ "reflect"
+ "strings"
+ "testing"
+)
+
+func TestNewConfigMissingFile(t *testing.T) {
+ // WHEN
+ _, err := LoadConfigsFromFile("some/invalid/path")
+
+ // THEN
+
+ if err == nil {
+ t.Error("Expected missing file error")
+ }
+}
+
+func TestNewConfigDefaultOnly(t *testing.T) {
+ // GIVEN
+
+ // Get DEFAULT config
+ cfg, keyFile, err := BaseTestConfig()
+ defer os.Remove(keyFile.Name())
+
+ // Write test config to file
+ f, err := WriteTestConfig(cfg)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(f.Name()) // clean up
+
+ // WHEN
+
+ // Load configs
+ cfgs, err := LoadConfigsFromFile(f.Name())
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ // THEN
+
+ if _, ok := cfgs["DEFAULT"]; !ok {
+ t.Fatal("Expected DEFAULT config to exist in map")
+ }
+}
+
+func TestNewConfigDefaultsPopulated(t *testing.T) {
+ // GIVEN
+
+ // Get DEFAULT config
+ cfg, keyFile, err := BaseTestConfig()
+ defer os.Remove(keyFile.Name())
+
+ admin := cfg.Section("ADMIN")
+ admin.NewKey("user", "ocid1.user.oc1..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")
+ admin.NewKey("fingerprint", "11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11")
+
+ // Write test config to file
+ f, err := WriteTestConfig(cfg)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(f.Name()) // clean up
+
+ // WHEN
+
+ cfgs, err := LoadConfigsFromFile(f.Name())
+ adminConfig, ok := cfgs["ADMIN"]
+
+ // THEN
+
+ if !ok {
+ t.Fatal("Expected ADMIN config to exist in map")
+ }
+
+ if adminConfig.Region != "us-phoenix-1" {
+ t.Errorf("Expected 'us-phoenix-1', got '%s'", adminConfig.Region)
+ }
+}
+
+func TestNewConfigDefaultsOverridden(t *testing.T) {
+ // GIVEN
+
+ // Get DEFAULT config
+ cfg, keyFile, err := BaseTestConfig()
+ defer os.Remove(keyFile.Name())
+
+ admin := cfg.Section("ADMIN")
+ admin.NewKey("user", "ocid1.user.oc1..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")
+ admin.NewKey("fingerprint", "11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11")
+
+ // Write test config to file
+ f, err := WriteTestConfig(cfg)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(f.Name()) // clean up
+
+ // WHEN
+
+ cfgs, err := LoadConfigsFromFile(f.Name())
+ adminConfig, ok := cfgs["ADMIN"]
+
+ // THEN
+
+ if !ok {
+ t.Fatal("Expected ADMIN config to exist in map")
+ }
+
+ if adminConfig.Fingerprint != "11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11" {
+ t.Errorf("Expected fingerprint '11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11', got '%s'",
+ adminConfig.Fingerprint)
+ }
+}
+
+func TestParseEncryptedPrivateKeyValidPassword(t *testing.T) {
+ // Generate private key
+ priv, err := rsa.GenerateKey(rand.Reader, 2014)
+ if err != nil {
+ t.Fatalf("Unexpected generating RSA key: %+v", err)
+ }
+ publicKey := priv.PublicKey
+
+ // ASN.1 DER encoded form
+ privDer := x509.MarshalPKCS1PrivateKey(priv)
+
+ blockType := "RSA PRIVATE KEY"
+ password := []byte("password")
+ cipherType := x509.PEMCipherAES256
+
+ // Encrypt priv with password
+ encryptedPEMBlock, err := x509.EncryptPEMBlock(
+ rand.Reader,
+ blockType,
+ privDer,
+ password,
+ cipherType)
+ if err != nil {
+ t.Fatalf("Unexpected error encryting PEM block: %+v", err)
+ }
+
+ // Parse private key
+ key, err := ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), password)
+ if err != nil {
+ t.Fatalf("unexpected error: %+v", err)
+ }
+
+ // Check we get the same key back
+ if !reflect.DeepEqual(publicKey, key.PublicKey) {
+ t.Errorf("expected public key of encrypted and decrypted key to match")
+ }
+}
+
+func TestParseEncryptedPrivateKeyPKCS8(t *testing.T) {
+ // Generate private key
+ priv, err := rsa.GenerateKey(rand.Reader, 2014)
+ if err != nil {
+ t.Fatalf("Unexpected generating RSA key: %+v", err)
+ }
+ publicKey := priv.PublicKey
+
+ // Implements x509.MarshalPKCS8PrivateKey which is not included in the
+ // standard library.
+ pkey := struct {
+ Version int
+ PrivateKeyAlgorithm []asn1.ObjectIdentifier
+ PrivateKey []byte
+ }{
+ Version: 0,
+ PrivateKeyAlgorithm: []asn1.ObjectIdentifier{{1, 2, 840, 113549, 1, 1, 1}},
+ PrivateKey: x509.MarshalPKCS1PrivateKey(priv),
+ }
+ privDer, err := asn1.Marshal(pkey)
+ if err != nil {
+ t.Fatalf("Unexpected marshaling RSA key: %+v", err)
+ }
+
+ blockType := "RSA PRIVATE KEY"
+ password := []byte("password")
+ cipherType := x509.PEMCipherAES256
+
+ // Encrypt priv with password
+ encryptedPEMBlock, err := x509.EncryptPEMBlock(
+ rand.Reader,
+ blockType,
+ privDer,
+ password,
+ cipherType)
+ if err != nil {
+ t.Fatalf("Unexpected error encryting PEM block: %+v", err)
+ }
+
+ // Parse private key
+ key, err := ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), password)
+ if err != nil {
+ t.Fatalf("unexpected error: %+v", err)
+ }
+
+ // Check we get the same key back
+ if !reflect.DeepEqual(publicKey, key.PublicKey) {
+ t.Errorf("expected public key of encrypted and decrypted key to match")
+ }
+}
+
+func TestParseEncryptedPrivateKeyInvalidPassword(t *testing.T) {
+ // Generate private key
+ priv, err := rsa.GenerateKey(rand.Reader, 2014)
+ if err != nil {
+ t.Fatalf("Unexpected generating RSA key: %+v", err)
+ }
+
+ // ASN.1 DER encoded form
+ privDer := x509.MarshalPKCS1PrivateKey(priv)
+
+ blockType := "RSA PRIVATE KEY"
+ password := []byte("password")
+ cipherType := x509.PEMCipherAES256
+
+ // Encrypt priv with password
+ encryptedPEMBlock, err := x509.EncryptPEMBlock(
+ rand.Reader,
+ blockType,
+ privDer,
+ password,
+ cipherType)
+ if err != nil {
+ t.Fatalf("Unexpected error encrypting PEM block: %+v", err)
+ }
+
+ // Parse private key (with wrong password)
+ _, err = ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), []byte("foo"))
+ if err == nil {
+ t.Fatalf("Expected error, got nil")
+ }
+
+ if !strings.Contains(err.Error(), "decryption password incorrect") {
+ t.Errorf("Expected error to contain 'decryption password incorrect', got %+v", err)
+ }
+}
+
+func TestParseEncryptedPrivateKeyInvalidNoPassword(t *testing.T) {
+ // Generate private key
+ priv, err := rsa.GenerateKey(rand.Reader, 2014)
+ if err != nil {
+ t.Fatalf("Unexpected generating RSA key: %+v", err)
+ }
+
+ // ASN.1 DER encoded form
+ privDer := x509.MarshalPKCS1PrivateKey(priv)
+
+ blockType := "RSA PRIVATE KEY"
+ password := []byte("password")
+ cipherType := x509.PEMCipherAES256
+
+ // Encrypt priv with password
+ encryptedPEMBlock, err := x509.EncryptPEMBlock(
+ rand.Reader,
+ blockType,
+ privDer,
+ password,
+ cipherType)
+ if err != nil {
+ t.Fatalf("Unexpected error encrypting PEM block: %+v", err)
+ }
+
+ // Parse private key (with wrong password)
+ _, err = ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), []byte{})
+ if err == nil {
+ t.Fatalf("Expected error, got nil")
+ }
+
+ if !strings.Contains(err.Error(), "no pass phrase provided") {
+ t.Errorf("Expected error to contain 'no pass phrase provided', got %+v", err)
+ }
+}
diff --git a/builder/oracle/oci/client/error.go b/builder/oracle/oci/client/error.go
new file mode 100644
index 000000000..a97112f81
--- /dev/null
+++ b/builder/oracle/oci/client/error.go
@@ -0,0 +1,27 @@
+package oci
+
+import "fmt"
+
+// APIError encapsulates an error returned from the API
+type APIError struct {
+ Code string `json:"code"`
+ Message string `json:"message"`
+}
+
+func (e APIError) Error() string {
+ return fmt.Sprintf("OCI: [%s] '%s'", e.Code, e.Message)
+}
+
+// firstError is a helper function to work out which error to return from calls
+// to the API.
+func firstError(err error, apiError *APIError) error {
+ if err != nil {
+ return err
+ }
+
+ if apiError != nil && len(apiError.Code) > 0 {
+ return apiError
+ }
+
+ return nil
+}
diff --git a/builder/oracle/oci/client/image.go b/builder/oracle/oci/client/image.go
new file mode 100644
index 000000000..802b4650c
--- /dev/null
+++ b/builder/oracle/oci/client/image.go
@@ -0,0 +1,122 @@
+package oci
+
+import (
+ "time"
+)
+
+// ImageService enables communicating with the OCI compute API's instance
+// related endpoints.
+type ImageService struct {
+ client *baseClient
+}
+
+// NewImageService creates a new ImageService for communicating with the
+// OCI compute API's instance related endpoints.
+func NewImageService(s *baseClient) *ImageService {
+ return &ImageService{
+ client: s.New().Path("images/"),
+ }
+}
+
+// Image details a OCI boot disk image.
+type Image struct {
+ // The OCID of the image originally used to launch the instance.
+ BaseImageID string `json:"baseImageId,omitempty"`
+
+ // The OCID of the compartment containing the instance you want to use
+ // as the basis for the image.
+ CompartmentID string `json:"compartmentId"`
+
+ // Whether instances launched with this image can be used to create new
+ // images.
+ CreateImageAllowed bool `json:"createImageAllowed"`
+
+ // A user-friendly name for the image. It does not have to be unique,
+ // and it's changeable. You cannot use an Oracle-provided image name
+ // as a custom image name.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // The OCID of the image.
+ ID string `json:"id"`
+
+ // Current state of the image. Allowed values are:
+ // - PROVISIONING
+ // - AVAILABLE
+ // - DISABLED
+ // - DELETED
+ LifecycleState string `json:"lifecycleState"`
+
+ // The image's operating system (e.g. Oracle Linux).
+ OperatingSystem string `json:"operatingSystem"`
+
+ // The image's operating system version (e.g. 7.2).
+ OperatingSystemVersion string `json:"operatingSystemVersion"`
+
+ // The date and time the image was created.
+ TimeCreated time.Time `json:"timeCreated"`
+}
+
+// GetImageParams are the paramaters available when communicating with the
+// GetImage API endpoint.
+type GetImageParams struct {
+ ID string `url:"imageId"`
+}
+
+// Get returns a single Image
+func (s *ImageService) Get(params *GetImageParams) (Image, error) {
+ image := Image{}
+ e := &APIError{}
+
+ _, err := s.client.New().Get(params.ID).Receive(&image, e)
+ err = firstError(err, e)
+
+ return image, err
+}
+
+// CreateImageParams are the parameters available when communicating with
+// the CreateImage API endpoint.
+type CreateImageParams struct {
+ CompartmentID string `json:"compartmentId"`
+ DisplayName string `json:"displayName,omitempty"`
+ InstanceID string `json:"instanceId"`
+}
+
+// Create creates a new custom image based on a running compute instance. It
+// does *not* wait for the imaging process to finish.
+func (s *ImageService) Create(params *CreateImageParams) (Image, error) {
+ image := Image{}
+ e := &APIError{}
+
+ _, err := s.client.New().Post("").SetBody(params).Receive(&image, &e)
+ err = firstError(err, e)
+
+ return image, err
+}
+
+// GetResourceState GETs the LifecycleState of the given image id.
+func (s *ImageService) GetResourceState(id string) (string, error) {
+ image, err := s.Get(&GetImageParams{ID: id})
+ if err != nil {
+ return "", err
+ }
+ return image.LifecycleState, nil
+
+}
+
+// DeleteImageParams are the parameters available when communicating with
+// the DeleteImage API endpoint.
+type DeleteImageParams struct {
+ ID string `url:"imageId"`
+}
+
+// Delete deletes an existing custom image.
+// NOTE: Deleting an image results in the API endpoint returning 404 on
+// subsequent calls. As such deletion can't be waited on with a Waiter.
+func (s *ImageService) Delete(params *DeleteImageParams) error {
+ e := &APIError{}
+
+ _, err := s.client.New().Delete(params.ID).SetBody(params).Receive(nil, e)
+ err = firstError(err, e)
+
+ return err
+}
diff --git a/builder/oracle/oci/client/image_test.go b/builder/oracle/oci/client/image_test.go
new file mode 100644
index 000000000..ef55cc552
--- /dev/null
+++ b/builder/oracle/oci/client/image_test.go
@@ -0,0 +1,115 @@
+package oci
+
+import (
+ "fmt"
+ "net/http"
+ "reflect"
+ "testing"
+)
+
+func TestGetImage(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.image.oc1.phx.a"
+ path := fmt.Sprintf("/images/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, `{"id":"%s"}`, id)
+ })
+
+ image, err := client.Compute.Images.Get(&GetImageParams{ID: id})
+ if err != nil {
+ t.Errorf("Client.Compute.Images.Get() returned error: %v", err)
+ }
+
+ want := Image{ID: id}
+
+ if !reflect.DeepEqual(image, want) {
+ t.Errorf("Client.Compute.Images.Get() returned %+v, want %+v", image, want)
+ }
+}
+
+func TestCreateImage(t *testing.T) {
+ setup()
+ defer teardown()
+
+ mux.HandleFunc("/images/", func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, `{"displayName": "go-oci test"}`)
+ })
+
+ params := &CreateImageParams{
+ CompartmentID: "ocid1.compartment.oc1..a",
+ DisplayName: "go-oci test image",
+ InstanceID: "ocid1.image.oc1.phx.a",
+ }
+
+ image, err := client.Compute.Images.Create(params)
+ if err != nil {
+ t.Errorf("Client.Compute.Images.Create() returned error: %v", err)
+ }
+
+ want := Image{DisplayName: "go-oci test"}
+
+ if !reflect.DeepEqual(image, want) {
+ t.Errorf("Client.Compute.Images.Create() returned %+v, want %+v", image, want)
+ }
+}
+
+func TestImageGetResourceState(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.image.oc1.phx.a"
+ path := fmt.Sprintf("/images/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, `{"LifecycleState": "AVAILABLE"}`)
+ })
+
+ state, err := client.Compute.Images.GetResourceState(id)
+ if err != nil {
+ t.Errorf("Client.Compute.Images.GetResourceState() returned error: %v", err)
+ }
+
+ want := "AVAILABLE"
+ if state != want {
+ t.Errorf("Client.Compute.Images.GetResourceState() returned %+v, want %+v", state, want)
+ }
+}
+
+func TestImageGetResourceStateInvalidID(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.image.oc1.phx.a"
+ path := fmt.Sprintf("/images/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNotFound)
+ fmt.Fprint(w, `{"code": "NotAuthorizedOrNotFound"}`)
+ })
+
+ state, err := client.Compute.Images.GetResourceState(id)
+ if err == nil {
+ t.Errorf("Client.Compute.Images.GetResourceState() expected error, got %v", state)
+ }
+
+ want := &APIError{Code: "NotAuthorizedOrNotFound"}
+ if !reflect.DeepEqual(err, want) {
+ t.Errorf("Client.Compute.Images.GetResourceState() errored with %+v, want %+v", err, want)
+ }
+}
+
+func TestDeleteInstance(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.image.oc1.phx.a"
+ path := fmt.Sprintf("/images/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNoContent)
+ })
+
+ err := client.Compute.Images.Delete(&DeleteImageParams{ID: id})
+ if err != nil {
+ t.Errorf("Client.Compute.Images.Delete() returned error: %v", err)
+ }
+}
diff --git a/builder/oracle/oci/client/instance.go b/builder/oracle/oci/client/instance.go
new file mode 100644
index 000000000..30cdbd50b
--- /dev/null
+++ b/builder/oracle/oci/client/instance.go
@@ -0,0 +1,129 @@
+package oci
+
+import (
+ "time"
+)
+
+// InstanceService enables communicating with the OCI compute API's instance
+// related endpoints.
+type InstanceService struct {
+ client *baseClient
+}
+
+// NewInstanceService creates a new InstanceService for communicating with the
+// OCI compute API's instance related endpoints.
+func NewInstanceService(s *baseClient) *InstanceService {
+ return &InstanceService{
+ client: s.New().Path("instances/"),
+ }
+}
+
+// Instance details a OCI compute instance.
+type Instance struct {
+ // The Availability Domain the instance is running in.
+ AvailabilityDomain string `json:"availabilityDomain"`
+
+ // The OCID of the compartment that contains the instance.
+ CompartmentID string `json:"compartmentId"`
+
+ // A user-friendly name. Does not have to be unique, and it's changeable.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // The OCID of the instance.
+ ID string `json:"id"`
+
+ // The image used to boot the instance.
+ ImageID string `json:"imageId,omitempty"`
+
+ // The current state of the instance. Allowed values:
+ // - PROVISIONING
+ // - RUNNING
+ // - STARTING
+ // - STOPPING
+ // - STOPPED
+ // - CREATING_IMAGE
+ // - TERMINATING
+ // - TERMINATED
+ LifecycleState string `json:"lifecycleState"`
+
+ // Custom metadata that you provide.
+ Metadata map[string]string `json:"metadata,omitempty"`
+
+ // The region that contains the Availability Domain the instance is running in.
+ Region string `json:"region"`
+
+ // The shape of the instance. The shape determines the number of CPUs
+ // and the amount of memory allocated to the instance.
+ Shape string `json:"shape"`
+
+ // The date and time the instance was created.
+ TimeCreated time.Time `json:"timeCreated"`
+}
+
+// GetInstanceParams are the paramaters available when communicating with the
+// GetInstance API endpoint.
+type GetInstanceParams struct {
+ ID string `url:"instanceId,omitempty"`
+}
+
+// Get returns a single Instance
+func (s *InstanceService) Get(params *GetInstanceParams) (Instance, error) {
+ instance := Instance{}
+ e := &APIError{}
+
+ _, err := s.client.New().Get(params.ID).Receive(&instance, e)
+ err = firstError(err, e)
+
+ return instance, err
+}
+
+// LaunchInstanceParams are the parameters available when communicating with
+// the LunchInstance API endpoint.
+type LaunchInstanceParams struct {
+ AvailabilityDomain string `json:"availabilityDomain,omitempty"`
+ CompartmentID string `json:"compartmentId,omitempty"`
+ DisplayName string `json:"displayName,omitempty"`
+ ImageID string `json:"imageId,omitempty"`
+ Metadata map[string]string `json:"metadata,omitempty"`
+ OPCiPXEScript string `json:"opcIpxeScript,omitempty"`
+ Shape string `json:"shape,omitempty"`
+ SubnetID string `json:"subnetId,omitempty"`
+}
+
+// Launch creates a new OCI compute instance. It does *not* wait for the
+// instance to boot.
+func (s *InstanceService) Launch(params *LaunchInstanceParams) (Instance, error) {
+ instance := &Instance{}
+ e := &APIError{}
+
+ _, err := s.client.New().Post("").SetBody(params).Receive(instance, e)
+ err = firstError(err, e)
+
+ return *instance, err
+}
+
+// TerminateInstanceParams are the parameters available when communicating with
+// the TerminateInstance API endpoint.
+type TerminateInstanceParams struct {
+ ID string `url:"instanceId,omitempty"`
+}
+
+// Terminate terminates a running OCI compute instance.
+// instance to boot.
+func (s *InstanceService) Terminate(params *TerminateInstanceParams) error {
+ e := &APIError{}
+
+ _, err := s.client.New().Delete(params.ID).SetBody(params).Receive(nil, e)
+ err = firstError(err, e)
+
+ return err
+}
+
+// GetResourceState GETs the LifecycleState of the given instance id.
+func (s *InstanceService) GetResourceState(id string) (string, error) {
+ instance, err := s.Get(&GetInstanceParams{ID: id})
+ if err != nil {
+ return "", err
+ }
+ return instance.LifecycleState, nil
+}
diff --git a/builder/oracle/oci/client/instance_test.go b/builder/oracle/oci/client/instance_test.go
new file mode 100644
index 000000000..e45b707af
--- /dev/null
+++ b/builder/oracle/oci/client/instance_test.go
@@ -0,0 +1,96 @@
+package oci
+
+import (
+ "fmt"
+ "net/http"
+ "reflect"
+ "testing"
+)
+
+func TestGetInstance(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.instance.oc1.phx.a"
+ path := fmt.Sprintf("/instances/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, `{"id":"%s"}`, id)
+ })
+
+ instance, err := client.Compute.Instances.Get(&GetInstanceParams{ID: id})
+ if err != nil {
+ t.Errorf("Client.Compute.Instances.Get() returned error: %v", err)
+ }
+
+ want := Instance{ID: id}
+
+ if !reflect.DeepEqual(instance, want) {
+ t.Errorf("Client.Compute.Instances.Get() returned %+v, want %+v", instance, want)
+ }
+}
+
+func TestLaunchInstance(t *testing.T) {
+ setup()
+ defer teardown()
+
+ mux.HandleFunc("/instances/", func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, `{"displayName": "go-oci test"}`)
+ })
+
+ params := &LaunchInstanceParams{
+ AvailabilityDomain: "aaaa:PHX-AD-1",
+ CompartmentID: "ocid1.compartment.oc1..a",
+ DisplayName: "go-oci test",
+ ImageID: "ocid1.image.oc1.phx.a",
+ Shape: "VM.Standard1.1",
+ SubnetID: "ocid1.subnet.oc1.phx.a",
+ }
+
+ instance, err := client.Compute.Instances.Launch(params)
+ if err != nil {
+ t.Errorf("Client.Compute.Instances.Launch() returned error: %v", err)
+ }
+
+ want := Instance{DisplayName: "go-oci test"}
+
+ if !reflect.DeepEqual(instance, want) {
+ t.Errorf("Client.Compute.Instances.Launch() returned %+v, want %+v", instance, want)
+ }
+}
+
+func TestTerminateInstance(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.instance.oc1.phx.a"
+ path := fmt.Sprintf("/instances/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusNoContent)
+ })
+
+ err := client.Compute.Instances.Terminate(&TerminateInstanceParams{ID: id})
+ if err != nil {
+ t.Errorf("Client.Compute.Instances.Terminate() returned error: %v", err)
+ }
+}
+
+func TestInstanceGetResourceState(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.instance.oc1.phx.a"
+ path := fmt.Sprintf("/instances/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, `{"LifecycleState": "RUNNING"}`)
+ })
+
+ state, err := client.Compute.Instances.GetResourceState(id)
+ if err != nil {
+ t.Errorf("Client.Compute.Instances.GetResourceState() returned error: %v", err)
+ }
+
+ want := "RUNNING"
+ if state != want {
+ t.Errorf("Client.Compute.Instances.GetResourceState() returned %+v, want %+v", state, want)
+ }
+}
diff --git a/builder/oracle/oci/client/transport.go b/builder/oracle/oci/client/transport.go
new file mode 100644
index 000000000..79da20509
--- /dev/null
+++ b/builder/oracle/oci/client/transport.go
@@ -0,0 +1,116 @@
+package oci
+
+import (
+ "bytes"
+ "crypto"
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "net/http"
+ "strconv"
+ "strings"
+ "time"
+)
+
+type nopCloser struct {
+ io.Reader
+}
+
+func (nopCloser) Close() error {
+ return nil
+}
+
+// Transport adds OCI signature authentication to each outgoing request.
+type Transport struct {
+ transport http.RoundTripper
+ config *Config
+}
+
+// NewTransport creates a new Transport to add OCI signature authentication
+// to each outgoing request.
+func NewTransport(transport http.RoundTripper, config *Config) *Transport {
+ return &Transport{
+ transport: transport,
+ config: config,
+ }
+}
+
+func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
+ var buf *bytes.Buffer
+
+ if req.Body != nil {
+ buf = new(bytes.Buffer)
+ buf.ReadFrom(req.Body)
+ req.Body = nopCloser{buf}
+ }
+ if req.Header.Get("date") == "" {
+ req.Header.Set("date", time.Now().UTC().Format(http.TimeFormat))
+ }
+ if req.Header.Get("content-type") == "" {
+ req.Header.Set("content-type", "application/json")
+ }
+ if req.Header.Get("accept") == "" {
+ req.Header.Set("accept", "application/json")
+ }
+ if req.Header.Get("host") == "" {
+ req.Header.Set("host", req.URL.Host)
+ }
+
+ var signheaders []string
+ if (req.Method == "PUT" || req.Method == "POST") && buf != nil {
+ signheaders = []string{"(request-target)", "host", "date",
+ "content-length", "content-type", "x-content-sha256"}
+
+ if req.Header.Get("content-length") == "" {
+ req.Header.Set("content-length", strconv.Itoa(buf.Len()))
+ }
+
+ hasher := sha256.New()
+ hasher.Write(buf.Bytes())
+ hash := hasher.Sum(nil)
+ req.Header.Set("x-content-sha256", base64.StdEncoding.EncodeToString(hash))
+ } else {
+ signheaders = []string{"date", "host", "(request-target)"}
+ }
+
+ var signbuffer bytes.Buffer
+ for idx, header := range signheaders {
+ signbuffer.WriteString(header)
+ signbuffer.WriteString(": ")
+
+ if header == "(request-target)" {
+ signbuffer.WriteString(strings.ToLower(req.Method))
+ signbuffer.WriteString(" ")
+ signbuffer.WriteString(req.URL.RequestURI())
+ } else {
+ signbuffer.WriteString(req.Header.Get(header))
+ }
+
+ if idx < len(signheaders)-1 {
+ signbuffer.WriteString("\n")
+ }
+ }
+
+ h := sha256.New()
+ h.Write(signbuffer.Bytes())
+ digest := h.Sum(nil)
+ signature, err := rsa.SignPKCS1v15(rand.Reader, t.config.Key, crypto.SHA256, digest)
+ if err != nil {
+ return nil, err
+ }
+
+ authHeader := fmt.Sprintf("Signature headers=\"%s\","+
+ "keyId=\"%s/%s/%s\","+
+ "algorithm=\"rsa-sha256\","+
+ "signature=\"%s\","+
+ "version=\"1\"",
+ strings.Join(signheaders, " "),
+ t.config.Tenancy, t.config.User, t.config.Fingerprint,
+ base64.StdEncoding.EncodeToString(signature))
+ req.Header.Add("Authorization", authHeader)
+
+ return t.transport.RoundTrip(req)
+}
diff --git a/builder/oracle/oci/client/transport_test.go b/builder/oracle/oci/client/transport_test.go
new file mode 100644
index 000000000..2299f3a0e
--- /dev/null
+++ b/builder/oracle/oci/client/transport_test.go
@@ -0,0 +1,156 @@
+package oci
+
+import (
+ "net/http"
+ "strings"
+ "testing"
+)
+
+const testKey = `-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAyLnyzmYj0dZuDo2nclIdEyLZrFZLtw5xFldWpCUl5W3SxKDL
+iIgwxpSO75Yf++Rzqc5j6S5bpIrdca6AwVXCNmjjxMPO7vLLm4l4IUOZMv5FqKaC
+I2plFz9uBkzGscnYnMbsDA430082E07lYpNv1xy8JwpbrIsqIMh4XCKci/Od5sLR
+kEicmOpQK42FGRTQjjmQoWtv+9XED+vYTRL0AxQEC/6i/E7yssFXZ+fpHSKWeKTQ
+K/1Fc4pZ1zNzJcDXGuweISx/QMLz78TAPH5OBq/EQzHKSpKvfnWFRyBHne8pwuN8
+8wzbbD+/7OFjz28jNSERVJvfYe3X1k69IWMNGwIDAQABAoIBAQCZhcdU38AzxSrG
+DMfuYymDslsEObiNWQlbig9lWlhCwx26cDVbxrZvm747NvpdgVyJmqbF+UP0dJVs
+Voh51qrFTLIwk4bZMXBTFPCBmJ865knG9RuCFOUew8/WF7C82GHJf0eY7OL7xpDY
+cbZ2D8gxofOydHSrYoElM88CwSI00xPCbBKEMrBO94oXC8yfp2bmV6bNhVXwFDEM
+qda7M6jVAsBrTOzxUF5VdUUU/MLsu2cCk/ap1zer2Bml9Afk1bMeGJ3XDQgol0pS
+CLxaGczpSNVMF9+pjA5sFHR5rmcl0b/kC9HsgOJGhLOimtS94O64dSdWifgsjf6+
+fhT2SMiRAoGBAOUDwkdzNqQfvS+qrP2ULpB4vt7MZ70rDGmyMDLZ1VWgcm2cDIad
+b7MkFG6GCa48mKkFXK9mOPyq8ELoTjZo2p+relEqf49BpaNxr+cp11pX7g0AkzCa
+a8LwdOOUW/poqYl2xLuw9Rz6ky6ybzatMvCwpQCwnbAdABIVxz4oQKHpAoGBAOBg
+3uYC/ynGdF9gJTfdS5XPYoLcKKRRspBZrvvDHaWyBnanm5KYwDAZPzLQMqcpyPeo
+5xgwMmtNlc6lKKyGkhSLNCV+eO3yAx1h/cq7ityvMS7u6o5sq+/bvtEnbUPYbEtk
+AhVD7/w5Yyzzi4beiQxDKe0q1mvUAH56aGqJivBjAoGBALmUMTPbDhUzTwg4Y1Rd
+ZtpVrj43H31wS+++oEYktTZc/T0LLi9Llr9w5kmlvmR94CtfF/ted6FwF5/wRajb
+kQXAXC83pAR/au0mbCeDhWpFRLculxfUmqxuVBozF9G0TGYDY2rA+++OsgQuPebt
+tRDL4/nKJQ4Ygf0lvr4EulM5AoGBALoIdyabu3WmfhwJujH8P8wA+ztmUCgVOIio
+YwWIe49C8Er2om1ESqxWcmit6CFi6qY0Gw6Z/2OqGxgPJY8NsBZqaBziJF+cdWqq
+MWMiZXqdopi4LC9T+KZROn9tQhGrYfaL/5IkFti3t/uwHbH/1f8dvKhQCSGzz4kN
+8n7KdTDjAoGAKh8XdIOQlThFK108VT2yp4BGZXEOvWrR19DLbuUzHVrEX+Bd+uFo
+Ruk9iKEH7PSnlRnIvWc1y9qN7fUi5OR3LvQNGlXHyUl6CtmH3/b064bBKudC+XTn
+VBelcIoGpH7Dn9I6pKUFauJz1TSbQCIjYGNqrjyzLtG+lH/gy5q4xs8=
+-----END RSA PRIVATE KEY-----`
+
+type testTarget struct {
+ CapturedReq *http.Request
+ Response *http.Response
+}
+
+func (target *testTarget) RoundTrip(req *http.Request) (*http.Response, error) {
+ target.CapturedReq = req
+ return target.Response, nil
+}
+
+func testReq(method string, url string, body string, headers map[string]string) *http.Request {
+ req, err := http.NewRequest(method, url, strings.NewReader(body))
+ if err != nil {
+ panic(err.Error())
+ }
+
+ for k, v := range headers {
+ req.Header.Add(k, v)
+ }
+ return req
+}
+
+var KnownGoodCases = []struct {
+ name string
+ inputRequest func() *http.Request
+ expectedHeaders map[string]string
+}{
+ {
+ name: "Simple GET",
+ inputRequest: func() *http.Request {
+ return testReq("GET", "https://example.com/", "", map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT"})
+ },
+ expectedHeaders: map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT",
+ "content-type": "application/json",
+ "host": "example.com",
+ "accept": "application/json",
+ "Authorization": "Signature headers=\"date host (request-target)\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"UMw/FImQYZ5JBpfYcR9YN72lhupGl5yS+522NS9glLodU9f4oKRqaocpGdSUSRhhSDKxIx01rV547/HemJ6QqEPaJJuDQPXsGthokWMU2DBGyaMAqhLClgCJiRQMwpg4rdL2tETzkM3wy6UN+I52RYoNSdsnat2ZArCkfl8dIl9ydcwD8/+BqB8d2wyaAIS4iagdPKLAC/Mu9OzyUPOXQhYGYsoEdOowOUkHOlob65PFrlHmKJDdjEF3MDcygEpApItf4iUEloP5bjixAbZEVpj3HLQ5uaPx9m+RsLzYMeO0adE0wOv2YNmwZrExGhXh1BpTU33m5amHeUBxSaG+2A==\",version=\"1\"",
+ },
+ },
+ {
+ name: "Simple PUT request",
+ inputRequest: func() *http.Request {
+ return testReq("PUT", "https://example.com/", "Some Content", map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT"})
+ },
+ expectedHeaders: map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT",
+ "content-type": "application/json",
+ "content-length": "12",
+ "x-content-sha256": "lQ8fsURxamLtHxnwTYqd3MNYadJ4ZB/U9yQBKzu/fXA=",
+ "accept": "application/json",
+ "Authorization": "Signature headers=\"(request-target) host date content-length content-type x-content-sha256\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"FHyPt4PE2HGH+iftzcViB76pCJ2R9+DdTCo1Ss4mH4KHQJdyQtPsCpe6Dc19zie6cRr6dsenk21yYnncic8OwZhII8DULj2//qLFGmgFi84s7LJqMQ/COiP7O9KtCN+U8MMt4PV7ZDsiGFn3/8EUJ1wxYscxSIB19S1NpuEL062JgGfkqxTkTPd7V3Xh1NlmUUtQrAMR3l56k1iV0zXY9Uw0CjWYjueMP0JUmkO7zycYAVBrx7Q8wkmejlyD7yFrAnObyEsMm9cIL9IcruWFHeCHFxRLslw7AoLxibAm2Dc9EROuvCK2UkUp8AFkE+QyYDMrrSm1NLBMWdnYqdickA==\",version=\"1\"",
+ },
+ },
+ {
+ name: "Simple POST request",
+ inputRequest: func() *http.Request {
+ return testReq("POST", "https://example.com/", "Some Content", map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT"})
+ },
+ expectedHeaders: map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT",
+ "content-type": "application/json",
+ "content-length": "12",
+ "x-content-sha256": "lQ8fsURxamLtHxnwTYqd3MNYadJ4ZB/U9yQBKzu/fXA=",
+ "accept": "application/json",
+ "Authorization": "Signature headers=\"(request-target) host date content-length content-type x-content-sha256\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"WzGIoySkjqydwabMTxjVs05UBu0hThAEBzVs7HbYO45o2XpaoqGiNX67mNzs1PeYrGHpJp8+Ysoz66PChWV/1trxuTU92dQ/FgwvcwBRy5dQvdLkjWCZihNunSk4gt9652w6zZg/ybLon0CFbLRnlanDJDX9BgR3ttuTxf30t5qr2A4fnjFF4VjaU/CzE13cNfaWftjSd+xNcla2sbArF3R0+CEEb0xZEPzTyjjjkyvXdaPZwEprVn8IDmdJvLmRP4EniAPxE1EZIhd712M5ondQkR4/WckM44/hlKDeXGFb4y+QnU02i4IWgOWs3dh2tuzS1hp1zfq7qgPbZ4hp0A==\",version=\"1\"",
+ },
+ },
+
+ {
+ name: "Simple DELETE",
+ inputRequest: func() *http.Request {
+ return testReq("DELETE", "https://example.com/", "Some Content", map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT"})
+ },
+ expectedHeaders: map[string]string{
+ "date": "Mon, 26 Sep 2016 11:04:22 GMT",
+ "content-type": "application/json",
+ "accept": "application/json",
+ "Authorization": "Signature headers=\"date host (request-target)\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"Kj4YSpONZG1cibLbNgxIp4VoS5+80fsB2Fh2Ue28+QyXq4wwrJpMP+8jEupz1yTk1SNPYuxsk7lNOgtI6G1Hq0YJJVum74j46sUwRWe+f08tMJ3c9J+rrzLfpIrakQ8PaudLhHU0eK5kuTZme1dCwRWXvZq3r5IqkGot/OGMabKpBygRv9t0i5ry+bTslSjMqafTWLosY9hgIiGrXD+meB5tpyn+gPVYc//Hc/C7uNNgLJIMk5DKVa4U0YnoY3ojafZTXZQQNGRn2NDMcZUX3f3nJlUIfiZRiOCTkbPwx/fWb4MZtYaEsY5OPficbJRvfOBxSG1wjX+8rgO7ijhMAA==\",version=\"1\"",
+ },
+ },
+}
+
+func TestKnownGoodRequests(t *testing.T) {
+ pKey, err := ParsePrivateKey([]byte(testKey), []byte{})
+ if err != nil {
+ t.Fatalf("Failed to parse test key: %s", err.Error())
+ }
+
+ config := &Config{
+ Key: pKey,
+ User: "testuser",
+ Tenancy: "tenant",
+ Fingerprint: "3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55",
+ }
+
+ expectedResponse := &http.Response{}
+ for _, tt := range KnownGoodCases {
+ targetBackend := &testTarget{Response: expectedResponse}
+ target := NewTransport(targetBackend, config)
+
+ _, err = target.RoundTrip(tt.inputRequest())
+ if err != nil {
+ t.Fatalf("%s: Failed to handle request %s", tt.name, err.Error())
+ }
+
+ sentReq := targetBackend.CapturedReq
+
+ for header, val := range tt.expectedHeaders {
+ if sentReq.Header.Get(header) != val {
+ t.Fatalf("%s: Header mismatch in responnse,\n\t expecting \"%s\"\n\t got \"%s\"", tt.name, val, sentReq.Header.Get(header))
+ }
+ }
+ }
+
+}
diff --git a/builder/oracle/oci/client/vnic.go b/builder/oracle/oci/client/vnic.go
new file mode 100644
index 000000000..31b37ec3e
--- /dev/null
+++ b/builder/oracle/oci/client/vnic.go
@@ -0,0 +1,47 @@
+package oci
+
+import (
+ "time"
+)
+
+// VNICService enables communicating with the OCI compute API's VNICs
+// endpoint.
+type VNICService struct {
+ client *baseClient
+}
+
+// NewVNICService creates a new VNICService for communicating with the
+// OCI compute API's instance related endpoints.
+func NewVNICService(s *baseClient) *VNICService {
+ return &VNICService{client: s.New().Path("vnics/")}
+}
+
+// VNIC - a virtual network interface card.
+type VNIC struct {
+ AvailabilityDomain string `json:"availabilityDomain"`
+ CompartmentID string `json:"compartmentId"`
+ DisplayName string `json:"displayName,omitempty"`
+ ID string `json:"id"`
+ LifecycleState string `json:"lifecycleState"`
+ PrivateIP string `json:"privateIp"`
+ PublicIP string `json:"publicIp"`
+ SubnetID string `json:"subnetId"`
+ TimeCreated time.Time `json:"timeCreated"`
+}
+
+// GetVNICParams are the paramaters available when communicating with the
+// ListVNICs API endpoint.
+type GetVNICParams struct {
+ ID string `url:"vnicId"`
+}
+
+// Get returns an individual VNIC.
+func (s *VNICService) Get(params *GetVNICParams) (VNIC, error) {
+ VNIC := &VNIC{}
+ e := &APIError{}
+
+ _, err := s.client.New().Get(params.ID).Receive(VNIC, e)
+ err = firstError(err, e)
+
+ return *VNIC, err
+}
diff --git a/builder/oracle/oci/client/vnic_attachment.go b/builder/oracle/oci/client/vnic_attachment.go
new file mode 100644
index 000000000..3458f7da1
--- /dev/null
+++ b/builder/oracle/oci/client/vnic_attachment.go
@@ -0,0 +1,52 @@
+package oci
+
+import (
+ "time"
+)
+
+// VNICAttachmentService enables communicating with the OCI compute API's VNIC
+// attachment endpoint.
+type VNICAttachmentService struct {
+ client *baseClient
+}
+
+// NewVNICAttachmentService creates a new VNICAttachmentService for communicating with the
+// OCI compute API's instance related endpoints.
+func NewVNICAttachmentService(s *baseClient) *VNICAttachmentService {
+ return &VNICAttachmentService{
+ client: s.New().Path("vnicAttachments/"),
+ }
+}
+
+// VNICAttachment details the attachment of a VNIC to a OCI instance.
+type VNICAttachment struct {
+ AvailabilityDomain string `json:"availabilityDomain"`
+ CompartmentID string `json:"compartmentId"`
+ DisplayName string `json:"displayName,omitempty"`
+ ID string `json:"id"`
+ InstanceID string `json:"instanceId"`
+ LifecycleState string `json:"lifecycleState"`
+ SubnetID string `json:"subnetId"`
+ TimeCreated time.Time `json:"timeCreated"`
+ VNICID string `json:"vnicId"`
+}
+
+// ListVnicAttachmentsParams are the paramaters available when communicating
+// with the ListVnicAttachments API endpoint.
+type ListVnicAttachmentsParams struct {
+ AvailabilityDomain string `url:"availabilityDomain,omitempty"`
+ CompartmentID string `url:"compartmentId"`
+ InstanceID string `url:"instanceId,omitempty"`
+ VNICID string `url:"vnicId,omitempty"`
+}
+
+// List returns an array of VNICAttachments.
+func (s *VNICAttachmentService) List(params *ListVnicAttachmentsParams) ([]VNICAttachment, error) {
+ vnicAttachments := new([]VNICAttachment)
+ e := new(APIError)
+
+ _, err := s.client.New().Get("").QueryStruct(params).Receive(vnicAttachments, e)
+ err = firstError(err, e)
+
+ return *vnicAttachments, err
+}
diff --git a/builder/oracle/oci/client/vnic_attachment_test.go b/builder/oracle/oci/client/vnic_attachment_test.go
new file mode 100644
index 000000000..704423fb0
--- /dev/null
+++ b/builder/oracle/oci/client/vnic_attachment_test.go
@@ -0,0 +1,31 @@
+package oci
+
+import (
+ "fmt"
+ "net/http"
+ "reflect"
+ "testing"
+)
+
+func TestListVNICAttachments(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.image.oc1.phx.a"
+ mux.HandleFunc("/vnicAttachments/", func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, `[{"id":"%s"}]`, id)
+ })
+
+ params := &ListVnicAttachmentsParams{InstanceID: id}
+
+ vnicAttachment, err := client.Compute.VNICAttachments.List(params)
+ if err != nil {
+ t.Errorf("Client.Compute.VNICAttachments.List() returned error: %v", err)
+ }
+
+ want := []VNICAttachment{{ID: id}}
+
+ if !reflect.DeepEqual(vnicAttachment, want) {
+ t.Errorf("Client.Compute.VNICAttachments.List() returned %+v, want %+v", vnicAttachment, want)
+ }
+}
diff --git a/builder/oracle/oci/client/vnic_test.go b/builder/oracle/oci/client/vnic_test.go
new file mode 100644
index 000000000..c208db5c4
--- /dev/null
+++ b/builder/oracle/oci/client/vnic_test.go
@@ -0,0 +1,29 @@
+package oci
+
+import (
+ "fmt"
+ "net/http"
+ "reflect"
+ "testing"
+)
+
+func TestGetVNIC(t *testing.T) {
+ setup()
+ defer teardown()
+
+ id := "ocid1.vnic.oc1.phx.a"
+ path := fmt.Sprintf("/vnics/%s", id)
+ mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, `{"id": "%s"}`, id)
+ })
+
+ vnic, err := client.Compute.VNICs.Get(&GetVNICParams{ID: id})
+ if err != nil {
+ t.Errorf("Client.Compute.VNICs.Get() returned error: %v", err)
+ }
+
+ want := &VNIC{ID: id}
+ if reflect.DeepEqual(vnic, want) {
+ t.Errorf("Client.Compute.VNICs.Get() returned %+v, want %+v", vnic, want)
+ }
+}
diff --git a/builder/oracle/oci/client/waiters.go b/builder/oracle/oci/client/waiters.go
new file mode 100644
index 000000000..bb9ca1c19
--- /dev/null
+++ b/builder/oracle/oci/client/waiters.go
@@ -0,0 +1,59 @@
+package oci
+
+import (
+ "fmt"
+ "time"
+)
+
+const (
+ defaultWaitDurationMS = 5000
+ defaultMaxRetries = 0
+)
+
+type Waiter struct {
+ WaitDurationMS int
+ MaxRetries int
+}
+
+type WaitableService interface {
+ GetResourceState(id string) (string, error)
+}
+
+func stringSliceContains(slice []string, value string) bool {
+ for _, elem := range slice {
+ if elem == value {
+ return true
+ }
+ }
+ return false
+}
+
+// NewWaiter creates a waiter with default wait duration and unlimited retry
+// operations.
+func NewWaiter() *Waiter {
+ return &Waiter{WaitDurationMS: defaultWaitDurationMS, MaxRetries: defaultMaxRetries}
+}
+
+// WaitForResourceToReachState polls a resource that implements WaitableService
+// repeatedly until it reaches a known state or fails if it reaches an
+// unexpected state. The duration of the interval and number of polls is
+// determined by the Waiter configuration.
+func (w *Waiter) WaitForResourceToReachState(svc WaitableService, id string, waitStates []string, terminalState string) error {
+ for i := 0; w.MaxRetries == 0 || i < w.MaxRetries; i++ {
+ state, err := svc.GetResourceState(id)
+ if err != nil {
+ return err
+ }
+
+ if stringSliceContains(waitStates, state) {
+ time.Sleep(time.Duration(w.WaitDurationMS) * time.Millisecond)
+ continue
+ } else if state == terminalState {
+ return nil
+ }
+
+ return fmt.Errorf("Unexpected resource state %s, expecting a waiting state %s or terminal state %s ", state, waitStates, terminalState)
+ }
+
+ return fmt.Errorf("Maximum number of retries (%d) exceeded; resource did not reach state %s", w.MaxRetries, terminalState)
+}
diff --git a/builder/oracle/oci/client/waiters_test.go b/builder/oracle/oci/client/waiters_test.go
new file mode 100644
index 000000000..ce52b7922
--- /dev/null
+++ b/builder/oracle/oci/client/waiters_test.go
@@ -0,0 +1,80 @@
+package oci
+
+import (
+ "errors"
+ "fmt"
+ "testing"
+)
+
+const (
+ ValidID = "ID"
+)
+
+type testWaitSvc struct {
+ states []string
+ idx int
+ err error
+}
+
+func (tw *testWaitSvc) GetResourceState(id string) (string, error) {
+ if id != ValidID {
+ return "", fmt.Errorf("Invalid id %s", id)
+ }
+ if tw.err != nil {
+ return "", tw.err
+ }
+
+ if tw.idx >= len(tw.states) {
+ panic("Invalid test state")
+ }
+ state := tw.states[tw.idx]
+ tw.idx++
+ return state, nil
+}
+
+func TestReturnsWhenWaitStateIsReachedImmediately(t *testing.T) {
+ ws := &testWaitSvc{states: []string{"OK"}}
+ w := NewWaiter()
+ err := w.WaitForResourceToReachState(ws, ValidID, []string{}, "OK")
+ if err != nil {
+ t.Errorf("Failed to reach expected state, got %s", err)
+ }
+}
+
+func TestReturnsWhenResourceWaitsInValidWaitingState(t *testing.T) {
+ w := &Waiter{WaitDurationMS: 1, MaxRetries: defaultMaxRetries}
+ ws := &testWaitSvc{states: []string{"WAITING", "OK"}}
+ err := w.WaitForResourceToReachState(ws, ValidID, []string{"WAITING"}, "OK")
+ if err != nil {
+ t.Errorf("Failed to reach expected state, got %s", err)
+ }
+}
+
+func TestPropagatesErrorFromGetter(t *testing.T) {
+ w := NewWaiter()
+ ws := &testWaitSvc{states: []string{}, err: errors.New("ERROR")}
+ err := w.WaitForResourceToReachState(ws, ValidID, []string{"WAITING"}, "OK")
+ if err != ws.err {
+ t.Errorf("Expected error from getter got %s", err)
+ }
+}
+
+func TestReportsInvalidTransitionStateAsError(t *testing.T) {
+ w := NewWaiter()
+ tw := &testWaitSvc{states: []string{"UNKNOWN_STATE"}, err: errors.New("ERROR")}
+ err := w.WaitForResourceToReachState(tw, ValidID, []string{"WAITING"}, "OK")
+ if err == nil {
+ t.Fatal("Expected error from getter")
+ }
+}
+
+func TestErrorsWhenMaxWaitTriesExceeded(t *testing.T) {
+ w := Waiter{WaitDurationMS: 1, MaxRetries: 1}
+
+ ws := &testWaitSvc{states: []string{"WAITING", "OK"}}
+
+ err := w.WaitForResourceToReachState(ws, ValidID, []string{"WAITING"}, "OK")
+ if err == nil {
+ t.Fatal("Expecting error but wait terminated")
+ }
+}
diff --git a/builder/oracle/oci/config.go b/builder/oracle/oci/config.go
new file mode 100644
index 000000000..883c61cb5
--- /dev/null
+++ b/builder/oracle/oci/config.go
@@ -0,0 +1,215 @@
+package oci
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/helper/communicator"
+ "github.com/hashicorp/packer/helper/config"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+
+ "github.com/mitchellh/go-homedir"
+)
+
+type Config struct {
+ common.PackerConfig `mapstructure:",squash"`
+ Comm communicator.Config `mapstructure:",squash"`
+
+ AccessCfg *client.Config
+
+ AccessCfgFile string `mapstructure:"access_cfg_file"`
+ AccessCfgFileAccount string `mapstructure:"access_cfg_file_account"`
+
+ // Access config overrides
+ UserID string `mapstructure:"user_ocid"`
+ TenancyID string `mapstructure:"tenancy_ocid"`
+ Region string `mapstructure:"region"`
+ Fingerprint string `mapstructure:"fingerprint"`
+ KeyFile string `mapstructure:"key_file"`
+ PassPhrase string `mapstructure:"pass_phrase"`
+
+ AvailabilityDomain string `mapstructure:"availability_domain"`
+ CompartmentID string `mapstructure:"compartment_ocid"`
+
+ // Image
+ BaseImageID string `mapstructure:"base_image_ocid"`
+ Shape string `mapstructure:"shape"`
+ ImageName string `mapstructure:"image_name"`
+
+ // Networking
+ SubnetID string `mapstructure:"subnet_ocid"`
+
+ ctx interpolate.Context
+}
+
+func NewConfig(raws ...interface{}) (*Config, error) {
+ c := &Config{}
+
+ // Decode from template
+ err := config.Decode(c, &config.DecodeOpts{
+ Interpolate: true,
+ InterpolateContext: &c.ctx,
+ }, raws...)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to mapstructure Config: %+v", err)
+ }
+
+ // Determine where the SDK config is located
+ var accessCfgFile string
+ if c.AccessCfgFile != "" {
+ accessCfgFile = c.AccessCfgFile
+ } else {
+ accessCfgFile, err = getDefaultOCISettingsPath()
+ if err != nil {
+ accessCfgFile = "" // Access cfg might be in template
+ }
+ }
+
+ accessCfg := &client.Config{}
+
+ if accessCfgFile != "" {
+ loadedAccessCfgs, err := client.LoadConfigsFromFile(accessCfgFile)
+ if err != nil {
+ return nil, fmt.Errorf("Invalid config file %s: %s", accessCfgFile, err)
+ }
+ cfgAccount := "DEFAULT"
+ if c.AccessCfgFileAccount != "" {
+ cfgAccount = c.AccessCfgFileAccount
+ }
+
+ var ok bool
+ accessCfg, ok = loadedAccessCfgs[cfgAccount]
+ if !ok {
+ return nil, fmt.Errorf("No account section '%s' found in config file %s", cfgAccount, accessCfgFile)
+ }
+ }
+
+ // Override SDK client config with any non-empty template properties
+
+ if c.UserID != "" {
+ accessCfg.User = c.UserID
+ }
+
+ if c.TenancyID != "" {
+ accessCfg.Tenancy = c.TenancyID
+ }
+
+ if c.Region != "" {
+ accessCfg.Region = c.Region
+ } else {
+ accessCfg.Region = "us-phoenix-1"
+ }
+
+ if c.Fingerprint != "" {
+ accessCfg.Fingerprint = c.Fingerprint
+ }
+
+ if c.PassPhrase != "" {
+ accessCfg.PassPhrase = c.PassPhrase
+ }
+
+ if c.KeyFile != "" {
+ accessCfg.KeyFile = c.KeyFile
+ accessCfg.Key, err = client.LoadPrivateKey(accessCfg)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to load private key %s : %s", accessCfg.KeyFile, err)
+ }
+ }
+
+ var errs *packer.MultiError
+ if es := c.Comm.Prepare(&c.ctx); len(es) > 0 {
+ errs = packer.MultiErrorAppend(errs, es...)
+ }
+
+ // Required AccessCfg configuration options
+
+ if accessCfg.User == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'user_ocid' must be specified"))
+ }
+
+ if accessCfg.Tenancy == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'tenancy_ocid' must be specified"))
+ }
+
+ if accessCfg.Region == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'region' must be specified"))
+ }
+
+ if accessCfg.Fingerprint == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'fingerprint' must be specified"))
+ }
+
+ if accessCfg.Key == nil {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'key_file' must be specified"))
+ }
+
+ c.AccessCfg = accessCfg
+
+ // Required non AccessCfg configuration options
+
+ if c.AvailabilityDomain == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'availability_domain' must be specified"))
+ }
+
+ if c.CompartmentID == "" {
+ c.CompartmentID = accessCfg.Tenancy
+ }
+
+ if c.Shape == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'shape' must be specified"))
+ }
+
+ if c.SubnetID == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'subnet_ocid' must be specified"))
+ }
+
+ if c.BaseImageID == "" {
+ errs = packer.MultiErrorAppend(
+ errs, errors.New("'base_image_ocid' must be specified"))
+ }
+
+ if c.ImageName == "" {
+ name, err := interpolate.Render("packer-{{timestamp}}", nil)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs,
+ fmt.Errorf("unable to parse image name: %s", err))
+ } else {
+ c.ImageName = name
+ }
+ }
+
+ if errs != nil && len(errs.Errors) > 0 {
+ return nil, errs
+ }
+
+ return c, nil
+}
+
+// getDefaultOCISettingsPath uses mitchellh/go-homedir to compute the default
+// config file location ($HOME/.oci/config).
+func getDefaultOCISettingsPath() (string, error) {
+ home, err := homedir.Dir()
+ if err != nil {
+ return "", err
+ }
+
+ path := filepath.Join(home, ".oci", "config")
+ if _, err := os.Stat(path); err != nil {
+ return "", err
+ }
+
+ return path, nil
+}
diff --git a/builder/oracle/oci/config_test.go b/builder/oracle/oci/config_test.go
new file mode 100644
index 000000000..bc6039a55
--- /dev/null
+++ b/builder/oracle/oci/config_test.go
@@ -0,0 +1,181 @@
+package oci
+
+import (
+ "io/ioutil"
+ "os"
+ "reflect"
+ "strings"
+ "testing"
+
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+)
+
+func testConfig(accessConfFile *os.File) map[string]interface{} {
+ return map[string]interface{}{
+ "availability_domain": "aaaa:PHX-AD-3",
+ "access_cfg_file": accessConfFile.Name(),
+
+ // Image
+ "base_image_ocid": "ocd1...",
+ "shape": "VM.Standard1.1",
+ "image_name": "HelloWorld",
+
+ // Networking
+ "subnet_ocid": "ocd1...",
+
+ // Comm
+ "ssh_username": "opc",
+ }
+}
+
+func getField(c *client.Config, field string) string {
+ r := reflect.ValueOf(c)
+ f := reflect.Indirect(r).FieldByName(field)
+ return string(f.String())
+}
+
+func TestConfig(t *testing.T) {
+ // Shared set-up and defered deletion
+
+ cfg, keyFile, err := client.BaseTestConfig()
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(keyFile.Name())
+
+ cfgFile, err := client.WriteTestConfig(cfg)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.Remove(cfgFile.Name())
+
+ // Temporarily set $HOME to temp directory to bypass default
+ // access config loading.
+
+ tmpHome, err := ioutil.TempDir("", "packer_config_test")
+ if err != nil {
+ t.Fatalf("err: %+v", err)
+ }
+ defer os.Remove(tmpHome)
+
+ home := os.Getenv("HOME")
+ os.Setenv("HOME", tmpHome)
+ defer os.Setenv("HOME", home)
+
+ // Config tests
+
+ t.Run("BaseConfig", func(t *testing.T) {
+ raw := testConfig(cfgFile)
+ _, errs := NewConfig(raw)
+
+ if errs != nil {
+ t.Fatalf("err: %+v", errs)
+ }
+
+ })
+
+ t.Run("NoAccessConfig", func(t *testing.T) {
+ raw := testConfig(cfgFile)
+ delete(raw, "access_cfg_file")
+
+ _, errs := NewConfig(raw)
+
+ s := errs.Error()
+ expectedErrors := []string{
+ "'user_ocid'", "'tenancy_ocid'", "'fingerprint'",
+ "'key_file'",
+ }
+ for _, expected := range expectedErrors {
+ if !strings.Contains(s, expected) {
+ t.Errorf("Expected %s to contain '%s'", s, expected)
+ }
+ }
+ })
+
+ t.Run("AccessConfigTemplateOnly", func(t *testing.T) {
+ raw := testConfig(cfgFile)
+ delete(raw, "access_cfg_file")
+ raw["user_ocid"] = "ocid1..."
+ raw["tenancy_ocid"] = "ocid1..."
+ raw["fingerprint"] = "00:00..."
+ raw["key_file"] = keyFile.Name()
+
+ _, errs := NewConfig(raw)
+
+ if errs != nil {
+ t.Fatalf("err: %+v", errs)
+ }
+
+ })
+
+ t.Run("TenancyReadFromAccessCfgFile", func(t *testing.T) {
+ raw := testConfig(cfgFile)
+ c, errs := NewConfig(raw)
+ if errs != nil {
+ t.Fatalf("err: %+v", errs)
+ }
+
+ expected := "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ if c.AccessCfg.Tenancy != expected {
+ t.Errorf("Expected tenancy: %s, got %s.", expected, c.AccessCfg.Tenancy)
+ }
+
+ })
+
+ // Test the correct errors are produced when required template keys are
+ // omitted.
+ requiredKeys := []string{"availability_domain", "base_image_ocid", "shape", "subnet_ocid"}
+ for _, k := range requiredKeys {
+ t.Run(k+"_required", func(t *testing.T) {
+ raw := testConfig(cfgFile)
+ delete(raw, k)
+
+ _, errs := NewConfig(raw)
+
+ if !strings.Contains(errs.Error(), k) {
+ t.Errorf("Expected '%s' to contain '%s'", errs.Error(), k)
+ }
+ })
+ }
+
+ t.Run("ImageNameDefaultedIfEmpty", func(t *testing.T) {
+ raw := testConfig(cfgFile)
+ delete(raw, "image_name")
+
+ c, errs := NewConfig(raw)
+ if errs != nil {
+ t.Errorf("Unexpected error(s): %s", errs)
+ }
+
+ if !strings.Contains(c.ImageName, "packer-") {
+ t.Errorf("got default ImageName %q, want image name 'packer-{{timestamp}}'", c.ImageName)
+ }
+ })
+
+ // Test that AccessCfgFile properties are overridden by their
+ // corosponding template keys.
+ accessOverrides := map[string]string{
+ "user_ocid": "User",
+ "tenancy_ocid": "Tenancy",
+ "region": "Region",
+ "fingerprint": "Fingerprint",
+ }
+ for k, v := range accessOverrides {
+ t.Run("AccessCfg."+v+"Overridden", func(t *testing.T) {
+ expected := "override"
+
+ raw := testConfig(cfgFile)
+ raw[k] = expected
+
+ c, errs := NewConfig(raw)
+ if errs != nil {
+ t.Fatalf("err: %+v", errs)
+ }
+
+ accessVal := getField(c.AccessCfg, v)
+ if accessVal != expected {
+ t.Errorf("Expected AccessCfg.%s: %s, got %s", v, expected, accessVal)
+ }
+ })
+ }
+}
diff --git a/builder/oracle/oci/driver.go b/builder/oracle/oci/driver.go
new file mode 100644
index 000000000..51f6c364a
--- /dev/null
+++ b/builder/oracle/oci/driver.go
@@ -0,0 +1,16 @@
+package oci
+
+import (
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+)
+
+// Driver interfaces between the builder steps and the OCI SDK.
+type Driver interface {
+ CreateInstance(publicKey string) (string, error)
+ CreateImage(id string) (client.Image, error)
+ DeleteImage(id string) error
+ GetInstanceIP(id string) (string, error)
+ TerminateInstance(id string) error
+ WaitForImageCreation(id string) error
+ WaitForInstanceState(id string, waitStates []string, terminalState string) error
+}
diff --git a/builder/oracle/oci/driver_mock.go b/builder/oracle/oci/driver_mock.go
new file mode 100644
index 000000000..6173760fc
--- /dev/null
+++ b/builder/oracle/oci/driver_mock.go
@@ -0,0 +1,89 @@
+package oci
+
+import (
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+)
+
+// driverMock implements the Driver interface and communicates with Oracle
+// OCI.
+type driverMock struct {
+ CreateInstanceID string
+ CreateInstanceErr error
+
+ CreateImageID string
+ CreateImageErr error
+
+ DeleteImageID string
+ DeleteImageErr error
+
+ GetInstanceIPErr error
+
+ TerminateInstanceID string
+ TerminateInstanceErr error
+
+ WaitForImageCreationErr error
+
+ WaitForInstanceStateErr error
+}
+
+// CreateInstance creates a new compute instance.
+func (d *driverMock) CreateInstance(publicKey string) (string, error) {
+ if d.CreateInstanceErr != nil {
+ return "", d.CreateInstanceErr
+ }
+
+ d.CreateInstanceID = "ocid1..."
+
+ return d.CreateInstanceID, nil
+}
+
+// CreateImage creates a new custom image.
+func (d *driverMock) CreateImage(id string) (client.Image, error) {
+ if d.CreateImageErr != nil {
+ return client.Image{}, d.CreateImageErr
+ }
+ d.CreateImageID = id
+ return client.Image{ID: id}, nil
+}
+
+// DeleteImage mocks deleting a custom image.
+func (d *driverMock) DeleteImage(id string) error {
+ if d.DeleteImageErr != nil {
+ return d.DeleteImageErr
+ }
+
+ d.DeleteImageID = id
+
+ return nil
+}
+
+// GetInstanceIP returns the public IP corresponding to the given instance id.
+func (d *driverMock) GetInstanceIP(id string) (string, error) {
+ if d.GetInstanceIPErr != nil {
+ return "", d.GetInstanceIPErr
+ }
+ return "ip", nil
+}
+
+// TerminateInstance terminates a compute instance.
+func (d *driverMock) TerminateInstance(id string) error {
+ if d.TerminateInstanceErr != nil {
+ return d.TerminateInstanceErr
+ }
+
+ d.TerminateInstanceID = id
+
+ return nil
+}
+
+// WaitForImageCreation waits for a provisioning custom image to reach the
+// "AVAILABLE" state.
+func (d *driverMock) WaitForImageCreation(id string) error {
+ return d.WaitForImageCreationErr
+}
+
+// WaitForInstanceState waits for an instance to reach the a given terminal
+// state.
+func (d *driverMock) WaitForInstanceState(id string, waitStates []string, terminalState string) error {
+ return d.WaitForInstanceStateErr
+}
diff --git a/builder/oracle/oci/driver_oci.go b/builder/oracle/oci/driver_oci.go
new file mode 100644
index 000000000..1d6f943c0
--- /dev/null
+++ b/builder/oracle/oci/driver_oci.go
@@ -0,0 +1,117 @@
+package oci
+
+import (
+ "errors"
+ "fmt"
+
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+)
+
+// driverOCI implements the Driver interface and communicates with Oracle
+// OCI.
+type driverOCI struct {
+ client *client.Client
+ cfg *Config
+}
+
+// NewDriverOCI Creates a new driverOCI with a connected client.
+func NewDriverOCI(cfg *Config) (Driver, error) {
+ client, err := client.NewClient(cfg.AccessCfg)
+ if err != nil {
+ return nil, err
+ }
+ return &driverOCI{client: client, cfg: cfg}, nil
+}
+
+// CreateInstance creates a new compute instance.
+func (d *driverOCI) CreateInstance(publicKey string) (string, error) {
+ params := &client.LaunchInstanceParams{
+ AvailabilityDomain: d.cfg.AvailabilityDomain,
+ CompartmentID: d.cfg.CompartmentID,
+ ImageID: d.cfg.BaseImageID,
+ Shape: d.cfg.Shape,
+ SubnetID: d.cfg.SubnetID,
+ Metadata: map[string]string{
+ "ssh_authorized_keys": publicKey,
+ },
+ }
+ instance, err := d.client.Compute.Instances.Launch(params)
+ if err != nil {
+ return "", err
+ }
+
+ return instance.ID, nil
+}
+
+// CreateImage creates a new custom image.
+func (d *driverOCI) CreateImage(id string) (client.Image, error) {
+ params := &client.CreateImageParams{
+ CompartmentID: d.cfg.CompartmentID,
+ InstanceID: id,
+ DisplayName: d.cfg.ImageName,
+ }
+ image, err := d.client.Compute.Images.Create(params)
+ if err != nil {
+ return client.Image{}, err
+ }
+
+ return image, nil
+}
+
+// DeleteImage deletes a custom image.
+func (d *driverOCI) DeleteImage(id string) error {
+ return d.client.Compute.Images.Delete(&client.DeleteImageParams{ID: id})
+}
+
+// GetInstanceIP returns the public IP corresponding to the given instance id.
+func (d *driverOCI) GetInstanceIP(id string) (string, error) {
+ // get nvic and cross ref to find pub ip address
+ vnics, err := d.client.Compute.VNICAttachments.List(
+ &client.ListVnicAttachmentsParams{
+ InstanceID: id,
+ CompartmentID: d.cfg.CompartmentID,
+ },
+ )
+ if err != nil {
+ return "", err
+ }
+
+ if len(vnics) < 1 {
+ return "", errors.New("instance has zero VNICs")
+ }
+
+ vnic, err := d.client.Compute.VNICs.Get(&client.GetVNICParams{ID: vnics[0].VNICID})
+ if err != nil {
+ return "", fmt.Errorf("Error getting VNIC details: %s", err)
+ }
+
+ return vnic.PublicIP, nil
+}
+
+// TerminateInstance terminates a compute instance.
+func (d *driverOCI) TerminateInstance(id string) error {
+ params := &client.TerminateInstanceParams{ID: id}
+ return d.client.Compute.Instances.Terminate(params)
+}
+
+// WaitForImageCreation waits for a provisioning custom image to reach the
+// "AVAILABLE" state.
+func (d *driverOCI) WaitForImageCreation(id string) error {
+ return client.NewWaiter().WaitForResourceToReachState(
+ d.client.Compute.Images,
+ id,
+ []string{"PROVISIONING"},
+ "AVAILABLE",
+ )
+}
+
+// WaitForInstanceState waits for an instance to reach the a given terminal
+// state.
+func (d *driverOCI) WaitForInstanceState(id string, waitStates []string, terminalState string) error {
+ return client.NewWaiter().WaitForResourceToReachState(
+ d.client.Compute.Instances,
+ id,
+ waitStates,
+ terminalState,
+ )
+}
diff --git a/builder/oracle/oci/ssh.go b/builder/oracle/oci/ssh.go
new file mode 100644
index 000000000..a9d62f4a4
--- /dev/null
+++ b/builder/oracle/oci/ssh.go
@@ -0,0 +1,45 @@
+package oci
+
+import (
+ "fmt"
+
+ packerssh "github.com/hashicorp/packer/communicator/ssh"
+ "github.com/mitchellh/multistep"
+ "golang.org/x/crypto/ssh"
+)
+
+func commHost(state multistep.StateBag) (string, error) {
+ ipAddress := state.Get("instance_ip").(string)
+ return ipAddress, nil
+}
+
+// SSHConfig returns a function that can be used for the SSH communicator
+// config for connecting to the instance created over SSH using the private key
+// or password.
+func SSHConfig(username, password string) func(state multistep.StateBag) (*ssh.ClientConfig, error) {
+ return func(state multistep.StateBag) (*ssh.ClientConfig, error) {
+ privateKey, hasKey := state.GetOk("privateKey")
+ if hasKey {
+
+ signer, err := ssh.ParsePrivateKey([]byte(privateKey.(string)))
+ if err != nil {
+ return nil, fmt.Errorf("Error setting up SSH config: %s", err)
+ }
+ return &ssh.ClientConfig{
+ User: username,
+ Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)},
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ }, nil
+
+ }
+
+ return &ssh.ClientConfig{
+ User: username,
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ Auth: []ssh.AuthMethod{
+ ssh.Password(password),
+ ssh.KeyboardInteractive(packerssh.PasswordKeyboardInteractive(password)),
+ },
+ }, nil
+ }
+}
diff --git a/builder/oracle/oci/step_create_instance.go b/builder/oracle/oci/step_create_instance.go
new file mode 100644
index 000000000..8650f7314
--- /dev/null
+++ b/builder/oracle/oci/step_create_instance.go
@@ -0,0 +1,75 @@
+package oci
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+)
+
+type stepCreateInstance struct{}
+
+func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction {
+ var (
+ driver = state.Get("driver").(Driver)
+ ui = state.Get("ui").(packer.Ui)
+ publicKey = state.Get("publicKey").(string)
+ )
+
+ ui.Say("Creating instance...")
+
+ instanceID, err := driver.CreateInstance(publicKey)
+ if err != nil {
+ err = fmt.Errorf("Problem creating instance: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ state.Put("instance_id", instanceID)
+
+ ui.Say(fmt.Sprintf("Created instance (%s).", instanceID))
+
+ ui.Say("Waiting for instance to enter 'RUNNING' state...")
+
+ if err = driver.WaitForInstanceState(instanceID, []string{"STARTING", "PROVISIONING"}, "RUNNING"); err != nil {
+ err = fmt.Errorf("Error waiting for instance to start: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ ui.Say("Instance 'RUNNING'.")
+
+ return multistep.ActionContinue
+}
+
+func (s *stepCreateInstance) Cleanup(state multistep.StateBag) {
+ driver := state.Get("driver").(Driver)
+ ui := state.Get("ui").(packer.Ui)
+
+ idRaw, ok := state.GetOk("instance_id")
+ if !ok {
+ return
+ }
+ id := idRaw.(string)
+
+ ui.Say(fmt.Sprintf("Terminating instance (%s)...", id))
+
+ if err := driver.TerminateInstance(id); err != nil {
+ err = fmt.Errorf("Error terminating instance. Please terminate manually: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return
+ }
+
+ err := driver.WaitForInstanceState(id, []string{"TERMINATING"}, "TERMINATED")
+ if err != nil {
+ err = fmt.Errorf("Error terminating instance. Please terminate manually: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return
+ }
+
+ ui.Say("Terminated instance.")
+}
diff --git a/builder/oracle/oci/step_create_instance_test.go b/builder/oracle/oci/step_create_instance_test.go
new file mode 100644
index 000000000..558a17cb6
--- /dev/null
+++ b/builder/oracle/oci/step_create_instance_test.go
@@ -0,0 +1,130 @@
+package oci
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/mitchellh/multistep"
+)
+
+func TestStepCreateInstance(t *testing.T) {
+ state := testState()
+ state.Put("publicKey", "key")
+
+ step := new(stepCreateInstance)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+
+ if action := step.Run(state); action != multistep.ActionContinue {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ instanceIDRaw, ok := state.GetOk("instance_id")
+ if !ok {
+ t.Fatalf("should have machine")
+ }
+
+ step.Cleanup(state)
+
+ if driver.TerminateInstanceID != instanceIDRaw.(string) {
+ t.Fatalf(
+ "should've deleted instance (%s != %s)",
+ driver.TerminateInstanceID, instanceIDRaw.(string))
+ }
+}
+
+func TestStepCreateInstance_CreateInstanceErr(t *testing.T) {
+ state := testState()
+ state.Put("publicKey", "key")
+
+ step := new(stepCreateInstance)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+ driver.CreateInstanceErr = errors.New("error")
+
+ if action := step.Run(state); action != multistep.ActionHalt {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+
+ if _, ok := state.GetOk("instance_id"); ok {
+ t.Fatalf("should NOT have instance_id")
+ }
+
+ step.Cleanup(state)
+
+ if driver.TerminateInstanceID != "" {
+ t.Fatalf("Should not have tried to terminate an instance")
+ }
+}
+
+func TestStepCreateInstance_WaitForInstanceStateErr(t *testing.T) {
+ state := testState()
+ state.Put("publicKey", "key")
+
+ step := new(stepCreateInstance)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+ driver.WaitForInstanceStateErr = errors.New("error")
+
+ if action := step.Run(state); action != multistep.ActionHalt {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+}
+
+func TestStepCreateInstance_TerminateInstanceErr(t *testing.T) {
+ state := testState()
+ state.Put("publicKey", "key")
+
+ step := new(stepCreateInstance)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+
+ if action := step.Run(state); action != multistep.ActionContinue {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ _, ok := state.GetOk("instance_id")
+ if !ok {
+ t.Fatalf("should have machine")
+ }
+
+ driver.TerminateInstanceErr = errors.New("error")
+ step.Cleanup(state)
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+}
+
+func TestStepCreateInstanceCleanup_WaitForInstanceStateErr(t *testing.T) {
+ state := testState()
+ state.Put("publicKey", "key")
+
+ step := new(stepCreateInstance)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+
+ if action := step.Run(state); action != multistep.ActionContinue {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ driver.WaitForInstanceStateErr = errors.New("error")
+ step.Cleanup(state)
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+}
diff --git a/builder/oracle/oci/step_image.go b/builder/oracle/oci/step_image.go
new file mode 100644
index 000000000..07c9ddb4b
--- /dev/null
+++ b/builder/oracle/oci/step_image.go
@@ -0,0 +1,48 @@
+package oci
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+)
+
+type stepImage struct{}
+
+func (s *stepImage) Run(state multistep.StateBag) multistep.StepAction {
+ var (
+ driver = state.Get("driver").(Driver)
+ ui = state.Get("ui").(packer.Ui)
+ instanceID = state.Get("instance_id").(string)
+ )
+
+ ui.Say("Creating image from instance...")
+
+ image, err := driver.CreateImage(instanceID)
+ if err != nil {
+ err = fmt.Errorf("Error creating image from instance: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ err = driver.WaitForImageCreation(image.ID)
+ if err != nil {
+ err = fmt.Errorf("Error waiting for image creation to finish: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ // TODO(apryde): This is stale as .LifecycleState has changed to
+ // AVAILABLE at this point. Does it matter?
+ state.Put("image", image)
+
+ ui.Say("Image created.")
+
+ return multistep.ActionContinue
+}
+
+func (s *stepImage) Cleanup(state multistep.StateBag) {
+ // Nothing to do
+}
diff --git a/builder/oracle/oci/step_image_test.go b/builder/oracle/oci/step_image_test.go
new file mode 100644
index 000000000..72399278c
--- /dev/null
+++ b/builder/oracle/oci/step_image_test.go
@@ -0,0 +1,70 @@
+package oci
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/mitchellh/multistep"
+)
+
+func TestStepImage(t *testing.T) {
+ state := testState()
+ state.Put("instance_id", "ocid1...")
+
+ step := new(stepImage)
+ defer step.Cleanup(state)
+
+ if action := step.Run(state); action != multistep.ActionContinue {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ if _, ok := state.GetOk("image"); !ok {
+ t.Fatalf("should have image")
+ }
+}
+
+func TestStepImage_CreateImageErr(t *testing.T) {
+ state := testState()
+ state.Put("instance_id", "ocid1...")
+
+ step := new(stepImage)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+ driver.CreateImageErr = errors.New("error")
+
+ if action := step.Run(state); action != multistep.ActionHalt {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+
+ if _, ok := state.GetOk("image"); ok {
+ t.Fatalf("should NOT have image")
+ }
+}
+
+func TestStepImage_WaitForImageCreationErr(t *testing.T) {
+ state := testState()
+ state.Put("instance_id", "ocid1...")
+
+ step := new(stepImage)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+ driver.WaitForImageCreationErr = errors.New("error")
+
+ if action := step.Run(state); action != multistep.ActionHalt {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+
+ if _, ok := state.GetOk("image"); ok {
+ t.Fatalf("should not have image")
+ }
+}
diff --git a/builder/oracle/oci/step_instance_info.go b/builder/oracle/oci/step_instance_info.go
new file mode 100644
index 000000000..310d8699c
--- /dev/null
+++ b/builder/oracle/oci/step_instance_info.go
@@ -0,0 +1,36 @@
+package oci
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+)
+
+type stepInstanceInfo struct{}
+
+func (s *stepInstanceInfo) Run(state multistep.StateBag) multistep.StepAction {
+ var (
+ driver = state.Get("driver").(Driver)
+ ui = state.Get("ui").(packer.Ui)
+ id = state.Get("instance_id").(string)
+ )
+
+ ip, err := driver.GetInstanceIP(id)
+ if err != nil {
+ err = fmt.Errorf("Error getting instance's public IP: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ state.Put("instance_ip", ip)
+
+ ui.Say(fmt.Sprintf("Instance has public IP: %s.", ip))
+
+ return multistep.ActionContinue
+}
+
+func (s *stepInstanceInfo) Cleanup(state multistep.StateBag) {
+ // no cleanup
+}
diff --git a/builder/oracle/oci/step_instance_info_test.go b/builder/oracle/oci/step_instance_info_test.go
new file mode 100644
index 000000000..fdae8a0ef
--- /dev/null
+++ b/builder/oracle/oci/step_instance_info_test.go
@@ -0,0 +1,52 @@
+package oci
+
+import (
+ "errors"
+ "testing"
+
+ "github.com/mitchellh/multistep"
+)
+
+func TestInstanceInfo(t *testing.T) {
+ state := testState()
+ state.Put("instance_id", "ocid1...")
+
+ step := new(stepInstanceInfo)
+ defer step.Cleanup(state)
+
+ if action := step.Run(state); action != multistep.ActionContinue {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ instanceIPRaw, ok := state.GetOk("instance_ip")
+ if !ok {
+ t.Fatalf("should have instance_ip")
+ }
+
+ if instanceIPRaw.(string) != "ip" {
+ t.Fatalf("should've got ip ('%s' != 'ip')", instanceIPRaw.(string))
+ }
+}
+
+func TestInstanceInfo_GetInstanceIPErr(t *testing.T) {
+ state := testState()
+ state.Put("instance_id", "ocid1...")
+
+ step := new(stepInstanceInfo)
+ defer step.Cleanup(state)
+
+ driver := state.Get("driver").(*driverMock)
+ driver.GetInstanceIPErr = errors.New("error")
+
+ if action := step.Run(state); action != multistep.ActionHalt {
+ t.Fatalf("bad action: %#v", action)
+ }
+
+ if _, ok := state.GetOk("error"); !ok {
+ t.Fatalf("should have error")
+ }
+
+ if _, ok := state.GetOk("instance_ip"); ok {
+ t.Fatalf("should NOT have instance_ip")
+ }
+}
diff --git a/builder/oracle/oci/step_ssh_key_pair.go b/builder/oracle/oci/step_ssh_key_pair.go
new file mode 100644
index 000000000..cc9d0358f
--- /dev/null
+++ b/builder/oracle/oci/step_ssh_key_pair.go
@@ -0,0 +1,116 @@
+package oci
+
+import (
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "encoding/pem"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "runtime"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "golang.org/x/crypto/ssh"
+)
+
+type stepKeyPair struct {
+ Debug bool
+ DebugKeyPath string
+ PrivateKeyFile string
+}
+
+func (s *stepKeyPair) Run(state multistep.StateBag) multistep.StepAction {
+ ui := state.Get("ui").(packer.Ui)
+
+ if s.PrivateKeyFile != "" {
+ privateKeyBytes, err := ioutil.ReadFile(s.PrivateKeyFile)
+ if err != nil {
+ err = fmt.Errorf("Error loading configured private key file: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ key, err := ssh.ParsePrivateKey(privateKeyBytes)
+ if err != nil {
+ err = fmt.Errorf("Error parsing 'ssh_private_key_file': %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ state.Put("publicKey", string(ssh.MarshalAuthorizedKey(key.PublicKey())))
+ state.Put("privateKey", string(privateKeyBytes))
+
+ return multistep.ActionContinue
+ }
+
+ ui.Say("Creating temporary ssh key for instance...")
+
+ priv, err := rsa.GenerateKey(rand.Reader, 2048)
+ if err != nil {
+ err = fmt.Errorf("Error creating temporary SSH key: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ // ASN.1 DER encoded form
+ privDer := x509.MarshalPKCS1PrivateKey(priv)
+ privBlk := pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: privDer}
+
+ // Set the private key in the statebag for later
+ state.Put("privateKey", string(pem.EncodeToMemory(&privBlk)))
+
+ // Marshal the public key into SSH compatible format
+ pub, err := ssh.NewPublicKey(&priv.PublicKey)
+ if err != nil {
+ err = fmt.Errorf("Error marshaling temporary SSH public key: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ pubSSHFormat := string(ssh.MarshalAuthorizedKey(pub))
+ state.Put("publicKey", pubSSHFormat)
+
+ // If we're in debug mode, output the private key to the working
+ // directory.
+ if s.Debug {
+ ui.Message(fmt.Sprintf("Saving key for debug purposes: %s", s.DebugKeyPath))
+ f, err := os.Create(s.DebugKeyPath)
+ if err != nil {
+ err = fmt.Errorf("Error saving debug key: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+ defer f.Close()
+
+ // Write the key out
+ if _, err := f.Write(pem.EncodeToMemory(&privBlk)); err != nil {
+ err = fmt.Errorf("Error saving debug key: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+
+ // Chmod it so that it is SSH ready
+ if runtime.GOOS != "windows" {
+ if err := f.Chmod(0600); err != nil {
+ err = fmt.Errorf("Error setting permissions of debug key: %s", err)
+ ui.Error(err.Error())
+ state.Put("error", err)
+ return multistep.ActionHalt
+ }
+ }
+ }
+
+ return multistep.ActionContinue
+}
+
+func (s *stepKeyPair) Cleanup(state multistep.StateBag) {
+ // Nothing to do
+}
diff --git a/builder/oracle/oci/step_test.go b/builder/oracle/oci/step_test.go
new file mode 100644
index 000000000..d4436e304
--- /dev/null
+++ b/builder/oracle/oci/step_test.go
@@ -0,0 +1,62 @@
+package oci
+
+import (
+ "bytes"
+ "os"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+
+ client "github.com/hashicorp/packer/builder/oracle/oci/client"
+)
+
+// TODO(apryde): It would be good not to have to write a key file to disk to
+// load the config.
+func baseTestConfig() *Config {
+ _, keyFile, err := client.BaseTestConfig()
+ if err != nil {
+ panic(err)
+ }
+
+ cfg, err := NewConfig(map[string]interface{}{
+ "availability_domain": "aaaa:PHX-AD-3",
+
+ // Image
+ "base_image_ocid": "ocd1...",
+ "shape": "VM.Standard1.1",
+ "image_name": "HelloWorld",
+
+ // Networking
+ "subnet_ocid": "ocd1...",
+
+ // AccessConfig
+ "user_ocid": "ocid1...",
+ "tenancy_ocid": "ocid1...",
+ "fingerprint": "00:00...",
+ "key_file": keyFile.Name(),
+
+ // Comm
+ "ssh_username": "opc",
+ })
+
+ // Once we have a config object they key file isn't re-read so we can
+ // remove it now.
+ os.Remove(keyFile.Name())
+
+ if err != nil {
+ panic(err)
+ }
+ return cfg
+}
+
+func testState() multistep.StateBag {
+ state := new(multistep.BasicStateBag)
+ state.Put("config", baseTestConfig())
+ state.Put("driver", &driverMock{})
+ state.Put("hook", &packer.MockHook{})
+ state.Put("ui", &packer.BasicUi{
+ Reader: new(bytes.Buffer),
+ Writer: new(bytes.Buffer),
+ })
+ return state
+}
diff --git a/builder/parallels/common/driver_9.go b/builder/parallels/common/driver_9.go
index e0e82fb68..b6757d891 100644
--- a/builder/parallels/common/driver_9.go
+++ b/builder/parallels/common/driver_9.go
@@ -13,7 +13,8 @@ import (
"strings"
"time"
- "gopkg.in/xmlpath.v2"
+ "github.com/ChrisTrenkamp/goxpath"
+ "github.com/ChrisTrenkamp/goxpath/tree/xmltree"
)
// Parallels9Driver is a base type for Parallels builders.
@@ -78,13 +79,19 @@ func getConfigValueFromXpath(path, xpath string) (string, error) {
if err != nil {
return "", err
}
- xpathComp := xmlpath.MustCompile(xpath)
- root, err := xmlpath.Parse(file)
+
+ doc, err := xmltree.ParseXML(file)
if err != nil {
return "", err
}
- value, _ := xpathComp.String(root)
- return value, nil
+
+ xpExec := goxpath.MustParse(xpath)
+ node, err := xpExec.Exec(doc)
+ if err != nil {
+ return "", err
+ }
+
+ return node.String(), nil
}
// Finds an application bundle by identifier (for "darwin" platform only)
diff --git a/builder/parallels/common/driver_9_test.go b/builder/parallels/common/driver_9_test.go
index f57ef663a..32d7c6662 100644
--- a/builder/parallels/common/driver_9_test.go
+++ b/builder/parallels/common/driver_9_test.go
@@ -58,3 +58,29 @@ func TestIPAddress(t *testing.T) {
t.Fatalf("Should have found 10.211.55.124, not %s!\n", ip)
}
}
+
+func TestXMLParseConfig(t *testing.T) {
+ td, err := ioutil.TempDir("", "configpvs")
+ if err != nil {
+ t.Fatalf("Error creating temp file: %s", err)
+ }
+ defer os.Remove(td)
+
+ config := []byte(`
+
+
+ 20
+
+
+`)
+ ioutil.WriteFile(td+"/config.pvs", config, 0666)
+
+ result, err := getConfigValueFromXpath(td, "//DiskSize")
+ if err != nil {
+ t.Fatalf("Error parsing XML: %s", err)
+ }
+
+ if result != "20" {
+ t.Fatalf("Expected %q, got %q", "20", result)
+ }
+}
diff --git a/builder/parallels/iso/step_create_vm.go b/builder/parallels/iso/step_create_vm.go
index 52cbf3fbf..b085e4485 100644
--- a/builder/parallels/iso/step_create_vm.go
+++ b/builder/parallels/iso/step_create_vm.go
@@ -27,7 +27,6 @@ func (s *stepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
"create", name,
"--distribution", config.GuestOSType,
"--dst", config.OutputDir,
- "--vmtype", "vm",
"--no-hdd",
}
diff --git a/builder/profitbricks/builder.go b/builder/profitbricks/builder.go
index 95a2b1b2d..750b843c0 100644
--- a/builder/profitbricks/builder.go
+++ b/builder/profitbricks/builder.go
@@ -49,15 +49,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
config := state.Get("config").(*Config)
- if b.config.PackerDebug {
- b.runner = &multistep.DebugRunner{
- Steps: steps,
- PauseFn: common.MultistepDebugFn(ui),
- }
- } else {
- b.runner = &multistep.BasicRunner{Steps: steps}
- }
-
+ b.runner = common.NewRunner(steps, b.config.PackerConfig, ui)
b.runner.Run(state)
if rawErr, ok := state.GetOk("error"); ok {
diff --git a/builder/profitbricks/config.go b/builder/profitbricks/config.go
index 62ffc18c8..bb4e8d37f 100644
--- a/builder/profitbricks/config.go
+++ b/builder/profitbricks/config.go
@@ -76,7 +76,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
if c.PBUrl == "" {
- c.PBUrl = "https://api.profitbricks.com/rest/v2"
+ c.PBUrl = "https://api.profitbricks.com/cloudapi/v4"
}
if c.Cores == 0 {
diff --git a/builder/profitbricks/step_create_server.go b/builder/profitbricks/step_create_server.go
index 70c9148d5..a4de3cb19 100644
--- a/builder/profitbricks/step_create_server.go
+++ b/builder/profitbricks/step_create_server.go
@@ -26,34 +26,33 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
}
ui.Say("Creating Virtual Data Center...")
img := s.getImageId(c.Image, c)
+ alias := ""
+ if img == "" {
+ alias = s.getImageAlias(c.Image, c.Region, ui)
+ }
datacenter := profitbricks.Datacenter{
Properties: profitbricks.DatacenterProperties{
Name: c.SnapshotName,
Location: c.Region,
},
- Entities: profitbricks.DatacenterEntities{
- Servers: &profitbricks.Servers{
- Items: []profitbricks.Server{
+ }
+ server := profitbricks.Server{
+ Properties: profitbricks.ServerProperties{
+ Name: c.SnapshotName,
+ Ram: c.Ram,
+ Cores: c.Cores,
+ },
+ Entities: &profitbricks.ServerEntities{
+ Volumes: &profitbricks.Volumes{
+ Items: []profitbricks.Volume{
{
- Properties: profitbricks.ServerProperties{
- Name: c.SnapshotName,
- Ram: c.Ram,
- Cores: c.Cores,
- },
- Entities: &profitbricks.ServerEntities{
- Volumes: &profitbricks.Volumes{
- Items: []profitbricks.Volume{
- {
- Properties: profitbricks.VolumeProperties{
- Type: c.DiskType,
- Size: c.DiskSize,
- Name: c.SnapshotName,
- Image: img,
- },
- },
- },
- },
+ Properties: profitbricks.VolumeProperties{
+ Type: c.DiskType,
+ Size: c.DiskSize,
+ Name: c.SnapshotName,
+ ImageAlias: alias,
+ Image: img,
},
},
},
@@ -61,11 +60,11 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
},
}
if c.SSHKey != "" {
- datacenter.Entities.Servers.Items[0].Entities.Volumes.Items[0].Properties.SshKeys = []string{c.SSHKey}
+ server.Entities.Volumes.Items[0].Properties.SshKeys = []string{c.SSHKey}
}
if c.Comm.SSHPassword != "" {
- datacenter.Entities.Servers.Items[0].Entities.Volumes.Items[0].Properties.ImagePassword = c.Comm.SSHPassword
+ server.Entities.Volumes.Items[0].Properties.ImagePassword = c.Comm.SSHPassword
}
datacenter = profitbricks.CompositeCreateDatacenter(datacenter)
@@ -94,8 +93,20 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
state.Put("datacenter_id", datacenter.Id)
- lan := profitbricks.CreateLan(datacenter.Id, profitbricks.Lan{
- Properties: profitbricks.LanProperties{
+ server = profitbricks.CreateServer(datacenter.Id, server)
+ if server.StatusCode > 299 {
+ ui.Error(fmt.Sprintf("Error occurred %s", parseErrorMessage(server.Response)))
+ return multistep.ActionHalt
+ }
+
+ err = s.waitTillProvisioned(server.Headers.Get("Location"), *c)
+ if err != nil {
+ ui.Error(fmt.Sprintf("Error occurred while creating a server %s", err.Error()))
+ return multistep.ActionHalt
+ }
+
+ lan := profitbricks.CreateLan(datacenter.Id, profitbricks.CreateLanRequest{
+ Properties: profitbricks.CreateLanProperties{
Public: true,
Name: c.SnapshotName,
},
@@ -113,8 +124,8 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
}
lanId, _ := strconv.Atoi(lan.Id)
- nic := profitbricks.CreateNic(datacenter.Id, datacenter.Entities.Servers.Items[0].Id, profitbricks.Nic{
- Properties: profitbricks.NicProperties{
+ nic := profitbricks.CreateNic(datacenter.Id, server.Id, profitbricks.Nic{
+ Properties: &profitbricks.NicProperties{
Name: c.SnapshotName,
Lan: lanId,
Dhcp: true,
@@ -132,9 +143,9 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt
}
- state.Put("volume_id", datacenter.Entities.Servers.Items[0].Entities.Volumes.Items[0].Id)
+ state.Put("volume_id", server.Entities.Volumes.Items[0].Id)
- server := profitbricks.GetServer(datacenter.Id, datacenter.Entities.Servers.Items[0].Id)
+ server = profitbricks.GetServer(datacenter.Id, server.Id)
state.Put("server_ip", server.Entities.Nics.Items[0].Properties.Ips[0])
@@ -225,6 +236,25 @@ func (d *stepCreateServer) getImageId(imageName string, c *Config) string {
return ""
}
+func (d *stepCreateServer) getImageAlias(imageAlias string, location string, ui packer.Ui) string {
+ if imageAlias == "" {
+ return ""
+ }
+ locations := profitbricks.GetLocation(location)
+ if len(locations.Properties.ImageAliases) > 0 {
+ for _, i := range locations.Properties.ImageAliases {
+ alias := ""
+ if i != "" {
+ alias = i
+ }
+ if alias != "" && strings.ToLower(alias) == strings.ToLower(imageAlias) {
+ return alias
+ }
+ }
+ }
+ return ""
+}
+
func parseErrorMessage(raw string) (toreturn string) {
var tmp map[string]interface{}
json.Unmarshal([]byte(raw), &tmp)
diff --git a/builder/profitbricks/step_take_snapshot.go b/builder/profitbricks/step_take_snapshot.go
index db63df73c..822ea8699 100644
--- a/builder/profitbricks/step_take_snapshot.go
+++ b/builder/profitbricks/step_take_snapshot.go
@@ -22,7 +22,7 @@ func (s *stepTakeSnapshot) Run(state multistep.StateBag) multistep.StepAction {
dcId := state.Get("datacenter_id").(string)
volumeId := state.Get("volume_id").(string)
- snapshot := profitbricks.CreateSnapshot(dcId, volumeId, c.SnapshotName)
+ snapshot := profitbricks.CreateSnapshot(dcId, volumeId, c.SnapshotName, "")
state.Put("snapshotname", c.SnapshotName)
diff --git a/builder/virtualbox/ovf/config.go b/builder/virtualbox/ovf/config.go
index 51d394fdb..77b7ffa0e 100644
--- a/builder/virtualbox/ovf/config.go
+++ b/builder/virtualbox/ovf/config.go
@@ -38,6 +38,7 @@ type Config struct {
SourcePath string `mapstructure:"source_path"`
TargetPath string `mapstructure:"target_path"`
VMName string `mapstructure:"vm_name"`
+ KeepRegistered bool `mapstructure:"keep_registered"`
SkipExport bool `mapstructure:"skip_export"`
ctx interpolate.Context
diff --git a/builder/virtualbox/ovf/step_import.go b/builder/virtualbox/ovf/step_import.go
index 6e293d31b..b9a6285fe 100644
--- a/builder/virtualbox/ovf/step_import.go
+++ b/builder/virtualbox/ovf/step_import.go
@@ -40,6 +40,14 @@ func (s *StepImport) Cleanup(state multistep.StateBag) {
driver := state.Get("driver").(vboxcommon.Driver)
ui := state.Get("ui").(packer.Ui)
+ config := state.Get("config").(*Config)
+
+ _, cancelled := state.GetOk(multistep.StateCancelled)
+ _, halted := state.GetOk(multistep.StateHalted)
+ if (config.KeepRegistered) && (!cancelled && !halted) {
+ ui.Say("Keeping virtual machine registered with VirtualBox host (keep_registered = true)")
+ return
+ }
ui.Say("Unregistering and deleting imported VM...")
if err := driver.Delete(s.vmName); err != nil {
diff --git a/builder/virtualbox/ovf/step_import_test.go b/builder/virtualbox/ovf/step_import_test.go
index 217fee632..fd204c042 100644
--- a/builder/virtualbox/ovf/step_import_test.go
+++ b/builder/virtualbox/ovf/step_import_test.go
@@ -12,7 +12,10 @@ func TestStepImport_impl(t *testing.T) {
func TestStepImport(t *testing.T) {
state := testState(t)
+ c := testConfig(t)
+ config, _, _ := NewConfig(c)
state.Put("vm_path", "foo")
+ state.Put("config", config)
step := new(StepImport)
step.Name = "bar"
@@ -42,6 +45,14 @@ func TestStepImport(t *testing.T) {
}
// Test cleanup
+ config.KeepRegistered = true
+ step.Cleanup(state)
+
+ if driver.DeleteCalled {
+ t.Fatal("delete should not be called")
+ }
+
+ config.KeepRegistered = false
step.Cleanup(state)
if !driver.DeleteCalled {
t.Fatal("delete should be called")
diff --git a/builder/vmware/common/artifact.go b/builder/vmware/common/artifact.go
index 48fcb8139..e0b3e875e 100644
--- a/builder/vmware/common/artifact.go
+++ b/builder/vmware/common/artifact.go
@@ -14,13 +14,14 @@ const BuilderId = "mitchellh.vmware"
// Artifact is the result of running the VMware builder, namely a set
// of files associated with the resulting machine.
type localArtifact struct {
+ id string
dir string
f []string
}
// NewLocalArtifact returns a VMware artifact containing the files
// in the given directory.
-func NewLocalArtifact(dir string) (packer.Artifact, error) {
+func NewLocalArtifact(id string, dir string) (packer.Artifact, error) {
files := make([]string, 0, 5)
visit := func(path string, info os.FileInfo, err error) error {
if err != nil {
@@ -37,6 +38,7 @@ func NewLocalArtifact(dir string) (packer.Artifact, error) {
}
return &localArtifact{
+ id: id,
dir: dir,
f: files,
}, nil
@@ -50,8 +52,8 @@ func (a *localArtifact) Files() []string {
return a.f
}
-func (*localArtifact) Id() string {
- return "VM"
+func (a *localArtifact) Id() string {
+ return a.id
}
func (a *localArtifact) String() string {
diff --git a/builder/vmware/common/artifact_test.go b/builder/vmware/common/artifact_test.go
index e081cc358..53b8364f1 100644
--- a/builder/vmware/common/artifact_test.go
+++ b/builder/vmware/common/artifact_test.go
@@ -29,7 +29,7 @@ func TestNewLocalArtifact(t *testing.T) {
t.Fatalf("err: %s", err)
}
- a, err := NewLocalArtifact(td)
+ a, err := NewLocalArtifact("vm1", td)
if err != nil {
t.Fatalf("err: %s", err)
}
@@ -37,6 +37,9 @@ func TestNewLocalArtifact(t *testing.T) {
if a.BuilderId() != BuilderId {
t.Fatalf("bad: %#v", a.BuilderId())
}
+ if a.Id() != "vm1" {
+ t.Fatalf("bad: %#v", a.Id())
+ }
if len(a.Files()) != 1 {
t.Fatalf("should length 1: %d", len(a.Files()))
}
diff --git a/builder/vmware/common/run_config.go b/builder/vmware/common/run_config.go
index 89f48b9c6..9463d8753 100644
--- a/builder/vmware/common/run_config.go
+++ b/builder/vmware/common/run_config.go
@@ -8,8 +8,10 @@ import (
)
type RunConfig struct {
- Headless bool `mapstructure:"headless"`
- RawBootWait string `mapstructure:"boot_wait"`
+ Headless bool `mapstructure:"headless"`
+ RawBootWait string `mapstructure:"boot_wait"`
+ DisableVNC bool `mapstructure:"disable_vnc"`
+ BootCommand []string `mapstructure:"boot_command"`
VNCBindAddress string `mapstructure:"vnc_bind_address"`
VNCPortMin uint `mapstructure:"vnc_port_min"`
@@ -38,6 +40,11 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
var errs []error
var err error
+ if len(c.BootCommand) > 0 && c.DisableVNC {
+ errs = append(errs,
+ fmt.Errorf("A boot command cannot be used when vnc is disabled."))
+ }
+
if c.RawBootWait != "" {
c.BootWait, err = time.ParseDuration(c.RawBootWait)
if err != nil {
diff --git a/builder/vmware/common/step_clean_vmx.go b/builder/vmware/common/step_clean_vmx.go
index d016f35a3..853233e89 100644
--- a/builder/vmware/common/step_clean_vmx.go
+++ b/builder/vmware/common/step_clean_vmx.go
@@ -21,6 +21,7 @@ import (
//
type StepCleanVMX struct {
RemoveEthernetInterfaces bool
+ VNCEnabled bool
}
func (s StepCleanVMX) Run(state multistep.StateBag) multistep.StepAction {
@@ -59,8 +60,10 @@ func (s StepCleanVMX) Run(state multistep.StateBag) multistep.StepAction {
vmxData[ide+"clientdevice"] = "TRUE"
}
- ui.Message("Disabling VNC server...")
- vmxData["remotedisplay.vnc.enabled"] = "FALSE"
+ if s.VNCEnabled {
+ ui.Message("Disabling VNC server...")
+ vmxData["remotedisplay.vnc.enabled"] = "FALSE"
+ }
if s.RemoveEthernetInterfaces {
ui.Message("Removing Ethernet Interfaces...")
diff --git a/builder/vmware/common/step_configure_vnc.go b/builder/vmware/common/step_configure_vnc.go
index 4b6a6cdae..4e4798862 100644
--- a/builder/vmware/common/step_configure_vnc.go
+++ b/builder/vmware/common/step_configure_vnc.go
@@ -21,6 +21,7 @@ import (
// Produces:
// vnc_port uint - The port that VNC is configured to listen on.
type StepConfigureVNC struct {
+ Enabled bool
VNCBindAddress string
VNCPortMin uint
VNCPortMax uint
@@ -76,6 +77,11 @@ func VNCPassword(skipPassword bool) string {
}
func (s *StepConfigureVNC) Run(state multistep.StateBag) multistep.StepAction {
+ if !s.Enabled {
+ log.Println("Skipping VNC configuration step...")
+ return multistep.ActionContinue
+ }
+
driver := state.Get("driver").(Driver)
ui := state.Get("ui").(packer.Ui)
vmxPath := state.Get("vmx_path").(string)
diff --git a/builder/vmware/common/step_run.go b/builder/vmware/common/step_run.go
index bd463799d..2ea61f899 100644
--- a/builder/vmware/common/step_run.go
+++ b/builder/vmware/common/step_run.go
@@ -2,9 +2,10 @@ package common
import (
"fmt"
+ "time"
+
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
- "time"
)
// This step runs the created virtual machine.
diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go
index e82a07031..28db3c72e 100644
--- a/builder/vmware/common/step_type_boot_command.go
+++ b/builder/vmware/common/step_type_boot_command.go
@@ -36,12 +36,18 @@ type bootCommandTemplateData struct {
// Produces:
//
type StepTypeBootCommand struct {
+ VNCEnabled bool
BootCommand []string
VMName string
Ctx interpolate.Context
}
func (s *StepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction {
+ if !s.VNCEnabled {
+ log.Println("Skipping boot command step...")
+ return multistep.ActionContinue
+ }
+
debug := state.Get("debug").(bool)
driver := state.Get("driver").(Driver)
httpPort := state.Get("http_port").(uint)
diff --git a/builder/vmware/iso/artifact.go b/builder/vmware/iso/artifact.go
index d0e1a6d8b..a0c3ceace 100644
--- a/builder/vmware/iso/artifact.go
+++ b/builder/vmware/iso/artifact.go
@@ -8,6 +8,7 @@ import (
// of files associated with the resulting machine.
type Artifact struct {
builderId string
+ id string
dir OutputDir
f []string
}
@@ -20,8 +21,8 @@ func (a *Artifact) Files() []string {
return a.f
}
-func (*Artifact) Id() string {
- return "VM"
+func (a *Artifact) Id() string {
+ return a.id
}
func (a *Artifact) String() string {
diff --git a/builder/vmware/iso/builder.go b/builder/vmware/iso/builder.go
index 42038b96a..44db307a7 100644
--- a/builder/vmware/iso/builder.go
+++ b/builder/vmware/iso/builder.go
@@ -38,7 +38,6 @@ type Config struct {
vmwcommon.VMXConfig `mapstructure:",squash"`
AdditionalDiskSize []uint `mapstructure:"disk_additional_size"`
- BootCommand []string `mapstructure:"boot_command"`
DiskName string `mapstructure:"vmdk_name"`
DiskSize uint `mapstructure:"disk_size"`
DiskTypeId string `mapstructure:"disk_type_id"`
@@ -149,6 +148,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
if b.config.RemotePort == 0 {
b.config.RemotePort = 22
}
+
if b.config.VMXTemplatePath != "" {
if err := b.validateVMXTemplatePath(); err != nil {
errs = packer.MultiErrorAppend(
@@ -179,6 +179,12 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
"will forcibly halt the virtual machine, which may result in data loss.")
}
+ if b.config.Headless && b.config.DisableVNC {
+ warnings = append(warnings,
+ "Headless mode uses VNC to retrieve output. Since VNC has been disabled,\n"+
+ "you won't be able to see any output.")
+ }
+
if errs != nil && len(errs.Errors) > 0 {
return warnings, errs
}
@@ -200,6 +206,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
default:
dir = new(vmwcommon.LocalOutputDir)
}
+
+ exportOutputPath := b.config.OutputDir
+
if b.config.RemoteType != "" && b.config.Format != "" {
b.config.OutputDir = b.config.VMName
}
@@ -256,6 +265,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
HTTPPortMax: b.config.HTTPPortMax,
},
&vmwcommon.StepConfigureVNC{
+ Enabled: !b.config.DisableVNC,
VNCBindAddress: b.config.VNCBindAddress,
VNCPortMin: b.config.VNCPortMin,
VNCPortMax: b.config.VNCPortMax,
@@ -270,6 +280,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
Headless: b.config.Headless,
},
&vmwcommon.StepTypeBootCommand{
+ VNCEnabled: !b.config.DisableVNC,
BootCommand: b.config.BootCommand,
VMName: b.config.VMName,
Ctx: b.config.ctx,
@@ -300,6 +311,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
},
&vmwcommon.StepCleanVMX{
RemoveEthernetInterfaces: b.config.VMXConfig.VMXRemoveEthernet,
+ VNCEnabled: !b.config.DisableVNC,
},
&StepUploadVMX{
RemoteType: b.config.RemoteType,
@@ -307,6 +319,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&StepExport{
Format: b.config.Format,
SkipExport: b.config.SkipExport,
+ OutputDir: exportOutputPath,
},
}
@@ -332,7 +345,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
var files []string
if b.config.RemoteType != "" && b.config.Format != "" {
dir = new(vmwcommon.LocalOutputDir)
- dir.SetOutputDir(b.config.OutputDir)
+ dir.SetOutputDir(exportOutputPath)
files, err = dir.ListFiles()
} else {
files, err = state.Get("dir").(OutputDir).ListFiles()
@@ -349,6 +362,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return &Artifact{
builderId: builderId,
+ id: b.config.VMName,
dir: dir,
f: files,
}, nil
diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go
index ea93b400c..86ddf015b 100644
--- a/builder/vmware/iso/driver_esx5.go
+++ b/builder/vmware/iso/driver_esx5.go
@@ -165,10 +165,10 @@ func (d *ESX5Driver) Verify() error {
func (d *ESX5Driver) HostIP() (string, error) {
conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", d.Host, d.Port))
- defer conn.Close()
if err != nil {
return "", err
}
+ defer conn.Close()
host, _, err := net.SplitHostPort(conn.LocalAddr().String())
return host, err
diff --git a/builder/vmware/iso/step_export.go b/builder/vmware/iso/step_export.go
index 3d055ddb4..91a2ce486 100644
--- a/builder/vmware/iso/step_export.go
+++ b/builder/vmware/iso/step_export.go
@@ -6,7 +6,6 @@ import (
"net/url"
"os"
"os/exec"
- "path/filepath"
"runtime"
"strings"
@@ -17,9 +16,10 @@ import (
type StepExport struct {
Format string
SkipExport bool
+ OutputDir string
}
-func (s *StepExport) generateArgs(c *Config, outputPath string, hidePassword bool) []string {
+func (s *StepExport) generateArgs(c *Config, hidePassword bool) []string {
password := url.QueryEscape(c.RemotePassword)
if hidePassword {
password = "****"
@@ -29,7 +29,7 @@ func (s *StepExport) generateArgs(c *Config, outputPath string, hidePassword boo
"--skipManifestCheck",
"-tt=" + s.Format,
"vi://" + c.RemoteUser + ":" + password + "@" + c.RemoteHost + "/" + c.VMName,
- outputPath,
+ s.OutputDir,
}
return append(c.OVFToolOptions, args...)
}
@@ -45,6 +45,7 @@ func (s *StepExport) Run(state multistep.StateBag) multistep.StepAction {
}
if c.RemoteType != "esx5" || s.Format == "" {
+ ui.Say("Skipping export of virtual machine (export is allowed only for ESXi and the format needs to be specified)...")
return multistep.ActionContinue
}
@@ -61,16 +62,18 @@ func (s *StepExport) Run(state multistep.StateBag) multistep.StepAction {
}
// Export the VM
- outputPath := filepath.Join(c.VMName, c.VMName+"."+s.Format)
+ if s.OutputDir == "" {
+ s.OutputDir = c.VMName + "." + s.Format
+ }
if s.Format == "ova" {
- os.MkdirAll(outputPath, 0755)
+ os.MkdirAll(s.OutputDir, 0755)
}
ui.Say("Exporting virtual machine...")
- ui.Message(fmt.Sprintf("Executing: %s %s", ovftool, strings.Join(s.generateArgs(c, outputPath, true), " ")))
+ ui.Message(fmt.Sprintf("Executing: %s %s", ovftool, strings.Join(s.generateArgs(c, true), " ")))
var out bytes.Buffer
- cmd := exec.Command(ovftool, s.generateArgs(c, outputPath, false)...)
+ cmd := exec.Command(ovftool, s.generateArgs(c, false)...)
cmd.Stdout = &out
if err := cmd.Run(); err != nil {
err := fmt.Errorf("Error exporting virtual machine: %s\n%s\n", err, out.String())
@@ -81,8 +84,6 @@ func (s *StepExport) Run(state multistep.StateBag) multistep.StepAction {
ui.Message(fmt.Sprintf("%s", out.String()))
- state.Put("exportPath", outputPath)
-
return multistep.ActionContinue
}
diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go
index c5c1f10b7..b7c70d548 100644
--- a/builder/vmware/vmx/builder.go
+++ b/builder/vmware/vmx/builder.go
@@ -80,6 +80,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
HTTPPortMax: b.config.HTTPPortMax,
},
&vmwcommon.StepConfigureVNC{
+ Enabled: !b.config.DisableVNC,
VNCBindAddress: b.config.VNCBindAddress,
VNCPortMin: b.config.VNCPortMin,
VNCPortMax: b.config.VNCPortMax,
@@ -91,6 +92,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
Headless: b.config.Headless,
},
&vmwcommon.StepTypeBootCommand{
+ VNCEnabled: !b.config.DisableVNC,
BootCommand: b.config.BootCommand,
VMName: b.config.VMName,
Ctx: b.config.ctx,
@@ -121,6 +123,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
},
&vmwcommon.StepCleanVMX{
RemoveEthernetInterfaces: b.config.VMXConfig.VMXRemoveEthernet,
+ VNCEnabled: !b.config.DisableVNC,
},
}
@@ -142,7 +145,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return nil, errors.New("Build was halted.")
}
- return vmwcommon.NewLocalArtifact(b.config.OutputDir)
+ return vmwcommon.NewLocalArtifact(b.config.VMName, b.config.OutputDir)
}
// Cancel.
diff --git a/builder/vmware/vmx/config.go b/builder/vmware/vmx/config.go
index 93e8347c6..b4d1c009f 100644
--- a/builder/vmware/vmx/config.go
+++ b/builder/vmware/vmx/config.go
@@ -24,11 +24,10 @@ type Config struct {
vmwcommon.ToolsConfig `mapstructure:",squash"`
vmwcommon.VMXConfig `mapstructure:",squash"`
- BootCommand []string `mapstructure:"boot_command"`
- RemoteType string `mapstructure:"remote_type"`
- SkipCompaction bool `mapstructure:"skip_compaction"`
- SourcePath string `mapstructure:"source_path"`
- VMName string `mapstructure:"vm_name"`
+ RemoteType string `mapstructure:"remote_type"`
+ SkipCompaction bool `mapstructure:"skip_compaction"`
+ SourcePath string `mapstructure:"source_path"`
+ VMName string `mapstructure:"vm_name"`
ctx interpolate.Context
}
@@ -51,7 +50,8 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
// Defaults
if c.VMName == "" {
- c.VMName = fmt.Sprintf("packer-%s-{{timestamp}}", c.PackerBuildName)
+ c.VMName = fmt.Sprintf(
+ "packer-%s-%d", c.PackerBuildName, interpolate.InitTime.Unix())
}
// Prepare the errors
@@ -83,6 +83,12 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
"will forcibly halt the virtual machine, which may result in data loss.")
}
+ if c.Headless && c.DisableVNC {
+ warnings = append(warnings,
+ "Headless mode uses VNC to retrieve output. Since VNC has been disabled,\n"+
+ "you won't be able to see any output.")
+ }
+
// Check for any errors.
if errs != nil && len(errs.Errors) > 0 {
return nil, warnings, errs
diff --git a/command/plugin.go b/command/plugin.go
index 4bc8b1936..d9e7ea577 100644
--- a/command/plugin.go
+++ b/command/plugin.go
@@ -26,9 +26,13 @@ import (
filebuilder "github.com/hashicorp/packer/builder/file"
googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute"
hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso"
+ hypervvmcxbuilder "github.com/hashicorp/packer/builder/hyperv/vmcx"
+ lxcbuilder "github.com/hashicorp/packer/builder/lxc"
+ lxdbuilder "github.com/hashicorp/packer/builder/lxd"
nullbuilder "github.com/hashicorp/packer/builder/null"
oneandonebuilder "github.com/hashicorp/packer/builder/oneandone"
openstackbuilder "github.com/hashicorp/packer/builder/openstack"
+ oracleocibuilder "github.com/hashicorp/packer/builder/oracle/oci"
parallelsisobuilder "github.com/hashicorp/packer/builder/parallels/iso"
parallelspvmbuilder "github.com/hashicorp/packer/builder/parallels/pvm"
profitbricksbuilder "github.com/hashicorp/packer/builder/profitbricks"
@@ -54,6 +58,7 @@ import (
vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant"
vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud"
vspherepostprocessor "github.com/hashicorp/packer/post-processor/vsphere"
+ vspheretemplatepostprocessor "github.com/hashicorp/packer/post-processor/vsphere-template"
ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible"
ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local"
chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client"
@@ -88,9 +93,13 @@ var Builders = map[string]packer.Builder{
"file": new(filebuilder.Builder),
"googlecompute": new(googlecomputebuilder.Builder),
"hyperv-iso": new(hypervisobuilder.Builder),
+ "hyperv-vmcx": new(hypervvmcxbuilder.Builder),
+ "lxc": new(lxcbuilder.Builder),
+ "lxd": new(lxdbuilder.Builder),
"null": new(nullbuilder.Builder),
"oneandone": new(oneandonebuilder.Builder),
"openstack": new(openstackbuilder.Builder),
+ "oracle-oci": new(oracleocibuilder.Builder),
"parallels-iso": new(parallelsisobuilder.Builder),
"parallels-pvm": new(parallelspvmbuilder.Builder),
"profitbricks": new(profitbricksbuilder.Builder),
@@ -136,6 +145,7 @@ var PostProcessors = map[string]packer.PostProcessor{
"vagrant": new(vagrantpostprocessor.PostProcessor),
"vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor),
"vsphere": new(vspherepostprocessor.PostProcessor),
+ "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor),
}
var pluginRegexp = regexp.MustCompile("packer-(builder|post-processor|provisioner)-(.+)")
diff --git a/command/version.go b/command/version.go
index 85b61844b..1142e1747 100644
--- a/command/version.go
+++ b/command/version.go
@@ -62,7 +62,7 @@ func (c *VersionCommand) Run(args []string) int {
if info.Outdated {
c.Ui.Say(fmt.Sprintf(
"\nYour version of Packer is out of date! The latest version\n"+
- "is %s. You can update by downloading from www.packer.io",
+ "is %s. You can update by downloading from www.packer.io/downloads.html",
info.Latest))
}
}
diff --git a/common/iso_config.go b/common/iso_config.go
index 07f005f75..1ddb78d17 100644
--- a/common/iso_config.go
+++ b/common/iso_config.go
@@ -136,7 +136,13 @@ func (c *ISOConfig) Prepare(ctx *interpolate.Context) (warnings []string, errs [
}
func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
- errNotFound := fmt.Errorf("No checksum for %q found at: %s", filepath.Base(c.ISOUrls[0]), c.ISOChecksumURL)
+ u, err := url.Parse(c.ISOUrls[0])
+ if err != nil {
+ return err
+ }
+ filename := filepath.Base(u.Path)
+
+ errNotFound := fmt.Errorf("No checksum for %q found at: %s", filename, c.ISOChecksumURL)
for {
line, err := rd.ReadString('\n')
if err != nil && line == "" {
@@ -148,7 +154,7 @@ func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
}
if strings.ToLower(parts[0]) == c.ISOChecksumType {
// BSD-style checksum
- if parts[1] == fmt.Sprintf("(%s)", filepath.Base(c.ISOUrls[0])) {
+ if parts[1] == fmt.Sprintf("(%s)", filename) {
c.ISOChecksum = parts[3]
return nil
}
@@ -158,7 +164,7 @@ func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
// Binary mode
parts[1] = parts[1][1:]
}
- if parts[1] == filepath.Base(c.ISOUrls[0]) {
+ if parts[1] == filename {
c.ISOChecksum = parts[0]
return nil
}
diff --git a/common/iso_config_test.go b/common/iso_config_test.go
index 1c6a0fb13..7a5a0b026 100644
--- a/common/iso_config_test.go
+++ b/common/iso_config_test.go
@@ -152,6 +152,25 @@ func TestISOConfigPrepare_ISOChecksumURL(t *testing.T) {
t.Fatalf("should've found \"bar0\" got: %s", i.ISOChecksum)
}
+ // Test good - ISOChecksumURL GNU style with query parameters
+ i = testISOConfig()
+ i.ISOChecksum = ""
+ i.RawSingleISOUrl = "http://www.packer.io/the-OS.iso?stuff=boo"
+
+ cs_file, _ = ioutil.TempFile("", "packer-test-")
+ ioutil.WriteFile(cs_file.Name(), []byte(cs_gnu_style), 0666)
+ i.ISOChecksumURL = fmt.Sprintf("%s%s", filePrefix, cs_file.Name())
+ warns, err = i.Prepare(nil)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if i.ISOChecksum != "bar0" {
+ t.Fatalf("should've found \"bar0\" got: %s", i.ISOChecksum)
+ }
}
func TestISOConfigPrepare_ISOChecksumType(t *testing.T) {
diff --git a/common/powershell/hyperv/hyperv.go b/common/powershell/hyperv/hyperv.go
index 6e2b9dc7e..0c649c450 100644
--- a/common/powershell/hyperv/hyperv.go
+++ b/common/powershell/hyperv/hyperv.go
@@ -187,27 +187,43 @@ Set-VMFloppyDiskDrive -VMName $vmName -Path $null
return err
}
-func CreateVirtualMachine(vmName string, path string, ram int64, diskSize int64, switchName string, generation uint) error {
+func CreateVirtualMachine(vmName string, path string, harddrivePath string, vhdRoot string, ram int64, diskSize int64, switchName string, generation uint) error {
if generation == 2 {
var script = `
-param([string]$vmName, [string]$path, [long]$memoryStartupBytes, [long]$newVHDSizeBytes, [string]$switchName, [int]$generation)
+param([string]$vmName, [string]$path, [string]$harddrivePath, [string]$vhdRoot, [long]$memoryStartupBytes, [long]$newVHDSizeBytes, [string]$switchName, [int]$generation)
$vhdx = $vmName + '.vhdx'
-$vhdPath = Join-Path -Path $path -ChildPath $vhdx
-New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -NewVHDPath $vhdPath -NewVHDSizeBytes $newVHDSizeBytes -SwitchName $switchName -Generation $generation
+$vhdPath = Join-Path -Path $vhdRoot -ChildPath $vhdx
+if ($harddrivePath){
+ Copy-Item -Path $harddrivePath -Destination $vhdPath
+ New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -VHDPath $vhdPath -SwitchName $switchName -Generation $generation
+} else {
+ New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -NewVHDPath $vhdPath -NewVHDSizeBytes $newVHDSizeBytes -SwitchName $switchName -Generation $generation
+}
`
var ps powershell.PowerShellCmd
- err := ps.Run(script, vmName, path, strconv.FormatInt(ram, 10), strconv.FormatInt(diskSize, 10), switchName, strconv.FormatInt(int64(generation), 10))
+ err := ps.Run(script, vmName, path, harddrivePath, vhdRoot, strconv.FormatInt(ram, 10), strconv.FormatInt(diskSize, 10), switchName, strconv.FormatInt(int64(generation), 10))
return err
} else {
var script = `
-param([string]$vmName, [string]$path, [long]$memoryStartupBytes, [long]$newVHDSizeBytes, [string]$switchName)
+param([string]$vmName, [string]$path, [string]$harddrivePath, [string]$vhdRoot, [long]$memoryStartupBytes, [long]$newVHDSizeBytes, [string]$switchName)
$vhdx = $vmName + '.vhdx'
-$vhdPath = Join-Path -Path $path -ChildPath $vhdx
-New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -NewVHDPath $vhdPath -NewVHDSizeBytes $newVHDSizeBytes -SwitchName $switchName
+$vhdPath = Join-Path -Path $vhdRoot -ChildPath $vhdx
+if ($harddrivePath){
+ Copy-Item -Path $harddrivePath -Destination $vhdPath
+ New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -VHDPath $vhdPath -SwitchName $switchName
+} else {
+ New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -NewVHDPath $vhdPath -NewVHDSizeBytes $newVHDSizeBytes -SwitchName $switchName
+}
`
var ps powershell.PowerShellCmd
- err := ps.Run(script, vmName, path, strconv.FormatInt(ram, 10), strconv.FormatInt(diskSize, 10), switchName)
+ err := ps.Run(script, vmName, path, harddrivePath, vhdRoot, strconv.FormatInt(ram, 10), strconv.FormatInt(diskSize, 10), switchName)
+
+ if err != nil {
+ return err
+ }
+
+ err = DisableAutomaticCheckpoints(vmName)
if err != nil {
return err
@@ -217,6 +233,189 @@ New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -NewVHD
}
}
+func DisableAutomaticCheckpoints(vmName string) error {
+ var script = `
+param([string]$vmName)
+if ((Get-Command Set-Vm).Parameters["AutomaticCheckpointsEnabled"]) {
+ Set-Vm -Name $vmName -AutomaticCheckpointsEnabled $false }
+`
+ var ps powershell.PowerShellCmd
+ err := ps.Run(script, vmName)
+ return err
+}
+
+func ExportVmxcVirtualMachine(exportPath string, vmName string, snapshotName string, allSnapshots bool) error {
+ var script = `
+param([string]$exportPath, [string]$vmName, [string]$snapshotName, [string]$allSnapshotsString)
+
+$WorkingPath = Join-Path $exportPath $vmName
+
+if (Test-Path $WorkingPath) {
+ throw "Export path working directory: $WorkingPath already exists!"
+}
+
+$allSnapshots = [System.Boolean]::Parse($allSnapshotsString)
+
+if ($snapshotName) {
+ $snapshot = Get-VMSnapshot -VMName $vmName -Name $snapshotName
+ Export-VMSnapshot -VMSnapshot $snapshot -Path $exportPath -ErrorAction Stop
+} else {
+ if (!$allSnapshots) {
+ #Use last snapshot if one was not specified
+ $snapshot = Get-VMSnapshot -VMName $vmName | Select -Last 1
+ } else {
+ $snapshot = $null
+ }
+
+ if (!$snapshot) {
+ #No snapshot clone
+ Export-VM -Name $vmName -Path $exportPath -ErrorAction Stop
+ } else {
+ #Snapshot clone
+ Export-VMSnapshot -VMSnapshot $snapshot -Path $exportPath -ErrorAction Stop
+ }
+}
+
+$result = Get-ChildItem -Path $WorkingPath | Move-Item -Destination $exportPath -Force
+$result = Remove-Item -Path $WorkingPath
+ `
+
+ allSnapshotsString := "False"
+ if allSnapshots {
+ allSnapshotsString = "True"
+ }
+
+ var ps powershell.PowerShellCmd
+ err := ps.Run(script, exportPath, vmName, snapshotName, allSnapshotsString)
+
+ return err
+}
+
+func CopyVmxcVirtualMachine(exportPath string, cloneFromVmxcPath string) error {
+ var script = `
+param([string]$exportPath, [string]$cloneFromVmxcPath)
+if (!(Test-Path $cloneFromVmxcPath)){
+ throw "Clone from vmxc directory: $cloneFromVmxcPath does not exist!"
+}
+
+if (!(Test-Path $exportPath)){
+ New-Item -ItemType Directory -Force -Path $exportPath
+}
+$cloneFromVmxcPath = Join-Path $cloneFromVmxcPath '\*'
+Copy-Item $cloneFromVmxcPath $exportPath -Recurse -Force
+ `
+
+ var ps powershell.PowerShellCmd
+ err := ps.Run(script, exportPath, cloneFromVmxcPath)
+
+ return err
+}
+
+func ImportVmxcVirtualMachine(importPath string, vmName string, harddrivePath string, ram int64, switchName string) error {
+ var script = `
+param([string]$importPath, [string]$vmName, [string]$harddrivePath, [long]$memoryStartupBytes, [string]$switchName)
+
+$VirtualHarddisksPath = Join-Path -Path $importPath -ChildPath 'Virtual Hard Disks'
+if (!(Test-Path $VirtualHarddisksPath)) {
+ New-Item -ItemType Directory -Force -Path $VirtualHarddisksPath
+}
+
+$vhdPath = ""
+if ($harddrivePath){
+ $vhdx = $vmName + '.vhdx'
+ $vhdPath = Join-Path -Path $VirtualHarddisksPath -ChildPath $vhdx
+}
+
+$VirtualMachinesPath = Join-Path $importPath 'Virtual Machines'
+if (!(Test-Path $VirtualMachinesPath)) {
+ New-Item -ItemType Directory -Force -Path $VirtualMachinesPath
+}
+
+$VirtualMachinePath = Get-ChildItem -Path $VirtualMachinesPath -Filter *.vmcx -Recurse -ErrorAction SilentlyContinue | select -First 1 | %{$_.FullName}
+if (!$VirtualMachinePath){
+ $VirtualMachinePath = Get-ChildItem -Path $VirtualMachinesPath -Filter *.xml -Recurse -ErrorAction SilentlyContinue | select -First 1 | %{$_.FullName}
+}
+if (!$VirtualMachinePath){
+ $VirtualMachinePath = Get-ChildItem -Path $importPath -Filter *.xml -Recurse -ErrorAction SilentlyContinue | select -First 1 | %{$_.FullName}
+}
+
+$compatibilityReport = Compare-VM -Path $VirtualMachinePath -VirtualMachinePath $importPath -SmartPagingFilePath $importPath -SnapshotFilePath $importPath -VhdDestinationPath $VirtualHarddisksPath -GenerateNewId -Copy:$false
+if ($vhdPath){
+ Copy-Item -Path $harddrivePath -Destination $vhdPath
+ $existingFirstHarddrive = $compatibilityReport.VM.HardDrives | Select -First 1
+ if ($existingFirstHarddrive) {
+ $existingFirstHarddrive | Set-VMHardDiskDrive -Path $vhdPath
+ } else {
+ Add-VMHardDiskDrive -VM $compatibilityReport.VM -Path $vhdPath
+ }
+}
+Set-VMMemory -VM $compatibilityReport.VM -StartupBytes $memoryStartupBytes
+$networkAdaptor = $compatibilityReport.VM.NetworkAdapters | Select -First 1
+Disconnect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor
+Connect-VMNetworkAdapter -VMNetworkAdapter $networkAdaptor -SwitchName $switchName
+$vm = Import-VM -CompatibilityReport $compatibilityReport
+
+if ($vm) {
+ $result = Rename-VM -VM $vm -NewName $VMName
+}
+ `
+
+ var ps powershell.PowerShellCmd
+ err := ps.Run(script, importPath, vmName, harddrivePath, strconv.FormatInt(ram, 10), switchName)
+
+ return err
+}
+
+func CloneVirtualMachine(cloneFromVmxcPath string, cloneFromVmName string, cloneFromSnapshotName string, cloneAllSnapshots bool, vmName string, path string, harddrivePath string, ram int64, switchName string) error {
+ if cloneFromVmName != "" {
+ err := ExportVmxcVirtualMachine(path, cloneFromVmName, cloneFromSnapshotName, cloneAllSnapshots)
+ if err != nil {
+ return err
+ }
+ }
+
+ if cloneFromVmxcPath != "" {
+ err := CopyVmxcVirtualMachine(path, cloneFromVmxcPath)
+ if err != nil {
+ return err
+ }
+ }
+
+ err := ImportVmxcVirtualMachine(path, vmName, harddrivePath, ram, switchName)
+ if err != nil {
+ return err
+ }
+
+ return DeleteAllDvdDrives(vmName)
+}
+
+func GetVirtualMachineGeneration(vmName string) (uint, error) {
+ var script = `
+param([string]$vmName)
+$generation = Get-Vm -Name $vmName | %{$_.Generation}
+if (!$generation){
+ $generation = 1
+}
+return $generation
+`
+ var ps powershell.PowerShellCmd
+ cmdOut, err := ps.Output(script, vmName)
+
+ if err != nil {
+ return 0, err
+ }
+
+ generationUint32, err := strconv.ParseUint(strings.TrimSpace(string(cmdOut)), 10, 32)
+
+ if err != nil {
+ return 0, err
+ }
+
+ generation := uint(generationUint32)
+
+ return generation, err
+}
+
func SetVirtualMachineCpuCount(vmName string, cpu uint) error {
var script = `
diff --git a/common/powershell/powershell.go b/common/powershell/powershell.go
index 83190d1a4..a41915474 100644
--- a/common/powershell/powershell.go
+++ b/common/powershell/powershell.go
@@ -246,6 +246,88 @@ func HasVirtualMachineVirtualizationExtensions() (bool, error) {
return hasVirtualMachineVirtualizationExtensions, err
}
+func DoesVirtualMachineExist(vmName string) (bool, error) {
+
+ var script = `
+param([string]$vmName)
+return (Get-VM | ?{$_.Name -eq $vmName}) -ne $null
+`
+
+ var ps PowerShellCmd
+ cmdOut, err := ps.Output(script, vmName)
+
+ if err != nil {
+ return false, err
+ }
+
+ var exists = strings.TrimSpace(cmdOut) == "True"
+ return exists, err
+}
+
+func DoesVirtualMachineSnapshotExist(vmName string, snapshotName string) (bool, error) {
+
+ var script = `
+param([string]$vmName, [string]$snapshotName)
+return (Get-VMSnapshot -VMName $vmName | ?{$_.Name -eq $snapshotName}) -ne $null
+`
+
+ var ps PowerShellCmd
+ cmdOut, err := ps.Output(script, vmName, snapshotName)
+
+ if err != nil {
+ return false, err
+ }
+
+ var exists = strings.TrimSpace(cmdOut) == "True"
+ return exists, err
+}
+
+func IsVirtualMachineOn(vmName string) (bool, error) {
+
+ var script = `
+param([string]$vmName)
+$vm = Get-VM -Name $vmName -ErrorAction SilentlyContinue
+$vm.State -eq [Microsoft.HyperV.PowerShell.VMState]::Running
+`
+
+ var ps PowerShellCmd
+ cmdOut, err := ps.Output(script, vmName)
+
+ if err != nil {
+ return false, err
+ }
+
+ var isRunning = strings.TrimSpace(cmdOut) == "True"
+ return isRunning, err
+}
+
+func GetVirtualMachineGeneration(vmName string) (uint, error) {
+ var script = `
+param([string]$vmName)
+$generation = Get-Vm -Name $vmName | %{$_.Generation}
+if (!$generation){
+ $generation = 1
+}
+return $generation
+`
+ var ps PowerShellCmd
+ cmdOut, err := ps.Output(script, vmName)
+
+ if err != nil {
+ return 0, err
+ }
+
+ generationUint32, err := strconv.ParseUint(strings.TrimSpace(string(cmdOut)), 10, 32)
+
+ if err != nil {
+ return 0, err
+ }
+
+ generation := uint(generationUint32)
+
+ return generation, err
+}
+
func SetUnattendedProductKey(path string, productKey string) error {
var script = `
diff --git a/communicator/none/communicator.go b/communicator/none/communicator.go
index 4e08aba1b..5c14a4283 100644
--- a/communicator/none/communicator.go
+++ b/communicator/none/communicator.go
@@ -2,9 +2,10 @@ package none
import (
"errors"
- "github.com/hashicorp/packer/packer"
"io"
"os"
+
+ "github.com/hashicorp/packer/packer"
)
type comm struct {
diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go
index a6a7f9cf9..c10e97dcc 100644
--- a/communicator/ssh/communicator.go
+++ b/communicator/ssh/communicator.go
@@ -46,8 +46,8 @@ type Config struct {
// Pty, if true, will request a pty from the remote end.
Pty bool
- // DisableAgent, if true, will not forward the SSH agent.
- DisableAgent bool
+ // DisableAgentForwarding, if true, will not forward the SSH agent.
+ DisableAgentForwarding bool
// HandshakeTimeout limits the amount of time we'll wait to handshake before
// saying the connection failed.
@@ -327,7 +327,7 @@ func (c *comm) connectToAgent() {
return
}
- if c.config.DisableAgent {
+ if c.config.DisableAgentForwarding {
log.Printf("[INFO] SSH agent forwarding is disabled.")
return
}
@@ -693,6 +693,11 @@ func (c *comm) scpSession(scpCommand string, f func(io.Writer, *bufio.Reader) er
// Otherwise, we have an ExitErorr, meaning we can just read
// the exit status
log.Printf("non-zero exit status: %d", exitErr.ExitStatus())
+ stdoutB, err := ioutil.ReadAll(stdoutR)
+ if err != nil {
+ return err
+ }
+ log.Printf("scp output: %s", stdoutB)
// If we exited with status 127, it means SCP isn't available.
// Return a more descriptive error for that.
diff --git a/contrib/zsh-completion/_packer b/contrib/zsh-completion/_packer
index 6b26daa29..e0f73b5de 100644
--- a/contrib/zsh-completion/_packer
+++ b/contrib/zsh-completion/_packer
@@ -1,66 +1,68 @@
#compdef packer
-local -a _packer_cmds
-_packer_cmds=(
+_packer () {
+ local -a sub_commands && sub_commands=(
'build:Build image(s) from template'
'fix:Fixes templates from old versions of packer'
'inspect:See components of a template'
'push:Push template files to a Packer build service'
'validate:Check that a template is valid'
'version:Prints the Packer version'
-)
+ )
-__build() {
- _arguments \
- '-debug[Debug mode enabled for builds]' \
- '-force[Force a build to continue if artifacts exist, deletes existing artifacts]' \
- '-machine-readable[Machine-readable output]' \
- '-except=[(foo,bar,baz) Build all builds other than these]' \
- '-only=[(foo,bar,baz) Only build the given builds by name]' \
- '-parallel=[(false) Disable parallelization (on by default)]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
- '-var-file=[(path) JSON file containing user variables.]'
-}
-
-
-__inspect() {
- _arguments \
- '-machine-readable[Machine-readable output]'
-}
-
-__push() {
- _arguments \
- '-name=[() The destination build in Atlas.]' \
- '-token=[() Access token to use to upload.]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
+ local -a build_arguments && build_arguments=(
+ '-debug[Debug mode enabled for builds]'
+ '-force[Force a build to continue if artifacts exist, deletes existing artifacts]'
+ '-machine-readable[Machine-readable output]'
+ '-except=[(foo,bar,baz) Build all builds other than these]'
+ '-only=[(foo,bar,baz) Only build the given builds by name]'
+ '-parallel=[(false) Disable parallelization (on by default)]'
+ '-var[("key=value") Variable for templates, can be used multiple times.]'
'-var-file=[(path) JSON file containing user variables.]'
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ local -a inspect_arguments && inspect_arguments=(
+ '-machine-readable[Machine-readable output]'
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ local -a push_arguments && push_arguments=(
+ '-name=[() The destination build in Atlas.]'
+ '-token=[() Access token to use to upload.]'
+ '-var[("key=value") Variable for templates, can be used multiple times.]'
+ '-var-file=[(path) JSON file containing user variables.]'
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ local -a validate_arguments && validate_arguments=(
+ '-syntax-only[Only check syntax. Do not verify config of the template.]'
+ '-except=[(foo,bar,baz) Validate all builds other than these]'
+ '-only=[(foo,bar,baz) Validate only these builds]'
+ '-var[("key=value") Variable for templates, can be used multiple times.]'
+ '-var-file=[(path) JSON file containing user variables.]'
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ _arguments -C \
+ ':command:->command' \
+ '*::options:->options'
+
+ case $state in
+ command)
+ _describe -t commands 'command' sub_commands ;;
+ options)
+ case $line[1] in
+ build)
+ _arguments -s -S : $build_arguments ;;
+ inspect)
+ _arguments -s -S : $inspect_arguments ;;
+ push)
+ _arguments -s -S : $push_arguments ;;
+ validate)
+ _arguments -s -S : $validate_arguments ;;
+ esac
+ ;;
+ esac
}
-
-__validate() {
- _arguments \
- '-syntax-only[Only check syntax. Do not verify config of the template.]' \
- '-except=[(foo,bar,baz) Validate all builds other than these]' \
- '-only=[(foo,bar,baz) Validate only these builds]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
- '-var-file=[(path) JSON file containing user variables.]'
-}
-
-
-_arguments '*:: :->command'
-
-if (( CURRENT == 1 )); then
- _describe -t commands "packer command" _packer_cmds
- return
-fi
-
-local -a _command_args
-case "$words[1]" in
- build)
- __build ;;
- inspect)
- __inspect ;;
- push)
- __push ;;
- validate)
- __validate ;;
-esac
+_packer "$@"
diff --git a/examples/alicloud/basic/alicloud.json b/examples/alicloud/basic/alicloud.json
index 9c7384d98..8f83262fe 100644
--- a/examples/alicloud/basic/alicloud.json
+++ b/examples/alicloud/basic/alicloud.json
@@ -8,17 +8,18 @@
"access_key":"{{user `access_key`}}",
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
- "image_name":"packer_basi",
- "source_image":"ubuntu_16_0402_64_40G_base_20170222.vhd",
+ "image_name":"packer_basic",
+ "source_image":"centos_7_2_64_40G_base_20170222.vhd",
"ssh_username":"root",
"instance_type":"ecs.n1.tiny",
+ "internet_charge_type":"PayByTraffic",
"io_optimized":"true"
}],
"provisioners": [{
"type": "shell",
"inline": [
"sleep 30",
- "apt-get update -yy"
+ "yum install redis.x86_64 -y"
]
}]
}
diff --git a/examples/alicloud/basic/alicloud_windows.json b/examples/alicloud/basic/alicloud_windows.json
index bb1f16773..9acb6267e 100644
--- a/examples/alicloud/basic/alicloud_windows.json
+++ b/examples/alicloud/basic/alicloud_windows.json
@@ -9,9 +9,10 @@
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
"image_name":"packer_test",
- "source_image":"win2012_64_datactr_r2_en_40G_alibase_20160622.vhd",
+ "source_image":"win2008r2_64_ent_sp1_zh-cn_40G_alibase_20170622.vhd",
"instance_type":"ecs.n1.tiny",
"io_optimized":"true",
+ "internet_charge_type":"PayByTraffic",
"image_force_delete":"true",
"communicator": "winrm",
"winrm_port": 5985,
diff --git a/examples/alicloud/basic/alicloud_with_data_disk.json b/examples/alicloud/basic/alicloud_with_data_disk.json
index 2d99af8fb..31f10ab70 100644
--- a/examples/alicloud/basic/alicloud_with_data_disk.json
+++ b/examples/alicloud/basic/alicloud_with_data_disk.json
@@ -9,9 +9,10 @@
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
"image_name":"packer_with_data_disk",
- "source_image":"ubuntu_16_0402_64_40G_base_20170222.vhd",
+ "source_image":"centos_7_2_64_40G_base_20170222.vhd",
"ssh_username":"root",
"instance_type":"ecs.n1.tiny",
+ "internet_charge_type":"PayByTraffic",
"io_optimized":"true",
"image_disk_mappings":[{"disk_name":"data1","disk_size":20},{"disk_name":"data1","disk_size":20,"disk_device":"/dev/xvdz"}]
}],
@@ -19,7 +20,7 @@
"type": "shell",
"inline": [
"sleep 30",
- "apt-get update -yy"
+ "yum install redis.x86_64 -y"
]
}]
}
diff --git a/examples/alicloud/chef/alicloud.json b/examples/alicloud/chef/alicloud.json
index 8bfcfbc8b..aa108bacb 100644
--- a/examples/alicloud/chef/alicloud.json
+++ b/examples/alicloud/chef/alicloud.json
@@ -9,11 +9,12 @@
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
"image_name":"packer_chef2",
- "source_image":"ubuntu_14_0405_64_40G_base_20170222.vhd",
+ "source_image":"ubuntu_14_0405_64_40G_alibase_20170625.vhd",
"ssh_username":"root",
"instance_type":"ecs.n1.medium",
"io_optimized":"true",
"image_force_delete":"true",
+ "internet_charge_type":"PayByTraffic",
"ssh_password":"Test1234",
"user_data_file":"examples/alicloud/chef/user_data.sh"
}],
diff --git a/examples/alicloud/chef/chef.sh b/examples/alicloud/chef/chef.sh
index 6d7ecac86..6d678b7cc 100644
--- a/examples/alicloud/chef/chef.sh
+++ b/examples/alicloud/chef/chef.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+#if the related deb pkg not found, please replace with it other avaiable repository url
HOSTNAME=`ifconfig eth1|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
if [ not $HOSTNAME ] ; then
HOSTNAME=`ifconfig eth0|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
diff --git a/examples/alicloud/jenkins/alicloud.json b/examples/alicloud/jenkins/alicloud.json
new file mode 100644
index 000000000..f1f9e9896
--- /dev/null
+++ b/examples/alicloud/jenkins/alicloud.json
@@ -0,0 +1,32 @@
+{
+ "variables": {
+ "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
+ "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
+ },
+ "builders": [{
+ "type":"alicloud-ecs",
+ "access_key":"{{user `access_key`}}",
+ "secret_key":"{{user `secret_key`}}",
+ "region":"cn-beijing",
+ "image_name":"packer_jenkins",
+ "source_image":"ubuntu_14_0405_64_40G_alibase_20170625.vhd",
+ "ssh_username":"root",
+ "instance_type":"ecs.n1.medium",
+ "io_optimized":"true",
+ "internet_charge_type":"PayByTraffic",
+ "image_force_delete":"true",
+ "ssh_password":"Test12345"
+ }],
+ "provisioners": [{
+ "type": "file",
+ "source": "examples/alicloud/jenkins/jenkins.sh",
+ "destination": "/root/"
+ },{
+ "type": "shell",
+ "inline": [
+ "cd /root/",
+ "chmod 755 jenkins.sh",
+ "./jenkins.sh"
+ ]
+ }]
+}
diff --git a/examples/alicloud/jenkins/jenkins.sh b/examples/alicloud/jenkins/jenkins.sh
new file mode 100644
index 000000000..af3eb51a3
--- /dev/null
+++ b/examples/alicloud/jenkins/jenkins.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+JENKINS_URL='http://mirrors.jenkins.io/war-stable/2.32.2/jenkins.war'
+
+TOMCAT_VERSION='7.0.77'
+TOMCAT_NAME="apache-tomcat-$TOMCAT_VERSION"
+TOMCAT_PACKAGE="$TOMCAT_NAME.tar.gz"
+TOMCAT_URL="http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v$TOMCAT_VERSION/bin/$TOMCAT_PACKAGE"
+TOMCAT_PATH="/opt/$TOMCAT_NAME"
+
+#install jdk
+if grep -Eqi "Ubuntu|Debian|Raspbian" /etc/issue || grep -Eq "Ubuntu|Debian|Raspbian" /etc/*-release; then
+ sudo apt-get update -y
+ sudo apt-get install -y openjdk-7-jdk
+elif grep -Eqi "CentOS|Fedora|Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "CentOS|Fedora|Red Hat Enterprise Linux Server" /etc/*-release; then
+ sudo yum update -y
+ sudo yum install -y openjdk-7-jdk
+else
+ echo "Unknown OS type."
+fi
+
+#install jenkins server
+mkdir ~/work
+cd ~/work
+
+#install tomcat
+wget $TOMCAT_URL
+tar -zxvf $TOMCAT_PACKAGE
+mv $TOMCAT_NAME /opt
+
+#install
+wget $JENKINS_URL
+mv jenkins.war $TOMCAT_PATH/webapps/
+
+#set emvironment
+echo "TOMCAT_PATH=\"$TOMCAT_PATH\"">>/etc/profile
+echo "JENKINS_HOME=\"$TOMCAT_PATH/webapps/jenkins\"">>/etc/profile
+echo PATH="\"\$PATH:\$TOMCAT_PATH:\$JENKINS_HOME\"">>/etc/profile
+. /etc/profile
+
+#start tomcat & jenkins
+$TOMCAT_PATH/bin/startup.sh
+
+#set start on boot
+sed -i "/#!\/bin\/sh/a$TOMCAT_PATH/bin/startup.sh" /etc/rc.local
+
+#clean
+rm -rf ~/work
diff --git a/examples/alicloud/local/centos.json b/examples/alicloud/local/centos.json
new file mode 100644
index 000000000..45c19b3dc
--- /dev/null
+++ b/examples/alicloud/local/centos.json
@@ -0,0 +1,60 @@
+{"variables": {
+ "box_basename": "centos-6.8",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "4096",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "iso_checksum": "0ca12fe5f28c2ceed4f4084b41ff8a0b",
+ "iso_checksum_type": "md5",
+ "iso_name": "CentOS-6.8-x86_64-minimal.iso",
+ "ks_path": "centos-6.8/ks.cfg",
+ "memory": "512",
+ "metadata": "floppy/dummy_metadata.json",
+ "mirror": "http://mirrors.aliyun.com/centos",
+ "mirror_directory": "6.8/isos/x86_64",
+ "name": "centos-6.8",
+ "no_proxy": "{{env `no_proxy`}}",
+ "template": "centos-6.8-x86_64",
+ "version": "2.1.TIMESTAMP"
+ },
+ "builders":[
+ {
+ "boot_command": [
+ " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "root",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}.raw",
+ "net_device": "virtio-net",
+ "disk_interface": "virtio",
+ "format": "raw"
+ }
+ ],
+"post-processors":[
+ {
+ "type":"alicloud-import",
+ "oss_bucket_name": "packer",
+ "image_name": "packer_import",
+ "image_os_type": "linux",
+ "image_platform": "CentOS",
+ "image_architecture": "x86_64",
+ "image_system_size": "40",
+ "region":"cn-beijing"
+ }
+ ]
+}
diff --git a/examples/alicloud/local/http/centos-6.8/ks.cfg b/examples/alicloud/local/http/centos-6.8/ks.cfg
new file mode 100644
index 000000000..90864b006
--- /dev/null
+++ b/examples/alicloud/local/http/centos-6.8/ks.cfg
@@ -0,0 +1,69 @@
+install
+cdrom
+lang en_US.UTF-8
+keyboard us
+network --bootproto=dhcp
+rootpw vagrant
+firewall --disabled
+selinux --permissive
+timezone UTC
+unsupported_hardware
+bootloader --location=mbr
+text
+skipx
+zerombr
+clearpart --all --initlabel
+autopart
+auth --enableshadow --passalgo=sha512 --kickstart
+firstboot --disabled
+reboot
+user --name=vagrant --plaintext --password vagrant
+key --skip
+
+%packages --nobase --ignoremissing --excludedocs
+# vagrant needs this to copy initial files via scp
+openssh-clients
+sudo
+kernel-headers
+kernel-devel
+gcc
+make
+perl
+wget
+nfs-utils
+-fprintd-pam
+-intltool
+
+# unnecessary firmware
+-aic94xx-firmware
+-atmel-firmware
+-b43-openfwwf
+-bfa-firmware
+-ipw2100-firmware
+-ipw2200-firmware
+-ivtv-firmware
+-iwl100-firmware
+-iwl1000-firmware
+-iwl3945-firmware
+-iwl4965-firmware
+-iwl5000-firmware
+-iwl5150-firmware
+-iwl6000-firmware
+-iwl6000g2a-firmware
+-iwl6050-firmware
+-libertas-usb8388-firmware
+-ql2100-firmware
+-ql2200-firmware
+-ql23xx-firmware
+-ql2400-firmware
+-ql2500-firmware
+-rt61pci-firmware
+-rt73usb-firmware
+-xorg-x11-drv-ati-firmware
+-zd1211-firmware
+
+%post
+# Force to set SELinux to a permissive mode
+sed -i -e 's/\(^SELINUX=\).*$/\1permissive/' /etc/selinux/config
+# sudo
+echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
diff --git a/examples/azure/windows.json b/examples/azure/windows.json
index 8493f82cb..23bd66b26 100644
--- a/examples/azure/windows.json
+++ b/examples/azure/windows.json
@@ -38,7 +38,8 @@
"type": "powershell",
"inline": [
"if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}",
- "& $Env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /shutdown /quiet"
+ "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit",
+ "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }"
]
}]
}
diff --git a/examples/azure/windows_custom_image.json b/examples/azure/windows_custom_image.json
index b411555a7..448340e19 100644
--- a/examples/azure/windows_custom_image.json
+++ b/examples/azure/windows_custom_image.json
@@ -4,7 +4,8 @@
"client_secret": "{{env `ARM_CLIENT_SECRET`}}",
"resource_group": "{{env `ARM_RESOURCE_GROUP`}}",
"storage_account": "{{env `ARM_STORAGE_ACCOUNT`}}",
- "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}"
+ "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
+ "object_id": "{{env `ARM_OJBECT_ID`}}"
},
"builders": [
{
@@ -15,6 +16,7 @@
"resource_group_name": "{{user `resource_group`}}",
"storage_account": "{{user `storage_account`}}",
"subscription_id": "{{user `subscription_id`}}",
+ "object_id": "{{user `object_id`}}",
"capture_container_name": "images",
"capture_name_prefix": "packer",
@@ -35,7 +37,8 @@
"type": "powershell",
"inline": [
"if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}",
- "& $Env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /shutdown /quiet"
+ "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit",
+ "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }"
]
}]
}
diff --git a/fix/fixer.go b/fix/fixer.go
index 3c285c4be..938a7160f 100644
--- a/fix/fixer.go
+++ b/fix/fixer.go
@@ -20,17 +20,19 @@ var FixerOrder []string
func init() {
Fixers = map[string]Fixer{
- "iso-md5": new(FixerISOMD5),
- "createtime": new(FixerCreateTime),
- "pp-vagrant-override": new(FixerVagrantPPOverride),
- "virtualbox-gaattach": new(FixerVirtualBoxGAAttach),
- "virtualbox-rename": new(FixerVirtualBoxRename),
- "vmware-rename": new(FixerVMwareRename),
- "parallels-headless": new(FixerParallelsHeadless),
- "parallels-deprecations": new(FixerParallelsDeprecations),
- "sshkeypath": new(FixerSSHKeyPath),
- "manifest-filename": new(FixerManifestFilename),
- "amazon-shutdown_behavior": new(FixerAmazonShutdownBehavior),
+ "iso-md5": new(FixerISOMD5),
+ "createtime": new(FixerCreateTime),
+ "pp-vagrant-override": new(FixerVagrantPPOverride),
+ "virtualbox-gaattach": new(FixerVirtualBoxGAAttach),
+ "virtualbox-rename": new(FixerVirtualBoxRename),
+ "vmware-rename": new(FixerVMwareRename),
+ "parallels-headless": new(FixerParallelsHeadless),
+ "parallels-deprecations": new(FixerParallelsDeprecations),
+ "sshkeypath": new(FixerSSHKeyPath),
+ "sshdisableagent": new(FixerSSHDisableAgent),
+ "manifest-filename": new(FixerManifestFilename),
+ "amazon-shutdown_behavior": new(FixerAmazonShutdownBehavior),
+ "amazon-enhanced-networking": new(FixerAmazonEnhancedNetworking),
}
FixerOrder = []string{
@@ -43,7 +45,9 @@ func init() {
"parallels-headless",
"parallels-deprecations",
"sshkeypath",
+ "sshdisableagent",
"manifest-filename",
"amazon-shutdown_behavior",
+ "amazon-enhanced-networking",
}
}
diff --git a/fix/fixer_amazon_enhanced_networking.go b/fix/fixer_amazon_enhanced_networking.go
new file mode 100644
index 000000000..4c9330ebe
--- /dev/null
+++ b/fix/fixer_amazon_enhanced_networking.go
@@ -0,0 +1,45 @@
+package fix
+
+import (
+ "github.com/mitchellh/mapstructure"
+)
+
+// FixerAmazonEnhancedNetworking is a Fixer that replaces the "enhanced_networking" configuration key
+// with the clearer "ena_support". This disambiguates ena_support from sriov_support.
+type FixerAmazonEnhancedNetworking struct{}
+
+func (FixerAmazonEnhancedNetworking) Fix(input map[string]interface{}) (map[string]interface{}, error) {
+ // Our template type we'll use for this fixer only
+ type template struct {
+ Builders []map[string]interface{}
+ }
+
+ // Decode the input into our structure, if we can
+ var tpl template
+ if err := mapstructure.Decode(input, &tpl); err != nil {
+ return nil, err
+ }
+
+ // Go through each builder and replace the enhanced_networking if we can
+ for _, builder := range tpl.Builders {
+ enhancedNetworkingRaw, ok := builder["enhanced_networking"]
+ if !ok {
+ continue
+ }
+ enhancedNetworkingString, ok := enhancedNetworkingRaw.(bool)
+ if !ok {
+ // TODO: error?
+ continue
+ }
+
+ delete(builder, "enhanced_networking")
+ builder["ena_support"] = enhancedNetworkingString
+ }
+
+ input["builders"] = tpl.Builders
+ return input, nil
+}
+
+func (FixerAmazonEnhancedNetworking) Synopsis() string {
+ return `Replaces "enhanced_networking" in builders with "ena_support"`
+}
diff --git a/fix/fixer_amazon_enhanced_networking_test.go b/fix/fixer_amazon_enhanced_networking_test.go
new file mode 100644
index 000000000..f8b5be178
--- /dev/null
+++ b/fix/fixer_amazon_enhanced_networking_test.go
@@ -0,0 +1,64 @@
+package fix
+
+import (
+ "reflect"
+ "testing"
+)
+
+func TestFixerAmazonEnhancedNetworking_Impl(t *testing.T) {
+ var _ Fixer = new(FixerAmazonEnhancedNetworking)
+}
+
+func TestFixerAmazonEnhancedNetworking(t *testing.T) {
+ cases := []struct {
+ Input map[string]interface{}
+ Expected map[string]interface{}
+ }{
+ // Attach field == false
+ {
+ Input: map[string]interface{}{
+ "type": "ebs",
+ "enhanced_networking": false,
+ },
+
+ Expected: map[string]interface{}{
+ "type": "ebs",
+ "ena_support": false,
+ },
+ },
+
+ // Attach field == true
+ {
+ Input: map[string]interface{}{
+ "type": "ebs",
+ "enhanced_networking": true,
+ },
+
+ Expected: map[string]interface{}{
+ "type": "ebs",
+ "ena_support": true,
+ },
+ },
+ }
+
+ for _, tc := range cases {
+ var f FixerAmazonEnhancedNetworking
+
+ input := map[string]interface{}{
+ "builders": []map[string]interface{}{tc.Input},
+ }
+
+ expected := map[string]interface{}{
+ "builders": []map[string]interface{}{tc.Expected},
+ }
+
+ output, err := f.Fix(input)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ if !reflect.DeepEqual(output, expected) {
+ t.Fatalf("unexpected: %#v\nexpected: %#v\n", output, expected)
+ }
+ }
+}
diff --git a/fix/fixer_parallels_deprections.go b/fix/fixer_parallels_deprecations.go
similarity index 100%
rename from fix/fixer_parallels_deprections.go
rename to fix/fixer_parallels_deprecations.go
diff --git a/fix/fixer_parallels_deprections_test.go b/fix/fixer_parallels_deprecations_test.go
similarity index 100%
rename from fix/fixer_parallels_deprections_test.go
rename to fix/fixer_parallels_deprecations_test.go
diff --git a/fix/fixer_sshdisableagent.go b/fix/fixer_sshdisableagent.go
new file mode 100644
index 000000000..b399af52a
--- /dev/null
+++ b/fix/fixer_sshdisableagent.go
@@ -0,0 +1,50 @@
+package fix
+
+import (
+ "github.com/mitchellh/mapstructure"
+)
+
+// FixerSSHDisableAgent changes the "ssh_disable_agent" of a template
+// to "ssh_disable_agent_forwarding".
+type FixerSSHDisableAgent struct{}
+
+func (FixerSSHDisableAgent) Fix(input map[string]interface{}) (map[string]interface{}, error) {
+ // The type we'll decode into; we only care about builders
+ type template struct {
+ Builders []map[string]interface{}
+ }
+
+ // Decode the input into our structure, if we can
+ var tpl template
+ if err := mapstructure.Decode(input, &tpl); err != nil {
+ return nil, err
+ }
+
+ for _, builder := range tpl.Builders {
+ sshDisableAgentRaw, ok := builder["ssh_disable_agent"]
+ if !ok {
+ continue
+ }
+
+ sshDisableAgent, ok := sshDisableAgentRaw.(bool)
+ if !ok {
+ continue
+ }
+
+ // only assign to ssh_disable_agent_forwarding if it doesn't
+ // already exist; otherwise we'll just ignore ssh_disable_agent
+ _, sshDisableAgentIncluded := builder["ssh_disable_agent_forwarding"]
+ if !sshDisableAgentIncluded {
+ builder["ssh_disable_agent_forwarding"] = sshDisableAgent
+ }
+
+ delete(builder, "ssh_disable_agent")
+ }
+
+ input["builders"] = tpl.Builders
+ return input, nil
+}
+
+func (FixerSSHDisableAgent) Synopsis() string {
+ return `Updates builders using "ssh_disable_agent" to use "ssh_disable_agent_forwarding"`
+}
diff --git a/fix/fixer_sshdisableagent_test.go b/fix/fixer_sshdisableagent_test.go
new file mode 100644
index 000000000..c38f9c581
--- /dev/null
+++ b/fix/fixer_sshdisableagent_test.go
@@ -0,0 +1,83 @@
+package fix
+
+import (
+ "reflect"
+ "testing"
+)
+
+func TestFixerSSHDisableAgent_Impl(t *testing.T) {
+ var _ Fixer = new(FixerSSHDisableAgent)
+}
+
+func TestFixerSSHDisableAgent_Fix(t *testing.T) {
+ cases := []struct {
+ Input map[string]interface{}
+ Expected map[string]interface{}
+ }{
+ // No disable_agent field
+ {
+ Input: map[string]interface{}{
+ "type": "virtualbox",
+ },
+
+ Expected: map[string]interface{}{
+ "type": "virtualbox",
+ },
+ },
+
+ // disable_agent_forwarding without disable_agent
+ {
+ Input: map[string]interface{}{
+ "ssh_disable_agent_forwarding": true,
+ },
+
+ Expected: map[string]interface{}{
+ "ssh_disable_agent_forwarding": true,
+ },
+ },
+
+ // disable_agent without disable_agent_forwarding
+ {
+ Input: map[string]interface{}{
+ "ssh_disable_agent": true,
+ },
+
+ Expected: map[string]interface{}{
+ "ssh_disable_agent_forwarding": true,
+ },
+ },
+
+ // disable_agent and disable_agent_forwarding
+ {
+ Input: map[string]interface{}{
+ "ssh_disable_agent": true,
+ "ssh_disable_agent_forwarding": false,
+ },
+
+ Expected: map[string]interface{}{
+ "ssh_disable_agent_forwarding": false,
+ },
+ },
+ }
+
+ for _, tc := range cases {
+ var f FixerSSHDisableAgent
+
+ input := map[string]interface{}{
+ "builders": []map[string]interface{}{tc.Input},
+ }
+
+ expected := map[string]interface{}{
+ "builders": []map[string]interface{}{tc.Expected},
+ }
+
+ output, err := f.Fix(input)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ if !reflect.DeepEqual(output, expected) {
+ t.Fatalf("unexpected: %#v\nexpected: %#v\n", output, expected)
+ }
+ }
+}
diff --git a/helper/communicator/config.go b/helper/communicator/config.go
index a39262abb..243ca224d 100644
--- a/helper/communicator/config.go
+++ b/helper/communicator/config.go
@@ -16,23 +16,23 @@ type Config struct {
Type string `mapstructure:"communicator"`
// SSH
- SSHHost string `mapstructure:"ssh_host"`
- SSHPort int `mapstructure:"ssh_port"`
- SSHUsername string `mapstructure:"ssh_username"`
- SSHPassword string `mapstructure:"ssh_password"`
- SSHPrivateKey string `mapstructure:"ssh_private_key_file"`
- SSHPty bool `mapstructure:"ssh_pty"`
- SSHTimeout time.Duration `mapstructure:"ssh_timeout"`
- SSHAgentAuth bool `mapstructure:"ssh_agent_auth"`
- SSHDisableAgent bool `mapstructure:"ssh_disable_agent"`
- SSHHandshakeAttempts int `mapstructure:"ssh_handshake_attempts"`
- SSHBastionHost string `mapstructure:"ssh_bastion_host"`
- SSHBastionPort int `mapstructure:"ssh_bastion_port"`
- SSHBastionAgentAuth bool `mapstructure:"ssh_bastion_agent_auth"`
- SSHBastionUsername string `mapstructure:"ssh_bastion_username"`
- SSHBastionPassword string `mapstructure:"ssh_bastion_password"`
- SSHBastionPrivateKey string `mapstructure:"ssh_bastion_private_key_file"`
- SSHFileTransferMethod string `mapstructure:"ssh_file_transfer_method"`
+ SSHHost string `mapstructure:"ssh_host"`
+ SSHPort int `mapstructure:"ssh_port"`
+ SSHUsername string `mapstructure:"ssh_username"`
+ SSHPassword string `mapstructure:"ssh_password"`
+ SSHPrivateKey string `mapstructure:"ssh_private_key_file"`
+ SSHPty bool `mapstructure:"ssh_pty"`
+ SSHTimeout time.Duration `mapstructure:"ssh_timeout"`
+ SSHAgentAuth bool `mapstructure:"ssh_agent_auth"`
+ SSHDisableAgentForwarding bool `mapstructure:"ssh_disable_agent_forwarding"`
+ SSHHandshakeAttempts int `mapstructure:"ssh_handshake_attempts"`
+ SSHBastionHost string `mapstructure:"ssh_bastion_host"`
+ SSHBastionPort int `mapstructure:"ssh_bastion_port"`
+ SSHBastionAgentAuth bool `mapstructure:"ssh_bastion_agent_auth"`
+ SSHBastionUsername string `mapstructure:"ssh_bastion_username"`
+ SSHBastionPassword string `mapstructure:"ssh_bastion_password"`
+ SSHBastionPrivateKey string `mapstructure:"ssh_bastion_private_key_file"`
+ SSHFileTransferMethod string `mapstructure:"ssh_file_transfer_method"`
// WinRM
WinRMUser string `mapstructure:"winrm_username"`
diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go
index 2daee1be6..669d52410 100644
--- a/helper/communicator/step_connect_ssh.go
+++ b/helper/communicator/step_connect_ssh.go
@@ -160,11 +160,11 @@ func (s *StepConnectSSH) waitForSSH(state multistep.StateBag, cancel <-chan stru
// Then we attempt to connect via SSH
config := &ssh.Config{
- Connection: connFunc,
- SSHConfig: sshConfig,
- Pty: s.Config.SSHPty,
- DisableAgent: s.Config.SSHDisableAgent,
- UseSftp: s.Config.SSHFileTransferMethod == "sftp",
+ Connection: connFunc,
+ SSHConfig: sshConfig,
+ Pty: s.Config.SSHPty,
+ DisableAgentForwarding: s.Config.SSHDisableAgentForwarding,
+ UseSftp: s.Config.SSHFileTransferMethod == "sftp",
}
log.Println("[INFO] Attempting SSH connection...")
diff --git a/helper/communicator/step_connect_winrm.go b/helper/communicator/step_connect_winrm.go
index 2318bc1c0..14f5cfc91 100644
--- a/helper/communicator/step_connect_winrm.go
+++ b/helper/communicator/step_connect_winrm.go
@@ -1,13 +1,17 @@
package communicator
import (
+ "bytes"
"errors"
"fmt"
+ "io"
"log"
+ "strings"
"time"
"github.com/hashicorp/packer/communicator/winrm"
"github.com/hashicorp/packer/packer"
+ winrmcmd "github.com/masterzen/winrm"
"github.com/mitchellh/multistep"
)
@@ -141,6 +145,39 @@ func (s *StepConnectWinRM) waitForWinRM(state multistep.StateBag, cancel <-chan
break
}
+ // run an "echo" command to make sure winrm is actually connected before moving on.
+ var connectCheckCommand = winrmcmd.Powershell(`if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'}; echo "WinRM connected."`)
+ var retryableSleep = 5 * time.Second
+ // run an "echo" command to make sure that the winrm is connected
+ for {
+ cmd := &packer.RemoteCmd{Command: connectCheckCommand}
+ var buf, buf2 bytes.Buffer
+ cmd.Stdout = &buf
+ cmd.Stdout = io.MultiWriter(cmd.Stdout, &buf2)
+ select {
+ case <-cancel:
+ log.Println("WinRM wait canceled, exiting loop")
+ return comm, fmt.Errorf("WinRM wait canceled")
+ case <-time.After(retryableSleep):
+ }
+
+ log.Printf("Checking that WinRM is connected with: '%s'", connectCheckCommand)
+ ui := state.Get("ui").(packer.Ui)
+ err := cmd.StartWithUi(comm, ui)
+
+ if err != nil {
+ log.Printf("Communication connection err: %s", err)
+ continue
+ }
+
+ log.Printf("Connected to machine")
+ stdoutToRead := buf2.String()
+ if !strings.Contains(stdoutToRead, "WinRM connected.") {
+ log.Printf("echo didn't succeed; retrying...")
+ continue
+ }
+ break
+ }
return comm, nil
}
diff --git a/main.go b/main.go
index 689780cd4..0f00b9038 100644
--- a/main.go
+++ b/main.go
@@ -78,7 +78,9 @@ func realMain() int {
// Enable checkpoint for panic reporting
if config, _ := loadConfig(); config != nil && !config.DisableCheckpoint {
- packer.CheckpointReporter.Enable(config.DisableCheckpointSignature)
+ packer.CheckpointReporter = packer.NewCheckpointReporter(
+ config.DisableCheckpointSignature,
+ )
}
// Create the configuration for panicwrap and wrap our executable
@@ -144,7 +146,9 @@ func wrappedMain() int {
// Fire off the checkpoint.
go runCheckpoint(config)
if !config.DisableCheckpoint {
- packer.CheckpointReporter.Enable(config.DisableCheckpointSignature)
+ packer.CheckpointReporter = packer.NewCheckpointReporter(
+ config.DisableCheckpointSignature,
+ )
}
cacheDir := os.Getenv("PACKER_CACHE_DIR")
diff --git a/packer/communicator.go b/packer/communicator.go
index ad6a9a5bd..7f01f76cb 100644
--- a/packer/communicator.go
+++ b/packer/communicator.go
@@ -5,6 +5,7 @@ import (
"os"
"strings"
"sync"
+ "unicode"
"github.com/mitchellh/iochan"
)
@@ -154,11 +155,11 @@ OutputLoop:
// Make sure we finish off stdout/stderr because we may have gotten
// a message from the exit channel before finishing these first.
for output := range stdoutCh {
- ui.Message(strings.TrimSpace(output))
+ ui.Message(r.cleanOutputLine(output))
}
for output := range stderrCh {
- ui.Message(strings.TrimSpace(output))
+ ui.Message(r.cleanOutputLine(output))
}
return nil
@@ -196,7 +197,7 @@ func (r *RemoteCmd) Wait() {
// UI output when we're reading from a remote command.
func (r *RemoteCmd) cleanOutputLine(line string) string {
// Trim surrounding whitespace
- line = strings.TrimSpace(line)
+ line = strings.TrimRightFunc(line, unicode.IsSpace)
// Trim up to the first carriage return, since that text would be
// lost anyways.
diff --git a/packer/config_file_unix.go b/packer/config_file_unix.go
index 82260c2a2..512ac42ed 100644
--- a/packer/config_file_unix.go
+++ b/packer/config_file_unix.go
@@ -1,4 +1,4 @@
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin freebsd linux netbsd openbsd solaris
package packer
diff --git a/packer/plugin/plugin_test.go b/packer/plugin/plugin_test.go
index d35e7bb7b..d5867148b 100644
--- a/packer/plugin/plugin_test.go
+++ b/packer/plugin/plugin_test.go
@@ -2,12 +2,13 @@ package plugin
import (
"fmt"
- "github.com/hashicorp/packer/packer"
"log"
"os"
"os/exec"
"testing"
"time"
+
+ "github.com/hashicorp/packer/packer"
)
func helperProcess(s ...string) *exec.Cmd {
@@ -48,7 +49,7 @@ func TestHelperProcess(*testing.T) {
os.Exit(2)
}
- cmd, args := args[0], args[1:]
+ cmd, _ := args[0], args[1:]
switch cmd {
case "bad-version":
fmt.Printf("%s1|tcp|:1234\n", APIVersion)
diff --git a/packer/rpc/communicator.go b/packer/rpc/communicator.go
index e1aab41e0..fbfe0c538 100644
--- a/packer/rpc/communicator.go
+++ b/packer/rpc/communicator.go
@@ -6,6 +6,7 @@ import (
"log"
"net/rpc"
"os"
+ "sync"
"github.com/hashicorp/packer/packer"
)
@@ -67,19 +68,31 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
var args CommunicatorStartArgs
args.Command = cmd.Command
+ var wg sync.WaitGroup
+
if cmd.Stdin != nil {
args.StdinStreamId = c.mux.NextId()
- go serveSingleCopy("stdin", c.mux, args.StdinStreamId, nil, cmd.Stdin)
+ go func() {
+ serveSingleCopy("stdin", c.mux, args.StdinStreamId, nil, cmd.Stdin)
+ }()
}
if cmd.Stdout != nil {
+ wg.Add(1)
args.StdoutStreamId = c.mux.NextId()
- go serveSingleCopy("stdout", c.mux, args.StdoutStreamId, cmd.Stdout, nil)
+ go func() {
+ defer wg.Done()
+ serveSingleCopy("stdout", c.mux, args.StdoutStreamId, cmd.Stdout, nil)
+ }()
}
if cmd.Stderr != nil {
+ wg.Add(1)
args.StderrStreamId = c.mux.NextId()
- go serveSingleCopy("stderr", c.mux, args.StderrStreamId, cmd.Stderr, nil)
+ go func() {
+ defer wg.Done()
+ serveSingleCopy("stderr", c.mux, args.StderrStreamId, cmd.Stderr, nil)
+ }()
}
responseStreamId := c.mux.NextId()
@@ -87,6 +100,7 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
go func() {
conn, err := c.mux.Accept(responseStreamId)
+ wg.Wait()
if err != nil {
log.Printf("[ERR] Error accepting response stream %d: %s",
responseStreamId, err)
diff --git a/packer/telemetry.go b/packer/telemetry.go
index 5e66acd19..7224de582 100644
--- a/packer/telemetry.go
+++ b/packer/telemetry.go
@@ -14,11 +14,7 @@ import (
const TelemetryVersion string = "beta/packer/4"
const TelemetryPanicVersion string = "beta/packer_panic/4"
-var CheckpointReporter CheckpointTelemetry
-
-func init() {
- CheckpointReporter.startTime = time.Now().UTC()
-}
+var CheckpointReporter *CheckpointTelemetry
type PackerReport struct {
Spans []*TelemetrySpan `json:"spans"`
@@ -28,17 +24,20 @@ type PackerReport struct {
}
type CheckpointTelemetry struct {
- enabled bool
spans []*TelemetrySpan
signatureFile string
startTime time.Time
}
-func (c *CheckpointTelemetry) Enable(disableSignature bool) {
+func NewCheckpointReporter(disableSignature bool) *CheckpointTelemetry {
+ if disabled := os.Getenv("CHECKPOINT_DISABLE"); disabled != "" {
+ return nil
+ }
+
configDir, err := ConfigDir()
if err != nil {
log.Printf("[WARN] (telemetry) setup error: %s", err)
- return
+ return nil
}
signatureFile := ""
@@ -48,8 +47,10 @@ func (c *CheckpointTelemetry) Enable(disableSignature bool) {
signatureFile = filepath.Join(configDir, "checkpoint_signature")
}
- c.signatureFile = signatureFile
- c.enabled = true
+ return &CheckpointTelemetry{
+ signatureFile: signatureFile,
+ startTime: time.Now().UTC(),
+ }
}
func (c *CheckpointTelemetry) baseParams(prefix string) *checkpoint.ReportParams {
@@ -69,7 +70,7 @@ func (c *CheckpointTelemetry) baseParams(prefix string) *checkpoint.ReportParams
}
func (c *CheckpointTelemetry) ReportPanic(m string) error {
- if !c.enabled {
+ if c == nil {
return nil
}
panicParams := c.baseParams(TelemetryPanicVersion)
@@ -85,6 +86,9 @@ func (c *CheckpointTelemetry) ReportPanic(m string) error {
}
func (c *CheckpointTelemetry) AddSpan(name, pluginType string) *TelemetrySpan {
+ if c == nil {
+ return nil
+ }
log.Printf("[INFO] (telemetry) Starting %s %s", pluginType, name)
ts := &TelemetrySpan{
Name: name,
@@ -96,7 +100,7 @@ func (c *CheckpointTelemetry) AddSpan(name, pluginType string) *TelemetrySpan {
}
func (c *CheckpointTelemetry) Finalize(command string, errCode int, err error) error {
- if !c.enabled {
+ if c == nil {
return nil
}
@@ -113,9 +117,10 @@ func (c *CheckpointTelemetry) Finalize(command string, errCode int, err error) e
}
params.Payload = extra
- ctx, cancel := context.WithTimeout(context.Background(), 550*time.Millisecond)
+ ctx, cancel := context.WithTimeout(context.Background(), 1500*time.Millisecond)
defer cancel()
+ log.Printf("[INFO] (telemetry) Finalizing.")
return checkpoint.Report(ctx, params)
}
@@ -128,6 +133,9 @@ type TelemetrySpan struct {
}
func (s *TelemetrySpan) End(err error) {
+ if s == nil {
+ return
+ }
s.EndTime = time.Now().UTC()
log.Printf("[INFO] (telemetry) ending %s", s.Name)
if err != nil {
diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go
index 9dad49b25..9b06e61ec 100644
--- a/post-processor/atlas/post-processor.go
+++ b/post-processor/atlas/post-processor.go
@@ -144,15 +144,12 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) {
// todo: remove/reword after the migration
if p.config.Type == "vagrant.box" {
- ui.Message("\n-----------------------------------------------------------------------------------\n" +
- "Warning: Vagrant-related functionality will be moved from Terraform Enterprise into \n" +
- "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" +
- "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" +
+ return nil, false, fmt.Errorf("Vagrant-related functionality has been removed from Terraform\n" +
+ "Enterprise into its own product, Vagrant Cloud. For more information see\n" +
"https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" +
- "In the meantime, you should activate your Vagrant Cloud account and replace your \n" +
- "Atlas post-processor with the Vagrant Cloud post-processor. See\n" +
- "https://www.packer.io/docs/post-processors/vagrant-cloud.html for more details." +
- "-----------------------------------------------------------------------------------\n")
+ "Please replace the Atlas post-processor with the Vagrant Cloud post-processor,\n" +
+ "and see https://www.packer.io/docs/post-processors/vagrant-cloud.html for\n" +
+ "more detail.\n")
}
if _, err := p.client.Artifact(p.config.user, p.config.name); err != nil {
if err != atlas.ErrNotFound {
diff --git a/post-processor/checksum/post-processor.go b/post-processor/checksum/post-processor.go
index 2ae6da164..70295c878 100644
--- a/post-processor/checksum/post-processor.go
+++ b/post-processor/checksum/post-processor.go
@@ -57,9 +57,10 @@ func getHash(t string) hash.Hash {
func (p *PostProcessor) Configure(raws ...interface{}) error {
err := config.Decode(&p.config, &config.DecodeOpts{
- Interpolate: true,
+ Interpolate: true,
+ InterpolateContext: &p.config.ctx,
InterpolateFilter: &interpolate.RenderFilter{
- Exclude: []string{},
+ Exclude: []string{"output"},
},
}, raws...)
if err != nil {
diff --git a/post-processor/googlecompute-export/post-processor.go b/post-processor/googlecompute-export/post-processor.go
index 9fd39aa46..8a5befbc8 100644
--- a/post-processor/googlecompute-export/post-processor.go
+++ b/post-processor/googlecompute-export/post-processor.go
@@ -120,14 +120,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
}
// Run the steps.
- if p.config.PackerDebug {
- p.runner = &multistep.DebugRunner{
- Steps: steps,
- PauseFn: common.MultistepDebugFn(ui),
- }
- } else {
- p.runner = &multistep.BasicRunner{Steps: steps}
- }
+ p.runner = common.NewRunner(steps, p.config.PackerConfig, ui)
p.runner.Run(state)
}
diff --git a/post-processor/vagrant-cloud/post-processor.go b/post-processor/vagrant-cloud/post-processor.go
index 01575def7..b8eeb7105 100644
--- a/post-processor/vagrant-cloud/post-processor.go
+++ b/post-processor/vagrant-cloud/post-processor.go
@@ -164,15 +164,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
}
// Run the steps
- if p.config.PackerDebug {
- p.runner = &multistep.DebugRunner{
- Steps: steps,
- PauseFn: common.MultistepDebugFn(ui),
- }
- } else {
- p.runner = &multistep.BasicRunner{Steps: steps}
- }
-
+ p.runner = common.NewRunner(steps, p.config.PackerConfig, ui)
p.runner.Run(state)
// If there was an error, return that
diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go
index 7b6b25e93..cc4db611f 100644
--- a/post-processor/vagrant-cloud/step_release_version.go
+++ b/post-processor/vagrant-cloud/step_release_version.go
@@ -2,9 +2,10 @@ package vagrantcloud
import (
"fmt"
+ "strings"
+
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
- "strings"
)
type stepReleaseVersion struct {
@@ -30,7 +31,10 @@ func (s *stepReleaseVersion) Run(state multistep.StateBag) multistep.StepAction
if err != nil || (resp.StatusCode != 200) {
cloudErrors := &VagrantCloudErrors{}
- err = decodeBody(resp, cloudErrors)
+ if err := decodeBody(resp, cloudErrors); err != nil {
+ state.Put("error", fmt.Errorf("Error parsing provider response: %s", err))
+ return multistep.ActionHalt
+ }
if strings.Contains(cloudErrors.FormatErrors(), "already been released") {
ui.Message("Not releasing version, already released")
return multistep.ActionContinue
diff --git a/post-processor/vagrant/hyperv.go b/post-processor/vagrant/hyperv.go
index cf71820e9..14486738b 100644
--- a/post-processor/vagrant/hyperv.go
+++ b/post-processor/vagrant/hyperv.go
@@ -2,10 +2,11 @@ package vagrant
import (
"fmt"
- "github.com/hashicorp/packer/packer"
"os"
"path/filepath"
"strings"
+
+ "github.com/hashicorp/packer/packer"
)
type HypervProvider struct{}
@@ -55,10 +56,18 @@ func (p *HypervProvider) Process(ui packer.Ui, artifact packer.Artifact, dir str
dstPath := filepath.Join(dstDir, filepath.Base(path))
- if err = CopyContents(dstPath, path); err != nil {
- ui.Message(fmt.Sprintf("err in copying: %s to %s", path, dstPath))
- return
+ // We prefer to link the files where possible because they are often very huge.
+ // Some filesystem configurations do not allow hardlinks. As the possibilities
+ // of mounting different devices in different paths are flexible, we just try to
+ // link the file and copy if the link fails, thereby automatically optimizing with a safe fallback.
+ if err = LinkFile(dstPath, path); err != nil {
+ // ui.Message(fmt.Sprintf("err in linking: %s to %s", path, dstPath))
+ if err = CopyContents(dstPath, path); err != nil {
+ ui.Message(fmt.Sprintf("err in copying: %s to %s", path, dstPath))
+ return
+ }
}
+
ui.Message(fmt.Sprintf("Copyed %s to %s", path, dstPath))
}
diff --git a/post-processor/vagrant/util.go b/post-processor/vagrant/util.go
index bc154d640..de80912bb 100644
--- a/post-processor/vagrant/util.go
+++ b/post-processor/vagrant/util.go
@@ -32,7 +32,7 @@ func CopyContents(dst, src string) error {
dstDir, _ := filepath.Split(dst)
if dstDir != "" {
- err := os.MkdirAll(dstDir, os.ModePerm)
+ err := os.MkdirAll(dstDir, 0755)
if err != nil {
return err
}
@@ -51,6 +51,23 @@ func CopyContents(dst, src string) error {
return nil
}
+// Creates a (hard) link to a file, ensuring that all parent directories also exist.
+func LinkFile(dst, src string) error {
+ dstDir, _ := filepath.Split(dst)
+ if dstDir != "" {
+ err := os.MkdirAll(dstDir, 0755)
+ if err != nil {
+ return err
+ }
+ }
+
+ if err := os.Link(src, dst); err != nil {
+ return err
+ }
+
+ return nil
+}
+
// DirToBox takes the directory and compresses it into a Vagrant-compatible
// box. This function does not perform checks to verify that dir is
// actually a proper box. This is an expected precondition.
diff --git a/post-processor/vsphere-template/post-processor.go b/post-processor/vsphere-template/post-processor.go
new file mode 100644
index 000000000..86c9f54b4
--- /dev/null
+++ b/post-processor/vsphere-template/post-processor.go
@@ -0,0 +1,132 @@
+package vsphere_template
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "strings"
+ "time"
+
+ "github.com/hashicorp/packer/common"
+ "github.com/hashicorp/packer/helper/config"
+ "github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/mitchellh/multistep"
+ "github.com/vmware/govmomi"
+)
+
+var builtins = map[string]string{
+ "mitchellh.vmware-esx": "vmware",
+}
+
+type Config struct {
+ common.PackerConfig `mapstructure:",squash"`
+ Host string `mapstructure:"host"`
+ Insecure bool `mapstructure:"insecure"`
+ Username string `mapstructure:"username"`
+ Password string `mapstructure:"password"`
+ Datacenter string `mapstructure:"datacenter"`
+ Folder string `mapstructure:"folder"`
+
+ ctx interpolate.Context
+}
+
+type PostProcessor struct {
+ config Config
+ url *url.URL
+}
+
+func (p *PostProcessor) Configure(raws ...interface{}) error {
+ err := config.Decode(&p.config, &config.DecodeOpts{
+ Interpolate: true,
+ InterpolateContext: &p.config.ctx,
+ InterpolateFilter: &interpolate.RenderFilter{
+ Exclude: []string{},
+ },
+ }, raws...)
+
+ if err != nil {
+ return err
+ }
+
+ errs := new(packer.MultiError)
+ vc := map[string]*string{
+ "host": &p.config.Host,
+ "username": &p.config.Username,
+ "password": &p.config.Password,
+ }
+
+ for key, ptr := range vc {
+ if *ptr == "" {
+ errs = packer.MultiErrorAppend(
+ errs, fmt.Errorf("%s must be set", key))
+ }
+ }
+
+ if p.config.Folder != "" && !strings.HasPrefix(p.config.Folder, "/") {
+ errs = packer.MultiErrorAppend(
+ errs, fmt.Errorf("Folder must be bound to the root"))
+ }
+
+ sdk, err := url.Parse(fmt.Sprintf("https://%v/sdk", p.config.Host))
+ if err != nil {
+ errs = packer.MultiErrorAppend(
+ errs, fmt.Errorf("Error invalid vSphere sdk endpoint: %s", err))
+ }
+
+ sdk.User = url.UserPassword(p.config.Username, p.config.Password)
+ p.url = sdk
+
+ if len(errs.Errors) > 0 {
+ return errs
+ }
+ return nil
+}
+
+func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) {
+ if _, ok := builtins[artifact.BuilderId()]; !ok {
+ return nil, false, fmt.Errorf("Unknown artifact type, can't build box: %s", artifact.BuilderId())
+ }
+
+ source := ""
+ for _, path := range artifact.Files() {
+ if strings.HasSuffix(path, ".vmx") {
+ source = path
+ break
+ }
+ }
+ // In some occasions the VM state is powered on and if we immediately try to mark as template
+ // (after the ESXi creates it) it will fail. If vSphere is given a few seconds this behavior doesn't reappear.
+ ui.Message("Waiting 10s for VMware vSphere to start")
+ time.Sleep(10 * time.Second)
+ c, err := govmomi.NewClient(context.Background(), p.url, p.config.Insecure)
+ if err != nil {
+ return nil, false, fmt.Errorf("Error connecting to vSphere: %s", err)
+ }
+
+ defer c.Logout(context.Background())
+
+ state := new(multistep.BasicStateBag)
+ state.Put("ui", ui)
+ state.Put("client", c)
+
+ steps := []multistep.Step{
+ &stepChooseDatacenter{
+ Datacenter: p.config.Datacenter,
+ },
+ &stepCreateFolder{
+ Folder: p.config.Folder,
+ },
+ &stepMarkAsTemplate{
+ VMName: artifact.Id(),
+ Source: source,
+ },
+ }
+ runner := common.NewRunnerWithPauseFn(steps, p.config.PackerConfig, ui, state)
+ runner.Run(state)
+
+ if rawErr, ok := state.GetOk("error"); ok {
+ return nil, false, rawErr.(error)
+ }
+ return artifact, true, nil
+}
diff --git a/post-processor/vsphere-template/step_choose_datacenter.go b/post-processor/vsphere-template/step_choose_datacenter.go
new file mode 100644
index 000000000..51959b6d7
--- /dev/null
+++ b/post-processor/vsphere-template/step_choose_datacenter.go
@@ -0,0 +1,35 @@
+package vsphere_template
+
+import (
+ "context"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "github.com/vmware/govmomi"
+ "github.com/vmware/govmomi/find"
+)
+
+type stepChooseDatacenter struct {
+ Datacenter string
+}
+
+func (s *stepChooseDatacenter) Run(state multistep.StateBag) multistep.StepAction {
+ ui := state.Get("ui").(packer.Ui)
+ cli := state.Get("client").(*govmomi.Client)
+ finder := find.NewFinder(cli.Client, false)
+
+ ui.Message("Choosing datacenter...")
+
+ dc, err := finder.DatacenterOrDefault(context.Background(), s.Datacenter)
+ if err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ state.Put("dcPath", dc.InventoryPath)
+
+ return multistep.ActionContinue
+}
+
+func (s *stepChooseDatacenter) Cleanup(multistep.StateBag) {}
diff --git a/post-processor/vsphere-template/step_create_folder.go b/post-processor/vsphere-template/step_create_folder.go
new file mode 100644
index 000000000..a0e648275
--- /dev/null
+++ b/post-processor/vsphere-template/step_create_folder.go
@@ -0,0 +1,86 @@
+package vsphere_template
+
+import (
+ "context"
+ "fmt"
+ "path"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "github.com/vmware/govmomi"
+ "github.com/vmware/govmomi/object"
+)
+
+type stepCreateFolder struct {
+ Folder string
+}
+
+func (s *stepCreateFolder) Run(state multistep.StateBag) multistep.StepAction {
+ ui := state.Get("ui").(packer.Ui)
+ cli := state.Get("client").(*govmomi.Client)
+ dcPath := state.Get("dcPath").(string)
+
+ ui.Message("Creating or checking destination folders...")
+
+ base := path.Join(dcPath, "vm")
+ fullPath := path.Join(base, s.Folder)
+ si := object.NewSearchIndex(cli.Client)
+
+ var folders []string
+ var err error
+ var ref object.Reference
+
+ // We iterate over the path starting with full path
+ // If we don't find it, we save the folder name and continue with the previous path
+ // The iteration ends when we find an existing path otherwise it throws error
+ for {
+ ref, err = si.FindByInventoryPath(context.Background(), fullPath)
+ if err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ if ref == nil {
+ dir, folder := path.Split(fullPath)
+ fullPath = path.Clean(dir)
+
+ if fullPath == dcPath {
+ err = fmt.Errorf("vSphere base path %s not found", base)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ folders = append(folders, folder)
+ } else {
+ break
+ }
+ }
+
+ if root, ok := ref.(*object.Folder); ok {
+ for i := len(folders) - 1; i >= 0; i-- {
+ ui.Message(fmt.Sprintf("Creating folder: %v", folders[i]))
+
+ root, err = root.CreateFolder(context.Background(), folders[i])
+ if err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ fullPath = path.Join(fullPath, folders[i])
+ }
+ root.SetInventoryPath(fullPath)
+ state.Put("folder", root)
+ } else {
+ err = fmt.Errorf("folder not found: '%v'", ref)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ return multistep.ActionContinue
+}
+
+func (s *stepCreateFolder) Cleanup(multistep.StateBag) {}
diff --git a/post-processor/vsphere-template/step_mark_as_template.go b/post-processor/vsphere-template/step_mark_as_template.go
new file mode 100644
index 000000000..0e5465054
--- /dev/null
+++ b/post-processor/vsphere-template/step_mark_as_template.go
@@ -0,0 +1,118 @@
+package vsphere_template
+
+import (
+ "context"
+ "fmt"
+ "path"
+ "strings"
+
+ "github.com/hashicorp/packer/packer"
+ "github.com/mitchellh/multistep"
+ "github.com/vmware/govmomi"
+ "github.com/vmware/govmomi/object"
+)
+
+type stepMarkAsTemplate struct {
+ VMName string
+ Source string
+}
+
+func (s *stepMarkAsTemplate) Run(state multistep.StateBag) multistep.StepAction {
+ ui := state.Get("ui").(packer.Ui)
+ cli := state.Get("client").(*govmomi.Client)
+ folder := state.Get("folder").(*object.Folder)
+ dcPath := state.Get("dcPath").(string)
+
+ ui.Message("Marking as a template...")
+
+ vm, err := findRuntimeVM(cli, dcPath, s.VMName)
+ if err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ host, err := vm.HostSystem(context.Background())
+ if err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ if err := vm.Unregister(context.Background()); err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ source := strings.Split(s.Source, "/vmfs/volumes/")[1]
+ i := strings.Index(source, "/")
+
+ path := (&object.DatastorePath{
+ Datastore: source[:i],
+ Path: source[i:],
+ }).String()
+
+ if err := unregisterPreviousVM(cli, folder, s.VMName); err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ task, err := folder.RegisterVM(context.Background(), path, s.VMName, true, nil, host)
+ if err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ if err = task.Wait(context.Background()); err != nil {
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
+
+ return multistep.ActionContinue
+}
+
+// We will use the virtual machine created by vmware-iso builder
+func findRuntimeVM(cli *govmomi.Client, dcPath, name string) (*object.VirtualMachine, error) {
+ si := object.NewSearchIndex(cli.Client)
+ fullPath := path.Join(dcPath, "vm", "Discovered virtual machine", name)
+
+ ref, err := si.FindByInventoryPath(context.Background(), fullPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if ref == nil {
+ return nil, fmt.Errorf("VM at path %s not found", fullPath)
+ }
+
+ return ref.(*object.VirtualMachine), nil
+}
+
+// If in the target folder a virtual machine or template already exists
+// it will be removed to maintain consistency
+func unregisterPreviousVM(cli *govmomi.Client, folder *object.Folder, name string) error {
+ si := object.NewSearchIndex(cli.Client)
+ fullPath := path.Join(folder.InventoryPath, name)
+
+ ref, err := si.FindByInventoryPath(context.Background(), fullPath)
+ if err != nil {
+ return err
+ }
+
+ if ref != nil {
+ if vm, ok := ref.(*object.VirtualMachine); ok {
+ return vm.Unregister(context.Background())
+ } else {
+ return fmt.Errorf("an object name '%v' already exists", name)
+ }
+
+ }
+
+ return nil
+}
+
+func (s *stepMarkAsTemplate) Cleanup(multistep.StateBag) {}
diff --git a/provisioner/chef-solo/provisioner.go b/provisioner/chef-solo/provisioner.go
index 99d73ec36..9ca8bba2c 100644
--- a/provisioner/chef-solo/provisioner.go
+++ b/provisioner/chef-solo/provisioner.go
@@ -33,7 +33,7 @@ var guestOSTypeConfigs = map[string]guestOSTypeConfig{
},
provisioner.WindowsOSType: {
executeCommand: "c:/opscode/chef/bin/chef-solo.bat --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
- installCommand: "powershell.exe -Command \". { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; Install-Project{{if .Version}} -v {{.Version}}{{end}}\"",
+ installCommand: "powershell.exe -Command \". { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; Install-Project{{if .Version}} -version {{.Version}}{{end}}\"",
stagingDir: "C:/Windows/Temp/packer-chef-solo",
},
}
diff --git a/provisioner/powershell/elevated.go b/provisioner/powershell/elevated.go
index d2c23f757..6e0faa3d6 100644
--- a/provisioner/powershell/elevated.go
+++ b/provisioner/powershell/elevated.go
@@ -5,16 +5,17 @@ import (
)
type elevatedOptions struct {
- User string
- Password string
- TaskName string
- TaskDescription string
- EncodedCommand string
+ User string
+ Password string
+ TaskName string
+ TaskDescription string
+ LogFile string
+ XMLEscapedCommand string
}
var elevatedTemplate = template.Must(template.New("ElevatedCommand").Parse(`
$name = "{{.TaskName}}"
-$log = "$env:SystemRoot\Temp\$name.out"
+$log = [System.Environment]::ExpandEnvironmentVariables("{{.LogFile}}")
$s = New-Object -ComObject "Schedule.Service"
$s.Connect()
$t = $s.NewTask($null)
@@ -53,7 +54,7 @@ $t.XmlText = @'
cmd
- /c powershell.exe -EncodedCommand {{.EncodedCommand}} > %SYSTEMROOT%\Temp\{{.TaskName}}.out 2>&1
+ /c {{.XMLEscapedCommand}}
diff --git a/provisioner/powershell/powershell.go b/provisioner/powershell/powershell.go
deleted file mode 100644
index 086e3e554..000000000
--- a/provisioner/powershell/powershell.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package powershell
-
-import (
- "encoding/base64"
- "encoding/binary"
- "unicode/utf16"
- "unicode/utf8"
-
- "golang.org/x/text/encoding/unicode"
-)
-
-func convertUtf8ToUtf16LE(message string) (string, error) {
- utf16le := unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)
- utfEncoder := utf16le.NewEncoder()
- ut16LeEncodedMessage, err := utfEncoder.String(message)
-
- return ut16LeEncodedMessage, err
-}
-
-// UTF16BytesToString converts UTF-16 encoded bytes, in big or little endian byte order,
-// to a UTF-8 encoded string.
-func UTF16BytesToString(b []byte, o binary.ByteOrder) string {
- utf := make([]uint16, (len(b)+(2-1))/2)
- for i := 0; i+(2-1) < len(b); i += 2 {
- utf[i/2] = o.Uint16(b[i:])
- }
- if len(b)/2 < len(utf) {
- utf[len(utf)-1] = utf8.RuneError
- }
- return string(utf16.Decode(utf))
-}
-
-func powershellEncode(message string) (string, error) {
- utf16LEEncodedMessage, err := convertUtf8ToUtf16LE(message)
- if err != nil {
- return "", err
- }
-
- // Base64 encode the command
- input := []uint8(utf16LEEncodedMessage)
- return base64.StdEncoding.EncodeToString(input), nil
-}
-
-func powershellDecode(messageBase64 string) (retour string, err error) {
- messageUtf16LeByteArray, err := base64.StdEncoding.DecodeString(messageBase64)
-
- if err != nil {
- return "", err
- }
-
- message := UTF16BytesToString(messageUtf16LeByteArray, binary.LittleEndian)
-
- return message, nil
-}
diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go
index 1443c56dc..4297acf08 100644
--- a/provisioner/powershell/provisioner.go
+++ b/provisioner/powershell/provisioner.go
@@ -1,10 +1,11 @@
// This package implements a provisioner for Packer that executes
-// shell scripts within the remote machine.
+// powershell scripts within the remote machine.
package powershell
import (
"bufio"
"bytes"
+ "encoding/xml"
"errors"
"fmt"
"io/ioutil"
@@ -21,8 +22,6 @@ import (
"github.com/hashicorp/packer/template/interpolate"
)
-const DefaultRemotePath = "c:/Windows/Temp/script.ps1"
-
var retryableSleep = 2 * time.Second
type Config struct {
@@ -36,7 +35,7 @@ type Config struct {
// in the context of a single shell.
Inline []string
- // The local path of the shell script to upload and execute.
+ // The local path of the powershell script to upload and execute.
Script string
// An array of multiple scripts to run.
@@ -46,7 +45,7 @@ type Config struct {
// your command(s) are executed.
Vars []string `mapstructure:"environment_vars"`
- // The remote path where the local shell script will be uploaded to.
+ // The remote path where the local powershell script will be uploaded to.
// This should be set to a writable file that is in a pre-existing directory.
RemotePath string `mapstructure:"remote_path"`
@@ -104,6 +103,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{
"execute_command",
+ "elevated_execute_command",
},
},
}, raws...)
@@ -113,7 +113,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
if p.config.EnvVarFormat == "" {
- p.config.EnvVarFormat = `$env:%s="%s"; `
+ p.config.EnvVarFormat = `$env:%s=\"%s\"; `
}
if p.config.ElevatedEnvVarFormat == "" {
@@ -121,11 +121,11 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
if p.config.ExecuteCommand == "" {
- p.config.ExecuteCommand = `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode`
+ p.config.ExecuteCommand = `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode }"`
}
if p.config.ElevatedExecuteCommand == "" {
- p.config.ElevatedExecuteCommand = `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode`
+ p.config.ElevatedExecuteCommand = `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; &'{{.Path}}'; exit $LastExitCode }"`
}
if p.config.Inline != nil && len(p.config.Inline) == 0 {
@@ -137,7 +137,8 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
if p.config.RemotePath == "" {
- p.config.RemotePath = DefaultRemotePath
+ uuid := uuid.TimeOrderedUUID()
+ p.config.RemotePath = fmt.Sprintf(`c:/Windows/Temp/script-%s.ps1`, uuid)
}
if p.config.Scripts == nil {
@@ -216,12 +217,12 @@ func extractScript(p *Provisioner) (string, error) {
for _, command := range p.config.Inline {
log.Printf("Found command: %s", command)
if _, err := writer.WriteString(command + "\n"); err != nil {
- return "", fmt.Errorf("Error preparing shell script: %s", err)
+ return "", fmt.Errorf("Error preparing powershell script: %s", err)
}
}
if err := writer.Flush(); err != nil {
- return "", fmt.Errorf("Error preparing shell script: %s", err)
+ return "", fmt.Errorf("Error preparing powershell script: %s", err)
}
return temp.Name(), nil
@@ -243,12 +244,12 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
}
for _, path := range scripts {
- ui.Say(fmt.Sprintf("Provisioning with shell script: %s", path))
+ ui.Say(fmt.Sprintf("Provisioning with powershell script: %s", path))
log.Printf("Opening %s for reading", path)
f, err := os.Open(path)
if err != nil {
- return fmt.Errorf("Error opening shell script: %s", err)
+ return fmt.Errorf("Error opening powershell script: %s", err)
}
defer f.Close()
@@ -267,7 +268,6 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
if _, err := f.Seek(0, 0); err != nil {
return err
}
-
if err := comm.Upload(p.config.RemotePath, f, nil); err != nil {
return fmt.Errorf("Error uploading script: %s", err)
}
@@ -390,34 +390,27 @@ func (p *Provisioner) createCommandTextNonPrivileged() (command string, err erro
return "", fmt.Errorf("Error processing command: %s", err)
}
- commandText, err := p.generateCommandLineRunner(command)
- if err != nil {
- return "", fmt.Errorf("Error generating command line runner: %s", err)
- }
-
- return commandText, err
-}
-
-func (p *Provisioner) generateCommandLineRunner(command string) (commandText string, err error) {
- log.Printf("Building command line for: %s", command)
-
- base64EncodedCommand, err := powershellEncode(command)
- if err != nil {
- return "", fmt.Errorf("Error encoding command: %s", err)
- }
-
- commandText = "powershell -executionpolicy bypass -encodedCommand " + base64EncodedCommand
-
- return commandText, nil
+ // Return the interpolated command
+ return command, nil
}
func (p *Provisioner) createCommandTextPrivileged() (command string, err error) {
// Can't double escape the env vars, lets create shiny new ones
flattenedEnvVars := p.createFlattenedEnvVars(true)
+ // Need to create a mini ps1 script containing all of the environment variables we want;
+ // we'll be dot-sourcing this later
+ envVarReader := strings.NewReader(flattenedEnvVars)
+ uuid := uuid.TimeOrderedUUID()
+ envVarPath := fmt.Sprintf(`${env:SYSTEMROOT}\Temp\packer-env-vars-%s.ps1`, uuid)
+ log.Printf("Uploading env vars to %s", envVarPath)
+ err = p.communicator.Upload(envVarPath, envVarReader, nil)
+ if err != nil {
+ return "", fmt.Errorf("Error preparing elevated powershell script: %s", err)
+ }
p.config.ctx.Data = &ExecuteCommandTemplate{
- Vars: flattenedEnvVars,
Path: p.config.RemotePath,
+ Vars: envVarPath,
}
command, err = interpolate.Render(p.config.ElevatedExecuteCommand, &p.config.ctx)
if err != nil {
@@ -440,49 +433,54 @@ func (p *Provisioner) createCommandTextPrivileged() (command string, err error)
func (p *Provisioner) generateElevatedRunner(command string) (uploadedPath string, err error) {
log.Printf("Building elevated command wrapper for: %s", command)
- // generate command
var buffer bytes.Buffer
- base64EncodedCommand, err := powershellEncode(command)
- if err != nil {
- return "", fmt.Errorf("Error encoding command: %s", err)
- }
+ // Output from the elevated command cannot be returned directly to
+ // the Packer console. In order to be able to view output from elevated
+ // commands and scripts an indirect approach is used by which the
+ // commands output is first redirected to file. The output file is then
+ // 'watched' by Packer while the elevated command is running and any
+ // content appearing in the file is written out to the console.
+ // Below the portion of command required to redirect output from the
+ // command to file is built and appended to the existing command string
+ taskName := fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID())
+ // Only use %ENVVAR% format for environment variables when setting
+ // the log file path; Do NOT use $env:ENVVAR format as it won't be
+ // expanded correctly in the elevatedTemplate
+ logFile := `%SYSTEMROOT%\Temp\` + taskName + ".out"
+ command += fmt.Sprintf(" > %s 2>&1", logFile)
+ // elevatedTemplate wraps the command in a single quoted XML text
+ // string so we need to escape characters considered 'special' in XML.
+ err = xml.EscapeText(&buffer, []byte(command))
+ if err != nil {
+ return "", fmt.Errorf("Error escaping characters special to XML in command %s: %s", command, err)
+ }
+ escapedCommand := buffer.String()
+ log.Printf("Command [%s] converted to [%s] for use in XML string", command, escapedCommand)
+
+ buffer.Reset()
+
+ // Generate command
err = elevatedTemplate.Execute(&buffer, elevatedOptions{
- User: p.config.ElevatedUser,
- Password: p.config.ElevatedPassword,
- TaskDescription: "Packer elevated task",
- TaskName: fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID()),
- EncodedCommand: base64EncodedCommand,
+ User: p.config.ElevatedUser,
+ Password: p.config.ElevatedPassword,
+ TaskName: taskName,
+ TaskDescription: "Packer elevated task",
+ LogFile: logFile,
+ XMLEscapedCommand: escapedCommand,
})
if err != nil {
fmt.Printf("Error creating elevated template: %s", err)
return "", err
}
-
- tmpFile, err := ioutil.TempFile(os.TempDir(), "packer-elevated-shell.ps1")
- writer := bufio.NewWriter(tmpFile)
- if _, err := writer.WriteString(string(buffer.Bytes())); err != nil {
- return "", fmt.Errorf("Error preparing elevated shell script: %s", err)
- }
-
- if err := writer.Flush(); err != nil {
- return "", fmt.Errorf("Error preparing elevated shell script: %s", err)
- }
- tmpFile.Close()
- f, err := os.Open(tmpFile.Name())
- if err != nil {
- return "", fmt.Errorf("Error opening temporary elevated shell script: %s", err)
- }
- defer f.Close()
-
uuid := uuid.TimeOrderedUUID()
path := fmt.Sprintf(`${env:TEMP}\packer-elevated-shell-%s.ps1`, uuid)
- log.Printf("Uploading elevated shell wrapper for command [%s] to [%s] from [%s]", command, path, tmpFile.Name())
- err = p.communicator.Upload(path, f, nil)
+ log.Printf("Uploading elevated shell wrapper for command [%s] to [%s]", command, path)
+ err = p.communicator.Upload(path, &buffer, nil)
if err != nil {
- return "", fmt.Errorf("Error preparing elevated shell script: %s", err)
+ return "", fmt.Errorf("Error preparing elevated powershell script: %s", err)
}
// CMD formatted Path required for this op
diff --git a/provisioner/powershell/provisioner_test.go b/provisioner/powershell/provisioner_test.go
index a0d6d80c0..e7e64d52e 100644
--- a/provisioner/powershell/provisioner_test.go
+++ b/provisioner/powershell/provisioner_test.go
@@ -41,6 +41,9 @@ func TestProvisionerPrepare_extractScript(t *testing.T) {
// File contents should contain 2 lines concatenated by newlines: foo\nbar
readFile, err := ioutil.ReadFile(file)
expectedContents := "foo\nbar\n"
+ if err != nil {
+ t.Fatalf("Should not be error: %s", err)
+ }
s := string(readFile[:])
if s != expectedContents {
t.Fatalf("Expected generated inlineScript to equal '%s', got '%s'", expectedContents, s)
@@ -64,7 +67,8 @@ func TestProvisionerPrepare_Defaults(t *testing.T) {
t.Fatalf("err: %s", err)
}
- if p.config.RemotePath != DefaultRemotePath {
+ matched, _ := regexp.MatchString("c:/Windows/Temp/script-.*.ps1", p.config.RemotePath)
+ if !matched {
t.Errorf("unexpected remote path: %s", p.config.RemotePath)
}
@@ -75,12 +79,12 @@ func TestProvisionerPrepare_Defaults(t *testing.T) {
t.Error("expected elevated_password to be empty")
}
- if p.config.ExecuteCommand != `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode` {
- t.Fatalf(`Default command should be "if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode", but got %s`, p.config.ExecuteCommand)
+ if p.config.ExecuteCommand != `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode }"` {
+ t.Fatalf(`Default command should be 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode }"', but got '%s'`, p.config.ExecuteCommand)
}
- if p.config.ElevatedExecuteCommand != `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode` {
- t.Fatalf(`Default command should be "if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode", but got %s`, p.config.ElevatedExecuteCommand)
+ if p.config.ElevatedExecuteCommand != `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; &'{{.Path}}'; exit $LastExitCode }"` {
+ t.Fatalf(`Default command should be 'powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; &'{{.Path}}'; exit $LastExitCode }"', but got '%s'`, p.config.ElevatedExecuteCommand)
}
if p.config.ValidExitCodes == nil {
@@ -409,23 +413,9 @@ func TestProvisionerProvision_Inline(t *testing.T) {
t.Fatal("should not have error")
}
- expectedCommand := `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; &'c:/Windows/Temp/inlineScript.ps1';exit $LastExitCode`
- expectedCommandBase64Encoded := `aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAJABlAG4AdgA6AFAAQQBDAEsARQBSAF8AQgBVAEkATABEAEUAUgBfAFQAWQBQAEUAPQAiAGkAcwBvACIAOwAgACQAZQBuAHYAOgBQAEEAQwBLAEUAUgBfAEIAVQBJAEwARABfAE4AQQBNAEUAPQAiAHYAbQB3AGEAcgBlACIAOwAgACYAJwBjADoALwBXAGkAbgBkAG8AdwBzAC8AVABlAG0AcAAvAGkAbgBsAGkAbgBlAFMAYwByAGkAcAB0AC4AcABzADEAJwA7AGUAeABpAHQAIAAkAEwAYQBzAHQARQB4AGkAdABDAG8AZABlAA==`
- expectedCommandPrefix := `powershell -executionpolicy bypass -encodedCommand `
- expectedCommandEncoded := expectedCommandPrefix + expectedCommandBase64Encoded
-
- actualCommandWithoutPrefix := strings.Replace(comm.StartCmd.Command, expectedCommandPrefix, "", -1)
- actualCommandDecoded, err := powershellDecode(actualCommandWithoutPrefix)
- if err != nil {
- t.Fatal("should not have error when base64 decoding")
- }
-
- if actualCommandDecoded != expectedCommand {
- t.Fatalf("Expected decoded: %s, got %s", expectedCommand, actualCommandDecoded)
- }
-
- if comm.StartCmd.Command != expectedCommandEncoded {
- t.Fatalf("Expect command to be: %s, got %s", expectedCommandEncoded, comm.StartCmd.Command)
+ expectedCommand := `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; &'c:/Windows/Temp/inlineScript.ps1';exit $LastExitCode }"`
+ if comm.StartCmd.Command != expectedCommand {
+ t.Fatalf("Expect command to be: %s, got %s", expectedCommand, comm.StartCmd.Command)
}
envVars := make([]string, 2)
@@ -440,23 +430,9 @@ func TestProvisionerProvision_Inline(t *testing.T) {
t.Fatal("should not have error")
}
- expectedCommand = `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:BAR="BAZ"; $env:FOO="BAR"; $env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; &'c:/Windows/Temp/inlineScript.ps1';exit $LastExitCode`
- expectedCommandBase64Encoded = `aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAJABlAG4AdgA6AEIAQQBSAD0AIgBCAEEAWgAiADsAIAAkAGUAbgB2ADoARgBPAE8APQAiAEIAQQBSACIAOwAgACQAZQBuAHYAOgBQAEEAQwBLAEUAUgBfAEIAVQBJAEwARABFAFIAXwBUAFkAUABFAD0AIgBpAHMAbwAiADsAIAAkAGUAbgB2ADoAUABBAEMASwBFAFIAXwBCAFUASQBMAEQAXwBOAEEATQBFAD0AIgB2AG0AdwBhAHIAZQAiADsAIAAmACcAYwA6AC8AVwBpAG4AZABvAHcAcwAvAFQAZQBtAHAALwBpAG4AbABpAG4AZQBTAGMAcgBpAHAAdAAuAHAAcwAxACcAOwBlAHgAaQB0ACAAJABMAGEAcwB0AEUAeABpAHQAQwBvAGQAZQA=`
- expectedCommandPrefix = `powershell -executionpolicy bypass -encodedCommand `
- expectedCommandEncoded = expectedCommandPrefix + expectedCommandBase64Encoded
-
- actualCommandWithoutPrefix = strings.Replace(comm.StartCmd.Command, expectedCommandPrefix, "", -1)
- actualCommandDecoded, err = powershellDecode(actualCommandWithoutPrefix)
- if err != nil {
- t.Fatal("should not have error when base64 decoding")
- }
-
- if actualCommandDecoded != expectedCommand {
- t.Fatalf("Expected decoded: %s, got %s", expectedCommand, actualCommandDecoded)
- }
-
- if comm.StartCmd.Command != expectedCommandEncoded {
- t.Fatalf("Expect command to be: %s, got %s", expectedCommandEncoded, comm.StartCmd.Command)
+ expectedCommand = `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:BAR=\"BAZ\"; $env:FOO=\"BAR\"; $env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; &'c:/Windows/Temp/inlineScript.ps1';exit $LastExitCode }"`
+ if comm.StartCmd.Command != expectedCommand {
+ t.Fatalf("Expect command to be: %s, got %s", expectedCommand, comm.StartCmd.Command)
}
}
@@ -468,6 +444,7 @@ func TestProvisionerProvision_Scripts(t *testing.T) {
config["scripts"] = []string{tempFile.Name()}
config["packer_build_name"] = "foobuild"
config["packer_builder_type"] = "footype"
+ config["remote_path"] = "c:/Windows/Temp/script.ps1"
ui := testUi()
p := new(Provisioner)
@@ -478,24 +455,11 @@ func TestProvisionerProvision_Scripts(t *testing.T) {
t.Fatal("should not have error")
}
- expectedCommand := `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:PACKER_BUILDER_TYPE="footype"; $env:PACKER_BUILD_NAME="foobuild"; &'c:/Windows/Temp/script.ps1';exit $LastExitCode`
- expectedCommandBase64Encoded := `aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAJABlAG4AdgA6AFAAQQBDAEsARQBSAF8AQgBVAEkATABEAEUAUgBfAFQAWQBQAEUAPQAiAGYAbwBvAHQAeQBwAGUAIgA7ACAAJABlAG4AdgA6AFAAQQBDAEsARQBSAF8AQgBVAEkATABEAF8ATgBBAE0ARQA9ACIAZgBvAG8AYgB1AGkAbABkACIAOwAgACYAJwBjADoALwBXAGkAbgBkAG8AdwBzAC8AVABlAG0AcAAvAHMAYwByAGkAcAB0AC4AcABzADEAJwA7AGUAeABpAHQAIAAkAEwAYQBzAHQARQB4AGkAdABDAG8AZABlAA==`
- expectedCommandPrefix := `powershell -executionpolicy bypass -encodedCommand `
- expectedCommandEncoded := expectedCommandPrefix + expectedCommandBase64Encoded
-
- actualCommandWithoutPrefix := strings.Replace(comm.StartCmd.Command, expectedCommandPrefix, "", -1)
- actualCommandDecoded, err := powershellDecode(actualCommandWithoutPrefix)
- if err != nil {
- t.Fatal("should not have error when base64 decoding")
+ expectedCommand := `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:PACKER_BUILDER_TYPE=\"footype\"; $env:PACKER_BUILD_NAME=\"foobuild\"; &'c:/Windows/Temp/script.ps1';exit $LastExitCode }"`
+ if comm.StartCmd.Command != expectedCommand {
+ t.Fatalf("Expect command to be: %s, got %s", expectedCommand, comm.StartCmd.Command)
}
- if actualCommandDecoded != expectedCommand {
- t.Fatalf("Expected decoded: %s, got %s", expectedCommand, actualCommandDecoded)
- }
-
- if comm.StartCmd.Command != expectedCommandEncoded {
- t.Fatalf("Expect command to be: %s, got %s", expectedCommandEncoded, comm.StartCmd.Command)
- }
}
func TestProvisionerProvision_ScriptsWithEnvVars(t *testing.T) {
@@ -514,6 +478,7 @@ func TestProvisionerProvision_ScriptsWithEnvVars(t *testing.T) {
envVars[0] = "FOO=BAR"
envVars[1] = "BAR=BAZ"
config["environment_vars"] = envVars
+ config["remote_path"] = "c:/Windows/Temp/script.ps1"
p := new(Provisioner)
comm := new(packer.MockCommunicator)
@@ -523,23 +488,9 @@ func TestProvisionerProvision_ScriptsWithEnvVars(t *testing.T) {
t.Fatal("should not have error")
}
- expectedCommand := `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:BAR="BAZ"; $env:FOO="BAR"; $env:PACKER_BUILDER_TYPE="footype"; $env:PACKER_BUILD_NAME="foobuild"; &'c:/Windows/Temp/script.ps1';exit $LastExitCode`
- expectedCommandBase64Encoded := `aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAJABlAG4AdgA6AEIAQQBSAD0AIgBCAEEAWgAiADsAIAAkAGUAbgB2ADoARgBPAE8APQAiAEIAQQBSACIAOwAgACQAZQBuAHYAOgBQAEEAQwBLAEUAUgBfAEIAVQBJAEwARABFAFIAXwBUAFkAUABFAD0AIgBmAG8AbwB0AHkAcABlACIAOwAgACQAZQBuAHYAOgBQAEEAQwBLAEUAUgBfAEIAVQBJAEwARABfAE4AQQBNAEUAPQAiAGYAbwBvAGIAdQBpAGwAZAAiADsAIAAmACcAYwA6AC8AVwBpAG4AZABvAHcAcwAvAFQAZQBtAHAALwBzAGMAcgBpAHAAdAAuAHAAcwAxACcAOwBlAHgAaQB0ACAAJABMAGEAcwB0AEUAeABpAHQAQwBvAGQAZQA=`
- expectedCommandPrefix := `powershell -executionpolicy bypass -encodedCommand `
- expectedCommandEncoded := expectedCommandPrefix + expectedCommandBase64Encoded
-
- actualCommandWithoutPrefix := strings.Replace(comm.StartCmd.Command, expectedCommandPrefix, "", -1)
- actualCommandDecoded, err := powershellDecode(actualCommandWithoutPrefix)
- if err != nil {
- t.Fatal("should not have error when base64 decoding")
- }
-
- if actualCommandDecoded != expectedCommand {
- t.Fatalf("Expected decoded: %s, got %s", expectedCommand, actualCommandDecoded)
- }
-
- if comm.StartCmd.Command != expectedCommandEncoded {
- t.Fatalf("Expect command to be: %s, got %s", expectedCommandEncoded, comm.StartCmd.Command)
+ expectedCommand := `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:BAR=\"BAZ\"; $env:FOO=\"BAR\"; $env:PACKER_BUILDER_TYPE=\"footype\"; $env:PACKER_BUILD_NAME=\"foobuild\"; &'c:/Windows/Temp/script.ps1';exit $LastExitCode }"`
+ if comm.StartCmd.Command != expectedCommand {
+ t.Fatalf("Expect command to be: %s, got %s", expectedCommand, comm.StartCmd.Command)
}
}
@@ -582,7 +533,6 @@ func TestProvisioner_createFlattenedElevatedEnvVars_windows(t *testing.T) {
t.Fatalf("expected flattened env vars to be: %s, got %s.", expectedValue, flattenedEnvVars)
}
}
-
}
func TestProvisioner_createFlattenedEnvVars_windows(t *testing.T) {
@@ -597,11 +547,11 @@ func TestProvisioner_createFlattenedEnvVars_windows(t *testing.T) {
{"FOO==bar"}, // User env var with value starting with equals
}
expected := []string{
- `$env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; `,
- `$env:FOO="bar"; $env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; `,
- `$env:BAZ="qux"; $env:FOO="bar"; $env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; `,
- `$env:FOO="bar=baz"; $env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; `,
- `$env:FOO="=bar"; $env:PACKER_BUILDER_TYPE="iso"; $env:PACKER_BUILD_NAME="vmware"; `,
+ `$env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; `,
+ `$env:FOO=\"bar\"; $env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; `,
+ `$env:BAZ=\"qux\"; $env:FOO=\"bar\"; $env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; `,
+ `$env:FOO=\"bar=baz\"; $env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; `,
+ `$env:FOO=\"=bar\"; $env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; `,
}
p := new(Provisioner)
@@ -623,32 +573,23 @@ func TestProvisioner_createFlattenedEnvVars_windows(t *testing.T) {
func TestProvision_createCommandText(t *testing.T) {
config := testConfig()
+ config["remote_path"] = "c:/Windows/Temp/script.ps1"
p := new(Provisioner)
comm := new(packer.MockCommunicator)
p.communicator = comm
_ = p.Prepare(config)
+ // Defaults provided by Packer
+ p.config.PackerBuildName = "vmware"
+ p.config.PackerBuilderType = "iso"
+
// Non-elevated
cmd, _ := p.createCommandText()
- expectedCommand := `if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:PACKER_BUILDER_TYPE=""; $env:PACKER_BUILD_NAME=""; &'c:/Windows/Temp/script.ps1';exit $LastExitCode`
- expectedCommandBase64Encoded := `aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAJABlAG4AdgA6AFAAQQBDAEsARQBSAF8AQgBVAEkATABEAEUAUgBfAFQAWQBQAEUAPQAiACIAOwAgACQAZQBuAHYAOgBQAEEAQwBLAEUAUgBfAEIAVQBJAEwARABfAE4AQQBNAEUAPQAiACIAOwAgACYAJwBjADoALwBXAGkAbgBkAG8AdwBzAC8AVABlAG0AcAAvAHMAYwByAGkAcAB0AC4AcABzADEAJwA7AGUAeABpAHQAIAAkAEwAYQBzAHQARQB4AGkAdABDAG8AZABlAA==`
- expectedCommandPrefix := `powershell -executionpolicy bypass -encodedCommand `
- expectedCommandEncoded := expectedCommandPrefix + expectedCommandBase64Encoded
+ expectedCommand := `powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};$env:PACKER_BUILDER_TYPE=\"iso\"; $env:PACKER_BUILD_NAME=\"vmware\"; &'c:/Windows/Temp/script.ps1';exit $LastExitCode }"`
- actualCommandWithoutPrefix := strings.Replace(cmd, expectedCommandPrefix, "", -1)
-
- actualCommandDecoded, err := powershellDecode(actualCommandWithoutPrefix)
- if err != nil {
- t.Fatal("should not have error when base64 decoding")
- }
-
- if actualCommandDecoded != expectedCommand {
- t.Fatalf("Expected decoded: %s, got %s", expectedCommand, actualCommandDecoded)
- }
-
- if cmd != expectedCommandEncoded {
- t.Fatalf("Expect command to be: %s, got %s", expectedCommandEncoded, cmd)
+ if cmd != expectedCommand {
+ t.Fatalf("Expected Non-elevated command: %s, got %s", expectedCommand, cmd)
}
// Elevated
diff --git a/provisioner/puppet-masterless/provisioner.go b/provisioner/puppet-masterless/provisioner.go
index 6f1b6eee4..4b01c84d3 100644
--- a/provisioner/puppet-masterless/provisioner.go
+++ b/provisioner/puppet-masterless/provisioner.go
@@ -1,4 +1,4 @@
-// This package implements a provisioner for Packer that executes
+// Package puppetmasterless implements a provisioner for Packer that executes
// Puppet on the remote machine, configured to apply a local manifest
// versus connecting to a Puppet master.
package puppetmasterless
@@ -12,6 +12,7 @@ import (
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/config"
"github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/provisioner"
"github.com/hashicorp/packer/template/interpolate"
)
@@ -61,10 +62,57 @@ type Config struct {
// If true, packer will ignore all exit-codes from a puppet run
IgnoreExitCodes bool `mapstructure:"ignore_exit_codes"`
+
+ // The Guest OS Type (unix or windows)
+ GuestOSType string `mapstructure:"guest_os_type"`
+}
+
+type guestOSTypeConfig struct {
+ stagingDir string
+ executeCommand string
+ facterVarsFmt string
+ facterVarsJoiner string
+ modulePathJoiner string
+}
+
+var guestOSTypeConfigs = map[string]guestOSTypeConfig{
+ provisioner.UnixOSType: {
+ stagingDir: "/tmp/packer-puppet-masterless",
+ executeCommand: "cd {{.WorkingDir}} && " +
+ `{{if ne .FacterVars ""}}{{.FacterVars}} {{end}}` +
+ "{{if .Sudo}}sudo -E {{end}}" +
+ `{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
+ `puppet apply --verbose --modulepath='{{.ModulePath}}' ` +
+ `{{if ne .HieraConfigPath ""}}--hiera_config='{{.HieraConfigPath}}' {{end}}` +
+ `{{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}}` +
+ "--detailed-exitcodes " +
+ `{{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}` +
+ "{{.ManifestFile}}",
+ facterVarsFmt: "FACTER_%s='%s'",
+ facterVarsJoiner: " ",
+ modulePathJoiner: ":",
+ },
+ provisioner.WindowsOSType: {
+ stagingDir: "C:/Windows/Temp/packer-puppet-masterless",
+ executeCommand: "cd {{.WorkingDir}} && " +
+ "{{.FacterVars}} && " +
+ `{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
+ `puppet apply --verbose --modulepath='{{.ModulePath}}' ` +
+ `{{if ne .HieraConfigPath ""}}--hiera_config='{{.HieraConfigPath}}' {{end}}` +
+ `{{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}}` +
+ "--detailed-exitcodes " +
+ `{{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}` +
+ "{{.ManifestFile}}",
+ facterVarsFmt: `SET "FACTER_%s=%s"`,
+ facterVarsJoiner: " & ",
+ modulePathJoiner: ";",
+ },
}
type Provisioner struct {
- config Config
+ config Config
+ guestOSTypeConfig guestOSTypeConfig
+ guestCommands *provisioner.GuestCommands
}
type ExecuteTemplate struct {
@@ -94,20 +142,32 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
// Set some defaults
+ if p.config.GuestOSType == "" {
+ p.config.GuestOSType = provisioner.DefaultOSType
+ }
+ p.config.GuestOSType = strings.ToLower(p.config.GuestOSType)
+
+ var ok bool
+ p.guestOSTypeConfig, ok = guestOSTypeConfigs[p.config.GuestOSType]
+ if !ok {
+ return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType)
+ }
+
+ p.guestCommands, err = provisioner.NewGuestCommands(p.config.GuestOSType, !p.config.PreventSudo)
+ if err != nil {
+ return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType)
+ }
+
if p.config.ExecuteCommand == "" {
- p.config.ExecuteCommand = "cd {{.WorkingDir}} && " +
- "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" +
- "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet apply " +
- "--verbose --modulepath='{{.ModulePath}}' " +
- "{{if ne .HieraConfigPath \"\"}}--hiera_config='{{.HieraConfigPath}}' {{end}}" +
- "{{if ne .ManifestDir \"\"}}--manifestdir='{{.ManifestDir}}' {{end}}" +
- "--detailed-exitcodes " +
- "{{if ne .ExtraArguments \"\"}}{{.ExtraArguments}} {{end}}" +
- "{{.ManifestFile}}"
+ p.config.ExecuteCommand = p.guestOSTypeConfig.executeCommand
+ }
+
+ if p.config.ExecuteCommand == "" {
+ p.config.ExecuteCommand = p.guestOSTypeConfig.executeCommand
}
if p.config.StagingDir == "" {
- p.config.StagingDir = "/tmp/packer-puppet-masterless"
+ p.config.StagingDir = p.guestOSTypeConfig.stagingDir
}
if p.config.WorkingDir == "" {
@@ -223,16 +283,16 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
// Compile the facter variables
facterVars := make([]string, 0, len(p.config.Facter))
for k, v := range p.config.Facter {
- facterVars = append(facterVars, fmt.Sprintf("FACTER_%s='%s'", k, v))
+ facterVars = append(facterVars, fmt.Sprintf(p.guestOSTypeConfig.facterVarsFmt, k, v))
}
// Execute Puppet
p.config.ctx.Data = &ExecuteTemplate{
- FacterVars: strings.Join(facterVars, " "),
+ FacterVars: strings.Join(facterVars, p.guestOSTypeConfig.facterVarsJoiner),
HieraConfigPath: remoteHieraConfigPath,
ManifestDir: remoteManifestDir,
ManifestFile: remoteManifestFile,
- ModulePath: strings.Join(modulePaths, ":"),
+ ModulePath: strings.Join(modulePaths, p.guestOSTypeConfig.modulePathJoiner),
PuppetBinDir: p.config.PuppetBinDir,
Sudo: !p.config.PreventSudo,
WorkingDir: p.config.WorkingDir,
@@ -249,7 +309,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
ui.Message(fmt.Sprintf("Running Puppet: %s", command))
if err := cmd.StartWithUi(comm, ui); err != nil {
- return err
+ return fmt.Errorf("Got an error starting command: %s", err)
}
if cmd.ExitStatus != 0 && cmd.ExitStatus != 2 && !p.config.IgnoreExitCodes {
@@ -314,30 +374,29 @@ func (p *Provisioner) uploadManifests(ui packer.Ui, comm packer.Communicator) (s
return "", fmt.Errorf("Error uploading manifest dir: %s", err)
}
return remoteManifestDir, nil
- } else {
- // Otherwise manifest_file is a file and we'll upload it
- ui.Message(fmt.Sprintf(
- "Uploading manifest file from: %s", p.config.ManifestFile))
-
- f, err := os.Open(p.config.ManifestFile)
- if err != nil {
- return "", err
- }
- defer f.Close()
-
- manifestFilename := filepath.Base(p.config.ManifestFile)
- remoteManifestFile := fmt.Sprintf("%s/%s", remoteManifestsPath, manifestFilename)
- if err := comm.Upload(remoteManifestFile, f, nil); err != nil {
- return "", err
- }
- return remoteManifestFile, nil
}
+ // Otherwise manifest_file is a file and we'll upload it
+ ui.Message(fmt.Sprintf(
+ "Uploading manifest file from: %s", p.config.ManifestFile))
+
+ f, err := os.Open(p.config.ManifestFile)
+ if err != nil {
+ return "", err
+ }
+ defer f.Close()
+
+ manifestFilename := filepath.Base(p.config.ManifestFile)
+ remoteManifestFile := fmt.Sprintf("%s/%s", remoteManifestsPath, manifestFilename)
+ if err := comm.Upload(remoteManifestFile, f, nil); err != nil {
+ return "", err
+ }
+ return remoteManifestFile, nil
}
func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir string) error {
- cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("mkdir -p '%s'", dir),
- }
+ ui.Message(fmt.Sprintf("Creating directory: %s", dir))
+
+ cmd := &packer.RemoteCmd{Command: p.guestCommands.CreateDir(dir)}
if err := cmd.StartWithUi(comm, ui); err != nil {
return err
@@ -347,6 +406,15 @@ func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir stri
return fmt.Errorf("Non-zero exit status.")
}
+ // Chmod the directory to 0777 just so that we can access it as our user
+ cmd = &packer.RemoteCmd{Command: p.guestCommands.Chmod(dir, "0777")}
+ if err := cmd.StartWithUi(comm, ui); err != nil {
+ return err
+ }
+ if cmd.ExitStatus != 0 {
+ return fmt.Errorf("Non-zero exit status. See output above for more info.")
+ }
+
return nil
}
diff --git a/provisioner/puppet-masterless/provisioner_test.go b/provisioner/puppet-masterless/provisioner_test.go
index 6c58f63d7..dd6725768 100644
--- a/provisioner/puppet-masterless/provisioner_test.go
+++ b/provisioner/puppet-masterless/provisioner_test.go
@@ -1,12 +1,16 @@
package puppetmasterless
import (
+ "fmt"
"io/ioutil"
+ "log"
"os"
"strings"
"testing"
"github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/template/interpolate"
+ "github.com/stretchr/testify/assert"
)
func testConfig() map[string]interface{} {
@@ -28,6 +32,131 @@ func TestProvisioner_Impl(t *testing.T) {
}
}
+func TestGuestOSConfig_empty_unix(t *testing.T) {
+ config := testConfig()
+ p := new(Provisioner)
+ err := p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ // Execute Puppet
+ p.config.ctx.Data = &ExecuteTemplate{
+ ManifestFile: "/r/m/f",
+ PuppetBinDir: p.config.PuppetBinDir,
+ Sudo: !p.config.PreventSudo,
+ WorkingDir: p.config.WorkingDir,
+ }
+ log.Println(p.config.ExecuteCommand)
+ command, err := interpolate.Render(p.config.ExecuteCommand, &p.config.ctx)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ expected := "cd /tmp/packer-puppet-masterless && " +
+ "sudo -E puppet apply --verbose --modulepath='' --detailed-exitcodes /r/m/f"
+ assert.Equal(t, expected, command)
+}
+
+func TestGuestOSConfig_full_unix(t *testing.T) {
+ config := testConfig()
+ p := new(Provisioner)
+ err := p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ facterVars := []string{
+ fmt.Sprintf(p.guestOSTypeConfig.facterVarsFmt, "lhs", "rhs"),
+ fmt.Sprintf(p.guestOSTypeConfig.facterVarsFmt, "foo", "bar"),
+ }
+ modulePaths := []string{"/m/p", "/a/b"}
+ // Execute Puppet
+ p.config.ctx.Data = &ExecuteTemplate{
+ FacterVars: strings.Join(facterVars, p.guestOSTypeConfig.facterVarsJoiner),
+ HieraConfigPath: "/h/c/p",
+ ManifestDir: "/r/m/d",
+ ManifestFile: "/r/m/f",
+ ModulePath: strings.Join(modulePaths, p.guestOSTypeConfig.modulePathJoiner),
+ PuppetBinDir: p.config.PuppetBinDir,
+ Sudo: !p.config.PreventSudo,
+ WorkingDir: p.config.WorkingDir,
+ ExtraArguments: strings.Join(p.config.ExtraArguments, " "),
+ }
+ command, err := interpolate.Render(p.config.ExecuteCommand, &p.config.ctx)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ expected := "cd /tmp/packer-puppet-masterless && FACTER_lhs='rhs' FACTER_foo='bar' " +
+ "sudo -E puppet apply " +
+ "--verbose --modulepath='/m/p:/a/b' --hiera_config='/h/c/p' " +
+ "--manifestdir='/r/m/d' --detailed-exitcodes /r/m/f"
+ assert.Equal(t, expected, command)
+}
+
+func TestGuestOSConfig_empty_windows(t *testing.T) {
+ config := testConfig()
+ config["guest_os_type"] = "windows"
+ p := new(Provisioner)
+ err := p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+ // Execute Puppet
+ p.config.ctx.Data = &ExecuteTemplate{
+ ManifestFile: "/r/m/f",
+ PuppetBinDir: p.config.PuppetBinDir,
+ Sudo: !p.config.PreventSudo,
+ WorkingDir: p.config.WorkingDir,
+ }
+ log.Println(p.config.ExecuteCommand)
+ command, err := interpolate.Render(p.config.ExecuteCommand, &p.config.ctx)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ expected := "cd C:/Windows/Temp/packer-puppet-masterless && && puppet apply --verbose --modulepath='' --detailed-exitcodes /r/m/f"
+ assert.Equal(t, expected, command)
+}
+
+func TestGuestOSConfig_full_windows(t *testing.T) {
+ config := testConfig()
+ config["guest_os_type"] = "windows"
+ p := new(Provisioner)
+ err := p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ facterVars := []string{
+ fmt.Sprintf(p.guestOSTypeConfig.facterVarsFmt, "lhs", "rhs"),
+ fmt.Sprintf(p.guestOSTypeConfig.facterVarsFmt, "foo", "bar"),
+ }
+ modulePaths := []string{"/m/p", "/a/b"}
+ // Execute Puppet
+ p.config.ctx.Data = &ExecuteTemplate{
+ FacterVars: strings.Join(facterVars, p.guestOSTypeConfig.facterVarsJoiner),
+ HieraConfigPath: "/h/c/p",
+ ManifestDir: "/r/m/d",
+ ManifestFile: "/r/m/f",
+ ModulePath: strings.Join(modulePaths, p.guestOSTypeConfig.modulePathJoiner),
+ PuppetBinDir: p.config.PuppetBinDir,
+ Sudo: !p.config.PreventSudo,
+ WorkingDir: p.config.WorkingDir,
+ ExtraArguments: strings.Join(p.config.ExtraArguments, " "),
+ }
+ command, err := interpolate.Render(p.config.ExecuteCommand, &p.config.ctx)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ expected := "cd C:/Windows/Temp/packer-puppet-masterless && " +
+ "SET \"FACTER_lhs=rhs\" & SET \"FACTER_foo=bar\" && " +
+ "puppet apply --verbose --modulepath='/m/p;/a/b' --hiera_config='/h/c/p' " +
+ "--manifestdir='/r/m/d' --detailed-exitcodes /r/m/f"
+ assert.Equal(t, expected, command)
+}
+
func TestProvisionerPrepare_puppetBinDir(t *testing.T) {
config := testConfig()
@@ -200,6 +329,9 @@ func TestProvisionerPrepare_facterFacts(t *testing.T) {
delete(config, "facter")
p = new(Provisioner)
err = p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
if p.config.Facter == nil {
t.Fatalf("err: Default facts are not set in the Puppet provisioner!")
}
diff --git a/provisioner/puppet-server/provisioner.go b/provisioner/puppet-server/provisioner.go
index 9e5e6a498..d7744952e 100644
--- a/provisioner/puppet-server/provisioner.go
+++ b/provisioner/puppet-server/provisioner.go
@@ -1,4 +1,4 @@
-// This package implements a provisioner for Packer that executes
+// Package puppetserver implements a provisioner for Packer that executes
// Puppet on the remote machine connecting to a Puppet master.
package puppetserver
@@ -10,9 +10,48 @@ import (
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/config"
"github.com/hashicorp/packer/packer"
+ "github.com/hashicorp/packer/provisioner"
"github.com/hashicorp/packer/template/interpolate"
)
+type guestOSTypeConfig struct {
+ executeCommand string
+ facterVarsFmt string
+ facterVarsJoiner string
+ stagingDir string
+}
+
+var guestOSTypeConfigs = map[string]guestOSTypeConfig{
+ provisioner.UnixOSType: {
+ executeCommand: "{{.FacterVars}} {{if .Sudo}}sudo -E {{end}}" +
+ "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet agent " +
+ "--onetime --no-daemonize " +
+ "{{if ne .PuppetServer \"\"}}--server='{{.PuppetServer}}' {{end}}" +
+ "{{if ne .Options \"\"}}{{.Options}} {{end}}" +
+ "{{if ne .PuppetNode \"\"}}--certname={{.PuppetNode}} {{end}}" +
+ "{{if ne .ClientCertPath \"\"}}--certdir='{{.ClientCertPath}}' {{end}}" +
+ "{{if ne .ClientPrivateKeyPath \"\"}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}" +
+ "--detailed-exitcodes",
+ facterVarsFmt: "FACTER_%s='%s'",
+ facterVarsJoiner: " ",
+ stagingDir: "/tmp/packer-puppet-server",
+ },
+ provisioner.WindowsOSType: {
+ executeCommand: "{{.FacterVars}} " +
+ "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet agent " +
+ "--onetime --no-daemonize " +
+ "{{if ne .PuppetServer \"\"}}--server='{{.PuppetServer}}' {{end}}" +
+ "{{if ne .Options \"\"}}{{.Options}} {{end}}" +
+ "{{if ne .PuppetNode \"\"}}--certname={{.PuppetNode}} {{end}}" +
+ "{{if ne .ClientCertPath \"\"}}--certdir='{{.ClientCertPath}}' {{end}}" +
+ "{{if ne .ClientPrivateKeyPath \"\"}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}" +
+ "--detailed-exitcodes",
+ facterVarsFmt: "SET \"FACTER_%s=%s\"",
+ facterVarsJoiner: " & ",
+ stagingDir: "C:/Windows/Temp/packer-puppet-server",
+ },
+}
+
type Config struct {
common.PackerConfig `mapstructure:",squash"`
ctx interpolate.Context
@@ -20,6 +59,9 @@ type Config struct {
// The command used to execute Puppet.
ExecuteCommand string `mapstructure:"execute_command"`
+ // The Guest OS Type (unix or windows)
+ GuestOSType string `mapstructure:"guest_os_type"`
+
// Additional facts to set when executing Puppet
Facter map[string]string
@@ -54,7 +96,9 @@ type Config struct {
}
type Provisioner struct {
- config Config
+ config Config
+ guestOSTypeConfig guestOSTypeConfig
+ guestCommands *provisioner.GuestCommands
}
type ExecuteTemplate struct {
@@ -82,12 +126,28 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
return err
}
+ if p.config.GuestOSType == "" {
+ p.config.GuestOSType = provisioner.DefaultOSType
+ }
+ p.config.GuestOSType = strings.ToLower(p.config.GuestOSType)
+
+ var ok bool
+ p.guestOSTypeConfig, ok = guestOSTypeConfigs[p.config.GuestOSType]
+ if !ok {
+ return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType)
+ }
+
+ p.guestCommands, err = provisioner.NewGuestCommands(p.config.GuestOSType, !p.config.PreventSudo)
+ if err != nil {
+ return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType)
+ }
+
if p.config.ExecuteCommand == "" {
- p.config.ExecuteCommand = p.commandTemplate()
+ p.config.ExecuteCommand = p.guestOSTypeConfig.executeCommand
}
if p.config.StagingDir == "" {
- p.config.StagingDir = "/tmp/packer-puppet-server"
+ p.config.StagingDir = p.guestOSTypeConfig.stagingDir
}
if p.config.Facter == nil {
@@ -160,12 +220,12 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
// Compile the facter variables
facterVars := make([]string, 0, len(p.config.Facter))
for k, v := range p.config.Facter {
- facterVars = append(facterVars, fmt.Sprintf("FACTER_%s='%s'", k, v))
+ facterVars = append(facterVars, fmt.Sprintf(p.guestOSTypeConfig.facterVarsFmt, k, v))
}
// Execute Puppet
p.config.ctx.Data = &ExecuteTemplate{
- FacterVars: strings.Join(facterVars, " "),
+ FacterVars: strings.Join(facterVars, p.guestOSTypeConfig.facterVarsJoiner),
ClientCertPath: remoteClientCertPath,
ClientPrivateKeyPath: remoteClientPrivateKeyPath,
PuppetNode: p.config.PuppetNode,
@@ -202,16 +262,23 @@ func (p *Provisioner) Cancel() {
}
func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir string) error {
- cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("mkdir -p '%s'", dir),
- }
+ ui.Message(fmt.Sprintf("Creating directory: %s", dir))
+ cmd := &packer.RemoteCmd{Command: p.guestCommands.CreateDir(dir)}
if err := cmd.StartWithUi(comm, ui); err != nil {
return err
}
-
if cmd.ExitStatus != 0 {
- return fmt.Errorf("Non-zero exit status.")
+ return fmt.Errorf("Non-zero exit status. See output above for more info.")
+ }
+
+ // Chmod the directory to 0777 just so that we can access it as our user
+ cmd = &packer.RemoteCmd{Command: p.guestCommands.Chmod(dir, "0777")}
+ if err := cmd.StartWithUi(comm, ui); err != nil {
+ return err
+ }
+ if cmd.ExitStatus != 0 {
+ return fmt.Errorf("Non-zero exit status. See output above for more info.")
}
return nil
@@ -230,15 +297,3 @@ func (p *Provisioner) uploadDirectory(ui packer.Ui, comm packer.Communicator, ds
return comm.UploadDir(dst, src, nil)
}
-
-func (p *Provisioner) commandTemplate() string {
- return "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" +
- "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet agent " +
- "--onetime --no-daemonize " +
- "{{if ne .PuppetServer \"\"}}--server='{{.PuppetServer}}' {{end}}" +
- "{{if ne .Options \"\"}}{{.Options}} {{end}}" +
- "{{if ne .PuppetNode \"\"}}--certname={{.PuppetNode}} {{end}}" +
- "{{if ne .ClientCertPath \"\"}}--certdir='{{.ClientCertPath}}' {{end}}" +
- "{{if ne .ClientPrivateKeyPath \"\"}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}" +
- "--detailed-exitcodes"
-}
diff --git a/provisioner/puppet-server/provisioner_test.go b/provisioner/puppet-server/provisioner_test.go
index a41a6bec5..4c7746c78 100644
--- a/provisioner/puppet-server/provisioner_test.go
+++ b/provisioner/puppet-server/provisioner_test.go
@@ -1,10 +1,11 @@
package puppetserver
import (
- "github.com/hashicorp/packer/packer"
"io/ioutil"
"os"
"testing"
+
+ "github.com/hashicorp/packer/packer"
)
func testConfig() map[string]interface{} {
@@ -167,6 +168,9 @@ func TestProvisionerPrepare_facterFacts(t *testing.T) {
delete(config, "facter")
p = new(Provisioner)
err = p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
if p.config.Facter == nil {
t.Fatalf("err: Default facts are not set in the Puppet provisioner!")
}
diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go
index b2eefd0ea..5c67feb07 100644
--- a/provisioner/salt-masterless/provisioner.go
+++ b/provisioner/salt-masterless/provisioner.go
@@ -384,7 +384,7 @@ func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir stri
func (p *Provisioner) removeDir(ui packer.Ui, comm packer.Communicator, dir string) error {
ui.Message(fmt.Sprintf("Removing directory: %s", dir))
cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("rm -rf '%s'", dir),
+ Command: fmt.Sprintf(p.sudo("rm -rf '%s'"), dir),
}
if err := cmd.StartWithUi(comm, ui); err != nil {
return err
diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go
index 5e9c587a1..5233e50e7 100644
--- a/provisioner/shell/provisioner.go
+++ b/provisioner/shell/provisioner.go
@@ -71,7 +71,7 @@ type Config struct {
// Whether to clean scripts up
SkipClean bool `mapstructure:"skip_clean"`
- ExpectDisconnect *bool `mapstructure:"expect_disconnect"`
+ ExpectDisconnect bool `mapstructure:"expect_disconnect"`
startRetryTimeout time.Duration
ctx interpolate.Context
@@ -104,11 +104,6 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
p.config.ExecuteCommand = "chmod +x {{.Path}}; {{.Vars}} {{.Path}}"
}
- if p.config.ExpectDisconnect == nil {
- t := true
- p.config.ExpectDisconnect = &t
- }
-
if p.config.Inline != nil && len(p.config.Inline) == 0 {
p.config.Inline = nil
}
@@ -287,7 +282,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
// If the exit code indicates a remote disconnect, fail unless
// we were expecting it.
if cmd.ExitStatus == packer.CmdDisconnect {
- if !*p.config.ExpectDisconnect {
+ if !p.config.ExpectDisconnect {
return fmt.Errorf("Script disconnected unexpectedly.")
}
} else if cmd.ExitStatus != 0 {
diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go
index ee0edf95b..c190f8c52 100644
--- a/provisioner/shell/provisioner_test.go
+++ b/provisioner/shell/provisioner_test.go
@@ -1,12 +1,13 @@
package shell
import (
- "github.com/hashicorp/packer/packer"
"io/ioutil"
"os"
"regexp"
"strings"
"testing"
+
+ "github.com/hashicorp/packer/packer"
)
func testConfig() map[string]interface{} {
@@ -32,8 +33,8 @@ func TestProvisionerPrepare_Defaults(t *testing.T) {
t.Fatalf("err: %s", err)
}
- if *p.config.ExpectDisconnect != true {
- t.Errorf("expected ExpectDisconnect to be true")
+ if p.config.ExpectDisconnect != false {
+ t.Errorf("expected ExpectDisconnect to default to false")
}
if p.config.RemotePath == "" {
@@ -51,7 +52,7 @@ func TestProvisionerPrepare_ExpectDisconnect(t *testing.T) {
t.Fatalf("err: %s", err)
}
- if *p.config.ExpectDisconnect != false {
+ if p.config.ExpectDisconnect != false {
t.Errorf("expected ExpectDisconnect to be false")
}
@@ -62,10 +63,9 @@ func TestProvisionerPrepare_ExpectDisconnect(t *testing.T) {
t.Fatalf("err: %s", err)
}
- if *p.config.ExpectDisconnect != true {
+ if p.config.ExpectDisconnect != true {
t.Errorf("expected ExpectDisconnect to be true")
}
-
}
func TestProvisionerPrepare_InlineShebang(t *testing.T) {
diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go
index 06641432b..9b77c097e 100644
--- a/provisioner/windows-restart/provisioner.go
+++ b/provisioner/windows-restart/provisioner.go
@@ -1,8 +1,11 @@
package restart
import (
+ "bytes"
"fmt"
+ "io"
"log"
+ "strings"
"sync"
"time"
@@ -14,7 +17,7 @@ import (
)
var DefaultRestartCommand = "shutdown /r /f /t 0 /c \"packer restart\""
-var DefaultRestartCheckCommand = winrm.Powershell(`echo "${env:COMPUTERNAME} restarted."`)
+var DefaultRestartCheckCommand = winrm.Powershell(`if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'}; echo "${env:COMPUTERNAME} restarted."`)
var retryableSleep = 5 * time.Second
var TryCheckReboot = "shutdown.exe -f -r -t 60"
var AbortReboot = "shutdown.exe -a"
@@ -119,6 +122,7 @@ var waitForRestart = func(p *Provisioner, comm packer.Communicator) error {
// Couldn't execute, we assume machine is rebooting already
break
}
+
if cmd.ExitStatus == 1115 || cmd.ExitStatus == 1190 {
// Reboot already in progress but not completed
log.Printf("Reboot already in progress, waiting...")
@@ -170,9 +174,11 @@ WaitLoop:
}
var waitForCommunicator = func(p *Provisioner) error {
- cmd := &packer.RemoteCmd{Command: p.config.RestartCheckCommand}
-
for {
+ cmd := &packer.RemoteCmd{Command: p.config.RestartCheckCommand}
+ var buf, buf2 bytes.Buffer
+ cmd.Stdout = &buf
+ cmd.Stdout = io.MultiWriter(cmd.Stdout, &buf2)
select {
case <-p.cancel:
log.Println("Communicator wait canceled, exiting loop")
@@ -183,12 +189,18 @@ var waitForCommunicator = func(p *Provisioner) error {
log.Printf("Checking that communicator is connected with: '%s'", cmd.Command)
err := cmd.StartWithUi(p.comm, p.ui)
+
if err != nil {
log.Printf("Communication connection err: %s", err)
continue
}
log.Printf("Connected to machine")
+ stdoutToRead := buf2.String()
+ if !strings.Contains(stdoutToRead, "restarted.") {
+ log.Printf("echo didn't succeed; retrying...")
+ continue
+ }
break
}
diff --git a/provisioner/windows-restart/provisioner_test.go b/provisioner/windows-restart/provisioner_test.go
index 05b6b204a..d4d42ba4f 100644
--- a/provisioner/windows-restart/provisioner_test.go
+++ b/provisioner/windows-restart/provisioner_test.go
@@ -242,6 +242,7 @@ func TestProvision_waitForCommunicator(t *testing.T) {
p.comm = comm
p.ui = ui
comm.StartStderr = "WinRM terminated"
+ comm.StartStdout = "WIN-V4CEJ7MC5SN restarted."
comm.StartExitStatus = 1
p.Prepare(config)
err := waitForCommunicator(p)
diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go
index 62f78f20a..1f2ee2cab 100644
--- a/provisioner/windows-shell/provisioner_test.go
+++ b/provisioner/windows-shell/provisioner_test.go
@@ -4,13 +4,14 @@ import (
"bytes"
"errors"
"fmt"
- "github.com/hashicorp/packer/packer"
"io/ioutil"
"log"
"os"
"strings"
"testing"
"time"
+
+ "github.com/hashicorp/packer/packer"
)
func testConfig() map[string]interface{} {
@@ -34,6 +35,9 @@ func TestProvisionerPrepare_extractScript(t *testing.T) {
// File contents should contain 2 lines concatenated by newlines: foo\nbar
readFile, err := ioutil.ReadFile(file)
+ if err != nil {
+ t.Fatalf("Should not be error: %s", err)
+ }
expectedContents := "foo\nbar\n"
s := string(readFile[:])
if s != expectedContents {
diff --git a/scripts/build.ps1 b/scripts/build.ps1
index 5287704aa..5603ea078 100644
--- a/scripts/build.ps1
+++ b/scripts/build.ps1
@@ -47,7 +47,7 @@ $GIT_COMMIT = $(git.exe rev-parse HEAD)
git.exe status --porcelain | Out-Null
if ($LastExitCode -eq 0) {
$GIT_DIRTY = "+CHANGES"
-}
+}
# If its dev mode, only build for ourself
if (Test-Path env:PACKER_DEV) {
@@ -55,8 +55,8 @@ if (Test-Path env:PACKER_DEV) {
$XC_ARCH=$(go.exe env GOARCH)
}
elseif (-not (Test-Path env:XC_ARCH)) {
- $XC_ARCH="386 amd64 arm"
- $XC_OS="linux darwin windows freebsd openbsd"
+ $XC_ARCH="386 amd64 arm arm64 ppc64le"
+ $XC_OS="linux darwin windows freebsd openbsd solaris"
}
# Delete the old dir
diff --git a/scripts/build.sh b/scripts/build.sh
index 807538c0a..84bd7f67d 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -12,8 +12,8 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
cd $DIR
# Determine the arch/os combos we're building for
-XC_ARCH=${XC_ARCH:-"386 amd64 arm arm64"}
-XC_OS=${XC_OS:-linux darwin windows freebsd openbsd}
+XC_ARCH=${XC_ARCH:-"386 amd64 arm arm64 ppc64le"}
+XC_OS=${XC_OS:-linux darwin windows freebsd openbsd solaris}
# Delete the old dir
echo "==> Removing old directory..."
diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh
index f44bd93bd..5834c639f 100755
--- a/scripts/prepare_changelog.sh
+++ b/scripts/prepare_changelog.sh
@@ -1,27 +1,64 @@
#!/bin/zsh
-
LAST_RELEASE=$1
+DO_PR_CHECK=1
+
+set -o pipefail
+
+is_doc_pr(){
+ if ! (($+commands[jq])); then
+ DO_PR_CHECK=0
+ echo "jq not found"
+ return 1
+ fi
+ PR_NUM=$1
+ out=$(curl -fsS "https://api.github.com/repos/hashicorp/packer/issues/${PR_NUM}" | jq '[.labels[].name == "docs"] | any')
+ exy="$?"
+ if [ $exy -ne 0 ]; then
+ echo "bad response from github"
+ exit $exy
+ fi
+ grep -q true <<< $out
+ return $?
+}
if [ -z $LAST_RELEASE ]; then
echo "you need to give the previous release version. prepare_changelog.sh v"
exit 1
fi
+get_prs(){
+ # git log --merges v0.10.2...c3861d167533fb797b0fae0c380806625712e5f7 |
+ git log --merges HEAD...${LAST_RELEASE} |
+ grep -o "Merge pull request #\(\d\+\)" | awk -F\# '{print $2}' | while read line
+ do
+ grep -q "GH-${line}" CHANGELOG.md
+ if [ $? -ne 0 ]; then
+ echo $line
+ fi
+ done | while read PR_NUM
+ do
+ if (($DO_PR_CHECK)) && is_doc_pr $PR_NUM; then
+ continue
+ fi
+ echo "https://github.com/hashicorp/packer/pull/${PR_NUM}"
+ done
+}
-# git log --merges v0.10.2...c3861d167533fb797b0fae0c380806625712e5f7 |
-git log --merges HEAD...${LAST_RELEASE} |
-grep -o "Merge pull request #\(\d\+\)" | awk -F\# '{print $2}' | while read line
-do
- grep -q "GH-${line}" CHANGELOG.md
- if [ $? -ne 0 ]; then
- echo $line
- fi
-done | while read line
-do
- echo "https://github.com/hashicorp/packer/pull/${line}"
- #TODO get tags. ignore docs
+#is_doc_pr 52061111
+# is_doc_pr 5206 # non-doc pr
+#is_doc_pr 5434 # doc pr
+#echo $?
+#exit
+
+# prpid=$!
+# trap 'kill -9 ${prpid}; exit' INT TERM
+
+get_prs | while read line; do
echo $line
+ if [[ "$line" =~ "bad" ]]; then
+ exit 1
+ fi
vared -ch ok
done
diff --git a/test/builder_lxc.bats b/test/builder_lxc.bats
new file mode 100644
index 000000000..c29030424
--- /dev/null
+++ b/test/builder_lxc.bats
@@ -0,0 +1,40 @@
+#!/usr/bin/env bats
+#
+# This tests the lxc builder. The teardown function will
+# delete any images in the output-lxc-* folders.
+
+#load test_helper
+#fixtures builder-lxc
+FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures/builder-lxc"
+
+# Required parameters
+command -v lxc-create >/dev/null 2>&1 || {
+ echo "'lxc-create' must be installed via the lxc (or lxc1 for ubuntu >=16.04) package" >&2
+ exit 1
+}
+
+teardown() {
+ rm -rf output-lxc-*
+}
+
+@test "lxc: build centos minimal.json" {
+ run packer build -var template_name=centos $FIXTURE_ROOT/minimal.json
+ [ "$status" -eq 0 ]
+ [ -f output-lxc-centos/rootfs.tar.gz ]
+ [ -f output-lxc-centos/lxc-config ]
+}
+
+
+@test "lxc: build trusty minimal.json" {
+ run packer build -var template_name=ubuntu -var template_parameters="SUITE=trusty" $FIXTURE_ROOT/minimal.json
+ [ "$status" -eq 0 ]
+ [ -f output-lxc-ubuntu/rootfs.tar.gz ]
+ [ -f output-lxc-ubuntu/lxc-config ]
+}
+
+@test "lxc: build debian minimal.json" {
+ run packer build -var template_name=debian -var template_parameters="SUITE=jessie" $FIXTURE_ROOT/minimal.json
+ [ "$status" -eq 0 ]
+ [ -f output-lxc-debian/rootfs.tar.gz ]
+ [ -f output-lxc-debian/lxc-config ]
+}
diff --git a/test/fixtures/builder-lxc/minimal.json b/test/fixtures/builder-lxc/minimal.json
new file mode 100644
index 000000000..5bf7998fd
--- /dev/null
+++ b/test/fixtures/builder-lxc/minimal.json
@@ -0,0 +1,15 @@
+{
+ "variables": {
+ "template_name": "debian",
+ "template_parameters": "SUITE=jessie"
+ },
+ "builders": [
+ {
+ "type": "lxc",
+ "name": "lxc-{{user `template_name`}}",
+ "template_name": "{{user `template_name`}}",
+ "config_file": "/usr/share/lxc/config/{{user `template_name`}}.common.conf",
+ "template_environment_vars": [ "{{user `template_parameters`}}" ]
+ }
+ ]
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/LICENSE b/vendor/github.com/ChrisTrenkamp/goxpath/LICENSE
new file mode 100644
index 000000000..2afe88a61
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 ChrisTrenkamp
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/README.md b/vendor/github.com/ChrisTrenkamp/goxpath/README.md
new file mode 100644
index 000000000..deb49624a
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/README.md
@@ -0,0 +1,2 @@
+# goxpath [![GoDoc](https://godoc.org/gopkg.in/src-d/go-git.v2?status.svg)](https://godoc.org/github.com/ChrisTrenkamp/goxpath) [![Build Status](https://travis-ci.org/ChrisTrenkamp/goxpath.svg?branch=master)](https://travis-ci.org/ChrisTrenkamp/goxpath) [![codecov.io](https://codecov.io/github/ChrisTrenkamp/goxpath/coverage.svg?branch=master)](https://codecov.io/github/ChrisTrenkamp/goxpath?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/ChrisTrenkamp/goxpath)](https://goreportcard.com/report/github.com/ChrisTrenkamp/goxpath)
+An XPath 1.0 implementation written in Go. See the [wiki](https://github.com/ChrisTrenkamp/goxpath/wiki) for more information.
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/coverage.sh b/vendor/github.com/ChrisTrenkamp/goxpath/coverage.sh
new file mode 100755
index 000000000..0e35d7de7
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/coverage.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+go get github.com/ChrisTrenkamp/goxpath/cmd/goxpath
+if [ $? != 0 ]; then
+ exit 1
+fi
+go test >/dev/null 2>&1
+if [ $? != 0 ]; then
+ go test
+ exit 1
+fi
+gometalinter --deadline=1m ./...
+go list -f '{{if gt (len .TestGoFiles) 0}}"go test -covermode count -coverprofile {{.Name}}.coverprofile -coverpkg ./... {{.ImportPath}}"{{end}} >/dev/null' ./... | xargs -I {} bash -c {} 2>/dev/null
+gocovmerge `ls *.coverprofile` > coverage.txt
+go tool cover -html=coverage.txt -o coverage.html
+firefox coverage.html
+rm coverage.html coverage.txt *.coverprofile
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/goxpath.go b/vendor/github.com/ChrisTrenkamp/goxpath/goxpath.go
new file mode 100644
index 000000000..af2e2f141
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/goxpath.go
@@ -0,0 +1,117 @@
+package goxpath
+
+import (
+ "encoding/xml"
+ "fmt"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/execxp"
+ "github.com/ChrisTrenkamp/goxpath/internal/parser"
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+//Opts defines namespace mappings and custom functions for XPath expressions.
+type Opts struct {
+ NS map[string]string
+ Funcs map[xml.Name]tree.Wrap
+ Vars map[string]tree.Result
+}
+
+//FuncOpts is a function wrapper for Opts.
+type FuncOpts func(*Opts)
+
+//XPathExec is the XPath executor, compiled from an XPath string
+type XPathExec struct {
+ n *parser.Node
+}
+
+//Parse parses the XPath expression, xp, returning an XPath executor.
+func Parse(xp string) (XPathExec, error) {
+ n, err := parser.Parse(xp)
+ return XPathExec{n: n}, err
+}
+
+//MustParse is like Parse, but panics instead of returning an error.
+func MustParse(xp string) XPathExec {
+ ret, err := Parse(xp)
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+//Exec executes the XPath expression, xp, against the tree, t, with the
+//namespace mappings, ns, and returns the result as a stringer.
+func (xp XPathExec) Exec(t tree.Node, opts ...FuncOpts) (tree.Result, error) {
+ o := &Opts{
+ NS: make(map[string]string),
+ Funcs: make(map[xml.Name]tree.Wrap),
+ Vars: make(map[string]tree.Result),
+ }
+ for _, i := range opts {
+ i(o)
+ }
+ return execxp.Exec(xp.n, t, o.NS, o.Funcs, o.Vars)
+}
+
+//ExecBool is like Exec, except it will attempt to convert the result to its boolean value.
+func (xp XPathExec) ExecBool(t tree.Node, opts ...FuncOpts) (bool, error) {
+ res, err := xp.Exec(t, opts...)
+ if err != nil {
+ return false, err
+ }
+
+ b, ok := res.(tree.IsBool)
+ if !ok {
+ return false, fmt.Errorf("Cannot convert result to a boolean")
+ }
+
+ return bool(b.Bool()), nil
+}
+
+//ExecNum is like Exec, except it will attempt to convert the result to its number value.
+func (xp XPathExec) ExecNum(t tree.Node, opts ...FuncOpts) (float64, error) {
+ res, err := xp.Exec(t, opts...)
+ if err != nil {
+ return 0, err
+ }
+
+ n, ok := res.(tree.IsNum)
+ if !ok {
+ return 0, fmt.Errorf("Cannot convert result to a number")
+ }
+
+ return float64(n.Num()), nil
+}
+
+//ExecNode is like Exec, except it will attempt to return the result as a node-set.
+func (xp XPathExec) ExecNode(t tree.Node, opts ...FuncOpts) (tree.NodeSet, error) {
+ res, err := xp.Exec(t, opts...)
+ if err != nil {
+ return nil, err
+ }
+
+ n, ok := res.(tree.NodeSet)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert result to a node-set")
+ }
+
+ return n, nil
+}
+
+//MustExec is like Exec, but panics instead of returning an error.
+func (xp XPathExec) MustExec(t tree.Node, opts ...FuncOpts) tree.Result {
+ res, err := xp.Exec(t, opts...)
+ if err != nil {
+ panic(err)
+ }
+ return res
+}
+
+//ParseExec parses the XPath string, xpstr, and runs Exec.
+func ParseExec(xpstr string, t tree.Node, opts ...FuncOpts) (tree.Result, error) {
+ xp, err := Parse(xpstr)
+ if err != nil {
+ return nil, err
+ }
+ return xp.Exec(t, opts...)
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/execxp.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/execxp.go
new file mode 100644
index 000000000..0746eacac
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/execxp.go
@@ -0,0 +1,27 @@
+package execxp
+
+import (
+ "encoding/xml"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/parser"
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+//Exec executes the XPath expression, xp, against the tree, t, with the
+//namespace mappings, ns.
+func Exec(n *parser.Node, t tree.Node, ns map[string]string, fns map[xml.Name]tree.Wrap, v map[string]tree.Result) (tree.Result, error) {
+ f := xpFilt{
+ t: t,
+ ns: ns,
+ ctx: tree.NodeSet{t},
+ fns: fns,
+ variables: v,
+ }
+
+ return exec(&f, n)
+}
+
+func exec(f *xpFilt, n *parser.Node) (tree.Result, error) {
+ err := xfExec(f, n)
+ return f.ctx, err
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/operators.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/operators.go
new file mode 100644
index 000000000..d41ba7fcc
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/operators.go
@@ -0,0 +1,212 @@
+package execxp
+
+import (
+ "fmt"
+ "math"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+func bothNodeOperator(left tree.NodeSet, right tree.NodeSet, f *xpFilt, op string) error {
+ var err error
+ for _, l := range left {
+ for _, r := range right {
+ lStr := l.ResValue()
+ rStr := r.ResValue()
+
+ if eqOps[op] {
+ err = equalsOperator(tree.String(lStr), tree.String(rStr), f, op)
+ if err == nil && f.ctx.String() == tree.True {
+ return nil
+ }
+ } else {
+ err = numberOperator(tree.String(lStr), tree.String(rStr), f, op)
+ if err == nil && f.ctx.String() == tree.True {
+ return nil
+ }
+ }
+ }
+ }
+
+ f.ctx = tree.Bool(false)
+
+ return nil
+}
+
+func leftNodeOperator(left tree.NodeSet, right tree.Result, f *xpFilt, op string) error {
+ var err error
+ for _, l := range left {
+ lStr := l.ResValue()
+
+ if eqOps[op] {
+ err = equalsOperator(tree.String(lStr), right, f, op)
+ if err == nil && f.ctx.String() == tree.True {
+ return nil
+ }
+ } else {
+ err = numberOperator(tree.String(lStr), right, f, op)
+ if err == nil && f.ctx.String() == tree.True {
+ return nil
+ }
+ }
+ }
+
+ f.ctx = tree.Bool(false)
+
+ return nil
+}
+
+func rightNodeOperator(left tree.Result, right tree.NodeSet, f *xpFilt, op string) error {
+ var err error
+ for _, r := range right {
+ rStr := r.ResValue()
+
+ if eqOps[op] {
+ err = equalsOperator(left, tree.String(rStr), f, op)
+ if err == nil && f.ctx.String() == "true" {
+ return nil
+ }
+ } else {
+ err = numberOperator(left, tree.String(rStr), f, op)
+ if err == nil && f.ctx.String() == "true" {
+ return nil
+ }
+ }
+ }
+
+ f.ctx = tree.Bool(false)
+
+ return nil
+}
+
+func equalsOperator(left, right tree.Result, f *xpFilt, op string) error {
+ _, lOK := left.(tree.Bool)
+ _, rOK := right.(tree.Bool)
+
+ if lOK || rOK {
+ lTest, lt := left.(tree.IsBool)
+ rTest, rt := right.(tree.IsBool)
+ if !lt || !rt {
+ return fmt.Errorf("Cannot convert argument to boolean")
+ }
+
+ if op == "=" {
+ f.ctx = tree.Bool(lTest.Bool() == rTest.Bool())
+ } else {
+ f.ctx = tree.Bool(lTest.Bool() != rTest.Bool())
+ }
+
+ return nil
+ }
+
+ _, lOK = left.(tree.Num)
+ _, rOK = right.(tree.Num)
+ if lOK || rOK {
+ return numberOperator(left, right, f, op)
+ }
+
+ lStr := left.String()
+ rStr := right.String()
+
+ if op == "=" {
+ f.ctx = tree.Bool(lStr == rStr)
+ } else {
+ f.ctx = tree.Bool(lStr != rStr)
+ }
+
+ return nil
+}
+
+func numberOperator(left, right tree.Result, f *xpFilt, op string) error {
+ lt, lOK := left.(tree.IsNum)
+ rt, rOK := right.(tree.IsNum)
+ if !lOK || !rOK {
+ return fmt.Errorf("Cannot convert data type to number")
+ }
+
+ ln, rn := lt.Num(), rt.Num()
+
+ switch op {
+ case "*":
+ f.ctx = ln * rn
+ case "div":
+ if rn != 0 {
+ f.ctx = ln / rn
+ } else {
+ if ln == 0 {
+ f.ctx = tree.Num(math.NaN())
+ } else {
+ if math.Signbit(float64(ln)) == math.Signbit(float64(rn)) {
+ f.ctx = tree.Num(math.Inf(1))
+ } else {
+ f.ctx = tree.Num(math.Inf(-1))
+ }
+ }
+ }
+ case "mod":
+ f.ctx = tree.Num(int(ln) % int(rn))
+ case "+":
+ f.ctx = ln + rn
+ case "-":
+ f.ctx = ln - rn
+ case "=":
+ f.ctx = tree.Bool(ln == rn)
+ case "!=":
+ f.ctx = tree.Bool(ln != rn)
+ case "<":
+ f.ctx = tree.Bool(ln < rn)
+ case "<=":
+ f.ctx = tree.Bool(ln <= rn)
+ case ">":
+ f.ctx = tree.Bool(ln > rn)
+ case ">=":
+ f.ctx = tree.Bool(ln >= rn)
+ }
+
+ return nil
+}
+
+func andOrOperator(left, right tree.Result, f *xpFilt, op string) error {
+ lt, lOK := left.(tree.IsBool)
+ rt, rOK := right.(tree.IsBool)
+
+ if !lOK || !rOK {
+ return fmt.Errorf("Cannot convert argument to boolean")
+ }
+
+ l, r := lt.Bool(), rt.Bool()
+
+ if op == "and" {
+ f.ctx = l && r
+ } else {
+ f.ctx = l || r
+ }
+
+ return nil
+}
+
+func unionOperator(left, right tree.Result, f *xpFilt, op string) error {
+ lNode, lOK := left.(tree.NodeSet)
+ rNode, rOK := right.(tree.NodeSet)
+
+ if !lOK || !rOK {
+ return fmt.Errorf("Cannot convert data type to node-set")
+ }
+
+ uniq := make(map[int]tree.Node)
+ for _, i := range lNode {
+ uniq[i.Pos()] = i
+ }
+ for _, i := range rNode {
+ uniq[i.Pos()] = i
+ }
+
+ res := make(tree.NodeSet, 0, len(uniq))
+ for _, v := range uniq {
+ res = append(res, v)
+ }
+
+ f.ctx = res
+
+ return nil
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/paths.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/paths.go
new file mode 100644
index 000000000..60ada7ab1
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/execxp/paths.go
@@ -0,0 +1,397 @@
+package execxp
+
+import (
+ "encoding/xml"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/parser"
+ "github.com/ChrisTrenkamp/goxpath/internal/parser/findutil"
+ "github.com/ChrisTrenkamp/goxpath/internal/parser/intfns"
+ "github.com/ChrisTrenkamp/goxpath/internal/xconst"
+ "github.com/ChrisTrenkamp/goxpath/internal/xsort"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/lexer"
+ "github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr"
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+type xpFilt struct {
+ t tree.Node
+ ctx tree.Result
+ expr pathexpr.PathExpr
+ ns map[string]string
+ ctxPos int
+ ctxSize int
+ proxPos map[int]int
+ fns map[xml.Name]tree.Wrap
+ variables map[string]tree.Result
+}
+
+type xpExecFn func(*xpFilt, string)
+
+var xpFns = map[lexer.XItemType]xpExecFn{
+ lexer.XItemAbsLocPath: xfAbsLocPath,
+ lexer.XItemAbbrAbsLocPath: xfAbbrAbsLocPath,
+ lexer.XItemRelLocPath: xfRelLocPath,
+ lexer.XItemAbbrRelLocPath: xfAbbrRelLocPath,
+ lexer.XItemAxis: xfAxis,
+ lexer.XItemAbbrAxis: xfAbbrAxis,
+ lexer.XItemNCName: xfNCName,
+ lexer.XItemQName: xfQName,
+ lexer.XItemNodeType: xfNodeType,
+ lexer.XItemProcLit: xfProcInstLit,
+ lexer.XItemStrLit: xfStrLit,
+ lexer.XItemNumLit: xfNumLit,
+}
+
+func xfExec(f *xpFilt, n *parser.Node) (err error) {
+ for n != nil {
+ if fn, ok := xpFns[n.Val.Typ]; ok {
+ fn(f, n.Val.Val)
+ n = n.Left
+ } else if n.Val.Typ == lexer.XItemPredicate {
+ if err = xfPredicate(f, n.Left); err != nil {
+ return
+ }
+
+ n = n.Right
+ } else if n.Val.Typ == lexer.XItemFunction {
+ if err = xfFunction(f, n); err != nil {
+ return
+ }
+
+ n = n.Right
+ } else if n.Val.Typ == lexer.XItemOperator {
+ lf := xpFilt{
+ t: f.t,
+ ns: f.ns,
+ ctx: f.ctx,
+ ctxPos: f.ctxPos,
+ ctxSize: f.ctxSize,
+ proxPos: f.proxPos,
+ fns: f.fns,
+ variables: f.variables,
+ }
+ left, err := exec(&lf, n.Left)
+ if err != nil {
+ return err
+ }
+
+ rf := xpFilt{
+ t: f.t,
+ ns: f.ns,
+ ctx: f.ctx,
+ fns: f.fns,
+ variables: f.variables,
+ }
+ right, err := exec(&rf, n.Right)
+ if err != nil {
+ return err
+ }
+
+ return xfOperator(left, right, f, n.Val.Val)
+ } else if n.Val.Typ == lexer.XItemVariable {
+ if res, ok := f.variables[n.Val.Val]; ok {
+ f.ctx = res
+ return nil
+ }
+ return fmt.Errorf("Invalid variable '%s'", n.Val.Val)
+ } else if string(n.Val.Typ) == "" {
+ n = n.Left
+ //} else {
+ // return fmt.Errorf("Cannot process " + string(n.Val.Typ))
+ }
+ }
+
+ return
+}
+
+func xfPredicate(f *xpFilt, n *parser.Node) (err error) {
+ res := f.ctx.(tree.NodeSet)
+ newRes := make(tree.NodeSet, 0, len(res))
+
+ for i := range res {
+ pf := xpFilt{
+ t: f.t,
+ ns: f.ns,
+ ctxPos: i,
+ ctxSize: f.ctxSize,
+ ctx: tree.NodeSet{res[i]},
+ fns: f.fns,
+ variables: f.variables,
+ }
+
+ predRes, err := exec(&pf, n)
+ if err != nil {
+ return err
+ }
+
+ ok, err := checkPredRes(predRes, f, res[i])
+ if err != nil {
+ return err
+ }
+
+ if ok {
+ newRes = append(newRes, res[i])
+ }
+ }
+
+ f.proxPos = make(map[int]int)
+ for pos, j := range newRes {
+ f.proxPos[j.Pos()] = pos + 1
+ }
+
+ f.ctx = newRes
+ f.ctxSize = len(newRes)
+
+ return
+}
+
+func checkPredRes(ret tree.Result, f *xpFilt, node tree.Node) (bool, error) {
+ if num, ok := ret.(tree.Num); ok {
+ if float64(f.proxPos[node.Pos()]) == float64(num) {
+ return true, nil
+ }
+ return false, nil
+ }
+
+ if b, ok := ret.(tree.IsBool); ok {
+ return bool(b.Bool()), nil
+ }
+
+ return false, fmt.Errorf("Cannot convert argument to boolean")
+}
+
+func xfFunction(f *xpFilt, n *parser.Node) error {
+ spl := strings.Split(n.Val.Val, ":")
+ var name xml.Name
+ if len(spl) == 1 {
+ name.Local = spl[0]
+ } else {
+ name.Space = f.ns[spl[0]]
+ name.Local = spl[1]
+ }
+ fn, ok := intfns.BuiltIn[name]
+ if !ok {
+ fn, ok = f.fns[name]
+ }
+
+ if ok {
+ args := []tree.Result{}
+ param := n.Left
+
+ for param != nil {
+ pf := xpFilt{
+ t: f.t,
+ ctx: f.ctx,
+ ns: f.ns,
+ ctxPos: f.ctxPos,
+ ctxSize: f.ctxSize,
+ fns: f.fns,
+ variables: f.variables,
+ }
+ res, err := exec(&pf, param.Left)
+ if err != nil {
+ return err
+ }
+
+ args = append(args, res)
+ param = param.Right
+ }
+
+ filt, err := fn.Call(tree.Ctx{NodeSet: f.ctx.(tree.NodeSet), Size: f.ctxSize, Pos: f.ctxPos + 1}, args...)
+ f.ctx = filt
+ return err
+ }
+
+ return fmt.Errorf("Unknown function: %s", n.Val.Val)
+}
+
+var eqOps = map[string]bool{
+ "=": true,
+ "!=": true,
+}
+
+var booleanOps = map[string]bool{
+ "=": true,
+ "!=": true,
+ "<": true,
+ "<=": true,
+ ">": true,
+ ">=": true,
+}
+
+var numOps = map[string]bool{
+ "*": true,
+ "div": true,
+ "mod": true,
+ "+": true,
+ "-": true,
+ "=": true,
+ "!=": true,
+ "<": true,
+ "<=": true,
+ ">": true,
+ ">=": true,
+}
+
+var andOrOps = map[string]bool{
+ "and": true,
+ "or": true,
+}
+
+func xfOperator(left, right tree.Result, f *xpFilt, op string) error {
+ if booleanOps[op] {
+ lNode, lOK := left.(tree.NodeSet)
+ rNode, rOK := right.(tree.NodeSet)
+ if lOK && rOK {
+ return bothNodeOperator(lNode, rNode, f, op)
+ }
+
+ if lOK {
+ return leftNodeOperator(lNode, right, f, op)
+ }
+
+ if rOK {
+ return rightNodeOperator(left, rNode, f, op)
+ }
+
+ if eqOps[op] {
+ return equalsOperator(left, right, f, op)
+ }
+ }
+
+ if numOps[op] {
+ return numberOperator(left, right, f, op)
+ }
+
+ if andOrOps[op] {
+ return andOrOperator(left, right, f, op)
+ }
+
+ //if op == "|" {
+ return unionOperator(left, right, f, op)
+ //}
+
+ //return fmt.Errorf("Unknown operator " + op)
+}
+
+func xfAbsLocPath(f *xpFilt, val string) {
+ i := f.t
+ for i.GetNodeType() != tree.NtRoot {
+ i = i.GetParent()
+ }
+ f.ctx = tree.NodeSet{i}
+}
+
+func xfAbbrAbsLocPath(f *xpFilt, val string) {
+ i := f.t
+ for i.GetNodeType() != tree.NtRoot {
+ i = i.GetParent()
+ }
+ f.ctx = tree.NodeSet{i}
+ f.expr = abbrPathExpr()
+ find(f)
+}
+
+func xfRelLocPath(f *xpFilt, val string) {
+}
+
+func xfAbbrRelLocPath(f *xpFilt, val string) {
+ f.expr = abbrPathExpr()
+ find(f)
+}
+
+func xfAxis(f *xpFilt, val string) {
+ f.expr.Axis = val
+}
+
+func xfAbbrAxis(f *xpFilt, val string) {
+ f.expr.Axis = xconst.AxisAttribute
+}
+
+func xfNCName(f *xpFilt, val string) {
+ f.expr.Name.Space = val
+}
+
+func xfQName(f *xpFilt, val string) {
+ f.expr.Name.Local = val
+ find(f)
+}
+
+func xfNodeType(f *xpFilt, val string) {
+ f.expr.NodeType = val
+ find(f)
+}
+
+func xfProcInstLit(f *xpFilt, val string) {
+ filt := tree.NodeSet{}
+ for _, i := range f.ctx.(tree.NodeSet) {
+ if i.GetToken().(xml.ProcInst).Target == val {
+ filt = append(filt, i)
+ }
+ }
+ f.ctx = filt
+}
+
+func xfStrLit(f *xpFilt, val string) {
+ f.ctx = tree.String(val)
+}
+
+func xfNumLit(f *xpFilt, val string) {
+ num, _ := strconv.ParseFloat(val, 64)
+ f.ctx = tree.Num(num)
+}
+
+func abbrPathExpr() pathexpr.PathExpr {
+ return pathexpr.PathExpr{
+ Name: xml.Name{},
+ Axis: xconst.AxisDescendentOrSelf,
+ NodeType: xconst.NodeTypeNode,
+ }
+}
+
+func find(f *xpFilt) {
+ dupFilt := make(map[int]tree.Node)
+ f.proxPos = make(map[int]int)
+
+ if f.expr.Axis == "" && f.expr.NodeType == "" && f.expr.Name.Space == "" {
+ if f.expr.Name.Local == "." {
+ f.expr = pathexpr.PathExpr{
+ Name: xml.Name{},
+ Axis: xconst.AxisSelf,
+ NodeType: xconst.NodeTypeNode,
+ }
+ }
+
+ if f.expr.Name.Local == ".." {
+ f.expr = pathexpr.PathExpr{
+ Name: xml.Name{},
+ Axis: xconst.AxisParent,
+ NodeType: xconst.NodeTypeNode,
+ }
+ }
+ }
+
+ f.expr.NS = f.ns
+
+ for _, i := range f.ctx.(tree.NodeSet) {
+ for pos, j := range findutil.Find(i, f.expr) {
+ dupFilt[j.Pos()] = j
+ f.proxPos[j.Pos()] = pos + 1
+ }
+ }
+
+ res := make(tree.NodeSet, 0, len(dupFilt))
+ for _, i := range dupFilt {
+ res = append(res, i)
+ }
+
+ xsort.SortNodes(res)
+
+ f.expr = pathexpr.PathExpr{}
+ f.ctxSize = len(res)
+ f.ctx = res
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/lexer.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/lexer.go
new file mode 100644
index 000000000..29f53c42a
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/lexer.go
@@ -0,0 +1,419 @@
+package lexer
+
+import (
+ "fmt"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+)
+
+const (
+ //XItemError is an error with the parser input
+ XItemError XItemType = "Error"
+ //XItemAbsLocPath is an absolute path
+ XItemAbsLocPath = "Absolute path"
+ //XItemAbbrAbsLocPath represents an abbreviated absolute path
+ XItemAbbrAbsLocPath = "Abbreviated absolute path"
+ //XItemAbbrRelLocPath marks the start of a path expression
+ XItemAbbrRelLocPath = "Abbreviated relative path"
+ //XItemRelLocPath represents a relative location path
+ XItemRelLocPath = "Relative path"
+ //XItemEndPath marks the end of a path
+ XItemEndPath = "End path instruction"
+ //XItemAxis marks an axis specifier of a path
+ XItemAxis = "Axis"
+ //XItemAbbrAxis marks an abbreviated axis specifier (just @ at this point)
+ XItemAbbrAxis = "Abbreviated attribute axis"
+ //XItemNCName marks a namespace name in a node test
+ XItemNCName = "Namespace"
+ //XItemQName marks the local name in an a node test
+ XItemQName = "Local name"
+ //XItemNodeType marks a node type in a node test
+ XItemNodeType = "Node type"
+ //XItemProcLit marks a processing-instruction literal
+ XItemProcLit = "processing-instruction"
+ //XItemFunction marks a function call
+ XItemFunction = "function"
+ //XItemArgument marks a function argument
+ XItemArgument = "function argument"
+ //XItemEndFunction marks the end of a function
+ XItemEndFunction = "end of function"
+ //XItemPredicate marks a predicate in an axis
+ XItemPredicate = "predicate"
+ //XItemEndPredicate marks a predicate in an axis
+ XItemEndPredicate = "end of predicate"
+ //XItemStrLit marks a string literal
+ XItemStrLit = "string literal"
+ //XItemNumLit marks a numeric literal
+ XItemNumLit = "numeric literal"
+ //XItemOperator marks an operator
+ XItemOperator = "operator"
+ //XItemVariable marks a variable reference
+ XItemVariable = "variable"
+)
+
+const (
+ eof = -(iota + 1)
+)
+
+//XItemType is the parser token types
+type XItemType string
+
+//XItem is the token emitted from the parser
+type XItem struct {
+ Typ XItemType
+ Val string
+}
+
+type stateFn func(*Lexer) stateFn
+
+//Lexer lexes out XPath expressions
+type Lexer struct {
+ input string
+ start int
+ pos int
+ width int
+ items chan XItem
+}
+
+//Lex an XPath expresion on the io.Reader
+func Lex(xpath string) chan XItem {
+ l := &Lexer{
+ input: xpath,
+ items: make(chan XItem),
+ }
+ go l.run()
+ return l.items
+}
+
+func (l *Lexer) run() {
+ for state := startState; state != nil; {
+ state = state(l)
+ }
+
+ if l.peek() != eof {
+ l.errorf("Malformed XPath expression")
+ }
+
+ close(l.items)
+}
+
+func (l *Lexer) emit(t XItemType) {
+ l.items <- XItem{t, l.input[l.start:l.pos]}
+ l.start = l.pos
+}
+
+func (l *Lexer) emitVal(t XItemType, val string) {
+ l.items <- XItem{t, val}
+ l.start = l.pos
+}
+
+func (l *Lexer) next() (r rune) {
+ if l.pos >= len(l.input) {
+ l.width = 0
+ return eof
+ }
+
+ r, l.width = utf8.DecodeRuneInString(l.input[l.pos:])
+
+ l.pos += l.width
+
+ return r
+}
+
+func (l *Lexer) ignore() {
+ l.start = l.pos
+}
+
+func (l *Lexer) backup() {
+ l.pos -= l.width
+}
+
+func (l *Lexer) peek() rune {
+ r := l.next()
+
+ l.backup()
+ return r
+}
+
+func (l *Lexer) peekAt(n int) rune {
+ if n <= 1 {
+ return l.peek()
+ }
+
+ width := 0
+ var ret rune
+
+ for count := 0; count < n; count++ {
+ r, s := utf8.DecodeRuneInString(l.input[l.pos+width:])
+ width += s
+
+ if l.pos+width > len(l.input) {
+ return eof
+ }
+
+ ret = r
+ }
+
+ return ret
+}
+
+func (l *Lexer) accept(valid string) bool {
+ if strings.ContainsRune(valid, l.next()) {
+ return true
+ }
+
+ l.backup()
+ return false
+}
+
+func (l *Lexer) acceptRun(valid string) {
+ for strings.ContainsRune(valid, l.next()) {
+ }
+ l.backup()
+}
+
+func (l *Lexer) skip(num int) {
+ for i := 0; i < num; i++ {
+ l.next()
+ }
+ l.ignore()
+}
+
+func (l *Lexer) skipWS(ig bool) {
+ for {
+ n := l.next()
+
+ if n == eof || !unicode.IsSpace(n) {
+ break
+ }
+ }
+
+ l.backup()
+
+ if ig {
+ l.ignore()
+ }
+}
+
+func (l *Lexer) errorf(format string, args ...interface{}) stateFn {
+ l.items <- XItem{
+ XItemError,
+ fmt.Sprintf(format, args...),
+ }
+
+ return nil
+}
+
+func isElemChar(r rune) bool {
+ return string(r) != ":" && string(r) != "/" &&
+ (unicode.Is(first, r) || unicode.Is(second, r) || string(r) == "*") &&
+ r != eof
+}
+
+func startState(l *Lexer) stateFn {
+ l.skipWS(true)
+
+ if string(l.peek()) == "/" {
+ l.next()
+ l.ignore()
+
+ if string(l.next()) == "/" {
+ l.ignore()
+ return abbrAbsLocPathState
+ }
+
+ l.backup()
+ return absLocPathState
+ } else if string(l.peek()) == `'` || string(l.peek()) == `"` {
+ if err := getStrLit(l, XItemStrLit); err != nil {
+ return l.errorf(err.Error())
+ }
+
+ if l.peek() != eof {
+ return startState
+ }
+ } else if getNumLit(l) {
+ l.skipWS(true)
+ if l.peek() != eof {
+ return startState
+ }
+ } else if string(l.peek()) == "$" {
+ l.next()
+ l.ignore()
+ r := l.peek()
+ for unicode.Is(first, r) || unicode.Is(second, r) {
+ l.next()
+ r = l.peek()
+ }
+ tok := l.input[l.start:l.pos]
+ if len(tok) == 0 {
+ return l.errorf("Empty variable name")
+ }
+ l.emit(XItemVariable)
+ l.skipWS(true)
+ if l.peek() != eof {
+ return startState
+ }
+ } else if st := findOperatorState(l); st != nil {
+ return st
+ } else {
+ if isElemChar(l.peek()) {
+ colons := 0
+
+ for {
+ if isElemChar(l.peek()) {
+ l.next()
+ } else if string(l.peek()) == ":" {
+ l.next()
+ colons++
+ } else {
+ break
+ }
+ }
+
+ if string(l.peek()) == "(" && colons <= 1 {
+ tok := l.input[l.start:l.pos]
+ err := procFunc(l, tok)
+ if err != nil {
+ return l.errorf(err.Error())
+ }
+
+ l.skipWS(true)
+
+ if string(l.peek()) == "/" {
+ l.next()
+ l.ignore()
+
+ if string(l.next()) == "/" {
+ l.ignore()
+ return abbrRelLocPathState
+ }
+
+ l.backup()
+ return relLocPathState
+ }
+
+ return startState
+ }
+
+ l.pos = l.start
+ return relLocPathState
+ } else if string(l.peek()) == "@" {
+ return relLocPathState
+ }
+ }
+
+ return nil
+}
+
+func strPeek(str string, l *Lexer) bool {
+ for i := 0; i < len(str); i++ {
+ if string(l.peekAt(i+1)) != string(str[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+func findOperatorState(l *Lexer) stateFn {
+ l.skipWS(true)
+
+ switch string(l.peek()) {
+ case ">", "<", "!":
+ l.next()
+ if string(l.peek()) == "=" {
+ l.next()
+ }
+ l.emit(XItemOperator)
+ return startState
+ case "|", "+", "-", "*", "=":
+ l.next()
+ l.emit(XItemOperator)
+ return startState
+ case "(":
+ l.next()
+ l.emit(XItemOperator)
+ for state := startState; state != nil; {
+ state = state(l)
+ }
+ l.skipWS(true)
+ if string(l.next()) != ")" {
+ return l.errorf("Missing end )")
+ }
+ l.emit(XItemOperator)
+ return startState
+ }
+
+ if strPeek("and", l) {
+ l.next()
+ l.next()
+ l.next()
+ l.emit(XItemOperator)
+ return startState
+ }
+
+ if strPeek("or", l) {
+ l.next()
+ l.next()
+ l.emit(XItemOperator)
+ return startState
+ }
+
+ if strPeek("mod", l) {
+ l.next()
+ l.next()
+ l.next()
+ l.emit(XItemOperator)
+ return startState
+ }
+
+ if strPeek("div", l) {
+ l.next()
+ l.next()
+ l.next()
+ l.emit(XItemOperator)
+ return startState
+ }
+
+ return nil
+}
+
+func getStrLit(l *Lexer, tok XItemType) error {
+ q := l.next()
+ var r rune
+
+ l.ignore()
+
+ for r != q {
+ r = l.next()
+ if r == eof {
+ return fmt.Errorf("Unexpected end of string literal.")
+ }
+ }
+
+ l.backup()
+ l.emit(tok)
+ l.next()
+ l.ignore()
+
+ return nil
+}
+
+func getNumLit(l *Lexer) bool {
+ const dig = "0123456789"
+ l.accept("-")
+ start := l.pos
+ l.acceptRun(dig)
+
+ if l.pos == start {
+ return false
+ }
+
+ if l.accept(".") {
+ l.acceptRun(dig)
+ }
+
+ l.emit(XItemNumLit)
+ return true
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/paths.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/paths.go
new file mode 100644
index 000000000..2393f6966
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/paths.go
@@ -0,0 +1,219 @@
+package lexer
+
+import (
+ "fmt"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/xconst"
+)
+
+func absLocPathState(l *Lexer) stateFn {
+ l.emit(XItemAbsLocPath)
+ return stepState
+}
+
+func abbrAbsLocPathState(l *Lexer) stateFn {
+ l.emit(XItemAbbrAbsLocPath)
+ return stepState
+}
+
+func relLocPathState(l *Lexer) stateFn {
+ l.emit(XItemRelLocPath)
+ return stepState
+}
+
+func abbrRelLocPathState(l *Lexer) stateFn {
+ l.emit(XItemAbbrRelLocPath)
+ return stepState
+}
+
+func stepState(l *Lexer) stateFn {
+ l.skipWS(true)
+ r := l.next()
+
+ for isElemChar(r) {
+ r = l.next()
+ }
+
+ l.backup()
+ tok := l.input[l.start:l.pos]
+
+ state, err := parseSeparators(l, tok)
+ if err != nil {
+ return l.errorf(err.Error())
+ }
+
+ return getNextPathState(l, state)
+}
+
+func parseSeparators(l *Lexer, tok string) (XItemType, error) {
+ l.skipWS(false)
+ state := XItemType(XItemQName)
+ r := l.peek()
+
+ if string(r) == ":" && string(l.peekAt(2)) == ":" {
+ var err error
+ if state, err = getAxis(l, tok); err != nil {
+ return state, fmt.Errorf(err.Error())
+ }
+ } else if string(r) == ":" {
+ state = XItemNCName
+ l.emitVal(state, tok)
+ l.skip(1)
+ l.skipWS(true)
+ } else if string(r) == "@" {
+ state = XItemAbbrAxis
+ l.emitVal(state, tok)
+ l.skip(1)
+ l.skipWS(true)
+ } else if string(r) == "(" {
+ var err error
+ if state, err = getNT(l, tok); err != nil {
+ return state, fmt.Errorf(err.Error())
+ }
+ } else if len(tok) > 0 {
+ l.emitVal(state, tok)
+ }
+
+ return state, nil
+}
+
+func getAxis(l *Lexer, tok string) (XItemType, error) {
+ var state XItemType
+ for i := range xconst.AxisNames {
+ if tok == xconst.AxisNames[i] {
+ state = XItemAxis
+ }
+ }
+ if state != XItemAxis {
+ return state, fmt.Errorf("Invalid Axis specifier, %s", tok)
+ }
+ l.emitVal(state, tok)
+ l.skip(2)
+ l.skipWS(true)
+ return state, nil
+}
+
+func getNT(l *Lexer, tok string) (XItemType, error) {
+ isNT := false
+ for _, i := range xconst.NodeTypes {
+ if tok == i {
+ isNT = true
+ break
+ }
+ }
+
+ if isNT {
+ return procNT(l, tok)
+ }
+
+ return XItemError, fmt.Errorf("Invalid node-type " + tok)
+}
+
+func procNT(l *Lexer, tok string) (XItemType, error) {
+ state := XItemType(XItemNodeType)
+ l.emitVal(state, tok)
+ l.skip(1)
+ l.skipWS(true)
+ n := l.peek()
+ if tok == xconst.NodeTypeProcInst && (string(n) == `"` || string(n) == `'`) {
+ if err := getStrLit(l, XItemProcLit); err != nil {
+ return state, fmt.Errorf(err.Error())
+ }
+ l.skipWS(true)
+ n = l.next()
+ }
+
+ if string(n) != ")" {
+ return state, fmt.Errorf("Missing ) at end of NodeType declaration.")
+ }
+
+ l.skip(1)
+ return state, nil
+}
+
+func procFunc(l *Lexer, tok string) error {
+ state := XItemType(XItemFunction)
+ l.emitVal(state, tok)
+ l.skip(1)
+ l.skipWS(true)
+ if string(l.peek()) != ")" {
+ l.emit(XItemArgument)
+ for {
+ for state := startState; state != nil; {
+ state = state(l)
+ }
+ l.skipWS(true)
+
+ if string(l.peek()) == "," {
+ l.emit(XItemArgument)
+ l.skip(1)
+ } else if string(l.peek()) == ")" {
+ l.emit(XItemEndFunction)
+ l.skip(1)
+ break
+ } else if l.peek() == eof {
+ return fmt.Errorf("Missing ) at end of function declaration.")
+ }
+ }
+ } else {
+ l.emit(XItemEndFunction)
+ l.skip(1)
+ }
+
+ return nil
+}
+
+func getNextPathState(l *Lexer, state XItemType) stateFn {
+ isMultiPart := state == XItemAxis || state == XItemAbbrAxis || state == XItemNCName
+
+ l.skipWS(true)
+
+ for string(l.peek()) == "[" {
+ if err := getPred(l); err != nil {
+ return l.errorf(err.Error())
+ }
+ }
+
+ if string(l.peek()) == "/" && !isMultiPart {
+ l.skip(1)
+ if string(l.peek()) == "/" {
+ l.skip(1)
+ return abbrRelLocPathState
+ }
+ l.skipWS(true)
+ return relLocPathState
+ } else if isMultiPart && isElemChar(l.peek()) {
+ return stepState
+ }
+
+ if isMultiPart {
+ return l.errorf("Step is not complete")
+ }
+
+ l.emit(XItemEndPath)
+ return findOperatorState
+}
+
+func getPred(l *Lexer) error {
+ l.emit(XItemPredicate)
+ l.skip(1)
+ l.skipWS(true)
+
+ if string(l.peek()) == "]" {
+ return fmt.Errorf("Missing content in predicate.")
+ }
+
+ for state := startState; state != nil; {
+ state = state(l)
+ }
+
+ l.skipWS(true)
+ if string(l.peek()) != "]" {
+ return fmt.Errorf("Missing ] at end of predicate.")
+ }
+ l.skip(1)
+ l.emit(XItemEndPredicate)
+ l.skipWS(true)
+
+ return nil
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/xmlchars.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/xmlchars.go
new file mode 100644
index 000000000..4e6bc8f67
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/lexer/xmlchars.go
@@ -0,0 +1,316 @@
+package lexer
+
+import "unicode"
+
+//first and second was copied from src/encoding/xml/xml.go
+var first = &unicode.RangeTable{
+ R16: []unicode.Range16{
+ {0x003A, 0x003A, 1},
+ {0x0041, 0x005A, 1},
+ {0x005F, 0x005F, 1},
+ {0x0061, 0x007A, 1},
+ {0x00C0, 0x00D6, 1},
+ {0x00D8, 0x00F6, 1},
+ {0x00F8, 0x00FF, 1},
+ {0x0100, 0x0131, 1},
+ {0x0134, 0x013E, 1},
+ {0x0141, 0x0148, 1},
+ {0x014A, 0x017E, 1},
+ {0x0180, 0x01C3, 1},
+ {0x01CD, 0x01F0, 1},
+ {0x01F4, 0x01F5, 1},
+ {0x01FA, 0x0217, 1},
+ {0x0250, 0x02A8, 1},
+ {0x02BB, 0x02C1, 1},
+ {0x0386, 0x0386, 1},
+ {0x0388, 0x038A, 1},
+ {0x038C, 0x038C, 1},
+ {0x038E, 0x03A1, 1},
+ {0x03A3, 0x03CE, 1},
+ {0x03D0, 0x03D6, 1},
+ {0x03DA, 0x03E0, 2},
+ {0x03E2, 0x03F3, 1},
+ {0x0401, 0x040C, 1},
+ {0x040E, 0x044F, 1},
+ {0x0451, 0x045C, 1},
+ {0x045E, 0x0481, 1},
+ {0x0490, 0x04C4, 1},
+ {0x04C7, 0x04C8, 1},
+ {0x04CB, 0x04CC, 1},
+ {0x04D0, 0x04EB, 1},
+ {0x04EE, 0x04F5, 1},
+ {0x04F8, 0x04F9, 1},
+ {0x0531, 0x0556, 1},
+ {0x0559, 0x0559, 1},
+ {0x0561, 0x0586, 1},
+ {0x05D0, 0x05EA, 1},
+ {0x05F0, 0x05F2, 1},
+ {0x0621, 0x063A, 1},
+ {0x0641, 0x064A, 1},
+ {0x0671, 0x06B7, 1},
+ {0x06BA, 0x06BE, 1},
+ {0x06C0, 0x06CE, 1},
+ {0x06D0, 0x06D3, 1},
+ {0x06D5, 0x06D5, 1},
+ {0x06E5, 0x06E6, 1},
+ {0x0905, 0x0939, 1},
+ {0x093D, 0x093D, 1},
+ {0x0958, 0x0961, 1},
+ {0x0985, 0x098C, 1},
+ {0x098F, 0x0990, 1},
+ {0x0993, 0x09A8, 1},
+ {0x09AA, 0x09B0, 1},
+ {0x09B2, 0x09B2, 1},
+ {0x09B6, 0x09B9, 1},
+ {0x09DC, 0x09DD, 1},
+ {0x09DF, 0x09E1, 1},
+ {0x09F0, 0x09F1, 1},
+ {0x0A05, 0x0A0A, 1},
+ {0x0A0F, 0x0A10, 1},
+ {0x0A13, 0x0A28, 1},
+ {0x0A2A, 0x0A30, 1},
+ {0x0A32, 0x0A33, 1},
+ {0x0A35, 0x0A36, 1},
+ {0x0A38, 0x0A39, 1},
+ {0x0A59, 0x0A5C, 1},
+ {0x0A5E, 0x0A5E, 1},
+ {0x0A72, 0x0A74, 1},
+ {0x0A85, 0x0A8B, 1},
+ {0x0A8D, 0x0A8D, 1},
+ {0x0A8F, 0x0A91, 1},
+ {0x0A93, 0x0AA8, 1},
+ {0x0AAA, 0x0AB0, 1},
+ {0x0AB2, 0x0AB3, 1},
+ {0x0AB5, 0x0AB9, 1},
+ {0x0ABD, 0x0AE0, 0x23},
+ {0x0B05, 0x0B0C, 1},
+ {0x0B0F, 0x0B10, 1},
+ {0x0B13, 0x0B28, 1},
+ {0x0B2A, 0x0B30, 1},
+ {0x0B32, 0x0B33, 1},
+ {0x0B36, 0x0B39, 1},
+ {0x0B3D, 0x0B3D, 1},
+ {0x0B5C, 0x0B5D, 1},
+ {0x0B5F, 0x0B61, 1},
+ {0x0B85, 0x0B8A, 1},
+ {0x0B8E, 0x0B90, 1},
+ {0x0B92, 0x0B95, 1},
+ {0x0B99, 0x0B9A, 1},
+ {0x0B9C, 0x0B9C, 1},
+ {0x0B9E, 0x0B9F, 1},
+ {0x0BA3, 0x0BA4, 1},
+ {0x0BA8, 0x0BAA, 1},
+ {0x0BAE, 0x0BB5, 1},
+ {0x0BB7, 0x0BB9, 1},
+ {0x0C05, 0x0C0C, 1},
+ {0x0C0E, 0x0C10, 1},
+ {0x0C12, 0x0C28, 1},
+ {0x0C2A, 0x0C33, 1},
+ {0x0C35, 0x0C39, 1},
+ {0x0C60, 0x0C61, 1},
+ {0x0C85, 0x0C8C, 1},
+ {0x0C8E, 0x0C90, 1},
+ {0x0C92, 0x0CA8, 1},
+ {0x0CAA, 0x0CB3, 1},
+ {0x0CB5, 0x0CB9, 1},
+ {0x0CDE, 0x0CDE, 1},
+ {0x0CE0, 0x0CE1, 1},
+ {0x0D05, 0x0D0C, 1},
+ {0x0D0E, 0x0D10, 1},
+ {0x0D12, 0x0D28, 1},
+ {0x0D2A, 0x0D39, 1},
+ {0x0D60, 0x0D61, 1},
+ {0x0E01, 0x0E2E, 1},
+ {0x0E30, 0x0E30, 1},
+ {0x0E32, 0x0E33, 1},
+ {0x0E40, 0x0E45, 1},
+ {0x0E81, 0x0E82, 1},
+ {0x0E84, 0x0E84, 1},
+ {0x0E87, 0x0E88, 1},
+ {0x0E8A, 0x0E8D, 3},
+ {0x0E94, 0x0E97, 1},
+ {0x0E99, 0x0E9F, 1},
+ {0x0EA1, 0x0EA3, 1},
+ {0x0EA5, 0x0EA7, 2},
+ {0x0EAA, 0x0EAB, 1},
+ {0x0EAD, 0x0EAE, 1},
+ {0x0EB0, 0x0EB0, 1},
+ {0x0EB2, 0x0EB3, 1},
+ {0x0EBD, 0x0EBD, 1},
+ {0x0EC0, 0x0EC4, 1},
+ {0x0F40, 0x0F47, 1},
+ {0x0F49, 0x0F69, 1},
+ {0x10A0, 0x10C5, 1},
+ {0x10D0, 0x10F6, 1},
+ {0x1100, 0x1100, 1},
+ {0x1102, 0x1103, 1},
+ {0x1105, 0x1107, 1},
+ {0x1109, 0x1109, 1},
+ {0x110B, 0x110C, 1},
+ {0x110E, 0x1112, 1},
+ {0x113C, 0x1140, 2},
+ {0x114C, 0x1150, 2},
+ {0x1154, 0x1155, 1},
+ {0x1159, 0x1159, 1},
+ {0x115F, 0x1161, 1},
+ {0x1163, 0x1169, 2},
+ {0x116D, 0x116E, 1},
+ {0x1172, 0x1173, 1},
+ {0x1175, 0x119E, 0x119E - 0x1175},
+ {0x11A8, 0x11AB, 0x11AB - 0x11A8},
+ {0x11AE, 0x11AF, 1},
+ {0x11B7, 0x11B8, 1},
+ {0x11BA, 0x11BA, 1},
+ {0x11BC, 0x11C2, 1},
+ {0x11EB, 0x11F0, 0x11F0 - 0x11EB},
+ {0x11F9, 0x11F9, 1},
+ {0x1E00, 0x1E9B, 1},
+ {0x1EA0, 0x1EF9, 1},
+ {0x1F00, 0x1F15, 1},
+ {0x1F18, 0x1F1D, 1},
+ {0x1F20, 0x1F45, 1},
+ {0x1F48, 0x1F4D, 1},
+ {0x1F50, 0x1F57, 1},
+ {0x1F59, 0x1F5B, 0x1F5B - 0x1F59},
+ {0x1F5D, 0x1F5D, 1},
+ {0x1F5F, 0x1F7D, 1},
+ {0x1F80, 0x1FB4, 1},
+ {0x1FB6, 0x1FBC, 1},
+ {0x1FBE, 0x1FBE, 1},
+ {0x1FC2, 0x1FC4, 1},
+ {0x1FC6, 0x1FCC, 1},
+ {0x1FD0, 0x1FD3, 1},
+ {0x1FD6, 0x1FDB, 1},
+ {0x1FE0, 0x1FEC, 1},
+ {0x1FF2, 0x1FF4, 1},
+ {0x1FF6, 0x1FFC, 1},
+ {0x2126, 0x2126, 1},
+ {0x212A, 0x212B, 1},
+ {0x212E, 0x212E, 1},
+ {0x2180, 0x2182, 1},
+ {0x3007, 0x3007, 1},
+ {0x3021, 0x3029, 1},
+ {0x3041, 0x3094, 1},
+ {0x30A1, 0x30FA, 1},
+ {0x3105, 0x312C, 1},
+ {0x4E00, 0x9FA5, 1},
+ {0xAC00, 0xD7A3, 1},
+ },
+}
+
+var second = &unicode.RangeTable{
+ R16: []unicode.Range16{
+ {0x002D, 0x002E, 1},
+ {0x0030, 0x0039, 1},
+ {0x00B7, 0x00B7, 1},
+ {0x02D0, 0x02D1, 1},
+ {0x0300, 0x0345, 1},
+ {0x0360, 0x0361, 1},
+ {0x0387, 0x0387, 1},
+ {0x0483, 0x0486, 1},
+ {0x0591, 0x05A1, 1},
+ {0x05A3, 0x05B9, 1},
+ {0x05BB, 0x05BD, 1},
+ {0x05BF, 0x05BF, 1},
+ {0x05C1, 0x05C2, 1},
+ {0x05C4, 0x0640, 0x0640 - 0x05C4},
+ {0x064B, 0x0652, 1},
+ {0x0660, 0x0669, 1},
+ {0x0670, 0x0670, 1},
+ {0x06D6, 0x06DC, 1},
+ {0x06DD, 0x06DF, 1},
+ {0x06E0, 0x06E4, 1},
+ {0x06E7, 0x06E8, 1},
+ {0x06EA, 0x06ED, 1},
+ {0x06F0, 0x06F9, 1},
+ {0x0901, 0x0903, 1},
+ {0x093C, 0x093C, 1},
+ {0x093E, 0x094C, 1},
+ {0x094D, 0x094D, 1},
+ {0x0951, 0x0954, 1},
+ {0x0962, 0x0963, 1},
+ {0x0966, 0x096F, 1},
+ {0x0981, 0x0983, 1},
+ {0x09BC, 0x09BC, 1},
+ {0x09BE, 0x09BF, 1},
+ {0x09C0, 0x09C4, 1},
+ {0x09C7, 0x09C8, 1},
+ {0x09CB, 0x09CD, 1},
+ {0x09D7, 0x09D7, 1},
+ {0x09E2, 0x09E3, 1},
+ {0x09E6, 0x09EF, 1},
+ {0x0A02, 0x0A3C, 0x3A},
+ {0x0A3E, 0x0A3F, 1},
+ {0x0A40, 0x0A42, 1},
+ {0x0A47, 0x0A48, 1},
+ {0x0A4B, 0x0A4D, 1},
+ {0x0A66, 0x0A6F, 1},
+ {0x0A70, 0x0A71, 1},
+ {0x0A81, 0x0A83, 1},
+ {0x0ABC, 0x0ABC, 1},
+ {0x0ABE, 0x0AC5, 1},
+ {0x0AC7, 0x0AC9, 1},
+ {0x0ACB, 0x0ACD, 1},
+ {0x0AE6, 0x0AEF, 1},
+ {0x0B01, 0x0B03, 1},
+ {0x0B3C, 0x0B3C, 1},
+ {0x0B3E, 0x0B43, 1},
+ {0x0B47, 0x0B48, 1},
+ {0x0B4B, 0x0B4D, 1},
+ {0x0B56, 0x0B57, 1},
+ {0x0B66, 0x0B6F, 1},
+ {0x0B82, 0x0B83, 1},
+ {0x0BBE, 0x0BC2, 1},
+ {0x0BC6, 0x0BC8, 1},
+ {0x0BCA, 0x0BCD, 1},
+ {0x0BD7, 0x0BD7, 1},
+ {0x0BE7, 0x0BEF, 1},
+ {0x0C01, 0x0C03, 1},
+ {0x0C3E, 0x0C44, 1},
+ {0x0C46, 0x0C48, 1},
+ {0x0C4A, 0x0C4D, 1},
+ {0x0C55, 0x0C56, 1},
+ {0x0C66, 0x0C6F, 1},
+ {0x0C82, 0x0C83, 1},
+ {0x0CBE, 0x0CC4, 1},
+ {0x0CC6, 0x0CC8, 1},
+ {0x0CCA, 0x0CCD, 1},
+ {0x0CD5, 0x0CD6, 1},
+ {0x0CE6, 0x0CEF, 1},
+ {0x0D02, 0x0D03, 1},
+ {0x0D3E, 0x0D43, 1},
+ {0x0D46, 0x0D48, 1},
+ {0x0D4A, 0x0D4D, 1},
+ {0x0D57, 0x0D57, 1},
+ {0x0D66, 0x0D6F, 1},
+ {0x0E31, 0x0E31, 1},
+ {0x0E34, 0x0E3A, 1},
+ {0x0E46, 0x0E46, 1},
+ {0x0E47, 0x0E4E, 1},
+ {0x0E50, 0x0E59, 1},
+ {0x0EB1, 0x0EB1, 1},
+ {0x0EB4, 0x0EB9, 1},
+ {0x0EBB, 0x0EBC, 1},
+ {0x0EC6, 0x0EC6, 1},
+ {0x0EC8, 0x0ECD, 1},
+ {0x0ED0, 0x0ED9, 1},
+ {0x0F18, 0x0F19, 1},
+ {0x0F20, 0x0F29, 1},
+ {0x0F35, 0x0F39, 2},
+ {0x0F3E, 0x0F3F, 1},
+ {0x0F71, 0x0F84, 1},
+ {0x0F86, 0x0F8B, 1},
+ {0x0F90, 0x0F95, 1},
+ {0x0F97, 0x0F97, 1},
+ {0x0F99, 0x0FAD, 1},
+ {0x0FB1, 0x0FB7, 1},
+ {0x0FB9, 0x0FB9, 1},
+ {0x20D0, 0x20DC, 1},
+ {0x20E1, 0x3005, 0x3005 - 0x20E1},
+ {0x302A, 0x302F, 1},
+ {0x3031, 0x3035, 1},
+ {0x3099, 0x309A, 1},
+ {0x309D, 0x309E, 1},
+ {0x30FC, 0x30FE, 1},
+ },
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/ast.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/ast.go
new file mode 100644
index 000000000..ec62206ea
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/ast.go
@@ -0,0 +1,113 @@
+package parser
+
+import "github.com/ChrisTrenkamp/goxpath/internal/lexer"
+
+//NodeType enumerations
+const (
+ Empty lexer.XItemType = ""
+)
+
+//Node builds an AST tree for operating on XPath expressions
+type Node struct {
+ Val lexer.XItem
+ Left *Node
+ Right *Node
+ Parent *Node
+ next *Node
+}
+
+var beginPathType = map[lexer.XItemType]bool{
+ lexer.XItemAbsLocPath: true,
+ lexer.XItemAbbrAbsLocPath: true,
+ lexer.XItemAbbrRelLocPath: true,
+ lexer.XItemRelLocPath: true,
+ lexer.XItemFunction: true,
+}
+
+func (n *Node) add(i lexer.XItem) {
+ if n.Val.Typ == Empty {
+ n.Val = i
+ } else if n.Left == nil {
+ n.Left = &Node{Val: n.Val, Parent: n}
+ n.Val = i
+ } else if beginPathType[n.Val.Typ] {
+ next := &Node{Val: n.Val, Left: n.Left, Parent: n}
+ n.Left = next
+ n.Val = i
+ } else if n.Right == nil {
+ n.Right = &Node{Val: i, Parent: n}
+ } else {
+ next := &Node{Val: n.Val, Left: n.Left, Right: n.Right, Parent: n}
+ n.Left, n.Right = next, nil
+ n.Val = i
+ }
+ n.next = n
+}
+
+func (n *Node) push(i lexer.XItem) {
+ if n.Left == nil {
+ n.Left = &Node{Val: i, Parent: n}
+ n.next = n.Left
+ } else if n.Right == nil {
+ n.Right = &Node{Val: i, Parent: n}
+ n.next = n.Right
+ } else {
+ next := &Node{Val: i, Left: n.Right, Parent: n}
+ n.Right = next
+ n.next = n.Right
+ }
+}
+
+func (n *Node) pushNotEmpty(i lexer.XItem) {
+ if n.Val.Typ == Empty {
+ n.add(i)
+ } else {
+ n.push(i)
+ }
+}
+
+/*
+func (n *Node) prettyPrint(depth, width int) {
+ nodes := []*Node{}
+ n.getLine(depth, &nodes)
+ fmt.Printf("%*s", (width-depth)*2, "")
+ toggle := true
+ if len(nodes) > 1 {
+ for _, i := range nodes {
+ if i != nil {
+ if toggle {
+ fmt.Print("/ ")
+ } else {
+ fmt.Print("\\ ")
+ }
+ }
+ toggle = !toggle
+ }
+ fmt.Println()
+ fmt.Printf("%*s", (width-depth)*2, "")
+ }
+ for _, i := range nodes {
+ if i != nil {
+ fmt.Print(i.Val.Val, " ")
+ }
+ }
+ fmt.Println()
+}
+
+func (n *Node) getLine(depth int, ret *[]*Node) {
+ if depth <= 0 && n != nil {
+ *ret = append(*ret, n)
+ return
+ }
+ if n.Left != nil {
+ n.Left.getLine(depth-1, ret)
+ } else if depth-1 <= 0 {
+ *ret = append(*ret, nil)
+ }
+ if n.Right != nil {
+ n.Right.getLine(depth-1, ret)
+ } else if depth-1 <= 0 {
+ *ret = append(*ret, nil)
+ }
+}
+*/
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/findutil/findUtil.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/findutil/findUtil.go
new file mode 100644
index 000000000..6a6d44abe
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/findutil/findUtil.go
@@ -0,0 +1,307 @@
+package findutil
+
+import (
+ "encoding/xml"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr"
+ "github.com/ChrisTrenkamp/goxpath/internal/xconst"
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+const (
+ wildcard = "*"
+)
+
+type findFunc func(tree.Node, *pathexpr.PathExpr, *[]tree.Node)
+
+var findMap = map[string]findFunc{
+ xconst.AxisAncestor: findAncestor,
+ xconst.AxisAncestorOrSelf: findAncestorOrSelf,
+ xconst.AxisAttribute: findAttribute,
+ xconst.AxisChild: findChild,
+ xconst.AxisDescendent: findDescendent,
+ xconst.AxisDescendentOrSelf: findDescendentOrSelf,
+ xconst.AxisFollowing: findFollowing,
+ xconst.AxisFollowingSibling: findFollowingSibling,
+ xconst.AxisNamespace: findNamespace,
+ xconst.AxisParent: findParent,
+ xconst.AxisPreceding: findPreceding,
+ xconst.AxisPrecedingSibling: findPrecedingSibling,
+ xconst.AxisSelf: findSelf,
+}
+
+//Find finds nodes based on the pathexpr.PathExpr
+func Find(x tree.Node, p pathexpr.PathExpr) []tree.Node {
+ ret := []tree.Node{}
+
+ if p.Axis == "" {
+ findChild(x, &p, &ret)
+ return ret
+ }
+
+ f := findMap[p.Axis]
+ f(x, &p, &ret)
+
+ return ret
+}
+
+func findAncestor(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if x.GetNodeType() == tree.NtRoot {
+ return
+ }
+
+ addNode(x.GetParent(), p, ret)
+ findAncestor(x.GetParent(), p, ret)
+}
+
+func findAncestorOrSelf(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ findSelf(x, p, ret)
+ findAncestor(x, p, ret)
+}
+
+func findAttribute(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if ele, ok := x.(tree.Elem); ok {
+ for _, i := range ele.GetAttrs() {
+ addNode(i, p, ret)
+ }
+ }
+}
+
+func findChild(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if ele, ok := x.(tree.Elem); ok {
+ ch := ele.GetChildren()
+ for i := range ch {
+ addNode(ch[i], p, ret)
+ }
+ }
+}
+
+func findDescendent(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if ele, ok := x.(tree.Elem); ok {
+ ch := ele.GetChildren()
+ for i := range ch {
+ addNode(ch[i], p, ret)
+ findDescendent(ch[i], p, ret)
+ }
+ }
+}
+
+func findDescendentOrSelf(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ findSelf(x, p, ret)
+ findDescendent(x, p, ret)
+}
+
+func findFollowing(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if x.GetNodeType() == tree.NtRoot {
+ return
+ }
+ par := x.GetParent()
+ ch := par.GetChildren()
+ i := 0
+ for x != ch[i] {
+ i++
+ }
+ i++
+ for i < len(ch) {
+ findDescendentOrSelf(ch[i], p, ret)
+ i++
+ }
+ findFollowing(par, p, ret)
+}
+
+func findFollowingSibling(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if x.GetNodeType() == tree.NtRoot {
+ return
+ }
+ par := x.GetParent()
+ ch := par.GetChildren()
+ i := 0
+ for x != ch[i] {
+ i++
+ }
+ i++
+ for i < len(ch) {
+ findSelf(ch[i], p, ret)
+ i++
+ }
+}
+
+func findNamespace(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if ele, ok := x.(tree.NSElem); ok {
+ ns := tree.BuildNS(ele)
+ for _, i := range ns {
+ addNode(i, p, ret)
+ }
+ }
+}
+
+func findParent(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if x.GetNodeType() != tree.NtRoot {
+ addNode(x.GetParent(), p, ret)
+ }
+}
+
+func findPreceding(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if x.GetNodeType() == tree.NtRoot {
+ return
+ }
+ par := x.GetParent()
+ ch := par.GetChildren()
+ i := len(ch) - 1
+ for x != ch[i] {
+ i--
+ }
+ i--
+ for i >= 0 {
+ findDescendentOrSelf(ch[i], p, ret)
+ i--
+ }
+ findPreceding(par, p, ret)
+}
+
+func findPrecedingSibling(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ if x.GetNodeType() == tree.NtRoot {
+ return
+ }
+ par := x.GetParent()
+ ch := par.GetChildren()
+ i := len(ch) - 1
+ for x != ch[i] {
+ i--
+ }
+ i--
+ for i >= 0 {
+ findSelf(ch[i], p, ret)
+ i--
+ }
+}
+
+func findSelf(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ addNode(x, p, ret)
+}
+
+func addNode(x tree.Node, p *pathexpr.PathExpr, ret *[]tree.Node) {
+ add := false
+ tok := x.GetToken()
+
+ switch x.GetNodeType() {
+ case tree.NtAttr:
+ add = evalAttr(p, tok.(xml.Attr))
+ case tree.NtChd:
+ add = evalChd(p)
+ case tree.NtComm:
+ add = evalComm(p)
+ case tree.NtElem, tree.NtRoot:
+ add = evalEle(p, tok.(xml.StartElement))
+ case tree.NtNs:
+ add = evalNS(p, tok.(xml.Attr))
+ case tree.NtPi:
+ add = evalPI(p)
+ }
+
+ if add {
+ *ret = append(*ret, x)
+ }
+}
+
+func evalAttr(p *pathexpr.PathExpr, a xml.Attr) bool {
+ if p.NodeType == "" {
+ if p.Name.Space != wildcard {
+ if a.Name.Space != p.NS[p.Name.Space] {
+ return false
+ }
+ }
+
+ if p.Name.Local == wildcard && p.Axis == xconst.AxisAttribute {
+ return true
+ }
+
+ if p.Name.Local == a.Name.Local {
+ return true
+ }
+ } else {
+ if p.NodeType == xconst.NodeTypeNode {
+ return true
+ }
+ }
+
+ return false
+}
+
+func evalChd(p *pathexpr.PathExpr) bool {
+ if p.NodeType == xconst.NodeTypeText || p.NodeType == xconst.NodeTypeNode {
+ return true
+ }
+
+ return false
+}
+
+func evalComm(p *pathexpr.PathExpr) bool {
+ if p.NodeType == xconst.NodeTypeComment || p.NodeType == xconst.NodeTypeNode {
+ return true
+ }
+
+ return false
+}
+
+func evalEle(p *pathexpr.PathExpr, ele xml.StartElement) bool {
+ if p.NodeType == "" {
+ return checkNameAndSpace(p, ele)
+ }
+
+ if p.NodeType == xconst.NodeTypeNode {
+ return true
+ }
+
+ return false
+}
+
+func checkNameAndSpace(p *pathexpr.PathExpr, ele xml.StartElement) bool {
+ if p.Name.Local == wildcard && p.Name.Space == "" {
+ return true
+ }
+
+ if p.Name.Space != wildcard && ele.Name.Space != p.NS[p.Name.Space] {
+ return false
+ }
+
+ if p.Name.Local == wildcard && p.Axis != xconst.AxisAttribute && p.Axis != xconst.AxisNamespace {
+ return true
+ }
+
+ if p.Name.Local == ele.Name.Local {
+ return true
+ }
+
+ return false
+}
+
+func evalNS(p *pathexpr.PathExpr, ns xml.Attr) bool {
+ if p.NodeType == "" {
+ if p.Name.Space != "" && p.Name.Space != wildcard {
+ return false
+ }
+
+ if p.Name.Local == wildcard && p.Axis == xconst.AxisNamespace {
+ return true
+ }
+
+ if p.Name.Local == ns.Name.Local {
+ return true
+ }
+ } else {
+ if p.NodeType == xconst.NodeTypeNode {
+ return true
+ }
+ }
+
+ return false
+}
+
+func evalPI(p *pathexpr.PathExpr) bool {
+ if p.NodeType == xconst.NodeTypeProcInst || p.NodeType == xconst.NodeTypeNode {
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/boolfns.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/boolfns.go
new file mode 100644
index 000000000..5480ebcc4
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/boolfns.go
@@ -0,0 +1,74 @@
+package intfns
+
+import (
+ "fmt"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+ "golang.org/x/text/language"
+)
+
+func boolean(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ if b, ok := args[0].(tree.IsBool); ok {
+ return b.Bool(), nil
+ }
+
+ return nil, fmt.Errorf("Cannot convert object to a boolean")
+}
+
+func not(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ b, ok := args[0].(tree.IsBool)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a boolean")
+ }
+ return !b.Bool(), nil
+}
+
+func _true(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ return tree.Bool(true), nil
+}
+
+func _false(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ return tree.Bool(false), nil
+}
+
+func lang(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ lStr := args[0].String()
+
+ var n tree.Elem
+
+ for _, i := range c.NodeSet {
+ if i.GetNodeType() == tree.NtElem {
+ n = i.(tree.Elem)
+ } else {
+ n = i.GetParent()
+ }
+
+ for n.GetNodeType() != tree.NtRoot {
+ if attr, ok := tree.GetAttribute(n, "lang", tree.XMLSpace); ok {
+ return checkLang(lStr, attr.Value), nil
+ }
+ n = n.GetParent()
+ }
+ }
+
+ return tree.Bool(false), nil
+}
+
+func checkLang(srcStr, targStr string) tree.Bool {
+ srcLang := language.Make(srcStr)
+ srcRegion, srcRegionConf := srcLang.Region()
+
+ targLang := language.Make(targStr)
+ targRegion, targRegionConf := targLang.Region()
+
+ if srcRegionConf == language.Exact && targRegionConf != language.Exact {
+ return tree.Bool(false)
+ }
+
+ if srcRegion != targRegion && srcRegionConf == language.Exact && targRegionConf == language.Exact {
+ return tree.Bool(false)
+ }
+
+ _, _, conf := language.NewMatcher([]language.Tag{srcLang}).Match(targLang)
+ return tree.Bool(conf >= language.High)
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/intfns.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/intfns.go
new file mode 100644
index 000000000..8b09fa99f
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/intfns.go
@@ -0,0 +1,41 @@
+package intfns
+
+import (
+ "encoding/xml"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+//BuiltIn contains the list of built-in XPath functions
+var BuiltIn = map[xml.Name]tree.Wrap{
+ //String functions
+ {Local: "string"}: {Fn: _string, NArgs: 1, LastArgOpt: tree.Optional},
+ {Local: "concat"}: {Fn: concat, NArgs: 3, LastArgOpt: tree.Variadic},
+ {Local: "starts-with"}: {Fn: startsWith, NArgs: 2},
+ {Local: "contains"}: {Fn: contains, NArgs: 2},
+ {Local: "substring-before"}: {Fn: substringBefore, NArgs: 2},
+ {Local: "substring-after"}: {Fn: substringAfter, NArgs: 2},
+ {Local: "substring"}: {Fn: substring, NArgs: 3, LastArgOpt: tree.Optional},
+ {Local: "string-length"}: {Fn: stringLength, NArgs: 1, LastArgOpt: tree.Optional},
+ {Local: "normalize-space"}: {Fn: normalizeSpace, NArgs: 1, LastArgOpt: tree.Optional},
+ {Local: "translate"}: {Fn: translate, NArgs: 3},
+ //Node set functions
+ {Local: "last"}: {Fn: last},
+ {Local: "position"}: {Fn: position},
+ {Local: "count"}: {Fn: count, NArgs: 1},
+ {Local: "local-name"}: {Fn: localName, NArgs: 1, LastArgOpt: tree.Optional},
+ {Local: "namespace-uri"}: {Fn: namespaceURI, NArgs: 1, LastArgOpt: tree.Optional},
+ {Local: "name"}: {Fn: name, NArgs: 1, LastArgOpt: tree.Optional},
+ //boolean functions
+ {Local: "boolean"}: {Fn: boolean, NArgs: 1},
+ {Local: "not"}: {Fn: not, NArgs: 1},
+ {Local: "true"}: {Fn: _true},
+ {Local: "false"}: {Fn: _false},
+ {Local: "lang"}: {Fn: lang, NArgs: 1},
+ //number functions
+ {Local: "number"}: {Fn: number, NArgs: 1, LastArgOpt: tree.Optional},
+ {Local: "sum"}: {Fn: sum, NArgs: 1},
+ {Local: "floor"}: {Fn: floor, NArgs: 1},
+ {Local: "ceiling"}: {Fn: ceiling, NArgs: 1},
+ {Local: "round"}: {Fn: round, NArgs: 1},
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/nodesetfns.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/nodesetfns.go
new file mode 100644
index 000000000..7286a3042
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/nodesetfns.go
@@ -0,0 +1,131 @@
+package intfns
+
+import (
+ "encoding/xml"
+ "fmt"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+func last(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ return tree.Num(c.Size), nil
+}
+
+func position(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ return tree.Num(c.Pos), nil
+}
+
+func count(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ n, ok := args[0].(tree.NodeSet)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a node-set")
+ }
+
+ return tree.Num(len(n)), nil
+}
+
+func localName(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ var n tree.NodeSet
+ ok := true
+ if len(args) == 1 {
+ n, ok = args[0].(tree.NodeSet)
+ } else {
+ n = c.NodeSet
+ }
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a node-set")
+ }
+
+ ret := ""
+ if len(n) == 0 {
+ return tree.String(ret), nil
+ }
+ node := n[0]
+
+ tok := node.GetToken()
+
+ switch node.GetNodeType() {
+ case tree.NtElem:
+ ret = tok.(xml.StartElement).Name.Local
+ case tree.NtAttr:
+ ret = tok.(xml.Attr).Name.Local
+ case tree.NtPi:
+ ret = tok.(xml.ProcInst).Target
+ }
+
+ return tree.String(ret), nil
+}
+
+func namespaceURI(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ var n tree.NodeSet
+ ok := true
+ if len(args) == 1 {
+ n, ok = args[0].(tree.NodeSet)
+ } else {
+ n = c.NodeSet
+ }
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a node-set")
+ }
+
+ ret := ""
+ if len(n) == 0 {
+ return tree.String(ret), nil
+ }
+ node := n[0]
+
+ tok := node.GetToken()
+
+ switch node.GetNodeType() {
+ case tree.NtElem:
+ ret = tok.(xml.StartElement).Name.Space
+ case tree.NtAttr:
+ ret = tok.(xml.Attr).Name.Space
+ }
+
+ return tree.String(ret), nil
+}
+
+func name(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ var n tree.NodeSet
+ ok := true
+ if len(args) == 1 {
+ n, ok = args[0].(tree.NodeSet)
+ } else {
+ n = c.NodeSet
+ }
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a node-set")
+ }
+
+ ret := ""
+ if len(n) == 0 {
+ return tree.String(ret), nil
+ }
+ node := n[0]
+
+ switch node.GetNodeType() {
+ case tree.NtElem:
+ t := node.GetToken().(xml.StartElement)
+ space := ""
+
+ if t.Name.Space != "" {
+ space = fmt.Sprintf("{%s}", t.Name.Space)
+ }
+
+ ret = fmt.Sprintf("%s%s", space, t.Name.Local)
+ case tree.NtAttr:
+ t := node.GetToken().(xml.Attr)
+ space := ""
+
+ if t.Name.Space != "" {
+ space = fmt.Sprintf("{%s}", t.Name.Space)
+ }
+
+ ret = fmt.Sprintf("%s%s", space, t.Name.Local)
+ case tree.NtPi:
+ ret = fmt.Sprintf("%s", node.GetToken().(xml.ProcInst).Target)
+ }
+
+ return tree.String(ret), nil
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/numfns.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/numfns.go
new file mode 100644
index 000000000..464403f96
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/numfns.go
@@ -0,0 +1,71 @@
+package intfns
+
+import (
+ "fmt"
+ "math"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+func number(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ if b, ok := args[0].(tree.IsNum); ok {
+ return b.Num(), nil
+ }
+
+ return nil, fmt.Errorf("Cannot convert object to a number")
+}
+
+func sum(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ n, ok := args[0].(tree.NodeSet)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a node-set")
+ }
+
+ ret := 0.0
+ for _, i := range n {
+ ret += float64(tree.GetNodeNum(i))
+ }
+
+ return tree.Num(ret), nil
+}
+
+func floor(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ n, ok := args[0].(tree.IsNum)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a number")
+ }
+
+ return tree.Num(math.Floor(float64(n.Num()))), nil
+}
+
+func ceiling(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ n, ok := args[0].(tree.IsNum)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a number")
+ }
+
+ return tree.Num(math.Ceil(float64(n.Num()))), nil
+}
+
+func round(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ isn, ok := args[0].(tree.IsNum)
+ if !ok {
+ return nil, fmt.Errorf("Cannot convert object to a number")
+ }
+
+ n := isn.Num()
+
+ if math.IsNaN(float64(n)) || math.IsInf(float64(n), 0) {
+ return n, nil
+ }
+
+ if n < -0.5 {
+ n = tree.Num(int(n - 0.5))
+ } else if n > 0.5 {
+ n = tree.Num(int(n + 0.5))
+ } else {
+ n = 0
+ }
+
+ return n, nil
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/stringfns.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/stringfns.go
new file mode 100644
index 000000000..4e6a73a09
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/intfns/stringfns.go
@@ -0,0 +1,141 @@
+package intfns
+
+import (
+ "math"
+ "regexp"
+ "strings"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+func _string(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ if len(args) == 1 {
+ return tree.String(args[0].String()), nil
+ }
+
+ return tree.String(c.NodeSet.String()), nil
+}
+
+func concat(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ ret := ""
+
+ for _, i := range args {
+ ret += i.String()
+ }
+
+ return tree.String(ret), nil
+}
+
+func startsWith(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ return tree.Bool(strings.Index(args[0].String(), args[1].String()) == 0), nil
+}
+
+func contains(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ return tree.Bool(strings.Contains(args[0].String(), args[1].String())), nil
+}
+
+func substringBefore(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ ind := strings.Index(args[0].String(), args[1].String())
+ if ind == -1 {
+ return tree.String(""), nil
+ }
+
+ return tree.String(args[0].String()[:ind]), nil
+}
+
+func substringAfter(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ ind := strings.Index(args[0].String(), args[1].String())
+ if ind == -1 {
+ return tree.String(""), nil
+ }
+
+ return tree.String(args[0].String()[ind+len(args[1].String()):]), nil
+}
+
+func substring(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ str := args[0].String()
+
+ bNum, bErr := round(c, args[1])
+ if bErr != nil {
+ return nil, bErr
+ }
+
+ b := bNum.(tree.Num).Num()
+
+ if float64(b-1) >= float64(len(str)) || math.IsNaN(float64(b)) {
+ return tree.String(""), nil
+ }
+
+ if len(args) == 2 {
+ if b <= 1 {
+ b = 1
+ }
+
+ return tree.String(str[int(b)-1:]), nil
+ }
+
+ eNum, eErr := round(c, args[2])
+ if eErr != nil {
+ return nil, eErr
+ }
+
+ e := eNum.(tree.Num).Num()
+
+ if e <= 0 || math.IsNaN(float64(e)) || (math.IsInf(float64(b), 0) && math.IsInf(float64(e), 0)) {
+ return tree.String(""), nil
+ }
+
+ if b <= 1 {
+ e = b + e - 1
+ b = 1
+ }
+
+ if float64(b+e-1) >= float64(len(str)) {
+ e = tree.Num(len(str)) - b + 1
+ }
+
+ return tree.String(str[int(b)-1 : int(b+e)-1]), nil
+}
+
+func stringLength(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ var str string
+ if len(args) == 1 {
+ str = args[0].String()
+ } else {
+ str = c.NodeSet.String()
+ }
+
+ return tree.Num(len(str)), nil
+}
+
+var spaceTrim = regexp.MustCompile(`\s+`)
+
+func normalizeSpace(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ var str string
+ if len(args) == 1 {
+ str = args[0].String()
+ } else {
+ str = c.NodeSet.String()
+ }
+
+ str = strings.TrimSpace(str)
+
+ return tree.String(spaceTrim.ReplaceAllString(str, " ")), nil
+}
+
+func translate(c tree.Ctx, args ...tree.Result) (tree.Result, error) {
+ ret := args[0].String()
+ src := args[1].String()
+ repl := args[2].String()
+
+ for i := range src {
+ r := ""
+ if i < len(repl) {
+ r = string(repl[i])
+ }
+
+ ret = strings.Replace(ret, string(src[i]), r, -1)
+ }
+
+ return tree.String(ret), nil
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/parser.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/parser.go
new file mode 100644
index 000000000..9029c7a74
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/parser.go
@@ -0,0 +1,194 @@
+package parser
+
+import (
+ "fmt"
+
+ "github.com/ChrisTrenkamp/goxpath/internal/lexer"
+)
+
+type stateType int
+
+const (
+ defState stateType = iota
+ xpathState
+ funcState
+ paramState
+ predState
+ parenState
+)
+
+type parseStack struct {
+ stack []*Node
+ stateTypes []stateType
+ cur *Node
+}
+
+func (p *parseStack) push(t stateType) {
+ p.stack = append(p.stack, p.cur)
+ p.stateTypes = append(p.stateTypes, t)
+}
+
+func (p *parseStack) pop() {
+ stackPos := len(p.stack) - 1
+
+ p.cur = p.stack[stackPos]
+ p.stack = p.stack[:stackPos]
+ p.stateTypes = p.stateTypes[:stackPos]
+}
+
+func (p *parseStack) curState() stateType {
+ if len(p.stateTypes) == 0 {
+ return defState
+ }
+ return p.stateTypes[len(p.stateTypes)-1]
+}
+
+type lexFn func(*parseStack, lexer.XItem)
+
+var parseMap = map[lexer.XItemType]lexFn{
+ lexer.XItemAbsLocPath: xiXPath,
+ lexer.XItemAbbrAbsLocPath: xiXPath,
+ lexer.XItemAbbrRelLocPath: xiXPath,
+ lexer.XItemRelLocPath: xiXPath,
+ lexer.XItemEndPath: xiEndPath,
+ lexer.XItemAxis: xiXPath,
+ lexer.XItemAbbrAxis: xiXPath,
+ lexer.XItemNCName: xiXPath,
+ lexer.XItemQName: xiXPath,
+ lexer.XItemNodeType: xiXPath,
+ lexer.XItemProcLit: xiXPath,
+ lexer.XItemFunction: xiFunc,
+ lexer.XItemArgument: xiFuncArg,
+ lexer.XItemEndFunction: xiEndFunc,
+ lexer.XItemPredicate: xiPred,
+ lexer.XItemEndPredicate: xiEndPred,
+ lexer.XItemStrLit: xiValue,
+ lexer.XItemNumLit: xiValue,
+ lexer.XItemOperator: xiOp,
+ lexer.XItemVariable: xiValue,
+}
+
+var opPrecedence = map[string]int{
+ "|": 1,
+ "*": 2,
+ "div": 2,
+ "mod": 2,
+ "+": 3,
+ "-": 3,
+ "=": 4,
+ "!=": 4,
+ "<": 4,
+ "<=": 4,
+ ">": 4,
+ ">=": 4,
+ "and": 5,
+ "or": 6,
+}
+
+//Parse creates an AST tree for XPath expressions.
+func Parse(xp string) (*Node, error) {
+ var err error
+ c := lexer.Lex(xp)
+ n := &Node{}
+ p := &parseStack{cur: n}
+
+ for next := range c {
+ if next.Typ != lexer.XItemError {
+ parseMap[next.Typ](p, next)
+ } else if err == nil {
+ err = fmt.Errorf(next.Val)
+ }
+ }
+
+ return n, err
+}
+
+func xiXPath(p *parseStack, i lexer.XItem) {
+ if p.curState() == xpathState {
+ p.cur.push(i)
+ p.cur = p.cur.next
+ return
+ }
+
+ if p.cur.Val.Typ == lexer.XItemFunction {
+ p.cur.Right = &Node{Val: i, Parent: p.cur}
+ p.cur.next = p.cur.Right
+ p.push(xpathState)
+ p.cur = p.cur.next
+ return
+ }
+
+ p.cur.pushNotEmpty(i)
+ p.push(xpathState)
+ p.cur = p.cur.next
+}
+
+func xiEndPath(p *parseStack, i lexer.XItem) {
+ p.pop()
+}
+
+func xiFunc(p *parseStack, i lexer.XItem) {
+ p.cur.push(i)
+ p.cur = p.cur.next
+ p.push(funcState)
+}
+
+func xiFuncArg(p *parseStack, i lexer.XItem) {
+ if p.curState() != funcState {
+ p.pop()
+ }
+
+ p.cur.push(i)
+ p.cur = p.cur.next
+ p.push(paramState)
+ p.cur.push(lexer.XItem{Typ: Empty, Val: ""})
+ p.cur = p.cur.next
+}
+
+func xiEndFunc(p *parseStack, i lexer.XItem) {
+ if p.curState() == paramState {
+ p.pop()
+ }
+ p.pop()
+}
+
+func xiPred(p *parseStack, i lexer.XItem) {
+ p.cur.push(i)
+ p.cur = p.cur.next
+ p.push(predState)
+ p.cur.push(lexer.XItem{Typ: Empty, Val: ""})
+ p.cur = p.cur.next
+}
+
+func xiEndPred(p *parseStack, i lexer.XItem) {
+ p.pop()
+}
+
+func xiValue(p *parseStack, i lexer.XItem) {
+ p.cur.add(i)
+}
+
+func xiOp(p *parseStack, i lexer.XItem) {
+ if i.Val == "(" {
+ p.cur.push(lexer.XItem{Typ: Empty, Val: ""})
+ p.push(parenState)
+ p.cur = p.cur.next
+ return
+ }
+
+ if i.Val == ")" {
+ p.pop()
+ return
+ }
+
+ if p.cur.Val.Typ == lexer.XItemOperator {
+ if opPrecedence[p.cur.Val.Val] <= opPrecedence[i.Val] {
+ p.cur.add(i)
+ } else {
+ p.cur.push(i)
+ }
+ } else {
+ p.cur.add(i)
+ }
+ p.cur = p.cur.next
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr/pathexpr.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr/pathexpr.go
new file mode 100644
index 000000000..7fe69eb4a
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr/pathexpr.go
@@ -0,0 +1,11 @@
+package pathexpr
+
+import "encoding/xml"
+
+//PathExpr represents XPath step's. xmltree.XMLTree uses it to find nodes.
+type PathExpr struct {
+ Name xml.Name
+ Axis string
+ NodeType string
+ NS map[string]string
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/xconst/xconst.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/xconst/xconst.go
new file mode 100644
index 000000000..650991272
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/xconst/xconst.go
@@ -0,0 +1,66 @@
+package xconst
+
+const (
+ //AxisAncestor represents the "ancestor" axis
+ AxisAncestor = "ancestor"
+ //AxisAncestorOrSelf represents the "ancestor-or-self" axis
+ AxisAncestorOrSelf = "ancestor-or-self"
+ //AxisAttribute represents the "attribute" axis
+ AxisAttribute = "attribute"
+ //AxisChild represents the "child" axis
+ AxisChild = "child"
+ //AxisDescendent represents the "descendant" axis
+ AxisDescendent = "descendant"
+ //AxisDescendentOrSelf represents the "descendant-or-self" axis
+ AxisDescendentOrSelf = "descendant-or-self"
+ //AxisFollowing represents the "following" axis
+ AxisFollowing = "following"
+ //AxisFollowingSibling represents the "following-sibling" axis
+ AxisFollowingSibling = "following-sibling"
+ //AxisNamespace represents the "namespace" axis
+ AxisNamespace = "namespace"
+ //AxisParent represents the "parent" axis
+ AxisParent = "parent"
+ //AxisPreceding represents the "preceding" axis
+ AxisPreceding = "preceding"
+ //AxisPrecedingSibling represents the "preceding-sibling" axis
+ AxisPrecedingSibling = "preceding-sibling"
+ //AxisSelf represents the "self" axis
+ AxisSelf = "self"
+)
+
+//AxisNames is all the possible Axis identifiers wrapped in an array for convenience
+var AxisNames = []string{
+ AxisAncestor,
+ AxisAncestorOrSelf,
+ AxisAttribute,
+ AxisChild,
+ AxisDescendent,
+ AxisDescendentOrSelf,
+ AxisFollowing,
+ AxisFollowingSibling,
+ AxisNamespace,
+ AxisParent,
+ AxisPreceding,
+ AxisPrecedingSibling,
+ AxisSelf,
+}
+
+const (
+ //NodeTypeComment represents the "comment" node test
+ NodeTypeComment = "comment"
+ //NodeTypeText represents the "text" node test
+ NodeTypeText = "text"
+ //NodeTypeProcInst represents the "processing-instruction" node test
+ NodeTypeProcInst = "processing-instruction"
+ //NodeTypeNode represents the "node" node test
+ NodeTypeNode = "node"
+)
+
+//NodeTypes is all the possible node tests wrapped in an array for convenience
+var NodeTypes = []string{
+ NodeTypeComment,
+ NodeTypeText,
+ NodeTypeProcInst,
+ NodeTypeNode,
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/internal/xsort/xsort.go b/vendor/github.com/ChrisTrenkamp/goxpath/internal/xsort/xsort.go
new file mode 100644
index 000000000..95f57c249
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/internal/xsort/xsort.go
@@ -0,0 +1,20 @@
+package xsort
+
+import (
+ "sort"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+type nodeSort []tree.Node
+
+func (ns nodeSort) Len() int { return len(ns) }
+func (ns nodeSort) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] }
+func (ns nodeSort) Less(i, j int) bool {
+ return ns[i].Pos() < ns[j].Pos()
+}
+
+//SortNodes sorts the array by the node document order
+func SortNodes(res []tree.Node) {
+ sort.Sort(nodeSort(res))
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/marshal.go b/vendor/github.com/ChrisTrenkamp/goxpath/marshal.go
new file mode 100644
index 000000000..e1045f20e
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/marshal.go
@@ -0,0 +1,105 @@
+package goxpath
+
+import (
+ "bytes"
+ "encoding/xml"
+ "io"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+//Marshal prints the result tree, r, in XML form to w.
+func Marshal(n tree.Node, w io.Writer) error {
+ return marshal(n, w)
+}
+
+//MarshalStr is like Marhal, but returns a string.
+func MarshalStr(n tree.Node) (string, error) {
+ ret := bytes.NewBufferString("")
+ err := marshal(n, ret)
+
+ return ret.String(), err
+}
+
+func marshal(n tree.Node, w io.Writer) error {
+ e := xml.NewEncoder(w)
+ err := encTok(n, e)
+ if err != nil {
+ return err
+ }
+
+ return e.Flush()
+}
+
+func encTok(n tree.Node, e *xml.Encoder) error {
+ switch n.GetNodeType() {
+ case tree.NtAttr:
+ return encAttr(n.GetToken().(xml.Attr), e)
+ case tree.NtElem:
+ return encEle(n.(tree.Elem), e)
+ case tree.NtNs:
+ return encNS(n.GetToken().(xml.Attr), e)
+ case tree.NtRoot:
+ for _, i := range n.(tree.Elem).GetChildren() {
+ err := encTok(i, e)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+
+ //case tree.NtChd, tree.NtComm, tree.NtPi:
+ return e.EncodeToken(n.GetToken())
+}
+
+func encAttr(a xml.Attr, e *xml.Encoder) error {
+ str := a.Name.Local + `="` + a.Value + `"`
+
+ if a.Name.Space != "" {
+ str += ` xmlns="` + a.Name.Space + `"`
+ }
+
+ pi := xml.ProcInst{
+ Target: "attribute",
+ Inst: ([]byte)(str),
+ }
+
+ return e.EncodeToken(pi)
+}
+
+func encNS(ns xml.Attr, e *xml.Encoder) error {
+ pi := xml.ProcInst{
+ Target: "namespace",
+ Inst: ([]byte)(ns.Value),
+ }
+ return e.EncodeToken(pi)
+}
+
+func encEle(n tree.Elem, e *xml.Encoder) error {
+ ele := xml.StartElement{
+ Name: n.GetToken().(xml.StartElement).Name,
+ }
+
+ attrs := n.GetAttrs()
+ ele.Attr = make([]xml.Attr, len(attrs))
+ for i := range attrs {
+ ele.Attr[i] = attrs[i].GetToken().(xml.Attr)
+ }
+
+ err := e.EncodeToken(ele)
+ if err != nil {
+ return err
+ }
+
+ if x, ok := n.(tree.Elem); ok {
+ for _, i := range x.GetChildren() {
+ err := encTok(i, e)
+ if err != nil {
+ return err
+ }
+ }
+ }
+
+ return e.EncodeToken(ele.End())
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/interfaces.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/interfaces.go
new file mode 100644
index 000000000..a6e642573
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/interfaces.go
@@ -0,0 +1,18 @@
+package tree
+
+import "fmt"
+
+//Result is used for all data types.
+type Result interface {
+ fmt.Stringer
+}
+
+//IsBool is used for the XPath boolean function. It turns the data type to a bool.
+type IsBool interface {
+ Bool() Bool
+}
+
+//IsNum is used for the XPath number function. It turns the data type to a number.
+type IsNum interface {
+ Num() Num
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/tree.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/tree.go
new file mode 100644
index 000000000..c5d6333d7
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/tree.go
@@ -0,0 +1,221 @@
+package tree
+
+import (
+ "encoding/xml"
+ "sort"
+)
+
+//XMLSpace is the W3C XML namespace
+const XMLSpace = "http://www.w3.org/XML/1998/namespace"
+
+//NodePos is a helper for representing the node's document order
+type NodePos int
+
+//Pos returns the node's document order position
+func (n NodePos) Pos() int {
+ return int(n)
+}
+
+//NodeType is a safer way to determine a node's type than type assertions.
+type NodeType int
+
+//GetNodeType returns the node's type.
+func (t NodeType) GetNodeType() NodeType {
+ return t
+}
+
+//These are all the possible node types
+const (
+ NtAttr NodeType = iota
+ NtChd
+ NtComm
+ NtElem
+ NtNs
+ NtRoot
+ NtPi
+)
+
+//Node is a XPath result that is a node except elements
+type Node interface {
+ //ResValue prints the node's string value
+ ResValue() string
+ //Pos returns the node's position in the document order
+ Pos() int
+ //GetToken returns the xml.Token representation of the node
+ GetToken() xml.Token
+ //GetParent returns the parent node, which will always be an XML element
+ GetParent() Elem
+ //GetNodeType returns the node's type
+ GetNodeType() NodeType
+}
+
+//Elem is a XPath result that is an element node
+type Elem interface {
+ Node
+ //GetChildren returns the elements children.
+ GetChildren() []Node
+ //GetAttrs returns the attributes of the element
+ GetAttrs() []Node
+}
+
+//NSElem is a node that keeps track of namespaces.
+type NSElem interface {
+ Elem
+ GetNS() map[xml.Name]string
+}
+
+//NSBuilder is a helper-struct for satisfying the NSElem interface
+type NSBuilder struct {
+ NS map[xml.Name]string
+}
+
+//GetNS returns the namespaces found on the current element. It should not be
+//confused with BuildNS, which actually resolves the namespace nodes.
+func (ns NSBuilder) GetNS() map[xml.Name]string {
+ return ns.NS
+}
+
+type nsValueSort []NS
+
+func (ns nsValueSort) Len() int { return len(ns) }
+func (ns nsValueSort) Swap(i, j int) {
+ ns[i], ns[j] = ns[j], ns[i]
+}
+func (ns nsValueSort) Less(i, j int) bool {
+ return ns[i].Value < ns[j].Value
+}
+
+//BuildNS resolves all the namespace nodes of the element and returns them
+func BuildNS(t Elem) (ret []NS) {
+ vals := make(map[xml.Name]string)
+
+ if nselem, ok := t.(NSElem); ok {
+ buildNS(nselem, vals)
+
+ ret = make([]NS, 0, len(vals))
+ i := 1
+
+ for k, v := range vals {
+ if !(k.Local == "xmlns" && k.Space == "" && v == "") {
+ ret = append(ret, NS{
+ Attr: xml.Attr{Name: k, Value: v},
+ Parent: t,
+ NodeType: NtNs,
+ })
+ i++
+ }
+ }
+
+ sort.Sort(nsValueSort(ret))
+ for i := range ret {
+ ret[i].NodePos = NodePos(t.Pos() + i + 1)
+ }
+ }
+
+ return ret
+}
+
+func buildNS(x NSElem, ret map[xml.Name]string) {
+ if x.GetNodeType() == NtRoot {
+ return
+ }
+
+ if nselem, ok := x.GetParent().(NSElem); ok {
+ buildNS(nselem, ret)
+ }
+
+ for k, v := range x.GetNS() {
+ ret[k] = v
+ }
+}
+
+//NS is a namespace node.
+type NS struct {
+ xml.Attr
+ Parent Elem
+ NodePos
+ NodeType
+}
+
+//GetToken returns the xml.Token representation of the namespace.
+func (ns NS) GetToken() xml.Token {
+ return ns.Attr
+}
+
+//GetParent returns the parent node of the namespace.
+func (ns NS) GetParent() Elem {
+ return ns.Parent
+}
+
+//ResValue returns the string value of the namespace
+func (ns NS) ResValue() string {
+ return ns.Attr.Value
+}
+
+//GetAttribute is a convenience function for getting the specified attribute from an element.
+//false is returned if the attribute is not found.
+func GetAttribute(n Elem, local, space string) (xml.Attr, bool) {
+ attrs := n.GetAttrs()
+ for _, i := range attrs {
+ attr := i.GetToken().(xml.Attr)
+ if local == attr.Name.Local && space == attr.Name.Space {
+ return attr, true
+ }
+ }
+ return xml.Attr{}, false
+}
+
+//GetAttributeVal is like GetAttribute, except it returns the attribute's value.
+func GetAttributeVal(n Elem, local, space string) (string, bool) {
+ attr, ok := GetAttribute(n, local, space)
+ return attr.Value, ok
+}
+
+//GetAttrValOrEmpty is like GetAttributeVal, except it returns an empty string if
+//the attribute is not found instead of false.
+func GetAttrValOrEmpty(n Elem, local, space string) string {
+ val, ok := GetAttributeVal(n, local, space)
+ if !ok {
+ return ""
+ }
+ return val
+}
+
+//FindNodeByPos finds a node from the given position. Returns nil if the node
+//is not found.
+func FindNodeByPos(n Node, pos int) Node {
+ if n.Pos() == pos {
+ return n
+ }
+
+ if elem, ok := n.(Elem); ok {
+ chldrn := elem.GetChildren()
+ for i := 1; i < len(chldrn); i++ {
+ if chldrn[i-1].Pos() <= pos && chldrn[i].Pos() > pos {
+ return FindNodeByPos(chldrn[i-1], pos)
+ }
+ }
+
+ if len(chldrn) > 0 {
+ if chldrn[len(chldrn)-1].Pos() <= pos {
+ return FindNodeByPos(chldrn[len(chldrn)-1], pos)
+ }
+ }
+
+ attrs := elem.GetAttrs()
+ for _, i := range attrs {
+ if i.Pos() == pos {
+ return i
+ }
+ }
+
+ ns := BuildNS(elem)
+ for _, i := range ns {
+ if i.Pos() == pos {
+ return i
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/xfn.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xfn.go
new file mode 100644
index 000000000..7a940bb34
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xfn.go
@@ -0,0 +1,52 @@
+package tree
+
+import (
+ "fmt"
+)
+
+//Ctx represents the current context position, size, node, and the current filtered result
+type Ctx struct {
+ NodeSet
+ Pos int
+ Size int
+}
+
+//Fn is a XPath function, written in Go
+type Fn func(c Ctx, args ...Result) (Result, error)
+
+//LastArgOpt sets whether the last argument in a function is optional, variadic, or neither
+type LastArgOpt int
+
+//LastArgOpt options
+const (
+ None LastArgOpt = iota
+ Optional
+ Variadic
+)
+
+//Wrap interfaces XPath function calls with Go
+type Wrap struct {
+ Fn Fn
+ //NArgs represents the number of arguments to the XPath function. -1 represents a single optional argument
+ NArgs int
+ LastArgOpt LastArgOpt
+}
+
+//Call checks the arguments and calls Fn if they are valid
+func (w Wrap) Call(c Ctx, args ...Result) (Result, error) {
+ switch w.LastArgOpt {
+ case Optional:
+ if len(args) == w.NArgs || len(args) == w.NArgs-1 {
+ return w.Fn(c, args...)
+ }
+ case Variadic:
+ if len(args) >= w.NArgs-1 {
+ return w.Fn(c, args...)
+ }
+ default:
+ if len(args) == w.NArgs {
+ return w.Fn(c, args...)
+ }
+ }
+ return nil, fmt.Errorf("Invalid number of arguments")
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder/xmlbuilder.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder/xmlbuilder.go
new file mode 100644
index 000000000..625713c96
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder/xmlbuilder.go
@@ -0,0 +1,25 @@
+package xmlbuilder
+
+import (
+ "encoding/xml"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+//BuilderOpts supplies all the information needed to create an XML node.
+type BuilderOpts struct {
+ Dec *xml.Decoder
+ Tok xml.Token
+ NodeType tree.NodeType
+ NS map[xml.Name]string
+ Attrs []*xml.Attr
+ NodePos int
+ AttrStartPos int
+}
+
+//XMLBuilder is an interface for creating XML structures.
+type XMLBuilder interface {
+ tree.Node
+ CreateNode(*BuilderOpts) XMLBuilder
+ EndElem() XMLBuilder
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele/xmlele.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele/xmlele.go
new file mode 100644
index 000000000..85e3445d4
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele/xmlele.go
@@ -0,0 +1,106 @@
+package xmlele
+
+import (
+ "encoding/xml"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+ "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder"
+ "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode"
+)
+
+//XMLEle is an implementation of XPRes for XML elements
+type XMLEle struct {
+ xml.StartElement
+ tree.NSBuilder
+ Attrs []tree.Node
+ Children []tree.Node
+ Parent tree.Elem
+ tree.NodePos
+ tree.NodeType
+}
+
+//Root is the default root node builder for xmltree.ParseXML
+func Root() xmlbuilder.XMLBuilder {
+ return &XMLEle{NodeType: tree.NtRoot}
+}
+
+//CreateNode is an implementation of xmlbuilder.XMLBuilder. It appends the node
+//specified in opts and returns the child if it is an element. Otherwise, it returns x.
+func (x *XMLEle) CreateNode(opts *xmlbuilder.BuilderOpts) xmlbuilder.XMLBuilder {
+ if opts.NodeType == tree.NtElem {
+ ele := &XMLEle{
+ StartElement: opts.Tok.(xml.StartElement),
+ NSBuilder: tree.NSBuilder{NS: opts.NS},
+ Attrs: make([]tree.Node, len(opts.Attrs)),
+ Parent: x,
+ NodePos: tree.NodePos(opts.NodePos),
+ NodeType: opts.NodeType,
+ }
+ for i := range opts.Attrs {
+ ele.Attrs[i] = xmlnode.XMLNode{
+ Token: opts.Attrs[i],
+ NodePos: tree.NodePos(opts.AttrStartPos + i),
+ NodeType: tree.NtAttr,
+ Parent: ele,
+ }
+ }
+ x.Children = append(x.Children, ele)
+ return ele
+ }
+
+ node := xmlnode.XMLNode{
+ Token: opts.Tok,
+ NodePos: tree.NodePos(opts.NodePos),
+ NodeType: opts.NodeType,
+ Parent: x,
+ }
+ x.Children = append(x.Children, node)
+ return x
+}
+
+//EndElem is an implementation of xmlbuilder.XMLBuilder. It returns x's parent.
+func (x *XMLEle) EndElem() xmlbuilder.XMLBuilder {
+ return x.Parent.(*XMLEle)
+}
+
+//GetToken returns the xml.Token representation of the node
+func (x *XMLEle) GetToken() xml.Token {
+ return x.StartElement
+}
+
+//GetParent returns the parent node, or itself if it's the root
+func (x *XMLEle) GetParent() tree.Elem {
+ return x.Parent
+}
+
+//GetChildren returns all child nodes of the element
+func (x *XMLEle) GetChildren() []tree.Node {
+ ret := make([]tree.Node, len(x.Children))
+
+ for i := range x.Children {
+ ret[i] = x.Children[i]
+ }
+
+ return ret
+}
+
+//GetAttrs returns all attributes of the element
+func (x *XMLEle) GetAttrs() []tree.Node {
+ ret := make([]tree.Node, len(x.Attrs))
+ for i := range x.Attrs {
+ ret[i] = x.Attrs[i]
+ }
+ return ret
+}
+
+//ResValue returns the string value of the element and children
+func (x *XMLEle) ResValue() string {
+ ret := ""
+ for i := range x.Children {
+ switch x.Children[i].GetNodeType() {
+ case tree.NtChd, tree.NtElem, tree.NtRoot:
+ ret += x.Children[i].ResValue()
+ }
+ }
+ return ret
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode/xmlnode.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode/xmlnode.go
new file mode 100644
index 000000000..9be769855
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode/xmlnode.go
@@ -0,0 +1,43 @@
+package xmlnode
+
+import (
+ "encoding/xml"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+)
+
+//XMLNode will represent an attribute, character data, comment, or processing instruction node
+type XMLNode struct {
+ xml.Token
+ tree.NodePos
+ tree.NodeType
+ Parent tree.Elem
+}
+
+//GetToken returns the xml.Token representation of the node
+func (a XMLNode) GetToken() xml.Token {
+ if a.NodeType == tree.NtAttr {
+ ret := a.Token.(*xml.Attr)
+ return *ret
+ }
+ return a.Token
+}
+
+//GetParent returns the parent node
+func (a XMLNode) GetParent() tree.Elem {
+ return a.Parent
+}
+
+//ResValue returns the string value of the attribute
+func (a XMLNode) ResValue() string {
+ switch a.NodeType {
+ case tree.NtAttr:
+ return a.Token.(*xml.Attr).Value
+ case tree.NtChd:
+ return string(a.Token.(xml.CharData))
+ case tree.NtComm:
+ return string(a.Token.(xml.Comment))
+ }
+ //case tree.NtPi:
+ return string(a.Token.(xml.ProcInst).Inst)
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmltree.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmltree.go
new file mode 100644
index 000000000..2ec066c5b
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmltree.go
@@ -0,0 +1,158 @@
+package xmltree
+
+import (
+ "encoding/xml"
+ "io"
+
+ "golang.org/x/net/html/charset"
+
+ "github.com/ChrisTrenkamp/goxpath/tree"
+ "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder"
+ "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele"
+)
+
+//ParseOptions is a set of methods and function pointers that alter
+//the way the XML decoder works and the Node types that are created.
+//Options that are not set will default to what is set in internal/defoverride.go
+type ParseOptions struct {
+ Strict bool
+ XMLRoot func() xmlbuilder.XMLBuilder
+}
+
+//DirectiveParser is an optional interface extended from XMLBuilder that handles
+//XML directives.
+type DirectiveParser interface {
+ xmlbuilder.XMLBuilder
+ Directive(xml.Directive, *xml.Decoder)
+}
+
+//ParseSettings is a function for setting the ParseOptions you want when
+//parsing an XML tree.
+type ParseSettings func(s *ParseOptions)
+
+//MustParseXML is like ParseXML, but panics instead of returning an error.
+func MustParseXML(r io.Reader, op ...ParseSettings) tree.Node {
+ ret, err := ParseXML(r, op...)
+
+ if err != nil {
+ panic(err)
+ }
+
+ return ret
+}
+
+//ParseXML creates an XMLTree structure from an io.Reader.
+func ParseXML(r io.Reader, op ...ParseSettings) (tree.Node, error) {
+ ov := ParseOptions{
+ Strict: true,
+ XMLRoot: xmlele.Root,
+ }
+ for _, i := range op {
+ i(&ov)
+ }
+
+ dec := xml.NewDecoder(r)
+ dec.CharsetReader = charset.NewReaderLabel
+ dec.Strict = ov.Strict
+
+ ordrPos := 1
+ xmlTree := ov.XMLRoot()
+
+ t, err := dec.Token()
+
+ if err != nil {
+ return nil, err
+ }
+
+ if head, ok := t.(xml.ProcInst); ok && head.Target == "xml" {
+ t, err = dec.Token()
+ }
+
+ opts := xmlbuilder.BuilderOpts{
+ Dec: dec,
+ }
+
+ for err == nil {
+ switch xt := t.(type) {
+ case xml.StartElement:
+ setEle(&opts, xmlTree, xt, &ordrPos)
+ xmlTree = xmlTree.CreateNode(&opts)
+ case xml.CharData:
+ setNode(&opts, xmlTree, xt, tree.NtChd, &ordrPos)
+ xmlTree = xmlTree.CreateNode(&opts)
+ case xml.Comment:
+ setNode(&opts, xmlTree, xt, tree.NtComm, &ordrPos)
+ xmlTree = xmlTree.CreateNode(&opts)
+ case xml.ProcInst:
+ setNode(&opts, xmlTree, xt, tree.NtPi, &ordrPos)
+ xmlTree = xmlTree.CreateNode(&opts)
+ case xml.EndElement:
+ xmlTree = xmlTree.EndElem()
+ case xml.Directive:
+ if dp, ok := xmlTree.(DirectiveParser); ok {
+ dp.Directive(xt.Copy(), dec)
+ }
+ }
+
+ t, err = dec.Token()
+ }
+
+ if err == io.EOF {
+ err = nil
+ }
+
+ return xmlTree, err
+}
+
+func setEle(opts *xmlbuilder.BuilderOpts, xmlTree xmlbuilder.XMLBuilder, ele xml.StartElement, ordrPos *int) {
+ opts.NodePos = *ordrPos
+ opts.Tok = ele
+ opts.Attrs = opts.Attrs[0:0:cap(opts.Attrs)]
+ opts.NS = make(map[xml.Name]string)
+ opts.NodeType = tree.NtElem
+
+ for i := range ele.Attr {
+ attr := ele.Attr[i].Name
+ val := ele.Attr[i].Value
+
+ if (attr.Local == "xmlns" && attr.Space == "") || attr.Space == "xmlns" {
+ opts.NS[attr] = val
+ } else {
+ opts.Attrs = append(opts.Attrs, &ele.Attr[i])
+ }
+ }
+
+ if nstree, ok := xmlTree.(tree.NSElem); ok {
+ ns := make(map[xml.Name]string)
+
+ for _, i := range tree.BuildNS(nstree) {
+ ns[i.Name] = i.Value
+ }
+
+ for k, v := range opts.NS {
+ ns[k] = v
+ }
+
+ if ns[xml.Name{Local: "xmlns"}] == "" {
+ delete(ns, xml.Name{Local: "xmlns"})
+ }
+
+ for k, v := range ns {
+ opts.NS[k] = v
+ }
+
+ if xmlTree.GetNodeType() == tree.NtRoot {
+ opts.NS[xml.Name{Space: "xmlns", Local: "xml"}] = tree.XMLSpace
+ }
+ }
+
+ opts.AttrStartPos = len(opts.NS) + len(opts.Attrs) + *ordrPos
+ *ordrPos = opts.AttrStartPos + 1
+}
+
+func setNode(opts *xmlbuilder.BuilderOpts, xmlTree xmlbuilder.XMLBuilder, tok xml.Token, nt tree.NodeType, ordrPos *int) {
+ opts.Tok = xml.CopyToken(tok)
+ opts.NodeType = nt
+ opts.NodePos = *ordrPos
+ *ordrPos++
+}
diff --git a/vendor/github.com/ChrisTrenkamp/goxpath/tree/xtypes.go b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xtypes.go
new file mode 100644
index 000000000..b9704109f
--- /dev/null
+++ b/vendor/github.com/ChrisTrenkamp/goxpath/tree/xtypes.go
@@ -0,0 +1,113 @@
+package tree
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+ "strings"
+)
+
+//Boolean strings
+const (
+ True = "true"
+ False = "false"
+)
+
+//Bool is a boolean XPath type
+type Bool bool
+
+//ResValue satisfies the Res interface for Bool
+func (b Bool) String() string {
+ if b {
+ return True
+ }
+
+ return False
+}
+
+//Bool satisfies the HasBool interface for Bool's
+func (b Bool) Bool() Bool {
+ return b
+}
+
+//Num satisfies the HasNum interface for Bool's
+func (b Bool) Num() Num {
+ if b {
+ return Num(1)
+ }
+
+ return Num(0)
+}
+
+//Num is a number XPath type
+type Num float64
+
+//ResValue satisfies the Res interface for Num
+func (n Num) String() string {
+ if math.IsInf(float64(n), 0) {
+ if math.IsInf(float64(n), 1) {
+ return "Infinity"
+ }
+ return "-Infinity"
+ }
+ return fmt.Sprintf("%g", float64(n))
+}
+
+//Bool satisfies the HasBool interface for Num's
+func (n Num) Bool() Bool {
+ return n != 0
+}
+
+//Num satisfies the HasNum interface for Num's
+func (n Num) Num() Num {
+ return n
+}
+
+//String is string XPath type
+type String string
+
+//ResValue satisfies the Res interface for String
+func (s String) String() string {
+ return string(s)
+}
+
+//Bool satisfies the HasBool interface for String's
+func (s String) Bool() Bool {
+ return Bool(len(s) > 0)
+}
+
+//Num satisfies the HasNum interface for String's
+func (s String) Num() Num {
+ num, err := strconv.ParseFloat(strings.TrimSpace(string(s)), 64)
+ if err != nil {
+ return Num(math.NaN())
+ }
+ return Num(num)
+}
+
+//NodeSet is a node-set XPath type
+type NodeSet []Node
+
+//GetNodeNum converts the node to a string-value and to a number
+func GetNodeNum(n Node) Num {
+ return String(n.ResValue()).Num()
+}
+
+//String satisfies the Res interface for NodeSet
+func (n NodeSet) String() string {
+ if len(n) == 0 {
+ return ""
+ }
+
+ return n[0].ResValue()
+}
+
+//Bool satisfies the HasBool interface for node-set's
+func (n NodeSet) Bool() Bool {
+ return Bool(len(n) > 0)
+}
+
+//Num satisfies the HasNum interface for NodeSet's
+func (n NodeSet) Num() Num {
+ return String(n.String()).Num()
+}
diff --git a/vendor/github.com/antchfx/xpath/LICENSE b/vendor/github.com/antchfx/xpath/LICENSE
new file mode 100644
index 000000000..e14c37141
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/LICENSE
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xpath/README.md b/vendor/github.com/antchfx/xpath/README.md
new file mode 100644
index 000000000..41bf8c6ff
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/README.md
@@ -0,0 +1,119 @@
+XPath
+====
+[![GoDoc](https://godoc.org/github.com/antchfx/xpath?status.svg)](https://godoc.org/github.com/antchfx/xpath)
+[![Coverage Status](https://coveralls.io/repos/github/antchfx/xpath/badge.svg?branch=master)](https://coveralls.io/github/antchfx/xpath?branch=master)
+[![Build Status](https://travis-ci.org/antchfx/xpath.svg?branch=master)](https://travis-ci.org/antchfx/xpath)
+[![Go Report Card](https://goreportcard.com/badge/github.com/antchfx/xpath)](https://goreportcard.com/report/github.com/antchfx/xpath)
+
+XPath is Go package provides selecting nodes from XML, HTML or other documents using XPath expression.
+
+[XQuery](https://github.com/antchfx/xquery) : lets you extract data from HTML/XML documents using XPath package.
+
+### Features
+
+#### The basic XPath patterns.
+
+> The basic XPath patterns cover 90% of the cases that most stylesheets will need.
+
+- `node` : Selects all child elements with nodeName of node.
+
+- `*` : Selects all child elements.
+
+- `@attr` : Selects the attribute attr.
+
+- `@*` : Selects all attributes.
+
+- `node()` : Matches an org.w3c.dom.Node.
+
+- `text()` : Matches a org.w3c.dom.Text node.
+
+- `comment()` : Matches a comment.
+
+- `.` : Selects the current node.
+
+- `..` : Selects the parent of current node.
+
+- `/` : Selects the document node.
+
+- `a[expr]` : Select only those nodes matching a which also satisfy the expression expr.
+
+- `a[n]` : Selects the nth matching node matching a When a filter's expression is a number, XPath selects based on position.
+
+- `a/b` : For each node matching a, add the nodes matching b to the result.
+
+- `a//b` : For each node matching a, add the descendant nodes matching b to the result.
+
+- `//b` : Returns elements in the entire document matching b.
+
+- `a|b` : All nodes matching a or b.
+
+#### Node Axes
+
+- `child::*` : The child axis selects children of the current node.
+
+- `descendant::*` : The descendant axis selects descendants of the current node. It is equivalent to '//'.
+
+- `descendant-or-self::*` : Selects descendants including the current node.
+
+- `attribute::*` : Selects attributes of the current element. It is equivalent to @*
+
+- `following-sibling::*` : Selects nodes after the current node.
+
+- `preceding-sibling::*` : Selects nodes before the current node.
+
+- `following::*` : Selects the first matching node following in document order, excluding descendants.
+
+- `preceding::*` : Selects the first matching node preceding in document order, excluding ancestors.
+
+- `parent::*` : Selects the parent if it matches. The '..' pattern from the core is equivalent to 'parent::node()'.
+
+- `ancestor::*` : Selects matching ancestors.
+
+- `ancestor-or-self::*` : Selects ancestors including the current node.
+
+- `self::*` : Selects the current node. '.' is equivalent to 'self::node()'.
+
+#### Expressions
+
+ The gxpath supported three types: number, boolean, string.
+
+- `path` : Selects nodes based on the path.
+
+- `a = b` : Standard comparisons.
+
+ * a = b True if a equals b.
+ * a != b True if a is not equal to b.
+ * a < b True if a is less than b.
+ * a <= b True if a is less than or equal to b.
+ * a > b True if a is greater than b.
+ * a >= b True if a is greater than or equal to b.
+
+- `a + b` : Arithmetic expressions.
+
+ * `- a` Unary minus
+ * a + b Add
+ * a - b Substract
+ * a * b Multiply
+ * a div b Divide
+ * a mod b Floating point mod, like Java.
+
+- `(expr)` : Parenthesized expressions.
+
+- `fun(arg1, ..., argn)` : Function calls.
+
+ * position()
+ * last()
+ * count( node-set )
+ * name()
+ * starts-with( string, string )
+ * normalize-space( string )
+ * substring( string , start [, length] )
+ * not( expression )
+ * string-length( [string] )
+ * contains( string, string )
+ * sum( node-set )
+ * concat( string1 , string2 [, stringn]* )
+
+- `a or b` : Boolean or.
+
+- `a and b` : Boolean and.
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xpath/build.go b/vendor/github.com/antchfx/xpath/build.go
new file mode 100644
index 000000000..544e0d49c
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/build.go
@@ -0,0 +1,359 @@
+package xpath
+
+import (
+ "errors"
+ "fmt"
+)
+
+type flag int
+
+const (
+ noneFlag flag = iota
+ filterFlag
+)
+
+// builder provides building an XPath expressions.
+type builder struct {
+ depth int
+ flag flag
+ firstInput query
+}
+
+// axisPredicate creates a predicate to predicating for this axis node.
+func axisPredicate(root *axisNode) func(NodeNavigator) bool {
+ // get current axix node type.
+ typ := ElementNode
+ if root.AxeType == "attribute" {
+ typ = AttributeNode
+ } else {
+ switch root.Prop {
+ case "comment":
+ typ = CommentNode
+ case "text":
+ typ = TextNode
+ // case "processing-instruction":
+ // typ = ProcessingInstructionNode
+ case "node":
+ typ = ElementNode
+ }
+ }
+ predicate := func(n NodeNavigator) bool {
+ if typ == n.NodeType() || typ == TextNode {
+ if root.LocalName == "" || (root.LocalName == n.LocalName() && root.Prefix == n.Prefix()) {
+ return true
+ }
+ }
+ return false
+ }
+
+ return predicate
+}
+
+// processAxisNode processes a query for the XPath axis node.
+func (b *builder) processAxisNode(root *axisNode) (query, error) {
+ var (
+ err error
+ qyInput query
+ qyOutput query
+ predicate = axisPredicate(root)
+ )
+
+ if root.Input == nil {
+ qyInput = &contextQuery{}
+ } else {
+ if b.flag&filterFlag == 0 {
+ if root.AxeType == "child" && (root.Input.Type() == nodeAxis) {
+ if input := root.Input.(*axisNode); input.AxeType == "descendant-or-self" {
+ var qyGrandInput query
+ if input.Input != nil {
+ qyGrandInput, _ = b.processNode(input.Input)
+ } else {
+ qyGrandInput = &contextQuery{}
+ }
+ qyOutput = &descendantQuery{Input: qyGrandInput, Predicate: predicate, Self: true}
+ return qyOutput, nil
+ }
+ }
+ }
+ qyInput, err = b.processNode(root.Input)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ switch root.AxeType {
+ case "ancestor":
+ qyOutput = &ancestorQuery{Input: qyInput, Predicate: predicate}
+ case "ancestor-or-self":
+ qyOutput = &ancestorQuery{Input: qyInput, Predicate: predicate, Self: true}
+ case "attribute":
+ qyOutput = &attributeQuery{Input: qyInput, Predicate: predicate}
+ case "child":
+ filter := func(n NodeNavigator) bool {
+ v := predicate(n)
+ switch root.Prop {
+ case "text":
+ v = v && n.NodeType() == TextNode
+ case "node":
+ v = v && (n.NodeType() == ElementNode || n.NodeType() == TextNode)
+ case "comment":
+ v = v && n.NodeType() == CommentNode
+ }
+ return v
+ }
+ qyOutput = &childQuery{Input: qyInput, Predicate: filter}
+ case "descendant":
+ qyOutput = &descendantQuery{Input: qyInput, Predicate: predicate}
+ case "descendant-or-self":
+ qyOutput = &descendantQuery{Input: qyInput, Predicate: predicate, Self: true}
+ case "following":
+ qyOutput = &followingQuery{Input: qyInput, Predicate: predicate}
+ case "following-sibling":
+ qyOutput = &followingQuery{Input: qyInput, Predicate: predicate, Sibling: true}
+ case "parent":
+ qyOutput = &parentQuery{Input: qyInput, Predicate: predicate}
+ case "preceding":
+ qyOutput = &precedingQuery{Input: qyInput, Predicate: predicate}
+ case "preceding-sibling":
+ qyOutput = &precedingQuery{Input: qyInput, Predicate: predicate, Sibling: true}
+ case "self":
+ qyOutput = &selfQuery{Input: qyInput, Predicate: predicate}
+ case "namespace":
+ // haha,what will you do someting??
+ default:
+ err = fmt.Errorf("unknown axe type: %s", root.AxeType)
+ return nil, err
+ }
+ return qyOutput, nil
+}
+
+// processFilterNode builds query for the XPath filter predicate.
+func (b *builder) processFilterNode(root *filterNode) (query, error) {
+ b.flag |= filterFlag
+
+ qyInput, err := b.processNode(root.Input)
+ if err != nil {
+ return nil, err
+ }
+ qyCond, err := b.processNode(root.Condition)
+ if err != nil {
+ return nil, err
+ }
+ qyOutput := &filterQuery{Input: qyInput, Predicate: qyCond}
+ return qyOutput, nil
+}
+
+// processFunctionNode processes query for the XPath function node.
+func (b *builder) processFunctionNode(root *functionNode) (query, error) {
+ var qyOutput query
+ switch root.FuncName {
+ case "starts-with":
+ arg1, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ arg2, err := b.processNode(root.Args[1])
+ if err != nil {
+ return nil, err
+ }
+ qyOutput = &functionQuery{Input: b.firstInput, Func: startwithFunc(arg1, arg2)}
+ case "contains":
+ arg1, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ arg2, err := b.processNode(root.Args[1])
+ if err != nil {
+ return nil, err
+ }
+
+ qyOutput = &functionQuery{Input: b.firstInput, Func: containsFunc(arg1, arg2)}
+ case "substring":
+ //substring( string , start [, length] )
+ if len(root.Args) < 2 {
+ return nil, errors.New("xpath: substring function must have at least two parameter")
+ }
+ var (
+ arg1, arg2, arg3 query
+ err error
+ )
+ if arg1, err = b.processNode(root.Args[0]); err != nil {
+ return nil, err
+ }
+ if arg2, err = b.processNode(root.Args[1]); err != nil {
+ return nil, err
+ }
+ if len(root.Args) == 3 {
+ if arg3, err = b.processNode(root.Args[2]); err != nil {
+ return nil, err
+ }
+ }
+ qyOutput = &functionQuery{Input: b.firstInput, Func: substringFunc(arg1, arg2, arg3)}
+ case "string-length":
+ // string-length( [string] )
+ if len(root.Args) < 1 {
+ return nil, errors.New("xpath: string-length function must have at least one parameter")
+ }
+ arg1, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ qyOutput = &functionQuery{Input: b.firstInput, Func: stringLengthFunc(arg1)}
+ case "normalize-space":
+ if len(root.Args) == 0 {
+ return nil, errors.New("xpath: normalize-space function must have at least one parameter")
+ }
+ argQuery, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ qyOutput = &functionQuery{Input: argQuery, Func: normalizespaceFunc}
+ case "not":
+ if len(root.Args) == 0 {
+ return nil, errors.New("xpath: not function must have at least one parameter")
+ }
+ argQuery, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ qyOutput = &functionQuery{Input: argQuery, Func: notFunc}
+ case "name":
+ qyOutput = &functionQuery{Input: b.firstInput, Func: nameFunc}
+ case "last":
+ qyOutput = &functionQuery{Input: b.firstInput, Func: lastFunc}
+ case "position":
+ qyOutput = &functionQuery{Input: b.firstInput, Func: positionFunc}
+ case "count":
+ //if b.firstInput == nil {
+ // return nil, errors.New("xpath: expression must evaluate to node-set")
+ //}
+ if len(root.Args) == 0 {
+ return nil, fmt.Errorf("xpath: count(node-sets) function must with have parameters node-sets")
+ }
+ argQuery, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ qyOutput = &functionQuery{Input: argQuery, Func: countFunc}
+ case "sum":
+ if len(root.Args) == 0 {
+ return nil, fmt.Errorf("xpath: sum(node-sets) function must with have parameters node-sets")
+ }
+ argQuery, err := b.processNode(root.Args[0])
+ if err != nil {
+ return nil, err
+ }
+ qyOutput = &functionQuery{Input: argQuery, Func: sumFunc}
+ case "concat":
+ if len(root.Args) < 2 {
+ return nil, fmt.Errorf("xpath: concat() must have at least two arguments")
+ }
+ var args []query
+ for _, v := range root.Args {
+ q, err := b.processNode(v)
+ if err != nil {
+ return nil, err
+ }
+ args = append(args, q)
+ }
+ qyOutput = &functionQuery{Input: b.firstInput, Func: concatFunc(args...)}
+ default:
+ return nil, fmt.Errorf("not yet support this function %s()", root.FuncName)
+ }
+ return qyOutput, nil
+}
+
+func (b *builder) processOperatorNode(root *operatorNode) (query, error) {
+ left, err := b.processNode(root.Left)
+ if err != nil {
+ return nil, err
+ }
+ right, err := b.processNode(root.Right)
+ if err != nil {
+ return nil, err
+ }
+ var qyOutput query
+ switch root.Op {
+ case "+", "-", "div", "mod": // Numeric operator
+ var exprFunc func(interface{}, interface{}) interface{}
+ switch root.Op {
+ case "+":
+ exprFunc = plusFunc
+ case "-":
+ exprFunc = minusFunc
+ case "div":
+ exprFunc = divFunc
+ case "mod":
+ exprFunc = modFunc
+ }
+ qyOutput = &numericQuery{Left: left, Right: right, Do: exprFunc}
+ case "=", ">", ">=", "<", "<=", "!=":
+ var exprFunc func(iterator, interface{}, interface{}) interface{}
+ switch root.Op {
+ case "=":
+ exprFunc = eqFunc
+ case ">":
+ exprFunc = gtFunc
+ case ">=":
+ exprFunc = geFunc
+ case "<":
+ exprFunc = ltFunc
+ case "<=":
+ exprFunc = leFunc
+ case "!=":
+ exprFunc = neFunc
+ }
+ qyOutput = &logicalQuery{Left: left, Right: right, Do: exprFunc}
+ case "or", "and", "|":
+ isOr := false
+ if root.Op == "or" || root.Op == "|" {
+ isOr = true
+ }
+ qyOutput = &booleanQuery{Left: left, Right: right, IsOr: isOr}
+ }
+ return qyOutput, nil
+}
+
+func (b *builder) processNode(root node) (q query, err error) {
+ if b.depth = b.depth + 1; b.depth > 1024 {
+ err = errors.New("the xpath expressions is too complex")
+ return
+ }
+
+ switch root.Type() {
+ case nodeConstantOperand:
+ n := root.(*operandNode)
+ q = &constantQuery{Val: n.Val}
+ case nodeRoot:
+ q = &contextQuery{Root: true}
+ case nodeAxis:
+ q, err = b.processAxisNode(root.(*axisNode))
+ b.firstInput = q
+ case nodeFilter:
+ q, err = b.processFilterNode(root.(*filterNode))
+ case nodeFunction:
+ q, err = b.processFunctionNode(root.(*functionNode))
+ case nodeOperator:
+ q, err = b.processOperatorNode(root.(*operatorNode))
+ }
+ return
+}
+
+// build builds a specified XPath expressions expr.
+func build(expr string) (q query, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ switch x := e.(type) {
+ case string:
+ err = errors.New(x)
+ case error:
+ err = x
+ default:
+ err = errors.New("unknown panic")
+ }
+ }
+ }()
+ root := parse(expr)
+ b := &builder{}
+ return b.processNode(root)
+}
diff --git a/vendor/github.com/antchfx/xpath/func.go b/vendor/github.com/antchfx/xpath/func.go
new file mode 100644
index 000000000..e28563401
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/func.go
@@ -0,0 +1,254 @@
+package xpath
+
+import (
+ "errors"
+ "strconv"
+ "strings"
+)
+
+// The XPath function list.
+
+func predicate(q query) func(NodeNavigator) bool {
+ type Predicater interface {
+ Test(NodeNavigator) bool
+ }
+ if p, ok := q.(Predicater); ok {
+ return p.Test
+ }
+ return func(NodeNavigator) bool { return true }
+}
+
+// positionFunc is a XPath Node Set functions position().
+func positionFunc(q query, t iterator) interface{} {
+ var (
+ count = 1
+ node = t.Current()
+ )
+ test := predicate(q)
+ for node.MoveToPrevious() {
+ if test(node) {
+ count++
+ }
+ }
+ return float64(count)
+}
+
+// lastFunc is a XPath Node Set functions last().
+func lastFunc(q query, t iterator) interface{} {
+ var (
+ count = 0
+ node = t.Current()
+ )
+ node.MoveToFirst()
+ test := predicate(q)
+ for {
+ if test(node) {
+ count++
+ }
+ if !node.MoveToNext() {
+ break
+ }
+ }
+ return float64(count)
+}
+
+// countFunc is a XPath Node Set functions count(node-set).
+func countFunc(q query, t iterator) interface{} {
+ var count = 0
+ test := predicate(q)
+ switch typ := q.Evaluate(t).(type) {
+ case query:
+ for node := typ.Select(t); node != nil; node = typ.Select(t) {
+ if test(node) {
+ count++
+ }
+ }
+ }
+ return float64(count)
+}
+
+// sumFunc is a XPath Node Set functions sum(node-set).
+func sumFunc(q query, t iterator) interface{} {
+ var sum float64
+ switch typ := q.Evaluate(t).(type) {
+ case query:
+ for node := typ.Select(t); node != nil; node = typ.Select(t) {
+ if v, err := strconv.ParseFloat(node.Value(), 64); err == nil {
+ sum += v
+ }
+ }
+ case float64:
+ sum = typ
+ case string:
+ if v, err := strconv.ParseFloat(typ, 64); err != nil {
+ sum = v
+ }
+ }
+ return sum
+}
+
+// nameFunc is a XPath functions name([node-set]).
+func nameFunc(q query, t iterator) interface{} {
+ return t.Current().LocalName()
+}
+
+// startwithFunc is a XPath functions starts-with(string, string).
+func startwithFunc(arg1, arg2 query) func(query, iterator) interface{} {
+ return func(q query, t iterator) interface{} {
+ var (
+ m, n string
+ ok bool
+ )
+ switch typ := arg1.Evaluate(t).(type) {
+ case string:
+ m = typ
+ case query:
+ node := typ.Select(t)
+ if node == nil {
+ return false
+ }
+ m = node.Value()
+ default:
+ panic(errors.New("starts-with() function argument type must be string"))
+ }
+ n, ok = arg2.Evaluate(t).(string)
+ if !ok {
+ panic(errors.New("starts-with() function argument type must be string"))
+ }
+ return strings.HasPrefix(m, n)
+ }
+}
+
+// containsFunc is a XPath functions contains(string or @attr, string).
+func containsFunc(arg1, arg2 query) func(query, iterator) interface{} {
+ return func(q query, t iterator) interface{} {
+ var (
+ m, n string
+ ok bool
+ )
+
+ switch typ := arg1.Evaluate(t).(type) {
+ case string:
+ m = typ
+ case query:
+ node := typ.Select(t)
+ if node == nil {
+ return false
+ }
+ m = node.Value()
+ default:
+ panic(errors.New("contains() function argument type must be string"))
+ }
+
+ n, ok = arg2.Evaluate(t).(string)
+ if !ok {
+ panic(errors.New("contains() function argument type must be string"))
+ }
+
+ return strings.Contains(m, n)
+ }
+}
+
+// normalizespaceFunc is XPath functions normalize-space(string?)
+func normalizespaceFunc(q query, t iterator) interface{} {
+ var m string
+ switch typ := q.Evaluate(t).(type) {
+ case string:
+ m = typ
+ case query:
+ node := typ.Select(t)
+ if node == nil {
+ return false
+ }
+ m = node.Value()
+ }
+ return strings.TrimSpace(m)
+}
+
+// substringFunc is XPath functions substring function returns a part of a given string.
+func substringFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} {
+ return func(q query, t iterator) interface{} {
+ var m string
+ switch typ := arg1.Evaluate(t).(type) {
+ case string:
+ m = typ
+ case query:
+ node := typ.Select(t)
+ if node == nil {
+ return false
+ }
+ m = node.Value()
+ }
+
+ var start, length float64
+ var ok bool
+
+ if start, ok = arg2.Evaluate(t).(float64); !ok {
+ panic(errors.New("substring() function first argument type must be int"))
+ }
+ if arg3 != nil {
+ if length, ok = arg3.Evaluate(t).(float64); !ok {
+ panic(errors.New("substring() function second argument type must be int"))
+ }
+ }
+ if (len(m) - int(start)) < int(length) {
+ panic(errors.New("substring() function start and length argument out of range"))
+ }
+ if length > 0 {
+ return m[int(start):int(length+start)]
+ }
+ return m[int(start):]
+ }
+}
+
+// stringLengthFunc is XPATH string-length( [string] ) function that returns a number
+// equal to the number of characters in a given string.
+func stringLengthFunc(arg1 query) func(query, iterator) interface{} {
+ return func(q query, t iterator) interface{} {
+ switch v := arg1.Evaluate(t).(type) {
+ case string:
+ return float64(len(v))
+ case query:
+ node := v.Select(t)
+ if node == nil {
+ break
+ }
+ return float64(len(node.Value()))
+ }
+ return float64(0)
+ }
+}
+
+// notFunc is XPATH functions not(expression) function operation.
+func notFunc(q query, t iterator) interface{} {
+ switch v := q.Evaluate(t).(type) {
+ case bool:
+ return !v
+ case query:
+ node := v.Select(t)
+ return node == nil
+ default:
+ return false
+ }
+}
+
+// concatFunc is the concat function concatenates two or more
+// strings and returns the resulting string.
+// concat( string1 , string2 [, stringn]* )
+func concatFunc(args ...query) func(query, iterator) interface{} {
+ return func(q query, t iterator) interface{} {
+ var a []string
+ for _, v := range args {
+ switch v := v.Evaluate(t).(type) {
+ case string:
+ a = append(a, v)
+ case query:
+ node := v.Select(t)
+ if node != nil {
+ a = append(a, node.Value())
+ }
+ }
+ }
+ return strings.Join(a, "")
+ }
+}
diff --git a/vendor/github.com/antchfx/xpath/operator.go b/vendor/github.com/antchfx/xpath/operator.go
new file mode 100644
index 000000000..308d3cbcc
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/operator.go
@@ -0,0 +1,295 @@
+package xpath
+
+import (
+ "fmt"
+ "reflect"
+ "strconv"
+)
+
+// The XPath number operator function list.
+
+// valueType is a return value type.
+type valueType int
+
+const (
+ booleanType valueType = iota
+ numberType
+ stringType
+ nodeSetType
+)
+
+func getValueType(i interface{}) valueType {
+ v := reflect.ValueOf(i)
+ switch v.Kind() {
+ case reflect.Float64:
+ return numberType
+ case reflect.String:
+ return stringType
+ case reflect.Bool:
+ return booleanType
+ default:
+ if _, ok := i.(query); ok {
+ return nodeSetType
+ }
+ }
+ panic(fmt.Errorf("xpath unknown value type: %v", v.Kind()))
+}
+
+type logical func(iterator, string, interface{}, interface{}) bool
+
+var logicalFuncs = [][]logical{
+ {cmpBooleanBoolean, nil, nil, nil},
+ {nil, cmpNumericNumeric, cmpNumericString, cmpNumericNodeSet},
+ {nil, cmpStringNumeric, cmpStringString, cmpStringNodeSet},
+ {nil, cmpNodeSetNumeric, cmpNodeSetString, cmpNodeSetNodeSet},
+}
+
+// number vs number
+func cmpNumberNumberF(op string, a, b float64) bool {
+ switch op {
+ case "=":
+ return a == b
+ case ">":
+ return a > b
+ case "<":
+ return a < b
+ case ">=":
+ return a >= b
+ case "<=":
+ return a <= b
+ case "!=":
+ return a != b
+ }
+ return false
+}
+
+// string vs string
+func cmpStringStringF(op string, a, b string) bool {
+ switch op {
+ case "=":
+ return a == b
+ case ">":
+ return a > b
+ case "<":
+ return a < b
+ case ">=":
+ return a >= b
+ case "<=":
+ return a <= b
+ case "!=":
+ return a != b
+ }
+ return false
+}
+
+func cmpBooleanBooleanF(op string, a, b bool) bool {
+ switch op {
+ case "or":
+ return a || b
+ case "and":
+ return a && b
+ }
+ return false
+}
+
+func cmpNumericNumeric(t iterator, op string, m, n interface{}) bool {
+ a := m.(float64)
+ b := n.(float64)
+ return cmpNumberNumberF(op, a, b)
+}
+
+func cmpNumericString(t iterator, op string, m, n interface{}) bool {
+ a := m.(float64)
+ b := n.(string)
+ num, err := strconv.ParseFloat(b, 64)
+ if err != nil {
+ panic(err)
+ }
+ return cmpNumberNumberF(op, a, num)
+}
+
+func cmpNumericNodeSet(t iterator, op string, m, n interface{}) bool {
+ a := m.(float64)
+ b := n.(query)
+
+ for {
+ node := b.Select(t)
+ if node == nil {
+ break
+ }
+ num, err := strconv.ParseFloat(node.Value(), 64)
+ if err != nil {
+ panic(err)
+ }
+ if cmpNumberNumberF(op, a, num) {
+ return true
+ }
+ }
+ return false
+}
+
+func cmpNodeSetNumeric(t iterator, op string, m, n interface{}) bool {
+ a := m.(query)
+ b := n.(float64)
+ for {
+ node := a.Select(t)
+ if node == nil {
+ break
+ }
+ num, err := strconv.ParseFloat(node.Value(), 64)
+ if err != nil {
+ panic(err)
+ }
+ if cmpNumberNumberF(op, num, b) {
+ return true
+ }
+ }
+ return false
+}
+
+func cmpNodeSetString(t iterator, op string, m, n interface{}) bool {
+ a := m.(query)
+ b := n.(string)
+ for {
+ node := a.Select(t)
+ if node == nil {
+ break
+ }
+ if cmpStringStringF(op, b, node.Value()) {
+ return true
+ }
+ }
+ return false
+}
+
+func cmpNodeSetNodeSet(t iterator, op string, m, n interface{}) bool {
+ return false
+}
+
+func cmpStringNumeric(t iterator, op string, m, n interface{}) bool {
+ a := m.(string)
+ b := n.(float64)
+ num, err := strconv.ParseFloat(a, 64)
+ if err != nil {
+ panic(err)
+ }
+ return cmpNumberNumberF(op, b, num)
+}
+
+func cmpStringString(t iterator, op string, m, n interface{}) bool {
+ a := m.(string)
+ b := n.(string)
+ return cmpStringStringF(op, a, b)
+}
+
+func cmpStringNodeSet(t iterator, op string, m, n interface{}) bool {
+ a := m.(string)
+ b := n.(query)
+ for {
+ node := b.Select(t)
+ if node == nil {
+ break
+ }
+ if cmpStringStringF(op, a, node.Value()) {
+ return true
+ }
+ }
+ return false
+}
+
+func cmpBooleanBoolean(t iterator, op string, m, n interface{}) bool {
+ a := m.(bool)
+ b := n.(bool)
+ return cmpBooleanBooleanF(op, a, b)
+}
+
+// eqFunc is an `=` operator.
+func eqFunc(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, "=", m, n)
+}
+
+// gtFunc is an `>` operator.
+func gtFunc(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, ">", m, n)
+}
+
+// geFunc is an `>=` operator.
+func geFunc(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, ">=", m, n)
+}
+
+// ltFunc is an `<` operator.
+func ltFunc(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, "<", m, n)
+}
+
+// leFunc is an `<=` operator.
+func leFunc(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, "<=", m, n)
+}
+
+// neFunc is an `!=` operator.
+func neFunc(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, "!=", m, n)
+}
+
+// orFunc is an `or` operator.
+var orFunc = func(t iterator, m, n interface{}) interface{} {
+ t1 := getValueType(m)
+ t2 := getValueType(n)
+ return logicalFuncs[t1][t2](t, "or", m, n)
+}
+
+func numericExpr(m, n interface{}, cb func(float64, float64) float64) float64 {
+ typ := reflect.TypeOf(float64(0))
+ a := reflect.ValueOf(m).Convert(typ)
+ b := reflect.ValueOf(n).Convert(typ)
+ return cb(a.Float(), b.Float())
+}
+
+// plusFunc is an `+` operator.
+var plusFunc = func(m, n interface{}) interface{} {
+ return numericExpr(m, n, func(a, b float64) float64 {
+ return a + b
+ })
+}
+
+// minusFunc is an `-` operator.
+var minusFunc = func(m, n interface{}) interface{} {
+ return numericExpr(m, n, func(a, b float64) float64 {
+ return a - b
+ })
+}
+
+// mulFunc is an `*` operator.
+var mulFunc = func(m, n interface{}) interface{} {
+ return numericExpr(m, n, func(a, b float64) float64 {
+ return a * b
+ })
+}
+
+// divFunc is an `DIV` operator.
+var divFunc = func(m, n interface{}) interface{} {
+ return numericExpr(m, n, func(a, b float64) float64 {
+ return a / b
+ })
+}
+
+// modFunc is an 'MOD' operator.
+var modFunc = func(m, n interface{}) interface{} {
+ return numericExpr(m, n, func(a, b float64) float64 {
+ return float64(int(a) % int(b))
+ })
+}
diff --git a/vendor/github.com/antchfx/xpath/parse.go b/vendor/github.com/antchfx/xpath/parse.go
new file mode 100644
index 000000000..6103131cb
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/parse.go
@@ -0,0 +1,1164 @@
+package xpath
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "strconv"
+ "unicode"
+)
+
+// A XPath expression token type.
+type itemType int
+
+const (
+ itemComma itemType = iota // ','
+ itemSlash // '/'
+ itemAt // '@'
+ itemDot // '.'
+ itemLParens // '('
+ itemRParens // ')'
+ itemLBracket // '['
+ itemRBracket // ']'
+ itemStar // '*'
+ itemPlus // '+'
+ itemMinus // '-'
+ itemEq // '='
+ itemLt // '<'
+ itemGt // '>'
+ itemBang // '!'
+ itemDollar // '$'
+ itemApos // '\''
+ itemQuote // '"'
+ itemUnion // '|'
+ itemNe // '!='
+ itemLe // '<='
+ itemGe // '>='
+ itemAnd // '&&'
+ itemOr // '||'
+ itemDotDot // '..'
+ itemSlashSlash // '//'
+ itemName // XML Name
+ itemString // Quoted string constant
+ itemNumber // Number constant
+ itemAxe // Axe (like child::)
+ itemEof // END
+)
+
+// A node is an XPath node in the parse tree.
+type node interface {
+ Type() nodeType
+}
+
+// nodeType identifies the type of a parse tree node.
+type nodeType int
+
+func (t nodeType) Type() nodeType {
+ return t
+}
+
+const (
+ nodeRoot nodeType = iota
+ nodeAxis
+ nodeFilter
+ nodeFunction
+ nodeOperator
+ nodeVariable
+ nodeConstantOperand
+)
+
+type parser struct {
+ r *scanner
+ d int
+}
+
+// newOperatorNode returns new operator node OperatorNode.
+func newOperatorNode(op string, left, right node) node {
+ return &operatorNode{nodeType: nodeOperator, Op: op, Left: left, Right: right}
+}
+
+// newOperand returns new constant operand node OperandNode.
+func newOperandNode(v interface{}) node {
+ return &operandNode{nodeType: nodeConstantOperand, Val: v}
+}
+
+// newAxisNode returns new axis node AxisNode.
+func newAxisNode(axeTyp, localName, prefix, prop string, n node) node {
+ return &axisNode{
+ nodeType: nodeAxis,
+ LocalName: localName,
+ Prefix: prefix,
+ AxeType: axeTyp,
+ Prop: prop,
+ Input: n,
+ }
+}
+
+// newVariableNode returns new variable node VariableNode.
+func newVariableNode(prefix, name string) node {
+ return &variableNode{nodeType: nodeVariable, Name: name, Prefix: prefix}
+}
+
+// newFilterNode returns a new filter node FilterNode.
+func newFilterNode(n, m node) node {
+ return &filterNode{nodeType: nodeFilter, Input: n, Condition: m}
+}
+
+// newRootNode returns a root node.
+func newRootNode(s string) node {
+ return &rootNode{nodeType: nodeRoot, slash: s}
+}
+
+// newFunctionNode returns function call node.
+func newFunctionNode(name, prefix string, args []node) node {
+ return &functionNode{nodeType: nodeFunction, Prefix: prefix, FuncName: name, Args: args}
+}
+
+// testOp reports whether current item name is an operand op.
+func testOp(r *scanner, op string) bool {
+ return r.typ == itemName && r.prefix == "" && r.name == op
+}
+
+func isPrimaryExpr(r *scanner) bool {
+ switch r.typ {
+ case itemString, itemNumber, itemDollar, itemLParens:
+ return true
+ case itemName:
+ return r.canBeFunc && !isNodeType(r)
+ }
+ return false
+}
+
+func isNodeType(r *scanner) bool {
+ switch r.name {
+ case "node", "text", "processing-instruction", "comment":
+ return r.prefix == ""
+ }
+ return false
+}
+
+func isStep(item itemType) bool {
+ switch item {
+ case itemDot, itemDotDot, itemAt, itemAxe, itemStar, itemName:
+ return true
+ }
+ return false
+}
+
+func checkItem(r *scanner, typ itemType) {
+ if r.typ != typ {
+ panic(fmt.Sprintf("%s has an invalid token", r.text))
+ }
+}
+
+// parseExpression parsing the expression with input node n.
+func (p *parser) parseExpression(n node) node {
+ if p.d = p.d + 1; p.d > 200 {
+ panic("the xpath query is too complex(depth > 200)")
+ }
+ n = p.parseOrExpr(n)
+ p.d--
+ return n
+}
+
+// next scanning next item on forward.
+func (p *parser) next() bool {
+ return p.r.nextItem()
+}
+
+func (p *parser) skipItem(typ itemType) {
+ checkItem(p.r, typ)
+ p.next()
+}
+
+// OrExpr ::= AndExpr | OrExpr 'or' AndExpr
+func (p *parser) parseOrExpr(n node) node {
+ opnd := p.parseAndExpr(n)
+ for {
+ if !testOp(p.r, "or") {
+ break
+ }
+ p.next()
+ opnd = newOperatorNode("or", opnd, p.parseAndExpr(n))
+ }
+ return opnd
+}
+
+// AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr
+func (p *parser) parseAndExpr(n node) node {
+ opnd := p.parseEqualityExpr(n)
+ for {
+ if !testOp(p.r, "and") {
+ break
+ }
+ p.next()
+ opnd = newOperatorNode("and", opnd, p.parseEqualityExpr(n))
+ }
+ return opnd
+}
+
+// EqualityExpr ::= RelationalExpr | EqualityExpr '=' RelationalExpr | EqualityExpr '!=' RelationalExpr
+func (p *parser) parseEqualityExpr(n node) node {
+ opnd := p.parseRelationalExpr(n)
+Loop:
+ for {
+ var op string
+ switch p.r.typ {
+ case itemEq:
+ op = "="
+ case itemNe:
+ op = "!="
+ default:
+ break Loop
+ }
+ p.next()
+ opnd = newOperatorNode(op, opnd, p.parseRelationalExpr(n))
+ }
+ return opnd
+}
+
+// RelationalExpr ::= AdditiveExpr | RelationalExpr '<' AdditiveExpr | RelationalExpr '>' AdditiveExpr
+// | RelationalExpr '<=' AdditiveExpr
+// | RelationalExpr '>=' AdditiveExpr
+func (p *parser) parseRelationalExpr(n node) node {
+ opnd := p.parseAdditiveExpr(n)
+Loop:
+ for {
+ var op string
+ switch p.r.typ {
+ case itemLt:
+ op = "<"
+ case itemGt:
+ op = ">"
+ case itemLe:
+ op = "<="
+ case itemGe:
+ op = ">="
+ default:
+ break Loop
+ }
+ p.next()
+ opnd = newOperatorNode(op, opnd, p.parseAdditiveExpr(n))
+ }
+ return opnd
+}
+
+// AdditiveExpr ::= MultiplicativeExpr | AdditiveExpr '+' MultiplicativeExpr | AdditiveExpr '-' MultiplicativeExpr
+func (p *parser) parseAdditiveExpr(n node) node {
+ opnd := p.parseMultiplicativeExpr(n)
+Loop:
+ for {
+ var op string
+ switch p.r.typ {
+ case itemPlus:
+ op = "+"
+ case itemMinus:
+ op = "-"
+ default:
+ break Loop
+ }
+ p.next()
+ opnd = newOperatorNode(op, opnd, p.parseMultiplicativeExpr(n))
+ }
+ return opnd
+}
+
+// MultiplicativeExpr ::= UnaryExpr | MultiplicativeExpr MultiplyOperator(*) UnaryExpr
+// | MultiplicativeExpr 'div' UnaryExpr | MultiplicativeExpr 'mod' UnaryExpr
+func (p *parser) parseMultiplicativeExpr(n node) node {
+ opnd := p.parseUnaryExpr(n)
+Loop:
+ for {
+ var op string
+ if p.r.typ == itemStar {
+ op = "*"
+ } else if testOp(p.r, "div") || testOp(p.r, "mod") {
+ op = p.r.name
+ } else {
+ break Loop
+ }
+ p.next()
+ opnd = newOperatorNode(op, opnd, p.parseUnaryExpr(n))
+ }
+ return opnd
+}
+
+// UnaryExpr ::= UnionExpr | '-' UnaryExpr
+func (p *parser) parseUnaryExpr(n node) node {
+ minus := false
+ // ignore '-' sequence
+ for p.r.typ == itemMinus {
+ p.next()
+ minus = !minus
+ }
+ opnd := p.parseUnionExpr(n)
+ if minus {
+ opnd = newOperatorNode("*", opnd, newOperandNode(float64(-1)))
+ }
+ return opnd
+}
+
+// UnionExpr ::= PathExpr | UnionExpr '|' PathExpr
+func (p *parser) parseUnionExpr(n node) node {
+ opnd := p.parsePathExpr(n)
+Loop:
+ for {
+ if p.r.typ != itemUnion {
+ break Loop
+ }
+ p.next()
+ opnd2 := p.parsePathExpr(n)
+ // Checking the node type that must be is node set type?
+ opnd = newOperatorNode("|", opnd, opnd2)
+ }
+ return opnd
+}
+
+// PathExpr ::= LocationPath | FilterExpr | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath
+func (p *parser) parsePathExpr(n node) node {
+ var opnd node
+ if isPrimaryExpr(p.r) {
+ opnd = p.parseFilterExpr(n)
+ switch p.r.typ {
+ case itemSlash:
+ p.next()
+ opnd = p.parseRelativeLocationPath(opnd)
+ case itemSlashSlash:
+ p.next()
+ opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", "", "", "", opnd))
+ }
+ } else {
+ opnd = p.parseLocationPath(nil)
+ }
+ return opnd
+}
+
+// FilterExpr ::= PrimaryExpr | FilterExpr Predicate
+func (p *parser) parseFilterExpr(n node) node {
+ opnd := p.parsePrimaryExpr(n)
+ if p.r.typ == itemLBracket {
+ opnd = newFilterNode(opnd, p.parsePredicate(opnd))
+ }
+ return opnd
+}
+
+// Predicate ::= '[' PredicateExpr ']'
+func (p *parser) parsePredicate(n node) node {
+ p.skipItem(itemLBracket)
+ opnd := p.parseExpression(n)
+ p.skipItem(itemRBracket)
+ return opnd
+}
+
+// LocationPath ::= RelativeLocationPath | AbsoluteLocationPath
+func (p *parser) parseLocationPath(n node) (opnd node) {
+ switch p.r.typ {
+ case itemSlash:
+ p.next()
+ opnd = newRootNode("/")
+ if isStep(p.r.typ) {
+ opnd = p.parseRelativeLocationPath(opnd) // ?? child:: or self ??
+ }
+ case itemSlashSlash:
+ p.next()
+ opnd = newRootNode("//")
+ opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", "", "", "", opnd))
+ default:
+ opnd = p.parseRelativeLocationPath(n)
+ }
+ return opnd
+}
+
+// RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath
+func (p *parser) parseRelativeLocationPath(n node) node {
+ opnd := n
+Loop:
+ for {
+ opnd = p.parseStep(opnd)
+ switch p.r.typ {
+ case itemSlashSlash:
+ p.next()
+ opnd = newAxisNode("descendant-or-self", "", "", "", opnd)
+ case itemSlash:
+ p.next()
+ default:
+ break Loop
+ }
+ }
+ return opnd
+}
+
+// Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep
+func (p *parser) parseStep(n node) node {
+ axeTyp := "child" // default axes value.
+ if p.r.typ == itemDot || p.r.typ == itemDotDot {
+ if p.r.typ == itemDot {
+ axeTyp = "self"
+ } else {
+ axeTyp = "parent"
+ }
+ p.next()
+ return newAxisNode(axeTyp, "", "", "", n)
+ }
+ switch p.r.typ {
+ case itemAt:
+ p.next()
+ axeTyp = "attribute"
+ case itemAxe:
+ axeTyp = p.r.name
+ p.next()
+ }
+ opnd := p.parseNodeTest(n, axeTyp)
+ for p.r.typ == itemLBracket {
+ opnd = newFilterNode(opnd, p.parsePredicate(opnd))
+ }
+ return opnd
+}
+
+// NodeTest ::= NameTest | nodeType '(' ')' | 'processing-instruction' '(' Literal ')'
+func (p *parser) parseNodeTest(n node, axeTyp string) (opnd node) {
+ switch p.r.typ {
+ case itemName:
+ if p.r.canBeFunc && isNodeType(p.r) {
+ var prop string
+ switch p.r.name {
+ case "comment", "text", "processing-instruction", "node":
+ prop = p.r.name
+ }
+ var name string
+ p.next()
+ p.skipItem(itemLParens)
+ if prop == "processing-instruction" && p.r.typ != itemRParens {
+ checkItem(p.r, itemString)
+ name = p.r.strval
+ p.next()
+ }
+ p.skipItem(itemRParens)
+ opnd = newAxisNode(axeTyp, name, "", prop, n)
+ } else {
+ prefix := p.r.prefix
+ name := p.r.name
+ p.next()
+ if p.r.name == "*" {
+ name = ""
+ }
+ opnd = newAxisNode(axeTyp, name, prefix, "", n)
+ }
+ case itemStar:
+ opnd = newAxisNode(axeTyp, "", "", "", n)
+ p.next()
+ default:
+ panic("expression must evaluate to a node-set")
+ }
+ return opnd
+}
+
+// PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall
+func (p *parser) parsePrimaryExpr(n node) (opnd node) {
+ switch p.r.typ {
+ case itemString:
+ opnd = newOperandNode(p.r.strval)
+ p.next()
+ case itemNumber:
+ opnd = newOperandNode(p.r.numval)
+ p.next()
+ case itemDollar:
+ p.next()
+ checkItem(p.r, itemName)
+ opnd = newVariableNode(p.r.prefix, p.r.name)
+ p.next()
+ case itemLParens:
+ p.next()
+ opnd = p.parseExpression(n)
+ p.skipItem(itemRParens)
+ case itemName:
+ if p.r.canBeFunc && !isNodeType(p.r) {
+ opnd = p.parseMethod(nil)
+ }
+ }
+ return opnd
+}
+
+// FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')'
+func (p *parser) parseMethod(n node) node {
+ var args []node
+ name := p.r.name
+ prefix := p.r.prefix
+
+ p.skipItem(itemName)
+ p.skipItem(itemLParens)
+ if p.r.typ != itemRParens {
+ for {
+ args = append(args, p.parseExpression(n))
+ if p.r.typ == itemRParens {
+ break
+ }
+ p.skipItem(itemComma)
+ }
+ }
+ p.skipItem(itemRParens)
+ return newFunctionNode(name, prefix, args)
+}
+
+// Parse parsing the XPath express string expr and returns a tree node.
+func parse(expr string) node {
+ r := &scanner{text: expr}
+ r.nextChar()
+ r.nextItem()
+ p := &parser{r: r}
+ return p.parseExpression(nil)
+}
+
+// rootNode holds a top-level node of tree.
+type rootNode struct {
+ nodeType
+ slash string
+}
+
+func (r *rootNode) String() string {
+ return r.slash
+}
+
+// operatorNode holds two Nodes operator.
+type operatorNode struct {
+ nodeType
+ Op string
+ Left, Right node
+}
+
+func (o *operatorNode) String() string {
+ return fmt.Sprintf("%v%s%v", o.Left, o.Op, o.Right)
+}
+
+// axisNode holds a location step.
+type axisNode struct {
+ nodeType
+ Input node
+ Prop string // node-test name.[comment|text|processing-instruction|node]
+ AxeType string // name of the axes.[attribute|ancestor|child|....]
+ LocalName string // local part name of node.
+ Prefix string // prefix name of node.
+}
+
+func (a *axisNode) String() string {
+ var b bytes.Buffer
+ if a.AxeType != "" {
+ b.Write([]byte(a.AxeType + "::"))
+ }
+ if a.Prefix != "" {
+ b.Write([]byte(a.Prefix + ":"))
+ }
+ b.Write([]byte(a.LocalName))
+ if a.Prop != "" {
+ b.Write([]byte("/" + a.Prop + "()"))
+ }
+ return b.String()
+}
+
+// operandNode holds a constant operand.
+type operandNode struct {
+ nodeType
+ Val interface{}
+}
+
+func (o *operandNode) String() string {
+ return fmt.Sprintf("%v", o.Val)
+}
+
+// filterNode holds a condition filter.
+type filterNode struct {
+ nodeType
+ Input, Condition node
+}
+
+func (f *filterNode) String() string {
+ return fmt.Sprintf("%s[%s]", f.Input, f.Condition)
+}
+
+// variableNode holds a variable.
+type variableNode struct {
+ nodeType
+ Name, Prefix string
+}
+
+func (v *variableNode) String() string {
+ if v.Prefix == "" {
+ return v.Name
+ }
+ return fmt.Sprintf("%s:%s", v.Prefix, v.Name)
+}
+
+// functionNode holds a function call.
+type functionNode struct {
+ nodeType
+ Args []node
+ Prefix string
+ FuncName string // function name
+}
+
+func (f *functionNode) String() string {
+ var b bytes.Buffer
+ // fun(arg1, ..., argn)
+ b.Write([]byte(f.FuncName))
+ b.Write([]byte("("))
+ for i, arg := range f.Args {
+ if i > 0 {
+ b.Write([]byte(","))
+ }
+ b.Write([]byte(fmt.Sprintf("%s", arg)))
+ }
+ b.Write([]byte(")"))
+ return b.String()
+}
+
+type scanner struct {
+ text, name, prefix string
+
+ pos int
+ curr rune
+ typ itemType
+ strval string // text value at current pos
+ numval float64 // number value at current pos
+ canBeFunc bool
+}
+
+func (s *scanner) nextChar() bool {
+ if s.pos >= len(s.text) {
+ s.curr = rune(0)
+ return false
+ }
+ s.curr = rune(s.text[s.pos])
+ s.pos += 1
+ return true
+}
+
+func (s *scanner) nextItem() bool {
+ s.skipSpace()
+ switch s.curr {
+ case 0:
+ s.typ = itemEof
+ return false
+ case ',', '@', '(', ')', '|', '*', '[', ']', '+', '-', '=', '#', '$':
+ s.typ = asItemType(s.curr)
+ s.nextChar()
+ case '<':
+ s.typ = itemLt
+ s.nextChar()
+ if s.curr == '=' {
+ s.typ = itemLe
+ s.nextChar()
+ }
+ case '>':
+ s.typ = itemGt
+ s.nextChar()
+ if s.curr == '=' {
+ s.typ = itemGe
+ s.nextChar()
+ }
+ case '!':
+ s.typ = itemBang
+ s.nextChar()
+ if s.curr == '=' {
+ s.typ = itemNe
+ s.nextChar()
+ }
+ case '.':
+ s.typ = itemDot
+ s.nextChar()
+ if s.curr == '.' {
+ s.typ = itemDotDot
+ s.nextChar()
+ } else if isDigit(s.curr) {
+ s.typ = itemNumber
+ s.numval = s.scanFraction()
+ }
+ case '/':
+ s.typ = itemSlash
+ s.nextChar()
+ if s.curr == '/' {
+ s.typ = itemSlashSlash
+ s.nextChar()
+ }
+ case '"', '\'':
+ s.typ = itemString
+ s.strval = s.scanString()
+ default:
+ if isDigit(s.curr) {
+ s.typ = itemNumber
+ s.numval = s.scanNumber()
+ } else if isName(s.curr) {
+ s.typ = itemName
+ s.name = s.scanName()
+ s.prefix = ""
+ // "foo:bar" is one itemem not three because it doesn't allow spaces in between
+ // We should distinct it from "foo::" and need process "foo ::" as well
+ if s.curr == ':' {
+ s.nextChar()
+ // can be "foo:bar" or "foo::"
+ if s.curr == ':' {
+ // "foo::"
+ s.nextChar()
+ s.typ = itemAxe
+ } else { // "foo:*", "foo:bar" or "foo: "
+ s.prefix = s.name
+ if s.curr == '*' {
+ s.nextChar()
+ s.name = "*"
+ } else if isName(s.curr) {
+ s.name = s.scanName()
+ } else {
+ panic(fmt.Sprintf("%s has an invalid qualified name.", s.text))
+ }
+ }
+ } else {
+ s.skipSpace()
+ if s.curr == ':' {
+ s.nextChar()
+ // it can be "foo ::" or just "foo :"
+ if s.curr == ':' {
+ s.nextChar()
+ s.typ = itemAxe
+ } else {
+ panic(fmt.Sprintf("%s has an invalid qualified name.", s.text))
+ }
+ }
+ }
+ s.skipSpace()
+ s.canBeFunc = s.curr == '('
+ } else {
+ panic(fmt.Sprintf("%s has an invalid token.", s.text))
+ }
+ }
+ return true
+}
+
+func (s *scanner) skipSpace() {
+Loop:
+ for {
+ if !unicode.IsSpace(s.curr) || !s.nextChar() {
+ break Loop
+ }
+ }
+}
+
+func (s *scanner) scanFraction() float64 {
+ var (
+ i = s.pos - 2
+ c = 1 // '.'
+ )
+ for isDigit(s.curr) {
+ s.nextChar()
+ c++
+ }
+ v, err := strconv.ParseFloat(s.text[i:i+c], 64)
+ if err != nil {
+ panic(fmt.Errorf("xpath: scanFraction parse float got error: %v", err))
+ }
+ return v
+}
+
+func (s *scanner) scanNumber() float64 {
+ var (
+ c int
+ i = s.pos - 1
+ )
+ for isDigit(s.curr) {
+ s.nextChar()
+ c++
+ }
+ if s.curr == '.' {
+ s.nextChar()
+ c++
+ for isDigit(s.curr) {
+ s.nextChar()
+ c++
+ }
+ }
+ v, err := strconv.ParseFloat(s.text[i:i+c], 64)
+ if err != nil {
+ panic(fmt.Errorf("xpath: scanNumber parse float got error: %v", err))
+ }
+ return v
+}
+
+func (s *scanner) scanString() string {
+ var (
+ c = 0
+ end = s.curr
+ )
+ s.nextChar()
+ i := s.pos - 1
+ for s.curr != end {
+ if !s.nextChar() {
+ panic(errors.New("xpath: scanString got unclosed string"))
+ }
+ c++
+ }
+ s.nextChar()
+ return s.text[i : i+c]
+}
+
+func (s *scanner) scanName() string {
+ var (
+ c int
+ i = s.pos - 1
+ )
+ for isName(s.curr) {
+ c++
+ if !s.nextChar() {
+ break
+ }
+ }
+ return s.text[i : i+c]
+}
+
+func isName(r rune) bool {
+ return string(r) != ":" && string(r) != "/" &&
+ (unicode.Is(first, r) || unicode.Is(second, r) || string(r) == "*")
+}
+
+func isDigit(r rune) bool {
+ return unicode.IsDigit(r)
+}
+
+func asItemType(r rune) itemType {
+ switch r {
+ case ',':
+ return itemComma
+ case '@':
+ return itemAt
+ case '(':
+ return itemLParens
+ case ')':
+ return itemRParens
+ case '|':
+ return itemUnion
+ case '*':
+ return itemStar
+ case '[':
+ return itemLBracket
+ case ']':
+ return itemRBracket
+ case '+':
+ return itemPlus
+ case '-':
+ return itemMinus
+ case '=':
+ return itemEq
+ case '$':
+ return itemDollar
+ }
+ panic(fmt.Errorf("unknown item: %v", r))
+}
+
+var first = &unicode.RangeTable{
+ R16: []unicode.Range16{
+ {0x003A, 0x003A, 1},
+ {0x0041, 0x005A, 1},
+ {0x005F, 0x005F, 1},
+ {0x0061, 0x007A, 1},
+ {0x00C0, 0x00D6, 1},
+ {0x00D8, 0x00F6, 1},
+ {0x00F8, 0x00FF, 1},
+ {0x0100, 0x0131, 1},
+ {0x0134, 0x013E, 1},
+ {0x0141, 0x0148, 1},
+ {0x014A, 0x017E, 1},
+ {0x0180, 0x01C3, 1},
+ {0x01CD, 0x01F0, 1},
+ {0x01F4, 0x01F5, 1},
+ {0x01FA, 0x0217, 1},
+ {0x0250, 0x02A8, 1},
+ {0x02BB, 0x02C1, 1},
+ {0x0386, 0x0386, 1},
+ {0x0388, 0x038A, 1},
+ {0x038C, 0x038C, 1},
+ {0x038E, 0x03A1, 1},
+ {0x03A3, 0x03CE, 1},
+ {0x03D0, 0x03D6, 1},
+ {0x03DA, 0x03E0, 2},
+ {0x03E2, 0x03F3, 1},
+ {0x0401, 0x040C, 1},
+ {0x040E, 0x044F, 1},
+ {0x0451, 0x045C, 1},
+ {0x045E, 0x0481, 1},
+ {0x0490, 0x04C4, 1},
+ {0x04C7, 0x04C8, 1},
+ {0x04CB, 0x04CC, 1},
+ {0x04D0, 0x04EB, 1},
+ {0x04EE, 0x04F5, 1},
+ {0x04F8, 0x04F9, 1},
+ {0x0531, 0x0556, 1},
+ {0x0559, 0x0559, 1},
+ {0x0561, 0x0586, 1},
+ {0x05D0, 0x05EA, 1},
+ {0x05F0, 0x05F2, 1},
+ {0x0621, 0x063A, 1},
+ {0x0641, 0x064A, 1},
+ {0x0671, 0x06B7, 1},
+ {0x06BA, 0x06BE, 1},
+ {0x06C0, 0x06CE, 1},
+ {0x06D0, 0x06D3, 1},
+ {0x06D5, 0x06D5, 1},
+ {0x06E5, 0x06E6, 1},
+ {0x0905, 0x0939, 1},
+ {0x093D, 0x093D, 1},
+ {0x0958, 0x0961, 1},
+ {0x0985, 0x098C, 1},
+ {0x098F, 0x0990, 1},
+ {0x0993, 0x09A8, 1},
+ {0x09AA, 0x09B0, 1},
+ {0x09B2, 0x09B2, 1},
+ {0x09B6, 0x09B9, 1},
+ {0x09DC, 0x09DD, 1},
+ {0x09DF, 0x09E1, 1},
+ {0x09F0, 0x09F1, 1},
+ {0x0A05, 0x0A0A, 1},
+ {0x0A0F, 0x0A10, 1},
+ {0x0A13, 0x0A28, 1},
+ {0x0A2A, 0x0A30, 1},
+ {0x0A32, 0x0A33, 1},
+ {0x0A35, 0x0A36, 1},
+ {0x0A38, 0x0A39, 1},
+ {0x0A59, 0x0A5C, 1},
+ {0x0A5E, 0x0A5E, 1},
+ {0x0A72, 0x0A74, 1},
+ {0x0A85, 0x0A8B, 1},
+ {0x0A8D, 0x0A8D, 1},
+ {0x0A8F, 0x0A91, 1},
+ {0x0A93, 0x0AA8, 1},
+ {0x0AAA, 0x0AB0, 1},
+ {0x0AB2, 0x0AB3, 1},
+ {0x0AB5, 0x0AB9, 1},
+ {0x0ABD, 0x0AE0, 0x23},
+ {0x0B05, 0x0B0C, 1},
+ {0x0B0F, 0x0B10, 1},
+ {0x0B13, 0x0B28, 1},
+ {0x0B2A, 0x0B30, 1},
+ {0x0B32, 0x0B33, 1},
+ {0x0B36, 0x0B39, 1},
+ {0x0B3D, 0x0B3D, 1},
+ {0x0B5C, 0x0B5D, 1},
+ {0x0B5F, 0x0B61, 1},
+ {0x0B85, 0x0B8A, 1},
+ {0x0B8E, 0x0B90, 1},
+ {0x0B92, 0x0B95, 1},
+ {0x0B99, 0x0B9A, 1},
+ {0x0B9C, 0x0B9C, 1},
+ {0x0B9E, 0x0B9F, 1},
+ {0x0BA3, 0x0BA4, 1},
+ {0x0BA8, 0x0BAA, 1},
+ {0x0BAE, 0x0BB5, 1},
+ {0x0BB7, 0x0BB9, 1},
+ {0x0C05, 0x0C0C, 1},
+ {0x0C0E, 0x0C10, 1},
+ {0x0C12, 0x0C28, 1},
+ {0x0C2A, 0x0C33, 1},
+ {0x0C35, 0x0C39, 1},
+ {0x0C60, 0x0C61, 1},
+ {0x0C85, 0x0C8C, 1},
+ {0x0C8E, 0x0C90, 1},
+ {0x0C92, 0x0CA8, 1},
+ {0x0CAA, 0x0CB3, 1},
+ {0x0CB5, 0x0CB9, 1},
+ {0x0CDE, 0x0CDE, 1},
+ {0x0CE0, 0x0CE1, 1},
+ {0x0D05, 0x0D0C, 1},
+ {0x0D0E, 0x0D10, 1},
+ {0x0D12, 0x0D28, 1},
+ {0x0D2A, 0x0D39, 1},
+ {0x0D60, 0x0D61, 1},
+ {0x0E01, 0x0E2E, 1},
+ {0x0E30, 0x0E30, 1},
+ {0x0E32, 0x0E33, 1},
+ {0x0E40, 0x0E45, 1},
+ {0x0E81, 0x0E82, 1},
+ {0x0E84, 0x0E84, 1},
+ {0x0E87, 0x0E88, 1},
+ {0x0E8A, 0x0E8D, 3},
+ {0x0E94, 0x0E97, 1},
+ {0x0E99, 0x0E9F, 1},
+ {0x0EA1, 0x0EA3, 1},
+ {0x0EA5, 0x0EA7, 2},
+ {0x0EAA, 0x0EAB, 1},
+ {0x0EAD, 0x0EAE, 1},
+ {0x0EB0, 0x0EB0, 1},
+ {0x0EB2, 0x0EB3, 1},
+ {0x0EBD, 0x0EBD, 1},
+ {0x0EC0, 0x0EC4, 1},
+ {0x0F40, 0x0F47, 1},
+ {0x0F49, 0x0F69, 1},
+ {0x10A0, 0x10C5, 1},
+ {0x10D0, 0x10F6, 1},
+ {0x1100, 0x1100, 1},
+ {0x1102, 0x1103, 1},
+ {0x1105, 0x1107, 1},
+ {0x1109, 0x1109, 1},
+ {0x110B, 0x110C, 1},
+ {0x110E, 0x1112, 1},
+ {0x113C, 0x1140, 2},
+ {0x114C, 0x1150, 2},
+ {0x1154, 0x1155, 1},
+ {0x1159, 0x1159, 1},
+ {0x115F, 0x1161, 1},
+ {0x1163, 0x1169, 2},
+ {0x116D, 0x116E, 1},
+ {0x1172, 0x1173, 1},
+ {0x1175, 0x119E, 0x119E - 0x1175},
+ {0x11A8, 0x11AB, 0x11AB - 0x11A8},
+ {0x11AE, 0x11AF, 1},
+ {0x11B7, 0x11B8, 1},
+ {0x11BA, 0x11BA, 1},
+ {0x11BC, 0x11C2, 1},
+ {0x11EB, 0x11F0, 0x11F0 - 0x11EB},
+ {0x11F9, 0x11F9, 1},
+ {0x1E00, 0x1E9B, 1},
+ {0x1EA0, 0x1EF9, 1},
+ {0x1F00, 0x1F15, 1},
+ {0x1F18, 0x1F1D, 1},
+ {0x1F20, 0x1F45, 1},
+ {0x1F48, 0x1F4D, 1},
+ {0x1F50, 0x1F57, 1},
+ {0x1F59, 0x1F5B, 0x1F5B - 0x1F59},
+ {0x1F5D, 0x1F5D, 1},
+ {0x1F5F, 0x1F7D, 1},
+ {0x1F80, 0x1FB4, 1},
+ {0x1FB6, 0x1FBC, 1},
+ {0x1FBE, 0x1FBE, 1},
+ {0x1FC2, 0x1FC4, 1},
+ {0x1FC6, 0x1FCC, 1},
+ {0x1FD0, 0x1FD3, 1},
+ {0x1FD6, 0x1FDB, 1},
+ {0x1FE0, 0x1FEC, 1},
+ {0x1FF2, 0x1FF4, 1},
+ {0x1FF6, 0x1FFC, 1},
+ {0x2126, 0x2126, 1},
+ {0x212A, 0x212B, 1},
+ {0x212E, 0x212E, 1},
+ {0x2180, 0x2182, 1},
+ {0x3007, 0x3007, 1},
+ {0x3021, 0x3029, 1},
+ {0x3041, 0x3094, 1},
+ {0x30A1, 0x30FA, 1},
+ {0x3105, 0x312C, 1},
+ {0x4E00, 0x9FA5, 1},
+ {0xAC00, 0xD7A3, 1},
+ },
+}
+
+var second = &unicode.RangeTable{
+ R16: []unicode.Range16{
+ {0x002D, 0x002E, 1},
+ {0x0030, 0x0039, 1},
+ {0x00B7, 0x00B7, 1},
+ {0x02D0, 0x02D1, 1},
+ {0x0300, 0x0345, 1},
+ {0x0360, 0x0361, 1},
+ {0x0387, 0x0387, 1},
+ {0x0483, 0x0486, 1},
+ {0x0591, 0x05A1, 1},
+ {0x05A3, 0x05B9, 1},
+ {0x05BB, 0x05BD, 1},
+ {0x05BF, 0x05BF, 1},
+ {0x05C1, 0x05C2, 1},
+ {0x05C4, 0x0640, 0x0640 - 0x05C4},
+ {0x064B, 0x0652, 1},
+ {0x0660, 0x0669, 1},
+ {0x0670, 0x0670, 1},
+ {0x06D6, 0x06DC, 1},
+ {0x06DD, 0x06DF, 1},
+ {0x06E0, 0x06E4, 1},
+ {0x06E7, 0x06E8, 1},
+ {0x06EA, 0x06ED, 1},
+ {0x06F0, 0x06F9, 1},
+ {0x0901, 0x0903, 1},
+ {0x093C, 0x093C, 1},
+ {0x093E, 0x094C, 1},
+ {0x094D, 0x094D, 1},
+ {0x0951, 0x0954, 1},
+ {0x0962, 0x0963, 1},
+ {0x0966, 0x096F, 1},
+ {0x0981, 0x0983, 1},
+ {0x09BC, 0x09BC, 1},
+ {0x09BE, 0x09BF, 1},
+ {0x09C0, 0x09C4, 1},
+ {0x09C7, 0x09C8, 1},
+ {0x09CB, 0x09CD, 1},
+ {0x09D7, 0x09D7, 1},
+ {0x09E2, 0x09E3, 1},
+ {0x09E6, 0x09EF, 1},
+ {0x0A02, 0x0A3C, 0x3A},
+ {0x0A3E, 0x0A3F, 1},
+ {0x0A40, 0x0A42, 1},
+ {0x0A47, 0x0A48, 1},
+ {0x0A4B, 0x0A4D, 1},
+ {0x0A66, 0x0A6F, 1},
+ {0x0A70, 0x0A71, 1},
+ {0x0A81, 0x0A83, 1},
+ {0x0ABC, 0x0ABC, 1},
+ {0x0ABE, 0x0AC5, 1},
+ {0x0AC7, 0x0AC9, 1},
+ {0x0ACB, 0x0ACD, 1},
+ {0x0AE6, 0x0AEF, 1},
+ {0x0B01, 0x0B03, 1},
+ {0x0B3C, 0x0B3C, 1},
+ {0x0B3E, 0x0B43, 1},
+ {0x0B47, 0x0B48, 1},
+ {0x0B4B, 0x0B4D, 1},
+ {0x0B56, 0x0B57, 1},
+ {0x0B66, 0x0B6F, 1},
+ {0x0B82, 0x0B83, 1},
+ {0x0BBE, 0x0BC2, 1},
+ {0x0BC6, 0x0BC8, 1},
+ {0x0BCA, 0x0BCD, 1},
+ {0x0BD7, 0x0BD7, 1},
+ {0x0BE7, 0x0BEF, 1},
+ {0x0C01, 0x0C03, 1},
+ {0x0C3E, 0x0C44, 1},
+ {0x0C46, 0x0C48, 1},
+ {0x0C4A, 0x0C4D, 1},
+ {0x0C55, 0x0C56, 1},
+ {0x0C66, 0x0C6F, 1},
+ {0x0C82, 0x0C83, 1},
+ {0x0CBE, 0x0CC4, 1},
+ {0x0CC6, 0x0CC8, 1},
+ {0x0CCA, 0x0CCD, 1},
+ {0x0CD5, 0x0CD6, 1},
+ {0x0CE6, 0x0CEF, 1},
+ {0x0D02, 0x0D03, 1},
+ {0x0D3E, 0x0D43, 1},
+ {0x0D46, 0x0D48, 1},
+ {0x0D4A, 0x0D4D, 1},
+ {0x0D57, 0x0D57, 1},
+ {0x0D66, 0x0D6F, 1},
+ {0x0E31, 0x0E31, 1},
+ {0x0E34, 0x0E3A, 1},
+ {0x0E46, 0x0E46, 1},
+ {0x0E47, 0x0E4E, 1},
+ {0x0E50, 0x0E59, 1},
+ {0x0EB1, 0x0EB1, 1},
+ {0x0EB4, 0x0EB9, 1},
+ {0x0EBB, 0x0EBC, 1},
+ {0x0EC6, 0x0EC6, 1},
+ {0x0EC8, 0x0ECD, 1},
+ {0x0ED0, 0x0ED9, 1},
+ {0x0F18, 0x0F19, 1},
+ {0x0F20, 0x0F29, 1},
+ {0x0F35, 0x0F39, 2},
+ {0x0F3E, 0x0F3F, 1},
+ {0x0F71, 0x0F84, 1},
+ {0x0F86, 0x0F8B, 1},
+ {0x0F90, 0x0F95, 1},
+ {0x0F97, 0x0F97, 1},
+ {0x0F99, 0x0FAD, 1},
+ {0x0FB1, 0x0FB7, 1},
+ {0x0FB9, 0x0FB9, 1},
+ {0x20D0, 0x20DC, 1},
+ {0x20E1, 0x3005, 0x3005 - 0x20E1},
+ {0x302A, 0x302F, 1},
+ {0x3031, 0x3035, 1},
+ {0x3099, 0x309A, 1},
+ {0x309D, 0x309E, 1},
+ {0x30FC, 0x30FE, 1},
+ },
+}
diff --git a/vendor/github.com/antchfx/xpath/query.go b/vendor/github.com/antchfx/xpath/query.go
new file mode 100644
index 000000000..b076973c8
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/query.go
@@ -0,0 +1,728 @@
+package xpath
+
+import (
+ "reflect"
+)
+
+type iterator interface {
+ Current() NodeNavigator
+}
+
+// An XPath query interface.
+type query interface {
+ // Select traversing iterator returns a query matched node NodeNavigator.
+ Select(iterator) NodeNavigator
+
+ // Evaluate evaluates query and returns values of the current query.
+ Evaluate(iterator) interface{}
+
+ Clone() query
+}
+
+// contextQuery is returns current node on the iterator object query.
+type contextQuery struct {
+ count int
+ Root bool // Moving to root-level node in the current context iterator.
+}
+
+func (c *contextQuery) Select(t iterator) (n NodeNavigator) {
+ if c.count == 0 {
+ c.count++
+ n = t.Current().Copy()
+ if c.Root {
+ n.MoveToRoot()
+ }
+ }
+ return n
+}
+
+func (c *contextQuery) Evaluate(iterator) interface{} {
+ c.count = 0
+ return c
+}
+
+func (c *contextQuery) Clone() query {
+ return &contextQuery{count: 0, Root: c.Root}
+}
+
+// ancestorQuery is an XPath ancestor node query.(ancestor::*|ancestor-self::*)
+type ancestorQuery struct {
+ iterator func() NodeNavigator
+
+ Self bool
+ Input query
+ Predicate func(NodeNavigator) bool
+}
+
+func (a *ancestorQuery) Select(t iterator) NodeNavigator {
+ for {
+ if a.iterator == nil {
+ node := a.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ first := true
+ a.iterator = func() NodeNavigator {
+ if first && a.Self {
+ first = false
+ if a.Predicate(node) {
+ return node
+ }
+ }
+ for node.MoveToParent() {
+ if !a.Predicate(node) {
+ break
+ }
+ return node
+ }
+ return nil
+ }
+ }
+
+ if node := a.iterator(); node != nil {
+ return node
+ }
+ a.iterator = nil
+ }
+}
+
+func (a *ancestorQuery) Evaluate(t iterator) interface{} {
+ a.Input.Evaluate(t)
+ a.iterator = nil
+ return a
+}
+
+func (a *ancestorQuery) Test(n NodeNavigator) bool {
+ return a.Predicate(n)
+}
+
+func (a *ancestorQuery) Clone() query {
+ return &ancestorQuery{Self: a.Self, Input: a.Input.Clone(), Predicate: a.Predicate}
+}
+
+// attributeQuery is an XPath attribute node query.(@*)
+type attributeQuery struct {
+ iterator func() NodeNavigator
+
+ Input query
+ Predicate func(NodeNavigator) bool
+}
+
+func (a *attributeQuery) Select(t iterator) NodeNavigator {
+ for {
+ if a.iterator == nil {
+ node := a.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ node = node.Copy()
+ a.iterator = func() NodeNavigator {
+ for {
+ onAttr := node.MoveToNextAttribute()
+ if !onAttr {
+ return nil
+ }
+ if a.Predicate(node) {
+ return node
+ }
+ }
+ }
+ }
+
+ if node := a.iterator(); node != nil {
+ return node
+ }
+ a.iterator = nil
+ }
+}
+
+func (a *attributeQuery) Evaluate(t iterator) interface{} {
+ a.Input.Evaluate(t)
+ a.iterator = nil
+ return a
+}
+
+func (a *attributeQuery) Test(n NodeNavigator) bool {
+ return a.Predicate(n)
+}
+
+func (a *attributeQuery) Clone() query {
+ return &attributeQuery{Input: a.Input.Clone(), Predicate: a.Predicate}
+}
+
+// childQuery is an XPath child node query.(child::*)
+type childQuery struct {
+ posit int
+ iterator func() NodeNavigator
+
+ Input query
+ Predicate func(NodeNavigator) bool
+}
+
+func (c *childQuery) Select(t iterator) NodeNavigator {
+ for {
+ if c.iterator == nil {
+ c.posit = 0
+ node := c.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ node = node.Copy()
+ first := true
+ c.iterator = func() NodeNavigator {
+ for {
+ if (first && !node.MoveToChild()) || (!first && !node.MoveToNext()) {
+ return nil
+ }
+ first = false
+ if c.Predicate(node) {
+ return node
+ }
+ }
+ }
+ }
+
+ if node := c.iterator(); node != nil {
+ c.posit++
+ return node
+ }
+ c.iterator = nil
+ }
+}
+
+func (c *childQuery) Evaluate(t iterator) interface{} {
+ c.Input.Evaluate(t)
+ c.iterator = nil
+ return c
+}
+
+func (c *childQuery) Test(n NodeNavigator) bool {
+ return c.Predicate(n)
+}
+
+func (c *childQuery) Clone() query {
+ return &childQuery{Input: c.Input.Clone(), Predicate: c.Predicate}
+}
+
+// position returns a position of current NodeNavigator.
+func (c *childQuery) position() int {
+ return c.posit
+}
+
+// descendantQuery is an XPath descendant node query.(descendant::* | descendant-or-self::*)
+type descendantQuery struct {
+ iterator func() NodeNavigator
+ posit int
+
+ Self bool
+ Input query
+ Predicate func(NodeNavigator) bool
+}
+
+func (d *descendantQuery) Select(t iterator) NodeNavigator {
+ for {
+ if d.iterator == nil {
+ d.posit = 0
+ node := d.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ node = node.Copy()
+ level := 0
+ first := true
+ d.iterator = func() NodeNavigator {
+ if first && d.Self {
+ first = false
+ if d.Predicate(node) {
+ return node
+ }
+ }
+
+ for {
+ if node.MoveToChild() {
+ level++
+ } else {
+ for {
+ if level == 0 {
+ return nil
+ }
+ if node.MoveToNext() {
+ break
+ }
+ node.MoveToParent()
+ level--
+ }
+ }
+ if d.Predicate(node) {
+ return node
+ }
+ }
+ }
+ }
+
+ if node := d.iterator(); node != nil {
+ d.posit++
+ return node
+ }
+ d.iterator = nil
+ }
+}
+
+func (d *descendantQuery) Evaluate(t iterator) interface{} {
+ d.Input.Evaluate(t)
+ d.iterator = nil
+ return d
+}
+
+func (d *descendantQuery) Test(n NodeNavigator) bool {
+ return d.Predicate(n)
+}
+
+// position returns a position of current NodeNavigator.
+func (d *descendantQuery) position() int {
+ return d.posit
+}
+
+func (d *descendantQuery) Clone() query {
+ return &descendantQuery{Self: d.Self, Input: d.Input.Clone(), Predicate: d.Predicate}
+}
+
+// followingQuery is an XPath following node query.(following::*|following-sibling::*)
+type followingQuery struct {
+ iterator func() NodeNavigator
+
+ Input query
+ Sibling bool // The matching sibling node of current node.
+ Predicate func(NodeNavigator) bool
+}
+
+func (f *followingQuery) Select(t iterator) NodeNavigator {
+ for {
+ if f.iterator == nil {
+ node := f.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ node = node.Copy()
+ if f.Sibling {
+ f.iterator = func() NodeNavigator {
+ for {
+ if !node.MoveToNext() {
+ return nil
+ }
+ if f.Predicate(node) {
+ return node
+ }
+ }
+ }
+ } else {
+ var q query // descendant query
+ f.iterator = func() NodeNavigator {
+ for {
+ if q == nil {
+ for !node.MoveToNext() {
+ if !node.MoveToParent() {
+ return nil
+ }
+ }
+ q = &descendantQuery{
+ Self: true,
+ Input: &contextQuery{},
+ Predicate: f.Predicate,
+ }
+ t.Current().MoveTo(node)
+ }
+ if node := q.Select(t); node != nil {
+ return node
+ }
+ q = nil
+ }
+ }
+ }
+ }
+
+ if node := f.iterator(); node != nil {
+ return node
+ }
+ f.iterator = nil
+ }
+}
+
+func (f *followingQuery) Evaluate(t iterator) interface{} {
+ f.Input.Evaluate(t)
+ return f
+}
+
+func (f *followingQuery) Test(n NodeNavigator) bool {
+ return f.Predicate(n)
+}
+
+func (f *followingQuery) Clone() query {
+ return &followingQuery{Input: f.Input.Clone(), Sibling: f.Sibling, Predicate: f.Predicate}
+}
+
+// precedingQuery is an XPath preceding node query.(preceding::*)
+type precedingQuery struct {
+ iterator func() NodeNavigator
+ Input query
+ Sibling bool // The matching sibling node of current node.
+ Predicate func(NodeNavigator) bool
+}
+
+func (p *precedingQuery) Select(t iterator) NodeNavigator {
+ for {
+ if p.iterator == nil {
+ node := p.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ node = node.Copy()
+ if p.Sibling {
+ p.iterator = func() NodeNavigator {
+ for {
+ for !node.MoveToPrevious() {
+ return nil
+ }
+ if p.Predicate(node) {
+ return node
+ }
+ }
+ }
+ } else {
+ var q query
+ p.iterator = func() NodeNavigator {
+ for {
+ if q == nil {
+ for !node.MoveToPrevious() {
+ if !node.MoveToParent() {
+ return nil
+ }
+ }
+ q = &descendantQuery{
+ Self: true,
+ Input: &contextQuery{},
+ Predicate: p.Predicate,
+ }
+ t.Current().MoveTo(node)
+ }
+ if node := q.Select(t); node != nil {
+ return node
+ }
+ q = nil
+ }
+ }
+ }
+ }
+ if node := p.iterator(); node != nil {
+ return node
+ }
+ p.iterator = nil
+ }
+}
+
+func (p *precedingQuery) Evaluate(t iterator) interface{} {
+ p.Input.Evaluate(t)
+ return p
+}
+
+func (p *precedingQuery) Test(n NodeNavigator) bool {
+ return p.Predicate(n)
+}
+
+func (p *precedingQuery) Clone() query {
+ return &precedingQuery{Input: p.Input.Clone(), Sibling: p.Sibling, Predicate: p.Predicate}
+}
+
+// parentQuery is an XPath parent node query.(parent::*)
+type parentQuery struct {
+ Input query
+ Predicate func(NodeNavigator) bool
+}
+
+func (p *parentQuery) Select(t iterator) NodeNavigator {
+ for {
+ node := p.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+ node = node.Copy()
+ if node.MoveToParent() && p.Predicate(node) {
+ return node
+ }
+ }
+}
+
+func (p *parentQuery) Evaluate(t iterator) interface{} {
+ p.Input.Evaluate(t)
+ return p
+}
+
+func (p *parentQuery) Clone() query {
+ return &parentQuery{Input: p.Input.Clone(), Predicate: p.Predicate}
+}
+
+func (p *parentQuery) Test(n NodeNavigator) bool {
+ return p.Predicate(n)
+}
+
+// selfQuery is an Self node query.(self::*)
+type selfQuery struct {
+ Input query
+ Predicate func(NodeNavigator) bool
+}
+
+func (s *selfQuery) Select(t iterator) NodeNavigator {
+ for {
+ node := s.Input.Select(t)
+ if node == nil {
+ return nil
+ }
+
+ if s.Predicate(node) {
+ return node
+ }
+ }
+}
+
+func (s *selfQuery) Evaluate(t iterator) interface{} {
+ s.Input.Evaluate(t)
+ return s
+}
+
+func (s *selfQuery) Test(n NodeNavigator) bool {
+ return s.Predicate(n)
+}
+
+func (s *selfQuery) Clone() query {
+ return &selfQuery{Input: s.Input.Clone(), Predicate: s.Predicate}
+}
+
+// filterQuery is an XPath query for predicate filter.
+type filterQuery struct {
+ Input query
+ Predicate query
+}
+
+func (f *filterQuery) do(t iterator) bool {
+ val := reflect.ValueOf(f.Predicate.Evaluate(t))
+ switch val.Kind() {
+ case reflect.Bool:
+ return val.Bool()
+ case reflect.String:
+ return len(val.String()) > 0
+ case reflect.Float64:
+ pt := float64(getNodePosition(f.Input))
+ return int(val.Float()) == int(pt)
+ default:
+ if q, ok := f.Predicate.(query); ok {
+ return q.Select(t) != nil
+ }
+ }
+ return false
+}
+
+func (f *filterQuery) Select(t iterator) NodeNavigator {
+ for {
+ node := f.Input.Select(t)
+ if node == nil {
+ return node
+ }
+ node = node.Copy()
+ //fmt.Println(node.LocalName())
+
+ t.Current().MoveTo(node)
+ if f.do(t) {
+ return node
+ }
+ }
+}
+
+func (f *filterQuery) Evaluate(t iterator) interface{} {
+ f.Input.Evaluate(t)
+ return f
+}
+
+func (f *filterQuery) Clone() query {
+ return &filterQuery{Input: f.Input.Clone(), Predicate: f.Predicate.Clone()}
+}
+
+// functionQuery is an XPath function that call a function to returns
+// value of current NodeNavigator node.
+type functionQuery struct {
+ Input query // Node Set
+ Func func(query, iterator) interface{} // The xpath function.
+}
+
+func (f *functionQuery) Select(t iterator) NodeNavigator {
+ return nil
+}
+
+// Evaluate call a specified function that will returns the
+// following value type: number,string,boolean.
+func (f *functionQuery) Evaluate(t iterator) interface{} {
+ return f.Func(f.Input, t)
+}
+
+func (f *functionQuery) Clone() query {
+ return &functionQuery{Input: f.Input.Clone(), Func: f.Func}
+}
+
+// constantQuery is an XPath constant operand.
+type constantQuery struct {
+ Val interface{}
+}
+
+func (c *constantQuery) Select(t iterator) NodeNavigator {
+ return nil
+}
+
+func (c *constantQuery) Evaluate(t iterator) interface{} {
+ return c.Val
+}
+
+func (c *constantQuery) Clone() query {
+ return c
+}
+
+// logicalQuery is an XPath logical expression.
+type logicalQuery struct {
+ Left, Right query
+
+ Do func(iterator, interface{}, interface{}) interface{}
+}
+
+func (l *logicalQuery) Select(t iterator) NodeNavigator {
+ // When a XPath expr is logical expression.
+ node := t.Current().Copy()
+ val := l.Evaluate(t)
+ switch val.(type) {
+ case bool:
+ if val.(bool) == true {
+ return node
+ }
+ }
+ return nil
+}
+
+func (l *logicalQuery) Evaluate(t iterator) interface{} {
+ m := l.Left.Evaluate(t)
+ n := l.Right.Evaluate(t)
+ return l.Do(t, m, n)
+}
+
+func (l *logicalQuery) Clone() query {
+ return &logicalQuery{Left: l.Left.Clone(), Right: l.Right.Clone(), Do: l.Do}
+}
+
+// numericQuery is an XPath numeric operator expression.
+type numericQuery struct {
+ Left, Right query
+
+ Do func(interface{}, interface{}) interface{}
+}
+
+func (n *numericQuery) Select(t iterator) NodeNavigator {
+ return nil
+}
+
+func (n *numericQuery) Evaluate(t iterator) interface{} {
+ m := n.Left.Evaluate(t)
+ k := n.Right.Evaluate(t)
+ return n.Do(m, k)
+}
+
+func (n *numericQuery) Clone() query {
+ return &numericQuery{Left: n.Left.Clone(), Right: n.Right.Clone(), Do: n.Do}
+}
+
+type booleanQuery struct {
+ IsOr bool
+ Left, Right query
+ iterator func() NodeNavigator
+}
+
+func (b *booleanQuery) Select(t iterator) NodeNavigator {
+ if b.iterator == nil {
+ var list []NodeNavigator
+ i := 0
+ root := t.Current().Copy()
+ if b.IsOr {
+ for {
+ node := b.Left.Select(t)
+ if node == nil {
+ break
+ }
+ node = node.Copy()
+ list = append(list, node)
+ }
+ t.Current().MoveTo(root)
+ for {
+ node := b.Right.Select(t)
+ if node == nil {
+ break
+ }
+ node = node.Copy()
+ list = append(list, node)
+ }
+ } else {
+ var m []NodeNavigator
+ var n []NodeNavigator
+ for {
+ node := b.Left.Select(t)
+ if node == nil {
+ break
+ }
+ node = node.Copy()
+ list = append(m, node)
+ }
+ t.Current().MoveTo(root)
+ for {
+ node := b.Right.Select(t)
+ if node == nil {
+ break
+ }
+ node = node.Copy()
+ list = append(n, node)
+ }
+ for _, k := range m {
+ for _, j := range n {
+ if k == j {
+ list = append(list, k)
+ }
+ }
+ }
+ }
+
+ b.iterator = func() NodeNavigator {
+ if i >= len(list) {
+ return nil
+ }
+ node := list[i]
+ i++
+ return node
+ }
+ }
+ return b.iterator()
+}
+
+func (b *booleanQuery) Evaluate(t iterator) interface{} {
+ m := b.Left.Evaluate(t)
+ if m.(bool) == b.IsOr {
+ return m
+ }
+ return b.Right.Evaluate(t)
+}
+
+func (b *booleanQuery) Clone() query {
+ return &booleanQuery{IsOr: b.IsOr, Left: b.Left.Clone(), Right: b.Right.Clone()}
+}
+
+func getNodePosition(q query) int {
+ type Position interface {
+ position() int
+ }
+ if count, ok := q.(Position); ok {
+ return count.position()
+ }
+ return 1
+}
diff --git a/vendor/github.com/antchfx/xpath/xpath.go b/vendor/github.com/antchfx/xpath/xpath.go
new file mode 100644
index 000000000..4460c3777
--- /dev/null
+++ b/vendor/github.com/antchfx/xpath/xpath.go
@@ -0,0 +1,154 @@
+package xpath
+
+import (
+ "errors"
+)
+
+// NodeType represents a type of XPath node.
+type NodeType int
+
+const (
+ // RootNode is a root node of the XML document or node tree.
+ RootNode NodeType = iota
+
+ // ElementNode is an element, such as .
+ ElementNode
+
+ // AttributeNode is an attribute, such as id='123'.
+ AttributeNode
+
+ // TextNode is the text content of a node.
+ TextNode
+
+ // CommentNode is a comment node, such as
+ CommentNode
+)
+
+// NodeNavigator provides cursor model for navigating XML data.
+type NodeNavigator interface {
+ // NodeType returns the XPathNodeType of the current node.
+ NodeType() NodeType
+
+ // LocalName gets the Name of the current node.
+ LocalName() string
+
+ // Prefix returns namespace prefix associated with the current node.
+ Prefix() string
+
+ // Value gets the value of current node.
+ Value() string
+
+ // Copy does a deep copy of the NodeNavigator and all its components.
+ Copy() NodeNavigator
+
+ // MoveToRoot moves the NodeNavigator to the root node of the current node.
+ MoveToRoot()
+
+ // MoveToParent moves the NodeNavigator to the parent node of the current node.
+ MoveToParent() bool
+
+ // MoveToNextAttribute moves the NodeNavigator to the next attribute on current node.
+ MoveToNextAttribute() bool
+
+ // MoveToChild moves the NodeNavigator to the first child node of the current node.
+ MoveToChild() bool
+
+ // MoveToFirst moves the NodeNavigator to the first sibling node of the current node.
+ MoveToFirst() bool
+
+ // MoveToNext moves the NodeNavigator to the next sibling node of the current node.
+ MoveToNext() bool
+
+ // MoveToPrevious moves the NodeNavigator to the previous sibling node of the current node.
+ MoveToPrevious() bool
+
+ // MoveTo moves the NodeNavigator to the same position as the specified NodeNavigator.
+ MoveTo(NodeNavigator) bool
+}
+
+// NodeIterator holds all matched Node object.
+type NodeIterator struct {
+ node NodeNavigator
+ query query
+}
+
+// Current returns current node which matched.
+func (t *NodeIterator) Current() NodeNavigator {
+ return t.node
+}
+
+// MoveNext moves Navigator to the next match node.
+func (t *NodeIterator) MoveNext() bool {
+ n := t.query.Select(t)
+ if n != nil {
+ if !t.node.MoveTo(n) {
+ t.node = n.Copy()
+ }
+ return true
+ }
+ return false
+}
+
+// Select selects a node set using the specified XPath expression.
+// This method is deprecated, recommend using Expr.Select() method instead.
+func Select(root NodeNavigator, expr string) *NodeIterator {
+ exp, err := Compile(expr)
+ if err != nil {
+ panic(err)
+ }
+ return exp.Select(root)
+}
+
+// Expr is an XPath expression for query.
+type Expr struct {
+ s string
+ q query
+}
+
+type iteratorFunc func() NodeNavigator
+
+func (f iteratorFunc) Current() NodeNavigator {
+ return f()
+}
+
+// Evaluate returns the result of the expression.
+// The result type of the expression is one of the follow: bool,float64,string,NodeIterator).
+func (expr *Expr) Evaluate(root NodeNavigator) interface{} {
+ val := expr.q.Evaluate(iteratorFunc(func() NodeNavigator { return root }))
+ switch val.(type) {
+ case query:
+ return &NodeIterator{query: expr.q.Clone(), node: root}
+ }
+ return val
+}
+
+// Select selects a node set using the specified XPath expression.
+func (expr *Expr) Select(root NodeNavigator) *NodeIterator {
+ return &NodeIterator{query: expr.q.Clone(), node: root}
+}
+
+// String returns XPath expression string.
+func (expr *Expr) String() string {
+ return expr.s
+}
+
+// Compile compiles an XPath expression string.
+func Compile(expr string) (*Expr, error) {
+ if expr == "" {
+ return nil, errors.New("expr expression is nil")
+ }
+ qy, err := build(expr)
+ if err != nil {
+ return nil, err
+ }
+ return &Expr{s: expr, q: qy}, nil
+}
+
+// MustCompile compiles an XPath expression string and ignored error.
+func MustCompile(expr string) *Expr {
+ exp, err := Compile(expr)
+ if err != nil {
+ return nil
+ }
+ return exp
+}
diff --git a/vendor/github.com/antchfx/xquery/LICENSE b/vendor/github.com/antchfx/xquery/LICENSE
new file mode 100644
index 000000000..e14c37141
--- /dev/null
+++ b/vendor/github.com/antchfx/xquery/LICENSE
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xquery/xml/node.go b/vendor/github.com/antchfx/xquery/xml/node.go
new file mode 100644
index 000000000..064d1cdd8
--- /dev/null
+++ b/vendor/github.com/antchfx/xquery/xml/node.go
@@ -0,0 +1,252 @@
+package xmlquery
+
+import (
+ "bytes"
+ "encoding/xml"
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+
+ "golang.org/x/net/html/charset"
+)
+
+// A NodeType is the type of a Node.
+type NodeType uint
+
+const (
+ // DocumentNode is a document object that, as the root of the document tree,
+ // provides access to the entire XML document.
+ DocumentNode NodeType = iota
+ // DeclarationNode is the document type declaration, indicated by the following
+ // tag (for example, ).
+ DeclarationNode
+ // ElementNode is an element (for example, ).
+ ElementNode
+ // TextNode is the text content of a node.
+ TextNode
+ // CommentNode a comment (for example, ).
+ CommentNode
+)
+
+// A Node consists of a NodeType and some Data (tag name for
+// element nodes, content for text) and are part of a tree of Nodes.
+type Node struct {
+ Parent, FirstChild, LastChild, PrevSibling, NextSibling *Node
+
+ Type NodeType
+ Data string
+ Prefix string
+ NamespaceURI string
+ Attr []xml.Attr
+
+ level int // node level in the tree
+}
+
+// InnerText returns the text between the start and end tags of the object.
+func (n *Node) InnerText() string {
+ var output func(*bytes.Buffer, *Node)
+ output = func(buf *bytes.Buffer, n *Node) {
+ switch n.Type {
+ case TextNode:
+ buf.WriteString(n.Data)
+ return
+ case CommentNode:
+ return
+ }
+ for child := n.FirstChild; child != nil; child = child.NextSibling {
+ output(buf, child)
+ }
+ }
+
+ var buf bytes.Buffer
+ output(&buf, n)
+ return buf.String()
+}
+
+func outputXML(buf *bytes.Buffer, n *Node) {
+ if n.Type == TextNode || n.Type == CommentNode {
+ buf.WriteString(strings.TrimSpace(n.Data))
+ return
+ }
+ buf.WriteString("<" + n.Data)
+ for _, attr := range n.Attr {
+ if attr.Name.Space != "" {
+ buf.WriteString(fmt.Sprintf(` %s:%s="%s"`, attr.Name.Space, attr.Name.Local, attr.Value))
+ } else {
+ buf.WriteString(fmt.Sprintf(` %s="%s"`, attr.Name.Local, attr.Value))
+ }
+ }
+ buf.WriteString(">")
+ for child := n.FirstChild; child != nil; child = child.NextSibling {
+ outputXML(buf, child)
+ }
+ buf.WriteString(fmt.Sprintf("%s>", n.Data))
+}
+
+// OutputXML returns the text that including tags name.
+func (n *Node) OutputXML(self bool) string {
+ var buf bytes.Buffer
+ if self {
+ outputXML(&buf, n)
+ } else {
+ for n := n.FirstChild; n != nil; n = n.NextSibling {
+ outputXML(&buf, n)
+ }
+ }
+
+ return buf.String()
+}
+
+func addAttr(n *Node, key, val string) {
+ var attr xml.Attr
+ if i := strings.Index(key, ":"); i > 0 {
+ attr = xml.Attr{
+ Name: xml.Name{Space: key[:i], Local: key[i+1:]},
+ Value: val,
+ }
+ } else {
+ attr = xml.Attr{
+ Name: xml.Name{Local: key},
+ Value: val,
+ }
+ }
+
+ n.Attr = append(n.Attr, attr)
+}
+
+func addChild(parent, n *Node) {
+ n.Parent = parent
+ if parent.FirstChild == nil {
+ parent.FirstChild = n
+ } else {
+ parent.LastChild.NextSibling = n
+ n.PrevSibling = parent.LastChild
+ }
+
+ parent.LastChild = n
+}
+
+func addSibling(sibling, n *Node) {
+ n.Parent = sibling.Parent
+ sibling.NextSibling = n
+ n.PrevSibling = sibling
+ if sibling.Parent != nil {
+ sibling.Parent.LastChild = n
+ }
+}
+
+// LoadURL loads the XML document from the specified URL.
+func LoadURL(url string) (*Node, error) {
+ resp, err := http.Get(url)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ return parse(resp.Body)
+}
+
+func parse(r io.Reader) (*Node, error) {
+ var (
+ decoder = xml.NewDecoder(r)
+ doc = &Node{Type: DocumentNode}
+ space2prefix = make(map[string]string)
+ level = 0
+ )
+ decoder.CharsetReader = charset.NewReaderLabel
+ prev := doc
+ for {
+ tok, err := decoder.Token()
+ switch {
+ case err == io.EOF:
+ goto quit
+ case err != nil:
+ return nil, err
+ }
+
+ switch tok := tok.(type) {
+ case xml.StartElement:
+ if level == 0 {
+ // mising XML declaration
+ node := &Node{Type: DeclarationNode, Data: "xml", level: 1}
+ addChild(prev, node)
+ level = 1
+ prev = node
+ }
+ node := &Node{
+ Type: ElementNode,
+ Data: tok.Name.Local,
+ Prefix: space2prefix[tok.Name.Space],
+ NamespaceURI: tok.Name.Space,
+ Attr: tok.Attr,
+ level: level,
+ }
+ for _, att := range tok.Attr {
+ if att.Name.Space == "xmlns" {
+ space2prefix[att.Value] = att.Name.Local
+ }
+ }
+ //fmt.Println(fmt.Sprintf("start > %s : %d", node.Data, level))
+ if level == prev.level {
+ addSibling(prev, node)
+ } else if level > prev.level {
+ addChild(prev, node)
+ } else if level < prev.level {
+ for i := prev.level - level; i > 1; i-- {
+ prev = prev.Parent
+ }
+ addSibling(prev.Parent, node)
+ }
+ prev = node
+ level++
+ case xml.EndElement:
+ level--
+ case xml.CharData:
+ node := &Node{Type: TextNode, Data: string(tok), level: level}
+ if level == prev.level {
+ addSibling(prev, node)
+ } else if level > prev.level {
+ addChild(prev, node)
+ }
+ case xml.Comment:
+ node := &Node{Type: CommentNode, Data: string(tok), level: level}
+ if level == prev.level {
+ addSibling(prev, node)
+ } else if level > prev.level {
+ addChild(prev, node)
+ }
+ case xml.ProcInst: // Processing Instruction
+ if prev.Type != DeclarationNode {
+ level++
+ }
+ node := &Node{Type: DeclarationNode, Data: tok.Target, level: level}
+ pairs := strings.Split(string(tok.Inst), " ")
+ for _, pair := range pairs {
+ pair = strings.TrimSpace(pair)
+ if i := strings.Index(pair, "="); i > 0 {
+ addAttr(node, pair[:i], strings.Trim(pair[i+1:], `"`))
+ }
+ }
+ if level == prev.level {
+ addSibling(prev, node)
+ } else if level > prev.level {
+ addChild(prev, node)
+ }
+ prev = node
+ case xml.Directive:
+ }
+
+ }
+quit:
+ return doc, nil
+}
+
+// Parse returns the parse tree for the XML from the given Reader.
+func Parse(r io.Reader) (*Node, error) {
+ return parse(r)
+}
+
+// ParseXML returns the parse tree for the XML from the given Reader.Deprecated.
+func ParseXML(r io.Reader) (*Node, error) {
+ return parse(r)
+}
diff --git a/vendor/github.com/antchfx/xquery/xml/query.go b/vendor/github.com/antchfx/xquery/xml/query.go
new file mode 100644
index 000000000..7981c637e
--- /dev/null
+++ b/vendor/github.com/antchfx/xquery/xml/query.go
@@ -0,0 +1,230 @@
+/*
+Package xmlquery provides extract data from XML documents using XPath expression.
+*/
+package xmlquery
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/antchfx/xpath"
+)
+
+// SelectElements finds child elements with the specified name.
+func (n *Node) SelectElements(name string) []*Node {
+ return Find(n, name)
+}
+
+// SelectElement finds child elements with the specified name.
+func (n *Node) SelectElement(name string) *Node {
+ return FindOne(n, name)
+}
+
+// SelectAttr returns the attribute value with the specified name.
+func (n *Node) SelectAttr(name string) string {
+ var local, space string
+ local = name
+ if i := strings.Index(name, ":"); i > 0 {
+ space = name[:i]
+ local = name[i+1:]
+ }
+ for _, attr := range n.Attr {
+ if attr.Name.Local == local && attr.Name.Space == space {
+ return attr.Value
+ }
+ }
+ return ""
+}
+
+var _ xpath.NodeNavigator = &NodeNavigator{}
+
+// CreateXPathNavigator creates a new xpath.NodeNavigator for the specified html.Node.
+func CreateXPathNavigator(top *Node) *NodeNavigator {
+ return &NodeNavigator{curr: top, root: top, attr: -1}
+}
+
+// Find searches the Node that matches by the specified XPath expr.
+func Find(top *Node, expr string) []*Node {
+ exp, err := xpath.Compile(expr)
+ if err != nil {
+ panic(err)
+ }
+ t := exp.Select(CreateXPathNavigator(top))
+ var elems []*Node
+ for t.MoveNext() {
+ elems = append(elems, (t.Current().(*NodeNavigator)).curr)
+ }
+ return elems
+}
+
+// FindOne searches the Node that matches by the specified XPath expr,
+// and returns first element of matched.
+func FindOne(top *Node, expr string) *Node {
+ exp, err := xpath.Compile(expr)
+ if err != nil {
+ panic(err)
+ }
+ t := exp.Select(CreateXPathNavigator(top))
+ var elem *Node
+ if t.MoveNext() {
+ elem = (t.Current().(*NodeNavigator)).curr
+ }
+ return elem
+}
+
+// FindEach searches the html.Node and calls functions cb.
+func FindEach(top *Node, expr string, cb func(int, *Node)) {
+ exp, err := xpath.Compile(expr)
+ if err != nil {
+ panic(err)
+ }
+ t := exp.Select(CreateXPathNavigator(top))
+ var i int
+ for t.MoveNext() {
+ cb(i, (t.Current().(*NodeNavigator)).curr)
+ i++
+ }
+}
+
+type NodeNavigator struct {
+ root, curr *Node
+ attr int
+}
+
+func (x *NodeNavigator) Current() *Node {
+ return x.curr
+}
+
+func (x *NodeNavigator) NodeType() xpath.NodeType {
+ switch x.curr.Type {
+ case CommentNode:
+ return xpath.CommentNode
+ case TextNode:
+ return xpath.TextNode
+ case DeclarationNode, DocumentNode:
+ return xpath.RootNode
+ case ElementNode:
+ if x.attr != -1 {
+ return xpath.AttributeNode
+ }
+ return xpath.ElementNode
+ }
+ panic(fmt.Sprintf("unknown XML node type: %v", x.curr.Type))
+}
+
+func (x *NodeNavigator) LocalName() string {
+ if x.attr != -1 {
+ return x.curr.Attr[x.attr].Name.Local
+ }
+ return x.curr.Data
+
+}
+
+func (x *NodeNavigator) Prefix() string {
+ return x.curr.Prefix
+}
+
+func (x *NodeNavigator) Value() string {
+ switch x.curr.Type {
+ case CommentNode:
+ return x.curr.Data
+ case ElementNode:
+ if x.attr != -1 {
+ return x.curr.Attr[x.attr].Value
+ }
+ return x.curr.InnerText()
+ case TextNode:
+ return x.curr.Data
+ }
+ return ""
+}
+
+func (x *NodeNavigator) Copy() xpath.NodeNavigator {
+ n := *x
+ return &n
+}
+
+func (x *NodeNavigator) MoveToRoot() {
+ x.curr = x.root
+}
+
+func (x *NodeNavigator) MoveToParent() bool {
+ if x.attr != -1 {
+ x.attr = -1
+ return true
+ } else if node := x.curr.Parent; node != nil {
+ x.curr = node
+ return true
+ }
+ return false
+}
+
+func (x *NodeNavigator) MoveToNextAttribute() bool {
+ if x.attr >= len(x.curr.Attr)-1 {
+ return false
+ }
+ x.attr++
+ return true
+}
+
+func (x *NodeNavigator) MoveToChild() bool {
+ if x.attr != -1 {
+ return false
+ }
+ if node := x.curr.FirstChild; node != nil {
+ x.curr = node
+ return true
+ }
+ return false
+}
+
+func (x *NodeNavigator) MoveToFirst() bool {
+ if x.attr != -1 || x.curr.PrevSibling == nil {
+ return false
+ }
+ for {
+ node := x.curr.PrevSibling
+ if node == nil {
+ break
+ }
+ x.curr = node
+ }
+ return true
+}
+
+func (x *NodeNavigator) String() string {
+ return x.Value()
+}
+
+func (x *NodeNavigator) MoveToNext() bool {
+ if x.attr != -1 {
+ return false
+ }
+ if node := x.curr.NextSibling; node != nil {
+ x.curr = node
+ return true
+ }
+ return false
+}
+
+func (x *NodeNavigator) MoveToPrevious() bool {
+ if x.attr != -1 {
+ return false
+ }
+ if node := x.curr.PrevSibling; node != nil {
+ x.curr = node
+ return true
+ }
+ return false
+}
+
+func (x *NodeNavigator) MoveTo(other xpath.NodeNavigator) bool {
+ node, ok := other.(*NodeNavigator)
+ if !ok || node.root != x.root {
+ return false
+ }
+
+ x.curr = node.curr
+ x.attr = node.attr
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
index ed418aa1e..b52655b67 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
@@ -1,3 +1,926 @@
+Release v1.10.23 (2017-08-10)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Enable BatchDetachPolicy
+* `service/codebuild`: Updates service API
+ * Supporting Bitbucket as source type in AWS CodeBuild.
+
+Release v1.10.22 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for RDS.
+
+Release v1.10.21 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Add support for paginating the result of DescribeEnvironments Include the ARN of described environments in DescribeEnvironments output
+
+### SDK Enhancements
+* `aws`: Add pointer conversion utilities to transform int64 to time.Time [#1433](https://github.com/aws/aws-sdk-go/pull/1433)
+ * Adds `SecondsTimeValue` and `MillisecondsTimeValue` utilities.
+
+Release v1.10.20 (2017-08-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy now supports the use of multiple tag groups in a single deployment group (an intersection of tags) to identify the instances for a deployment. When you create or update a deployment group, use the new ec2TagSet and onPremisesTagSet structures to specify up to three groups of tags. Only instances that are identified by at least one tag in each of the tag groups are included in the deployment group.
+* `service/config`: Updates service API and documentation
+* `service/ec2`: Updates service waiters
+ * Ec2 SpotInstanceRequestFulfilled waiter update
+* `service/elasticloadbalancingv2`: Updates service waiters
+* `service/email`: Updates service API, documentation, paginators, and examples
+ * This update adds information about publishing email open and click events. This update also adds information about publishing email events to Amazon Simple Notification Service (Amazon SNS).
+* `service/pinpoint`: Updates service API and documentation
+ * This release of the Pinpoint SDK enables App management - create, delete, update operations, Raw Content delivery for APNs and GCM campaign messages and From Address override.
+
+Release v1.10.19 (2017-08-01)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/inspector`: Updates service API, documentation, and paginators
+ * Inspector's StopAssessmentRun API has been updated with a new input option - stopAction. This request parameter can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value, and the previous behavior) stops the AWS agent data collection and begins the results evaluation for findings generation based on the data collected so far. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated.
+* `service/ssm`: Updates service API and documentation
+ * Adds a SendAutomationSignal API to SSM Service. This API is used to send a signal to an automation execution to change the current behavior or status of the execution.
+
+Release v1.10.18 (2017-07-27)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * The CreateDefaultVPC API enables you to create a new default VPC . You no longer need to contact AWS support, if your default VPC has been deleted.
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Added additional exception types and clarified documentation.
+
+Release v1.10.17 (2017-07-27)
+===
+
+### Service Client Updates
+* `service/dynamodb`: Updates service documentation and examples
+ * Corrected a typo.
+* `service/ec2`: Updates service API and documentation
+ * Amazon EC2 Elastic GPUs allow you to easily attach low-cost graphics acceleration to current generation EC2 instances. With Amazon EC2 Elastic GPUs, you can configure the right amount of graphics acceleration to your particular workload without being constrained by fixed hardware configurations and limited GPU selection.
+* `service/monitoring`: Updates service documentation
+ * This release adds high resolution features to CloudWatch, with support for Custom Metrics down to 1 second and Alarms down to 10 seconds.
+
+Release v1.10.16 (2017-07-26)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Cloud Directory adds support for additional batch operations.
+* `service/cloudformation`: Updates service API and documentation
+ * AWS CloudFormation StackSets enables you to manage stacks across multiple accounts and regions.
+
+### SDK Enhancements
+* `aws/signer/v4`: Optimize V4 signer's header duplicate space stripping. [#1417](https://github.com/aws/aws-sdk-go/pull/1417)
+
+Release v1.10.15 (2017-07-24)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API, documentation, and waiters
+ * Amazon AppStream 2.0 image builders and fleets can now access applications and network resources that rely on Microsoft Active Directory (AD) for authentication and permissions. This new feature allows you to join your streaming instances to your AD, so you can use your existing AD user management tools.
+* `service/ec2`: Updates service API and documentation
+ * Spot Fleet tagging capability allows customers to automatically tag instances launched by Spot Fleet. You can use this feature to label or distinguish instances created by distinct Spot Fleets. Tagging your EC2 instances also enables you to see instance cost allocation by tag in your AWS bill.
+
+### SDK Bugs
+* `aws/signer/v4`: Fix out of bounds panic in stripExcessSpaces [#1412](https://github.com/aws/aws-sdk-go/pull/1412)
+ * Fixes the out of bands panic in stripExcessSpaces caused by an incorrect calculation of the stripToIdx value. Simplified to code also.
+ * Fixes [#1411](https://github.com/aws/aws-sdk-go/issues/1411)
+Release v1.10.14 (2017-07-20)
+===
+
+### Service Client Updates
+* `service/elasticmapreduce`: Updates service API and documentation
+ * Amazon EMR now includes the ability to use a custom Amazon Linux AMI and adjustable root volume size when launching a cluster.
+
+Release v1.10.13 (2017-07-19)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Update budget Management API's to list/create/update RI_UTILIZATION type budget. Update budget Management API's to support DAILY timeUnit for RI_UTILIZATION type budget.
+
+### SDK Enhancements
+* `service/s3`: Use interfaces assertions instead of ValuesAtPath for S3 field lookups. [#1401](https://github.com/aws/aws-sdk-go/pull/1401)
+ * Improves the performance across the board for all S3 API calls by removing the usage of `ValuesAtPath` being used for every S3 API call.
+
+### SDK Bugs
+* `aws/request`: waiter test bug
+ * waiters_test.go file would sometimes fail due to travis hiccups. This occurs because a test would sometimes fail the cancel check and succeed the timeout. However, the timeout check should never occur in that test. This fix introduces a new field that dictates how waiters will sleep.
+Release v1.10.12 (2017-07-17)
+===
+
+### Service Client Updates
+* `service/cognito-idp`: Updates service API and documentation
+* `service/lambda`: Updates service API and documentation
+ * Lambda@Edge lets you run code closer to your end users without provisioning or managing servers. With Lambda@Edge, your code runs in AWS edge locations, allowing you to respond to your end users at the lowest latency. Your code is triggered by Amazon CloudFront events, such as requests to and from origin servers and viewers, and it is ready to execute at every AWS edge location whenever a request for content is received. You just upload your Node.js code to AWS Lambda and Lambda takes care of everything required to run and scale your code with high availability. You only pay for the compute time you consume - there is no charge when your code is not running.
+
+Release v1.10.11 (2017-07-14)
+===
+
+### Service Client Updates
+* `service/discovery`: Updates service API and documentation
+ * Adding feature to the Export API for Discovery Service to allow filters for the export task to allow export based on per agent id.
+* `service/ec2`: Updates service API
+ * New EC2 GPU Graphics instance
+* `service/marketplacecommerceanalytics`: Updates service documentation
+ * Update to Documentation Model For New Report Cadence / Reformat of Docs
+
+Release v1.10.10 (2017-07-13)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Adds support for management of gateway responses.
+* `service/ec2`: Updates service API and documentation
+ * X-ENI (or Cross-Account ENI) is a new feature that allows the attachment or association of Elastic Network Interfaces (ENI) between VPCs in different AWS accounts located in the same availability zone. With this new capability, service providers and partners can deliver managed solutions in a variety of new architectural patterns where the provider and consumer of the service are in different AWS accounts.
+* `service/lex-models`: Updates service documentation
+
+Release v1.10.9 (2017-07-12)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service API and documentation
+ * Auto Scaling now supports a new type of scaling policy called target tracking scaling policies that you can use to set up dynamic scaling for your application.
+* `service/swf`: Updates service API, documentation, paginators, and examples
+ * Added support for attaching control data to Lambda tasks. Control data lets you attach arbitrary strings to your decisions and history events.
+
+Release v1.10.8 (2017-07-06)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API, documentation, and paginators
+ * You can now improve the resilience and performance of your Microsoft AD directory by deploying additional domain controllers. Added UpdateNumberofDomainControllers API that allows you to update the number of domain controllers you want for your directory, and DescribeDomainControllers API that allows you to describe the detailed information of each domain controller of your directory. Also added the 'DesiredNumberOfDomainControllers' field to the DescribeDirectories API output for Microsoft AD.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kinesis`: Updates service API and documentation
+ * You can now encrypt your data at rest within an Amazon Kinesis Stream using server-side encryption. Server-side encryption via AWS KMS makes it easy for customers to meet strict data management requirements by encrypting their data at rest within the Amazon Kinesis Streams, a fully managed real-time data processing service.
+* `service/kms`: Updates service API and documentation
+ * This release of AWS Key Management Service introduces the ability to determine whether a key is AWS managed or customer managed.
+* `service/ssm`: Updates service API and documentation
+ * Amazon EC2 Systems Manager now expands Patching support to Amazon Linux, Red Hat and Ubuntu in addition to the already supported Windows Server.
+
+Release v1.10.7 (2017-07-05)
+===
+
+### Service Client Updates
+* `service/monitoring`: Updates service API and documentation
+ * We are excited to announce the availability of APIs and CloudFormation support for CloudWatch Dashboards. You can use the new dashboard APIs or CloudFormation templates to dynamically build and maintain dashboards to monitor your infrastructure and applications. There are four new dashboard APIs - PutDashboard, GetDashboard, DeleteDashboards, and ListDashboards APIs. PutDashboard is used to create a new dashboard or modify an existing one whereas GetDashboard is the API to get the details of a specific dashboard. ListDashboards and DeleteDashboards are used to get the names or delete multiple dashboards respectively. Getting started with dashboard APIs is similar to any other AWS APIs. The APIs can be accessed through AWS SDK or through CLI tools.
+* `service/route53`: Updates service API and documentation
+ * Bug fix for InvalidChangeBatch exception.
+
+### SDK Enhancements
+* `service/s3/s3manager`: adding cleanup function to batch objects [#1375](https://github.com/aws/aws-sdk-go/issues/1375)
+ * This enhancement will add an After field that will be called after each iteration of the batch operation.
+
+Release v1.10.6 (2017-06-30)
+===
+
+### Service Client Updates
+* `service/marketplacecommerceanalytics`: Updates service documentation
+ * Documentation updates for AWS Marketplace Commerce Analytics.
+* `service/s3`: Updates service API and documentation
+ * API Update for S3: Adding Object Tagging Header to MultipartUpload Initialization
+
+Release v1.10.5 (2017-06-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/events`: Updates service API and documentation
+ * CloudWatch Events now allows different AWS accounts to share events with each other through a new resource called event bus. Event buses accept events from AWS services, other AWS accounts and PutEvents API calls. Currently all AWS accounts have one default event bus. To send events to another account, customers simply write rules to match the events of interest and attach an event bus in the receiving account as the target to the rule. The PutTargets API has been updated to allow adding cross account event buses as targets. In addition, we have released two new APIs - PutPermission and RemovePermission - that enables customers to add/remove permissions to their default event bus.
+* `service/gamelift`: Updates service API and documentation
+ * Allow developers to download GameLift fleet creation logs to assist with debugging.
+* `service/ssm`: Updates service API and documentation
+ * Adding Resource Data Sync support to SSM Inventory. New APIs: * CreateResourceDataSync - creates a new resource data sync configuration, * ListResourceDataSync - lists existing resource data sync configurations, * DeleteResourceDataSync - deletes an existing resource data sync configuration.
+
+Release v1.10.4 (2017-06-27)
+===
+
+### Service Client Updates
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * Proper tagging of resources is critical to post-launch operations such as billing, cost allocation, and resource management. By using Service Catalog's TagOption Library, administrators can define a library of re-usable TagOptions that conform to company standards, and associate these with Service Catalog portfolios and products. Learn how to move your current tags to the new library, create new TagOptions, and view and associate your library items with portfolios and products. Understand how to ensure that the right tags are created on products launched through Service Catalog and how to provide users with defined selectable tags.
+
+### SDK Bugs
+* `aws/signer/v4`: checking length on `stripExcessSpaces` [#1372](https://github.com/aws/aws-sdk-go/issues/1372)
+ * Fixes a bug where `stripExcessSpaces` did not check length against the slice.
+ * Fixes: [#1371](https://github.com/aws/aws-sdk-go/issues/1371)
+Release v1.10.3 (2017-06-23)
+===
+
+### Service Client Updates
+* `service/lambda`: Updates service API and documentation
+ * The Lambda Invoke API will now throw new exception InvalidRuntimeException (status code 502) for invokes with deprecated runtimes.
+
+Release v1.10.2 (2017-06-22)
+===
+
+### Service Client Updates
+* `service/codepipeline`: Updates service API, documentation, and paginators
+ * A new API, ListPipelineExecutions, enables you to retrieve summary information about the most recent executions in a pipeline, including pipeline execution ID, status, start time, and last updated time. You can request information for a maximum of 100 executions. Pipeline execution data is available for the most recent 12 months of activity.
+* `service/dms`: Updates service API and documentation
+ * Added tagging for DMS certificates.
+* `service/elasticloadbalancing`: Updates service waiters
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lightsail`: Updates service API and documentation
+ * This release adds a new nextPageToken property to the result of the GetOperationsForResource API. Developers can now get the next set of items in a list by making subsequent calls to GetOperationsForResource API with the token from the previous call. This release also deprecates the nextPageCount property, which previously returned null (use the nextPageToken property instead). This release also deprecates the customImageName property on the CreateInstancesRequest class, which was previously ignored by the API.
+* `service/route53`: Updates service API and documentation
+ * This release reintroduces the HealthCheckInUse exception.
+
+Release v1.10.1 (2017-06-21)
+===
+
+### Service Client Updates
+* `service/dax`: Adds new service
+ * Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement - from milliseconds to microseconds - even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management.
+* `service/route53`: Updates service API and documentation
+ * Amazon Route 53 now supports multivalue answers in response to DNS queries, which lets you route traffic approximately randomly to multiple resources, such as web servers. Create one multivalue answer record for each resource and, optionally, associate an Amazon Route 53 health check with each record, and Amazon Route 53 responds to DNS queries with up to eight healthy records.
+* `service/ssm`: Updates service API, documentation, and paginators
+ * Adding hierarchy support to the SSM Parameter Store API. Added support tor tagging. New APIs: GetParameter - retrieves one parameter, DeleteParameters - deletes multiple parameters (max number 10), GetParametersByPath - retrieves parameters located in the hierarchy. Updated APIs: PutParameter - added ability to enforce parameter value by applying regex (AllowedPattern), DescribeParameters - modified to support Tag filtering.
+* `service/waf`: Updates service API and documentation
+ * You can now create, edit, update, and delete a new type of WAF rule with a rate tracking component.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.10.0 (2017-06-20)
+===
+
+### Service Client Updates
+* `service/workdocs`: Updates service API and documentation
+ * This release provides a new API to retrieve the activities performed by WorkDocs users.
+
+### SDK Features
+* `aws/credentials/plugincreds`: Add support for Go plugin for credentials [#1320](https://github.com/aws/aws-sdk-go/pull/1320)
+ * Adds support for using plugins to retrieve credentials for API requests. This change adds a new package plugincreds under aws/credentials. See the `example/aws/credentials/plugincreds` folder in the SDK for example usage.
+
+Release v1.9.00 (2017-06-19)
+===
+
+### Service Client Updates
+* `service/organizations`: Updates service API and documentation
+ * Improvements to Exception Modeling
+
+### SDK Features
+* `service/s3/s3manager`: Adds batch operations to s3manager [#1333](https://github.com/aws/aws-sdk-go/pull/1333)
+ * Allows for batch upload, download, and delete of objects. Also adds the interface pattern to allow for easy traversal of objects. E.G `DownloadWithIterator`, `UploadWithIterator`, and `BatchDelete`. `BatchDelete` also contains a utility iterator using the `ListObjects` API to easily delete a list of objects.
+
+Release v1.8.44 (2017-06-16)
+===
+
+### Service Client Updates
+* `service/xray`: Updates service API, documentation, and paginators
+ * Add a response time histogram to the services in response of GetServiceGraph API.
+
+Release v1.8.43 (2017-06-15)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Adds API to describe Amazon FPGA Images (AFIs) available to customers, which includes public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.
+* `service/ecs`: Updates service API and documentation
+ * Added support for cpu, memory, and memory reservation container overrides on the RunTask and StartTask APIs.
+* `service/iot`: Updates service API and documentation
+ * Revert the last release: remove CertificatePem from DescribeCertificate API.
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * Added ProvisioningArtifactSummaries to DescribeProductAsAdmin's output to show the provisioning artifacts belong to the product. Allow filtering by SourceProductId in SearchProductsAsAdmin for AWS Marketplace products. Added a verbose option to DescribeProvisioningArtifact to display the CloudFormation template used to create the provisioning artifact.Added DescribeProvisionedProduct API. Changed the type of ProvisionedProduct's Status to be distinct from Record's Status. New ProvisionedProduct's Status are AVAILABLE, UNDER_CHANGE, TAINTED, ERROR. Changed Record's Status set of values to CREATED, IN_PROGRESS, IN_PROGRESS_IN_ERROR, SUCCEEDED, FAILED.
+
+### SDK Bugs
+* `private/model/api`: Fix RESTXML support for XML Namespace [#1343](https://github.com/aws/aws-sdk-go/pull/1343)
+ * Fixes a bug with the SDK's generation of services using the REST XML protocol not annotating shape references with the XML Namespace attribute.
+ * Fixes [#1334](https://github.com/aws/aws-sdk-go/pull/1334)
+Release v1.8.42 (2017-06-14)
+===
+
+### Service Client Updates
+* `service/applicationautoscaling`: Updates service API and documentation
+* `service/clouddirectory`: Updates service documentation
+ * Documentation update for Cloud Directory
+
+Release v1.8.41 (2017-06-13)
+===
+
+### Service Client Updates
+* `service/configservice`: Updates service API
+
+Release v1.8.40 (2017-06-13)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * API Update for RDS: this update enables copy-on-write, a new Aurora MySQL Compatible Edition feature that allows users to restore their database, and support copy of TDE enabled snapshot cross region.
+
+### SDK Bugs
+* `aws/request`: Fix NewErrParamMinLen to use correct ParamMinLenErrCode [#1336](https://github.com/aws/aws-sdk-go/issues/1336)
+ * Fixes the `NewErrParamMinLen` function returning the wrong error code. `ParamMinLenErrCode` should be returned not `ParamMinValueErrCode`.
+ * Fixes [#1335](https://github.com/aws/aws-sdk-go/issues/1335)
+Release v1.8.39 (2017-06-09)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/opsworks`: Updates service API and documentation
+ * Tagging Support for AWS OpsWorks Stacks
+
+Release v1.8.38 (2017-06-08)
+===
+
+### Service Client Updates
+* `service/iot`: Updates service API and documentation
+ * In addition to using certificate ID, AWS IoT customers can now obtain the description of a certificate with the certificate PEM.
+* `service/pinpoint`: Updates service API and documentation
+ * Starting today Amazon Pinpoint adds SMS Text and Email Messaging support in addition to Mobile Push Notifications, providing developers, product managers and marketers with multi-channel messaging capabilities to drive user engagement in their applications. Pinpoint also enables backend services and applications to message users directly and provides advanced user and app analytics to understand user behavior and messaging performance.
+* `service/rekognition`: Updates service API and documentation
+ * API Update for AmazonRekognition: Adding RecognizeCelebrities API
+
+Release v1.8.37 (2017-06-07)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Add support to APIs for privileged containers. This change would allow performing privileged operations like starting the Docker daemon inside builds possible in custom docker images.
+* `service/greengrass`: Adds new service
+ * AWS Greengrass is software that lets you run local compute, messaging, and device state synchronization for connected devices in a secure way. With AWS Greengrass, connected devices can run AWS Lambda functions, keep device data in sync, and communicate with other devices securely even when not connected to the Internet. Using AWS Lambda, Greengrass ensures your IoT devices can respond quickly to local events, operate with intermittent connections, and minimize the cost of transmitting IoT data to the cloud.
+
+Release v1.8.36 (2017-06-06)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation update for AWS Certificate Manager.
+* `service/cloudfront`: Updates service documentation
+ * Doc update to fix incorrect prefix in S3OriginConfig
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API
+ * Update client side validation for SalesForce action.
+
+Release v1.8.35 (2017-06-05)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * AppStream 2.0 Custom Security Groups allows you to easily control what network resources your streaming instances and images have access to. You can assign up to 5 security groups per Fleet to control the inbound and outbound network access to your streaming instances to specific IP ranges, network protocols, or ports.
+* `service/iot`: Updates service API, documentation, paginators, and examples
+ * Added Salesforce action to IoT Rules Engine.
+
+Release v1.8.34 (2017-06-02)
+===
+
+### Service Client Updates
+* `service/kinesisanalytics`: Updates service API, documentation, and paginators
+ * Kinesis Analytics publishes error messages CloudWatch logs in case of application misconfigurations
+* `service/workdocs`: Updates service API and documentation
+ * This release includes new APIs to manage tags and custom metadata on resources and also new APIs to add and retrieve comments at the document level.
+
+Release v1.8.33 (2017-06-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy has improved how it manages connections to GitHub accounts and repositories. You can now create and store up to 25 connections to GitHub accounts in order to associate AWS CodeDeploy applications with GitHub repositories. Each connection can support multiple repositories. You can create connections to up to 25 different GitHub accounts, or create more than one connection to a single account. The ListGitHubAccountTokenNames command has been introduced to retrieve the names of stored connections to GitHub accounts that you have created. The name of the connection to GitHub used for an AWS CodeDeploy application is also included in the ApplicationInfo structure. Two new fields, lastAttemptedDeployment and lastSuccessfulDeployment, have been added to DeploymentGroupInfo to improve the handling of deployment group information in the AWS CodeDeploy console. Information about these latest deployments can also be retrieved using the GetDeploymentGroup and BatchGetDeployment group requests. Also includes a region update (us-gov-west-1).
+* `service/cognitoidentityprovider`: Updates service API, documentation, and paginators
+* `service/elbv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lexmodelbuildingservice`: Updates service documentation and examples
+
+### SDK Enhancements
+* `aws/defaults`: Exports shared credentials and config default filenames used by the SDK. [#1308](https://github.com/aws/aws-sdk-go/pull/1308)
+ * Adds SharedCredentialsFilename and SharedConfigFilename functions to defaults package.
+
+### SDK Bugs
+* `aws/credentials`: Fixes shared credential provider's default filename on Windows. [#1308](https://github.com/aws/aws-sdk-go/pull/1308)
+ * The shared credentials provider would attempt to use the wrong filename on Windows if the `HOME` environment variable was defined.
+* `service/s3/s3manager`: service/s3/s3manager: Fix Downloader ignoring Range get parameter [#1311](https://github.com/aws/aws-sdk-go/pull/1311)
+ * Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets.
+ * Fixes [#1296](https://github.com/aws/aws-sdk-go/issues/1296)
+Release v1.8.32 (2017-05-31)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * Amazon RDS customers can now easily and quickly stop and start their DB instances.
+
+Release v1.8.31 (2017-05-30)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API, documentation, and paginators
+ * Cloud Directory has launched support for Typed Links, enabling customers to create object-to-object relationships that are not hierarchical in nature. Typed Links enable customers to quickly query for data along these relationships. Customers can also enforce referential integrity using Typed Links, ensuring data in use is not inadvertently deleted.
+* `service/s3`: Updates service paginators and examples
+ * New example snippets for Amazon S3.
+
+Release v1.8.30 (2017-05-25)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Support added for persistent user storage, backed by S3.
+* `service/rekognition`: Updates service API and documentation
+ * Updated the CompareFaces API response to include orientation information, unmatched faces, landmarks, pose, and quality of the compared faces.
+
+Release v1.8.29 (2017-05-24)
+===
+
+### Service Client Updates
+* `service/iam`: Updates service API
+ * The unique ID and access key lengths were extended from 32 to 128
+* `service/storagegateway`: Updates service API and documentation
+ * Two Storage Gateway data types, Tape and TapeArchive, each have a new response element, TapeUsedInBytes. This element helps you manage your virtual tapes. By using TapeUsedInBytes, you can see the amount of data written to each virtual tape.
+* `service/sts`: Updates service API, documentation, and paginators
+ * The unique ID and access key lengths were extended from 32 to 128.
+
+Release v1.8.28 (2017-05-23)
+===
+
+### Service Client Updates
+* `service/databasemigrationservice`: Updates service API, documentation, paginators, and examples
+ * This release adds support for using Amazon S3 and Amazon DynamoDB as targets for database migration, and using MongoDB as a source for database migration. For more information, see the AWS Database Migration Service documentation.
+
+Release v1.8.27 (2017-05-22)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/resourcegroupstaggingapi`: Updates service API, documentation, and paginators
+ * You can now specify the number of resources returned per page in GetResources operation, as an optional parameter, to easily manage the list of resources returned by your queries.
+
+### SDK Bugs
+* `aws/request`: Add support for PUT temporary redirects (307) [#1283](https://github.com/aws/aws-sdk-go/issues/1283)
+ * Adds support for Go 1.8's GetBody function allowing the SDK's http request using PUT and POST methods to be redirected with temporary redirects with 307 status code.
+ * Fixes: [#1267](https://github.com/aws/aws-sdk-go/issues/1267)
+* `aws/request`: Add handling for retrying temporary errors during unmarshal [#1289](https://github.com/aws/aws-sdk-go/issues/1289)
+ * Adds support for retrying temporary errors that occur during unmarshaling of a request's response body.
+ * Fixes: [#1275](https://github.com/aws/aws-sdk-go/issues/1275)
+Release v1.8.26 (2017-05-18)
+===
+
+### Service Client Updates
+* `service/athena`: Adds new service
+ * This release adds support for Amazon Athena. Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run.
+* `service/lightsail`: Updates service API, documentation, and paginators
+ * This release adds new APIs that make it easier to set network port configurations on Lightsail instances. Developers can now make a single request to both open and close public ports on an instance using the PutInstancePublicPorts operation.
+
+### SDK Bugs
+* `aws/request`: Fix logging from reporting wrong retry request errors #1281
+ * Fixes the SDK's retry request logging to report the the actual error that occurred, not a stubbed Unknown error message.
+ * Fixes the SDK's response logger to not output the response log multiple times per retry.
+Release v1.8.25 (2017-05-17)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service documentation, paginators, and examples
+ * Various Auto Scaling documentation updates
+* `service/cloudwatchevents`: Updates service documentation
+ * Various CloudWatch Events documentation updates.
+* `service/cloudwatchlogs`: Updates service documentation and paginators
+ * Various CloudWatch Logs documentation updates.
+* `service/polly`: Updates service API
+ * Amazon Polly adds new German voice "Vicki"
+
+Release v1.8.24 (2017-05-16)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * This release introduces the previousRevision field in the responses to the GetDeployment and BatchGetDeployments actions. previousRevision provides information about the application revision that was deployed to the deployment group before the most recent successful deployment. Also, the fileExistsBehavior parameter has been added for CreateDeployment action requests. In the past, if the AWS CodeDeploy agent detected files in a target location that weren't part of the application revision from the most recent successful deployment, it would fail the current deployment by default. This new parameter provides options for how the agent handles these files: fail the deployment, retain the content, or overwrite the content.
+* `service/gamelift`: Updates service API and documentation
+ * Allow developers to specify how metrics are grouped in CloudWatch for their GameLift fleets. Developers can also specify how many concurrent game sessions activate on a per-instance basis.
+* `service/inspector`: Updates service API, documentation, paginators, and examples
+ * Adds ability to produce an assessment report that includes detailed and comprehensive results of a specified assessment run.
+* `service/kms`: Updates service documentation
+ * Update documentation for KMS.
+
+Release v1.8.23 (2017-05-15)
+===
+
+### Service Client Updates
+* `service/ssm`: Updates service API and documentation
+ * UpdateAssociation API now supports updating document name and targets of an association. GetAutomationExecution API can return FailureDetails as an optional field to the StepExecution Object, which contains failure type, failure stage as well as other failure related information for a failed step.
+
+### SDK Enhancements
+* `aws/session`: SDK should be able to load multiple custom shared config files. [#1258](https://github.com/aws/aws-sdk-go/issues/1258)
+ * This change adds a `SharedConfigFiles` field to the `session.Options` type that allows you to specify the files, and their order, the SDK will use for loading shared configuration and credentials from when the `Session` is created. Use the `NewSessionWithOptions` Session constructor to specify these options. You'll also most likely want to enable support for the shared configuration file's additional attributes by setting `session.Option`'s `SharedConfigState` to `session.SharedConfigEnabled`.
+
+Release v1.8.22 (2017-05-11)
+===
+
+### Service Client Updates
+* `service/elb`: Updates service API, documentation, and paginators
+* `service/elbv2`: Updates service API and documentation
+* `service/lexmodelbuildingservice`: Updates service API and documentation
+* `service/organizations`: Updates service API, documentation, paginators, and examples
+ * AWS Organizations APIs that return an Account object now include the email address associated with the account’s root user.
+
+Release v1.8.21 (2017-05-09)
+===
+
+### Service Client Updates
+* `service/codestar`: Updates service documentation
+ * Updated documentation for AWS CodeStar.
+* `service/workspaces`: Updates service API, documentation, and paginators
+ * Doc-only Update for WorkSpaces
+
+Release v1.8.20 (2017-05-04)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API, documentation, and paginators
+ * Exposes container instance registration time in ECS:DescribeContainerInstances.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/marketplaceentitlementservice`: Adds new service
+* `service/lambda`: Updates service API and documentation
+ * Support for UpdateFunctionCode DryRun option
+
+Release v1.8.19 (2017-04-28)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service waiters and paginators
+ * Adding back the removed waiters and paginators.
+
+Release v1.8.18 (2017-04-28)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API, documentation, waiters, paginators, and examples
+ * API update for CloudFormation: New optional parameter ClientRequestToken which can be used as an idempotency token to safely retry certain operations as well as tagging StackEvents.
+* `service/rds`: Updates service API, documentation, and examples
+ * The DescribeDBClusterSnapshots API now returns a SourceDBClusterSnapshotArn field which identifies the source DB cluster snapshot of a copied snapshot.
+* `service/rekognition`: Updates service API
+ * Fix for missing file type check
+* `service/snowball`: Updates service API, documentation, and paginators
+ * The Snowball API has a new exception that can be thrown for list operation requests.
+* `service/sqs`: Updates service API, documentation, and paginators
+ * Adding server-side encryption (SSE) support to SQS by integrating with AWS KMS; adding new queue attributes to SQS CreateQueue, SetQueueAttributes and GetQueueAttributes APIs to support SSE.
+
+Release v1.8.17 (2017-04-26)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * With Amazon Relational Database Service (Amazon RDS) running MySQL or Amazon Aurora, you can now authenticate to your DB instance using IAM database authentication.
+
+Release v1.8.16 (2017-04-21)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API, documentation, and paginators
+ * The new feature named "Default Internet Access" will enable Internet access from AppStream 2.0 instances - image builders and fleet instances. Admins will check a flag either through AWS management console for AppStream 2.0 or through API while creating an image builder or while creating/updating a fleet.
+* `service/kinesis`: Updates service API, documentation, waiters, and paginators
+ * Adds a new waiter, StreamNotExists, to Kinesis.
+
+### SDK Enhancements
+* `aws/endpoints`: Add utilities improving endpoints lookup (#1218)
+ * Adds several utilities to the endpoints packages to make looking up partitions, regions, and services easier.
+ * Fixes #994
+
+### SDK Bugs
+* `private/protocol/xml/xmlutil`: Fix unmarshaling dropping errors (#1219)
+ * The XML unmarshaler would drop any serialization or body read error that occurred on the floor effectively hiding any errors that would occur.
+ * Fixes #1205
+Release v1.8.15 (2017-04-20)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * API Update for AWS Device Farm: Support for Deals and Promotions
+* `service/directconnect`: Updates service documentation
+ * Documentation updates for AWS Direct Connect.
+* `service/elbv2`: Updates service waiters
+* `service/kms`: Updates service documentation and examples
+ * Doc-only update for Key Management Service (KMS): Update docs for GrantConstraints and GenerateRandom
+* `service/route53`: Updates service documentation
+ * Release notes: SDK documentation now includes examples for ChangeResourceRecordSets for all types of resource record set, such as weighted, alias, and failover.
+* `service/route53domains`: Updates service API, documentation, and paginators
+ * Adding examples and other documentation updates.
+
+### SDK Enhancements
+* `service/s3`: Add utilities to make getting a bucket's region easier (#1207)
+ * Adds two features which make it easier to get a bucket's region, `s3.NormalizeBucketLocation` and `s3manager.GetBucketRegion`.
+
+### SDK Bugs
+* `service/s3`: Fix HeadObject's incorrect documented error codes (#1213)
+ * The HeadObject's model incorrectly states that the operation can return the NoSuchKey error code.
+ * Fixes #1208
+
+Release v1.8.14 (2017-04-19)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Add support for "embed" property.
+* `service/codestar`: Adds new service
+ * AWS CodeStar is a cloud-based service for creating, managing, and working with software development projects on AWS. An AWS CodeStar project creates and integrates AWS services for your project development toolchain. AWS CodeStar also manages the permissions required for project users.
+* `service/ec2`: Updates service API and documentation
+ * Adds support for creating an Amazon FPGA Image (AFI) from a specified design checkpoint (DCP).
+* `service/iam`: Updates service API and documentation
+ * This changes introduces a new IAM role type, Service Linked Role, which works like a normal role but must be managed via services' control.
+* `service/lambda`: Updates service API and documentation
+ * Lambda integration with CloudDebugger service to enable customers to enable tracing for the Lambda functions and send trace information to the CloudDebugger service.
+* `service/lexmodelbuildingservice`: Adds new service
+* `service/polly`: Updates service API, documentation, and paginators
+ * API Update for Amazon Polly: Add support for speech marks
+* `service/rekognition`: Updates service API and documentation
+ * Given an image, the API detects explicit or suggestive adult content in the image and returns a list of corresponding labels with confidence scores, as well as a taxonomy (parent-child relation) for each label.
+
+Release v1.8.13 (2017-04-18)
+===
+
+### Service Client Updates
+* `service/lambda`: Updates service API and documentation
+ * You can use tags to group and filter your Lambda functions, making it easier to analyze them for billing allocation purposes. For more information, see Tagging Lambda Functions. You can now write or upgrade your Lambda functions using Python version 3.6. For more information, see Programming Model for Authoring Lambda Functions in Python. Note: Features will be rolled out in the US regions on 4/19.
+
+### SDK Enhancements
+* `aws/request`: add support for appengine's custom standard library (#1190)
+ * Remove syscall error checking on appengine platforms.
+
+Release v1.8.12 (2017-04-11)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * API Gateway request validators
+* `service/batch`: Updates service API and documentation
+ * API Update for AWS Batch: Customer provided AMI for MANAGED Compute Environment
+* `service/gamelift`: Updates service API and documentation
+ * Allows developers to utilize an improved workflow when calling our Queues API and introduces a new feature that allows developers to specify a maximum allowable latency per Queue.
+* `service/opsworks`: Updates service API, documentation, and paginators
+ * Cloudwatch Logs agent configuration can now be attached to OpsWorks Layers using CreateLayer and UpdateLayer. OpsWorks will then automatically install and manage the CloudWatch Logs agent on the instances part of the OpsWorks Layer.
+
+### SDK Bugs
+* `aws/client`: Fix clients polluting handler list (#1197)
+ * Fixes the clients potentially polluting the passed in handler list with the client's customizations. This change ensures every client always works with a clean copy of the request handlers and it cannot pollute the handlers back upstream.
+ * Fixes #1184
+* `aws/request`: Fix waiter error match condition (#1195)
+ * Fixes the waiters's matching overwriting the request's err, effectively ignoring the error condition. This broke waiters with the FailureWaiterState matcher state.
+Release v1.8.11 (2017-04-07)
+===
+
+### Service Client Updates
+* `service/redshift`: Updates service API, documentation, and paginators
+ * This update adds the GetClusterCredentials API which is used to get temporary login credentials to the cluster. AccountWithRestoreAccess now has a new member AccountAlias, this is the identifier of the AWS support account authorized to restore the specified snapshot. This is added to support the feature where the customer can share their snapshot with the Amazon Redshift Support Account without having to manually specify the AWS Redshift Service account ID on the AWS Console/API.
+
+Release v1.8.10 (2017-04-06)
+===
+
+### Service Client Updates
+* `service/elbv2`: Updates service documentation
+
+Release v1.8.9 (2017-04-05)
+===
+
+### Service Client Updates
+* `service/elasticache`: Updates service API, documentation, paginators, and examples
+ * ElastiCache added support for testing the Elasticache Multi-AZ feature with Automatic Failover.
+
+Release v1.8.8 (2017-04-04)
+===
+
+### Service Client Updates
+* `service/cloudwatch`: Updates service API, documentation, and paginators
+ * Amazon Web Services announced the immediate availability of two additional alarm configuration rules for Amazon CloudWatch Alarms. The first rule is for configuring missing data treatment. Customers have the options to treat missing data as alarm threshold breached, alarm threshold not breached, maintain alarm state and the current default treatment. The second rule is for alarms based on percentiles metrics that can trigger unnecassarily if the percentile is calculated from a small number of samples. The new rule can treat percentiles with low sample counts as same as missing data. If the first rule is enabled, the same treatment will be applied when an alarm encounters a percentile with low sample counts.
+
+Release v1.8.7 (2017-04-03)
+===
+
+### Service Client Updates
+* `service/lexruntimeservice`: Updates service API and documentation
+ * Adds support to PostContent for speech input
+
+### SDK Enhancements
+* `aws/request`: Improve handler copy, push back, push front performance (#1171)
+ * Minor optimization to the handler list's handling of copying and pushing request handlers to the handler list.
+* Update codegen header to use Go std wording (#1172)
+ * Go recently accepted the proposal for standard generated file header wording in, https://golang.org/s/generatedcode.
+
+### SDK Bugs
+* `service/dynamodb`: Fix DynamoDB using custom retryer (#1170)
+ * Fixes (#1139) the DynamoDB service client clobbering any custom retryer that was passed into the service client or Session's config.
+Release v1.8.6 (2017-04-01)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * ListObjectAttributes now supports filtering by facet.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.8.5 (2017-03-30)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service waiters and paginators
+ * Adding paginators for ListExports and ListImports
+* `service/cloudfront`: Adds new service
+ * Amazon CloudFront now supports user configurable HTTP Read and Keep-Alive Idle Timeouts for your Custom Origin Servers
+* `service/configservice`: Updates service documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/resourcegroupstaggingapi`: Adds new service
+* `service/storagegateway`: Updates service API and documentation
+ * File gateway mode in AWS Storage gateway provides access to objects in S3 as files on a Network File System (NFS) mount point. Once a file share is created, any changes made externally to the S3 bucket will not be reflected by the gateway. Using the cache refresh feature in this update, the customer can trigger an on-demand scan of the keys in their S3 bucket and refresh the file namespace cached on the gateway. It takes as an input the fileShare ARN and refreshes the cache for only that file share. Additionally there is new functionality on file gateway that allows you configure what squash options they would like on their file share, this allows a customer to configure their gateway to not squash root permissions. This can be done by setting options in NfsOptions for CreateNfsFileShare and UpdateNfsFileShare APIs.
+
+Release v1.8.4 (2017-03-28)
+===
+
+### Service Client Updates
+* `service/batch`: Updates service API, documentation, and paginators
+ * Customers can now provide a retryStrategy as part of the RegisterJobDefinition and SubmitJob API calls. The retryStrategy object has a number value for attempts. This is the number of non successful executions before a job is considered FAILED. In addition, the JobDetail object now has an attempts field and shows all execution attempts.
+* `service/ec2`: Updates service API and documentation
+ * Customers can now tag their Amazon EC2 Instances and Amazon EBS Volumes at
+ the time of their creation. You can do this from the EC2 Instance launch
+ wizard or through the RunInstances or CreateVolume APIs. By tagging
+ resources at the time of creation, you can eliminate the need to run custom
+ tagging scripts after resource creation. In addition, you can now set
+ resource-level permissions on the CreateVolume, CreateTags, DeleteTags, and
+ the RunInstances APIs. This allows you to implement stronger security
+ policies by giving you more granular control over which users and groups
+ have access to these APIs. You can also enforce the use of tagging and
+ control what tag keys and values are set on your resources. When you combine
+ tag usage and resource-level IAM policies together, you can ensure your
+ instances and volumes are properly secured upon creation and achieve more
+ accurate cost allocation reporting. These new features are provided at no
+ additional cost.
+
+### SDK Enhancements
+* `aws/request`: Add retry support for RequestTimeoutException (#1158)
+ * Adds support for retrying RequestTimeoutException error code that is returned by some services.
+
+### SDK Bugs
+* `private/model/api`: Fix Waiter and Paginators panic on nil param inputs (#1157)
+ * Corrects the code generation for Paginators and waiters that caused a panic if nil input parameters were used with the operations.
+Release v1.8.3 (2017-03-27)
+===
+
+## Service Client Updates
+* `service/ssm`: Updates service API, documentation, and paginators
+ * Updated validation rules for SendCommand and RegisterTaskWithMaintenanceWindow APIs.
+Release v1.8.2 (2017-03-24)
+===
+
+Service Client Updates
+---
+* `service/applicationautoscaling`: Updates service API, documentation, and paginators
+ * Application AutoScaling is launching support for a new target resource (AppStream 2.0 Fleets) as a scalable target.
+* `service/cloudtrail`: Updates service API and documentation
+ * Doc-only Update for CloudTrail: Add required parameters for GetEventSelectors and PutEventSelectors
+
+Release v1.8.1 (2017-03-23)
+===
+
+Service Client Updates
+---
+* `service/applicationdiscoveryservice`: Updates service API, documentation, and paginators
+ * Adds export configuration options to the AWS Discovery Service API.
+* `service/elbv2`: Updates waiters
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lambda`: Updates service API and paginators
+ * Adds support for new runtime Node.js v6.10 for AWS Lambda service
+
+Release v1.8.0 (2017-03-22)
+===
+
+Service Client Updates
+---
+* `service/codebuild`: Updates service documentation
+* `service/directconnect`: Updates service API
+ * Deprecated DescribeConnectionLoa, DescribeInterconnectLoa, AllocateConnectionOnInterconnect and DescribeConnectionsOnInterconnect operations in favor of DescribeLoa, DescribeLoa, AllocateHostedConnection and DescribeHostedConnections respectively.
+* `service/marketplacecommerceanalytics`: Updates service API, documentation, and paginators
+ * This update adds a new data set, us_sales_and_use_tax_records, which enables AWS Marketplace sellers to programmatically access to their U.S. Sales and Use Tax report data.
+* `service/pinpoint`: Updates service API and documentation
+ * Amazon Pinpoint User Segmentation
+ * Added ability to segment endpoints by user attributes in addition to endpoint attributes. Amazon Pinpoint Event Stream Preview
+ * Added functionality to publish raw app analytics and campaign events data as events streams to Kinesis and Kinesis Firehose
+ * The feature provides developers with increased flexibility of exporting raw events to S3, Redshift, Elasticsearch using a Kinesis Firehose stream or enable real time event processing use cases using a Kinesis stream
+* `service/rekognition`: Updates service documentation.
+
+SDK Features
+---
+* `aws/request`: Add support for context.Context to SDK API operation requests (#1132)
+ * Adds support for context.Context to the SDK by adding `WithContext` methods for each API operation, Paginators and Waiters. e.g `PutObjectWithContext`. This change also adds the ability to provide request functional options to the method calls instead of requiring you to use the `Request` API operation method (e.g `PutObjectRequest`).
+ * Adds a `Complete` Request handler list that will be called ever time a request is completed. This includes both success and failure. Complete will only be called once per API operation request.
+ * `private/waiter` package moved from the private group to `aws/request/waiter` and made publicly available.
+ * Adds Context support to all API operations, Waiters(WaitUntil) and Paginators(Pages) methods.
+ * Adds Context support for s3manager and s3crypto clients.
+
+SDK Enhancements
+---
+* `aws/signer/v4`: Adds support for unsigned payload signer config (#1130)
+ * Adds configuration option to the v4.Signer to specify the request's body should not be signed. This will only correclty function on services that support unsigned payload. e.g. S3, Glacier.
+
+SDK Bug Fixes
+---
+* `service/s3`: Fix S3 HostID to be available in S3 request error message (#1131)
+ * Adds a new type s3.RequestFailure which exposes the S3 HostID value from a S3 API operation response. This is helpful when you have an error with S3, and need to contact support. Both RequestID and HostID are needed.
+* `private/model/api`: Do not return a link if uid is empty (#1133)
+ * Fixes SDK's doc generation to not generate API reference doc links if the SDK us unable to create a valid link.
+* `aws/request`: Optimization to handler list copy to prevent multiple alloc calls. (#1134)
+Release v1.7.9 (2017-03-13)
+===
+
+Service Client Updates
+---
+* `service/devicefarm`: Updates service API, documentation, paginators, and examples
+ * Network shaping allows users to simulate network connections and conditions while testing their Android, iOS, and web apps with AWS Device Farm.
+* `service/cloudwatchevents`: Updates service API, documentation, and examples
+
+SDK Enhancement
+===
+* `aws/session`: Add support for side loaded CA bundles (#1117)
+ * Adds supports for side loading Certificate Authority bundle files to the SDK using AWS_CA_BUNDLE environment variable or CustomCABundle session option.
+* `service/s3/s3crypto`: Add support for AES/CBC/PKCS5Padding (#1124)
+
+SDK Bug
+===
+* `service/rds`: Fixing issue when not providing `SourceRegion` on cross
+region operations (#1127)
+* `service/rds`: Enables cross region for `CopyDBClusterSnapshot` and
+`CreateDBCluster` (#1128)
+
+Release v1.7.8 (2017-03-10)
+===
+
+Service Client Updates
+---
+* `service/codedeploy`: Updates service paginators
+ * Add paginators for Codedeploy
+* `service/emr`: Updates service API, documentation, and paginators
+ * This release includes support for instance fleets in Amazon EMR.
+
+Release v1.7.7 (2017-03-09)
+===
+
+Service Client Updates
+---
+* `service/apigateway`: Updates service API, documentation, and paginators
+ * API Gateway has added support for ACM certificates on custom domain names. Both Amazon-issued certificates and uploaded third-part certificates are supported.
+* `service/clouddirectory`: Updates service API, documentation, and paginators
+ * Introduces a new Cloud Directory API that enables you to retrieve all available parent paths for any type of object (a node, leaf node, policy node, and index node) in a hierarchy.
+
+Release v1.7.6 (2017-03-09)
+===
+
+Service Client Updates
+---
+* `service/organizations`: Updates service documentation and examples
+ * Doc-only Update for Organizations: Add SDK Code Snippets
+* `service/workdocs`: Adds new service
+ * The Administrative SDKs for Amazon WorkDocs provides full administrator level access to WorkDocs site resources, allowing developers to integrate their applications to manage WorkDocs users, content and permissions programmatically
+
+Release v1.7.5 (2017-03-08)
+===
+
+Service Client Updates
+---
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Add support to using encrypted clusters as cross-region replication masters. Update CopyDBClusterSnapshot API to support encrypted cross region copy of Aurora cluster snapshots.
+
+Release v1.7.4 (2017-03-06)
+===
+
+Service Client Updates
+---
+* `service/budgets`: Updates service API and paginators
+ * When creating or editing a budget via the AWS Budgets API you can define notifications that are sent to subscribers when the actual or forecasted value for cost or usage exceeds the notificationThreshold associated with the budget notification object. Starting today, the maximum allowed value for the notificationThreshold was raised from 100 to 300. This change was made to give you more flexibility when setting budget notifications.
+* `service/cloudtrail`: Updates service documentation and paginators
+ * Doc-only update for AWSCloudTrail: Updated links/descriptions
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/opsworkscm`: Updates service API, documentation, and paginators
+ * OpsWorks for Chef Automate has added a new field "AssociatePublicIpAddress" to the CreateServer request, "CloudFormationStackArn" to the Server model and "TERMINATED" server state.
+
+
+Release v1.7.3 (2017-02-28)
+===
+
+Service Client Updates
+---
+* `service/mturk`: Renaming service
+ * service/mechanicalturkrequesterservice was renamed to service/mturk. Be sure to change any references of the old client to the new.
+
+Release v1.7.2 (2017-02-28)
+===
+
+Service Client Updates
+---
+* `service/dynamodb`: Updates service API and documentation
+ * Release notes: Time to Live (TTL) is a feature that allows you to define when items in a table expire and can be purged from the database, so that you don't have to track expired data and delete it manually. With TTL enabled on a DynamoDB table, you can set a timestamp for deletion on a per-item basis, allowing you to limit storage usage to only those records that are relevant.
+* `service/iam`: Updates service API, documentation, and paginators
+ * This release adds support for AWS Organizations service control policies (SCPs) to SimulatePrincipalPolicy operation. If there are SCPs associated with the simulated user's account, their effect on the result is captured in the OrganizationDecisionDetail element in the EvaluationResult.
+* `service/mechanicalturkrequesterservice`: Adds new service
+ * Amazon Mechanical Turk is a web service that provides an on-demand, scalable, human workforce to complete jobs that humans can do better than computers, for example, recognizing objects in photos.
+* `service/organizations`: Adds new service
+ * AWS Organizations is a web service that enables you to consolidate your multiple AWS accounts into an organization and centrally manage your accounts and their resources.
+* `service/dynamodbstreams`: Updates service API, documentation, and paginators
+* `service/waf`: Updates service API, documentation, and paginators
+ * Aws WAF - For GetSampledRequests action, changed max number of samples from 100 to 500.
+* `service/wafregional`: Updates service API, documentation, and paginators
+
Release v1.7.1 (2017-02-24)
===
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md
index e69de29bb..8a1927a39 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md
@@ -0,0 +1,5 @@
+### SDK Features
+
+### SDK Enhancements
+
+### SDK Bugs
diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
index 81edbfaeb..7c0186f0c 100644
--- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
@@ -64,6 +64,11 @@ Please be aware of the following notes prior to opening a pull request:
SDK's test coverage percentage are unlikely to be merged until tests have
been added.
+5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
+ Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
+ directly on these models. If you discover an issue with the models please
+ create a Github [issue](issues) describing the issue.
+
### Testing
To run the tests locally, running the `make unit` command will `go get` the
diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile
index fc2bc0cef..df9803c2a 100644
--- a/vendor/github.com/aws/aws-sdk-go/Makefile
+++ b/vendor/github.com/aws/aws-sdk-go/Makefile
@@ -5,7 +5,8 @@ LINTIGNORESTUTTER='service/[^/]+/(api|service)\.go:.+(and that stutters)'
LINTIGNOREINFLECT='service/[^/]+/(api|errors|service)\.go:.+(method|const) .+ should be '
LINTIGNOREINFLECTS3UPLOAD='service/s3/s3manager/upload\.go:.+struct field SSEKMSKeyId should be '
LINTIGNOREDEPS='vendor/.+\.go'
-UNIT_TEST_TAGS="example codegen"
+LINTIGNOREPKGCOMMENT='service/[^/]+/doc_custom.go:.+package comment should be of the form'
+UNIT_TEST_TAGS="example codegen awsinclude"
SDK_WITH_VENDOR_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/src")
SDK_ONLY_PKGS=$(shell go list ./... | grep -v "/vendor/")
@@ -64,6 +65,9 @@ integration: get-deps-tests integ-custom smoke-tests performance
integ-custom:
go test -tags "integration" ./awstesting/integration/customizations/...
+cleanup-integ:
+ go run -tags "integration" ./awstesting/cmd/bucket_cleanup/main.go "aws-sdk-go-integration"
+
smoke-tests: get-deps-tests
gucumber -go-tags "integration" ./awstesting/integration/smoke
@@ -123,7 +127,7 @@ verify: get-deps-verify lint vet
lint:
@echo "go lint SDK and vendor packages"
@lint=`if [ \( -z "${SDK_GO_1_4}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then golint ./...; else echo "skipping golint"; fi`; \
- lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD}`; \
+ lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD} -e ${LINTIGNOREPKGCOMMENT}`; \
echo "$$lint"; \
if [ "$$lint" != "" ] && [ "$$lint" != "skipping golint" ]; then exit 1; fi
@@ -149,6 +153,7 @@ get-deps-tests:
go get github.com/stretchr/testify
go get github.com/smartystreets/goconvey
go get golang.org/x/net/html
+ go get golang.org/x/net/http2
get-deps-verify:
@echo "go get SDK verification utilities"
diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md
index 8247981b7..d5e048a5f 100644
--- a/vendor/github.com/aws/aws-sdk-go/README.md
+++ b/vendor/github.com/aws/aws-sdk-go/README.md
@@ -1,11 +1,6 @@
-# AWS SDK for Go
+[![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
-
-[![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api)
-[![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go)
-[![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
-
+# AWS SDK for Go
aws-sdk-go is the official AWS SDK for the Go programming language.
@@ -33,16 +28,17 @@ These two processes will still include the `vendor` folder and it should be dele
## Getting Help
Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests.
+
* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag.
* Come join the AWS SDK for Go community chat on [gitter](https://gitter.im/aws/aws-sdk-go).
* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
-* If you think you may of found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new).
+* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new).
## Opening Issues
-If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the [existing issues]( https://github.com/aws/aws-sdk-go/issues) and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include repro case when appropriate.
+If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the [existing issues](https://github.com/aws/aws-sdk-go/issues) and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include repro case when appropriate.
-The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for GO please make use of the resources listed in the [Getting Help]( https://github.com/aws/aws-sdk-go#getting-help) section. Keeping the list of open issues lean will help us respond in a timely manner.
+The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for GO please make use of the resources listed in the [Getting Help](https://github.com/aws/aws-sdk-go#getting-help) section. Keeping the list of open issues lean will help us respond in a timely manner.
## Reference Documentation
@@ -54,80 +50,397 @@ The GitHub issues are intended for bug reports and feature requests. For help an
[`SDK Examples`](https://github.com/aws/aws-sdk-go/tree/master/example) - Included in the SDK's repo are a several hand crafted examples using the SDK features and AWS services.
-## Configuring Credentials
+## Overview of SDK's Packages
-Before using the SDK, ensure that you've configured credentials. The best
-way to configure credentials on a development machine is to use the
-`~/.aws/credentials` file, which might look like:
+The SDK is composed of two main components, SDK core, and service clients.
+The SDK core packages are all available under the aws package at the root of
+the SDK. Each client for a supported AWS service is available within its own
+package under the service folder at the root of the SDK.
-```
-[default]
-aws_access_key_id = AKID1234567890
-aws_secret_access_key = MY-SECRET-KEY
-```
+ * aws - SDK core, provides common shared types such as Config, Logger,
+ and utilities to make working with API parameters easier.
-You can learn more about the credentials file from this
-[blog post](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs).
+ * awserr - Provides the error interface that the SDK will use for all
+ errors that occur in the SDK's processing. This includes service API
+ response errors as well. The Error type is made up of a code and message.
+ Cast the SDK's returned error type to awserr.Error and call the Code
+ method to compare returned error to specific error codes. See the package's
+ documentation for additional values that can be extracted such as RequestID.
-Alternatively, you can set the following environment variables:
+ * credentials - Provides the types and built in credentials providers
+ the SDK will use to retrieve AWS credentials to make API requests with.
+ Nested under this folder are also additional credentials providers such as
+ stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles.
-```
-AWS_ACCESS_KEY_ID=AKID1234567890
-AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
-```
+ * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK.
+ Use this to lookup AWS service endpoint information such as which services
+ are in a region, and what regions a service is in. Constants are also provided
+ for all region identifiers, e.g UsWest2RegionID for "us-west-2".
-### AWS shared config file (`~/.aws/config`)
-The AWS SDK for Go added support the shared config file in release [v1.3.0](https://github.com/aws/aws-sdk-go/releases/tag/v1.3.0). You can opt into enabling support for the shared config by setting the environment variable `AWS_SDK_LOAD_CONFIG` to a truthy value. See the [Session](https://github.com/aws/aws-sdk-go/wiki/sessions) wiki for more information about this feature.
+ * session - Provides initial default configuration, and load
+ configuration from external sources such as environment and shared
+ credentials file.
-## Using the Go SDK
+ * request - Provides the API request sending, and retry logic for the SDK.
+ This package also includes utilities for defining your own request
+ retryer, and configuring how the SDK processes the request.
-To use a service in the SDK, create a service variable by calling the `New()`
-function. Once you have a service client, you can call API operations which each
-return response data and a possible error.
+ * service - Clients for AWS services. All services supported by the SDK are
+ available under this folder.
-To list a set of instance IDs from EC2, you could run:
+## How to Use the SDK's AWS Service Clients
+
+The SDK includes the Go types and utilities you can use to make requests to
+AWS service APIs. Within the service folder at the root of the SDK you'll find
+a package for each AWS service the SDK supports. All service clients follows
+a common pattern of creation and usage.
+
+When creating a client for an AWS service you'll first need to have a Session
+value constructed. The Session provides shared configuration that can be shared
+between your service clients. When service clients are created you can pass
+in additional configuration via the aws.Config type to override configuration
+provided by in the Session to create service client instances with custom
+configuration.
+
+Once the service's client is created you can use it to make API requests the
+AWS service. These clients are safe to use concurrently.
+
+## Configuring the SDK
+
+In the AWS SDK for Go, you can configure settings for service clients, such
+as the log level and maximum number of retries. Most settings are optional;
+however, for each service client, you must specify a region and your credentials.
+The SDK uses these values to send requests to the correct AWS region and sign
+requests with the correct credentials. You can specify these values as part
+of a session or as environment variables.
+
+See the SDK's [configuration guide][config_guide] for more information.
+
+See the [session][session_pkg] package documentation for more information on how to use Session
+with the SDK.
+
+See the [Config][config_typ] type in the [aws][aws_pkg] package for more information on configuration
+options.
+
+[config_guide]: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
+[session_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/session/
+[config_typ]: https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+[aws_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/
+
+### Configuring Credentials
+
+When using the SDK you'll generally need your AWS credentials to authenticate
+with AWS services. The SDK supports multiple methods of supporting these
+credentials. By default the SDK will source credentials automatically from
+its default credential chain. See the session package for more information
+on this chain, and how to configure it. The common items in the credential
+chain are the following:
+
+ * Environment Credentials - Set of environment variables that are useful
+ when sub processes are created for specific roles.
+
+ * Shared Credentials file (~/.aws/credentials) - This file stores your
+ credentials based on a profile name and is useful for local development.
+
+ * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials
+ to application running on an EC2 instance. This removes the need to manage
+ credential files in production.
+
+Credentials can be configured in code as well by setting the Config's Credentials
+value to a custom provider or using one of the providers included with the
+SDK to bypass the default credential chain and use a custom one. This is
+helpful when you want to instruct the SDK to only use a specific set of
+credentials or providers.
+
+This example creates a credential provider for assuming an IAM role, "myRoleARN"
+and configures the S3 service client to use that role for API requests.
```go
-package main
+ // Initial credentials loaded from SDK's default credential chain. Such as
+ // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+ // Role. These credentials will be used to to make the STS Assume Role API.
+ sess := session.Must(session.NewSession())
-import (
- "fmt"
+ // Create the credentials from AssumeRoleProvider to assume the role
+ // referenced by the "myRoleARN" ARN.
+ creds := stscreds.NewCredentials(sess, "myRoleArn")
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/ec2"
-)
-
-func main() {
- sess, err := session.NewSession()
- if err != nil {
- panic(err)
- }
-
- // Create an EC2 service object in the "us-west-2" region
- // Note that you can also configure your region globally by
- // exporting the AWS_REGION environment variable
- svc := ec2.New(sess, &aws.Config{Region: aws.String("us-west-2")})
-
- // Call the DescribeInstances Operation
- resp, err := svc.DescribeInstances(nil)
- if err != nil {
- panic(err)
- }
-
- // resp has all of the response data, pull out instance IDs:
- fmt.Println("> Number of reservation sets: ", len(resp.Reservations))
- for idx, res := range resp.Reservations {
- fmt.Println(" > Number of instances: ", len(res.Instances))
- for _, inst := range resp.Reservations[idx].Instances {
- fmt.Println(" - Instance ID: ", *inst.InstanceId)
- }
- }
-}
+ // Create service client value configured for credentials
+ // from assumed role.
+ svc := s3.New(sess, &aws.Config{Credentials: creds})
```
-You can find more information and operations in our
-[API documentation](http://docs.aws.amazon.com/sdk-for-go/api/).
+See the [credentials][credentials_pkg] package documentation for more information on credential
+providers included with the SDK, and how to customize the SDK's usage of
+credentials.
+
+The SDK has support for the shared configuration file (~/.aws/config). This
+support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1",
+or enabling the feature in code when creating a Session via the
+Option's SharedConfigState parameter.
+
+```go
+ sess := session.Must(session.NewSessionWithOptions(session.Options{
+ SharedConfigState: session.SharedConfigEnable,
+ }))
+```
+
+[credentials_pkg]: ttps://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
+
+### Configuring AWS Region
+
+In addition to the credentials you'll need to specify the region the SDK
+will use to make AWS API requests to. In the SDK you can specify the region
+either with an environment variable, or directly in code when a Session or
+service client is created. The last value specified in code wins if the region
+is specified multiple ways.
+
+To set the region via the environment variable set the "AWS_REGION" to the
+region you want to the SDK to use. Using this method to set the region will
+allow you to run your application in multiple regions without needing additional
+code in the application to select the region.
+
+ AWS_REGION=us-west-2
+
+The endpoints package includes constants for all regions the SDK knows. The
+values are all suffixed with RegionID. These values are helpful, because they
+reduce the need to type the region string manually.
+
+To set the region on a Session use the aws package's Config struct parameter
+Region to the AWS region you want the service clients created from the session to
+use. This is helpful when you want to create multiple service clients, and
+all of the clients make API requests to the same region.
+
+```go
+ sess := session.Must(session.NewSession(&aws.Config{
+ Region: aws.String(endpoints.UsWest2RegionID),
+ }))
+```
+
+See the [endpoints][endpoints_pkg] package for the AWS Regions and Endpoints metadata.
+
+In addition to setting the region when creating a Session you can also set
+the region on a per service client bases. This overrides the region of a
+Session. This is helpful when you want to create service clients in specific
+regions different from the Session's region.
+
+```go
+ svc := s3.New(sess, &aws.Config{
+ Region: aws.String(endpoints.UsWest2RegionID),
+ })
+```
+
+See the [Config][config_typ] type in the [aws][aws_pkg] package for more information and additional
+options such as setting the Endpoint, and other service client configuration options.
+
+[endpoints_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/
+
+## Making API Requests
+
+Once the client is created you can make an API request to the service.
+Each API method takes a input parameter, and returns the service response
+and an error. The SDK provides methods for making the API call in multiple ways.
+
+In this list we'll use the S3 ListObjects API as an example for the different
+ways of making API requests.
+
+ * ListObjects - Base API operation that will make the API request to the service.
+
+ * ListObjectsRequest - API methods suffixed with Request will construct the
+ API request, but not send it. This is also helpful when you want to get a
+ presigned URL for a request, and share the presigned URL instead of your
+ application making the request directly.
+
+ * ListObjectsPages - Same as the base API operation, but uses a callback to
+ automatically handle pagination of the API's response.
+
+ * ListObjectsWithContext - Same as base API operation, but adds support for
+ the Context pattern. This is helpful for controlling the canceling of in
+ flight requests. See the Go standard library context package for more
+ information. This method also takes request package's Option functional
+ options as the variadic argument for modifying how the request will be
+ made, or extracting information from the raw HTTP response.
+
+ * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for
+ the Context pattern. Similar to ListObjectsWithContext this method also
+ takes the request package's Option function option types as the variadic
+ argument.
+
+In addition to the API operations the SDK also includes several higher level
+methods that abstract checking for and waiting for an AWS resource to be in
+a desired state. In this list we'll use WaitUntilBucketExists to demonstrate
+the different forms of waiters.
+
+ * WaitUntilBucketExists. - Method to make API request to query an AWS service for
+ a resource's state. Will return successfully when that state is accomplished.
+
+ * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds
+ support for the Context pattern. In addition these methods take request
+ package's WaiterOptions to configure the waiter, and how underlying request
+ will be made by the SDK.
+
+The API method will document which error codes the service might return for
+the operation. These errors will also be available as const strings prefixed
+with "ErrCode" in the service client's package. If there are no errors listed
+in the API's SDK documentation you'll need to consult the AWS service's API
+documentation for the errors that could be returned.
+
+```go
+ ctx := context.Background()
+
+ result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{
+ Bucket: aws.String("my-bucket"),
+ Key: aws.String("my-key"),
+ })
+ if err != nil {
+ // Cast err to awserr.Error to handle specific error codes.
+ aerr, ok := err.(awserr.Error)
+ if ok && aerr.Code() == s3.ErrCodeNoSuchKey {
+ // Specific error code handling
+ }
+ return err
+ }
+
+ // Make sure to close the body when done with it for S3 GetObject APIs or
+ // will leak connections.
+ defer result.Body.Close()
+
+ fmt.Println("Object Size:", aws.StringValue(result.ContentLength))
+```
+
+### API Request Pagination and Resource Waiters
+
+Pagination helper methods are suffixed with "Pages", and provide the
+functionality needed to round trip API page requests. Pagination methods
+take a callback function that will be called for each page of the API's response.
+
+```go
+ objects := []string{}
+ err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{
+ Bucket: aws.String(myBucket),
+ }, func(p *s3.ListObjectsOutput, lastPage bool) bool {
+ for _, o := range p.Contents {
+ objects = append(objects, aws.StringValue(o.Key))
+ }
+ return true // continue paging
+ })
+ if err != nil {
+ panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err))
+ }
+
+ fmt.Println("Objects in bucket:", objects)
+```
+
+Waiter helper methods provide the functionality to wait for an AWS resource
+state. These methods abstract the logic needed to to check the state of an
+AWS resource, and wait until that resource is in a desired state. The waiter
+will block until the resource is in the state that is desired, an error occurs,
+or the waiter times out. If a resource times out the error code returned will
+be request.WaiterResourceNotReadyErrorCode.
+
+```go
+ err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{
+ Bucket: aws.String(myBucket),
+ })
+ if err != nil {
+ aerr, ok := err.(awserr.Error)
+ if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode {
+ fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist")
+ }
+ panic(fmt.Errorf("failed to wait for bucket to exist, %v", err))
+ }
+ fmt.Println("Bucket", myBucket, "exists")
+```
+
+## Complete SDK Example
+
+This example shows a complete working Go file which will upload a file to S3
+and use the Context pattern to implement timeout logic that will cancel the
+request if it takes too long. This example highlights how to use sessions,
+create a service client, make a request, handle the error, and process the
+response.
+
+```go
+ package main
+
+ import (
+ "context"
+ "flag"
+ "fmt"
+ "os"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/s3"
+ )
+
+ // Uploads a file to S3 given a bucket and object key. Also takes a duration
+ // value to terminate the update if it doesn't complete within that time.
+ //
+ // The AWS Region needs to be provided in the AWS shared config or on the
+ // environment variable as `AWS_REGION`. Credentials also must be provided
+ // Will default to shared config file, but can load from environment if provided.
+ //
+ // Usage:
+ // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail
+ // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt
+ func main() {
+ var bucket, key string
+ var timeout time.Duration
+
+ flag.StringVar(&bucket, "b", "", "Bucket name.")
+ flag.StringVar(&key, "k", "", "Object key name.")
+ flag.DurationVar(&timeout, "d", 0, "Upload timeout.")
+ flag.Parse()
+
+ // All clients require a Session. The Session provides the client with
+ // shared configuration such as region, endpoint, and credentials. A
+ // Session should be shared where possible to take advantage of
+ // configuration and credential caching. See the session package for
+ // more information.
+ sess := session.Must(session.NewSession())
+
+ // Create a new instance of the service's client with a Session.
+ // Optional aws.Config values can also be provided as variadic arguments
+ // to the New function. This option allows you to provide service
+ // specific configuration.
+ svc := s3.New(sess)
+
+ // Create a context with a timeout that will abort the upload if it takes
+ // more than the passed in timeout.
+ ctx := context.Background()
+ var cancelFn func()
+ if timeout > 0 {
+ ctx, cancelFn = context.WithTimeout(ctx, timeout)
+ }
+ // Ensure the context is canceled to prevent leaking.
+ // See context package for more information, https://golang.org/pkg/context/
+ defer cancelFn()
+
+ // Uploads the object to S3. The Context will interrupt the request if the
+ // timeout expires.
+ _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{
+ Bucket: aws.String(bucket),
+ Key: aws.String(key),
+ Body: os.Stdin,
+ })
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode {
+ // If the SDK can determine the request or retry delay was canceled
+ // by a context the CanceledErrorCode error code will be returned.
+ fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err)
+ } else {
+ fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err)
+ }
+ os.Exit(1)
+ }
+
+ fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key)
+ }
+```
## License
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
index 17fc76a0f..788fe6e27 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
@@ -2,7 +2,6 @@ package client
import (
"fmt"
- "net/http/httputil"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client/metadata"
@@ -46,7 +45,7 @@ func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, op
svc := &Client{
Config: cfg,
ClientInfo: info,
- Handlers: handlers,
+ Handlers: handlers.Copy(),
}
switch retryer, ok := cfg.Retryer.(request.Retryer); {
@@ -86,61 +85,6 @@ func (c *Client) AddDebugHandlers() {
return
}
- c.Handlers.Send.PushFront(logRequest)
- c.Handlers.Send.PushBack(logResponse)
-}
-
-const logReqMsg = `DEBUG: Request %s/%s Details:
----[ REQUEST POST-SIGN ]-----------------------------
-%s
------------------------------------------------------`
-
-const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
----[ REQUEST DUMP ERROR ]-----------------------------
-%s
------------------------------------------------------`
-
-func logRequest(r *request.Request) {
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- if logBody {
- // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
- // Body as a NoOpCloser and will not be reset after read by the HTTP
- // client reader.
- r.ResetBody()
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
-}
-
-const logRespMsg = `DEBUG: Response %s/%s Details:
----[ RESPONSE ]--------------------------------------
-%s
------------------------------------------------------`
-
-const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
----[ RESPONSE DUMP ERROR ]-----------------------------
-%s
------------------------------------------------------`
-
-func logResponse(r *request.Request) {
- var msg = "no response data"
- if r.HTTPResponse != nil {
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- dumpedBody, err := httputil.DumpResponse(r.HTTPResponse, logBody)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- msg = string(dumpedBody)
- } else if r.Error != nil {
- msg = r.Error.Error()
- }
- r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, msg))
+ c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest})
+ c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse})
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
index 43a3676b7..e25a460fb 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
@@ -15,11 +15,11 @@ import (
// the MaxRetries method:
//
// type retryer struct {
-// service.DefaultRetryer
+// client.DefaultRetryer
// }
//
// // This implementation always has 100 max retries
-// func (d retryer) MaxRetries() uint { return 100 }
+// func (d retryer) MaxRetries() int { return 100 }
type DefaultRetryer struct {
NumMaxRetries int
}
@@ -54,6 +54,12 @@ func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
// ShouldRetry returns true if the request should be retried.
func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
+ // If one of the other handlers already set the retry state
+ // we don't want to override it based on the service's state
+ if r.Retryable != nil {
+ return *r.Retryable
+ }
+
if r.HTTPResponse.StatusCode >= 500 {
return true
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
new file mode 100644
index 000000000..1f39c91f2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
@@ -0,0 +1,108 @@
+package client
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http/httputil"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+const logReqMsg = `DEBUG: Request %s/%s Details:
+---[ REQUEST POST-SIGN ]-----------------------------
+%s
+-----------------------------------------------------`
+
+const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
+---[ REQUEST DUMP ERROR ]-----------------------------
+%s
+------------------------------------------------------`
+
+type logWriter struct {
+ // Logger is what we will use to log the payload of a response.
+ Logger aws.Logger
+ // buf stores the contents of what has been read
+ buf *bytes.Buffer
+}
+
+func (logger *logWriter) Write(b []byte) (int, error) {
+ return logger.buf.Write(b)
+}
+
+type teeReaderCloser struct {
+ // io.Reader will be a tee reader that is used during logging.
+ // This structure will read from a body and write the contents to a logger.
+ io.Reader
+ // Source is used just to close when we are done reading.
+ Source io.ReadCloser
+}
+
+func (reader *teeReaderCloser) Close() error {
+ return reader.Source.Close()
+}
+
+func logRequest(r *request.Request) {
+ logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
+ dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
+ if err != nil {
+ r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
+ return
+ }
+
+ if logBody {
+ // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
+ // Body as a NoOpCloser and will not be reset after read by the HTTP
+ // client reader.
+ r.ResetBody()
+ }
+
+ r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
+}
+
+const logRespMsg = `DEBUG: Response %s/%s Details:
+---[ RESPONSE ]--------------------------------------
+%s
+-----------------------------------------------------`
+
+const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
+---[ RESPONSE DUMP ERROR ]-----------------------------
+%s
+-----------------------------------------------------`
+
+func logResponse(r *request.Request) {
+ lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)}
+ r.HTTPResponse.Body = &teeReaderCloser{
+ Reader: io.TeeReader(r.HTTPResponse.Body, lw),
+ Source: r.HTTPResponse.Body,
+ }
+
+ handlerFn := func(req *request.Request) {
+ body, err := httputil.DumpResponse(req.HTTPResponse, false)
+ if err != nil {
+ lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err))
+ return
+ }
+
+ b, err := ioutil.ReadAll(lw.buf)
+ if err != nil {
+ lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err))
+ return
+ }
+ lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body)))
+ if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) {
+ lw.Logger.Log(string(b))
+ }
+ }
+
+ const handlerName = "awsdk.client.LogResponse.ResponseBody"
+
+ r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{
+ Name: handlerName, Fn: handlerFn,
+ })
+ r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{
+ Name: handlerName, Fn: handlerFn,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
index f5a7c3792..ae3a28696 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go
@@ -53,6 +53,13 @@ type Config struct {
// to use based on region.
EndpointResolver endpoints.Resolver
+ // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call
+ // ShouldRetry regardless of whether or not if request.Retryable is set.
+ // This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck
+ // is not set, then ShouldRetry will only be called if request.Retryable is nil.
+ // Proper handling of the request.Retryable field is important when setting this field.
+ EnforceShouldRetryCheck *bool
+
// The region to send requests to. This parameter is required and must
// be configured globally or on a per-client basis unless otherwise
// noted. A full list of regions is found in the "Regions and Endpoints"
@@ -88,7 +95,7 @@ type Config struct {
// recoverable failures.
//
// When nil or the value does not implement the request.Retryer interface,
- // the request.DefaultRetryer will be used.
+ // the client.DefaultRetryer will be used.
//
// When both Retryer and MaxRetries are non-nil, the former is used and
// the latter ignored.
@@ -187,6 +194,10 @@ type Config struct {
// request delays. This value should only be used for testing. To adjust
// the delay of a request see the aws/client.DefaultRetryer and
// aws/request.Retryer.
+ //
+ // SleepDelay will prevent any Context from being used for canceling retry
+ // delay of an API operation. It is recommended to not use SleepDelay at all
+ // and specify a Retryer instead.
SleepDelay func(time.Duration)
// DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests.
@@ -439,6 +450,10 @@ func mergeInConfig(dst *Config, other *Config) {
if other.DisableRestProtocolURICleaning != nil {
dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning
}
+
+ if other.EnforceShouldRetryCheck != nil {
+ dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck
+ }
}
// Copy will return a shallow copy of the Config object. If any additional
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context.go b/vendor/github.com/aws/aws-sdk-go/aws/context.go
new file mode 100644
index 000000000..79f426853
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context.go
@@ -0,0 +1,71 @@
+package aws
+
+import (
+ "time"
+)
+
+// Context is an copy of the Go v1.7 stdlib's context.Context interface.
+// It is represented as a SDK interface to enable you to use the "WithContext"
+// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
+//
+// See https://golang.org/pkg/context on how to use contexts.
+type Context interface {
+ // Deadline returns the time when work done on behalf of this context
+ // should be canceled. Deadline returns ok==false when no deadline is
+ // set. Successive calls to Deadline return the same results.
+ Deadline() (deadline time.Time, ok bool)
+
+ // Done returns a channel that's closed when work done on behalf of this
+ // context should be canceled. Done may return nil if this context can
+ // never be canceled. Successive calls to Done return the same value.
+ Done() <-chan struct{}
+
+ // Err returns a non-nil error value after Done is closed. Err returns
+ // Canceled if the context was canceled or DeadlineExceeded if the
+ // context's deadline passed. No other values for Err are defined.
+ // After Done is closed, successive calls to Err return the same value.
+ Err() error
+
+ // Value returns the value associated with this context for key, or nil
+ // if no value is associated with key. Successive calls to Value with
+ // the same key returns the same result.
+ //
+ // Use context values only for request-scoped data that transits
+ // processes and API boundaries, not for passing optional parameters to
+ // functions.
+ Value(key interface{}) interface{}
+}
+
+// BackgroundContext returns a context that will never be canceled, has no
+// values, and no deadline. This context is used by the SDK to provide
+// backwards compatibility with non-context API operations and functionality.
+//
+// Go 1.6 and before:
+// This context function is equivalent to context.Background in the Go stdlib.
+//
+// Go 1.7 and later:
+// The context returned will be the value returned by context.Background()
+//
+// See https://golang.org/pkg/context for more information on Contexts.
+func BackgroundContext() Context {
+ return backgroundCtx
+}
+
+// SleepWithContext will wait for the timer duration to expire, or the context
+// is canceled. Which ever happens first. If the context is canceled the Context's
+// error will be returned.
+//
+// Expects Context to always return a non-nil error if the Done channel is closed.
+func SleepWithContext(ctx Context, dur time.Duration) error {
+ t := time.NewTimer(dur)
+ defer t.Stop()
+
+ select {
+ case <-t.C:
+ break
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
new file mode 100644
index 000000000..8fdda5303
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
@@ -0,0 +1,41 @@
+// +build !go1.7
+
+package aws
+
+import "time"
+
+// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
+// provide a 1.6 and 1.5 safe version of context that is compatible with Go
+// 1.7's Context.
+//
+// An emptyCtx is never canceled, has no values, and has no deadline. It is not
+// struct{}, since vars of this type must have distinct addresses.
+type emptyCtx int
+
+func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
+ return
+}
+
+func (*emptyCtx) Done() <-chan struct{} {
+ return nil
+}
+
+func (*emptyCtx) Err() error {
+ return nil
+}
+
+func (*emptyCtx) Value(key interface{}) interface{} {
+ return nil
+}
+
+func (e *emptyCtx) String() string {
+ switch e {
+ case backgroundCtx:
+ return "aws.BackgroundContext"
+ }
+ return "unknown empty Context"
+}
+
+var (
+ backgroundCtx = new(emptyCtx)
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go
new file mode 100644
index 000000000..064f75c92
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go
@@ -0,0 +1,9 @@
+// +build go1.7
+
+package aws
+
+import "context"
+
+var (
+ backgroundCtx = context.Background()
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
index 3b73a7da7..ff5d58e06 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
@@ -311,6 +311,24 @@ func TimeValue(v *time.Time) time.Time {
return time.Time{}
}
+// SecondsTimeValue converts an int64 pointer to a time.Time value
+// representing seconds since Epoch or time.Time{} if the pointer is nil.
+func SecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix((*v / 1000), 0)
+ }
+ return time.Time{}
+}
+
+// MillisecondsTimeValue converts an int64 pointer to a time.Time value
+// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
+func MillisecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix(0, (*v * 1000000))
+ }
+ return time.Time{}
+}
+
// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
// The result is undefined if the Unix time cannot be represented by an int64.
// Which includes calling TimeUnixMilli on a zero Time is undefined.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
index 8a7bafc78..495e3ef62 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
@@ -27,7 +27,7 @@ type lener interface {
// or will use the HTTPRequest.Header's "Content-Length" if defined. If unable
// to determine request body length and no "Content-Length" was specified it will panic.
//
-// The Content-Length will only be aded to the request if the length of the body
+// The Content-Length will only be added to the request if the length of the body
// is greater than 0. If the body is empty or the current `Content-Length`
// header is <= 0, the header will also be stripped.
var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) {
@@ -71,8 +71,8 @@ var reStatusCode = regexp.MustCompile(`^(\d{3})`)
// ValidateReqSigHandler is a request handler to ensure that the request's
// signature doesn't expire before it is sent. This can happen when a request
-// is built and signed signficantly before it is sent. Or significant delays
-// occur whne retrying requests that would cause the signature to expire.
+// is built and signed significantly before it is sent. Or significant delays
+// occur when retrying requests that would cause the signature to expire.
var ValidateReqSigHandler = request.NamedHandler{
Name: "core.ValidateReqSigHandler",
Fn: func(r *request.Request) {
@@ -98,44 +98,95 @@ var ValidateReqSigHandler = request.NamedHandler{
}
// SendHandler is a request handler to send service request using HTTP client.
-var SendHandler = request.NamedHandler{Name: "core.SendHandler", Fn: func(r *request.Request) {
- var err error
- r.HTTPResponse, err = r.Config.HTTPClient.Do(r.HTTPRequest)
- if err != nil {
- // Prevent leaking if an HTTPResponse was returned. Clean up
- // the body.
- if r.HTTPResponse != nil {
- r.HTTPResponse.Body.Close()
+var SendHandler = request.NamedHandler{
+ Name: "core.SendHandler",
+ Fn: func(r *request.Request) {
+ sender := sendFollowRedirects
+ if r.DisableFollowRedirects {
+ sender = sendWithoutFollowRedirects
}
- // Capture the case where url.Error is returned for error processing
- // response. e.g. 301 without location header comes back as string
- // error and r.HTTPResponse is nil. Other url redirect errors will
- // comeback in a similar method.
- if e, ok := err.(*url.Error); ok && e.Err != nil {
- if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
- code, _ := strconv.ParseInt(s[1], 10, 64)
- r.HTTPResponse = &http.Response{
- StatusCode: int(code),
- Status: http.StatusText(int(code)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- return
- }
+
+ if request.NoBody == r.HTTPRequest.Body {
+ // Strip off the request body if the NoBody reader was used as a
+ // place holder for a request body. This prevents the SDK from
+ // making requests with a request body when it would be invalid
+ // to do so.
+ //
+ // Use a shallow copy of the http.Request to ensure the race condition
+ // of transport on Body will not trigger
+ reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest
+ reqCopy.Body = nil
+ r.HTTPRequest = &reqCopy
+ defer func() {
+ r.HTTPRequest = reqOrig
+ }()
}
- if r.HTTPResponse == nil {
- // Add a dummy request response object to ensure the HTTPResponse
- // value is consistent.
+
+ var err error
+ r.HTTPResponse, err = sender(r)
+ if err != nil {
+ handleSendError(r, err)
+ }
+ },
+}
+
+func sendFollowRedirects(r *request.Request) (*http.Response, error) {
+ return r.Config.HTTPClient.Do(r.HTTPRequest)
+}
+
+func sendWithoutFollowRedirects(r *request.Request) (*http.Response, error) {
+ transport := r.Config.HTTPClient.Transport
+ if transport == nil {
+ transport = http.DefaultTransport
+ }
+
+ return transport.RoundTrip(r.HTTPRequest)
+}
+
+func handleSendError(r *request.Request, err error) {
+ // Prevent leaking if an HTTPResponse was returned. Clean up
+ // the body.
+ if r.HTTPResponse != nil {
+ r.HTTPResponse.Body.Close()
+ }
+ // Capture the case where url.Error is returned for error processing
+ // response. e.g. 301 without location header comes back as string
+ // error and r.HTTPResponse is nil. Other URL redirect errors will
+ // comeback in a similar method.
+ if e, ok := err.(*url.Error); ok && e.Err != nil {
+ if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
+ code, _ := strconv.ParseInt(s[1], 10, 64)
r.HTTPResponse = &http.Response{
- StatusCode: int(0),
- Status: http.StatusText(int(0)),
+ StatusCode: int(code),
+ Status: http.StatusText(int(code)),
Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
}
+ return
}
- // Catch all other request errors.
- r.Error = awserr.New("RequestError", "send request failed", err)
- r.Retryable = aws.Bool(true) // network errors are retryable
}
-}}
+ if r.HTTPResponse == nil {
+ // Add a dummy request response object to ensure the HTTPResponse
+ // value is consistent.
+ r.HTTPResponse = &http.Response{
+ StatusCode: int(0),
+ Status: http.StatusText(int(0)),
+ Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
+ }
+ }
+ // Catch all other request errors.
+ r.Error = awserr.New("RequestError", "send request failed", err)
+ r.Retryable = aws.Bool(true) // network errors are retryable
+
+ // Override the error with a context canceled error, if that was canceled.
+ ctx := r.Context()
+ select {
+ case <-ctx.Done():
+ r.Error = awserr.New(request.CanceledErrorCode,
+ "request context canceled", ctx.Err())
+ r.Retryable = aws.Bool(false)
+ default:
+ }
+}
// ValidateResponseHandler is a request handler to validate service response.
var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) {
@@ -150,13 +201,22 @@ var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseH
var AfterRetryHandler = request.NamedHandler{Name: "core.AfterRetryHandler", Fn: func(r *request.Request) {
// If one of the other handlers already set the retry state
// we don't want to override it based on the service's state
- if r.Retryable == nil {
+ if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) {
r.Retryable = aws.Bool(r.ShouldRetry(r))
}
if r.WillRetry() {
r.RetryDelay = r.RetryRules(r)
- r.Config.SleepDelay(r.RetryDelay)
+
+ if sleepFn := r.Config.SleepDelay; sleepFn != nil {
+ // Support SleepDelay for backwards compatibility and testing
+ sleepFn(r.RetryDelay)
+ } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil {
+ r.Error = awserr.New(request.CanceledErrorCode,
+ "request context canceled", err)
+ r.Retryable = aws.Bool(false)
+ return
+ }
// when the expired token exception occurs the credentials
// need to be expired locally so that the next request to
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
index 6efc77bf0..f298d6596 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
@@ -13,7 +13,7 @@ var (
//
// @readonly
ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders",
- `no valid providers in chain. Deprecated.
+ `no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors`,
nil)
)
@@ -39,16 +39,18 @@ var (
// does not return any credentials ChainProvider will return the error
// ErrNoValidProvidersFoundInChain
//
-// creds := NewChainCredentials(
-// []Provider{
-// &EnvProvider{},
-// &EC2RoleProvider{
+// creds := credentials.NewChainCredentials(
+// []credentials.Provider{
+// &credentials.EnvProvider{},
+// &ec2rolecreds.EC2RoleProvider{
// Client: ec2metadata.New(sess),
// },
// })
//
// // Usage of ChainCredentials with aws.Config
-// svc := ec2.New(&aws.Config{Credentials: creds})
+// svc := ec2.New(session.Must(session.NewSession(&aws.Config{
+// Credentials: creds,
+// })))
//
type ChainProvider struct {
Providers []Provider
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
index 7b8ebf5f9..42416fc2f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
@@ -14,7 +14,7 @@
//
// Example of using the environment variable credentials.
//
-// creds := NewEnvCredentials()
+// creds := credentials.NewEnvCredentials()
//
// // Retrieve the credentials value
// credValue, err := creds.Get()
@@ -26,7 +26,7 @@
// This may be helpful to proactively expire credentials and refresh them sooner
// than they would naturally expire on their own.
//
-// creds := NewCredentials(&EC2RoleProvider{})
+// creds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{})
// creds.Expire()
// credsValue, err := creds.Get()
// // New credentials will be retrieved instead of from cache.
@@ -43,7 +43,7 @@
// func (m *MyProvider) Retrieve() (Value, error) {...}
// func (m *MyProvider) IsExpired() bool {...}
//
-// creds := NewCredentials(&MyProvider{})
+// creds := credentials.NewCredentials(&MyProvider{})
// credValue, err := creds.Get()
//
package credentials
@@ -60,7 +60,9 @@ import (
// when making service API calls. For example, when accessing public
// s3 buckets.
//
-// svc := s3.New(&aws.Config{Credentials: AnonymousCredentials})
+// svc := s3.New(session.Must(session.NewSession(&aws.Config{
+// Credentials: credentials.AnonymousCredentials,
+// })))
// // Access public S3 buckets.
//
// @readonly
@@ -88,7 +90,7 @@ type Value struct {
// The Provider should not need to implement its own mutexes, because
// that will be managed by Credentials.
type Provider interface {
- // Refresh returns nil if it successfully retrieved the value.
+ // Retrieve returns nil if it successfully retrieved the value.
// Error is returned if the value were not obtainable, or empty.
Retrieve() (Value, error)
@@ -97,6 +99,27 @@ type Provider interface {
IsExpired() bool
}
+// An ErrorProvider is a stub credentials provider that always returns an error
+// this is used by the SDK when construction a known provider is not possible
+// due to an error.
+type ErrorProvider struct {
+ // The error to be returned from Retrieve
+ Err error
+
+ // The provider name to set on the Retrieved returned Value
+ ProviderName string
+}
+
+// Retrieve will always return the error that the ErrorProvider was created with.
+func (p ErrorProvider) Retrieve() (Value, error) {
+ return Value{ProviderName: p.ProviderName}, p.Err
+}
+
+// IsExpired will always return not expired.
+func (p ErrorProvider) IsExpired() bool {
+ return false
+}
+
// A Expiry provides shared expiration logic to be used by credentials
// providers to implement expiry functionality.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
index 96655bc46..c14231a16 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
@@ -29,6 +29,7 @@ var (
// Environment variables used:
//
// * Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
+//
// * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY
type EnvProvider struct {
retrieved bool
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
index 7fb7cbf0d..51e21e0f3 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
@@ -3,11 +3,11 @@ package credentials
import (
"fmt"
"os"
- "path/filepath"
"github.com/go-ini/ini"
"github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
)
// SharedCredsProviderName provides a name of SharedCreds provider
@@ -15,8 +15,6 @@ const SharedCredsProviderName = "SharedCredentialsProvider"
var (
// ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
- //
- // @readonly
ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
)
@@ -117,22 +115,23 @@ func loadProfile(filename, profile string) (Value, error) {
//
// Will return an error if the user's home directory path cannot be found.
func (p *SharedCredentialsProvider) filename() (string, error) {
- if p.Filename == "" {
- if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); p.Filename != "" {
- return p.Filename, nil
- }
-
- homeDir := os.Getenv("HOME") // *nix
- if homeDir == "" { // Windows
- homeDir = os.Getenv("USERPROFILE")
- }
- if homeDir == "" {
- return "", ErrSharedCredentialsHomeNotFound
- }
-
- p.Filename = filepath.Join(homeDir, ".aws", "credentials")
+ if len(p.Filename) != 0 {
+ return p.Filename, nil
}
+ if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
+ return p.Filename, nil
+ }
+
+ if home := shareddefaults.UserHomeDir(); len(home) == 0 {
+ // Backwards compatibility of home directly not found error being returned.
+ // This error is too verbose, failure when opening the file would of been
+ // a better error to return.
+ return "", ErrSharedCredentialsHomeNotFound
+ }
+
+ p.Filename = shareddefaults.SharedCredentialsFilename()
+
return p.Filename, nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
index b84062332..4108e433e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
@@ -12,7 +12,7 @@ between multiple Credentials, Sessions or service clients.
Assume Role
To assume an IAM role using STS with the SDK you can create a new Credentials
-with the SDKs's stscreds package.
+with the SDKs's stscreds package.
// Initial credentials loaded from SDK's default credential chain. Such as
// the environment, shared credentials (~/.aws/credentials), or EC2 Instance
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
index 0ef55040a..07afe3b8e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
@@ -10,10 +10,12 @@ package defaults
import (
"fmt"
"net/http"
+ "net/url"
"os"
"time"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/corehandlers"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
@@ -56,7 +58,6 @@ func Config() *aws.Config {
WithMaxRetries(aws.UseServiceDefaultRetries).
WithLogger(aws.NewDefaultLogger()).
WithLogLevel(aws.LogOff).
- WithSleepDelay(time.Sleep).
WithEndpointResolver(endpoints.DefaultResolver())
}
@@ -97,23 +98,51 @@ func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credenti
})
}
-// RemoteCredProvider returns a credenitials provider for the default remote
+const (
+ httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
+ ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
+)
+
+// RemoteCredProvider returns a credentials provider for the default remote
// endpoints such as EC2 or ECS Roles.
func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
- ecsCredURI := os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
+ if u := os.Getenv(httpProviderEnvVar); len(u) > 0 {
+ return localHTTPCredProvider(cfg, handlers, u)
+ }
- if len(ecsCredURI) > 0 {
- return ecsCredProvider(cfg, handlers, ecsCredURI)
+ if uri := os.Getenv(ecsCredsProviderEnvVar); len(uri) > 0 {
+ u := fmt.Sprintf("http://169.254.170.2%s", uri)
+ return httpCredProvider(cfg, handlers, u)
}
return ec2RoleProvider(cfg, handlers)
}
-func ecsCredProvider(cfg aws.Config, handlers request.Handlers, uri string) credentials.Provider {
- const host = `169.254.170.2`
+func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
+ var errMsg string
- return endpointcreds.NewProviderClient(cfg, handlers,
- fmt.Sprintf("http://%s%s", host, uri),
+ parsed, err := url.Parse(u)
+ if err != nil {
+ errMsg = fmt.Sprintf("invalid URL, %v", err)
+ } else if host := aws.URLHostname(parsed); !(host == "localhost" || host == "127.0.0.1") {
+ errMsg = fmt.Sprintf("invalid host address, %q, only localhost and 127.0.0.1 are valid.", host)
+ }
+
+ if len(errMsg) > 0 {
+ if cfg.Logger != nil {
+ cfg.Logger.Log("Ignoring, HTTP credential provider", errMsg, err)
+ }
+ return credentials.ErrorProvider{
+ Err: awserr.New("CredentialsEndpointError", errMsg, err),
+ ProviderName: endpointcreds.ProviderName,
+ }
+ }
+
+ return httpCredProvider(cfg, handlers, u)
+}
+
+func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
+ return endpointcreds.NewProviderClient(cfg, handlers, u,
func(p *endpointcreds.Provider) {
p.ExpiryWindow = 5 * time.Minute
},
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
new file mode 100644
index 000000000..ca0ee1dcc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
@@ -0,0 +1,27 @@
+package defaults
+
+import (
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
+)
+
+// SharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func SharedCredentialsFilename() string {
+ return shareddefaults.SharedCredentialsFilename()
+}
+
+// SharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func SharedConfigFilename() string {
+ return shareddefaults.SharedConfigFilename()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/doc.go
new file mode 100644
index 000000000..4fcb61618
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/doc.go
@@ -0,0 +1,56 @@
+// Package aws provides the core SDK's utilities and shared types. Use this package's
+// utilities to simplify setting and reading API operations parameters.
+//
+// Value and Pointer Conversion Utilities
+//
+// This package includes a helper conversion utility for each scalar type the SDK's
+// API use. These utilities make getting a pointer of the scalar, and dereferencing
+// a pointer easier.
+//
+// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value.
+// The Pointer to value will safely dereference the pointer and return its value.
+// If the pointer was nil, the scalar's zero value will be returned.
+//
+// The value to pointer functions will be named after the scalar type. So get a
+// *string from a string value use the "String" function. This makes it easy to
+// to get pointer of a literal string value, because getting the address of a
+// literal requires assigning the value to a variable first.
+//
+// var strPtr *string
+//
+// // Without the SDK's conversion functions
+// str := "my string"
+// strPtr = &str
+//
+// // With the SDK's conversion functions
+// strPtr = aws.String("my string")
+//
+// // Convert *string to string value
+// str = aws.StringValue(strPtr)
+//
+// In addition to scalars the aws package also includes conversion utilities for
+// map and slice for commonly types used in API parameters. The map and slice
+// conversion functions use similar naming pattern as the scalar conversion
+// functions.
+//
+// var strPtrs []*string
+// var strs []string = []string{"Go", "Gophers", "Go"}
+//
+// // Convert []string to []*string
+// strPtrs = aws.StringSlice(strs)
+//
+// // Convert []*string to []string
+// strs = aws.StringValueSlice(strPtrs)
+//
+// SDK Default HTTP Client
+//
+// The SDK will use the http.DefaultClient if a HTTP client is not provided to
+// the SDK's Session, or service client constructor. This means that if the
+// http.DefaultClient is modified by other components of your application the
+// modifications will be picked up by the SDK as well.
+//
+// In some cases this might be intended, but it is a better practice to create
+// a custom HTTP Client to share explicitly through your application. You can
+// configure the SDK to use the custom HTTP Client by setting the HTTPClient
+// value of the SDK's Config type when creating a Session or service client.
+package aws
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
index 53616560d..899087ec5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
package endpoints
@@ -47,6 +47,7 @@ const (
ApigatewayServiceID = "apigateway" // Apigateway.
ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
Appstream2ServiceID = "appstream2" // Appstream2.
+ AthenaServiceID = "athena" // Athena.
AutoscalingServiceID = "autoscaling" // Autoscaling.
BatchServiceID = "batch" // Batch.
BudgetsServiceID = "budgets" // Budgets.
@@ -60,6 +61,7 @@ const (
CodecommitServiceID = "codecommit" // Codecommit.
CodedeployServiceID = "codedeploy" // Codedeploy.
CodepipelineServiceID = "codepipeline" // Codepipeline.
+ CodestarServiceID = "codestar" // Codestar.
CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity.
CognitoIdpServiceID = "cognito-idp" // CognitoIdp.
CognitoSyncServiceID = "cognito-sync" // CognitoSync.
@@ -83,11 +85,13 @@ const (
ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce.
ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder.
EmailServiceID = "email" // Email.
+ EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace.
EsServiceID = "es" // Es.
EventsServiceID = "events" // Events.
FirehoseServiceID = "firehose" // Firehose.
GameliftServiceID = "gamelift" // Gamelift.
GlacierServiceID = "glacier" // Glacier.
+ GreengrassServiceID = "greengrass" // Greengrass.
HealthServiceID = "health" // Health.
IamServiceID = "iam" // Iam.
ImportexportServiceID = "importexport" // Importexport.
@@ -103,9 +107,12 @@ const (
MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
+ ModelsLexServiceID = "models.lex" // ModelsLex.
MonitoringServiceID = "monitoring" // Monitoring.
+ MturkRequesterServiceID = "mturk-requester" // MturkRequester.
OpsworksServiceID = "opsworks" // Opsworks.
OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
+ OrganizationsServiceID = "organizations" // Organizations.
PinpointServiceID = "pinpoint" // Pinpoint.
PollyServiceID = "polly" // Polly.
RdsServiceID = "rds" // Rds.
@@ -129,8 +136,10 @@ const (
StsServiceID = "sts" // Sts.
SupportServiceID = "support" // Support.
SwfServiceID = "swf" // Swf.
+ TaggingServiceID = "tagging" // Tagging.
WafServiceID = "waf" // Waf.
WafRegionalServiceID = "waf-regional" // WafRegional.
+ WorkdocsServiceID = "workdocs" // Workdocs.
WorkspacesServiceID = "workspaces" // Workspaces.
XrayServiceID = "xray" // Xray.
)
@@ -138,17 +147,20 @@ const (
// DefaultResolver returns an Endpoint resolver that will be able
// to resolve endpoints for: AWS Standard, AWS China, and AWS GovCloud (US).
//
-// Casting the return value of this func to a EnumPartitions will
-// allow you to get a list of the partitions in the order the endpoints
-// will be resolved in.
+// Use DefaultPartitions() to get the list of the default partitions.
+func DefaultResolver() Resolver {
+ return defaultPartitions
+}
+
+// DefaultPartitions returns a list of the partitions the SDK is bundled
+// with. The available partitions are: AWS Standard, AWS China, and AWS GovCloud (US).
//
-// resolver := endpoints.DefaultResolver()
-// partitions := resolver.(endpoints.EnumPartitions).Partitions()
+// partitions := endpoints.DefaultPartitions
// for _, p := range partitions {
// // ... inspect partitions
// }
-func DefaultResolver() Resolver {
- return defaultPartitions
+func DefaultPartitions() []Partition {
+ return defaultPartitions.Partitions()
}
var defaultPartitions = partitions{
@@ -246,11 +258,14 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -296,6 +311,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "athena": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"autoscaling": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -320,7 +346,14 @@ var awsPartition = partition{
"batch": service{
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"budgets": service{
@@ -342,6 +375,7 @@ var awsPartition = partition{
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -432,19 +466,36 @@ var awsPartition = partition{
"codebuild": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"codecommit": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"codedeploy": service{
@@ -472,11 +523,26 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "codestar": service{
+
+ Endpoints: endpoints{
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -485,9 +551,11 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -498,9 +566,11 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -511,9 +581,11 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -608,11 +680,15 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -749,10 +825,11 @@ var awsPartition = partition{
"elasticfilesystem": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"elasticloadbalancing": service{
@@ -823,6 +900,16 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "entitlement.marketplace": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ Endpoints: endpoints{
+ "us-east-1": endpoint{},
+ },
+ },
"es": service{
Endpoints: endpoints{
@@ -831,8 +918,10 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -848,6 +937,7 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
@@ -899,6 +989,18 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "greengrass": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"health": service{
Endpoints: endpoints{
@@ -942,6 +1044,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -958,6 +1061,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -1014,11 +1118,14 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -1028,7 +1135,16 @@ var awsPartition = partition{
"lightsail": service{
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"logs": service{
@@ -1075,10 +1191,13 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -1089,6 +1208,16 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
+ "models.lex": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ Endpoints: endpoints{
+ "us-east-1": endpoint{},
+ },
+ },
"monitoring": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -1110,6 +1239,16 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "mturk-requester": service{
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "sandbox": endpoint{
+ Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com",
+ },
+ "us-east-1": endpoint{},
+ },
+ },
"opsworks": service{
Endpoints: endpoints{
@@ -1136,6 +1275,19 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "organizations": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "aws-global": endpoint{
+ Hostname: "organizations.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
"pinpoint": service{
Defaults: endpoint{
CredentialScope: credentialScope{
@@ -1336,9 +1488,16 @@ var awsPartition = partition{
"sms": service{
Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"snowball": service{
@@ -1346,7 +1505,6 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
- "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
@@ -1406,10 +1564,13 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1421,6 +1582,8 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1432,6 +1595,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -1447,7 +1611,7 @@ var awsPartition = partition{
},
"streams.dynamodb": service{
Defaults: endpoint{
- Protocols: []string{"http", "http", "https", "https"},
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
@@ -1502,9 +1666,33 @@ var awsPartition = partition{
"eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "us-east-1-fips": endpoint{
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-1-fips": endpoint{
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
"support": service{
@@ -1532,6 +1720,25 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "tagging": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"waf": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
@@ -1554,6 +1761,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "workdocs": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"workspaces": service{
Endpoints: endpoints{
@@ -1574,8 +1792,10 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1632,6 +1852,12 @@ var awscnPartition = partition{
"cn-north-1": endpoint{},
},
},
+ "codedeploy": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -1671,6 +1897,18 @@ var awscnPartition = partition{
},
},
},
+ "ecr": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "ecs": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"elasticache": service{
Endpoints: endpoints{
@@ -1784,6 +2022,12 @@ var awscnPartition = partition{
"cn-north-1": endpoint{},
},
},
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"storagegateway": service{
Endpoints: endpoints{
@@ -1792,7 +2036,7 @@ var awscnPartition = partition{
},
"streams.dynamodb": service{
Defaults: endpoint{
- Protocols: []string{"http", "http", "https", "https"},
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
@@ -1809,6 +2053,12 @@ var awscnPartition = partition{
},
"swf": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "tagging": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1868,6 +2118,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "codedeploy": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -1925,6 +2181,12 @@ var awsusgovPartition = partition{
},
},
},
+ "events": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"glacier": service{
Endpoints: endpoints{
@@ -1946,12 +2208,24 @@ var awsusgovPartition = partition{
},
},
},
+ "kinesis": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"kms": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
+ "lambda": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"logs": service{
Endpoints: endpoints{
@@ -1976,6 +2250,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "rekognition": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"s3": service{
Defaults: endpoint{
SignatureVersions: []string{"s3", "s3v4"},
@@ -1993,6 +2273,12 @@ var awsusgovPartition = partition{
},
},
},
+ "sms": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"snowball": service{
Endpoints: endpoints{
@@ -2016,6 +2302,12 @@ var awsusgovPartition = partition{
},
},
},
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"streams.dynamodb": service{
Defaults: endpoint{
CredentialScope: credentialScope{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
index a0e9bc454..84316b92c 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
@@ -21,12 +21,12 @@
// partitions := resolver.(endpoints.EnumPartitions).Partitions()
//
// for _, p := range partitions {
-// fmt.Println("Regions for", p.Name)
+// fmt.Println("Regions for", p.ID())
// for id, _ := range p.Regions() {
// fmt.Println("*", id)
// }
//
-// fmt.Println("Services for", p.Name)
+// fmt.Println("Services for", p.ID())
// for id, _ := range p.Services() {
// fmt.Println("*", id)
// }
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
index 37e19ab00..9c3eedb48 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
@@ -124,6 +124,49 @@ type EnumPartitions interface {
Partitions() []Partition
}
+// RegionsForService returns a map of regions for the partition and service.
+// If either the partition or service does not exist false will be returned
+// as the second parameter.
+//
+// This example shows how to get the regions for DynamoDB in the AWS partition.
+// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID)
+//
+// This is equivalent to using the partition directly.
+// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions()
+func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) {
+ for _, p := range ps {
+ if p.ID() != partitionID {
+ continue
+ }
+ if _, ok := p.p.Services[serviceID]; !ok {
+ break
+ }
+
+ s := Service{
+ id: serviceID,
+ p: p.p,
+ }
+ return s.Regions(), true
+ }
+
+ return map[string]Region{}, false
+}
+
+// PartitionForRegion returns the first partition which includes the region
+// passed in. This includes both known regions and regions which match
+// a pattern supported by the partition which may include regions that are
+// not explicitly known by the partition. Use the Regions method of the
+// returned Partition if explicit support is needed.
+func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) {
+ for _, p := range ps {
+ if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) {
+ return p, true
+ }
+ }
+
+ return Partition{}, false
+}
+
// A Partition provides the ability to enumerate the partition's regions
// and services.
type Partition struct {
@@ -132,7 +175,7 @@ type Partition struct {
}
// ID returns the identifier of the partition.
-func (p *Partition) ID() string { return p.id }
+func (p Partition) ID() string { return p.id }
// EndpointFor attempts to resolve the endpoint based on service and region.
// See Options for information on configuring how the endpoint is resolved.
@@ -155,13 +198,13 @@ func (p *Partition) ID() string { return p.id }
// Errors that can be returned.
// * UnknownServiceError
// * UnknownEndpointError
-func (p *Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return p.p.EndpointFor(service, region, opts...)
}
// Regions returns a map of Regions indexed by their ID. This is useful for
// enumerating over the regions in a partition.
-func (p *Partition) Regions() map[string]Region {
+func (p Partition) Regions() map[string]Region {
rs := map[string]Region{}
for id := range p.p.Regions {
rs[id] = Region{
@@ -175,7 +218,7 @@ func (p *Partition) Regions() map[string]Region {
// Services returns a map of Service indexed by their ID. This is useful for
// enumerating over the services in a partition.
-func (p *Partition) Services() map[string]Service {
+func (p Partition) Services() map[string]Service {
ss := map[string]Service{}
for id := range p.p.Services {
ss[id] = Service{
@@ -195,16 +238,16 @@ type Region struct {
}
// ID returns the region's identifier.
-func (r *Region) ID() string { return r.id }
+func (r Region) ID() string { return r.id }
// ResolveEndpoint resolves an endpoint from the context of the region given
// a service. See Partition.EndpointFor for usage and errors that can be returned.
-func (r *Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return r.p.EndpointFor(service, r.id, opts...)
}
// Services returns a list of all services that are known to be in this region.
-func (r *Region) Services() map[string]Service {
+func (r Region) Services() map[string]Service {
ss := map[string]Service{}
for id, s := range r.p.Services {
if _, ok := s.Endpoints[r.id]; ok {
@@ -226,17 +269,38 @@ type Service struct {
}
// ID returns the identifier for the service.
-func (s *Service) ID() string { return s.id }
+func (s Service) ID() string { return s.id }
// ResolveEndpoint resolves an endpoint from the context of a service given
// a region. See Partition.EndpointFor for usage and errors that can be returned.
-func (s *Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return s.p.EndpointFor(s.id, region, opts...)
}
+// Regions returns a map of Regions that the service is present in.
+//
+// A region is the AWS region the service exists in. Whereas a Endpoint is
+// an URL that can be resolved to a instance of a service.
+func (s Service) Regions() map[string]Region {
+ rs := map[string]Region{}
+ for id := range s.p.Services[s.id].Endpoints {
+ if _, ok := s.p.Regions[id]; ok {
+ rs[id] = Region{
+ id: id,
+ p: s.p,
+ }
+ }
+ }
+
+ return rs
+}
+
// Endpoints returns a map of Endpoints indexed by their ID for all known
// endpoints for a service.
-func (s *Service) Endpoints() map[string]Endpoint {
+//
+// A region is the AWS region the service exists in. Whereas a Endpoint is
+// an URL that can be resolved to a instance of a service.
+func (s Service) Endpoints() map[string]Endpoint {
es := map[string]Endpoint{}
for id := range s.p.Services[s.id].Endpoints {
es[id] = Endpoint{
@@ -259,15 +323,15 @@ type Endpoint struct {
}
// ID returns the identifier for an endpoint.
-func (e *Endpoint) ID() string { return e.id }
+func (e Endpoint) ID() string { return e.id }
// ServiceID returns the identifier the endpoint belongs to.
-func (e *Endpoint) ServiceID() string { return e.serviceID }
+func (e Endpoint) ServiceID() string { return e.serviceID }
// ResolveEndpoint resolves an endpoint from the context of a service and
// region the endpoint represents. See Partition.EndpointFor for usage and
// errors that can be returned.
-func (e *Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
return e.p.EndpointFor(e.serviceID, e.id, opts...)
}
@@ -300,28 +364,6 @@ type EndpointNotFoundError struct {
Region string
}
-//// NewEndpointNotFoundError builds and returns NewEndpointNotFoundError.
-//func NewEndpointNotFoundError(p, s, r string) EndpointNotFoundError {
-// return EndpointNotFoundError{
-// awsError: awserr.New("EndpointNotFoundError", "unable to find endpoint", nil),
-// Partition: p,
-// Service: s,
-// Region: r,
-// }
-//}
-//
-//// Error returns string representation of the error.
-//func (e EndpointNotFoundError) Error() string {
-// extra := fmt.Sprintf("partition: %q, service: %q, region: %q",
-// e.Partition, e.Service, e.Region)
-// return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-//}
-//
-//// String returns the string representation of the error.
-//func (e EndpointNotFoundError) String() string {
-// return e.Error()
-//}
-
// A UnknownServiceError is returned when the service does not resolve to an
// endpoint. Includes a list of all known services for the partition. Returned
// when a partition does not support the service.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
index 1e7369dbf..05e92df22 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
@@ -158,7 +158,7 @@ var funcMap = template.FuncMap{
const v3Tmpl = `
{{ define "defaults" -}}
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
package endpoints
@@ -209,17 +209,20 @@ import (
// DefaultResolver returns an Endpoint resolver that will be able
// to resolve endpoints for: {{ ListPartitionNames . }}.
//
- // Casting the return value of this func to a EnumPartitions will
- // allow you to get a list of the partitions in the order the endpoints
- // will be resolved in.
+ // Use DefaultPartitions() to get the list of the default partitions.
+ func DefaultResolver() Resolver {
+ return defaultPartitions
+ }
+
+ // DefaultPartitions returns a list of the partitions the SDK is bundled
+ // with. The available partitions are: {{ ListPartitionNames . }}.
//
- // resolver := endpoints.DefaultResolver()
- // partitions := resolver.(endpoints.EnumPartitions).Partitions()
+ // partitions := endpoints.DefaultPartitions
// for _, p := range partitions {
// // ... inspect partitions
// }
- func DefaultResolver() Resolver {
- return defaultPartitions
+ func DefaultPartitions() []Partition {
+ return defaultPartitions.Partitions()
}
var defaultPartitions = partitions{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
new file mode 100644
index 000000000..91a6f277a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
@@ -0,0 +1,12 @@
+package aws
+
+// JSONValue is a representation of a grab bag type that will be marshaled
+// into a json string. This type can be used just like any other map.
+//
+// Example:
+//
+// values := aws.JSONValue{
+// "Foo": "Bar",
+// }
+// values["Baz"] = "Qux"
+type JSONValue map[string]interface{}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
index db87188e2..3babb5abd 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
@@ -26,14 +26,14 @@ func (l *LogLevelType) Value() LogLevelType {
// Matches returns true if the v LogLevel is enabled by this LogLevel. Should be
// used with logging sub levels. Is safe to use on nil value LogLevelTypes. If
-// LogLevel is nill, will default to LogOff comparison.
+// LogLevel is nil, will default to LogOff comparison.
func (l *LogLevelType) Matches(v LogLevelType) bool {
c := l.Value()
return c&v == v
}
// AtLeast returns true if this LogLevel is at least high enough to satisfies v.
-// Is safe to use on nil value LogLevelTypes. If LogLevel is nill, will default
+// Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default
// to LogOff comparison.
func (l *LogLevelType) AtLeast(v LogLevelType) bool {
c := l.Value()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
new file mode 100644
index 000000000..271da432c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
@@ -0,0 +1,19 @@
+// +build !appengine,!plan9
+
+package request
+
+import (
+ "net"
+ "os"
+ "syscall"
+)
+
+func isErrConnectionReset(err error) bool {
+ if opErr, ok := err.(*net.OpError); ok {
+ if sysErr, ok := opErr.Err.(*os.SyscallError); ok {
+ return sysErr.Err == syscall.ECONNRESET
+ }
+ }
+
+ return false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
index 5279c19c0..802ac88ad 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
@@ -18,6 +18,7 @@ type Handlers struct {
UnmarshalError HandlerList
Retry HandlerList
AfterRetry HandlerList
+ Complete HandlerList
}
// Copy returns of this handler's lists.
@@ -33,6 +34,7 @@ func (h *Handlers) Copy() Handlers {
UnmarshalMeta: h.UnmarshalMeta.copy(),
Retry: h.Retry.copy(),
AfterRetry: h.AfterRetry.copy(),
+ Complete: h.Complete.copy(),
}
}
@@ -48,6 +50,7 @@ func (h *Handlers) Clear() {
h.ValidateResponse.Clear()
h.Retry.Clear()
h.AfterRetry.Clear()
+ h.Complete.Clear()
}
// A HandlerListRunItem represents an entry in the HandlerList which
@@ -85,13 +88,17 @@ func (l *HandlerList) copy() HandlerList {
n := HandlerList{
AfterEachFn: l.AfterEachFn,
}
- n.list = append([]NamedHandler{}, l.list...)
+ if len(l.list) == 0 {
+ return n
+ }
+
+ n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...)
return n
}
// Clear clears the handler list.
func (l *HandlerList) Clear() {
- l.list = []NamedHandler{}
+ l.list = l.list[0:0]
}
// Len returns the number of handlers in the list.
@@ -101,33 +108,85 @@ func (l *HandlerList) Len() int {
// PushBack pushes handler f to the back of the handler list.
func (l *HandlerList) PushBack(f func(*Request)) {
- l.list = append(l.list, NamedHandler{"__anonymous", f})
-}
-
-// PushFront pushes handler f to the front of the handler list.
-func (l *HandlerList) PushFront(f func(*Request)) {
- l.list = append([]NamedHandler{{"__anonymous", f}}, l.list...)
+ l.PushBackNamed(NamedHandler{"__anonymous", f})
}
// PushBackNamed pushes named handler f to the back of the handler list.
func (l *HandlerList) PushBackNamed(n NamedHandler) {
+ if cap(l.list) == 0 {
+ l.list = make([]NamedHandler, 0, 5)
+ }
l.list = append(l.list, n)
}
+// PushFront pushes handler f to the front of the handler list.
+func (l *HandlerList) PushFront(f func(*Request)) {
+ l.PushFrontNamed(NamedHandler{"__anonymous", f})
+}
+
// PushFrontNamed pushes named handler f to the front of the handler list.
func (l *HandlerList) PushFrontNamed(n NamedHandler) {
- l.list = append([]NamedHandler{n}, l.list...)
+ if cap(l.list) == len(l.list) {
+ // Allocating new list required
+ l.list = append([]NamedHandler{n}, l.list...)
+ } else {
+ // Enough room to prepend into list.
+ l.list = append(l.list, NamedHandler{})
+ copy(l.list[1:], l.list)
+ l.list[0] = n
+ }
}
// Remove removes a NamedHandler n
func (l *HandlerList) Remove(n NamedHandler) {
- newlist := []NamedHandler{}
- for _, m := range l.list {
- if m.Name != n.Name {
- newlist = append(newlist, m)
+ l.RemoveByName(n.Name)
+}
+
+// RemoveByName removes a NamedHandler by name.
+func (l *HandlerList) RemoveByName(name string) {
+ for i := 0; i < len(l.list); i++ {
+ m := l.list[i]
+ if m.Name == name {
+ // Shift array preventing creating new arrays
+ copy(l.list[i:], l.list[i+1:])
+ l.list[len(l.list)-1] = NamedHandler{}
+ l.list = l.list[:len(l.list)-1]
+
+ // decrement list so next check to length is correct
+ i--
}
}
- l.list = newlist
+}
+
+// SwapNamed will swap out any existing handlers with the same name as the
+// passed in NamedHandler returning true if handlers were swapped. False is
+// returned otherwise.
+func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
+ for i := 0; i < len(l.list); i++ {
+ if l.list[i].Name == n.Name {
+ l.list[i].Fn = n.Fn
+ swapped = true
+ }
+ }
+
+ return swapped
+}
+
+// SetBackNamed will replace the named handler if it exists in the handler list.
+// If the handler does not exist the handler will be added to the end of the list.
+func (l *HandlerList) SetBackNamed(n NamedHandler) {
+ if !l.SwapNamed(n) {
+ l.PushBackNamed(n)
+ }
+}
+
+// SetFrontNamed will replace the named handler if it exists in the handler list.
+// If the handler does not exist the handler will be added to the beginning of
+// the list.
+func (l *HandlerList) SetFrontNamed(n NamedHandler) {
+ if !l.SwapNamed(n) {
+ l.PushFrontNamed(n)
+ }
}
// Run executes all handlers in the list with a given request object.
@@ -163,6 +222,16 @@ func HandlerListStopOnError(item HandlerListRunItem) bool {
return item.Request.Error == nil
}
+// WithAppendUserAgent will add a string to the user agent prefixed with a
+// single white space.
+func WithAppendUserAgent(s string) Option {
+ return func(r *Request) {
+ r.Handlers.Build.PushBack(func(r2 *Request) {
+ AddToUserAgent(r, s)
+ })
+ }
+}
+
// MakeAddToUserAgentHandler will add the name/version pair to the User-Agent request
// header. If the extra parameters are provided they will be added as metadata to the
// name/version pair resulting in the following format.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
index 77312bb66..088ba5290 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
@@ -16,6 +16,24 @@ import (
"github.com/aws/aws-sdk-go/aws/client/metadata"
)
+const (
+ // ErrCodeSerialization is the serialization error code that is received
+ // during protocol unmarshaling.
+ ErrCodeSerialization = "SerializationError"
+
+ // ErrCodeRead is an error that is returned during HTTP reads.
+ ErrCodeRead = "ReadError"
+
+ // ErrCodeResponseTimeout is the connection timeout error that is received
+ // during body reads.
+ ErrCodeResponseTimeout = "ResponseTimeout"
+
+ // CanceledErrorCode is the error code that will be returned by an
+ // API request that was canceled. Requests given a aws.Context may
+ // return this error when canceled.
+ CanceledErrorCode = "RequestCanceled"
+)
+
// A Request is the service request to be made.
type Request struct {
Config aws.Config
@@ -23,30 +41,33 @@ type Request struct {
Handlers Handlers
Retryer
- Time time.Time
- ExpireTime time.Duration
- Operation *Operation
- HTTPRequest *http.Request
- HTTPResponse *http.Response
- Body io.ReadSeeker
- BodyStart int64 // offset from beginning of Body that the request body starts
- Params interface{}
- Error error
- Data interface{}
- RequestID string
- RetryCount int
- Retryable *bool
- RetryDelay time.Duration
- NotHoist bool
- SignedHeaderVals http.Header
- LastSignedAt time.Time
+ Time time.Time
+ ExpireTime time.Duration
+ Operation *Operation
+ HTTPRequest *http.Request
+ HTTPResponse *http.Response
+ Body io.ReadSeeker
+ BodyStart int64 // offset from beginning of Body that the request body starts
+ Params interface{}
+ Error error
+ Data interface{}
+ RequestID string
+ RetryCount int
+ Retryable *bool
+ RetryDelay time.Duration
+ NotHoist bool
+ SignedHeaderVals http.Header
+ LastSignedAt time.Time
+ DisableFollowRedirects bool
+
+ context aws.Context
built bool
- // Need to persist an intermideant body betweend the input Body and HTTP
+ // Need to persist an intermediate body between the input Body and HTTP
// request body because the HTTP Client's transport can maintain a reference
// to the HTTP request's body after the client has returned. This value is
- // safe to use concurrently and rewraps the input Body for each HTTP request.
+ // safe to use concurrently and wrap the input Body for each HTTP request.
safeBody *offsetReader
}
@@ -60,14 +81,6 @@ type Operation struct {
BeforePresignFn func(r *Request) error
}
-// Paginator keeps track of pagination configuration for an API operation.
-type Paginator struct {
- InputTokens []string
- OutputTokens []string
- LimitToken string
- TruncationToken string
-}
-
// New returns a new Request pointer for the service API
// operation and parameters.
//
@@ -111,6 +124,94 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
return r
}
+// A Option is a functional option that can augment or modify a request when
+// using a WithContext API operation method.
+type Option func(*Request)
+
+// WithGetResponseHeader builds a request Option which will retrieve a single
+// header value from the HTTP Response. If there are multiple values for the
+// header key use WithGetResponseHeaders instead to access the http.Header
+// map directly. The passed in val pointer must be non-nil.
+//
+// This Option can be used multiple times with a single API operation.
+//
+// var id2, versionID string
+// svc.PutObjectWithContext(ctx, params,
+// request.WithGetResponseHeader("x-amz-id-2", &id2),
+// request.WithGetResponseHeader("x-amz-version-id", &versionID),
+// )
+func WithGetResponseHeader(key string, val *string) Option {
+ return func(r *Request) {
+ r.Handlers.Complete.PushBack(func(req *Request) {
+ *val = req.HTTPResponse.Header.Get(key)
+ })
+ }
+}
+
+// WithGetResponseHeaders builds a request Option which will retrieve the
+// headers from the HTTP response and assign them to the passed in headers
+// variable. The passed in headers pointer must be non-nil.
+//
+// var headers http.Header
+// svc.PutObjectWithContext(ctx, params, request.WithGetResponseHeaders(&headers))
+func WithGetResponseHeaders(headers *http.Header) Option {
+ return func(r *Request) {
+ r.Handlers.Complete.PushBack(func(req *Request) {
+ *headers = req.HTTPResponse.Header
+ })
+ }
+}
+
+// WithLogLevel is a request option that will set the request to use a specific
+// log level when the request is made.
+//
+// svc.PutObjectWithContext(ctx, params, request.WithLogLevel(aws.LogDebugWithHTTPBody)
+func WithLogLevel(l aws.LogLevelType) Option {
+ return func(r *Request) {
+ r.Config.LogLevel = aws.LogLevel(l)
+ }
+}
+
+// ApplyOptions will apply each option to the request calling them in the order
+// the were provided.
+func (r *Request) ApplyOptions(opts ...Option) {
+ for _, opt := range opts {
+ opt(r)
+ }
+}
+
+// Context will always returns a non-nil context. If Request does not have a
+// context aws.BackgroundContext will be returned.
+func (r *Request) Context() aws.Context {
+ if r.context != nil {
+ return r.context
+ }
+ return aws.BackgroundContext()
+}
+
+// SetContext adds a Context to the current request that can be used to cancel
+// a in-flight request. The Context value must not be nil, or this method will
+// panic.
+//
+// Unlike http.Request.WithContext, SetContext does not return a copy of the
+// Request. It is not safe to use use a single Request value for multiple
+// requests. A new Request should be created for each API operation request.
+//
+// Go 1.6 and below:
+// The http.Request's Cancel field will be set to the Done() value of
+// the context. This will overwrite the Cancel field's value.
+//
+// Go 1.7 and above:
+// The http.Request.WithContext will be used to set the context on the underlying
+// http.Request. This will create a shallow copy of the http.Request. The SDK
+// may create sub contexts in the future for nested requests such as retries.
+func (r *Request) SetContext(ctx aws.Context) {
+ if ctx == nil {
+ panic("context cannot be nil")
+ }
+ setRequestContext(r, ctx)
+}
+
// WillRetry returns if the request's can be retried.
func (r *Request) WillRetry() bool {
return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
@@ -237,10 +338,7 @@ func (r *Request) Sign() error {
return r.Error
}
-// ResetBody rewinds the request body backto its starting position, and
-// set's the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-func (r *Request) ResetBody() {
+func (r *Request) getNextRequestBody() (io.ReadCloser, error) {
if r.safeBody != nil {
r.safeBody.Close()
}
@@ -262,14 +360,14 @@ func (r *Request) ResetBody() {
// Related golang/go#18257
l, err := computeBodyLength(r.Body)
if err != nil {
- r.Error = awserr.New("SerializationError", "failed to compute request body size", err)
- return
+ return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err)
}
+ var body io.ReadCloser
if l == 0 {
- r.HTTPRequest.Body = noBodyReader
+ body = NoBody
} else if l > 0 {
- r.HTTPRequest.Body = r.safeBody
+ body = r.safeBody
} else {
// Hack to prevent sending bodies for methods where the body
// should be ignored by the server. Sending bodies on these
@@ -281,11 +379,13 @@ func (r *Request) ResetBody() {
// a io.Reader that was not also an io.Seeker.
switch r.Operation.HTTPMethod {
case "GET", "HEAD", "DELETE":
- r.HTTPRequest.Body = noBodyReader
+ body = NoBody
default:
- r.HTTPRequest.Body = r.safeBody
+ body = r.safeBody
}
}
+
+ return body, nil
}
// Attempts to compute the length of the body of the reader using the
@@ -344,6 +444,12 @@ func (r *Request) GetBody() io.ReadSeeker {
//
// Send will not close the request.Request's body.
func (r *Request) Send() error {
+ defer func() {
+ // Regardless of success or failure of the request trigger the Complete
+ // request handlers.
+ r.Handlers.Complete.Run(r)
+ }()
+
for {
if aws.BoolValue(r.Retryable) {
if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) {
@@ -381,7 +487,7 @@ func (r *Request) Send() error {
r.Handlers.Retry.Run(r)
r.Handlers.AfterRetry.Run(r)
if r.Error != nil {
- debugLogReqError(r, "Send Request", false, r.Error)
+ debugLogReqError(r, "Send Request", false, err)
return r.Error
}
debugLogReqError(r, "Send Request", true, err)
@@ -390,12 +496,13 @@ func (r *Request) Send() error {
r.Handlers.UnmarshalMeta.Run(r)
r.Handlers.ValidateResponse.Run(r)
if r.Error != nil {
- err := r.Error
r.Handlers.UnmarshalError.Run(r)
+ err := r.Error
+
r.Handlers.Retry.Run(r)
r.Handlers.AfterRetry.Run(r)
if r.Error != nil {
- debugLogReqError(r, "Validate Response", false, r.Error)
+ debugLogReqError(r, "Validate Response", false, err)
return r.Error
}
debugLogReqError(r, "Validate Response", true, err)
@@ -408,7 +515,7 @@ func (r *Request) Send() error {
r.Handlers.Retry.Run(r)
r.Handlers.AfterRetry.Run(r)
if r.Error != nil {
- debugLogReqError(r, "Unmarshal Response", false, r.Error)
+ debugLogReqError(r, "Unmarshal Response", false, err)
return r.Error
}
debugLogReqError(r, "Unmarshal Response", true, err)
@@ -446,6 +553,9 @@ func shouldRetryCancel(r *Request) bool {
timeoutErr := false
errStr := r.Error.Error()
if ok {
+ if awsErr.Code() == CanceledErrorCode {
+ return false
+ }
err := awsErr.OrigErr()
netErr, netOK := err.(net.Error)
timeoutErr = netOK && netErr.Temporary()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
index 1323af900..869b97a1a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
@@ -16,6 +16,24 @@ func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
func (noBody) Close() error { return nil }
func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
-// Is an empty reader that will trigger the Go HTTP client to not include
+// NoBody is an empty reader that will trigger the Go HTTP client to not include
// and body in the HTTP request.
-var noBodyReader = noBody{}
+var NoBody = noBody{}
+
+// ResetBody rewinds the request body back to its starting position, and
+// set's the HTTP Request body reference. When the body is read prior
+// to being sent in the HTTP request it will need to be rewound.
+//
+// ResetBody will automatically be called by the SDK's build handler, but if
+// the request is being used directly ResetBody must be called before the request
+// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
+// call ResetBody.
+func (r *Request) ResetBody() {
+ body, err := r.getNextRequestBody()
+ if err != nil {
+ r.Error = err
+ return
+ }
+
+ r.HTTPRequest.Body = body
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
index 8b963f4de..c32fc69bc 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
@@ -2,8 +2,32 @@
package request
-import "net/http"
+import (
+ "net/http"
+)
-// Is a http.NoBody reader instructing Go HTTP client to not include
+// NoBody is a http.NoBody reader instructing Go HTTP client to not include
// and body in the HTTP request.
-var noBodyReader = http.NoBody
+var NoBody = http.NoBody
+
+// ResetBody rewinds the request body back to its starting position, and
+// set's the HTTP Request body reference. When the body is read prior
+// to being sent in the HTTP request it will need to be rewound.
+//
+// ResetBody will automatically be called by the SDK's build handler, but if
+// the request is being used directly ResetBody must be called before the request
+// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
+// call ResetBody.
+//
+// Will also set the Go 1.8's http.Request.GetBody member to allow retrying
+// PUT/POST redirects.
+func (r *Request) ResetBody() {
+ body, err := r.getNextRequestBody()
+ if err != nil {
+ r.Error = err
+ return
+ }
+
+ r.HTTPRequest.Body = body
+ r.HTTPRequest.GetBody = r.getNextRequestBody
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
new file mode 100644
index 000000000..a7365cd1e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
@@ -0,0 +1,14 @@
+// +build go1.7
+
+package request
+
+import "github.com/aws/aws-sdk-go/aws"
+
+// setContext updates the Request to use the passed in context for cancellation.
+// Context will also be used for request retry delay.
+//
+// Creates shallow copy of the http.Request with the WithContext method.
+func setRequestContext(r *Request, ctx aws.Context) {
+ r.context = ctx
+ r.HTTPRequest = r.HTTPRequest.WithContext(ctx)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
new file mode 100644
index 000000000..307fa0705
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
@@ -0,0 +1,14 @@
+// +build !go1.7
+
+package request
+
+import "github.com/aws/aws-sdk-go/aws"
+
+// setContext updates the Request to use the passed in context for cancellation.
+// Context will also be used for request retry delay.
+//
+// Creates shallow copy of the http.Request with the WithContext method.
+func setRequestContext(r *Request, ctx aws.Context) {
+ r.context = ctx
+ r.HTTPRequest.Cancel = ctx.Done()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
index 2939ec473..59de6736b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
@@ -2,29 +2,125 @@ package request
import (
"reflect"
+ "sync/atomic"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
)
-//type Paginater interface {
-// HasNextPage() bool
-// NextPage() *Request
-// EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error
-//}
+// A Pagination provides paginating of SDK API operations which are paginatable.
+// Generally you should not use this type directly, but use the "Pages" API
+// operations method to automatically perform pagination for you. Such as,
+// "S3.ListObjectsPages", and "S3.ListObjectsPagesWithContext" methods.
+//
+// Pagination differs from a Paginator type in that pagination is the type that
+// does the pagination between API operations, and Paginator defines the
+// configuration that will be used per page request.
+//
+// cont := true
+// for p.Next() && cont {
+// data := p.Page().(*s3.ListObjectsOutput)
+// // process the page's data
+// }
+// return p.Err()
+//
+// See service client API operation Pages methods for examples how the SDK will
+// use the Pagination type.
+type Pagination struct {
+ // Function to return a Request value for each pagination request.
+ // Any configuration or handlers that need to be applied to the request
+ // prior to getting the next page should be done here before the request
+ // returned.
+ //
+ // NewRequest should always be built from the same API operations. It is
+ // undefined if different API operations are returned on subsequent calls.
+ NewRequest func() (*Request, error)
-// HasNextPage returns true if this request has more pages of data available.
-func (r *Request) HasNextPage() bool {
- return len(r.nextPageTokens()) > 0
+ started bool
+ nextTokens []interface{}
+
+ err error
+ curPage interface{}
}
-// nextPageTokens returns the tokens to use when asking for the next page of
-// data.
+// HasNextPage will return true if Pagination is able to determine that the API
+// operation has additional pages. False will be returned if there are no more
+// pages remaining.
+//
+// Will always return true if Next has not been called yet.
+func (p *Pagination) HasNextPage() bool {
+ return !(p.started && len(p.nextTokens) == 0)
+}
+
+// Err returns the error Pagination encountered when retrieving the next page.
+func (p *Pagination) Err() error {
+ return p.err
+}
+
+// Page returns the current page. Page should only be called after a successful
+// call to Next. It is undefined what Page will return if Page is called after
+// Next returns false.
+func (p *Pagination) Page() interface{} {
+ return p.curPage
+}
+
+// Next will attempt to retrieve the next page for the API operation. When a page
+// is retrieved true will be returned. If the page cannot be retrieved, or there
+// are no more pages false will be returned.
+//
+// Use the Page method to retrieve the current page data. The data will need
+// to be cast to the API operation's output type.
+//
+// Use the Err method to determine if an error occurred if Page returns false.
+func (p *Pagination) Next() bool {
+ if !p.HasNextPage() {
+ return false
+ }
+
+ req, err := p.NewRequest()
+ if err != nil {
+ p.err = err
+ return false
+ }
+
+ if p.started {
+ for i, intok := range req.Operation.InputTokens {
+ awsutil.SetValueAtPath(req.Params, intok, p.nextTokens[i])
+ }
+ }
+ p.started = true
+
+ err = req.Send()
+ if err != nil {
+ p.err = err
+ return false
+ }
+
+ p.nextTokens = req.nextPageTokens()
+ p.curPage = req.Data
+
+ return true
+}
+
+// A Paginator is the configuration data that defines how an API operation
+// should be paginated. This type is used by the API service models to define
+// the generated pagination config for service APIs.
+//
+// The Pagination type is what provides iterating between pages of an API. It
+// is only used to store the token metadata the SDK should use for performing
+// pagination.
+type Paginator struct {
+ InputTokens []string
+ OutputTokens []string
+ LimitToken string
+ TruncationToken string
+}
+
+// nextPageTokens returns the tokens to use when asking for the next page of data.
func (r *Request) nextPageTokens() []interface{} {
if r.Operation.Paginator == nil {
return nil
}
-
if r.Operation.TruncationToken != "" {
tr, _ := awsutil.ValuesAtPath(r.Data, r.Operation.TruncationToken)
if len(tr) == 0 {
@@ -61,9 +157,40 @@ func (r *Request) nextPageTokens() []interface{} {
return tokens
}
+// Ensure a deprecated item is only logged once instead of each time its used.
+func logDeprecatedf(logger aws.Logger, flag *int32, msg string) {
+ if logger == nil {
+ return
+ }
+ if atomic.CompareAndSwapInt32(flag, 0, 1) {
+ logger.Log(msg)
+ }
+}
+
+var (
+ logDeprecatedHasNextPage int32
+ logDeprecatedNextPage int32
+ logDeprecatedEachPage int32
+)
+
+// HasNextPage returns true if this request has more pages of data available.
+//
+// Deprecated Use Pagination type for configurable pagination of API operations
+func (r *Request) HasNextPage() bool {
+ logDeprecatedf(r.Config.Logger, &logDeprecatedHasNextPage,
+ "Request.HasNextPage deprecated. Use Pagination type for configurable pagination of API operations")
+
+ return len(r.nextPageTokens()) > 0
+}
+
// NextPage returns a new Request that can be executed to return the next
// page of result data. Call .Send() on this request to execute it.
+//
+// Deprecated Use Pagination type for configurable pagination of API operations
func (r *Request) NextPage() *Request {
+ logDeprecatedf(r.Config.Logger, &logDeprecatedNextPage,
+ "Request.NextPage deprecated. Use Pagination type for configurable pagination of API operations")
+
tokens := r.nextPageTokens()
if len(tokens) == 0 {
return nil
@@ -90,7 +217,12 @@ func (r *Request) NextPage() *Request {
// as the structure "T". The lastPage value represents whether the page is
// the last page of data or not. The return value of this function should
// return true to keep iterating or false to stop.
+//
+// Deprecated Use Pagination type for configurable pagination of API operations
func (r *Request) EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error {
+ logDeprecatedf(r.Config.Logger, &logDeprecatedEachPage,
+ "Request.EachPage deprecated. Use Pagination type for configurable pagination of API operations")
+
for page := r; page != nil; page = page.NextPage() {
if err := page.Send(); err != nil {
return err
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
index ebd60ccc4..f35fef213 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
@@ -8,7 +8,7 @@ import (
)
// Retryer is an interface to control retry logic for a given service.
-// The default implementation used by most services is the service.DefaultRetryer
+// The default implementation used by most services is the client.DefaultRetryer
// structure, which contains basic retry logic using exponential backoff.
type Retryer interface {
RetryRules(*Request) time.Duration
@@ -26,8 +26,10 @@ func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config {
// retryableCodes is a collection of service response codes which are retry-able
// without any further action.
var retryableCodes = map[string]struct{}{
- "RequestError": {},
- "RequestTimeout": {},
+ "RequestError": {},
+ "RequestTimeout": {},
+ ErrCodeResponseTimeout: {},
+ "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout
}
var throttleCodes = map[string]struct{}{
@@ -36,7 +38,6 @@ var throttleCodes = map[string]struct{}{
"ThrottlingException": {},
"RequestLimitExceeded": {},
"RequestThrottled": {},
- "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once
"TooManyRequestsException": {}, // Lambda functions
"PriorRequestNotComplete": {}, // Route53
}
@@ -68,35 +69,93 @@ func isCodeExpiredCreds(code string) bool {
return ok
}
+var validParentCodes = map[string]struct{}{
+ ErrCodeSerialization: {},
+ ErrCodeRead: {},
+}
+
+type temporaryError interface {
+ Temporary() bool
+}
+
+func isNestedErrorRetryable(parentErr awserr.Error) bool {
+ if parentErr == nil {
+ return false
+ }
+
+ if _, ok := validParentCodes[parentErr.Code()]; !ok {
+ return false
+ }
+
+ err := parentErr.OrigErr()
+ if err == nil {
+ return false
+ }
+
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeRetryable(aerr.Code())
+ }
+
+ if t, ok := err.(temporaryError); ok {
+ return t.Temporary()
+ }
+
+ return isErrConnectionReset(err)
+}
+
// IsErrorRetryable returns whether the error is retryable, based on its Code.
-// Returns false if the request has no Error set.
-func (r *Request) IsErrorRetryable() bool {
- if r.Error != nil {
- if err, ok := r.Error.(awserr.Error); ok {
- return isCodeRetryable(err.Code())
+// Returns false if error is nil.
+func IsErrorRetryable(err error) bool {
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeRetryable(aerr.Code()) || isNestedErrorRetryable(aerr)
}
}
return false
}
// IsErrorThrottle returns whether the error is to be throttled based on its code.
-// Returns false if the request has no Error set
-func (r *Request) IsErrorThrottle() bool {
- if r.Error != nil {
- if err, ok := r.Error.(awserr.Error); ok {
- return isCodeThrottle(err.Code())
+// Returns false if error is nil.
+func IsErrorThrottle(err error) bool {
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeThrottle(aerr.Code())
}
}
return false
}
-// IsErrorExpired returns whether the error code is a credential expiry error.
-// Returns false if the request has no Error set.
-func (r *Request) IsErrorExpired() bool {
- if r.Error != nil {
- if err, ok := r.Error.(awserr.Error); ok {
- return isCodeExpiredCreds(err.Code())
+// IsErrorExpiredCreds returns whether the error code is a credential expiry error.
+// Returns false if error is nil.
+func IsErrorExpiredCreds(err error) bool {
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeExpiredCreds(aerr.Code())
}
}
return false
}
+
+// IsErrorRetryable returns whether the error is retryable, based on its Code.
+// Returns false if the request has no Error set.
+//
+// Alias for the utility function IsErrorRetryable
+func (r *Request) IsErrorRetryable() bool {
+ return IsErrorRetryable(r.Error)
+}
+
+// IsErrorThrottle returns whether the error is to be throttled based on its code.
+// Returns false if the request has no Error set
+//
+// Alias for the utility function IsErrorThrottle
+func (r *Request) IsErrorThrottle() bool {
+ return IsErrorThrottle(r.Error)
+}
+
+// IsErrorExpired returns whether the error code is a credential expiry error.
+// Returns false if the request has no Error set.
+//
+// Alias for the utility function IsErrorExpiredCreds
+func (r *Request) IsErrorExpired() bool {
+ return IsErrorExpiredCreds(r.Error)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
new file mode 100644
index 000000000..09a44eb98
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
@@ -0,0 +1,94 @@
+package request
+
+import (
+ "io"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws/awserr"
+)
+
+var timeoutErr = awserr.New(
+ ErrCodeResponseTimeout,
+ "read on body has reached the timeout limit",
+ nil,
+)
+
+type readResult struct {
+ n int
+ err error
+}
+
+// timeoutReadCloser will handle body reads that take too long.
+// We will return a ErrReadTimeout error if a timeout occurs.
+type timeoutReadCloser struct {
+ reader io.ReadCloser
+ duration time.Duration
+}
+
+// Read will spin off a goroutine to call the reader's Read method. We will
+// select on the timer's channel or the read's channel. Whoever completes first
+// will be returned.
+func (r *timeoutReadCloser) Read(b []byte) (int, error) {
+ timer := time.NewTimer(r.duration)
+ c := make(chan readResult, 1)
+
+ go func() {
+ n, err := r.reader.Read(b)
+ timer.Stop()
+ c <- readResult{n: n, err: err}
+ }()
+
+ select {
+ case data := <-c:
+ return data.n, data.err
+ case <-timer.C:
+ return 0, timeoutErr
+ }
+}
+
+func (r *timeoutReadCloser) Close() error {
+ return r.reader.Close()
+}
+
+const (
+ // HandlerResponseTimeout is what we use to signify the name of the
+ // response timeout handler.
+ HandlerResponseTimeout = "ResponseTimeoutHandler"
+)
+
+// adaptToResponseTimeoutError is a handler that will replace any top level error
+// to a ErrCodeResponseTimeout, if its child is that.
+func adaptToResponseTimeoutError(req *Request) {
+ if err, ok := req.Error.(awserr.Error); ok {
+ aerr, ok := err.OrigErr().(awserr.Error)
+ if ok && aerr.Code() == ErrCodeResponseTimeout {
+ req.Error = aerr
+ }
+ }
+}
+
+// WithResponseReadTimeout is a request option that will wrap the body in a timeout read closer.
+// This will allow for per read timeouts. If a timeout occurred, we will return the
+// ErrCodeResponseTimeout.
+//
+// svc.PutObjectWithContext(ctx, params, request.WithTimeoutReadCloser(30 * time.Second)
+func WithResponseReadTimeout(duration time.Duration) Option {
+ return func(r *Request) {
+
+ var timeoutHandler = NamedHandler{
+ HandlerResponseTimeout,
+ func(req *Request) {
+ req.HTTPResponse.Body = &timeoutReadCloser{
+ reader: req.HTTPResponse.Body,
+ duration: duration,
+ }
+ }}
+
+ // remove the handler so we are not stomping over any new durations.
+ r.Handlers.Send.RemoveByName(HandlerResponseTimeout)
+ r.Handlers.Send.PushBackNamed(timeoutHandler)
+
+ r.Handlers.Unmarshal.PushBack(adaptToResponseTimeoutError)
+ r.Handlers.UnmarshalError.PushBack(adaptToResponseTimeoutError)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
index 2520286b7..401246228 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
@@ -220,7 +220,7 @@ type ErrParamMinLen struct {
func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
return &ErrParamMinLen{
errInvalidParam: errInvalidParam{
- code: ParamMinValueErrCode,
+ code: ParamMinLenErrCode,
field: field,
msg: fmt.Sprintf("minimum field size of %v", min),
},
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
new file mode 100644
index 000000000..4601f883c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
@@ -0,0 +1,295 @@
+package request
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+)
+
+// WaiterResourceNotReadyErrorCode is the error code returned by a waiter when
+// the waiter's max attempts have been exhausted.
+const WaiterResourceNotReadyErrorCode = "ResourceNotReady"
+
+// A WaiterOption is a function that will update the Waiter value's fields to
+// configure the waiter.
+type WaiterOption func(*Waiter)
+
+// WithWaiterMaxAttempts returns the maximum number of times the waiter should
+// attempt to check the resource for the target state.
+func WithWaiterMaxAttempts(max int) WaiterOption {
+ return func(w *Waiter) {
+ w.MaxAttempts = max
+ }
+}
+
+// WaiterDelay will return a delay the waiter should pause between attempts to
+// check the resource state. The passed in attempt is the number of times the
+// Waiter has checked the resource state.
+//
+// Attempt is the number of attempts the Waiter has made checking the resource
+// state.
+type WaiterDelay func(attempt int) time.Duration
+
+// ConstantWaiterDelay returns a WaiterDelay that will always return a constant
+// delay the waiter should use between attempts. It ignores the number of
+// attempts made.
+func ConstantWaiterDelay(delay time.Duration) WaiterDelay {
+ return func(attempt int) time.Duration {
+ return delay
+ }
+}
+
+// WithWaiterDelay will set the Waiter to use the WaiterDelay passed in.
+func WithWaiterDelay(delayer WaiterDelay) WaiterOption {
+ return func(w *Waiter) {
+ w.Delay = delayer
+ }
+}
+
+// WithWaiterLogger returns a waiter option to set the logger a waiter
+// should use to log warnings and errors to.
+func WithWaiterLogger(logger aws.Logger) WaiterOption {
+ return func(w *Waiter) {
+ w.Logger = logger
+ }
+}
+
+// WithWaiterRequestOptions returns a waiter option setting the request
+// options for each request the waiter makes. Appends to waiter's request
+// options already set.
+func WithWaiterRequestOptions(opts ...Option) WaiterOption {
+ return func(w *Waiter) {
+ w.RequestOptions = append(w.RequestOptions, opts...)
+ }
+}
+
+// A Waiter provides the functionality to perform a blocking call which will
+// wait for a resource state to be satisfied by a service.
+//
+// This type should not be used directly. The API operations provided in the
+// service packages prefixed with "WaitUntil" should be used instead.
+type Waiter struct {
+ Name string
+ Acceptors []WaiterAcceptor
+ Logger aws.Logger
+
+ MaxAttempts int
+ Delay WaiterDelay
+
+ RequestOptions []Option
+ NewRequest func([]Option) (*Request, error)
+ SleepWithContext func(aws.Context, time.Duration) error
+}
+
+// ApplyOptions updates the waiter with the list of waiter options provided.
+func (w *Waiter) ApplyOptions(opts ...WaiterOption) {
+ for _, fn := range opts {
+ fn(w)
+ }
+}
+
+// WaiterState are states the waiter uses based on WaiterAcceptor definitions
+// to identify if the resource state the waiter is waiting on has occurred.
+type WaiterState int
+
+// String returns the string representation of the waiter state.
+func (s WaiterState) String() string {
+ switch s {
+ case SuccessWaiterState:
+ return "success"
+ case FailureWaiterState:
+ return "failure"
+ case RetryWaiterState:
+ return "retry"
+ default:
+ return "unknown waiter state"
+ }
+}
+
+// States the waiter acceptors will use to identify target resource states.
+const (
+ SuccessWaiterState WaiterState = iota // waiter successful
+ FailureWaiterState // waiter failed
+ RetryWaiterState // waiter needs to be retried
+)
+
+// WaiterMatchMode is the mode that the waiter will use to match the WaiterAcceptor
+// definition's Expected attribute.
+type WaiterMatchMode int
+
+// Modes the waiter will use when inspecting API response to identify target
+// resource states.
+const (
+ PathAllWaiterMatch WaiterMatchMode = iota // match on all paths
+ PathWaiterMatch // match on specific path
+ PathAnyWaiterMatch // match on any path
+ PathListWaiterMatch // match on list of paths
+ StatusWaiterMatch // match on status code
+ ErrorWaiterMatch // match on error
+)
+
+// String returns the string representation of the waiter match mode.
+func (m WaiterMatchMode) String() string {
+ switch m {
+ case PathAllWaiterMatch:
+ return "pathAll"
+ case PathWaiterMatch:
+ return "path"
+ case PathAnyWaiterMatch:
+ return "pathAny"
+ case PathListWaiterMatch:
+ return "pathList"
+ case StatusWaiterMatch:
+ return "status"
+ case ErrorWaiterMatch:
+ return "error"
+ default:
+ return "unknown waiter match mode"
+ }
+}
+
+// WaitWithContext will make requests for the API operation using NewRequest to
+// build API requests. The request's response will be compared against the
+// Waiter's Acceptors to determine the successful state of the resource the
+// waiter is inspecting.
+//
+// The passed in context must not be nil. If it is nil a panic will occur. The
+// Context will be used to cancel the waiter's pending requests and retry delays.
+// Use aws.BackgroundContext if no context is available.
+//
+// The waiter will continue until the target state defined by the Acceptors,
+// or the max attempts expires.
+//
+// Will return the WaiterResourceNotReadyErrorCode error code if the waiter's
+// retryer ShouldRetry returns false. This normally will happen when the max
+// wait attempts expires.
+func (w Waiter) WaitWithContext(ctx aws.Context) error {
+
+ for attempt := 1; ; attempt++ {
+ req, err := w.NewRequest(w.RequestOptions)
+ if err != nil {
+ waiterLogf(w.Logger, "unable to create request %v", err)
+ return err
+ }
+ req.Handlers.Build.PushBack(MakeAddToUserAgentFreeFormHandler("Waiter"))
+ err = req.Send()
+
+ // See if any of the acceptors match the request's response, or error
+ for _, a := range w.Acceptors {
+ if matched, matchErr := a.match(w.Name, w.Logger, req, err); matched {
+ return matchErr
+ }
+ }
+
+ // The Waiter should only check the resource state MaxAttempts times
+ // This is here instead of in the for loop above to prevent delaying
+ // unnecessary when the waiter will not retry.
+ if attempt == w.MaxAttempts {
+ break
+ }
+
+ // Delay to wait before inspecting the resource again
+ delay := w.Delay(attempt)
+ if sleepFn := req.Config.SleepDelay; sleepFn != nil {
+ // Support SleepDelay for backwards compatibility and testing
+ sleepFn(delay)
+ } else {
+ sleepCtxFn := w.SleepWithContext
+ if sleepCtxFn == nil {
+ sleepCtxFn = aws.SleepWithContext
+ }
+
+ if err := sleepCtxFn(ctx, delay); err != nil {
+ return awserr.New(CanceledErrorCode, "waiter context canceled", err)
+ }
+ }
+ }
+
+ return awserr.New(WaiterResourceNotReadyErrorCode, "exceeded wait attempts", nil)
+}
+
+// A WaiterAcceptor provides the information needed to wait for an API operation
+// to complete.
+type WaiterAcceptor struct {
+ State WaiterState
+ Matcher WaiterMatchMode
+ Argument string
+ Expected interface{}
+}
+
+// match returns if the acceptor found a match with the passed in request
+// or error. True is returned if the acceptor made a match, error is returned
+// if there was an error attempting to perform the match.
+func (a *WaiterAcceptor) match(name string, l aws.Logger, req *Request, err error) (bool, error) {
+ result := false
+ var vals []interface{}
+
+ switch a.Matcher {
+ case PathAllWaiterMatch, PathWaiterMatch:
+ // Require all matches to be equal for result to match
+ vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
+ if len(vals) == 0 {
+ break
+ }
+ result = true
+ for _, val := range vals {
+ if !awsutil.DeepEqual(val, a.Expected) {
+ result = false
+ break
+ }
+ }
+ case PathAnyWaiterMatch:
+ // Only a single match needs to equal for the result to match
+ vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
+ for _, val := range vals {
+ if awsutil.DeepEqual(val, a.Expected) {
+ result = true
+ break
+ }
+ }
+ case PathListWaiterMatch:
+ // ignored matcher
+ case StatusWaiterMatch:
+ s := a.Expected.(int)
+ result = s == req.HTTPResponse.StatusCode
+ case ErrorWaiterMatch:
+ if aerr, ok := err.(awserr.Error); ok {
+ result = aerr.Code() == a.Expected.(string)
+ }
+ default:
+ waiterLogf(l, "WARNING: Waiter %s encountered unexpected matcher: %s",
+ name, a.Matcher)
+ }
+
+ if !result {
+ // If there was no matching result found there is nothing more to do
+ // for this response, retry the request.
+ return false, nil
+ }
+
+ switch a.State {
+ case SuccessWaiterState:
+ // waiter completed
+ return true, nil
+ case FailureWaiterState:
+ // Waiter failure state triggered
+ return true, awserr.New(WaiterResourceNotReadyErrorCode,
+ "failed waiting for successful resource state", err)
+ case RetryWaiterState:
+ // clear the error and retry the operation
+ return false, nil
+ default:
+ waiterLogf(l, "WARNING: Waiter %s encountered unexpected state: %s",
+ name, a.State)
+ return false, nil
+ }
+}
+
+func waiterLogf(logger aws.Logger, msg string, args ...interface{}) {
+ if logger != nil {
+ logger.Log(fmt.Sprintf(msg, args...))
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
index 9975e320c..ea7b886f8 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
@@ -23,7 +23,7 @@ additional config if the AWS_SDK_LOAD_CONFIG environment variable is set.
Alternatively you can explicitly create a Session with shared config enabled.
To do this you can use NewSessionWithOptions to configure how the Session will
be created. Using the NewSessionWithOptions with SharedConfigState set to
-SharedConfigEnabled will create the session as if the AWS_SDK_LOAD_CONFIG
+SharedConfigEnable will create the session as if the AWS_SDK_LOAD_CONFIG
environment variable was set.
Creating Sessions
@@ -84,7 +84,7 @@ override the shared config state (AWS_SDK_LOAD_CONFIG).
// Force enable Shared Config support
sess := session.Must(session.NewSessionWithOptions(session.Options{
- SharedConfigState: SharedConfigEnable,
+ SharedConfigState: session.SharedConfigEnable,
}))
Adding Handlers
@@ -96,7 +96,7 @@ handler logs every request and its payload made by a service client:
// Create a session, and add additional handlers for all service
// clients created with the Session to inherit. Adds logging handler.
sess := session.Must(session.NewSession())
-
+
sess.Handlers.Send.PushFront(func(r *request.Request) {
// Log every request made and its payload
logger.Println("Request: %s/%s, Payload: %s",
@@ -124,9 +124,8 @@ file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both
files have the same format.
If both config files are present the configuration from both files will be
-read. The Session will be created from configuration values from the shared
-credentials file (~/.aws/credentials) over those in the shared credentials
-file (~/.aws/config).
+read. The Session will be created from configuration values from the shared
+credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config).
Credentials are the values the SDK should use for authenticating requests with
AWS Services. They arfrom a configuration file will need to include both
@@ -169,8 +168,8 @@ session option must be set to SharedConfigEnable, or AWS_SDK_LOAD_CONFIG
environment variable set.
The shared configuration instructs the SDK to assume an IAM role with MFA
-when the mfa_serial configuration field is set in the shared config
-(~/.aws/config) or shared credentials (~/.aws/credentials) file.
+when the mfa_serial configuration field is set in the shared config
+(~/.aws/config) or shared credentials (~/.aws/credentials) file.
If mfa_serial is set in the configuration, the SDK will assume the role, and
the AssumeRoleTokenProvider session option is not set an an error will
@@ -251,6 +250,24 @@ $HOME/.aws/config on Linux/Unix based systems, and
AWS_CONFIG_FILE=$HOME/my_shared_config
+Path to a custom Credentials Authority (CA) bundle PEM file that the SDK
+will use instead of the default system's root CA bundle. Use this only
+if you want to replace the CA bundle the SDK uses for TLS requests.
+ AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
+
+Enabling this option will attempt to merge the Transport into the SDK's HTTP
+client. If the client's Transport is not a http.Transport an error will be
+returned. If the Transport's TLS config is set this option will cause the SDK
+to overwrite the Transport's TLS config's RootCAs value. If the CA bundle file
+contains multiple certificates all of them will be loaded.
+
+The Session option CustomCABundle is also available when creating sessions
+to also enable this feature. CustomCABundle session option field has priority
+over the AWS_CA_BUNDLE environment variable, and will be used if both are set.
+
+Setting a custom HTTPClient in the aws.Config options will override this setting.
+To use this option and custom HTTP client, the HTTP client needs to be provided
+when creating the session. Not the service client.
*/
package session
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
index d2f0c8448..4b102f8f2 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
@@ -2,7 +2,6 @@ package session
import (
"os"
- "path/filepath"
"strconv"
"github.com/aws/aws-sdk-go/aws/credentials"
@@ -75,6 +74,24 @@ type envConfig struct {
//
// AWS_CONFIG_FILE=$HOME/my_shared_config
SharedConfigFile string
+
+ // Sets the path to a custom Credentials Authroity (CA) Bundle PEM file
+ // that the SDK will use instead of the system's root CA bundle.
+ // Only use this if you want to configure the SDK to use a custom set
+ // of CAs.
+ //
+ // Enabling this option will attempt to merge the Transport
+ // into the SDK's HTTP client. If the client's Transport is
+ // not a http.Transport an error will be returned. If the
+ // Transport's TLS config is set this option will cause the
+ // SDK to overwrite the Transport's TLS config's RootCAs value.
+ //
+ // Setting a custom HTTPClient in the aws.Config options will override this setting.
+ // To use this option and custom HTTP client, the HTTP client needs to be provided
+ // when creating the session. Not the service client.
+ //
+ // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
+ CustomCABundle string
}
var (
@@ -98,6 +115,12 @@ var (
"AWS_PROFILE",
"AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set
}
+ sharedCredsFileEnvKey = []string{
+ "AWS_SHARED_CREDENTIALS_FILE",
+ }
+ sharedConfigFileEnvKey = []string{
+ "AWS_CONFIG_FILE",
+ }
)
// loadEnvConfig retrieves the SDK's environment configuration.
@@ -147,8 +170,10 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
setFromEnvVal(&cfg.Region, regionKeys)
setFromEnvVal(&cfg.Profile, profileKeys)
- cfg.SharedCredentialsFile = sharedCredentialsFilename()
- cfg.SharedConfigFile = sharedConfigFilename()
+ setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey)
+ setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey)
+
+ cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE")
return cfg
}
@@ -161,28 +186,3 @@ func setFromEnvVal(dst *string, keys []string) {
}
}
}
-
-func sharedCredentialsFilename() string {
- if name := os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(name) > 0 {
- return name
- }
-
- return filepath.Join(userHomeDir(), ".aws", "credentials")
-}
-
-func sharedConfigFilename() string {
- if name := os.Getenv("AWS_CONFIG_FILE"); len(name) > 0 {
- return name
- }
-
- return filepath.Join(userHomeDir(), ".aws", "config")
-}
-
-func userHomeDir() string {
- homeDir := os.Getenv("HOME") // *nix
- if len(homeDir) == 0 { // windows
- homeDir = os.Getenv("USERPROFILE")
- }
-
- return homeDir
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
index 42ab3632e..9f75d5ac5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
@@ -1,7 +1,13 @@
package session
import (
+ "crypto/tls"
+ "crypto/x509"
"fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -92,9 +98,10 @@ func New(cfgs ...*aws.Config) *Session {
// control through code how the Session will be created. Such as specifying the
// config profile, and controlling if shared config is enabled or not.
func NewSession(cfgs ...*aws.Config) (*Session, error) {
- envCfg := loadEnvConfig()
+ opts := Options{}
+ opts.Config.MergeIn(cfgs...)
- return newSession(Options{}, envCfg, cfgs...)
+ return NewSessionWithOptions(opts)
}
// SharedConfigState provides the ability to optionally override the state
@@ -148,6 +155,10 @@ type Options struct {
// and enable or disable the shared config functionality.
SharedConfigState SharedConfigState
+ // Ordered list of files the session will load configuration from.
+ // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE.
+ SharedConfigFiles []string
+
// When the SDK's shared config is configured to assume a role with MFA
// this option is required in order to provide the mechanism that will
// retrieve the MFA token. There is no default value for this field. If
@@ -167,6 +178,21 @@ type Options struct {
// This field is only used if the shared configuration is enabled, and
// the config enables assume role wit MFA via the mfa_serial field.
AssumeRoleTokenProvider func() (string, error)
+
+ // Reader for a custom Credentials Authority (CA) bundle in PEM format that
+ // the SDK will use instead of the default system's root CA bundle. Use this
+ // only if you want to replace the CA bundle the SDK uses for TLS requests.
+ //
+ // Enabling this option will attempt to merge the Transport into the SDK's HTTP
+ // client. If the client's Transport is not a http.Transport an error will be
+ // returned. If the Transport's TLS config is set this option will cause the SDK
+ // to overwrite the Transport's TLS config's RootCAs value. If the CA
+ // bundle reader contains multiple certificates all of them will be loaded.
+ //
+ // The Session option CustomCABundle is also available when creating sessions
+ // to also enable this feature. CustomCABundle session option field has priority
+ // over the AWS_CA_BUNDLE environment variable, and will be used if both are set.
+ CustomCABundle io.Reader
}
// NewSessionWithOptions returns a new Session created from SDK defaults, config files,
@@ -196,7 +222,7 @@ type Options struct {
//
// // Force enable Shared Config support
// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// SharedConfigState: SharedConfigEnable,
+// SharedConfigState: session.SharedConfigEnable,
// }))
func NewSessionWithOptions(opts Options) (*Session, error) {
var envCfg envConfig
@@ -217,6 +243,24 @@ func NewSessionWithOptions(opts Options) (*Session, error) {
envCfg.EnableSharedConfig = true
}
+ if len(envCfg.SharedCredentialsFile) == 0 {
+ envCfg.SharedCredentialsFile = defaults.SharedCredentialsFilename()
+ }
+ if len(envCfg.SharedConfigFile) == 0 {
+ envCfg.SharedConfigFile = defaults.SharedConfigFilename()
+ }
+
+ // Only use AWS_CA_BUNDLE if session option is not provided.
+ if len(envCfg.CustomCABundle) != 0 && opts.CustomCABundle == nil {
+ f, err := os.Open(envCfg.CustomCABundle)
+ if err != nil {
+ return nil, awserr.New("LoadCustomCABundleError",
+ "failed to open custom CA bundle PEM file", err)
+ }
+ defer f.Close()
+ opts.CustomCABundle = f
+ }
+
return newSession(opts, envCfg, &opts.Config)
}
@@ -271,13 +315,18 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
userCfg := &aws.Config{}
userCfg.MergeIn(cfgs...)
- // Order config files will be loaded in with later files overwriting
+ // Ordered config files will be loaded in with later files overwriting
// previous config file values.
- cfgFiles := []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
- if !envCfg.EnableSharedConfig {
- // The shared config file (~/.aws/config) is only loaded if instructed
- // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
- cfgFiles = cfgFiles[1:]
+ var cfgFiles []string
+ if opts.SharedConfigFiles != nil {
+ cfgFiles = opts.SharedConfigFiles
+ } else {
+ cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
+ if !envCfg.EnableSharedConfig {
+ // The shared config file (~/.aws/config) is only loaded if instructed
+ // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
+ cfgFiles = cfgFiles[1:]
+ }
}
// Load additional config from file(s)
@@ -297,9 +346,61 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
initHandlers(s)
+ // Setup HTTP client with custom cert bundle if enabled
+ if opts.CustomCABundle != nil {
+ if err := loadCustomCABundle(s, opts.CustomCABundle); err != nil {
+ return nil, err
+ }
+ }
+
return s, nil
}
+func loadCustomCABundle(s *Session, bundle io.Reader) error {
+ var t *http.Transport
+ switch v := s.Config.HTTPClient.Transport.(type) {
+ case *http.Transport:
+ t = v
+ default:
+ if s.Config.HTTPClient.Transport != nil {
+ return awserr.New("LoadCustomCABundleError",
+ "unable to load custom CA bundle, HTTPClient's transport unsupported type", nil)
+ }
+ }
+ if t == nil {
+ t = &http.Transport{}
+ }
+
+ p, err := loadCertPool(bundle)
+ if err != nil {
+ return err
+ }
+ if t.TLSClientConfig == nil {
+ t.TLSClientConfig = &tls.Config{}
+ }
+ t.TLSClientConfig.RootCAs = p
+
+ s.Config.HTTPClient.Transport = t
+
+ return nil
+}
+
+func loadCertPool(r io.Reader) (*x509.CertPool, error) {
+ b, err := ioutil.ReadAll(r)
+ if err != nil {
+ return nil, awserr.New("LoadCustomCABundleError",
+ "failed to read custom CA bundle PEM file", err)
+ }
+
+ p := x509.NewCertPool()
+ if !p.AppendCertsFromPEM(b) {
+ return nil, awserr.New("LoadCustomCABundleError",
+ "failed to load custom CA bundle PEM file", err)
+ }
+
+ return p, nil
+}
+
func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options) error {
// Merge in user provided configuration
cfg.MergeIn(userCfg)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
index b58076f5e..09c8e5bc7 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
@@ -113,7 +113,7 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) {
f, err := ini.Load(b)
if err != nil {
- return nil, SharedConfigLoadError{Filename: filename}
+ return nil, SharedConfigLoadError{Filename: filename, Err: err}
}
files = append(files, sharedConfigFile{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
new file mode 100644
index 000000000..6aa2ed241
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
@@ -0,0 +1,7 @@
+package v4
+
+// WithUnsignedPayload will enable and set the UnsignedPayload field to
+// true of the signer.
+func WithUnsignedPayload(v4 *Signer) {
+ v4.UnsignedPayload = true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
index 98bfe742b..d68905acb 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
@@ -45,7 +45,7 @@
// If signing a request intended for HTTP2 server, and you're using Go 1.6.2
// through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the
// request URL. https://github.com/golang/go/issues/16847 points to a bug in
-// Go pre 1.8 that failes to make HTTP2 requests using absolute URL in the HTTP
+// Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP
// message. URL.Opaque generally will force Go to make requests with absolute URL.
// URL.RawPath does not do this, but RawPath must be a valid escaping of Path
// or url.EscapedPath will ignore the RawPath escaping.
@@ -55,7 +55,6 @@
package v4
import (
- "bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
@@ -194,6 +193,10 @@ type Signer struct {
// This value should only be used for testing. If it is nil the default
// time.Now will be used.
currentTimeFn func() time.Time
+
+ // UnsignedPayload will prevent signing of the payload. This will only
+ // work for services that have support for this.
+ UnsignedPayload bool
}
// NewSigner returns a Signer pointer configured with the credentials and optional
@@ -227,6 +230,7 @@ type signingCtx struct {
isPresign bool
formattedTime string
formattedShortTime string
+ unsignedPayload bool
bodyDigest string
signedHeaders string
@@ -317,6 +321,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
ServiceName: service,
Region: region,
DisableURIPathEscaping: v4.DisableURIPathEscaping,
+ unsignedPayload: v4.UnsignedPayload,
}
for key := range ctx.Query {
@@ -396,7 +401,7 @@ var SignRequestHandler = request.NamedHandler{
}
// SignSDKRequest signs an AWS request with the V4 signature. This
-// request handler is bested used only with the SDK's built in service client's
+// request handler should only be used with the SDK's built in service client's
// API operation requests.
//
// This function should not be used on its on its own, but in conjunction with
@@ -409,7 +414,18 @@ var SignRequestHandler = request.NamedHandler{
func SignSDKRequest(req *request.Request) {
signSDKRequestWithCurrTime(req, time.Now)
}
-func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time) {
+
+// BuildNamedHandler will build a generic handler for signing.
+func BuildNamedHandler(name string, opts ...func(*Signer)) request.NamedHandler {
+ return request.NamedHandler{
+ Name: name,
+ Fn: func(req *request.Request) {
+ signSDKRequestWithCurrTime(req, time.Now, opts...)
+ },
+ }
+}
+
+func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time, opts ...func(*Signer)) {
// If the request does not need to be signed ignore the signing of the
// request if the AnonymousCredentials object is used.
if req.Config.Credentials == credentials.AnonymousCredentials {
@@ -441,6 +457,10 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time
v4.DisableRequestBodyOverwrite = true
})
+ for _, opt := range opts {
+ opt(v4)
+ }
+
signingTime := req.Time
if !req.LastSignedAt.IsZero() {
signingTime = req.LastSignedAt
@@ -583,14 +603,18 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
headerValues := make([]string, len(headers))
for i, k := range headers {
if k == "host" {
- headerValues[i] = "host:" + ctx.Request.URL.Host
+ if ctx.Request.Host != "" {
+ headerValues[i] = "host:" + ctx.Request.Host
+ } else {
+ headerValues[i] = "host:" + ctx.Request.URL.Host
+ }
} else {
headerValues[i] = k + ":" +
strings.Join(ctx.SignedHeaderVals[k], ",")
}
}
-
- ctx.canonicalHeaders = strings.Join(stripExcessSpaces(headerValues), "\n")
+ stripExcessSpaces(headerValues)
+ ctx.canonicalHeaders = strings.Join(headerValues, "\n")
}
func (ctx *signingCtx) buildCanonicalString() {
@@ -634,14 +658,14 @@ func (ctx *signingCtx) buildSignature() {
func (ctx *signingCtx) buildBodyDigest() {
hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
if hash == "" {
- if ctx.isPresign && ctx.ServiceName == "s3" {
+ if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") {
hash = "UNSIGNED-PAYLOAD"
} else if ctx.Body == nil {
hash = emptyStringSHA256
} else {
hash = hex.EncodeToString(makeSha256Reader(ctx.Body))
}
- if ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
+ if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
ctx.Request.Header.Set("X-Amz-Content-Sha256", hash)
}
}
@@ -692,49 +716,46 @@ func makeSha256Reader(reader io.ReadSeeker) []byte {
return hash.Sum(nil)
}
-const doubleSpaces = " "
+const doubleSpace = " "
-var doubleSpaceBytes = []byte(doubleSpaces)
+// stripExcessSpaces will rewrite the passed in slice's string values to not
+// contain muliple side-by-side spaces.
+func stripExcessSpaces(vals []string) {
+ var j, k, l, m, spaces int
+ for i, str := range vals {
+ // Trim trailing spaces
+ for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
+ }
-func stripExcessSpaces(headerVals []string) []string {
- vals := make([]string, len(headerVals))
- for i, str := range headerVals {
- // Trim leading and trailing spaces
- trimmed := strings.TrimSpace(str)
+ // Trim leading spaces
+ for k = 0; k < j && str[k] == ' '; k++ {
+ }
+ str = str[k : j+1]
- idx := strings.Index(trimmed, doubleSpaces)
- var buf []byte
- for idx > -1 {
- // Multiple adjacent spaces found
- if buf == nil {
- // first time create the buffer
- buf = []byte(trimmed)
- }
+ // Strip multiple spaces.
+ j = strings.Index(str, doubleSpace)
+ if j < 0 {
+ vals[i] = str
+ continue
+ }
- stripToIdx := -1
- for j := idx + 1; j < len(buf); j++ {
- if buf[j] != ' ' {
- buf = append(buf[:idx+1], buf[j:]...)
- stripToIdx = j
- break
- }
- }
-
- if stripToIdx >= 0 {
- idx = bytes.Index(buf[stripToIdx:], doubleSpaceBytes)
- if idx >= 0 {
- idx += stripToIdx
+ buf := []byte(str)
+ for k, m, l = j, j, len(buf); k < l; k++ {
+ if buf[k] == ' ' {
+ if spaces == 0 {
+ // First space.
+ buf[m] = buf[k]
+ m++
}
+ spaces++
} else {
- idx = -1
+ // End of multiple spaces.
+ spaces = 0
+ buf[m] = buf[k]
+ m++
}
}
- if buf != nil {
- vals[i] = string(buf)
- } else {
- vals[i] = trimmed
- }
+ vals[i] = string(buf[:m])
}
- return vals
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url.go b/vendor/github.com/aws/aws-sdk-go/aws/url.go
new file mode 100644
index 000000000..6192b2455
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/url.go
@@ -0,0 +1,12 @@
+// +build go1.8
+
+package aws
+
+import "net/url"
+
+// URLHostname will extract the Hostname without port from the URL value.
+//
+// Wrapper of net/url#URL.Hostname for backwards Go version compatibility.
+func URLHostname(url *url.URL) string {
+ return url.Hostname()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
new file mode 100644
index 000000000..0210d2720
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
@@ -0,0 +1,29 @@
+// +build !go1.8
+
+package aws
+
+import (
+ "net/url"
+ "strings"
+)
+
+// URLHostname will extract the Hostname without port from the URL value.
+//
+// Copy of Go 1.8's net/url#URL.Hostname functionality.
+func URLHostname(url *url.URL) string {
+ return stripPort(url.Host)
+
+}
+
+// stripPort is copy of Go 1.8 url#URL.Hostname functionality.
+// https://golang.org/src/net/url/url.go
+func stripPort(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return hostport
+ }
+ if i := strings.IndexByte(hostport, ']'); i != -1 {
+ return strings.TrimPrefix(hostport[:i], "[")
+ }
+ return hostport[:colon]
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 7c48b0d9c..7a4f26e39 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.7.1"
+const SDKVersion = "1.10.23"
diff --git a/vendor/github.com/aws/aws-sdk-go/doc.go b/vendor/github.com/aws/aws-sdk-go/doc.go
new file mode 100644
index 000000000..3e077e51d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/doc.go
@@ -0,0 +1,405 @@
+// Package sdk is the official AWS SDK for the Go programming language.
+//
+// The AWS SDK for Go provides APIs and utilities that developers can use to
+// build Go applications that use AWS services, such as Amazon Elastic Compute
+// Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3).
+//
+// The SDK removes the complexity of coding directly against a web service
+// interface. It hides a lot of the lower-level plumbing, such as authentication,
+// request retries, and error handling.
+//
+// The SDK also includes helpful utilities on top of the AWS APIs that add additional
+// capabilities and functionality. For example, the Amazon S3 Download and Upload
+// Manager will automatically split up large objects into multiple parts and
+// transfer them concurrently.
+//
+// See the s3manager package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/
+//
+// Getting More Information
+//
+// Checkout the Getting Started Guide and API Reference Docs detailed the SDK's
+// components and details on each AWS client the SDK supports.
+//
+// The Getting Started Guide provides examples and detailed description of how
+// to get setup with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/welcome.html
+//
+// The API Reference Docs include a detailed breakdown of the SDK's components
+// such as utilities and AWS clients. Use this as a reference of the Go types
+// included with the SDK, such as AWS clients, API operations, and API parameters.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// Overview of SDK's Packages
+//
+// The SDK is composed of two main components, SDK core, and service clients.
+// The SDK core packages are all available under the aws package at the root of
+// the SDK. Each client for a supported AWS service is available within its own
+// package under the service folder at the root of the SDK.
+//
+// * aws - SDK core, provides common shared types such as Config, Logger,
+// and utilities to make working with API parameters easier.
+//
+// * awserr - Provides the error interface that the SDK will use for all
+// errors that occur in the SDK's processing. This includes service API
+// response errors as well. The Error type is made up of a code and message.
+// Cast the SDK's returned error type to awserr.Error and call the Code
+// method to compare returned error to specific error codes. See the package's
+// documentation for additional values that can be extracted such as RequestId.
+//
+// * credentials - Provides the types and built in credentials providers
+// the SDK will use to retrieve AWS credentials to make API requests with.
+// Nested under this folder are also additional credentials providers such as
+// stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles.
+//
+// * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK.
+// Use this to lookup AWS service endpoint information such as which services
+// are in a region, and what regions a service is in. Constants are also provided
+// for all region identifiers, e.g UsWest2RegionID for "us-west-2".
+//
+// * session - Provides initial default configuration, and load
+// configuration from external sources such as environment and shared
+// credentials file.
+//
+// * request - Provides the API request sending, and retry logic for the SDK.
+// This package also includes utilities for defining your own request
+// retryer, and configuring how the SDK processes the request.
+//
+// * service - Clients for AWS services. All services supported by the SDK are
+// available under this folder.
+//
+// How to Use the SDK's AWS Service Clients
+//
+// The SDK includes the Go types and utilities you can use to make requests to
+// AWS service APIs. Within the service folder at the root of the SDK you'll find
+// a package for each AWS service the SDK supports. All service clients follows
+// a common pattern of creation and usage.
+//
+// When creating a client for an AWS service you'll first need to have a Session
+// value constructed. The Session provides shared configuration that can be shared
+// between your service clients. When service clients are created you can pass
+// in additional configuration via the aws.Config type to override configuration
+// provided by in the Session to create service client instances with custom
+// configuration.
+//
+// Once the service's client is created you can use it to make API requests the
+// AWS service. These clients are safe to use concurrently.
+//
+// Configuring the SDK
+//
+// In the AWS SDK for Go, you can configure settings for service clients, such
+// as the log level and maximum number of retries. Most settings are optional;
+// however, for each service client, you must specify a region and your credentials.
+// The SDK uses these values to send requests to the correct AWS region and sign
+// requests with the correct credentials. You can specify these values as part
+// of a session or as environment variables.
+//
+// See the SDK's configuration guide for more information.
+// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
+//
+// See the session package documentation for more information on how to use Session
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/session/
+//
+// See the Config type in the aws package for more information on configuration
+// options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// Configuring Credentials
+//
+// When using the SDK you'll generally need your AWS credentials to authenticate
+// with AWS services. The SDK supports multiple methods of supporting these
+// credentials. By default the SDK will source credentials automatically from
+// its default credential chain. See the session package for more information
+// on this chain, and how to configure it. The common items in the credential
+// chain are the following:
+//
+// * Environment Credentials - Set of environment variables that are useful
+// when sub processes are created for specific roles.
+//
+// * Shared Credentials file (~/.aws/credentials) - This file stores your
+// credentials based on a profile name and is useful for local development.
+//
+// * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials
+// to application running on an EC2 instance. This removes the need to manage
+// credential files in production.
+//
+// Credentials can be configured in code as well by setting the Config's Credentials
+// value to a custom provider or using one of the providers included with the
+// SDK to bypass the default credential chain and use a custom one. This is
+// helpful when you want to instruct the SDK to only use a specific set of
+// credentials or providers.
+//
+// This example creates a credential provider for assuming an IAM role, "myRoleARN"
+// and configures the S3 service client to use that role for API requests.
+//
+// // Initial credentials loaded from SDK's default credential chain. Such as
+// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+// // Role. These credentials will be used to to make the STS Assume Role API.
+// sess := session.Must(session.NewSession())
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN.
+// creds := stscreds.NewCredentials(sess, "myRoleArn")
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.New(sess, &aws.Config{Credentials: creds})/
+//
+// See the credentials package documentation for more information on credential
+// providers included with the SDK, and how to customize the SDK's usage of
+// credentials.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
+//
+// The SDK has support for the shared configuration file (~/.aws/config). This
+// support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1",
+// or enabling the feature in code when creating a Session via the
+// Option's SharedConfigState parameter.
+//
+// sess := session.Must(session.NewSessionWithOptions(session.Options{
+// SharedConfigState: session.SharedConfigEnable,
+// }))
+//
+// Configuring AWS Region
+//
+// In addition to the credentials you'll need to specify the region the SDK
+// will use to make AWS API requests to. In the SDK you can specify the region
+// either with an environment variable, or directly in code when a Session or
+// service client is created. The last value specified in code wins if the region
+// is specified multiple ways.
+//
+// To set the region via the environment variable set the "AWS_REGION" to the
+// region you want to the SDK to use. Using this method to set the region will
+// allow you to run your application in multiple regions without needing additional
+// code in the application to select the region.
+//
+// AWS_REGION=us-west-2
+//
+// The endpoints package includes constants for all regions the SDK knows. The
+// values are all suffixed with RegionID. These values are helpful, because they
+// reduce the need to type the region string manually.
+//
+// To set the region on a Session use the aws package's Config struct parameter
+// Region to the AWS region you want the service clients created from the session to
+// use. This is helpful when you want to create multiple service clients, and
+// all of the clients make API requests to the same region.
+//
+// sess := session.Must(session.NewSession(&aws.Config{
+// Region: aws.String(endpoints.UsWest2RegionID),
+// }))
+//
+// See the endpoints package for the AWS Regions and Endpoints metadata.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/
+//
+// In addition to setting the region when creating a Session you can also set
+// the region on a per service client bases. This overrides the region of a
+// Session. This is helpful when you want to create service clients in specific
+// regions different from the Session's region.
+//
+// svc := s3.New(sess, &aws.Config{
+// Region: aws.String(ednpoints.UsWest2RegionID),
+// })
+//
+// See the Config type in the aws package for more information and additional
+// options such as setting the Endpoint, and other service client configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// Making API Requests
+//
+// Once the client is created you can make an API request to the service.
+// Each API method takes a input parameter, and returns the service response
+// and an error. The SDK provides methods for making the API call in multiple ways.
+//
+// In this list we'll use the S3 ListObjects API as an example for the different
+// ways of making API requests.
+//
+// * ListObjects - Base API operation that will make the API request to the service.
+//
+// * ListObjectsRequest - API methods suffixed with Request will construct the
+// API request, but not send it. This is also helpful when you want to get a
+// presigned URL for a request, and share the presigned URL instead of your
+// application making the request directly.
+//
+// * ListObjectsPages - Same as the base API operation, but uses a callback to
+// automatically handle pagination of the API's response.
+//
+// * ListObjectsWithContext - Same as base API operation, but adds support for
+// the Context pattern. This is helpful for controlling the canceling of in
+// flight requests. See the Go standard library context package for more
+// information. This method also takes request package's Option functional
+// options as the variadic argument for modifying how the request will be
+// made, or extracting information from the raw HTTP response.
+//
+// * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for
+// the Context pattern. Similar to ListObjectsWithContext this method also
+// takes the request package's Option function option types as the variadic
+// argument.
+//
+// In addition to the API operations the SDK also includes several higher level
+// methods that abstract checking for and waiting for an AWS resource to be in
+// a desired state. In this list we'll use WaitUntilBucketExists to demonstrate
+// the different forms of waiters.
+//
+// * WaitUntilBucketExists. - Method to make API request to query an AWS service for
+// a resource's state. Will return successfully when that state is accomplished.
+//
+// * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds
+// support for the Context pattern. In addition these methods take request
+// package's WaiterOptions to configure the waiter, and how underlying request
+// will be made by the SDK.
+//
+// The API method will document which error codes the service might return for
+// the operation. These errors will also be available as const strings prefixed
+// with "ErrCode" in the service client's package. If there are no errors listed
+// in the API's SDK documentation you'll need to consult the AWS service's API
+// documentation for the errors that could be returned.
+//
+// ctx := context.Background()
+//
+// result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{
+// Bucket: aws.String("my-bucket"),
+// Key: aws.String("my-key"),
+// })
+// if err != nil {
+// // Cast err to awserr.Error to handle specific error codes.
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == s3.ErrCodeNoSuchKey {
+// // Specific error code handling
+// }
+// return err
+// }
+//
+// // Make sure to close the body when done with it for S3 GetObject APIs or
+// // will leak connections.
+// defer result.Body.Close()
+//
+// fmt.Println("Object Size:", aws.StringValue(result.ContentLength))
+//
+// API Request Pagination and Resource Waiters
+//
+// Pagination helper methods are suffixed with "Pages", and provide the
+// functionality needed to round trip API page requests. Pagination methods
+// take a callback function that will be called for each page of the API's response.
+//
+// objects := []string{}
+// err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{
+// Bucket: aws.String(myBucket),
+// }, func(p *s3.ListObjectsOutput, lastPage bool) bool {
+// for _, o := range p.Contents {
+// objects = append(objects, aws.StringValue(o.Key))
+// }
+// return true // continue paging
+// })
+// if err != nil {
+// panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err))
+// }
+//
+// fmt.Println("Objects in bucket:", objects)
+//
+// Waiter helper methods provide the functionality to wait for an AWS resource
+// state. These methods abstract the logic needed to to check the state of an
+// AWS resource, and wait until that resource is in a desired state. The waiter
+// will block until the resource is in the state that is desired, an error occurs,
+// or the waiter times out. If a resource times out the error code returned will
+// be request.WaiterResourceNotReadyErrorCode.
+//
+// err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{
+// Bucket: aws.String(myBucket),
+// })
+// if err != nil {
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode {
+// fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist")
+// }
+// panic(fmt.Errorf("failed to wait for bucket to exist, %v", err))
+// }
+// fmt.Println("Bucket", myBucket, "exists")
+//
+// Complete SDK Example
+//
+// This example shows a complete working Go file which will upload a file to S3
+// and use the Context pattern to implement timeout logic that will cancel the
+// request if it takes too long. This example highlights how to use sessions,
+// create a service client, make a request, handle the error, and process the
+// response.
+//
+// package main
+//
+// import (
+// "context"
+// "flag"
+// "fmt"
+// "os"
+// "time"
+//
+// "github.com/aws/aws-sdk-go/aws"
+// "github.com/aws/aws-sdk-go/aws/awserr"
+// "github.com/aws/aws-sdk-go/aws/request"
+// "github.com/aws/aws-sdk-go/aws/session"
+// "github.com/aws/aws-sdk-go/service/s3"
+// )
+//
+// // Uploads a file to S3 given a bucket and object key. Also takes a duration
+// // value to terminate the update if it doesn't complete within that time.
+// //
+// // The AWS Region needs to be provided in the AWS shared config or on the
+// // environment variable as `AWS_REGION`. Credentials also must be provided
+// // Will default to shared config file, but can load from environment if provided.
+// //
+// // Usage:
+// // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail
+// // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt
+// func main() {
+// var bucket, key string
+// var timeout time.Duration
+//
+// flag.StringVar(&bucket, "b", "", "Bucket name.")
+// flag.StringVar(&key, "k", "", "Object key name.")
+// flag.DurationVar(&timeout, "d", 0, "Upload timeout.")
+// flag.Parse()
+//
+// // All clients require a Session. The Session provides the client with
+// // shared configuration such as region, endpoint, and credentials. A
+// // Session should be shared where possible to take advantage of
+// // configuration and credential caching. See the session package for
+// // more information.
+// sess := session.Must(session.NewSession())
+//
+// // Create a new instance of the service's client with a Session.
+// // Optional aws.Config values can also be provided as variadic arguments
+// // to the New function. This option allows you to provide service
+// // specific configuration.
+// svc := s3.New(sess)
+//
+// // Create a context with a timeout that will abort the upload if it takes
+// // more than the passed in timeout.
+// ctx := context.Background()
+// var cancelFn func()
+// if timeout > 0 {
+// ctx, cancelFn = context.WithTimeout(ctx, timeout)
+// }
+// // Ensure the context is canceled to prevent leaking.
+// // See context package for more information, https://golang.org/pkg/context/
+// defer cancelFn()
+//
+// // Uploads the object to S3. The Context will interrupt the request if the
+// // timeout expires.
+// _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{
+// Bucket: aws.String(bucket),
+// Key: aws.String(key),
+// Body: os.Stdin,
+// })
+// if err != nil {
+// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode {
+// // If the SDK can determine the request or retry delay was canceled
+// // by a context the CanceledErrorCode error code will be returned.
+// fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err)
+// } else {
+// fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err)
+// }
+// os.Exit(1)
+// }
+//
+// fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key)
+// }
+package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
new file mode 100644
index 000000000..ebcbc2b40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
@@ -0,0 +1,40 @@
+package shareddefaults
+
+import (
+ "os"
+ "path/filepath"
+ "runtime"
+)
+
+// SharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func SharedCredentialsFilename() string {
+ return filepath.Join(UserHomeDir(), ".aws", "credentials")
+}
+
+// SharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func SharedConfigFilename() string {
+ return filepath.Join(UserHomeDir(), ".aws", "config")
+}
+
+// UserHomeDir returns the home directory for the user the process is
+// running under.
+func UserHomeDir() string {
+ if runtime.GOOS == "windows" { // Windows
+ return os.Getenv("USERPROFILE")
+ }
+
+ // *nix
+ return os.Getenv("HOME")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
deleted file mode 100644
index b4ad7405c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Package endpoints validates regional endpoints for services.
-package endpoints
-
-//go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go
-//go:generate gofmt -s -w endpoints_map.go
-
-import (
- "fmt"
- "regexp"
- "strings"
-)
-
-// NormalizeEndpoint takes and endpoint and service API information to return a
-// normalized endpoint and signing region. If the endpoint is not an empty string
-// the service name and region will be used to look up the service's API endpoint.
-// If the endpoint is provided the scheme will be added if it is not present.
-func NormalizeEndpoint(endpoint, serviceName, region string, disableSSL, useDualStack bool) (normEndpoint, signingRegion string) {
- if endpoint == "" {
- return EndpointForRegion(serviceName, region, disableSSL, useDualStack)
- }
-
- return AddScheme(endpoint, disableSSL), ""
-}
-
-// EndpointForRegion returns an endpoint and its signing region for a service and region.
-// if the service and region pair are not found endpoint and signingRegion will be empty.
-func EndpointForRegion(svcName, region string, disableSSL, useDualStack bool) (endpoint, signingRegion string) {
- dualStackField := ""
- if useDualStack {
- dualStackField = "/dualstack"
- }
-
- derivedKeys := []string{
- region + "/" + svcName + dualStackField,
- region + "/*" + dualStackField,
- "*/" + svcName + dualStackField,
- "*/*" + dualStackField,
- }
-
- for _, key := range derivedKeys {
- if val, ok := endpointsMap.Endpoints[key]; ok {
- ep := val.Endpoint
- ep = strings.Replace(ep, "{region}", region, -1)
- ep = strings.Replace(ep, "{service}", svcName, -1)
-
- endpoint = ep
- signingRegion = val.SigningRegion
- break
- }
- }
-
- return AddScheme(endpoint, disableSSL), signingRegion
-}
-
-// Regular expression to determine if the endpoint string is prefixed with a scheme.
-var schemeRE = regexp.MustCompile("^([^:]+)://")
-
-// AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no
-// scheme. If disableSSL is true HTTP will be added instead of the default HTTPS.
-func AddScheme(endpoint string, disableSSL bool) string {
- if endpoint != "" && !schemeRE.MatchString(endpoint) {
- scheme := "https"
- if disableSSL {
- scheme = "http"
- }
- endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
- }
-
- return endpoint
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
deleted file mode 100644
index c5bf3c7c3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "version": 2,
- "endpoints": {
- "*/*": {
- "endpoint": "{service}.{region}.amazonaws.com"
- },
- "cn-north-1/*": {
- "endpoint": "{service}.{region}.amazonaws.com.cn",
- "signatureVersion": "v4"
- },
- "cn-north-1/ec2metadata": {
- "endpoint": "http://169.254.169.254/latest"
- },
- "us-gov-west-1/iam": {
- "endpoint": "iam.us-gov.amazonaws.com"
- },
- "us-gov-west-1/sts": {
- "endpoint": "sts.us-gov-west-1.amazonaws.com"
- },
- "us-gov-west-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "us-gov-west-1/ec2metadata": {
- "endpoint": "http://169.254.169.254/latest"
- },
- "*/cloudfront": {
- "endpoint": "cloudfront.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/cloudsearchdomain": {
- "endpoint": "",
- "signingRegion": "us-east-1"
- },
- "*/data.iot": {
- "endpoint": "",
- "signingRegion": "us-east-1"
- },
- "*/ec2metadata": {
- "endpoint": "http://169.254.169.254/latest"
- },
- "*/iam": {
- "endpoint": "iam.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/importexport": {
- "endpoint": "importexport.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/route53": {
- "endpoint": "route53.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/sts": {
- "endpoint": "sts.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/waf": {
- "endpoint": "waf.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "us-east-1/sdb": {
- "endpoint": "sdb.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "*/s3/dualstack": {
- "endpoint": "s3.dualstack.{region}.amazonaws.com"
- },
- "us-east-1/s3": {
- "endpoint": "s3.amazonaws.com"
- },
- "eu-central-1/s3": {
- "endpoint": "{service}.{region}.amazonaws.com"
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
deleted file mode 100644
index a81d158c3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package endpoints
-
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-type endpointStruct struct {
- Version int
- Endpoints map[string]endpointEntry
-}
-
-type endpointEntry struct {
- Endpoint string
- SigningRegion string
-}
-
-var endpointsMap = endpointStruct{
- Version: 2,
- Endpoints: map[string]endpointEntry{
- "*/*": {
- Endpoint: "{service}.{region}.amazonaws.com",
- },
- "*/cloudfront": {
- Endpoint: "cloudfront.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/cloudsearchdomain": {
- Endpoint: "",
- SigningRegion: "us-east-1",
- },
- "*/data.iot": {
- Endpoint: "",
- SigningRegion: "us-east-1",
- },
- "*/ec2metadata": {
- Endpoint: "http://169.254.169.254/latest",
- },
- "*/iam": {
- Endpoint: "iam.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/importexport": {
- Endpoint: "importexport.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/route53": {
- Endpoint: "route53.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "*/s3/dualstack": {
- Endpoint: "s3.dualstack.{region}.amazonaws.com",
- },
- "*/sts": {
- Endpoint: "sts.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/waf": {
- Endpoint: "waf.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "cn-north-1/*": {
- Endpoint: "{service}.{region}.amazonaws.com.cn",
- },
- "cn-north-1/ec2metadata": {
- Endpoint: "http://169.254.169.254/latest",
- },
- "eu-central-1/s3": {
- Endpoint: "{service}.{region}.amazonaws.com",
- },
- "us-east-1/s3": {
- Endpoint: "s3.amazonaws.com",
- },
- "us-east-1/sdb": {
- Endpoint: "sdb.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "us-gov-west-1/ec2metadata": {
- Endpoint: "http://169.254.169.254/latest",
- },
- "us-gov-west-1/iam": {
- Endpoint: "iam.us-gov.amazonaws.com",
- },
- "us-gov-west-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "us-gov-west-1/sts": {
- Endpoint: "sts.us-gov-west-1.amazonaws.com",
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
index f434ab7cb..524ca952a 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
@@ -80,7 +80,6 @@ func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix stri
continue
}
-
if protocol.CanSetIdempotencyToken(value.Field(i), field) {
token := protocol.GetIdempotencyToken()
elemValue = reflect.ValueOf(token)
@@ -124,7 +123,11 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string
// check for unflattened list member
if !q.isEC2 && tag.Get("flattened") == "" {
- prefix += ".member"
+ if listName := tag.Get("locationNameList"); listName == "" {
+ prefix += ".member"
+ } else {
+ prefix += "." + listName
+ }
}
for i := 0; i < value.Len(); i++ {
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
index 20a41d462..716183564 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
@@ -4,6 +4,7 @@ package rest
import (
"bytes"
"encoding/base64"
+ "encoding/json"
"fmt"
"io"
"net/http"
@@ -82,8 +83,12 @@ func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bo
if name == "" {
name = field.Name
}
- if m.Kind() == reflect.Ptr {
+ if kind := m.Kind(); kind == reflect.Ptr {
m = m.Elem()
+ } else if kind == reflect.Interface {
+ if !m.Elem().IsValid() {
+ continue
+ }
}
if !m.IsValid() {
continue
@@ -95,16 +100,16 @@ func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bo
var err error
switch field.Tag.Get("location") {
case "headers": // header maps
- err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag.Get("locationName"))
+ err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag)
case "header":
- err = buildHeader(&r.HTTPRequest.Header, m, name)
+ err = buildHeader(&r.HTTPRequest.Header, m, name, field.Tag)
case "uri":
- err = buildURI(r.HTTPRequest.URL, m, name)
+ err = buildURI(r.HTTPRequest.URL, m, name, field.Tag)
case "querystring":
- err = buildQueryString(query, m, name)
+ err = buildQueryString(query, m, name, field.Tag)
default:
if buildGETQuery {
- err = buildQueryString(query, m, name)
+ err = buildQueryString(query, m, name, field.Tag)
}
}
r.Error = err
@@ -145,8 +150,8 @@ func buildBody(r *request.Request, v reflect.Value) {
}
}
-func buildHeader(header *http.Header, v reflect.Value, name string) error {
- str, err := convertType(v)
+func buildHeader(header *http.Header, v reflect.Value, name string, tag reflect.StructTag) error {
+ str, err := convertType(v, tag)
if err == errValueNotSet {
return nil
} else if err != nil {
@@ -158,9 +163,10 @@ func buildHeader(header *http.Header, v reflect.Value, name string) error {
return nil
}
-func buildHeaderMap(header *http.Header, v reflect.Value, prefix string) error {
+func buildHeaderMap(header *http.Header, v reflect.Value, tag reflect.StructTag) error {
+ prefix := tag.Get("locationName")
for _, key := range v.MapKeys() {
- str, err := convertType(v.MapIndex(key))
+ str, err := convertType(v.MapIndex(key), tag)
if err == errValueNotSet {
continue
} else if err != nil {
@@ -173,8 +179,8 @@ func buildHeaderMap(header *http.Header, v reflect.Value, prefix string) error {
return nil
}
-func buildURI(u *url.URL, v reflect.Value, name string) error {
- value, err := convertType(v)
+func buildURI(u *url.URL, v reflect.Value, name string, tag reflect.StructTag) error {
+ value, err := convertType(v, tag)
if err == errValueNotSet {
return nil
} else if err != nil {
@@ -190,7 +196,7 @@ func buildURI(u *url.URL, v reflect.Value, name string) error {
return nil
}
-func buildQueryString(query url.Values, v reflect.Value, name string) error {
+func buildQueryString(query url.Values, v reflect.Value, name string, tag reflect.StructTag) error {
switch value := v.Interface().(type) {
case []*string:
for _, item := range value {
@@ -207,7 +213,7 @@ func buildQueryString(query url.Values, v reflect.Value, name string) error {
}
}
default:
- str, err := convertType(v)
+ str, err := convertType(v, tag)
if err == errValueNotSet {
return nil
} else if err != nil {
@@ -246,7 +252,7 @@ func EscapePath(path string, encodeSep bool) string {
return buf.String()
}
-func convertType(v reflect.Value) (string, error) {
+func convertType(v reflect.Value, tag reflect.StructTag) (string, error) {
v = reflect.Indirect(v)
if !v.IsValid() {
return "", errValueNotSet
@@ -266,6 +272,16 @@ func convertType(v reflect.Value) (string, error) {
str = strconv.FormatFloat(value, 'f', -1, 64)
case time.Time:
str = value.UTC().Format(RFC822)
+ case aws.JSONValue:
+ b, err := json.Marshal(value)
+ if err != nil {
+ return "", err
+ }
+ if tag.Get("location") == "header" {
+ str = base64.StdEncoding.EncodeToString(b)
+ } else {
+ str = string(b)
+ }
default:
err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
return "", err
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
index 9c00921c0..7a779ee22 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
@@ -3,6 +3,7 @@ package rest
import (
"bytes"
"encoding/base64"
+ "encoding/json"
"fmt"
"io"
"io/ioutil"
@@ -12,6 +13,7 @@ import (
"strings"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -111,7 +113,7 @@ func unmarshalLocationElements(r *request.Request, v reflect.Value) {
case "statusCode":
unmarshalStatusCode(m, r.HTTPResponse.StatusCode)
case "header":
- err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name))
+ err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name), field.Tag)
if err != nil {
r.Error = awserr.New("SerializationError", "failed to decode REST response", err)
break
@@ -158,8 +160,13 @@ func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) err
return nil
}
-func unmarshalHeader(v reflect.Value, header string) error {
- if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
+func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) error {
+ isJSONValue := tag.Get("type") == "jsonvalue"
+ if isJSONValue {
+ if len(header) == 0 {
+ return nil
+ }
+ } else if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
return nil
}
@@ -196,6 +203,22 @@ func unmarshalHeader(v reflect.Value, header string) error {
return err
}
v.Set(reflect.ValueOf(&t))
+ case aws.JSONValue:
+ b := []byte(header)
+ var err error
+ if tag.Get("location") == "header" {
+ b, err = base64.StdEncoding.DecodeString(header)
+ if err != nil {
+ return err
+ }
+ }
+
+ m := aws.JSONValue{}
+ err = json.Unmarshal(b, &m)
+ if err != nil {
+ return err
+ }
+ v.Set(reflect.ValueOf(m))
default:
err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
return err
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
index c74c19196..7091b456d 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
@@ -131,7 +131,6 @@ func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag refl
continue
}
-
mTag := field.Tag
if mTag.Get("location") != "" { // skip non-body members
continue
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
index 64b6ddd3e..87584628a 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
@@ -15,7 +15,10 @@ import (
// needs to match the shape of the XML expected to be decoded.
// If the shape doesn't match unmarshaling will fail.
func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
- n, _ := XMLToStruct(d, nil)
+ n, err := XMLToStruct(d, nil)
+ if err != nil {
+ return err
+ }
if n.Children != nil {
for _, root := range n.Children {
for _, c := range root {
@@ -23,7 +26,7 @@ func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
c = wrappedChild[0] // pull out wrapped element
}
- err := parse(reflect.ValueOf(v), c, "")
+ err = parse(reflect.ValueOf(v), c, "")
if err != nil {
if err == io.EOF {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
index 3112512a2..3e970b629 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
@@ -40,11 +40,16 @@ func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error) {
out := &XMLNode{}
for {
tok, err := d.Token()
- if tok == nil || err == io.EOF {
- break
- }
if err != nil {
- return out, err
+ if err == io.EOF {
+ break
+ } else {
+ return out, err
+ }
+ }
+
+ if tok == nil {
+ break
}
switch typed := tok.(type) {
diff --git a/vendor/github.com/aws/aws-sdk-go/sdk.go b/vendor/github.com/aws/aws-sdk-go/sdk.go
deleted file mode 100644
index afa465a22..000000000
--- a/vendor/github.com/aws/aws-sdk-go/sdk.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// Package sdk is the official AWS SDK for the Go programming language.
-//
-// See our Developer Guide for information for on getting started and using
-// the SDK.
-//
-// https://github.com/aws/aws-sdk-go/wiki
-package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
index 83191e2d7..da2809630 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
@@ -1,12 +1,12 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package ec2 provides a client for Amazon Elastic Compute Cloud.
package ec2
import (
"fmt"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
@@ -17,19 +17,18 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ
// AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the
// client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AcceptReservedInstancesExchangeQuote for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AcceptReservedInstancesExchangeQuote method directly
-// instead.
+// See AcceptReservedInstancesExchangeQuote for more information on using the AcceptReservedInstancesExchangeQuote
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AcceptReservedInstancesExchangeQuoteRequest method.
// req, resp := client.AcceptReservedInstancesExchangeQuoteRequest(params)
@@ -70,27 +69,41 @@ func (c *EC2) AcceptReservedInstancesExchangeQuoteRequest(input *AcceptReservedI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote
func (c *EC2) AcceptReservedInstancesExchangeQuote(input *AcceptReservedInstancesExchangeQuoteInput) (*AcceptReservedInstancesExchangeQuoteOutput, error) {
req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AcceptReservedInstancesExchangeQuoteWithContext is the same as AcceptReservedInstancesExchangeQuote with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AcceptReservedInstancesExchangeQuote for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AcceptReservedInstancesExchangeQuoteWithContext(ctx aws.Context, input *AcceptReservedInstancesExchangeQuoteInput, opts ...request.Option) (*AcceptReservedInstancesExchangeQuoteOutput, error) {
+ req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection"
// AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the AcceptVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AcceptVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AcceptVpcPeeringConnection method directly
-// instead.
+// See AcceptVpcPeeringConnection for more information on using the AcceptVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AcceptVpcPeeringConnectionRequest method.
// req, resp := client.AcceptVpcPeeringConnectionRequest(params)
@@ -121,8 +134,8 @@ func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectio
//
// Accept a VPC peering connection request. To accept a request, the VPC peering
// connection must be in the pending-acceptance state, and you must be the owner
-// of the peer VPC. Use the DescribeVpcPeeringConnections request to view your
-// outstanding VPC peering connection requests.
+// of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding
+// VPC peering connection requests.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -133,27 +146,41 @@ func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection
func (c *EC2) AcceptVpcPeeringConnection(input *AcceptVpcPeeringConnectionInput) (*AcceptVpcPeeringConnectionOutput, error) {
req, out := c.AcceptVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AcceptVpcPeeringConnectionWithContext is the same as AcceptVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AcceptVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AcceptVpcPeeringConnectionWithContext(ctx aws.Context, input *AcceptVpcPeeringConnectionInput, opts ...request.Option) (*AcceptVpcPeeringConnectionOutput, error) {
+ req, out := c.AcceptVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAllocateAddress = "AllocateAddress"
// AllocateAddressRequest generates a "aws/request.Request" representing the
// client's request for the AllocateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AllocateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AllocateAddress method directly
-// instead.
+// See AllocateAddress for more information on using the AllocateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AllocateAddressRequest method.
// req, resp := client.AllocateAddressRequest(params)
@@ -197,27 +224,41 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress
func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutput, error) {
req, out := c.AllocateAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AllocateAddressWithContext is the same as AllocateAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AllocateAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AllocateAddressWithContext(ctx aws.Context, input *AllocateAddressInput, opts ...request.Option) (*AllocateAddressOutput, error) {
+ req, out := c.AllocateAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAllocateHosts = "AllocateHosts"
// AllocateHostsRequest generates a "aws/request.Request" representing the
// client's request for the AllocateHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AllocateHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AllocateHosts method directly
-// instead.
+// See AllocateHosts for more information on using the AllocateHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AllocateHostsRequest method.
// req, resp := client.AllocateHostsRequest(params)
@@ -259,27 +300,41 @@ func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts
func (c *EC2) AllocateHosts(input *AllocateHostsInput) (*AllocateHostsOutput, error) {
req, out := c.AllocateHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AllocateHostsWithContext is the same as AllocateHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AllocateHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AllocateHostsWithContext(ctx aws.Context, input *AllocateHostsInput, opts ...request.Option) (*AllocateHostsOutput, error) {
+ req, out := c.AllocateHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssignIpv6Addresses = "AssignIpv6Addresses"
// AssignIpv6AddressesRequest generates a "aws/request.Request" representing the
// client's request for the AssignIpv6Addresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssignIpv6Addresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssignIpv6Addresses method directly
-// instead.
+// See AssignIpv6Addresses for more information on using the AssignIpv6Addresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssignIpv6AddressesRequest method.
// req, resp := client.AssignIpv6AddressesRequest(params)
@@ -326,27 +381,41 @@ func (c *EC2) AssignIpv6AddressesRequest(input *AssignIpv6AddressesInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses
func (c *EC2) AssignIpv6Addresses(input *AssignIpv6AddressesInput) (*AssignIpv6AddressesOutput, error) {
req, out := c.AssignIpv6AddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssignIpv6AddressesWithContext is the same as AssignIpv6Addresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssignIpv6Addresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssignIpv6AddressesWithContext(ctx aws.Context, input *AssignIpv6AddressesInput, opts ...request.Option) (*AssignIpv6AddressesOutput, error) {
+ req, out := c.AssignIpv6AddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses"
// AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the
// client's request for the AssignPrivateIpAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssignPrivateIpAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssignPrivateIpAddresses method directly
-// instead.
+// See AssignPrivateIpAddresses for more information on using the AssignPrivateIpAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssignPrivateIpAddressesRequest method.
// req, resp := client.AssignPrivateIpAddressesRequest(params)
@@ -398,27 +467,41 @@ func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses
func (c *EC2) AssignPrivateIpAddresses(input *AssignPrivateIpAddressesInput) (*AssignPrivateIpAddressesOutput, error) {
req, out := c.AssignPrivateIpAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssignPrivateIpAddressesWithContext is the same as AssignPrivateIpAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssignPrivateIpAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssignPrivateIpAddressesWithContext(ctx aws.Context, input *AssignPrivateIpAddressesInput, opts ...request.Option) (*AssignPrivateIpAddressesOutput, error) {
+ req, out := c.AssignPrivateIpAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateAddress = "AssociateAddress"
// AssociateAddressRequest generates a "aws/request.Request" representing the
// client's request for the AssociateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateAddress method directly
-// instead.
+// See AssociateAddress for more information on using the AssociateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateAddressRequest method.
// req, resp := client.AssociateAddressRequest(params)
@@ -455,12 +538,17 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques
//
// [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is
// already associated with a different instance, it is disassociated from that
-// instance and associated with the specified instance.
+// instance and associated with the specified instance. If you associate an
+// Elastic IP address with an instance that has an existing Elastic IP address,
+// the existing address is disassociated from the instance, but remains allocated
+// to your account.
//
// [VPC in an EC2-Classic account] If you don't specify a private IP address,
// the Elastic IP address is associated with the primary IP address. If the
// Elastic IP address is already associated with a different instance or a network
-// interface, you get an error unless you allow reassociation.
+// interface, you get an error unless you allow reassociation. You cannot associate
+// an Elastic IP address with an instance or network interface that has an existing
+// Elastic IP address.
//
// This is an idempotent operation. If you perform the operation more than once,
// Amazon EC2 doesn't return an error, and you may be charged for each time
@@ -476,27 +564,41 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress
func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressOutput, error) {
req, out := c.AssociateAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateAddressWithContext is the same as AssociateAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateAddressWithContext(ctx aws.Context, input *AssociateAddressInput, opts ...request.Option) (*AssociateAddressOutput, error) {
+ req, out := c.AssociateAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateDhcpOptions = "AssociateDhcpOptions"
// AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the AssociateDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateDhcpOptions method directly
-// instead.
+// See AssociateDhcpOptions for more information on using the AssociateDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateDhcpOptionsRequest method.
// req, resp := client.AssociateDhcpOptionsRequest(params)
@@ -549,27 +651,41 @@ func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions
func (c *EC2) AssociateDhcpOptions(input *AssociateDhcpOptionsInput) (*AssociateDhcpOptionsOutput, error) {
req, out := c.AssociateDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateDhcpOptionsWithContext is the same as AssociateDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateDhcpOptionsWithContext(ctx aws.Context, input *AssociateDhcpOptionsInput, opts ...request.Option) (*AssociateDhcpOptionsOutput, error) {
+ req, out := c.AssociateDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile"
// AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the
// client's request for the AssociateIamInstanceProfile operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateIamInstanceProfile for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateIamInstanceProfile method directly
-// instead.
+// See AssociateIamInstanceProfile for more information on using the AssociateIamInstanceProfile
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateIamInstanceProfileRequest method.
// req, resp := client.AssociateIamInstanceProfileRequest(params)
@@ -610,27 +726,41 @@ func (c *EC2) AssociateIamInstanceProfileRequest(input *AssociateIamInstanceProf
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile
func (c *EC2) AssociateIamInstanceProfile(input *AssociateIamInstanceProfileInput) (*AssociateIamInstanceProfileOutput, error) {
req, out := c.AssociateIamInstanceProfileRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateIamInstanceProfileWithContext is the same as AssociateIamInstanceProfile with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateIamInstanceProfile for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateIamInstanceProfileWithContext(ctx aws.Context, input *AssociateIamInstanceProfileInput, opts ...request.Option) (*AssociateIamInstanceProfileOutput, error) {
+ req, out := c.AssociateIamInstanceProfileRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateRouteTable = "AssociateRouteTable"
// AssociateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the AssociateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateRouteTable method directly
-// instead.
+// See AssociateRouteTable for more information on using the AssociateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateRouteTableRequest method.
// req, resp := client.AssociateRouteTableRequest(params)
@@ -677,27 +807,41 @@ func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable
func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRouteTableOutput, error) {
req, out := c.AssociateRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateRouteTableWithContext is the same as AssociateRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateRouteTableWithContext(ctx aws.Context, input *AssociateRouteTableInput, opts ...request.Option) (*AssociateRouteTableOutput, error) {
+ req, out := c.AssociateRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock"
// AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the AssociateSubnetCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateSubnetCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateSubnetCidrBlock method directly
-// instead.
+// See AssociateSubnetCidrBlock for more information on using the AssociateSubnetCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateSubnetCidrBlockRequest method.
// req, resp := client.AssociateSubnetCidrBlockRequest(params)
@@ -739,27 +883,41 @@ func (c *EC2) AssociateSubnetCidrBlockRequest(input *AssociateSubnetCidrBlockInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock
func (c *EC2) AssociateSubnetCidrBlock(input *AssociateSubnetCidrBlockInput) (*AssociateSubnetCidrBlockOutput, error) {
req, out := c.AssociateSubnetCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateSubnetCidrBlockWithContext is the same as AssociateSubnetCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateSubnetCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateSubnetCidrBlockWithContext(ctx aws.Context, input *AssociateSubnetCidrBlockInput, opts ...request.Option) (*AssociateSubnetCidrBlockOutput, error) {
+ req, out := c.AssociateSubnetCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock"
// AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the AssociateVpcCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateVpcCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateVpcCidrBlock method directly
-// instead.
+// See AssociateVpcCidrBlock for more information on using the AssociateVpcCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateVpcCidrBlockRequest method.
// req, resp := client.AssociateVpcCidrBlockRequest(params)
@@ -800,27 +958,41 @@ func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock
func (c *EC2) AssociateVpcCidrBlock(input *AssociateVpcCidrBlockInput) (*AssociateVpcCidrBlockOutput, error) {
req, out := c.AssociateVpcCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateVpcCidrBlockWithContext is the same as AssociateVpcCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateVpcCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateVpcCidrBlockWithContext(ctx aws.Context, input *AssociateVpcCidrBlockInput, opts ...request.Option) (*AssociateVpcCidrBlockOutput, error) {
+ req, out := c.AssociateVpcCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachClassicLinkVpc = "AttachClassicLinkVpc"
// AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the
// client's request for the AttachClassicLinkVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachClassicLinkVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachClassicLinkVpc method directly
-// instead.
+// See AttachClassicLinkVpc for more information on using the AttachClassicLinkVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachClassicLinkVpcRequest method.
// req, resp := client.AttachClassicLinkVpcRequest(params)
@@ -871,27 +1043,41 @@ func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc
func (c *EC2) AttachClassicLinkVpc(input *AttachClassicLinkVpcInput) (*AttachClassicLinkVpcOutput, error) {
req, out := c.AttachClassicLinkVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachClassicLinkVpcWithContext is the same as AttachClassicLinkVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachClassicLinkVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachClassicLinkVpcWithContext(ctx aws.Context, input *AttachClassicLinkVpcInput, opts ...request.Option) (*AttachClassicLinkVpcOutput, error) {
+ req, out := c.AttachClassicLinkVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachInternetGateway = "AttachInternetGateway"
// AttachInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the AttachInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachInternetGateway method directly
-// instead.
+// See AttachInternetGateway for more information on using the AttachInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachInternetGatewayRequest method.
// req, resp := client.AttachInternetGatewayRequest(params)
@@ -935,27 +1121,41 @@ func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway
func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) {
req, out := c.AttachInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachInternetGatewayWithContext is the same as AttachInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachInternetGatewayWithContext(ctx aws.Context, input *AttachInternetGatewayInput, opts ...request.Option) (*AttachInternetGatewayOutput, error) {
+ req, out := c.AttachInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachNetworkInterface = "AttachNetworkInterface"
// AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the AttachNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachNetworkInterface method directly
-// instead.
+// See AttachNetworkInterface for more information on using the AttachNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachNetworkInterfaceRequest method.
// req, resp := client.AttachNetworkInterfaceRequest(params)
@@ -995,27 +1195,41 @@ func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface
func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*AttachNetworkInterfaceOutput, error) {
req, out := c.AttachNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachNetworkInterfaceWithContext is the same as AttachNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachNetworkInterfaceWithContext(ctx aws.Context, input *AttachNetworkInterfaceInput, opts ...request.Option) (*AttachNetworkInterfaceOutput, error) {
+ req, out := c.AttachNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachVolume = "AttachVolume"
// AttachVolumeRequest generates a "aws/request.Request" representing the
// client's request for the AttachVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachVolume method directly
-// instead.
+// See AttachVolume for more information on using the AttachVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachVolumeRequest method.
// req, resp := client.AttachVolumeRequest(params)
@@ -1084,27 +1298,41 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume
func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) {
req, out := c.AttachVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachVolumeWithContext is the same as AttachVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*VolumeAttachment, error) {
+ req, out := c.AttachVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachVpnGateway = "AttachVpnGateway"
// AttachVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the AttachVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachVpnGateway method directly
-// instead.
+// See AttachVpnGateway for more information on using the AttachVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachVpnGatewayRequest method.
// req, resp := client.AttachVpnGatewayRequest(params)
@@ -1133,8 +1361,11 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques
// AttachVpnGateway API operation for Amazon Elastic Compute Cloud.
//
-// Attaches a virtual private gateway to a VPC. For more information, see Adding
-// a Hardware Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// Attaches a virtual private gateway to a VPC. You can attach one virtual private
+// gateway to one VPC at a time.
+//
+// For more information, see Adding a Hardware Virtual Private Gateway to Your
+// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -1146,27 +1377,41 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) {
req, out := c.AttachVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachVpnGatewayWithContext is the same as AttachVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachVpnGatewayWithContext(ctx aws.Context, input *AttachVpnGatewayInput, opts ...request.Option) (*AttachVpnGatewayOutput, error) {
+ req, out := c.AttachVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
// AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSecurityGroupEgress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AuthorizeSecurityGroupEgress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AuthorizeSecurityGroupEgress method directly
-// instead.
+// See AuthorizeSecurityGroupEgress for more information on using the AuthorizeSecurityGroupEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AuthorizeSecurityGroupEgressRequest method.
// req, resp := client.AuthorizeSecurityGroupEgressRequest(params)
@@ -1224,27 +1469,41 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress
func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressInput) (*AuthorizeSecurityGroupEgressOutput, error) {
req, out := c.AuthorizeSecurityGroupEgressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AuthorizeSecurityGroupEgressWithContext is the same as AuthorizeSecurityGroupEgress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AuthorizeSecurityGroupEgress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AuthorizeSecurityGroupEgressWithContext(ctx aws.Context, input *AuthorizeSecurityGroupEgressInput, opts ...request.Option) (*AuthorizeSecurityGroupEgressOutput, error) {
+ req, out := c.AuthorizeSecurityGroupEgressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
// AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSecurityGroupIngress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AuthorizeSecurityGroupIngress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AuthorizeSecurityGroupIngress method directly
-// instead.
+// See AuthorizeSecurityGroupIngress for more information on using the AuthorizeSecurityGroupIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AuthorizeSecurityGroupIngressRequest method.
// req, resp := client.AuthorizeSecurityGroupIngressRequest(params)
@@ -1302,27 +1561,41 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress
func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngressInput) (*AuthorizeSecurityGroupIngressOutput, error) {
req, out := c.AuthorizeSecurityGroupIngressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AuthorizeSecurityGroupIngressWithContext is the same as AuthorizeSecurityGroupIngress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AuthorizeSecurityGroupIngress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AuthorizeSecurityGroupIngressWithContext(ctx aws.Context, input *AuthorizeSecurityGroupIngressInput, opts ...request.Option) (*AuthorizeSecurityGroupIngressOutput, error) {
+ req, out := c.AuthorizeSecurityGroupIngressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opBundleInstance = "BundleInstance"
// BundleInstanceRequest generates a "aws/request.Request" representing the
// client's request for the BundleInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BundleInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BundleInstance method directly
-// instead.
+// See BundleInstance for more information on using the BundleInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BundleInstanceRequest method.
// req, resp := client.BundleInstanceRequest(params)
@@ -1370,27 +1643,41 @@ func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance
func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, error) {
req, out := c.BundleInstanceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BundleInstanceWithContext is the same as BundleInstance with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BundleInstance for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) BundleInstanceWithContext(ctx aws.Context, input *BundleInstanceInput, opts ...request.Option) (*BundleInstanceOutput, error) {
+ req, out := c.BundleInstanceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelBundleTask = "CancelBundleTask"
// CancelBundleTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelBundleTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelBundleTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelBundleTask method directly
-// instead.
+// See CancelBundleTask for more information on using the CancelBundleTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelBundleTaskRequest method.
// req, resp := client.CancelBundleTaskRequest(params)
@@ -1430,27 +1717,41 @@ func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask
func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskOutput, error) {
req, out := c.CancelBundleTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelBundleTaskWithContext is the same as CancelBundleTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelBundleTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelBundleTaskWithContext(ctx aws.Context, input *CancelBundleTaskInput, opts ...request.Option) (*CancelBundleTaskOutput, error) {
+ req, out := c.CancelBundleTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelConversionTask = "CancelConversionTask"
// CancelConversionTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelConversionTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelConversionTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelConversionTask method directly
-// instead.
+// See CancelConversionTask for more information on using the CancelConversionTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelConversionTaskRequest method.
// req, resp := client.CancelConversionTaskRequest(params)
@@ -1499,27 +1800,41 @@ func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask
func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelConversionTaskOutput, error) {
req, out := c.CancelConversionTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelConversionTaskWithContext is the same as CancelConversionTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelConversionTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelConversionTaskWithContext(ctx aws.Context, input *CancelConversionTaskInput, opts ...request.Option) (*CancelConversionTaskOutput, error) {
+ req, out := c.CancelConversionTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelExportTask = "CancelExportTask"
// CancelExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelExportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelExportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelExportTask method directly
-// instead.
+// See CancelExportTask for more information on using the CancelExportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelExportTaskRequest method.
// req, resp := client.CancelExportTaskRequest(params)
@@ -1564,27 +1879,41 @@ func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask
func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
req, out := c.CancelExportTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelExportTaskWithContext is the same as CancelExportTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelExportTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) {
+ req, out := c.CancelExportTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelImportTask = "CancelImportTask"
// CancelImportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelImportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelImportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelImportTask method directly
-// instead.
+// See CancelImportTask for more information on using the CancelImportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelImportTaskRequest method.
// req, resp := client.CancelImportTaskRequest(params)
@@ -1624,27 +1953,41 @@ func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask
func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskOutput, error) {
req, out := c.CancelImportTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelImportTaskWithContext is the same as CancelImportTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelImportTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelImportTaskWithContext(ctx aws.Context, input *CancelImportTaskInput, opts ...request.Option) (*CancelImportTaskOutput, error) {
+ req, out := c.CancelImportTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
// CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the
// client's request for the CancelReservedInstancesListing operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelReservedInstancesListing for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelReservedInstancesListing method directly
-// instead.
+// See CancelReservedInstancesListing for more information on using the CancelReservedInstancesListing
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelReservedInstancesListingRequest method.
// req, resp := client.CancelReservedInstancesListingRequest(params)
@@ -1688,27 +2031,41 @@ func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstanc
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing
func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListingInput) (*CancelReservedInstancesListingOutput, error) {
req, out := c.CancelReservedInstancesListingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelReservedInstancesListingWithContext is the same as CancelReservedInstancesListing with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelReservedInstancesListing for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelReservedInstancesListingWithContext(ctx aws.Context, input *CancelReservedInstancesListingInput, opts ...request.Option) (*CancelReservedInstancesListingOutput, error) {
+ req, out := c.CancelReservedInstancesListingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
// CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the
// client's request for the CancelSpotFleetRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelSpotFleetRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelSpotFleetRequests method directly
-// instead.
+// See CancelSpotFleetRequests for more information on using the CancelSpotFleetRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelSpotFleetRequestsRequest method.
// req, resp := client.CancelSpotFleetRequestsRequest(params)
@@ -1755,27 +2112,41 @@ func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests
func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) {
req, out := c.CancelSpotFleetRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelSpotFleetRequestsWithContext is the same as CancelSpotFleetRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelSpotFleetRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelSpotFleetRequestsWithContext(ctx aws.Context, input *CancelSpotFleetRequestsInput, opts ...request.Option) (*CancelSpotFleetRequestsOutput, error) {
+ req, out := c.CancelSpotFleetRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
// CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the
// client's request for the CancelSpotInstanceRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelSpotInstanceRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelSpotInstanceRequests method directly
-// instead.
+// See CancelSpotInstanceRequests for more information on using the CancelSpotInstanceRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelSpotInstanceRequestsRequest method.
// req, resp := client.CancelSpotInstanceRequestsRequest(params)
@@ -1823,27 +2194,41 @@ func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequest
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests
func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) {
req, out := c.CancelSpotInstanceRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelSpotInstanceRequestsWithContext is the same as CancelSpotInstanceRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelSpotInstanceRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelSpotInstanceRequestsWithContext(ctx aws.Context, input *CancelSpotInstanceRequestsInput, opts ...request.Option) (*CancelSpotInstanceRequestsOutput, error) {
+ req, out := c.CancelSpotInstanceRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opConfirmProductInstance = "ConfirmProductInstance"
// ConfirmProductInstanceRequest generates a "aws/request.Request" representing the
// client's request for the ConfirmProductInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ConfirmProductInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ConfirmProductInstance method directly
-// instead.
+// See ConfirmProductInstance for more information on using the ConfirmProductInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ConfirmProductInstanceRequest method.
// req, resp := client.ConfirmProductInstanceRequest(params)
@@ -1886,27 +2271,41 @@ func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance
func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*ConfirmProductInstanceOutput, error) {
req, out := c.ConfirmProductInstanceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ConfirmProductInstanceWithContext is the same as ConfirmProductInstance with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ConfirmProductInstance for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ConfirmProductInstanceWithContext(ctx aws.Context, input *ConfirmProductInstanceInput, opts ...request.Option) (*ConfirmProductInstanceOutput, error) {
+ req, out := c.ConfirmProductInstanceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCopyImage = "CopyImage"
// CopyImageRequest generates a "aws/request.Request" representing the
// client's request for the CopyImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopyImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopyImage method directly
-// instead.
+// See CopyImage for more information on using the CopyImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopyImageRequest method.
// req, resp := client.CopyImageRequest(params)
@@ -1939,7 +2338,8 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out
// region. You specify the destination region by using its endpoint when making
// the request.
//
-// For more information, see Copying AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html)
+// For more information about the prerequisites and limits when copying an AMI,
+// see Copying an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -1951,27 +2351,41 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage
func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) {
req, out := c.CopyImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CopyImageWithContext is the same as CopyImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopyImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CopyImageWithContext(ctx aws.Context, input *CopyImageInput, opts ...request.Option) (*CopyImageOutput, error) {
+ req, out := c.CopyImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCopySnapshot = "CopySnapshot"
// CopySnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CopySnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopySnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopySnapshot method directly
-// instead.
+// See CopySnapshot for more information on using the CopySnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopySnapshotRequest method.
// req, resp := client.CopySnapshotRequest(params)
@@ -2030,27 +2444,41 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot
func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) {
req, out := c.CopySnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CopySnapshotWithContext is the same as CopySnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopySnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, opts ...request.Option) (*CopySnapshotOutput, error) {
+ req, out := c.CopySnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateCustomerGateway = "CreateCustomerGateway"
// CreateCustomerGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateCustomerGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateCustomerGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateCustomerGateway method directly
-// instead.
+// See CreateCustomerGateway for more information on using the CreateCustomerGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateCustomerGatewayRequest method.
// req, resp := client.CreateCustomerGatewayRequest(params)
@@ -2114,27 +2542,127 @@ func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway
func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateCustomerGatewayOutput, error) {
req, out := c.CreateCustomerGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateCustomerGatewayWithContext is the same as CreateCustomerGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateCustomerGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateCustomerGatewayWithContext(ctx aws.Context, input *CreateCustomerGatewayInput, opts ...request.Option) (*CreateCustomerGatewayOutput, error) {
+ req, out := c.CreateCustomerGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateDefaultVpc = "CreateDefaultVpc"
+
+// CreateDefaultVpcRequest generates a "aws/request.Request" representing the
+// client's request for the CreateDefaultVpc operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateDefaultVpc for more information on using the CreateDefaultVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateDefaultVpcRequest method.
+// req, resp := client.CreateDefaultVpcRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
+func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *request.Request, output *CreateDefaultVpcOutput) {
+ op := &request.Operation{
+ Name: opCreateDefaultVpc,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateDefaultVpcInput{}
+ }
+
+ output = &CreateDefaultVpcOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateDefaultVpc API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet
+// in each Availability Zone. For more information about the components of a
+// default VPC, see Default VPC and Default Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html)
+// in the Amazon Virtual Private Cloud User Guide. You cannot specify the components
+// of the default VPC yourself.
+//
+// You can create a default VPC if you deleted your previous default VPC. You
+// cannot have more than one default VPC per region.
+//
+// If your account supports EC2-Classic, you cannot use this action to create
+// a default VPC in a region that supports EC2-Classic. If you want a default
+// VPC in a region that supports EC2-Classic, see "I really want a default VPC
+// for my existing EC2 account. Is that possible?" in the Default VPCs FAQ (http://aws.amazon.com/vpc/faqs/#Default_VPCs).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateDefaultVpc for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
+func (c *EC2) CreateDefaultVpc(input *CreateDefaultVpcInput) (*CreateDefaultVpcOutput, error) {
+ req, out := c.CreateDefaultVpcRequest(input)
+ return out, req.Send()
+}
+
+// CreateDefaultVpcWithContext is the same as CreateDefaultVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateDefaultVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateDefaultVpcWithContext(ctx aws.Context, input *CreateDefaultVpcInput, opts ...request.Option) (*CreateDefaultVpcOutput, error) {
+ req, out := c.CreateDefaultVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateDhcpOptions = "CreateDhcpOptions"
// CreateDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the CreateDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateDhcpOptions method directly
-// instead.
+// See CreateDhcpOptions for more information on using the CreateDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateDhcpOptionsRequest method.
// req, resp := client.CreateDhcpOptionsRequest(params)
@@ -2176,16 +2704,16 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ
// to receive a custom DNS hostname as specified in domain-name, you must
// set domain-name-servers to a custom DNS server.
//
-// * domain-name - If you're using AmazonProvidedDNS in "us-east-1", specify
-// "ec2.internal". If you're using AmazonProvidedDNS in another region, specify
-// "region.compute.internal" (for example, "ap-northeast-1.compute.internal").
-// Otherwise, specify a domain name (for example, "MyCompany.com"). This
-// value is used to complete unqualified DNS hostnames. Important: Some Linux
-// operating systems accept multiple domain names separated by spaces. However,
-// Windows and other Linux operating systems treat the value as a single
-// domain, which results in unexpected behavior. If your DHCP options set
-// is associated with a VPC that has instances with multiple operating systems,
-// specify only one domain name.
+// * domain-name - If you're using AmazonProvidedDNS in us-east-1, specify
+// ec2.internal. If you're using AmazonProvidedDNS in another region, specify
+// region.compute.internal (for example, ap-northeast-1.compute.internal).
+// Otherwise, specify a domain name (for example, MyCompany.com). This value
+// is used to complete unqualified DNS hostnames. Important: Some Linux operating
+// systems accept multiple domain names separated by spaces. However, Windows
+// and other Linux operating systems treat the value as a single domain,
+// which results in unexpected behavior. If your DHCP options set is associated
+// with a VPC that has instances with multiple operating systems, specify
+// only one domain name.
//
// * ntp-servers - The IP addresses of up to four Network Time Protocol (NTP)
// servers.
@@ -2213,27 +2741,41 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions
func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) {
req, out := c.CreateDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateDhcpOptionsWithContext is the same as CreateDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateDhcpOptionsWithContext(ctx aws.Context, input *CreateDhcpOptionsInput, opts ...request.Option) (*CreateDhcpOptionsOutput, error) {
+ req, out := c.CreateDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway"
// CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateEgressOnlyInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateEgressOnlyInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateEgressOnlyInternetGateway method directly
-// instead.
+// See CreateEgressOnlyInternetGateway for more information on using the CreateEgressOnlyInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateEgressOnlyInternetGatewayRequest method.
// req, resp := client.CreateEgressOnlyInternetGatewayRequest(params)
@@ -2276,27 +2818,41 @@ func (c *EC2) CreateEgressOnlyInternetGatewayRequest(input *CreateEgressOnlyInte
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway
func (c *EC2) CreateEgressOnlyInternetGateway(input *CreateEgressOnlyInternetGatewayInput) (*CreateEgressOnlyInternetGatewayOutput, error) {
req, out := c.CreateEgressOnlyInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateEgressOnlyInternetGatewayWithContext is the same as CreateEgressOnlyInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateEgressOnlyInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateEgressOnlyInternetGatewayWithContext(ctx aws.Context, input *CreateEgressOnlyInternetGatewayInput, opts ...request.Option) (*CreateEgressOnlyInternetGatewayOutput, error) {
+ req, out := c.CreateEgressOnlyInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateFlowLogs = "CreateFlowLogs"
// CreateFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the CreateFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateFlowLogs method directly
-// instead.
+// See CreateFlowLogs for more information on using the CreateFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateFlowLogsRequest method.
// req, resp := client.CreateFlowLogsRequest(params)
@@ -2345,27 +2901,122 @@ func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs
func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) {
req, out := c.CreateFlowLogsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateFlowLogsWithContext is the same as CreateFlowLogs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateFlowLogs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateFlowLogsWithContext(ctx aws.Context, input *CreateFlowLogsInput, opts ...request.Option) (*CreateFlowLogsOutput, error) {
+ req, out := c.CreateFlowLogsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateFpgaImage = "CreateFpgaImage"
+
+// CreateFpgaImageRequest generates a "aws/request.Request" representing the
+// client's request for the CreateFpgaImage operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateFpgaImage for more information on using the CreateFpgaImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateFpgaImageRequest method.
+// req, resp := client.CreateFpgaImageRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
+func (c *EC2) CreateFpgaImageRequest(input *CreateFpgaImageInput) (req *request.Request, output *CreateFpgaImageOutput) {
+ op := &request.Operation{
+ Name: opCreateFpgaImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateFpgaImageInput{}
+ }
+
+ output = &CreateFpgaImageOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateFpgaImage API operation for Amazon Elastic Compute Cloud.
+//
+// Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).
+//
+// The create operation is asynchronous. To verify that the AFI is ready for
+// use, check the output logs.
+//
+// An AFI contains the FPGA bitstream that is ready to download to an FPGA.
+// You can securely deploy an AFI on one or more FPGA-accelerated instances.
+// For more information, see the AWS FPGA Hardware Development Kit (https://github.com/aws/aws-fpga/).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateFpgaImage for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
+func (c *EC2) CreateFpgaImage(input *CreateFpgaImageInput) (*CreateFpgaImageOutput, error) {
+ req, out := c.CreateFpgaImageRequest(input)
+ return out, req.Send()
+}
+
+// CreateFpgaImageWithContext is the same as CreateFpgaImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateFpgaImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateFpgaImageWithContext(ctx aws.Context, input *CreateFpgaImageInput, opts ...request.Option) (*CreateFpgaImageOutput, error) {
+ req, out := c.CreateFpgaImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateImage = "CreateImage"
// CreateImageRequest generates a "aws/request.Request" representing the
// client's request for the CreateImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateImage method directly
-// instead.
+// See CreateImage for more information on using the CreateImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateImageRequest method.
// req, resp := client.CreateImageRequest(params)
@@ -2414,27 +3065,41 @@ func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage
func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) {
req, out := c.CreateImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateImageWithContext is the same as CreateImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateImageWithContext(ctx aws.Context, input *CreateImageInput, opts ...request.Option) (*CreateImageOutput, error) {
+ req, out := c.CreateImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateInstanceExportTask = "CreateInstanceExportTask"
// CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CreateInstanceExportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateInstanceExportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateInstanceExportTask method directly
-// instead.
+// See CreateInstanceExportTask for more information on using the CreateInstanceExportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateInstanceExportTaskRequest method.
// req, resp := client.CreateInstanceExportTaskRequest(params)
@@ -2479,27 +3144,41 @@ func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask
func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*CreateInstanceExportTaskOutput, error) {
req, out := c.CreateInstanceExportTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateInstanceExportTaskWithContext is the same as CreateInstanceExportTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateInstanceExportTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateInstanceExportTaskWithContext(ctx aws.Context, input *CreateInstanceExportTaskInput, opts ...request.Option) (*CreateInstanceExportTaskOutput, error) {
+ req, out := c.CreateInstanceExportTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateInternetGateway = "CreateInternetGateway"
// CreateInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateInternetGateway method directly
-// instead.
+// See CreateInternetGateway for more information on using the CreateInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateInternetGatewayRequest method.
// req, resp := client.CreateInternetGatewayRequest(params)
@@ -2543,27 +3222,41 @@ func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway
func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateInternetGatewayOutput, error) {
req, out := c.CreateInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateInternetGatewayWithContext is the same as CreateInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateInternetGatewayWithContext(ctx aws.Context, input *CreateInternetGatewayInput, opts ...request.Option) (*CreateInternetGatewayOutput, error) {
+ req, out := c.CreateInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateKeyPair = "CreateKeyPair"
// CreateKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the CreateKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateKeyPair method directly
-// instead.
+// See CreateKeyPair for more information on using the CreateKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateKeyPairRequest method.
// req, resp := client.CreateKeyPairRequest(params)
@@ -2614,27 +3307,41 @@ func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair
func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) {
req, out := c.CreateKeyPairRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateKeyPairWithContext is the same as CreateKeyPair with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateKeyPair for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateKeyPairWithContext(ctx aws.Context, input *CreateKeyPairInput, opts ...request.Option) (*CreateKeyPairOutput, error) {
+ req, out := c.CreateKeyPairRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNatGateway = "CreateNatGateway"
// CreateNatGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateNatGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNatGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNatGateway method directly
-// instead.
+// See CreateNatGateway for more information on using the CreateNatGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNatGatewayRequest method.
// req, resp := client.CreateNatGatewayRequest(params)
@@ -2679,27 +3386,41 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway
func (c *EC2) CreateNatGateway(input *CreateNatGatewayInput) (*CreateNatGatewayOutput, error) {
req, out := c.CreateNatGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNatGatewayWithContext is the same as CreateNatGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNatGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNatGatewayWithContext(ctx aws.Context, input *CreateNatGatewayInput, opts ...request.Option) (*CreateNatGatewayOutput, error) {
+ req, out := c.CreateNatGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNetworkAcl = "CreateNetworkAcl"
// CreateNetworkAclRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkAcl method directly
-// instead.
+// See CreateNetworkAcl for more information on using the CreateNetworkAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkAclRequest method.
// req, resp := client.CreateNetworkAclRequest(params)
@@ -2743,27 +3464,41 @@ func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl
func (c *EC2) CreateNetworkAcl(input *CreateNetworkAclInput) (*CreateNetworkAclOutput, error) {
req, out := c.CreateNetworkAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNetworkAclWithContext is the same as CreateNetworkAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkAclWithContext(ctx aws.Context, input *CreateNetworkAclInput, opts ...request.Option) (*CreateNetworkAclOutput, error) {
+ req, out := c.CreateNetworkAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNetworkAclEntry = "CreateNetworkAclEntry"
// CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkAclEntry method directly
-// instead.
+// See CreateNetworkAclEntry for more information on using the CreateNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkAclEntryRequest method.
// req, resp := client.CreateNetworkAclEntryRequest(params)
@@ -2821,27 +3556,41 @@ func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry
func (c *EC2) CreateNetworkAclEntry(input *CreateNetworkAclEntryInput) (*CreateNetworkAclEntryOutput, error) {
req, out := c.CreateNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNetworkAclEntryWithContext is the same as CreateNetworkAclEntry with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkAclEntry for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkAclEntryWithContext(ctx aws.Context, input *CreateNetworkAclEntryInput, opts ...request.Option) (*CreateNetworkAclEntryOutput, error) {
+ req, out := c.CreateNetworkAclEntryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNetworkInterface = "CreateNetworkInterface"
// CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkInterface method directly
-// instead.
+// See CreateNetworkInterface for more information on using the CreateNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkInterfaceRequest method.
// req, resp := client.CreateNetworkInterfaceRequest(params)
@@ -2885,27 +3634,119 @@ func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface
func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*CreateNetworkInterfaceOutput, error) {
req, out := c.CreateNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNetworkInterfaceWithContext is the same as CreateNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkInterfaceWithContext(ctx aws.Context, input *CreateNetworkInterfaceInput, opts ...request.Option) (*CreateNetworkInterfaceOutput, error) {
+ req, out := c.CreateNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission"
+
+// CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
+// client's request for the CreateNetworkInterfacePermission operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateNetworkInterfacePermission for more information on using the CreateNetworkInterfacePermission
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateNetworkInterfacePermissionRequest method.
+// req, resp := client.CreateNetworkInterfacePermissionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
+func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterfacePermissionInput) (req *request.Request, output *CreateNetworkInterfacePermissionOutput) {
+ op := &request.Operation{
+ Name: opCreateNetworkInterfacePermission,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateNetworkInterfacePermissionInput{}
+ }
+
+ output = &CreateNetworkInterfacePermissionOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud.
+//
+// Grants an AWS authorized partner account permission to attach the specified
+// network interface to an instance in their account.
+//
+// You can grant permission to a single AWS account only, and only one account
+// at a time.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateNetworkInterfacePermission for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
+func (c *EC2) CreateNetworkInterfacePermission(input *CreateNetworkInterfacePermissionInput) (*CreateNetworkInterfacePermissionOutput, error) {
+ req, out := c.CreateNetworkInterfacePermissionRequest(input)
+ return out, req.Send()
+}
+
+// CreateNetworkInterfacePermissionWithContext is the same as CreateNetworkInterfacePermission with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkInterfacePermission for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkInterfacePermissionWithContext(ctx aws.Context, input *CreateNetworkInterfacePermissionInput, opts ...request.Option) (*CreateNetworkInterfacePermissionOutput, error) {
+ req, out := c.CreateNetworkInterfacePermissionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreatePlacementGroup = "CreatePlacementGroup"
// CreatePlacementGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreatePlacementGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreatePlacementGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreatePlacementGroup method directly
-// instead.
+// See CreatePlacementGroup for more information on using the CreatePlacementGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreatePlacementGroupRequest method.
// req, resp := client.CreatePlacementGroupRequest(params)
@@ -2952,27 +3793,41 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup
func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePlacementGroupOutput, error) {
req, out := c.CreatePlacementGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreatePlacementGroupWithContext is the same as CreatePlacementGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreatePlacementGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreatePlacementGroupWithContext(ctx aws.Context, input *CreatePlacementGroupInput, opts ...request.Option) (*CreatePlacementGroupOutput, error) {
+ req, out := c.CreatePlacementGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
// CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the
// client's request for the CreateReservedInstancesListing operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateReservedInstancesListing for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateReservedInstancesListing method directly
-// instead.
+// See CreateReservedInstancesListing for more information on using the CreateReservedInstancesListing
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateReservedInstancesListingRequest method.
// req, resp := client.CreateReservedInstancesListingRequest(params)
@@ -3035,27 +3890,41 @@ func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstanc
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing
func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListingInput) (*CreateReservedInstancesListingOutput, error) {
req, out := c.CreateReservedInstancesListingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateReservedInstancesListingWithContext is the same as CreateReservedInstancesListing with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateReservedInstancesListing for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateReservedInstancesListingWithContext(ctx aws.Context, input *CreateReservedInstancesListingInput, opts ...request.Option) (*CreateReservedInstancesListingOutput, error) {
+ req, out := c.CreateReservedInstancesListingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateRoute = "CreateRoute"
// CreateRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRoute method directly
-// instead.
+// See CreateRoute for more information on using the CreateRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRouteRequest method.
// req, resp := client.CreateRouteRequest(params)
@@ -3114,27 +3983,41 @@ func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute
func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
req, out := c.CreateRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateRouteWithContext is the same as CreateRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) {
+ req, out := c.CreateRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateRouteTable = "CreateRouteTable"
// CreateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the CreateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRouteTable method directly
-// instead.
+// See CreateRouteTable for more information on using the CreateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRouteTableRequest method.
// req, resp := client.CreateRouteTableRequest(params)
@@ -3178,27 +4061,41 @@ func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable
func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableOutput, error) {
req, out := c.CreateRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateRouteTableWithContext is the same as CreateRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateRouteTableWithContext(ctx aws.Context, input *CreateRouteTableInput, opts ...request.Option) (*CreateRouteTableOutput, error) {
+ req, out := c.CreateRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSecurityGroup = "CreateSecurityGroup"
// CreateSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateSecurityGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSecurityGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSecurityGroup method directly
-// instead.
+// See CreateSecurityGroup for more information on using the CreateSecurityGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSecurityGroupRequest method.
// req, resp := client.CreateSecurityGroupRequest(params)
@@ -3264,27 +4161,41 @@ func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup
func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecurityGroupOutput, error) {
req, out := c.CreateSecurityGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSecurityGroupWithContext is the same as CreateSecurityGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSecurityGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSecurityGroupWithContext(ctx aws.Context, input *CreateSecurityGroupInput, opts ...request.Option) (*CreateSecurityGroupOutput, error) {
+ req, out := c.CreateSecurityGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSnapshot = "CreateSnapshot"
// CreateSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CreateSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSnapshot method directly
-// instead.
+// See CreateSnapshot for more information on using the CreateSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSnapshotRequest method.
// req, resp := client.CreateSnapshotRequest(params)
@@ -3351,27 +4262,41 @@ func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot
func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) {
req, out := c.CreateSnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*Snapshot, error) {
+ req, out := c.CreateSnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
// CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSpotDatafeedSubscription method directly
-// instead.
+// See CreateSpotDatafeedSubscription for more information on using the CreateSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSpotDatafeedSubscriptionRequest method.
// req, resp := client.CreateSpotDatafeedSubscriptionRequest(params)
@@ -3414,27 +4339,41 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription
func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscriptionInput) (*CreateSpotDatafeedSubscriptionOutput, error) {
req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSpotDatafeedSubscriptionWithContext is the same as CreateSpotDatafeedSubscription with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSpotDatafeedSubscription for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *CreateSpotDatafeedSubscriptionInput, opts ...request.Option) (*CreateSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSubnet = "CreateSubnet"
// CreateSubnetRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubnet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSubnet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSubnet method directly
-// instead.
+// See CreateSubnet for more information on using the CreateSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSubnetRequest method.
// req, resp := client.CreateSubnetRequest(params)
@@ -3477,7 +4416,7 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques
// If you've associated an IPv6 CIDR block with your VPC, you can create a subnet
// with an IPv6 CIDR block that uses a /64 prefix length.
//
-// AWS reserves both the first four and the last IP address in each subnet's
+// AWS reserves both the first four and the last IPv4 address in each subnet's
// CIDR block. They're not available for use.
//
// If you add more than one subnet to a VPC, they're set up in a star topology
@@ -3501,27 +4440,41 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet
func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error) {
req, out := c.CreateSubnetRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSubnetWithContext is the same as CreateSubnet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSubnet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSubnetWithContext(ctx aws.Context, input *CreateSubnetInput, opts ...request.Option) (*CreateSubnetOutput, error) {
+ req, out := c.CreateSubnetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateTags = "CreateTags"
// CreateTagsRequest generates a "aws/request.Request" representing the
// client's request for the CreateTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateTags method directly
-// instead.
+// See CreateTags for more information on using the CreateTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateTagsRequest method.
// req, resp := client.CreateTagsRequest(params)
@@ -3571,27 +4524,41 @@ func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags
func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
req, out := c.CreateTagsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateTagsWithContext is the same as CreateTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) {
+ req, out := c.CreateTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVolume = "CreateVolume"
// CreateVolumeRequest generates a "aws/request.Request" representing the
// client's request for the CreateVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVolume method directly
-// instead.
+// See CreateVolume for more information on using the CreateVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVolumeRequest method.
// req, resp := client.CreateVolumeRequest(params)
@@ -3634,7 +4601,10 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques
// encrypted. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
-// For more information, see Creating or Restoring an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html)
+// You can tag your volumes during creation. For more information, see Tagging
+// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
+//
+// For more information, see Creating an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -3646,27 +4616,41 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume
func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) {
req, out := c.CreateVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVolumeWithContext is the same as CreateVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVolumeWithContext(ctx aws.Context, input *CreateVolumeInput, opts ...request.Option) (*Volume, error) {
+ req, out := c.CreateVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpc = "CreateVpc"
// CreateVpcRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpc method directly
-// instead.
+// See CreateVpc for more information on using the CreateVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcRequest method.
// req, resp := client.CreateVpcRequest(params)
@@ -3724,27 +4708,41 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc
func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) {
req, out := c.CreateVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpcWithContext is the same as CreateVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcWithContext(ctx aws.Context, input *CreateVpcInput, opts ...request.Option) (*CreateVpcOutput, error) {
+ req, out := c.CreateVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpcEndpoint = "CreateVpcEndpoint"
// CreateVpcEndpointRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpcEndpoint operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpcEndpoint for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpcEndpoint method directly
-// instead.
+// See CreateVpcEndpoint for more information on using the CreateVpcEndpoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcEndpointRequest method.
// req, resp := client.CreateVpcEndpointRequest(params)
@@ -3790,27 +4788,41 @@ func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint
func (c *EC2) CreateVpcEndpoint(input *CreateVpcEndpointInput) (*CreateVpcEndpointOutput, error) {
req, out := c.CreateVpcEndpointRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpcEndpointWithContext is the same as CreateVpcEndpoint with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpcEndpoint for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcEndpointWithContext(ctx aws.Context, input *CreateVpcEndpointInput, opts ...request.Option) (*CreateVpcEndpointOutput, error) {
+ req, out := c.CreateVpcEndpointRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection"
// CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpcPeeringConnection method directly
-// instead.
+// See CreateVpcPeeringConnection for more information on using the CreateVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcPeeringConnectionRequest method.
// req, resp := client.CreateVpcPeeringConnectionRequest(params)
@@ -3848,8 +4860,8 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
// peering connection. The VPC peering connection request expires after 7 days,
// after which it cannot be accepted or rejected.
//
-// A CreateVpcPeeringConnection request between VPCs with overlapping CIDR blocks
-// results in the VPC peering connection having a status of failed.
+// If you try to create a VPC peering connection between VPCs that have overlapping
+// CIDR blocks, the VPC peering connection status goes to failed.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3860,27 +4872,41 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection
func (c *EC2) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) {
req, out := c.CreateVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpcPeeringConnectionWithContext is the same as CreateVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcPeeringConnectionWithContext(ctx aws.Context, input *CreateVpcPeeringConnectionInput, opts ...request.Option) (*CreateVpcPeeringConnectionOutput, error) {
+ req, out := c.CreateVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpnConnection = "CreateVpnConnection"
// CreateVpnConnectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnConnection method directly
-// instead.
+// See CreateVpnConnection for more information on using the CreateVpnConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnConnectionRequest method.
// req, resp := client.CreateVpnConnectionRequest(params)
@@ -3939,27 +4965,41 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection
func (c *EC2) CreateVpnConnection(input *CreateVpnConnectionInput) (*CreateVpnConnectionOutput, error) {
req, out := c.CreateVpnConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpnConnectionWithContext is the same as CreateVpnConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpnConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpnConnectionWithContext(ctx aws.Context, input *CreateVpnConnectionInput, opts ...request.Option) (*CreateVpnConnectionOutput, error) {
+ req, out := c.CreateVpnConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute"
// CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnConnectionRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnConnectionRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnConnectionRoute method directly
-// instead.
+// See CreateVpnConnectionRoute for more information on using the CreateVpnConnectionRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnConnectionRouteRequest method.
// req, resp := client.CreateVpnConnectionRouteRequest(params)
@@ -4008,27 +5048,41 @@ func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute
func (c *EC2) CreateVpnConnectionRoute(input *CreateVpnConnectionRouteInput) (*CreateVpnConnectionRouteOutput, error) {
req, out := c.CreateVpnConnectionRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpnConnectionRouteWithContext is the same as CreateVpnConnectionRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpnConnectionRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpnConnectionRouteWithContext(ctx aws.Context, input *CreateVpnConnectionRouteInput, opts ...request.Option) (*CreateVpnConnectionRouteOutput, error) {
+ req, out := c.CreateVpnConnectionRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpnGateway = "CreateVpnGateway"
// CreateVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnGateway method directly
-// instead.
+// See CreateVpnGateway for more information on using the CreateVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnGatewayRequest method.
// req, resp := client.CreateVpnGatewayRequest(params)
@@ -4074,27 +5128,41 @@ func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway
func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) {
req, out := c.CreateVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpnGatewayWithContext is the same as CreateVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpnGatewayWithContext(ctx aws.Context, input *CreateVpnGatewayInput, opts ...request.Option) (*CreateVpnGatewayOutput, error) {
+ req, out := c.CreateVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteCustomerGateway = "DeleteCustomerGateway"
// DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCustomerGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteCustomerGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteCustomerGateway method directly
-// instead.
+// See DeleteCustomerGateway for more information on using the DeleteCustomerGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteCustomerGatewayRequest method.
// req, resp := client.DeleteCustomerGatewayRequest(params)
@@ -4137,27 +5205,41 @@ func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway
func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteCustomerGatewayOutput, error) {
req, out := c.DeleteCustomerGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteCustomerGatewayWithContext is the same as DeleteCustomerGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteCustomerGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteCustomerGatewayWithContext(ctx aws.Context, input *DeleteCustomerGatewayInput, opts ...request.Option) (*DeleteCustomerGatewayOutput, error) {
+ req, out := c.DeleteCustomerGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteDhcpOptions = "DeleteDhcpOptions"
// DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteDhcpOptions method directly
-// instead.
+// See DeleteDhcpOptions for more information on using the DeleteDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteDhcpOptionsRequest method.
// req, resp := client.DeleteDhcpOptionsRequest(params)
@@ -4202,27 +5284,41 @@ func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions
func (c *EC2) DeleteDhcpOptions(input *DeleteDhcpOptionsInput) (*DeleteDhcpOptionsOutput, error) {
req, out := c.DeleteDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteDhcpOptionsWithContext is the same as DeleteDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteDhcpOptionsWithContext(ctx aws.Context, input *DeleteDhcpOptionsInput, opts ...request.Option) (*DeleteDhcpOptionsOutput, error) {
+ req, out := c.DeleteDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway"
// DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteEgressOnlyInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteEgressOnlyInternetGateway method directly
-// instead.
+// See DeleteEgressOnlyInternetGateway for more information on using the DeleteEgressOnlyInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteEgressOnlyInternetGatewayRequest method.
// req, resp := client.DeleteEgressOnlyInternetGatewayRequest(params)
@@ -4262,27 +5358,41 @@ func (c *EC2) DeleteEgressOnlyInternetGatewayRequest(input *DeleteEgressOnlyInte
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway
func (c *EC2) DeleteEgressOnlyInternetGateway(input *DeleteEgressOnlyInternetGatewayInput) (*DeleteEgressOnlyInternetGatewayOutput, error) {
req, out := c.DeleteEgressOnlyInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteEgressOnlyInternetGatewayWithContext is the same as DeleteEgressOnlyInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteEgressOnlyInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteEgressOnlyInternetGatewayWithContext(ctx aws.Context, input *DeleteEgressOnlyInternetGatewayInput, opts ...request.Option) (*DeleteEgressOnlyInternetGatewayOutput, error) {
+ req, out := c.DeleteEgressOnlyInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteFlowLogs = "DeleteFlowLogs"
// DeleteFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteFlowLogs method directly
-// instead.
+// See DeleteFlowLogs for more information on using the DeleteFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteFlowLogsRequest method.
// req, resp := client.DeleteFlowLogsRequest(params)
@@ -4322,27 +5432,41 @@ func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs
func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) {
req, out := c.DeleteFlowLogsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteFlowLogsWithContext is the same as DeleteFlowLogs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteFlowLogs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteFlowLogsWithContext(ctx aws.Context, input *DeleteFlowLogsInput, opts ...request.Option) (*DeleteFlowLogsOutput, error) {
+ req, out := c.DeleteFlowLogsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteInternetGateway = "DeleteInternetGateway"
// DeleteInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteInternetGateway method directly
-// instead.
+// See DeleteInternetGateway for more information on using the DeleteInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteInternetGatewayRequest method.
// req, resp := client.DeleteInternetGatewayRequest(params)
@@ -4385,27 +5509,41 @@ func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway
func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteInternetGatewayOutput, error) {
req, out := c.DeleteInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteInternetGatewayWithContext is the same as DeleteInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteInternetGatewayWithContext(ctx aws.Context, input *DeleteInternetGatewayInput, opts ...request.Option) (*DeleteInternetGatewayOutput, error) {
+ req, out := c.DeleteInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteKeyPair = "DeleteKeyPair"
// DeleteKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the DeleteKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteKeyPair method directly
-// instead.
+// See DeleteKeyPair for more information on using the DeleteKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteKeyPairRequest method.
// req, resp := client.DeleteKeyPairRequest(params)
@@ -4447,27 +5585,41 @@ func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair
func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) {
req, out := c.DeleteKeyPairRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteKeyPairWithContext is the same as DeleteKeyPair with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteKeyPair for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInput, opts ...request.Option) (*DeleteKeyPairOutput, error) {
+ req, out := c.DeleteKeyPairRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNatGateway = "DeleteNatGateway"
// DeleteNatGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNatGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNatGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNatGateway method directly
-// instead.
+// See DeleteNatGateway for more information on using the DeleteNatGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNatGatewayRequest method.
// req, resp := client.DeleteNatGatewayRequest(params)
@@ -4509,27 +5661,41 @@ func (c *EC2) DeleteNatGatewayRequest(input *DeleteNatGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway
func (c *EC2) DeleteNatGateway(input *DeleteNatGatewayInput) (*DeleteNatGatewayOutput, error) {
req, out := c.DeleteNatGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNatGatewayWithContext is the same as DeleteNatGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNatGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNatGatewayWithContext(ctx aws.Context, input *DeleteNatGatewayInput, opts ...request.Option) (*DeleteNatGatewayOutput, error) {
+ req, out := c.DeleteNatGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNetworkAcl = "DeleteNetworkAcl"
// DeleteNetworkAclRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkAcl method directly
-// instead.
+// See DeleteNetworkAcl for more information on using the DeleteNetworkAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkAclRequest method.
// req, resp := client.DeleteNetworkAclRequest(params)
@@ -4572,27 +5738,41 @@ func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl
func (c *EC2) DeleteNetworkAcl(input *DeleteNetworkAclInput) (*DeleteNetworkAclOutput, error) {
req, out := c.DeleteNetworkAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNetworkAclWithContext is the same as DeleteNetworkAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkAclWithContext(ctx aws.Context, input *DeleteNetworkAclInput, opts ...request.Option) (*DeleteNetworkAclOutput, error) {
+ req, out := c.DeleteNetworkAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry"
// DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkAclEntry method directly
-// instead.
+// See DeleteNetworkAclEntry for more information on using the DeleteNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkAclEntryRequest method.
// req, resp := client.DeleteNetworkAclEntryRequest(params)
@@ -4635,27 +5815,41 @@ func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry
func (c *EC2) DeleteNetworkAclEntry(input *DeleteNetworkAclEntryInput) (*DeleteNetworkAclEntryOutput, error) {
req, out := c.DeleteNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNetworkAclEntryWithContext is the same as DeleteNetworkAclEntry with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkAclEntry for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkAclEntryWithContext(ctx aws.Context, input *DeleteNetworkAclEntryInput, opts ...request.Option) (*DeleteNetworkAclEntryOutput, error) {
+ req, out := c.DeleteNetworkAclEntryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNetworkInterface = "DeleteNetworkInterface"
// DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkInterface method directly
-// instead.
+// See DeleteNetworkInterface for more information on using the DeleteNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkInterfaceRequest method.
// req, resp := client.DeleteNetworkInterfaceRequest(params)
@@ -4698,27 +5892,118 @@ func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface
func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*DeleteNetworkInterfaceOutput, error) {
req, out := c.DeleteNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNetworkInterfaceWithContext is the same as DeleteNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkInterfaceWithContext(ctx aws.Context, input *DeleteNetworkInterfaceInput, opts ...request.Option) (*DeleteNetworkInterfaceOutput, error) {
+ req, out := c.DeleteNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission"
+
+// DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteNetworkInterfacePermission operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteNetworkInterfacePermission for more information on using the DeleteNetworkInterfacePermission
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteNetworkInterfacePermissionRequest method.
+// req, resp := client.DeleteNetworkInterfacePermissionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
+func (c *EC2) DeleteNetworkInterfacePermissionRequest(input *DeleteNetworkInterfacePermissionInput) (req *request.Request, output *DeleteNetworkInterfacePermissionOutput) {
+ op := &request.Operation{
+ Name: opDeleteNetworkInterfacePermission,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteNetworkInterfacePermissionInput{}
+ }
+
+ output = &DeleteNetworkInterfacePermissionOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes a permission for a network interface. By default, you cannot delete
+// the permission if the account for which you're removing the permission has
+// attached the network interface to an instance. However, you can force delete
+// the permission, regardless of any attachment.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteNetworkInterfacePermission for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
+func (c *EC2) DeleteNetworkInterfacePermission(input *DeleteNetworkInterfacePermissionInput) (*DeleteNetworkInterfacePermissionOutput, error) {
+ req, out := c.DeleteNetworkInterfacePermissionRequest(input)
+ return out, req.Send()
+}
+
+// DeleteNetworkInterfacePermissionWithContext is the same as DeleteNetworkInterfacePermission with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkInterfacePermission for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkInterfacePermissionWithContext(ctx aws.Context, input *DeleteNetworkInterfacePermissionInput, opts ...request.Option) (*DeleteNetworkInterfacePermissionOutput, error) {
+ req, out := c.DeleteNetworkInterfacePermissionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeletePlacementGroup = "DeletePlacementGroup"
// DeletePlacementGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeletePlacementGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeletePlacementGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeletePlacementGroup method directly
-// instead.
+// See DeletePlacementGroup for more information on using the DeletePlacementGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeletePlacementGroupRequest method.
// req, resp := client.DeletePlacementGroupRequest(params)
@@ -4763,27 +6048,41 @@ func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup
func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePlacementGroupOutput, error) {
req, out := c.DeletePlacementGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeletePlacementGroupWithContext is the same as DeletePlacementGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeletePlacementGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeletePlacementGroupWithContext(ctx aws.Context, input *DeletePlacementGroupInput, opts ...request.Option) (*DeletePlacementGroupOutput, error) {
+ req, out := c.DeletePlacementGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRoute = "DeleteRoute"
// DeleteRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRoute method directly
-// instead.
+// See DeleteRoute for more information on using the DeleteRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRouteRequest method.
// req, resp := client.DeleteRouteRequest(params)
@@ -4825,27 +6124,41 @@ func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute
func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
req, out := c.DeleteRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRouteWithContext is the same as DeleteRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) {
+ req, out := c.DeleteRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRouteTable = "DeleteRouteTable"
// DeleteRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRouteTable method directly
-// instead.
+// See DeleteRouteTable for more information on using the DeleteRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRouteTableRequest method.
// req, resp := client.DeleteRouteTableRequest(params)
@@ -4889,27 +6202,41 @@ func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable
func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableOutput, error) {
req, out := c.DeleteRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRouteTableWithContext is the same as DeleteRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteRouteTableWithContext(ctx aws.Context, input *DeleteRouteTableInput, opts ...request.Option) (*DeleteRouteTableOutput, error) {
+ req, out := c.DeleteRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSecurityGroup = "DeleteSecurityGroup"
// DeleteSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSecurityGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSecurityGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSecurityGroup method directly
-// instead.
+// See DeleteSecurityGroup for more information on using the DeleteSecurityGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSecurityGroupRequest method.
// req, resp := client.DeleteSecurityGroupRequest(params)
@@ -4955,27 +6282,41 @@ func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup
func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecurityGroupOutput, error) {
req, out := c.DeleteSecurityGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSecurityGroupWithContext is the same as DeleteSecurityGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSecurityGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSecurityGroupWithContext(ctx aws.Context, input *DeleteSecurityGroupInput, opts ...request.Option) (*DeleteSecurityGroupOutput, error) {
+ req, out := c.DeleteSecurityGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSnapshot = "DeleteSnapshot"
// DeleteSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSnapshot method directly
-// instead.
+// See DeleteSnapshot for more information on using the DeleteSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSnapshotRequest method.
// req, resp := client.DeleteSnapshotRequest(params)
@@ -5031,27 +6372,41 @@ func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot
func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) {
req, out := c.DeleteSnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSnapshotWithContext is the same as DeleteSnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSnapshotWithContext(ctx aws.Context, input *DeleteSnapshotInput, opts ...request.Option) (*DeleteSnapshotOutput, error) {
+ req, out := c.DeleteSnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
// DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSpotDatafeedSubscription method directly
-// instead.
+// See DeleteSpotDatafeedSubscription for more information on using the DeleteSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSpotDatafeedSubscriptionRequest method.
// req, resp := client.DeleteSpotDatafeedSubscriptionRequest(params)
@@ -5093,27 +6448,41 @@ func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSub
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription
func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) {
req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSpotDatafeedSubscriptionWithContext is the same as DeleteSpotDatafeedSubscription with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSpotDatafeedSubscription for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *DeleteSpotDatafeedSubscriptionInput, opts ...request.Option) (*DeleteSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSubnet = "DeleteSubnet"
// DeleteSubnetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSubnet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSubnet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSubnet method directly
-// instead.
+// See DeleteSubnet for more information on using the DeleteSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSubnetRequest method.
// req, resp := client.DeleteSubnetRequest(params)
@@ -5156,27 +6525,41 @@ func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet
func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error) {
req, out := c.DeleteSubnetRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSubnetWithContext is the same as DeleteSubnet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSubnet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSubnetWithContext(ctx aws.Context, input *DeleteSubnetInput, opts ...request.Option) (*DeleteSubnetOutput, error) {
+ req, out := c.DeleteSubnetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteTags = "DeleteTags"
// DeleteTagsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteTags method directly
-// instead.
+// See DeleteTags for more information on using the DeleteTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteTagsRequest method.
// req, resp := client.DeleteTagsRequest(params)
@@ -5222,27 +6605,41 @@ func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags
func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
req, out := c.DeleteTagsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteTagsWithContext is the same as DeleteTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
+ req, out := c.DeleteTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVolume = "DeleteVolume"
// DeleteVolumeRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVolume method directly
-// instead.
+// See DeleteVolume for more information on using the DeleteVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVolumeRequest method.
// req, resp := client.DeleteVolumeRequest(params)
@@ -5290,27 +6687,41 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume
func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) {
req, out := c.DeleteVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVolumeWithContext is the same as DeleteVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error) {
+ req, out := c.DeleteVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpc = "DeleteVpc"
// DeleteVpcRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpc method directly
-// instead.
+// See DeleteVpc for more information on using the DeleteVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcRequest method.
// req, resp := client.DeleteVpcRequest(params)
@@ -5356,27 +6767,41 @@ func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, out
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc
func (c *EC2) DeleteVpc(input *DeleteVpcInput) (*DeleteVpcOutput, error) {
req, out := c.DeleteVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpcWithContext is the same as DeleteVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcWithContext(ctx aws.Context, input *DeleteVpcInput, opts ...request.Option) (*DeleteVpcOutput, error) {
+ req, out := c.DeleteVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpcEndpoints = "DeleteVpcEndpoints"
// DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpcEndpoints operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpcEndpoints for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpcEndpoints method directly
-// instead.
+// See DeleteVpcEndpoints for more information on using the DeleteVpcEndpoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcEndpointsRequest method.
// req, resp := client.DeleteVpcEndpointsRequest(params)
@@ -5417,27 +6842,41 @@ func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints
func (c *EC2) DeleteVpcEndpoints(input *DeleteVpcEndpointsInput) (*DeleteVpcEndpointsOutput, error) {
req, out := c.DeleteVpcEndpointsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpcEndpointsWithContext is the same as DeleteVpcEndpoints with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpcEndpoints for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcEndpointsWithContext(ctx aws.Context, input *DeleteVpcEndpointsInput, opts ...request.Option) (*DeleteVpcEndpointsOutput, error) {
+ req, out := c.DeleteVpcEndpointsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection"
// DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpcPeeringConnection method directly
-// instead.
+// See DeleteVpcPeeringConnection for more information on using the DeleteVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcPeeringConnectionRequest method.
// req, resp := client.DeleteVpcPeeringConnectionRequest(params)
@@ -5480,27 +6919,41 @@ func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection
func (c *EC2) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) {
req, out := c.DeleteVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) {
+ req, out := c.DeleteVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpnConnection = "DeleteVpnConnection"
// DeleteVpnConnectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnConnection method directly
-// instead.
+// See DeleteVpnConnection for more information on using the DeleteVpnConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnConnectionRequest method.
// req, resp := client.DeleteVpnConnectionRequest(params)
@@ -5551,27 +7004,41 @@ func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection
func (c *EC2) DeleteVpnConnection(input *DeleteVpnConnectionInput) (*DeleteVpnConnectionOutput, error) {
req, out := c.DeleteVpnConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpnConnectionWithContext is the same as DeleteVpnConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpnConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpnConnectionWithContext(ctx aws.Context, input *DeleteVpnConnectionInput, opts ...request.Option) (*DeleteVpnConnectionOutput, error) {
+ req, out := c.DeleteVpnConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute"
// DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnConnectionRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnConnectionRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnConnectionRoute method directly
-// instead.
+// See DeleteVpnConnectionRoute for more information on using the DeleteVpnConnectionRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnConnectionRouteRequest method.
// req, resp := client.DeleteVpnConnectionRouteRequest(params)
@@ -5616,27 +7083,41 @@ func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute
func (c *EC2) DeleteVpnConnectionRoute(input *DeleteVpnConnectionRouteInput) (*DeleteVpnConnectionRouteOutput, error) {
req, out := c.DeleteVpnConnectionRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpnConnectionRouteWithContext is the same as DeleteVpnConnectionRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpnConnectionRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpnConnectionRouteWithContext(ctx aws.Context, input *DeleteVpnConnectionRouteInput, opts ...request.Option) (*DeleteVpnConnectionRouteOutput, error) {
+ req, out := c.DeleteVpnConnectionRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpnGateway = "DeleteVpnGateway"
// DeleteVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnGateway method directly
-// instead.
+// See DeleteVpnGateway for more information on using the DeleteVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnGatewayRequest method.
// req, resp := client.DeleteVpnGatewayRequest(params)
@@ -5682,27 +7163,41 @@ func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway
func (c *EC2) DeleteVpnGateway(input *DeleteVpnGatewayInput) (*DeleteVpnGatewayOutput, error) {
req, out := c.DeleteVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpnGatewayWithContext is the same as DeleteVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpnGatewayWithContext(ctx aws.Context, input *DeleteVpnGatewayInput, opts ...request.Option) (*DeleteVpnGatewayOutput, error) {
+ req, out := c.DeleteVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeregisterImage = "DeregisterImage"
// DeregisterImageRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeregisterImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeregisterImage method directly
-// instead.
+// See DeregisterImage for more information on using the DeregisterImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeregisterImageRequest method.
// req, resp := client.DeregisterImageRequest(params)
@@ -5747,27 +7242,41 @@ func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage
func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutput, error) {
req, out := c.DeregisterImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeregisterImageWithContext is the same as DeregisterImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeregisterImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeregisterImageWithContext(ctx aws.Context, input *DeregisterImageInput, opts ...request.Option) (*DeregisterImageOutput, error) {
+ req, out := c.DeregisterImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeAccountAttributes = "DescribeAccountAttributes"
// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAccountAttributes operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAccountAttributes for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAccountAttributes method directly
-// instead.
+// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAccountAttributesRequest method.
// req, resp := client.DescribeAccountAttributesRequest(params)
@@ -5825,27 +7334,41 @@ func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes
func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) {
req, out := c.DescribeAccountAttributesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAccountAttributes for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) {
+ req, out := c.DescribeAccountAttributesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeAddresses = "DescribeAddresses"
// DescribeAddressesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAddresses method directly
-// instead.
+// See DescribeAddresses for more information on using the DescribeAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAddressesRequest method.
// req, resp := client.DescribeAddressesRequest(params)
@@ -5889,27 +7412,41 @@ func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses
func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) {
req, out := c.DescribeAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeAddressesWithContext is the same as DescribeAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeAddressesWithContext(ctx aws.Context, input *DescribeAddressesInput, opts ...request.Option) (*DescribeAddressesOutput, error) {
+ req, out := c.DescribeAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
// DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAvailabilityZones operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAvailabilityZones for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAvailabilityZones method directly
-// instead.
+// See DescribeAvailabilityZones for more information on using the DescribeAvailabilityZones
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAvailabilityZonesRequest method.
// req, resp := client.DescribeAvailabilityZonesRequest(params)
@@ -5955,27 +7492,41 @@ func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones
func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) (*DescribeAvailabilityZonesOutput, error) {
req, out := c.DescribeAvailabilityZonesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeAvailabilityZonesWithContext is the same as DescribeAvailabilityZones with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAvailabilityZones for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeAvailabilityZonesWithContext(ctx aws.Context, input *DescribeAvailabilityZonesInput, opts ...request.Option) (*DescribeAvailabilityZonesOutput, error) {
+ req, out := c.DescribeAvailabilityZonesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeBundleTasks = "DescribeBundleTasks"
// DescribeBundleTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBundleTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeBundleTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeBundleTasks method directly
-// instead.
+// See DescribeBundleTasks for more information on using the DescribeBundleTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeBundleTasksRequest method.
// req, resp := client.DescribeBundleTasksRequest(params)
@@ -6020,27 +7571,41 @@ func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks
func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBundleTasksOutput, error) {
req, out := c.DescribeBundleTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeBundleTasksWithContext is the same as DescribeBundleTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeBundleTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeBundleTasksWithContext(ctx aws.Context, input *DescribeBundleTasksInput, opts ...request.Option) (*DescribeBundleTasksOutput, error) {
+ req, out := c.DescribeBundleTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
// DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeClassicLinkInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeClassicLinkInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeClassicLinkInstances method directly
-// instead.
+// See DescribeClassicLinkInstances for more information on using the DescribeClassicLinkInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeClassicLinkInstancesRequest method.
// req, resp := client.DescribeClassicLinkInstancesRequest(params)
@@ -6083,27 +7648,41 @@ func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInst
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances
func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesInput) (*DescribeClassicLinkInstancesOutput, error) {
req, out := c.DescribeClassicLinkInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeClassicLinkInstancesWithContext is the same as DescribeClassicLinkInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeClassicLinkInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeClassicLinkInstancesWithContext(ctx aws.Context, input *DescribeClassicLinkInstancesInput, opts ...request.Option) (*DescribeClassicLinkInstancesOutput, error) {
+ req, out := c.DescribeClassicLinkInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeConversionTasks = "DescribeConversionTasks"
// DescribeConversionTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeConversionTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeConversionTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeConversionTasks method directly
-// instead.
+// See DescribeConversionTasks for more information on using the DescribeConversionTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeConversionTasksRequest method.
// req, resp := client.DescribeConversionTasksRequest(params)
@@ -6147,27 +7726,41 @@ func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks
func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*DescribeConversionTasksOutput, error) {
req, out := c.DescribeConversionTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeConversionTasksWithContext is the same as DescribeConversionTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeConversionTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeConversionTasksWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.Option) (*DescribeConversionTasksOutput, error) {
+ req, out := c.DescribeConversionTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeCustomerGateways = "DescribeCustomerGateways"
// DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeCustomerGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeCustomerGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeCustomerGateways method directly
-// instead.
+// See DescribeCustomerGateways for more information on using the DescribeCustomerGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeCustomerGatewaysRequest method.
// req, resp := client.DescribeCustomerGatewaysRequest(params)
@@ -6211,27 +7804,41 @@ func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways
func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*DescribeCustomerGatewaysOutput, error) {
req, out := c.DescribeCustomerGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeCustomerGatewaysWithContext is the same as DescribeCustomerGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeCustomerGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeCustomerGatewaysWithContext(ctx aws.Context, input *DescribeCustomerGatewaysInput, opts ...request.Option) (*DescribeCustomerGatewaysOutput, error) {
+ req, out := c.DescribeCustomerGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeDhcpOptions = "DescribeDhcpOptions"
// DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeDhcpOptions method directly
-// instead.
+// See DescribeDhcpOptions for more information on using the DescribeDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeDhcpOptionsRequest method.
// req, resp := client.DescribeDhcpOptionsRequest(params)
@@ -6274,27 +7881,41 @@ func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions
func (c *EC2) DescribeDhcpOptions(input *DescribeDhcpOptionsInput) (*DescribeDhcpOptionsOutput, error) {
req, out := c.DescribeDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeDhcpOptionsWithContext is the same as DescribeDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeDhcpOptionsWithContext(ctx aws.Context, input *DescribeDhcpOptionsInput, opts ...request.Option) (*DescribeDhcpOptionsOutput, error) {
+ req, out := c.DescribeDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways"
// DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeEgressOnlyInternetGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeEgressOnlyInternetGateways method directly
-// instead.
+// See DescribeEgressOnlyInternetGateways for more information on using the DescribeEgressOnlyInternetGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeEgressOnlyInternetGatewaysRequest method.
// req, resp := client.DescribeEgressOnlyInternetGatewaysRequest(params)
@@ -6334,27 +7955,116 @@ func (c *EC2) DescribeEgressOnlyInternetGatewaysRequest(input *DescribeEgressOnl
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways
func (c *EC2) DescribeEgressOnlyInternetGateways(input *DescribeEgressOnlyInternetGatewaysInput) (*DescribeEgressOnlyInternetGatewaysOutput, error) {
req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeEgressOnlyInternetGatewaysWithContext is the same as DescribeEgressOnlyInternetGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeEgressOnlyInternetGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeEgressOnlyInternetGatewaysWithContext(ctx aws.Context, input *DescribeEgressOnlyInternetGatewaysInput, opts ...request.Option) (*DescribeEgressOnlyInternetGatewaysOutput, error) {
+ req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeElasticGpus = "DescribeElasticGpus"
+
+// DescribeElasticGpusRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeElasticGpus operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeElasticGpus for more information on using the DescribeElasticGpus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeElasticGpusRequest method.
+// req, resp := client.DescribeElasticGpusRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
+func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req *request.Request, output *DescribeElasticGpusOutput) {
+ op := &request.Operation{
+ Name: opDescribeElasticGpus,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeElasticGpusInput{}
+ }
+
+ output = &DescribeElasticGpusOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeElasticGpus API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the Elastic GPUs associated with your instances. For more information
+// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeElasticGpus for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
+func (c *EC2) DescribeElasticGpus(input *DescribeElasticGpusInput) (*DescribeElasticGpusOutput, error) {
+ req, out := c.DescribeElasticGpusRequest(input)
+ return out, req.Send()
+}
+
+// DescribeElasticGpusWithContext is the same as DescribeElasticGpus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeElasticGpus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeElasticGpusWithContext(ctx aws.Context, input *DescribeElasticGpusInput, opts ...request.Option) (*DescribeElasticGpusOutput, error) {
+ req, out := c.DescribeElasticGpusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeExportTasks = "DescribeExportTasks"
// DescribeExportTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeExportTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeExportTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeExportTasks method directly
-// instead.
+// See DescribeExportTasks for more information on using the DescribeExportTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeExportTasksRequest method.
// req, resp := client.DescribeExportTasksRequest(params)
@@ -6394,27 +8104,41 @@ func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks
func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
req, out := c.DescribeExportTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeExportTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) {
+ req, out := c.DescribeExportTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeFlowLogs = "DescribeFlowLogs"
// DescribeFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeFlowLogs method directly
-// instead.
+// See DescribeFlowLogs for more information on using the DescribeFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeFlowLogsRequest method.
// req, resp := client.DescribeFlowLogsRequest(params)
@@ -6456,27 +8180,117 @@ func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs
func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) {
req, out := c.DescribeFlowLogsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeFlowLogsWithContext is the same as DescribeFlowLogs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFlowLogs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeFlowLogsWithContext(ctx aws.Context, input *DescribeFlowLogsInput, opts ...request.Option) (*DescribeFlowLogsOutput, error) {
+ req, out := c.DescribeFlowLogsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeFpgaImages = "DescribeFpgaImages"
+
+// DescribeFpgaImagesRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeFpgaImages operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeFpgaImages for more information on using the DescribeFpgaImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeFpgaImagesRequest method.
+// req, resp := client.DescribeFpgaImagesRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
+func (c *EC2) DescribeFpgaImagesRequest(input *DescribeFpgaImagesInput) (req *request.Request, output *DescribeFpgaImagesOutput) {
+ op := &request.Operation{
+ Name: opDescribeFpgaImages,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeFpgaImagesInput{}
+ }
+
+ output = &DescribeFpgaImagesOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeFpgaImages API operation for Amazon Elastic Compute Cloud.
+//
+// Describes one or more available Amazon FPGA Images (AFIs). These include
+// public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts
+// for which you have load permissions.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeFpgaImages for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
+func (c *EC2) DescribeFpgaImages(input *DescribeFpgaImagesInput) (*DescribeFpgaImagesOutput, error) {
+ req, out := c.DescribeFpgaImagesRequest(input)
+ return out, req.Send()
+}
+
+// DescribeFpgaImagesWithContext is the same as DescribeFpgaImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFpgaImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeFpgaImagesWithContext(ctx aws.Context, input *DescribeFpgaImagesInput, opts ...request.Option) (*DescribeFpgaImagesOutput, error) {
+ req, out := c.DescribeFpgaImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings"
// DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHostReservationOfferings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHostReservationOfferings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHostReservationOfferings method directly
-// instead.
+// See DescribeHostReservationOfferings for more information on using the DescribeHostReservationOfferings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostReservationOfferingsRequest method.
// req, resp := client.DescribeHostReservationOfferingsRequest(params)
@@ -6524,27 +8338,41 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings
func (c *EC2) DescribeHostReservationOfferings(input *DescribeHostReservationOfferingsInput) (*DescribeHostReservationOfferingsOutput, error) {
req, out := c.DescribeHostReservationOfferingsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeHostReservationOfferingsWithContext is the same as DescribeHostReservationOfferings with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeHostReservationOfferings for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeHostReservationOfferingsWithContext(ctx aws.Context, input *DescribeHostReservationOfferingsInput, opts ...request.Option) (*DescribeHostReservationOfferingsOutput, error) {
+ req, out := c.DescribeHostReservationOfferingsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeHostReservations = "DescribeHostReservations"
// DescribeHostReservationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHostReservations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHostReservations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHostReservations method directly
-// instead.
+// See DescribeHostReservations for more information on using the DescribeHostReservations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostReservationsRequest method.
// req, resp := client.DescribeHostReservationsRequest(params)
@@ -6585,27 +8413,41 @@ func (c *EC2) DescribeHostReservationsRequest(input *DescribeHostReservationsInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations
func (c *EC2) DescribeHostReservations(input *DescribeHostReservationsInput) (*DescribeHostReservationsOutput, error) {
req, out := c.DescribeHostReservationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeHostReservationsWithContext is the same as DescribeHostReservations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeHostReservations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeHostReservationsWithContext(ctx aws.Context, input *DescribeHostReservationsInput, opts ...request.Option) (*DescribeHostReservationsOutput, error) {
+ req, out := c.DescribeHostReservationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeHosts = "DescribeHosts"
// DescribeHostsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHosts method directly
-// instead.
+// See DescribeHosts for more information on using the DescribeHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostsRequest method.
// req, resp := client.DescribeHostsRequest(params)
@@ -6649,27 +8491,41 @@ func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts
func (c *EC2) DescribeHosts(input *DescribeHostsInput) (*DescribeHostsOutput, error) {
req, out := c.DescribeHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeHostsWithContext is the same as DescribeHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeHostsWithContext(ctx aws.Context, input *DescribeHostsInput, opts ...request.Option) (*DescribeHostsOutput, error) {
+ req, out := c.DescribeHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAssociations"
// DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIamInstanceProfileAssociations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIamInstanceProfileAssociations method directly
-// instead.
+// See DescribeIamInstanceProfileAssociations for more information on using the DescribeIamInstanceProfileAssociations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIamInstanceProfileAssociationsRequest method.
// req, resp := client.DescribeIamInstanceProfileAssociationsRequest(params)
@@ -6709,27 +8565,41 @@ func (c *EC2) DescribeIamInstanceProfileAssociationsRequest(input *DescribeIamIn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations
func (c *EC2) DescribeIamInstanceProfileAssociations(input *DescribeIamInstanceProfileAssociationsInput) (*DescribeIamInstanceProfileAssociationsOutput, error) {
req, out := c.DescribeIamInstanceProfileAssociationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeIamInstanceProfileAssociationsWithContext is the same as DescribeIamInstanceProfileAssociations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeIamInstanceProfileAssociations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeIamInstanceProfileAssociationsWithContext(ctx aws.Context, input *DescribeIamInstanceProfileAssociationsInput, opts ...request.Option) (*DescribeIamInstanceProfileAssociationsOutput, error) {
+ req, out := c.DescribeIamInstanceProfileAssociationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeIdFormat = "DescribeIdFormat"
// DescribeIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIdFormat method directly
-// instead.
+// See DescribeIdFormat for more information on using the DescribeIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIdFormatRequest method.
// req, resp := client.DescribeIdFormatRequest(params)
@@ -6782,27 +8652,41 @@ func (c *EC2) DescribeIdFormatRequest(input *DescribeIdFormatInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat
func (c *EC2) DescribeIdFormat(input *DescribeIdFormatInput) (*DescribeIdFormatOutput, error) {
req, out := c.DescribeIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeIdFormatWithContext is the same as DescribeIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeIdFormatWithContext(ctx aws.Context, input *DescribeIdFormatInput, opts ...request.Option) (*DescribeIdFormatOutput, error) {
+ req, out := c.DescribeIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat"
// DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdentityIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIdentityIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIdentityIdFormat method directly
-// instead.
+// See DescribeIdentityIdFormat for more information on using the DescribeIdentityIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIdentityIdFormatRequest method.
// req, resp := client.DescribeIdentityIdFormatRequest(params)
@@ -6853,27 +8737,41 @@ func (c *EC2) DescribeIdentityIdFormatRequest(input *DescribeIdentityIdFormatInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat
func (c *EC2) DescribeIdentityIdFormat(input *DescribeIdentityIdFormatInput) (*DescribeIdentityIdFormatOutput, error) {
req, out := c.DescribeIdentityIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeIdentityIdFormatWithContext is the same as DescribeIdentityIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeIdentityIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeIdentityIdFormatWithContext(ctx aws.Context, input *DescribeIdentityIdFormatInput, opts ...request.Option) (*DescribeIdentityIdFormatOutput, error) {
+ req, out := c.DescribeIdentityIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImageAttribute = "DescribeImageAttribute"
// DescribeImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImageAttribute method directly
-// instead.
+// See DescribeImageAttribute for more information on using the DescribeImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImageAttributeRequest method.
// req, resp := client.DescribeImageAttributeRequest(params)
@@ -6914,27 +8812,41 @@ func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute
func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*DescribeImageAttributeOutput, error) {
req, out := c.DescribeImageAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImageAttributeWithContext is the same as DescribeImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImageAttributeWithContext(ctx aws.Context, input *DescribeImageAttributeInput, opts ...request.Option) (*DescribeImageAttributeOutput, error) {
+ req, out := c.DescribeImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImages = "DescribeImages"
// DescribeImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImages method directly
-// instead.
+// See DescribeImages for more information on using the DescribeImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImagesRequest method.
// req, resp := client.DescribeImagesRequest(params)
@@ -6980,27 +8892,41 @@ func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages
func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImagesWithContext is the same as DescribeImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
+ req, out := c.DescribeImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImportImageTasks = "DescribeImportImageTasks"
// DescribeImportImageTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImportImageTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImportImageTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImportImageTasks method directly
-// instead.
+// See DescribeImportImageTasks for more information on using the DescribeImportImageTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImportImageTasksRequest method.
// req, resp := client.DescribeImportImageTasksRequest(params)
@@ -7041,27 +8967,41 @@ func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks
func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*DescribeImportImageTasksOutput, error) {
req, out := c.DescribeImportImageTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImportImageTasksWithContext is the same as DescribeImportImageTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImportImageTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImportImageTasksWithContext(ctx aws.Context, input *DescribeImportImageTasksInput, opts ...request.Option) (*DescribeImportImageTasksOutput, error) {
+ req, out := c.DescribeImportImageTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
// DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImportSnapshotTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImportSnapshotTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImportSnapshotTasks method directly
-// instead.
+// See DescribeImportSnapshotTasks for more information on using the DescribeImportSnapshotTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImportSnapshotTasksRequest method.
// req, resp := client.DescribeImportSnapshotTasksRequest(params)
@@ -7101,27 +9041,41 @@ func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTa
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks
func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) {
req, out := c.DescribeImportSnapshotTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImportSnapshotTasksWithContext is the same as DescribeImportSnapshotTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImportSnapshotTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImportSnapshotTasksWithContext(ctx aws.Context, input *DescribeImportSnapshotTasksInput, opts ...request.Option) (*DescribeImportSnapshotTasksOutput, error) {
+ req, out := c.DescribeImportSnapshotTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
// DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstanceAttribute method directly
-// instead.
+// See DescribeInstanceAttribute for more information on using the DescribeInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstanceAttributeRequest method.
// req, resp := client.DescribeInstanceAttributeRequest(params)
@@ -7165,27 +9119,41 @@ func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute
func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) (*DescribeInstanceAttributeOutput, error) {
req, out := c.DescribeInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInstanceAttributeWithContext is the same as DescribeInstanceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstanceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceAttributeWithContext(ctx aws.Context, input *DescribeInstanceAttributeInput, opts ...request.Option) (*DescribeInstanceAttributeOutput, error) {
+ req, out := c.DescribeInstanceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeInstanceStatus = "DescribeInstanceStatus"
// DescribeInstanceStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstanceStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstanceStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstanceStatus method directly
-// instead.
+// See DescribeInstanceStatus for more information on using the DescribeInstanceStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstanceStatusRequest method.
// req, resp := client.DescribeInstanceStatusRequest(params)
@@ -7221,7 +9189,8 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput)
// DescribeInstanceStatus API operation for Amazon Elastic Compute Cloud.
//
// Describes the status of one or more instances. By default, only running instances
-// are described, unless specified otherwise.
+// are described, unless you specifically indicate to return the status of all
+// instances.
//
// Instance status includes the following components:
//
@@ -7251,8 +9220,23 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus
func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*DescribeInstanceStatusOutput, error) {
req, out := c.DescribeInstanceStatusRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInstanceStatusWithContext is the same as DescribeInstanceStatus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstanceStatus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceStatusWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.Option) (*DescribeInstanceStatusOutput, error) {
+ req, out := c.DescribeInstanceStatusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeInstanceStatusPages iterates over the pages of a DescribeInstanceStatus operation,
@@ -7272,31 +9256,55 @@ func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*Descr
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn func(p *DescribeInstanceStatusOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeInstanceStatusRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeInstanceStatusOutput), lastPage)
- })
+func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn func(*DescribeInstanceStatusOutput, bool) bool) error {
+ return c.DescribeInstanceStatusPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeInstanceStatusPagesWithContext same as DescribeInstanceStatusPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceStatusPagesWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, fn func(*DescribeInstanceStatusOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeInstanceStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstanceStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeInstanceStatusOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeInstances = "DescribeInstances"
// DescribeInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstances method directly
-// instead.
+// See DescribeInstances for more information on using the DescribeInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstancesRequest method.
// req, resp := client.DescribeInstancesRequest(params)
@@ -7357,8 +9365,23 @@ func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances
func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) {
req, out := c.DescribeInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInstancesWithContext is the same as DescribeInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstancesWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.Option) (*DescribeInstancesOutput, error) {
+ req, out := c.DescribeInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeInstancesPages iterates over the pages of a DescribeInstances operation,
@@ -7378,31 +9401,55 @@ func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstanc
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(p *DescribeInstancesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeInstancesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeInstancesOutput), lastPage)
- })
+func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(*DescribeInstancesOutput, bool) bool) error {
+ return c.DescribeInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeInstancesPagesWithContext same as DescribeInstancesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstancesPagesWithContext(ctx aws.Context, input *DescribeInstancesInput, fn func(*DescribeInstancesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeInstancesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeInternetGateways = "DescribeInternetGateways"
// DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInternetGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInternetGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInternetGateways method directly
-// instead.
+// See DescribeInternetGateways for more information on using the DescribeInternetGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInternetGatewaysRequest method.
// req, resp := client.DescribeInternetGatewaysRequest(params)
@@ -7442,27 +9489,41 @@ func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways
func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*DescribeInternetGatewaysOutput, error) {
req, out := c.DescribeInternetGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInternetGatewaysWithContext is the same as DescribeInternetGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInternetGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInternetGatewaysWithContext(ctx aws.Context, input *DescribeInternetGatewaysInput, opts ...request.Option) (*DescribeInternetGatewaysOutput, error) {
+ req, out := c.DescribeInternetGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeKeyPairs = "DescribeKeyPairs"
// DescribeKeyPairsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeKeyPairs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeKeyPairs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeKeyPairs method directly
-// instead.
+// See DescribeKeyPairs for more information on using the DescribeKeyPairs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeKeyPairsRequest method.
// req, resp := client.DescribeKeyPairsRequest(params)
@@ -7505,27 +9566,41 @@ func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs
func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsOutput, error) {
req, out := c.DescribeKeyPairsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeKeyPairsWithContext is the same as DescribeKeyPairs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeKeyPairs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeKeyPairsWithContext(ctx aws.Context, input *DescribeKeyPairsInput, opts ...request.Option) (*DescribeKeyPairsOutput, error) {
+ req, out := c.DescribeKeyPairsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeMovingAddresses = "DescribeMovingAddresses"
// DescribeMovingAddressesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeMovingAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeMovingAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeMovingAddresses method directly
-// instead.
+// See DescribeMovingAddresses for more information on using the DescribeMovingAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeMovingAddressesRequest method.
// req, resp := client.DescribeMovingAddressesRequest(params)
@@ -7567,27 +9642,41 @@ func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses
func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*DescribeMovingAddressesOutput, error) {
req, out := c.DescribeMovingAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeMovingAddressesWithContext is the same as DescribeMovingAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeMovingAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeMovingAddressesWithContext(ctx aws.Context, input *DescribeMovingAddressesInput, opts ...request.Option) (*DescribeMovingAddressesOutput, error) {
+ req, out := c.DescribeMovingAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeNatGateways = "DescribeNatGateways"
// DescribeNatGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNatGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNatGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNatGateways method directly
-// instead.
+// See DescribeNatGateways for more information on using the DescribeNatGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNatGatewaysRequest method.
// req, resp := client.DescribeNatGatewaysRequest(params)
@@ -7633,8 +9722,23 @@ func (c *EC2) DescribeNatGatewaysRequest(input *DescribeNatGatewaysInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways
func (c *EC2) DescribeNatGateways(input *DescribeNatGatewaysInput) (*DescribeNatGatewaysOutput, error) {
req, out := c.DescribeNatGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNatGatewaysWithContext is the same as DescribeNatGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNatGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNatGatewaysWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, opts ...request.Option) (*DescribeNatGatewaysOutput, error) {
+ req, out := c.DescribeNatGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeNatGatewaysPages iterates over the pages of a DescribeNatGateways operation,
@@ -7654,31 +9758,55 @@ func (c *EC2) DescribeNatGateways(input *DescribeNatGatewaysInput) (*DescribeNat
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeNatGatewaysPages(input *DescribeNatGatewaysInput, fn func(p *DescribeNatGatewaysOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeNatGatewaysRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeNatGatewaysOutput), lastPage)
- })
+func (c *EC2) DescribeNatGatewaysPages(input *DescribeNatGatewaysInput, fn func(*DescribeNatGatewaysOutput, bool) bool) error {
+ return c.DescribeNatGatewaysPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeNatGatewaysPagesWithContext same as DescribeNatGatewaysPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNatGatewaysPagesWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, fn func(*DescribeNatGatewaysOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeNatGatewaysInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeNatGatewaysRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeNatGatewaysOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeNetworkAcls = "DescribeNetworkAcls"
// DescribeNetworkAclsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkAcls operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkAcls for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkAcls method directly
-// instead.
+// See DescribeNetworkAcls for more information on using the DescribeNetworkAcls
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkAclsRequest method.
// req, resp := client.DescribeNetworkAclsRequest(params)
@@ -7721,27 +9849,41 @@ func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls
func (c *EC2) DescribeNetworkAcls(input *DescribeNetworkAclsInput) (*DescribeNetworkAclsOutput, error) {
req, out := c.DescribeNetworkAclsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNetworkAclsWithContext is the same as DescribeNetworkAcls with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkAcls for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkAclsWithContext(ctx aws.Context, input *DescribeNetworkAclsInput, opts ...request.Option) (*DescribeNetworkAclsOutput, error) {
+ req, out := c.DescribeNetworkAclsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
// DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfaceAttribute method directly
-// instead.
+// See DescribeNetworkInterfaceAttribute for more information on using the DescribeNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfaceAttributeRequest method.
// req, resp := client.DescribeNetworkInterfaceAttributeRequest(params)
@@ -7782,27 +9924,115 @@ func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInt
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute
func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceAttributeInput) (*DescribeNetworkInterfaceAttributeOutput, error) {
req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNetworkInterfaceAttributeWithContext is the same as DescribeNetworkInterfaceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkInterfaceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkInterfaceAttributeWithContext(ctx aws.Context, input *DescribeNetworkInterfaceAttributeInput, opts ...request.Option) (*DescribeNetworkInterfaceAttributeOutput, error) {
+ req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissions"
+
+// DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeNetworkInterfacePermissions operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeNetworkInterfacePermissions for more information on using the DescribeNetworkInterfacePermissions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeNetworkInterfacePermissionsRequest method.
+// req, resp := client.DescribeNetworkInterfacePermissionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
+func (c *EC2) DescribeNetworkInterfacePermissionsRequest(input *DescribeNetworkInterfacePermissionsInput) (req *request.Request, output *DescribeNetworkInterfacePermissionsOutput) {
+ op := &request.Operation{
+ Name: opDescribeNetworkInterfacePermissions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeNetworkInterfacePermissionsInput{}
+ }
+
+ output = &DescribeNetworkInterfacePermissionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeNetworkInterfacePermissions API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the permissions for your network interfaces.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeNetworkInterfacePermissions for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
+func (c *EC2) DescribeNetworkInterfacePermissions(input *DescribeNetworkInterfacePermissionsInput) (*DescribeNetworkInterfacePermissionsOutput, error) {
+ req, out := c.DescribeNetworkInterfacePermissionsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeNetworkInterfacePermissionsWithContext is the same as DescribeNetworkInterfacePermissions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkInterfacePermissions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkInterfacePermissionsWithContext(ctx aws.Context, input *DescribeNetworkInterfacePermissionsInput, opts ...request.Option) (*DescribeNetworkInterfacePermissionsOutput, error) {
+ req, out := c.DescribeNetworkInterfacePermissionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
// DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfaces operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfaces for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfaces method directly
-// instead.
+// See DescribeNetworkInterfaces for more information on using the DescribeNetworkInterfaces
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfacesRequest method.
// req, resp := client.DescribeNetworkInterfacesRequest(params)
@@ -7842,27 +10072,41 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces
func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error) {
req, out := c.DescribeNetworkInterfacesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNetworkInterfacesWithContext is the same as DescribeNetworkInterfaces with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkInterfaces for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkInterfacesWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, opts ...request.Option) (*DescribeNetworkInterfacesOutput, error) {
+ req, out := c.DescribeNetworkInterfacesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribePlacementGroups = "DescribePlacementGroups"
// DescribePlacementGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribePlacementGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribePlacementGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribePlacementGroups method directly
-// instead.
+// See DescribePlacementGroups for more information on using the DescribePlacementGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribePlacementGroupsRequest method.
// req, resp := client.DescribePlacementGroupsRequest(params)
@@ -7904,27 +10148,41 @@ func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups
func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*DescribePlacementGroupsOutput, error) {
req, out := c.DescribePlacementGroupsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribePlacementGroupsWithContext is the same as DescribePlacementGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribePlacementGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribePlacementGroupsWithContext(ctx aws.Context, input *DescribePlacementGroupsInput, opts ...request.Option) (*DescribePlacementGroupsOutput, error) {
+ req, out := c.DescribePlacementGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribePrefixLists = "DescribePrefixLists"
// DescribePrefixListsRequest generates a "aws/request.Request" representing the
// client's request for the DescribePrefixLists operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribePrefixLists for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribePrefixLists method directly
-// instead.
+// See DescribePrefixLists for more information on using the DescribePrefixLists
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribePrefixListsRequest method.
// req, resp := client.DescribePrefixListsRequest(params)
@@ -7968,27 +10226,41 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists
func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePrefixListsOutput, error) {
req, out := c.DescribePrefixListsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribePrefixListsWithContext is the same as DescribePrefixLists with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribePrefixLists for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribePrefixListsWithContext(ctx aws.Context, input *DescribePrefixListsInput, opts ...request.Option) (*DescribePrefixListsOutput, error) {
+ req, out := c.DescribePrefixListsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeRegions = "DescribeRegions"
// DescribeRegionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRegions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRegions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRegions method directly
-// instead.
+// See DescribeRegions for more information on using the DescribeRegions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRegionsRequest method.
// req, resp := client.DescribeRegionsRequest(params)
@@ -8031,27 +10303,41 @@ func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions
func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutput, error) {
req, out := c.DescribeRegionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeRegionsWithContext is the same as DescribeRegions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeRegions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeRegionsWithContext(ctx aws.Context, input *DescribeRegionsInput, opts ...request.Option) (*DescribeRegionsOutput, error) {
+ req, out := c.DescribeRegionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeReservedInstances = "DescribeReservedInstances"
// DescribeReservedInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstances method directly
-// instead.
+// See DescribeReservedInstances for more information on using the DescribeReservedInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesRequest method.
// req, resp := client.DescribeReservedInstancesRequest(params)
@@ -8094,27 +10380,41 @@ func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances
func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) (*DescribeReservedInstancesOutput, error) {
req, out := c.DescribeReservedInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesWithContext is the same as DescribeReservedInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesWithContext(ctx aws.Context, input *DescribeReservedInstancesInput, opts ...request.Option) (*DescribeReservedInstancesOutput, error) {
+ req, out := c.DescribeReservedInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
// DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesListings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesListings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesListings method directly
-// instead.
+// See DescribeReservedInstancesListings for more information on using the DescribeReservedInstancesListings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesListingsRequest method.
// req, resp := client.DescribeReservedInstancesListingsRequest(params)
@@ -8175,27 +10475,41 @@ func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedIn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings
func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstancesListingsInput) (*DescribeReservedInstancesListingsOutput, error) {
req, out := c.DescribeReservedInstancesListingsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesListingsWithContext is the same as DescribeReservedInstancesListings with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstancesListings for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesListingsWithContext(ctx aws.Context, input *DescribeReservedInstancesListingsInput, opts ...request.Option) (*DescribeReservedInstancesListingsOutput, error) {
+ req, out := c.DescribeReservedInstancesListingsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModifications"
// DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesModifications operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesModifications for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesModifications method directly
-// instead.
+// See DescribeReservedInstancesModifications for more information on using the DescribeReservedInstancesModifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesModificationsRequest method.
// req, resp := client.DescribeReservedInstancesModificationsRequest(params)
@@ -8247,8 +10561,23 @@ func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReser
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications
func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInstancesModificationsInput) (*DescribeReservedInstancesModificationsOutput, error) {
req, out := c.DescribeReservedInstancesModificationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesModificationsWithContext is the same as DescribeReservedInstancesModifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstancesModifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesModificationsWithContext(ctx aws.Context, input *DescribeReservedInstancesModificationsInput, opts ...request.Option) (*DescribeReservedInstancesModificationsOutput, error) {
+ req, out := c.DescribeReservedInstancesModificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeReservedInstancesModificationsPages iterates over the pages of a DescribeReservedInstancesModifications operation,
@@ -8268,31 +10597,55 @@ func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInst
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReservedInstancesModificationsInput, fn func(p *DescribeReservedInstancesModificationsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeReservedInstancesModificationsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeReservedInstancesModificationsOutput), lastPage)
- })
+func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReservedInstancesModificationsInput, fn func(*DescribeReservedInstancesModificationsOutput, bool) bool) error {
+ return c.DescribeReservedInstancesModificationsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeReservedInstancesModificationsPagesWithContext same as DescribeReservedInstancesModificationsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesModificationsPagesWithContext(ctx aws.Context, input *DescribeReservedInstancesModificationsInput, fn func(*DescribeReservedInstancesModificationsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeReservedInstancesModificationsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeReservedInstancesModificationsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeReservedInstancesModificationsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings"
// DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesOfferings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesOfferings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesOfferings method directly
-// instead.
+// See DescribeReservedInstancesOfferings for more information on using the DescribeReservedInstancesOfferings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesOfferingsRequest method.
// req, resp := client.DescribeReservedInstancesOfferingsRequest(params)
@@ -8349,8 +10702,23 @@ func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings
func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstancesOfferingsInput) (*DescribeReservedInstancesOfferingsOutput, error) {
req, out := c.DescribeReservedInstancesOfferingsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesOfferingsWithContext is the same as DescribeReservedInstancesOfferings with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstancesOfferings for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesOfferingsWithContext(ctx aws.Context, input *DescribeReservedInstancesOfferingsInput, opts ...request.Option) (*DescribeReservedInstancesOfferingsOutput, error) {
+ req, out := c.DescribeReservedInstancesOfferingsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeReservedInstancesOfferingsPages iterates over the pages of a DescribeReservedInstancesOfferings operation,
@@ -8370,31 +10738,55 @@ func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstance
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedInstancesOfferingsInput, fn func(p *DescribeReservedInstancesOfferingsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeReservedInstancesOfferingsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeReservedInstancesOfferingsOutput), lastPage)
- })
+func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedInstancesOfferingsInput, fn func(*DescribeReservedInstancesOfferingsOutput, bool) bool) error {
+ return c.DescribeReservedInstancesOfferingsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeReservedInstancesOfferingsPagesWithContext same as DescribeReservedInstancesOfferingsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedInstancesOfferingsInput, fn func(*DescribeReservedInstancesOfferingsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeReservedInstancesOfferingsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeReservedInstancesOfferingsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeReservedInstancesOfferingsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeRouteTables = "DescribeRouteTables"
// DescribeRouteTablesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRouteTables operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRouteTables for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRouteTables method directly
-// instead.
+// See DescribeRouteTables for more information on using the DescribeRouteTables
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRouteTablesRequest method.
// req, resp := client.DescribeRouteTablesRequest(params)
@@ -8442,27 +10834,41 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables
func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) {
req, out := c.DescribeRouteTablesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeRouteTablesWithContext is the same as DescribeRouteTables with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeRouteTables for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeRouteTablesWithContext(ctx aws.Context, input *DescribeRouteTablesInput, opts ...request.Option) (*DescribeRouteTablesOutput, error) {
+ req, out := c.DescribeRouteTablesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvailability"
// DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledInstanceAvailability operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeScheduledInstanceAvailability for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeScheduledInstanceAvailability method directly
-// instead.
+// See DescribeScheduledInstanceAvailability for more information on using the DescribeScheduledInstanceAvailability
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeScheduledInstanceAvailabilityRequest method.
// req, resp := client.DescribeScheduledInstanceAvailabilityRequest(params)
@@ -8510,27 +10916,41 @@ func (c *EC2) DescribeScheduledInstanceAvailabilityRequest(input *DescribeSchedu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability
func (c *EC2) DescribeScheduledInstanceAvailability(input *DescribeScheduledInstanceAvailabilityInput) (*DescribeScheduledInstanceAvailabilityOutput, error) {
req, out := c.DescribeScheduledInstanceAvailabilityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeScheduledInstanceAvailabilityWithContext is the same as DescribeScheduledInstanceAvailability with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeScheduledInstanceAvailability for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeScheduledInstanceAvailabilityWithContext(ctx aws.Context, input *DescribeScheduledInstanceAvailabilityInput, opts ...request.Option) (*DescribeScheduledInstanceAvailabilityOutput, error) {
+ req, out := c.DescribeScheduledInstanceAvailabilityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeScheduledInstances = "DescribeScheduledInstances"
// DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeScheduledInstances method directly
-// instead.
+// See DescribeScheduledInstances for more information on using the DescribeScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeScheduledInstancesRequest method.
// req, resp := client.DescribeScheduledInstancesRequest(params)
@@ -8570,27 +10990,41 @@ func (c *EC2) DescribeScheduledInstancesRequest(input *DescribeScheduledInstance
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances
func (c *EC2) DescribeScheduledInstances(input *DescribeScheduledInstancesInput) (*DescribeScheduledInstancesOutput, error) {
req, out := c.DescribeScheduledInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeScheduledInstancesWithContext is the same as DescribeScheduledInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeScheduledInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeScheduledInstancesWithContext(ctx aws.Context, input *DescribeScheduledInstancesInput, opts ...request.Option) (*DescribeScheduledInstancesOutput, error) {
+ req, out := c.DescribeScheduledInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences"
// DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSecurityGroupReferences operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSecurityGroupReferences for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSecurityGroupReferences method directly
-// instead.
+// See DescribeSecurityGroupReferences for more information on using the DescribeSecurityGroupReferences
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSecurityGroupReferencesRequest method.
// req, resp := client.DescribeSecurityGroupReferencesRequest(params)
@@ -8631,27 +11065,41 @@ func (c *EC2) DescribeSecurityGroupReferencesRequest(input *DescribeSecurityGrou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences
func (c *EC2) DescribeSecurityGroupReferences(input *DescribeSecurityGroupReferencesInput) (*DescribeSecurityGroupReferencesOutput, error) {
req, out := c.DescribeSecurityGroupReferencesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSecurityGroupReferencesWithContext is the same as DescribeSecurityGroupReferences with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSecurityGroupReferences for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSecurityGroupReferencesWithContext(ctx aws.Context, input *DescribeSecurityGroupReferencesInput, opts ...request.Option) (*DescribeSecurityGroupReferencesOutput, error) {
+ req, out := c.DescribeSecurityGroupReferencesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSecurityGroups = "DescribeSecurityGroups"
// DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSecurityGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSecurityGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSecurityGroups method directly
-// instead.
+// See DescribeSecurityGroups for more information on using the DescribeSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSecurityGroupsRequest method.
// req, resp := client.DescribeSecurityGroupsRequest(params)
@@ -8698,27 +11146,41 @@ func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups
func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*DescribeSecurityGroupsOutput, error) {
req, out := c.DescribeSecurityGroupsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSecurityGroupsWithContext is the same as DescribeSecurityGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSecurityGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSecurityGroupsWithContext(ctx aws.Context, input *DescribeSecurityGroupsInput, opts ...request.Option) (*DescribeSecurityGroupsOutput, error) {
+ req, out := c.DescribeSecurityGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
// DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSnapshotAttribute method directly
-// instead.
+// See DescribeSnapshotAttribute for more information on using the DescribeSnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSnapshotAttributeRequest method.
// req, resp := client.DescribeSnapshotAttributeRequest(params)
@@ -8762,27 +11224,41 @@ func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute
func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) (*DescribeSnapshotAttributeOutput, error) {
req, out := c.DescribeSnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSnapshotAttributeWithContext is the same as DescribeSnapshotAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSnapshotAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSnapshotAttributeWithContext(ctx aws.Context, input *DescribeSnapshotAttributeInput, opts ...request.Option) (*DescribeSnapshotAttributeOutput, error) {
+ req, out := c.DescribeSnapshotAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSnapshots = "DescribeSnapshots"
// DescribeSnapshotsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSnapshots operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSnapshots for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSnapshots method directly
-// instead.
+// See DescribeSnapshots for more information on using the DescribeSnapshots
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSnapshotsRequest method.
// req, resp := client.DescribeSnapshotsRequest(params)
@@ -8873,8 +11349,23 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots
func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) {
req, out := c.DescribeSnapshotsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSnapshots for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) {
+ req, out := c.DescribeSnapshotsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeSnapshotsPages iterates over the pages of a DescribeSnapshots operation,
@@ -8894,31 +11385,55 @@ func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapsho
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(p *DescribeSnapshotsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeSnapshotsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeSnapshotsOutput), lastPage)
- })
+func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool) error {
+ return c.DescribeSnapshotsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeSnapshotsPagesWithContext same as DescribeSnapshotsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSnapshotsPagesWithContext(ctx aws.Context, input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeSnapshotsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSnapshotsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
// DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotDatafeedSubscription method directly
-// instead.
+// See DescribeSpotDatafeedSubscription for more information on using the DescribeSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotDatafeedSubscriptionRequest method.
// req, resp := client.DescribeSpotDatafeedSubscriptionRequest(params)
@@ -8960,27 +11475,41 @@ func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafee
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription
func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) {
req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotDatafeedSubscriptionWithContext is the same as DescribeSpotDatafeedSubscription with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotDatafeedSubscription for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *DescribeSpotDatafeedSubscriptionInput, opts ...request.Option) (*DescribeSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
// DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetInstances method directly
-// instead.
+// See DescribeSpotFleetInstances for more information on using the DescribeSpotFleetInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetInstancesRequest method.
// req, resp := client.DescribeSpotFleetInstancesRequest(params)
@@ -9020,27 +11549,41 @@ func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstance
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances
func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) (*DescribeSpotFleetInstancesOutput, error) {
req, out := c.DescribeSpotFleetInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotFleetInstancesWithContext is the same as DescribeSpotFleetInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotFleetInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetInstancesWithContext(ctx aws.Context, input *DescribeSpotFleetInstancesInput, opts ...request.Option) (*DescribeSpotFleetInstancesOutput, error) {
+ req, out := c.DescribeSpotFleetInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
// DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetRequestHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetRequestHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetRequestHistory method directly
-// instead.
+// See DescribeSpotFleetRequestHistory for more information on using the DescribeSpotFleetRequestHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetRequestHistoryRequest method.
// req, resp := client.DescribeSpotFleetRequestHistoryRequest(params)
@@ -9085,27 +11628,41 @@ func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetReq
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory
func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHistoryInput) (*DescribeSpotFleetRequestHistoryOutput, error) {
req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotFleetRequestHistoryWithContext is the same as DescribeSpotFleetRequestHistory with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotFleetRequestHistory for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetRequestHistoryWithContext(ctx aws.Context, input *DescribeSpotFleetRequestHistoryInput, opts ...request.Option) (*DescribeSpotFleetRequestHistoryOutput, error) {
+ req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
// DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetRequests method directly
-// instead.
+// See DescribeSpotFleetRequests for more information on using the DescribeSpotFleetRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetRequestsRequest method.
// req, resp := client.DescribeSpotFleetRequestsRequest(params)
@@ -9154,8 +11711,23 @@ func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests
func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (*DescribeSpotFleetRequestsOutput, error) {
req, out := c.DescribeSpotFleetRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotFleetRequestsWithContext is the same as DescribeSpotFleetRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotFleetRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetRequestsWithContext(ctx aws.Context, input *DescribeSpotFleetRequestsInput, opts ...request.Option) (*DescribeSpotFleetRequestsOutput, error) {
+ req, out := c.DescribeSpotFleetRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeSpotFleetRequestsPages iterates over the pages of a DescribeSpotFleetRequests operation,
@@ -9175,31 +11747,55 @@ func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeSpotFleetRequestsPages(input *DescribeSpotFleetRequestsInput, fn func(p *DescribeSpotFleetRequestsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeSpotFleetRequestsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeSpotFleetRequestsOutput), lastPage)
- })
+func (c *EC2) DescribeSpotFleetRequestsPages(input *DescribeSpotFleetRequestsInput, fn func(*DescribeSpotFleetRequestsOutput, bool) bool) error {
+ return c.DescribeSpotFleetRequestsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeSpotFleetRequestsPagesWithContext same as DescribeSpotFleetRequestsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetRequestsPagesWithContext(ctx aws.Context, input *DescribeSpotFleetRequestsInput, fn func(*DescribeSpotFleetRequestsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeSpotFleetRequestsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSpotFleetRequestsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeSpotFleetRequestsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
// DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotInstanceRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotInstanceRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotInstanceRequests method directly
-// instead.
+// See DescribeSpotInstanceRequests for more information on using the DescribeSpotInstanceRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotInstanceRequestsRequest method.
// req, resp := client.DescribeSpotInstanceRequestsRequest(params)
@@ -9253,27 +11849,41 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests
func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsInput) (*DescribeSpotInstanceRequestsOutput, error) {
req, out := c.DescribeSpotInstanceRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotInstanceRequestsWithContext is the same as DescribeSpotInstanceRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotInstanceRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotInstanceRequestsWithContext(ctx aws.Context, input *DescribeSpotInstanceRequestsInput, opts ...request.Option) (*DescribeSpotInstanceRequestsOutput, error) {
+ req, out := c.DescribeSpotInstanceRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
// DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotPriceHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotPriceHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotPriceHistory method directly
-// instead.
+// See DescribeSpotPriceHistory for more information on using the DescribeSpotPriceHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotPriceHistoryRequest method.
// req, resp := client.DescribeSpotPriceHistoryRequest(params)
@@ -9326,8 +11936,23 @@ func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory
func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*DescribeSpotPriceHistoryOutput, error) {
req, out := c.DescribeSpotPriceHistoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotPriceHistoryWithContext is the same as DescribeSpotPriceHistory with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotPriceHistory for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotPriceHistoryWithContext(ctx aws.Context, input *DescribeSpotPriceHistoryInput, opts ...request.Option) (*DescribeSpotPriceHistoryOutput, error) {
+ req, out := c.DescribeSpotPriceHistoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeSpotPriceHistoryPages iterates over the pages of a DescribeSpotPriceHistory operation,
@@ -9347,31 +11972,55 @@ func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*D
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput, fn func(p *DescribeSpotPriceHistoryOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeSpotPriceHistoryRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeSpotPriceHistoryOutput), lastPage)
- })
+func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput, fn func(*DescribeSpotPriceHistoryOutput, bool) bool) error {
+ return c.DescribeSpotPriceHistoryPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeSpotPriceHistoryPagesWithContext same as DescribeSpotPriceHistoryPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotPriceHistoryPagesWithContext(ctx aws.Context, input *DescribeSpotPriceHistoryInput, fn func(*DescribeSpotPriceHistoryOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeSpotPriceHistoryInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSpotPriceHistoryRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeSpotPriceHistoryOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups"
// DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeStaleSecurityGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeStaleSecurityGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeStaleSecurityGroups method directly
-// instead.
+// See DescribeStaleSecurityGroups for more information on using the DescribeStaleSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeStaleSecurityGroupsRequest method.
// req, resp := client.DescribeStaleSecurityGroupsRequest(params)
@@ -9414,27 +12063,41 @@ func (c *EC2) DescribeStaleSecurityGroupsRequest(input *DescribeStaleSecurityGro
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups
func (c *EC2) DescribeStaleSecurityGroups(input *DescribeStaleSecurityGroupsInput) (*DescribeStaleSecurityGroupsOutput, error) {
req, out := c.DescribeStaleSecurityGroupsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeStaleSecurityGroupsWithContext is the same as DescribeStaleSecurityGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeStaleSecurityGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeStaleSecurityGroupsWithContext(ctx aws.Context, input *DescribeStaleSecurityGroupsInput, opts ...request.Option) (*DescribeStaleSecurityGroupsOutput, error) {
+ req, out := c.DescribeStaleSecurityGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSubnets = "DescribeSubnets"
// DescribeSubnetsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSubnets operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSubnets for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSubnets method directly
-// instead.
+// See DescribeSubnets for more information on using the DescribeSubnets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSubnetsRequest method.
// req, resp := client.DescribeSubnetsRequest(params)
@@ -9477,27 +12140,41 @@ func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets
func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutput, error) {
req, out := c.DescribeSubnetsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSubnetsWithContext is the same as DescribeSubnets with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSubnets for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSubnetsWithContext(ctx aws.Context, input *DescribeSubnetsInput, opts ...request.Option) (*DescribeSubnetsOutput, error) {
+ req, out := c.DescribeSubnetsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeTags = "DescribeTags"
// DescribeTagsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeTags method directly
-// instead.
+// See DescribeTags for more information on using the DescribeTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeTagsRequest method.
// req, resp := client.DescribeTagsRequest(params)
@@ -9546,8 +12223,23 @@ func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags
func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
req, out := c.DescribeTagsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeTagsWithContext is the same as DescribeTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
+ req, out := c.DescribeTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeTagsPages iterates over the pages of a DescribeTags operation,
@@ -9567,31 +12259,55 @@ func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeTagsPages(input *DescribeTagsInput, fn func(p *DescribeTagsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeTagsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeTagsOutput), lastPage)
- })
+func (c *EC2) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error {
+ return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeTagsPagesWithContext same as DescribeTagsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeTagsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeTagsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
// DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumeAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumeAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumeAttribute method directly
-// instead.
+// See DescribeVolumeAttribute for more information on using the DescribeVolumeAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumeAttributeRequest method.
// req, resp := client.DescribeVolumeAttributeRequest(params)
@@ -9635,27 +12351,41 @@ func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute
func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*DescribeVolumeAttributeOutput, error) {
req, out := c.DescribeVolumeAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumeAttributeWithContext is the same as DescribeVolumeAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumeAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumeAttributeWithContext(ctx aws.Context, input *DescribeVolumeAttributeInput, opts ...request.Option) (*DescribeVolumeAttributeOutput, error) {
+ req, out := c.DescribeVolumeAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVolumeStatus = "DescribeVolumeStatus"
// DescribeVolumeStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumeStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumeStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumeStatus method directly
-// instead.
+// See DescribeVolumeStatus for more information on using the DescribeVolumeStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumeStatusRequest method.
// req, resp := client.DescribeVolumeStatusRequest(params)
@@ -9735,8 +12465,23 @@ func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus
func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeVolumeStatusOutput, error) {
req, out := c.DescribeVolumeStatusRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumeStatusWithContext is the same as DescribeVolumeStatus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumeStatus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumeStatusWithContext(ctx aws.Context, input *DescribeVolumeStatusInput, opts ...request.Option) (*DescribeVolumeStatusOutput, error) {
+ req, out := c.DescribeVolumeStatusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeVolumeStatusPages iterates over the pages of a DescribeVolumeStatus operation,
@@ -9756,31 +12501,55 @@ func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeV
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn func(p *DescribeVolumeStatusOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeVolumeStatusRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeVolumeStatusOutput), lastPage)
- })
+func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn func(*DescribeVolumeStatusOutput, bool) bool) error {
+ return c.DescribeVolumeStatusPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeVolumeStatusPagesWithContext same as DescribeVolumeStatusPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumeStatusPagesWithContext(ctx aws.Context, input *DescribeVolumeStatusInput, fn func(*DescribeVolumeStatusOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeVolumeStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumeStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeVolumeStatusOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeVolumes = "DescribeVolumes"
// DescribeVolumesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumes operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumes for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumes method directly
-// instead.
+// See DescribeVolumes for more information on using the DescribeVolumes
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumesRequest method.
// req, resp := client.DescribeVolumesRequest(params)
@@ -9836,8 +12605,23 @@ func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes
func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) {
req, out := c.DescribeVolumesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumesWithContext is the same as DescribeVolumes with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumes for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumesWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.Option) (*DescribeVolumesOutput, error) {
+ req, out := c.DescribeVolumesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeVolumesPages iterates over the pages of a DescribeVolumes operation,
@@ -9857,31 +12641,55 @@ func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutp
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(p *DescribeVolumesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeVolumesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeVolumesOutput), lastPage)
- })
+func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(*DescribeVolumesOutput, bool) bool) error {
+ return c.DescribeVolumesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeVolumesPagesWithContext same as DescribeVolumesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumesPagesWithContext(ctx aws.Context, input *DescribeVolumesInput, fn func(*DescribeVolumesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeVolumesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeVolumesModifications = "DescribeVolumesModifications"
// DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumesModifications operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumesModifications for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumesModifications method directly
-// instead.
+// See DescribeVolumesModifications for more information on using the DescribeVolumesModifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumesModificationsRequest method.
// req, resp := client.DescribeVolumesModificationsRequest(params)
@@ -9933,27 +12741,41 @@ func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModifica
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications
func (c *EC2) DescribeVolumesModifications(input *DescribeVolumesModificationsInput) (*DescribeVolumesModificationsOutput, error) {
req, out := c.DescribeVolumesModificationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumesModificationsWithContext is the same as DescribeVolumesModifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumesModifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumesModificationsWithContext(ctx aws.Context, input *DescribeVolumesModificationsInput, opts ...request.Option) (*DescribeVolumesModificationsOutput, error) {
+ req, out := c.DescribeVolumesModificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcAttribute = "DescribeVpcAttribute"
// DescribeVpcAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcAttribute method directly
-// instead.
+// See DescribeVpcAttribute for more information on using the DescribeVpcAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcAttributeRequest method.
// req, resp := client.DescribeVpcAttributeRequest(params)
@@ -9994,27 +12816,41 @@ func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute
func (c *EC2) DescribeVpcAttribute(input *DescribeVpcAttributeInput) (*DescribeVpcAttributeOutput, error) {
req, out := c.DescribeVpcAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcAttributeWithContext is the same as DescribeVpcAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcAttributeWithContext(ctx aws.Context, input *DescribeVpcAttributeInput, opts ...request.Option) (*DescribeVpcAttributeOutput, error) {
+ req, out := c.DescribeVpcAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcClassicLink = "DescribeVpcClassicLink"
// DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcClassicLink method directly
-// instead.
+// See DescribeVpcClassicLink for more information on using the DescribeVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcClassicLinkRequest method.
// req, resp := client.DescribeVpcClassicLinkRequest(params)
@@ -10054,27 +12890,41 @@ func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink
func (c *EC2) DescribeVpcClassicLink(input *DescribeVpcClassicLinkInput) (*DescribeVpcClassicLinkOutput, error) {
req, out := c.DescribeVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcClassicLinkWithContext is the same as DescribeVpcClassicLink with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcClassicLink for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcClassicLinkWithContext(ctx aws.Context, input *DescribeVpcClassicLinkInput, opts ...request.Option) (*DescribeVpcClassicLinkOutput, error) {
+ req, out := c.DescribeVpcClassicLinkRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport"
// DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcClassicLinkDnsSupport method directly
-// instead.
+// See DescribeVpcClassicLinkDnsSupport for more information on using the DescribeVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcClassicLinkDnsSupportRequest method.
// req, resp := client.DescribeVpcClassicLinkDnsSupportRequest(params)
@@ -10107,8 +12957,8 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicL
// the DNS hostname of a linked EC2-Classic instance resolves to its private
// IP address when addressed from an instance in the VPC to which it's linked.
// Similarly, the DNS hostname of an instance in a VPC resolves to its private
-// IP address when addressed from a linked EC2-Classic instance. For more information
-// about ClassicLink, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
+// IP address when addressed from a linked EC2-Classic instance. For more information,
+// see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -10120,27 +12970,41 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicL
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport
func (c *EC2) DescribeVpcClassicLinkDnsSupport(input *DescribeVpcClassicLinkDnsSupportInput) (*DescribeVpcClassicLinkDnsSupportOutput, error) {
req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcClassicLinkDnsSupportWithContext is the same as DescribeVpcClassicLinkDnsSupport with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcClassicLinkDnsSupport for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *DescribeVpcClassicLinkDnsSupportInput, opts ...request.Option) (*DescribeVpcClassicLinkDnsSupportOutput, error) {
+ req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices"
// DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcEndpointServices operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcEndpointServices for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcEndpointServices method directly
-// instead.
+// See DescribeVpcEndpointServices for more information on using the DescribeVpcEndpointServices
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcEndpointServicesRequest method.
// req, resp := client.DescribeVpcEndpointServicesRequest(params)
@@ -10181,27 +13045,41 @@ func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServi
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices
func (c *EC2) DescribeVpcEndpointServices(input *DescribeVpcEndpointServicesInput) (*DescribeVpcEndpointServicesOutput, error) {
req, out := c.DescribeVpcEndpointServicesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointServicesWithContext is the same as DescribeVpcEndpointServices with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpointServices for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointServicesWithContext(ctx aws.Context, input *DescribeVpcEndpointServicesInput, opts ...request.Option) (*DescribeVpcEndpointServicesOutput, error) {
+ req, out := c.DescribeVpcEndpointServicesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcEndpoints = "DescribeVpcEndpoints"
// DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcEndpoints operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcEndpoints for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcEndpoints method directly
-// instead.
+// See DescribeVpcEndpoints for more information on using the DescribeVpcEndpoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcEndpointsRequest method.
// req, resp := client.DescribeVpcEndpointsRequest(params)
@@ -10241,27 +13119,41 @@ func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints
func (c *EC2) DescribeVpcEndpoints(input *DescribeVpcEndpointsInput) (*DescribeVpcEndpointsOutput, error) {
req, out := c.DescribeVpcEndpointsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointsWithContext is the same as DescribeVpcEndpoints with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpoints for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointsWithContext(ctx aws.Context, input *DescribeVpcEndpointsInput, opts ...request.Option) (*DescribeVpcEndpointsOutput, error) {
+ req, out := c.DescribeVpcEndpointsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections"
// DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcPeeringConnections operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcPeeringConnections for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcPeeringConnections method directly
-// instead.
+// See DescribeVpcPeeringConnections for more information on using the DescribeVpcPeeringConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcPeeringConnectionsRequest method.
// req, resp := client.DescribeVpcPeeringConnectionsRequest(params)
@@ -10301,27 +13193,41 @@ func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections
func (c *EC2) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) {
req, out := c.DescribeVpcPeeringConnectionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcPeeringConnectionsWithContext is the same as DescribeVpcPeeringConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcPeeringConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcPeeringConnectionsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.Option) (*DescribeVpcPeeringConnectionsOutput, error) {
+ req, out := c.DescribeVpcPeeringConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcs = "DescribeVpcs"
// DescribeVpcsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcs method directly
-// instead.
+// See DescribeVpcs for more information on using the DescribeVpcs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcsRequest method.
// req, resp := client.DescribeVpcsRequest(params)
@@ -10361,27 +13267,41 @@ func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs
func (c *EC2) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error) {
req, out := c.DescribeVpcsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcsWithContext is the same as DescribeVpcs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcsWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.Option) (*DescribeVpcsOutput, error) {
+ req, out := c.DescribeVpcsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpnConnections = "DescribeVpnConnections"
// DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpnConnections operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpnConnections for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpnConnections method directly
-// instead.
+// See DescribeVpnConnections for more information on using the DescribeVpnConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpnConnectionsRequest method.
// req, resp := client.DescribeVpnConnectionsRequest(params)
@@ -10425,27 +13345,41 @@ func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections
func (c *EC2) DescribeVpnConnections(input *DescribeVpnConnectionsInput) (*DescribeVpnConnectionsOutput, error) {
req, out := c.DescribeVpnConnectionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpnConnectionsWithContext is the same as DescribeVpnConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpnConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpnConnectionsWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.Option) (*DescribeVpnConnectionsOutput, error) {
+ req, out := c.DescribeVpnConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpnGateways = "DescribeVpnGateways"
// DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpnGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpnGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpnGateways method directly
-// instead.
+// See DescribeVpnGateways for more information on using the DescribeVpnGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpnGatewaysRequest method.
// req, resp := client.DescribeVpnGatewaysRequest(params)
@@ -10489,27 +13423,41 @@ func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways
func (c *EC2) DescribeVpnGateways(input *DescribeVpnGatewaysInput) (*DescribeVpnGatewaysOutput, error) {
req, out := c.DescribeVpnGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpnGatewaysWithContext is the same as DescribeVpnGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpnGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpnGatewaysWithContext(ctx aws.Context, input *DescribeVpnGatewaysInput, opts ...request.Option) (*DescribeVpnGatewaysOutput, error) {
+ req, out := c.DescribeVpnGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachClassicLinkVpc = "DetachClassicLinkVpc"
// DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the
// client's request for the DetachClassicLinkVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachClassicLinkVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachClassicLinkVpc method directly
-// instead.
+// See DetachClassicLinkVpc for more information on using the DetachClassicLinkVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachClassicLinkVpcRequest method.
// req, resp := client.DetachClassicLinkVpcRequest(params)
@@ -10551,27 +13499,41 @@ func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc
func (c *EC2) DetachClassicLinkVpc(input *DetachClassicLinkVpcInput) (*DetachClassicLinkVpcOutput, error) {
req, out := c.DetachClassicLinkVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachClassicLinkVpcWithContext is the same as DetachClassicLinkVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachClassicLinkVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachClassicLinkVpcWithContext(ctx aws.Context, input *DetachClassicLinkVpcInput, opts ...request.Option) (*DetachClassicLinkVpcOutput, error) {
+ req, out := c.DetachClassicLinkVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachInternetGateway = "DetachInternetGateway"
// DetachInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DetachInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachInternetGateway method directly
-// instead.
+// See DetachInternetGateway for more information on using the DetachInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachInternetGatewayRequest method.
// req, resp := client.DetachInternetGatewayRequest(params)
@@ -10604,7 +13566,7 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r
//
// Detaches an Internet gateway from a VPC, disabling connectivity between the
// Internet and the VPC. The VPC must not contain any running instances with
-// Elastic IP addresses.
+// Elastic IP addresses or public IPv4 addresses.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -10615,27 +13577,41 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway
func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachInternetGatewayOutput, error) {
req, out := c.DetachInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachInternetGatewayWithContext is the same as DetachInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachInternetGatewayWithContext(ctx aws.Context, input *DetachInternetGatewayInput, opts ...request.Option) (*DetachInternetGatewayOutput, error) {
+ req, out := c.DetachInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachNetworkInterface = "DetachNetworkInterface"
// DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the DetachNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachNetworkInterface method directly
-// instead.
+// See DetachNetworkInterface for more information on using the DetachNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachNetworkInterfaceRequest method.
// req, resp := client.DetachNetworkInterfaceRequest(params)
@@ -10677,27 +13653,41 @@ func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface
func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*DetachNetworkInterfaceOutput, error) {
req, out := c.DetachNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachNetworkInterfaceWithContext is the same as DetachNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachNetworkInterfaceWithContext(ctx aws.Context, input *DetachNetworkInterfaceInput, opts ...request.Option) (*DetachNetworkInterfaceOutput, error) {
+ req, out := c.DetachNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachVolume = "DetachVolume"
// DetachVolumeRequest generates a "aws/request.Request" representing the
// client's request for the DetachVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachVolume method directly
-// instead.
+// See DetachVolume for more information on using the DetachVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachVolumeRequest method.
// req, resp := client.DetachVolumeRequest(params)
@@ -10750,27 +13740,41 @@ func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume
func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) {
req, out := c.DetachVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachVolumeWithContext is the same as DetachVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*VolumeAttachment, error) {
+ req, out := c.DetachVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachVpnGateway = "DetachVpnGateway"
// DetachVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DetachVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachVpnGateway method directly
-// instead.
+// See DetachVpnGateway for more information on using the DetachVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachVpnGatewayRequest method.
// req, resp := client.DetachVpnGatewayRequest(params)
@@ -10819,27 +13823,41 @@ func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway
func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) {
req, out := c.DetachVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachVpnGatewayWithContext is the same as DetachVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachVpnGatewayWithContext(ctx aws.Context, input *DetachVpnGatewayInput, opts ...request.Option) (*DetachVpnGatewayOutput, error) {
+ req, out := c.DetachVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation"
// DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the
// client's request for the DisableVgwRoutePropagation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVgwRoutePropagation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVgwRoutePropagation method directly
-// instead.
+// See DisableVgwRoutePropagation for more information on using the DisableVgwRoutePropagation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVgwRoutePropagationRequest method.
// req, resp := client.DisableVgwRoutePropagationRequest(params)
@@ -10882,27 +13900,41 @@ func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagatio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation
func (c *EC2) DisableVgwRoutePropagation(input *DisableVgwRoutePropagationInput) (*DisableVgwRoutePropagationOutput, error) {
req, out := c.DisableVgwRoutePropagationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisableVgwRoutePropagationWithContext is the same as DisableVgwRoutePropagation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisableVgwRoutePropagation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisableVgwRoutePropagationWithContext(ctx aws.Context, input *DisableVgwRoutePropagationInput, opts ...request.Option) (*DisableVgwRoutePropagationOutput, error) {
+ req, out := c.DisableVgwRoutePropagationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisableVpcClassicLink = "DisableVpcClassicLink"
// DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the DisableVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVpcClassicLink method directly
-// instead.
+// See DisableVpcClassicLink for more information on using the DisableVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVpcClassicLinkRequest method.
// req, resp := client.DisableVpcClassicLinkRequest(params)
@@ -10943,27 +13975,41 @@ func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink
func (c *EC2) DisableVpcClassicLink(input *DisableVpcClassicLinkInput) (*DisableVpcClassicLinkOutput, error) {
req, out := c.DisableVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisableVpcClassicLinkWithContext is the same as DisableVpcClassicLink with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisableVpcClassicLink for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisableVpcClassicLinkWithContext(ctx aws.Context, input *DisableVpcClassicLinkInput, opts ...request.Option) (*DisableVpcClassicLinkOutput, error) {
+ req, out := c.DisableVpcClassicLinkRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport"
// DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVpcClassicLinkDnsSupport method directly
-// instead.
+// See DisableVpcClassicLinkDnsSupport for more information on using the DisableVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVpcClassicLinkDnsSupportRequest method.
// req, resp := client.DisableVpcClassicLinkDnsSupportRequest(params)
@@ -11007,27 +14053,41 @@ func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLin
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport
func (c *EC2) DisableVpcClassicLinkDnsSupport(input *DisableVpcClassicLinkDnsSupportInput) (*DisableVpcClassicLinkDnsSupportOutput, error) {
req, out := c.DisableVpcClassicLinkDnsSupportRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisableVpcClassicLinkDnsSupportWithContext is the same as DisableVpcClassicLinkDnsSupport with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisableVpcClassicLinkDnsSupport for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *DisableVpcClassicLinkDnsSupportInput, opts ...request.Option) (*DisableVpcClassicLinkDnsSupportOutput, error) {
+ req, out := c.DisableVpcClassicLinkDnsSupportRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateAddress = "DisassociateAddress"
// DisassociateAddressRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateAddress method directly
-// instead.
+// See DisassociateAddress for more information on using the DisassociateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateAddressRequest method.
// req, resp := client.DisassociateAddressRequest(params)
@@ -11077,27 +14137,41 @@ func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress
func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*DisassociateAddressOutput, error) {
req, out := c.DisassociateAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateAddressWithContext is the same as DisassociateAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateAddressWithContext(ctx aws.Context, input *DisassociateAddressInput, opts ...request.Option) (*DisassociateAddressOutput, error) {
+ req, out := c.DisassociateAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile"
// DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateIamInstanceProfile operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateIamInstanceProfile for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateIamInstanceProfile method directly
-// instead.
+// See DisassociateIamInstanceProfile for more information on using the DisassociateIamInstanceProfile
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateIamInstanceProfileRequest method.
// req, resp := client.DisassociateIamInstanceProfileRequest(params)
@@ -11139,27 +14213,41 @@ func (c *EC2) DisassociateIamInstanceProfileRequest(input *DisassociateIamInstan
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile
func (c *EC2) DisassociateIamInstanceProfile(input *DisassociateIamInstanceProfileInput) (*DisassociateIamInstanceProfileOutput, error) {
req, out := c.DisassociateIamInstanceProfileRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateIamInstanceProfileWithContext is the same as DisassociateIamInstanceProfile with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateIamInstanceProfile for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateIamInstanceProfileWithContext(ctx aws.Context, input *DisassociateIamInstanceProfileInput, opts ...request.Option) (*DisassociateIamInstanceProfileOutput, error) {
+ req, out := c.DisassociateIamInstanceProfileRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateRouteTable = "DisassociateRouteTable"
// DisassociateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateRouteTable method directly
-// instead.
+// See DisassociateRouteTable for more information on using the DisassociateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateRouteTableRequest method.
// req, resp := client.DisassociateRouteTableRequest(params)
@@ -11206,27 +14294,41 @@ func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable
func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*DisassociateRouteTableOutput, error) {
req, out := c.DisassociateRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateRouteTableWithContext is the same as DisassociateRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateRouteTableWithContext(ctx aws.Context, input *DisassociateRouteTableInput, opts ...request.Option) (*DisassociateRouteTableOutput, error) {
+ req, out := c.DisassociateRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock"
// DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateSubnetCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateSubnetCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateSubnetCidrBlock method directly
-// instead.
+// See DisassociateSubnetCidrBlock for more information on using the DisassociateSubnetCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateSubnetCidrBlockRequest method.
// req, resp := client.DisassociateSubnetCidrBlockRequest(params)
@@ -11268,27 +14370,41 @@ func (c *EC2) DisassociateSubnetCidrBlockRequest(input *DisassociateSubnetCidrBl
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock
func (c *EC2) DisassociateSubnetCidrBlock(input *DisassociateSubnetCidrBlockInput) (*DisassociateSubnetCidrBlockOutput, error) {
req, out := c.DisassociateSubnetCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateSubnetCidrBlockWithContext is the same as DisassociateSubnetCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateSubnetCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateSubnetCidrBlockWithContext(ctx aws.Context, input *DisassociateSubnetCidrBlockInput, opts ...request.Option) (*DisassociateSubnetCidrBlockOutput, error) {
+ req, out := c.DisassociateSubnetCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock"
// DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateVpcCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateVpcCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateVpcCidrBlock method directly
-// instead.
+// See DisassociateVpcCidrBlock for more information on using the DisassociateVpcCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateVpcCidrBlockRequest method.
// req, resp := client.DisassociateVpcCidrBlockRequest(params)
@@ -11330,27 +14446,41 @@ func (c *EC2) DisassociateVpcCidrBlockRequest(input *DisassociateVpcCidrBlockInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock
func (c *EC2) DisassociateVpcCidrBlock(input *DisassociateVpcCidrBlockInput) (*DisassociateVpcCidrBlockOutput, error) {
req, out := c.DisassociateVpcCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateVpcCidrBlockWithContext is the same as DisassociateVpcCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateVpcCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateVpcCidrBlockWithContext(ctx aws.Context, input *DisassociateVpcCidrBlockInput, opts ...request.Option) (*DisassociateVpcCidrBlockOutput, error) {
+ req, out := c.DisassociateVpcCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
// EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the
// client's request for the EnableVgwRoutePropagation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVgwRoutePropagation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVgwRoutePropagation method directly
-// instead.
+// See EnableVgwRoutePropagation for more information on using the EnableVgwRoutePropagation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVgwRoutePropagationRequest method.
// req, resp := client.EnableVgwRoutePropagationRequest(params)
@@ -11393,27 +14523,41 @@ func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation
func (c *EC2) EnableVgwRoutePropagation(input *EnableVgwRoutePropagationInput) (*EnableVgwRoutePropagationOutput, error) {
req, out := c.EnableVgwRoutePropagationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVgwRoutePropagationWithContext is the same as EnableVgwRoutePropagation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVgwRoutePropagation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVgwRoutePropagationWithContext(ctx aws.Context, input *EnableVgwRoutePropagationInput, opts ...request.Option) (*EnableVgwRoutePropagationOutput, error) {
+ req, out := c.EnableVgwRoutePropagationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVolumeIO = "EnableVolumeIO"
// EnableVolumeIORequest generates a "aws/request.Request" representing the
// client's request for the EnableVolumeIO operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVolumeIO for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVolumeIO method directly
-// instead.
+// See EnableVolumeIO for more information on using the EnableVolumeIO
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVolumeIORequest method.
// req, resp := client.EnableVolumeIORequest(params)
@@ -11456,27 +14600,41 @@ func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO
func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, error) {
req, out := c.EnableVolumeIORequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVolumeIOWithContext is the same as EnableVolumeIO with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVolumeIO for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVolumeIOWithContext(ctx aws.Context, input *EnableVolumeIOInput, opts ...request.Option) (*EnableVolumeIOOutput, error) {
+ req, out := c.EnableVolumeIORequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVpcClassicLink = "EnableVpcClassicLink"
// EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the EnableVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVpcClassicLink method directly
-// instead.
+// See EnableVpcClassicLink for more information on using the EnableVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVpcClassicLinkRequest method.
// req, resp := client.EnableVpcClassicLinkRequest(params)
@@ -11522,27 +14680,41 @@ func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink
func (c *EC2) EnableVpcClassicLink(input *EnableVpcClassicLinkInput) (*EnableVpcClassicLinkOutput, error) {
req, out := c.EnableVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVpcClassicLinkWithContext is the same as EnableVpcClassicLink with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVpcClassicLink for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVpcClassicLinkWithContext(ctx aws.Context, input *EnableVpcClassicLinkInput, opts ...request.Option) (*EnableVpcClassicLinkOutput, error) {
+ req, out := c.EnableVpcClassicLinkRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport"
// EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVpcClassicLinkDnsSupport method directly
-// instead.
+// See EnableVpcClassicLinkDnsSupport for more information on using the EnableVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVpcClassicLinkDnsSupportRequest method.
// req, resp := client.EnableVpcClassicLinkDnsSupportRequest(params)
@@ -11588,27 +14760,41 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkD
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport
func (c *EC2) EnableVpcClassicLinkDnsSupport(input *EnableVpcClassicLinkDnsSupportInput) (*EnableVpcClassicLinkDnsSupportOutput, error) {
req, out := c.EnableVpcClassicLinkDnsSupportRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVpcClassicLinkDnsSupportWithContext is the same as EnableVpcClassicLinkDnsSupport with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVpcClassicLinkDnsSupport for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *EnableVpcClassicLinkDnsSupportInput, opts ...request.Option) (*EnableVpcClassicLinkDnsSupportOutput, error) {
+ req, out := c.EnableVpcClassicLinkDnsSupportRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetConsoleOutput = "GetConsoleOutput"
// GetConsoleOutputRequest generates a "aws/request.Request" representing the
// client's request for the GetConsoleOutput operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetConsoleOutput for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetConsoleOutput method directly
-// instead.
+// See GetConsoleOutput for more information on using the GetConsoleOutput
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetConsoleOutputRequest method.
// req, resp := client.GetConsoleOutputRequest(params)
@@ -11665,27 +14851,41 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput
func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputOutput, error) {
req, out := c.GetConsoleOutputRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetConsoleOutputWithContext is the same as GetConsoleOutput with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetConsoleOutput for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetConsoleOutputWithContext(ctx aws.Context, input *GetConsoleOutputInput, opts ...request.Option) (*GetConsoleOutputOutput, error) {
+ req, out := c.GetConsoleOutputRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetConsoleScreenshot = "GetConsoleScreenshot"
// GetConsoleScreenshotRequest generates a "aws/request.Request" representing the
// client's request for the GetConsoleScreenshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetConsoleScreenshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetConsoleScreenshot method directly
-// instead.
+// See GetConsoleScreenshot for more information on using the GetConsoleScreenshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetConsoleScreenshotRequest method.
// req, resp := client.GetConsoleScreenshotRequest(params)
@@ -11727,27 +14927,41 @@ func (c *EC2) GetConsoleScreenshotRequest(input *GetConsoleScreenshotInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot
func (c *EC2) GetConsoleScreenshot(input *GetConsoleScreenshotInput) (*GetConsoleScreenshotOutput, error) {
req, out := c.GetConsoleScreenshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetConsoleScreenshotWithContext is the same as GetConsoleScreenshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetConsoleScreenshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetConsoleScreenshotWithContext(ctx aws.Context, input *GetConsoleScreenshotInput, opts ...request.Option) (*GetConsoleScreenshotOutput, error) {
+ req, out := c.GetConsoleScreenshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview"
// GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the
// client's request for the GetHostReservationPurchasePreview operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetHostReservationPurchasePreview for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetHostReservationPurchasePreview method directly
-// instead.
+// See GetHostReservationPurchasePreview for more information on using the GetHostReservationPurchasePreview
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetHostReservationPurchasePreviewRequest method.
// req, resp := client.GetHostReservationPurchasePreviewRequest(params)
@@ -11792,27 +15006,41 @@ func (c *EC2) GetHostReservationPurchasePreviewRequest(input *GetHostReservation
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview
func (c *EC2) GetHostReservationPurchasePreview(input *GetHostReservationPurchasePreviewInput) (*GetHostReservationPurchasePreviewOutput, error) {
req, out := c.GetHostReservationPurchasePreviewRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetHostReservationPurchasePreviewWithContext is the same as GetHostReservationPurchasePreview with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetHostReservationPurchasePreview for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetHostReservationPurchasePreviewWithContext(ctx aws.Context, input *GetHostReservationPurchasePreviewInput, opts ...request.Option) (*GetHostReservationPurchasePreviewOutput, error) {
+ req, out := c.GetHostReservationPurchasePreviewRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetPasswordData = "GetPasswordData"
// GetPasswordDataRequest generates a "aws/request.Request" representing the
// client's request for the GetPasswordData operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetPasswordData for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetPasswordData method directly
-// instead.
+// See GetPasswordData for more information on using the GetPasswordData
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetPasswordDataRequest method.
// req, resp := client.GetPasswordDataRequest(params)
@@ -11865,27 +15093,41 @@ func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData
func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutput, error) {
req, out := c.GetPasswordDataRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetPasswordDataWithContext is the same as GetPasswordData with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetPasswordData for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetPasswordDataWithContext(ctx aws.Context, input *GetPasswordDataInput, opts ...request.Option) (*GetPasswordDataOutput, error) {
+ req, out := c.GetPasswordDataRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote"
// GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the
// client's request for the GetReservedInstancesExchangeQuote operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetReservedInstancesExchangeQuote for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetReservedInstancesExchangeQuote method directly
-// instead.
+// See GetReservedInstancesExchangeQuote for more information on using the GetReservedInstancesExchangeQuote
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetReservedInstancesExchangeQuoteRequest method.
// req, resp := client.GetReservedInstancesExchangeQuoteRequest(params)
@@ -11927,27 +15169,41 @@ func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstanc
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote
func (c *EC2) GetReservedInstancesExchangeQuote(input *GetReservedInstancesExchangeQuoteInput) (*GetReservedInstancesExchangeQuoteOutput, error) {
req, out := c.GetReservedInstancesExchangeQuoteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetReservedInstancesExchangeQuoteWithContext is the same as GetReservedInstancesExchangeQuote with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetReservedInstancesExchangeQuote for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetReservedInstancesExchangeQuoteWithContext(ctx aws.Context, input *GetReservedInstancesExchangeQuoteInput, opts ...request.Option) (*GetReservedInstancesExchangeQuoteOutput, error) {
+ req, out := c.GetReservedInstancesExchangeQuoteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportImage = "ImportImage"
// ImportImageRequest generates a "aws/request.Request" representing the
// client's request for the ImportImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportImage method directly
-// instead.
+// See ImportImage for more information on using the ImportImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportImageRequest method.
// req, resp := client.ImportImageRequest(params)
@@ -11990,27 +15246,41 @@ func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage
func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) {
req, out := c.ImportImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportImageWithContext is the same as ImportImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportImageWithContext(ctx aws.Context, input *ImportImageInput, opts ...request.Option) (*ImportImageOutput, error) {
+ req, out := c.ImportImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportInstance = "ImportInstance"
// ImportInstanceRequest generates a "aws/request.Request" representing the
// client's request for the ImportInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportInstance method directly
-// instead.
+// See ImportInstance for more information on using the ImportInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportInstanceRequest method.
// req, resp := client.ImportInstanceRequest(params)
@@ -12056,27 +15326,41 @@ func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance
func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, error) {
req, out := c.ImportInstanceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportInstanceWithContext is the same as ImportInstance with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportInstance for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportInstanceWithContext(ctx aws.Context, input *ImportInstanceInput, opts ...request.Option) (*ImportInstanceOutput, error) {
+ req, out := c.ImportInstanceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportKeyPair = "ImportKeyPair"
// ImportKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the ImportKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportKeyPair method directly
-// instead.
+// See ImportKeyPair for more information on using the ImportKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportKeyPairRequest method.
// req, resp := client.ImportKeyPairRequest(params)
@@ -12123,27 +15407,41 @@ func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair
func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) {
req, out := c.ImportKeyPairRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportKeyPair for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) {
+ req, out := c.ImportKeyPairRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportSnapshot = "ImportSnapshot"
// ImportSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the ImportSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportSnapshot method directly
-// instead.
+// See ImportSnapshot for more information on using the ImportSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportSnapshotRequest method.
// req, resp := client.ImportSnapshotRequest(params)
@@ -12183,27 +15481,41 @@ func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot
func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, error) {
req, out := c.ImportSnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportSnapshotWithContext is the same as ImportSnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportSnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportSnapshotWithContext(ctx aws.Context, input *ImportSnapshotInput, opts ...request.Option) (*ImportSnapshotOutput, error) {
+ req, out := c.ImportSnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportVolume = "ImportVolume"
// ImportVolumeRequest generates a "aws/request.Request" representing the
// client's request for the ImportVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportVolume method directly
-// instead.
+// See ImportVolume for more information on using the ImportVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportVolumeRequest method.
// req, resp := client.ImportVolumeRequest(params)
@@ -12247,27 +15559,41 @@ func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume
func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error) {
req, out := c.ImportVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportVolumeWithContext is the same as ImportVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, opts ...request.Option) (*ImportVolumeOutput, error) {
+ req, out := c.ImportVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyHosts = "ModifyHosts"
// ModifyHostsRequest generates a "aws/request.Request" representing the
// client's request for the ModifyHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyHosts method directly
-// instead.
+// See ModifyHosts for more information on using the ModifyHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyHostsRequest method.
// req, resp := client.ModifyHostsRequest(params)
@@ -12313,27 +15639,41 @@ func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts
func (c *EC2) ModifyHosts(input *ModifyHostsInput) (*ModifyHostsOutput, error) {
req, out := c.ModifyHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyHostsWithContext is the same as ModifyHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyHostsWithContext(ctx aws.Context, input *ModifyHostsInput, opts ...request.Option) (*ModifyHostsOutput, error) {
+ req, out := c.ModifyHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyIdFormat = "ModifyIdFormat"
// ModifyIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the ModifyIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyIdFormat method directly
-// instead.
+// See ModifyIdFormat for more information on using the ModifyIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyIdFormatRequest method.
// req, resp := client.ModifyIdFormatRequest(params)
@@ -12389,27 +15729,41 @@ func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat
func (c *EC2) ModifyIdFormat(input *ModifyIdFormatInput) (*ModifyIdFormatOutput, error) {
req, out := c.ModifyIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyIdFormatWithContext is the same as ModifyIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyIdFormatWithContext(ctx aws.Context, input *ModifyIdFormatInput, opts ...request.Option) (*ModifyIdFormatOutput, error) {
+ req, out := c.ModifyIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyIdentityIdFormat = "ModifyIdentityIdFormat"
// ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the ModifyIdentityIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyIdentityIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyIdentityIdFormat method directly
-// instead.
+// See ModifyIdentityIdFormat for more information on using the ModifyIdentityIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyIdentityIdFormatRequest method.
// req, resp := client.ModifyIdentityIdFormatRequest(params)
@@ -12465,27 +15819,41 @@ func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat
func (c *EC2) ModifyIdentityIdFormat(input *ModifyIdentityIdFormatInput) (*ModifyIdentityIdFormatOutput, error) {
req, out := c.ModifyIdentityIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyIdentityIdFormatWithContext is the same as ModifyIdentityIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyIdentityIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyIdentityIdFormatWithContext(ctx aws.Context, input *ModifyIdentityIdFormatInput, opts ...request.Option) (*ModifyIdentityIdFormatOutput, error) {
+ req, out := c.ModifyIdentityIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyImageAttribute = "ModifyImageAttribute"
// ModifyImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyImageAttribute method directly
-// instead.
+// See ModifyImageAttribute for more information on using the ModifyImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyImageAttributeRequest method.
// req, resp := client.ModifyImageAttributeRequest(params)
@@ -12536,27 +15904,41 @@ func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute
func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyImageAttributeOutput, error) {
req, out := c.ModifyImageAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyImageAttributeWithContext is the same as ModifyImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyImageAttributeWithContext(ctx aws.Context, input *ModifyImageAttributeInput, opts ...request.Option) (*ModifyImageAttributeOutput, error) {
+ req, out := c.ModifyImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyInstanceAttribute = "ModifyInstanceAttribute"
// ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyInstanceAttribute method directly
-// instead.
+// See ModifyInstanceAttribute for more information on using the ModifyInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyInstanceAttributeRequest method.
// req, resp := client.ModifyInstanceAttributeRequest(params)
@@ -12603,27 +15985,41 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute
func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*ModifyInstanceAttributeOutput, error) {
req, out := c.ModifyInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyInstanceAttributeWithContext is the same as ModifyInstanceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyInstanceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyInstanceAttributeWithContext(ctx aws.Context, input *ModifyInstanceAttributeInput, opts ...request.Option) (*ModifyInstanceAttributeOutput, error) {
+ req, out := c.ModifyInstanceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyInstancePlacement = "ModifyInstancePlacement"
// ModifyInstancePlacementRequest generates a "aws/request.Request" representing the
// client's request for the ModifyInstancePlacement operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyInstancePlacement for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyInstancePlacement method directly
-// instead.
+// See ModifyInstancePlacement for more information on using the ModifyInstancePlacement
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyInstancePlacementRequest method.
// req, resp := client.ModifyInstancePlacementRequest(params)
@@ -12681,27 +16077,41 @@ func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement
func (c *EC2) ModifyInstancePlacement(input *ModifyInstancePlacementInput) (*ModifyInstancePlacementOutput, error) {
req, out := c.ModifyInstancePlacementRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyInstancePlacementWithContext is the same as ModifyInstancePlacement with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyInstancePlacement for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyInstancePlacementWithContext(ctx aws.Context, input *ModifyInstancePlacementInput, opts ...request.Option) (*ModifyInstancePlacementOutput, error) {
+ req, out := c.ModifyInstancePlacementRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
// ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyNetworkInterfaceAttribute method directly
-// instead.
+// See ModifyNetworkInterfaceAttribute for more information on using the ModifyNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyNetworkInterfaceAttributeRequest method.
// req, resp := client.ModifyNetworkInterfaceAttributeRequest(params)
@@ -12744,27 +16154,41 @@ func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfa
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute
func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttributeInput) (*ModifyNetworkInterfaceAttributeOutput, error) {
req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyNetworkInterfaceAttributeWithContext is the same as ModifyNetworkInterfaceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyNetworkInterfaceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyNetworkInterfaceAttributeWithContext(ctx aws.Context, input *ModifyNetworkInterfaceAttributeInput, opts ...request.Option) (*ModifyNetworkInterfaceAttributeOutput, error) {
+ req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyReservedInstances = "ModifyReservedInstances"
// ModifyReservedInstancesRequest generates a "aws/request.Request" representing the
// client's request for the ModifyReservedInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyReservedInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyReservedInstances method directly
-// instead.
+// See ModifyReservedInstances for more information on using the ModifyReservedInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyReservedInstancesRequest method.
// req, resp := client.ModifyReservedInstancesRequest(params)
@@ -12810,27 +16234,41 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances
func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*ModifyReservedInstancesOutput, error) {
req, out := c.ModifyReservedInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyReservedInstancesWithContext is the same as ModifyReservedInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyReservedInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyReservedInstancesWithContext(ctx aws.Context, input *ModifyReservedInstancesInput, opts ...request.Option) (*ModifyReservedInstancesOutput, error) {
+ req, out := c.ModifyReservedInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifySnapshotAttribute = "ModifySnapshotAttribute"
// ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifySnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySnapshotAttribute method directly
-// instead.
+// See ModifySnapshotAttribute for more information on using the ModifySnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySnapshotAttributeRequest method.
// req, resp := client.ModifySnapshotAttributeRequest(params)
@@ -12884,27 +16322,41 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute
func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*ModifySnapshotAttributeOutput, error) {
req, out := c.ModifySnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifySnapshotAttributeWithContext is the same as ModifySnapshotAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifySnapshotAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifySnapshotAttributeWithContext(ctx aws.Context, input *ModifySnapshotAttributeInput, opts ...request.Option) (*ModifySnapshotAttributeOutput, error) {
+ req, out := c.ModifySnapshotAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifySpotFleetRequest = "ModifySpotFleetRequest"
// ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the
// client's request for the ModifySpotFleetRequest operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySpotFleetRequest for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySpotFleetRequest method directly
-// instead.
+// See ModifySpotFleetRequest for more information on using the ModifySpotFleetRequest
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySpotFleetRequestRequest method.
// req, resp := client.ModifySpotFleetRequestRequest(params)
@@ -12963,27 +16415,41 @@ func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest
func (c *EC2) ModifySpotFleetRequest(input *ModifySpotFleetRequestInput) (*ModifySpotFleetRequestOutput, error) {
req, out := c.ModifySpotFleetRequestRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifySpotFleetRequestWithContext is the same as ModifySpotFleetRequest with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifySpotFleetRequest for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifySpotFleetRequestWithContext(ctx aws.Context, input *ModifySpotFleetRequestInput, opts ...request.Option) (*ModifySpotFleetRequestOutput, error) {
+ req, out := c.ModifySpotFleetRequestRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifySubnetAttribute = "ModifySubnetAttribute"
// ModifySubnetAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifySubnetAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySubnetAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySubnetAttribute method directly
-// instead.
+// See ModifySubnetAttribute for more information on using the ModifySubnetAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySubnetAttributeRequest method.
// req, resp := client.ModifySubnetAttributeRequest(params)
@@ -13025,27 +16491,41 @@ func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute
func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifySubnetAttributeOutput, error) {
req, out := c.ModifySubnetAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifySubnetAttributeWithContext is the same as ModifySubnetAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifySubnetAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifySubnetAttributeWithContext(ctx aws.Context, input *ModifySubnetAttributeInput, opts ...request.Option) (*ModifySubnetAttributeOutput, error) {
+ req, out := c.ModifySubnetAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVolume = "ModifyVolume"
// ModifyVolumeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVolume method directly
-// instead.
+// See ModifyVolume for more information on using the ModifyVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVolumeRequest method.
// req, resp := client.ModifyVolumeRequest(params)
@@ -13117,27 +16597,41 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume
func (c *EC2) ModifyVolume(input *ModifyVolumeInput) (*ModifyVolumeOutput, error) {
req, out := c.ModifyVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVolumeWithContext is the same as ModifyVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVolumeWithContext(ctx aws.Context, input *ModifyVolumeInput, opts ...request.Option) (*ModifyVolumeOutput, error) {
+ req, out := c.ModifyVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVolumeAttribute = "ModifyVolumeAttribute"
// ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVolumeAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVolumeAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVolumeAttribute method directly
-// instead.
+// See ModifyVolumeAttribute for more information on using the ModifyVolumeAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVolumeAttributeRequest method.
// req, resp := client.ModifyVolumeAttributeRequest(params)
@@ -13188,27 +16682,41 @@ func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute
func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyVolumeAttributeOutput, error) {
req, out := c.ModifyVolumeAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVolumeAttributeWithContext is the same as ModifyVolumeAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVolumeAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVolumeAttributeWithContext(ctx aws.Context, input *ModifyVolumeAttributeInput, opts ...request.Option) (*ModifyVolumeAttributeOutput, error) {
+ req, out := c.ModifyVolumeAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVpcAttribute = "ModifyVpcAttribute"
// ModifyVpcAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcAttribute method directly
-// instead.
+// See ModifyVpcAttribute for more information on using the ModifyVpcAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcAttributeRequest method.
// req, resp := client.ModifyVpcAttributeRequest(params)
@@ -13250,27 +16758,41 @@ func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute
func (c *EC2) ModifyVpcAttribute(input *ModifyVpcAttributeInput) (*ModifyVpcAttributeOutput, error) {
req, out := c.ModifyVpcAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVpcAttributeWithContext is the same as ModifyVpcAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcAttributeWithContext(ctx aws.Context, input *ModifyVpcAttributeInput, opts ...request.Option) (*ModifyVpcAttributeOutput, error) {
+ req, out := c.ModifyVpcAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVpcEndpoint = "ModifyVpcEndpoint"
// ModifyVpcEndpointRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcEndpoint operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcEndpoint for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcEndpoint method directly
-// instead.
+// See ModifyVpcEndpoint for more information on using the ModifyVpcEndpoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcEndpointRequest method.
// req, resp := client.ModifyVpcEndpointRequest(params)
@@ -13312,27 +16834,41 @@ func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint
func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpointOutput, error) {
req, out := c.ModifyVpcEndpointRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVpcEndpointWithContext is the same as ModifyVpcEndpoint with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcEndpoint for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcEndpointWithContext(ctx aws.Context, input *ModifyVpcEndpointInput, opts ...request.Option) (*ModifyVpcEndpointOutput, error) {
+ req, out := c.ModifyVpcEndpointRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions"
// ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcPeeringConnectionOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcPeeringConnectionOptions method directly
-// instead.
+// See ModifyVpcPeeringConnectionOptions for more information on using the ModifyVpcPeeringConnectionOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcPeeringConnectionOptionsRequest method.
// req, resp := client.ModifyVpcPeeringConnectionOptionsRequest(params)
@@ -13391,27 +16927,41 @@ func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringCo
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions
func (c *EC2) ModifyVpcPeeringConnectionOptions(input *ModifyVpcPeeringConnectionOptionsInput) (*ModifyVpcPeeringConnectionOptionsOutput, error) {
req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVpcPeeringConnectionOptionsWithContext is the same as ModifyVpcPeeringConnectionOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcPeeringConnectionOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcPeeringConnectionOptionsWithContext(ctx aws.Context, input *ModifyVpcPeeringConnectionOptionsInput, opts ...request.Option) (*ModifyVpcPeeringConnectionOptionsOutput, error) {
+ req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opMonitorInstances = "MonitorInstances"
// MonitorInstancesRequest generates a "aws/request.Request" representing the
// client's request for the MonitorInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See MonitorInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the MonitorInstances method directly
-// instead.
+// See MonitorInstances for more information on using the MonitorInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the MonitorInstancesRequest method.
// req, resp := client.MonitorInstancesRequest(params)
@@ -13456,27 +17006,41 @@ func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances
func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesOutput, error) {
req, out := c.MonitorInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// MonitorInstancesWithContext is the same as MonitorInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See MonitorInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) MonitorInstancesWithContext(ctx aws.Context, input *MonitorInstancesInput, opts ...request.Option) (*MonitorInstancesOutput, error) {
+ req, out := c.MonitorInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opMoveAddressToVpc = "MoveAddressToVpc"
// MoveAddressToVpcRequest generates a "aws/request.Request" representing the
// client's request for the MoveAddressToVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See MoveAddressToVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the MoveAddressToVpc method directly
-// instead.
+// See MoveAddressToVpc for more information on using the MoveAddressToVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the MoveAddressToVpcRequest method.
// req, resp := client.MoveAddressToVpcRequest(params)
@@ -13522,27 +17086,41 @@ func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc
func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) {
req, out := c.MoveAddressToVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// MoveAddressToVpcWithContext is the same as MoveAddressToVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See MoveAddressToVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) MoveAddressToVpcWithContext(ctx aws.Context, input *MoveAddressToVpcInput, opts ...request.Option) (*MoveAddressToVpcOutput, error) {
+ req, out := c.MoveAddressToVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPurchaseHostReservation = "PurchaseHostReservation"
// PurchaseHostReservationRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseHostReservation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseHostReservation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseHostReservation method directly
-// instead.
+// See PurchaseHostReservation for more information on using the PurchaseHostReservation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseHostReservationRequest method.
// req, resp := client.PurchaseHostReservationRequest(params)
@@ -13585,27 +17163,41 @@ func (c *EC2) PurchaseHostReservationRequest(input *PurchaseHostReservationInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation
func (c *EC2) PurchaseHostReservation(input *PurchaseHostReservationInput) (*PurchaseHostReservationOutput, error) {
req, out := c.PurchaseHostReservationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PurchaseHostReservationWithContext is the same as PurchaseHostReservation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PurchaseHostReservation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) PurchaseHostReservationWithContext(ctx aws.Context, input *PurchaseHostReservationInput, opts ...request.Option) (*PurchaseHostReservationOutput, error) {
+ req, out := c.PurchaseHostReservationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
// PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseReservedInstancesOffering operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseReservedInstancesOffering for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseReservedInstancesOffering method directly
-// instead.
+// See PurchaseReservedInstancesOffering for more information on using the PurchaseReservedInstancesOffering
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseReservedInstancesOfferingRequest method.
// req, resp := client.PurchaseReservedInstancesOfferingRequest(params)
@@ -13654,27 +17246,41 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering
func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstancesOfferingInput) (*PurchaseReservedInstancesOfferingOutput, error) {
req, out := c.PurchaseReservedInstancesOfferingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PurchaseReservedInstancesOfferingWithContext is the same as PurchaseReservedInstancesOffering with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PurchaseReservedInstancesOffering for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) PurchaseReservedInstancesOfferingWithContext(ctx aws.Context, input *PurchaseReservedInstancesOfferingInput, opts ...request.Option) (*PurchaseReservedInstancesOfferingOutput, error) {
+ req, out := c.PurchaseReservedInstancesOfferingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPurchaseScheduledInstances = "PurchaseScheduledInstances"
// PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseScheduledInstances method directly
-// instead.
+// See PurchaseScheduledInstances for more information on using the PurchaseScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseScheduledInstancesRequest method.
// req, resp := client.PurchaseScheduledInstancesRequest(params)
@@ -13723,27 +17329,41 @@ func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstance
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances
func (c *EC2) PurchaseScheduledInstances(input *PurchaseScheduledInstancesInput) (*PurchaseScheduledInstancesOutput, error) {
req, out := c.PurchaseScheduledInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PurchaseScheduledInstancesWithContext is the same as PurchaseScheduledInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PurchaseScheduledInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) PurchaseScheduledInstancesWithContext(ctx aws.Context, input *PurchaseScheduledInstancesInput, opts ...request.Option) (*PurchaseScheduledInstancesOutput, error) {
+ req, out := c.PurchaseScheduledInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRebootInstances = "RebootInstances"
// RebootInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RebootInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RebootInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RebootInstances method directly
-// instead.
+// See RebootInstances for more information on using the RebootInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RebootInstancesRequest method.
// req, resp := client.RebootInstancesRequest(params)
@@ -13795,27 +17415,41 @@ func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances
func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutput, error) {
req, out := c.RebootInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RebootInstancesWithContext is the same as RebootInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RebootInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RebootInstancesWithContext(ctx aws.Context, input *RebootInstancesInput, opts ...request.Option) (*RebootInstancesOutput, error) {
+ req, out := c.RebootInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRegisterImage = "RegisterImage"
// RegisterImageRequest generates a "aws/request.Request" representing the
// client's request for the RegisterImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RegisterImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RegisterImage method directly
-// instead.
+// See RegisterImage for more information on using the RegisterImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RegisterImageRequest method.
// req, resp := client.RegisterImageRequest(params)
@@ -13854,8 +17488,8 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ
//
// You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from
// a snapshot of a root device volume. You specify the snapshot using the block
-// device mapping. For more information, see Launching an Instance from a Snapshot
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_LaunchingInstanceFromSnapshot.html)
+// device mapping. For more information, see Launching a Linux Instance from
+// a Backup (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// You can't register an image where a secondary (non-root) snapshot has AWS
@@ -13883,27 +17517,41 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage
func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, error) {
req, out := c.RegisterImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RegisterImageWithContext is the same as RegisterImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RegisterImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RegisterImageWithContext(ctx aws.Context, input *RegisterImageInput, opts ...request.Option) (*RegisterImageOutput, error) {
+ req, out := c.RegisterImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection"
// RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the RejectVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RejectVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RejectVpcPeeringConnection method directly
-// instead.
+// See RejectVpcPeeringConnection for more information on using the RejectVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RejectVpcPeeringConnectionRequest method.
// req, resp := client.RejectVpcPeeringConnectionRequest(params)
@@ -13947,27 +17595,41 @@ func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection
func (c *EC2) RejectVpcPeeringConnection(input *RejectVpcPeeringConnectionInput) (*RejectVpcPeeringConnectionOutput, error) {
req, out := c.RejectVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RejectVpcPeeringConnectionWithContext is the same as RejectVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RejectVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RejectVpcPeeringConnectionWithContext(ctx aws.Context, input *RejectVpcPeeringConnectionInput, opts ...request.Option) (*RejectVpcPeeringConnectionOutput, error) {
+ req, out := c.RejectVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReleaseAddress = "ReleaseAddress"
// ReleaseAddressRequest generates a "aws/request.Request" representing the
// client's request for the ReleaseAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReleaseAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReleaseAddress method directly
-// instead.
+// See ReleaseAddress for more information on using the ReleaseAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReleaseAddressRequest method.
// req, resp := client.ReleaseAddressRequest(params)
@@ -14023,27 +17685,41 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress
func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, error) {
req, out := c.ReleaseAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReleaseAddressWithContext is the same as ReleaseAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReleaseAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReleaseAddressWithContext(ctx aws.Context, input *ReleaseAddressInput, opts ...request.Option) (*ReleaseAddressOutput, error) {
+ req, out := c.ReleaseAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReleaseHosts = "ReleaseHosts"
// ReleaseHostsRequest generates a "aws/request.Request" representing the
// client's request for the ReleaseHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReleaseHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReleaseHosts method directly
-// instead.
+// See ReleaseHosts for more information on using the ReleaseHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReleaseHostsRequest method.
// req, resp := client.ReleaseHostsRequest(params)
@@ -14094,27 +17770,41 @@ func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts
func (c *EC2) ReleaseHosts(input *ReleaseHostsInput) (*ReleaseHostsOutput, error) {
req, out := c.ReleaseHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReleaseHostsWithContext is the same as ReleaseHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReleaseHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReleaseHostsWithContext(ctx aws.Context, input *ReleaseHostsInput, opts ...request.Option) (*ReleaseHostsOutput, error) {
+ req, out := c.ReleaseHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssociation"
// ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceIamInstanceProfileAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceIamInstanceProfileAssociation method directly
-// instead.
+// See ReplaceIamInstanceProfileAssociation for more information on using the ReplaceIamInstanceProfileAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceIamInstanceProfileAssociationRequest method.
// req, resp := client.ReplaceIamInstanceProfileAssociationRequest(params)
@@ -14159,27 +17849,41 @@ func (c *EC2) ReplaceIamInstanceProfileAssociationRequest(input *ReplaceIamInsta
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation
func (c *EC2) ReplaceIamInstanceProfileAssociation(input *ReplaceIamInstanceProfileAssociationInput) (*ReplaceIamInstanceProfileAssociationOutput, error) {
req, out := c.ReplaceIamInstanceProfileAssociationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceIamInstanceProfileAssociationWithContext is the same as ReplaceIamInstanceProfileAssociation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceIamInstanceProfileAssociation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceIamInstanceProfileAssociationWithContext(ctx aws.Context, input *ReplaceIamInstanceProfileAssociationInput, opts ...request.Option) (*ReplaceIamInstanceProfileAssociationOutput, error) {
+ req, out := c.ReplaceIamInstanceProfileAssociationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation"
// ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceNetworkAclAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceNetworkAclAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceNetworkAclAssociation method directly
-// instead.
+// See ReplaceNetworkAclAssociation for more information on using the ReplaceNetworkAclAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceNetworkAclAssociationRequest method.
// req, resp := client.ReplaceNetworkAclAssociationRequest(params)
@@ -14222,27 +17926,41 @@ func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssoci
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation
func (c *EC2) ReplaceNetworkAclAssociation(input *ReplaceNetworkAclAssociationInput) (*ReplaceNetworkAclAssociationOutput, error) {
req, out := c.ReplaceNetworkAclAssociationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceNetworkAclAssociationWithContext is the same as ReplaceNetworkAclAssociation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceNetworkAclAssociation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceNetworkAclAssociationWithContext(ctx aws.Context, input *ReplaceNetworkAclAssociationInput, opts ...request.Option) (*ReplaceNetworkAclAssociationOutput, error) {
+ req, out := c.ReplaceNetworkAclAssociationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry"
// ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceNetworkAclEntry method directly
-// instead.
+// See ReplaceNetworkAclEntry for more information on using the ReplaceNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceNetworkAclEntryRequest method.
// req, resp := client.ReplaceNetworkAclEntryRequest(params)
@@ -14286,27 +18004,41 @@ func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry
func (c *EC2) ReplaceNetworkAclEntry(input *ReplaceNetworkAclEntryInput) (*ReplaceNetworkAclEntryOutput, error) {
req, out := c.ReplaceNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceNetworkAclEntryWithContext is the same as ReplaceNetworkAclEntry with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceNetworkAclEntry for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceNetworkAclEntryWithContext(ctx aws.Context, input *ReplaceNetworkAclEntryInput, opts ...request.Option) (*ReplaceNetworkAclEntryOutput, error) {
+ req, out := c.ReplaceNetworkAclEntryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceRoute = "ReplaceRoute"
// ReplaceRouteRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceRoute method directly
-// instead.
+// See ReplaceRoute for more information on using the ReplaceRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceRouteRequest method.
// req, resp := client.ReplaceRouteRequest(params)
@@ -14354,27 +18086,41 @@ func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute
func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error) {
req, out := c.ReplaceRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceRouteWithContext is the same as ReplaceRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceRouteWithContext(ctx aws.Context, input *ReplaceRouteInput, opts ...request.Option) (*ReplaceRouteOutput, error) {
+ req, out := c.ReplaceRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
// ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceRouteTableAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceRouteTableAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceRouteTableAssociation method directly
-// instead.
+// See ReplaceRouteTableAssociation for more information on using the ReplaceRouteTableAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceRouteTableAssociationRequest method.
// req, resp := client.ReplaceRouteTableAssociationRequest(params)
@@ -14422,27 +18168,41 @@ func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssoci
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation
func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationInput) (*ReplaceRouteTableAssociationOutput, error) {
req, out := c.ReplaceRouteTableAssociationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceRouteTableAssociationWithContext is the same as ReplaceRouteTableAssociation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceRouteTableAssociation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceRouteTableAssociationWithContext(ctx aws.Context, input *ReplaceRouteTableAssociationInput, opts ...request.Option) (*ReplaceRouteTableAssociationOutput, error) {
+ req, out := c.ReplaceRouteTableAssociationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReportInstanceStatus = "ReportInstanceStatus"
// ReportInstanceStatusRequest generates a "aws/request.Request" representing the
// client's request for the ReportInstanceStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReportInstanceStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReportInstanceStatus method directly
-// instead.
+// See ReportInstanceStatus for more information on using the ReportInstanceStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReportInstanceStatusRequest method.
// req, resp := client.ReportInstanceStatusRequest(params)
@@ -14490,27 +18250,41 @@ func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus
func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportInstanceStatusOutput, error) {
req, out := c.ReportInstanceStatusRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReportInstanceStatusWithContext is the same as ReportInstanceStatus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReportInstanceStatus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReportInstanceStatusWithContext(ctx aws.Context, input *ReportInstanceStatusInput, opts ...request.Option) (*ReportInstanceStatusOutput, error) {
+ req, out := c.ReportInstanceStatusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRequestSpotFleet = "RequestSpotFleet"
// RequestSpotFleetRequest generates a "aws/request.Request" representing the
// client's request for the RequestSpotFleet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RequestSpotFleet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RequestSpotFleet method directly
-// instead.
+// See RequestSpotFleet for more information on using the RequestSpotFleet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RequestSpotFleetRequest method.
// req, resp := client.RequestSpotFleetRequest(params)
@@ -14566,27 +18340,41 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet
func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) {
req, out := c.RequestSpotFleetRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RequestSpotFleetWithContext is the same as RequestSpotFleet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RequestSpotFleet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RequestSpotFleetWithContext(ctx aws.Context, input *RequestSpotFleetInput, opts ...request.Option) (*RequestSpotFleetOutput, error) {
+ req, out := c.RequestSpotFleetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRequestSpotInstances = "RequestSpotInstances"
// RequestSpotInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RequestSpotInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RequestSpotInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RequestSpotInstances method directly
-// instead.
+// See RequestSpotInstances for more information on using the RequestSpotInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RequestSpotInstancesRequest method.
// req, resp := client.RequestSpotInstancesRequest(params)
@@ -14631,27 +18419,41 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances
func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) {
req, out := c.RequestSpotInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RequestSpotInstancesWithContext is the same as RequestSpotInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RequestSpotInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RequestSpotInstancesWithContext(ctx aws.Context, input *RequestSpotInstancesInput, opts ...request.Option) (*RequestSpotInstancesOutput, error) {
+ req, out := c.RequestSpotInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetImageAttribute = "ResetImageAttribute"
// ResetImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetImageAttribute method directly
-// instead.
+// See ResetImageAttribute for more information on using the ResetImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetImageAttributeRequest method.
// req, resp := client.ResetImageAttributeRequest(params)
@@ -14695,27 +18497,41 @@ func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute
func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageAttributeOutput, error) {
req, out := c.ResetImageAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetImageAttributeWithContext is the same as ResetImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetImageAttributeWithContext(ctx aws.Context, input *ResetImageAttributeInput, opts ...request.Option) (*ResetImageAttributeOutput, error) {
+ req, out := c.ResetImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetInstanceAttribute = "ResetInstanceAttribute"
// ResetInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetInstanceAttribute method directly
-// instead.
+// See ResetInstanceAttribute for more information on using the ResetInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetInstanceAttributeRequest method.
// req, resp := client.ResetInstanceAttributeRequest(params)
@@ -14765,27 +18581,41 @@ func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute
func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*ResetInstanceAttributeOutput, error) {
req, out := c.ResetInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetInstanceAttributeWithContext is the same as ResetInstanceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetInstanceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetInstanceAttributeWithContext(ctx aws.Context, input *ResetInstanceAttributeInput, opts ...request.Option) (*ResetInstanceAttributeOutput, error) {
+ req, out := c.ResetInstanceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
// ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetNetworkInterfaceAttribute method directly
-// instead.
+// See ResetNetworkInterfaceAttribute for more information on using the ResetNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetNetworkInterfaceAttributeRequest method.
// req, resp := client.ResetNetworkInterfaceAttributeRequest(params)
@@ -14828,27 +18658,41 @@ func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterface
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute
func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttributeInput) (*ResetNetworkInterfaceAttributeOutput, error) {
req, out := c.ResetNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetNetworkInterfaceAttributeWithContext is the same as ResetNetworkInterfaceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetNetworkInterfaceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetNetworkInterfaceAttributeWithContext(ctx aws.Context, input *ResetNetworkInterfaceAttributeInput, opts ...request.Option) (*ResetNetworkInterfaceAttributeOutput, error) {
+ req, out := c.ResetNetworkInterfaceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetSnapshotAttribute = "ResetSnapshotAttribute"
// ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetSnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetSnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetSnapshotAttribute method directly
-// instead.
+// See ResetSnapshotAttribute for more information on using the ResetSnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetSnapshotAttributeRequest method.
// req, resp := client.ResetSnapshotAttributeRequest(params)
@@ -14894,27 +18738,41 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute
func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*ResetSnapshotAttributeOutput, error) {
req, out := c.ResetSnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetSnapshotAttributeWithContext is the same as ResetSnapshotAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetSnapshotAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetSnapshotAttributeWithContext(ctx aws.Context, input *ResetSnapshotAttributeInput, opts ...request.Option) (*ResetSnapshotAttributeOutput, error) {
+ req, out := c.ResetSnapshotAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRestoreAddressToClassic = "RestoreAddressToClassic"
// RestoreAddressToClassicRequest generates a "aws/request.Request" representing the
// client's request for the RestoreAddressToClassic operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RestoreAddressToClassic for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RestoreAddressToClassic method directly
-// instead.
+// See RestoreAddressToClassic for more information on using the RestoreAddressToClassic
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RestoreAddressToClassicRequest method.
// req, resp := client.RestoreAddressToClassicRequest(params)
@@ -14957,27 +18815,41 @@ func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic
func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*RestoreAddressToClassicOutput, error) {
req, out := c.RestoreAddressToClassicRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RestoreAddressToClassicWithContext is the same as RestoreAddressToClassic with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RestoreAddressToClassic for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RestoreAddressToClassicWithContext(ctx aws.Context, input *RestoreAddressToClassicInput, opts ...request.Option) (*RestoreAddressToClassicOutput, error) {
+ req, out := c.RestoreAddressToClassicRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
// RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the
// client's request for the RevokeSecurityGroupEgress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RevokeSecurityGroupEgress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RevokeSecurityGroupEgress method directly
-// instead.
+// See RevokeSecurityGroupEgress for more information on using the RevokeSecurityGroupEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RevokeSecurityGroupEgressRequest method.
// req, resp := client.RevokeSecurityGroupEgressRequest(params)
@@ -15030,27 +18902,41 @@ func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress
func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) (*RevokeSecurityGroupEgressOutput, error) {
req, out := c.RevokeSecurityGroupEgressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RevokeSecurityGroupEgressWithContext is the same as RevokeSecurityGroupEgress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RevokeSecurityGroupEgress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RevokeSecurityGroupEgressWithContext(ctx aws.Context, input *RevokeSecurityGroupEgressInput, opts ...request.Option) (*RevokeSecurityGroupEgressOutput, error) {
+ req, out := c.RevokeSecurityGroupEgressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
// RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the RevokeSecurityGroupIngress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RevokeSecurityGroupIngress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RevokeSecurityGroupIngress method directly
-// instead.
+// See RevokeSecurityGroupIngress for more information on using the RevokeSecurityGroupIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RevokeSecurityGroupIngressRequest method.
// req, resp := client.RevokeSecurityGroupIngressRequest(params)
@@ -15102,27 +18988,41 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress
func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) (*RevokeSecurityGroupIngressOutput, error) {
req, out := c.RevokeSecurityGroupIngressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RevokeSecurityGroupIngressWithContext is the same as RevokeSecurityGroupIngress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RevokeSecurityGroupIngress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RevokeSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeSecurityGroupIngressInput, opts ...request.Option) (*RevokeSecurityGroupIngressOutput, error) {
+ req, out := c.RevokeSecurityGroupIngressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRunInstances = "RunInstances"
// RunInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RunInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RunInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RunInstances method directly
-// instead.
+// See RunInstances for more information on using the RunInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RunInstancesRequest method.
// req, resp := client.RunInstancesRequest(params)
@@ -15186,9 +19086,9 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques
// each instead of 1 launch request for 500 instances.
//
// An instance is ready for you to use when it's in the running state. You can
-// check the state of your instance using DescribeInstances. After launch, you
-// can apply tags to your running instance (requires a resource ID). For more
-// information, see CreateTags and Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
+// check the state of your instance using DescribeInstances. You can tag instances
+// and EBS volumes during launch, after launch, or both. For more information,
+// see CreateTags and Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
//
// Linux instances have access to the public key of the key pair at boot. You
// can use this key to provide secure access to the instance. Amazon EC2 public
@@ -15210,27 +19110,41 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances
func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) {
req, out := c.RunInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RunInstancesWithContext is the same as RunInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RunInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RunInstancesWithContext(ctx aws.Context, input *RunInstancesInput, opts ...request.Option) (*Reservation, error) {
+ req, out := c.RunInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRunScheduledInstances = "RunScheduledInstances"
// RunScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RunScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RunScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RunScheduledInstances method directly
-// instead.
+// See RunScheduledInstances for more information on using the RunScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RunScheduledInstancesRequest method.
// req, resp := client.RunScheduledInstancesRequest(params)
@@ -15280,27 +19194,41 @@ func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances
func (c *EC2) RunScheduledInstances(input *RunScheduledInstancesInput) (*RunScheduledInstancesOutput, error) {
req, out := c.RunScheduledInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RunScheduledInstancesWithContext is the same as RunScheduledInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RunScheduledInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RunScheduledInstancesWithContext(ctx aws.Context, input *RunScheduledInstancesInput, opts ...request.Option) (*RunScheduledInstancesOutput, error) {
+ req, out := c.RunScheduledInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opStartInstances = "StartInstances"
// StartInstancesRequest generates a "aws/request.Request" representing the
// client's request for the StartInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See StartInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the StartInstances method directly
-// instead.
+// See StartInstances for more information on using the StartInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the StartInstancesRequest method.
// req, resp := client.StartInstancesRequest(params)
@@ -15358,27 +19286,41 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances
func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, error) {
req, out := c.StartInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// StartInstancesWithContext is the same as StartInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See StartInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) StartInstancesWithContext(ctx aws.Context, input *StartInstancesInput, opts ...request.Option) (*StartInstancesOutput, error) {
+ req, out := c.StartInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opStopInstances = "StopInstances"
// StopInstancesRequest generates a "aws/request.Request" representing the
// client's request for the StopInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See StopInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the StopInstances method directly
-// instead.
+// See StopInstances for more information on using the StopInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the StopInstancesRequest method.
// req, resp := client.StopInstancesRequest(params)
@@ -15447,27 +19389,41 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances
func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, error) {
req, out := c.StopInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// StopInstancesWithContext is the same as StopInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See StopInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) StopInstancesWithContext(ctx aws.Context, input *StopInstancesInput, opts ...request.Option) (*StopInstancesOutput, error) {
+ req, out := c.StopInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opTerminateInstances = "TerminateInstances"
// TerminateInstancesRequest generates a "aws/request.Request" representing the
// client's request for the TerminateInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See TerminateInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the TerminateInstances method directly
-// instead.
+// See TerminateInstances for more information on using the TerminateInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the TerminateInstancesRequest method.
// req, resp := client.TerminateInstancesRequest(params)
@@ -15531,27 +19487,41 @@ func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances
func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInstancesOutput, error) {
req, out := c.TerminateInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// TerminateInstancesWithContext is the same as TerminateInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See TerminateInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) TerminateInstancesWithContext(ctx aws.Context, input *TerminateInstancesInput, opts ...request.Option) (*TerminateInstancesOutput, error) {
+ req, out := c.TerminateInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUnassignIpv6Addresses = "UnassignIpv6Addresses"
// UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the
// client's request for the UnassignIpv6Addresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnassignIpv6Addresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnassignIpv6Addresses method directly
-// instead.
+// See UnassignIpv6Addresses for more information on using the UnassignIpv6Addresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnassignIpv6AddressesRequest method.
// req, resp := client.UnassignIpv6AddressesRequest(params)
@@ -15591,27 +19561,41 @@ func (c *EC2) UnassignIpv6AddressesRequest(input *UnassignIpv6AddressesInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses
func (c *EC2) UnassignIpv6Addresses(input *UnassignIpv6AddressesInput) (*UnassignIpv6AddressesOutput, error) {
req, out := c.UnassignIpv6AddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UnassignIpv6AddressesWithContext is the same as UnassignIpv6Addresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UnassignIpv6Addresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UnassignIpv6AddressesWithContext(ctx aws.Context, input *UnassignIpv6AddressesInput, opts ...request.Option) (*UnassignIpv6AddressesOutput, error) {
+ req, out := c.UnassignIpv6AddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses"
// UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the
// client's request for the UnassignPrivateIpAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnassignPrivateIpAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnassignPrivateIpAddresses method directly
-// instead.
+// See UnassignPrivateIpAddresses for more information on using the UnassignPrivateIpAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnassignPrivateIpAddressesRequest method.
// req, resp := client.UnassignPrivateIpAddressesRequest(params)
@@ -15653,27 +19637,41 @@ func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddresse
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses
func (c *EC2) UnassignPrivateIpAddresses(input *UnassignPrivateIpAddressesInput) (*UnassignPrivateIpAddressesOutput, error) {
req, out := c.UnassignPrivateIpAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UnassignPrivateIpAddressesWithContext is the same as UnassignPrivateIpAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UnassignPrivateIpAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UnassignPrivateIpAddressesWithContext(ctx aws.Context, input *UnassignPrivateIpAddressesInput, opts ...request.Option) (*UnassignPrivateIpAddressesOutput, error) {
+ req, out := c.UnassignPrivateIpAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUnmonitorInstances = "UnmonitorInstances"
// UnmonitorInstancesRequest generates a "aws/request.Request" representing the
// client's request for the UnmonitorInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnmonitorInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnmonitorInstances method directly
-// instead.
+// See UnmonitorInstances for more information on using the UnmonitorInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnmonitorInstancesRequest method.
// req, resp := client.UnmonitorInstancesRequest(params)
@@ -15715,8 +19713,23 @@ func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances
func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInstancesOutput, error) {
req, out := c.UnmonitorInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UnmonitorInstancesWithContext is the same as UnmonitorInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UnmonitorInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UnmonitorInstancesWithContext(ctx aws.Context, input *UnmonitorInstancesInput, opts ...request.Option) (*UnmonitorInstancesOutput, error) {
+ req, out := c.UnmonitorInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// Contains the parameters for accepting the quote.
@@ -15943,8 +19956,8 @@ func (s *AccountAttributeValue) SetAttributeValue(v string) *AccountAttributeVal
type ActiveInstance struct {
_ struct{} `type:"structure"`
- // The health status of the instance. If the status of both the instance status
- // check and the system status check is impaired, the health status of the instance
+ // The health status of the instance. If the status of either the instance status
+ // check or the system status check is impaired, the health status of the instance
// is unhealthy. Otherwise, the health status is healthy.
InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthStatus"`
@@ -19677,6 +23690,59 @@ func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *Cr
return s
}
+// Contains the parameters for CreateDefaultVpc.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcRequest
+type CreateDefaultVpcInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s CreateDefaultVpcInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDefaultVpcInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput {
+ s.DryRun = &v
+ return s
+}
+
+// Contains the output of CreateDefaultVpc.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcResult
+type CreateDefaultVpcOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the VPC.
+ Vpc *Vpc `locationName:"vpc" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateDefaultVpcOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDefaultVpcOutput) GoString() string {
+ return s.String()
+}
+
+// SetVpc sets the Vpc field's value.
+func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput {
+ s.Vpc = v
+ return s
+}
+
// Contains the parameters for CreateDhcpOptions.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptionsRequest
type CreateDhcpOptionsInput struct {
@@ -20002,6 +24068,128 @@ func (s *CreateFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *CreateFlo
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageRequest
+type CreateFpgaImageInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency
+ // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // A description for the AFI.
+ Description *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The location of the encrypted design checkpoint in Amazon S3. The input must
+ // be a tarball.
+ //
+ // InputStorageLocation is a required field
+ InputStorageLocation *StorageLocation `type:"structure" required:"true"`
+
+ // The location in Amazon S3 for the output logs.
+ LogsStorageLocation *StorageLocation `type:"structure"`
+
+ // A name for the AFI.
+ Name *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateFpgaImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFpgaImageInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateFpgaImageInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateFpgaImageInput"}
+ if s.InputStorageLocation == nil {
+ invalidParams.Add(request.NewErrParamRequired("InputStorageLocation"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateFpgaImageInput) SetClientToken(v string) *CreateFpgaImageInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *CreateFpgaImageInput) SetDescription(v string) *CreateFpgaImageInput {
+ s.Description = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateFpgaImageInput) SetDryRun(v bool) *CreateFpgaImageInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetInputStorageLocation sets the InputStorageLocation field's value.
+func (s *CreateFpgaImageInput) SetInputStorageLocation(v *StorageLocation) *CreateFpgaImageInput {
+ s.InputStorageLocation = v
+ return s
+}
+
+// SetLogsStorageLocation sets the LogsStorageLocation field's value.
+func (s *CreateFpgaImageInput) SetLogsStorageLocation(v *StorageLocation) *CreateFpgaImageInput {
+ s.LogsStorageLocation = v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *CreateFpgaImageInput) SetName(v string) *CreateFpgaImageInput {
+ s.Name = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageResult
+type CreateFpgaImageOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The global FPGA image identifier (AGFI ID).
+ FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"`
+
+ // The FPGA image identifier (AFI ID).
+ FpgaImageId *string `locationName:"fpgaImageId" type:"string"`
+}
+
+// String returns the string representation
+func (s CreateFpgaImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFpgaImageOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value.
+func (s *CreateFpgaImageOutput) SetFpgaImageGlobalId(v string) *CreateFpgaImageOutput {
+ s.FpgaImageGlobalId = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput {
+ s.FpgaImageId = &v
+ return s
+}
+
// Contains the parameters for CreateImage.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImageRequest
type CreateImageInput struct {
@@ -20888,6 +25076,115 @@ func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface)
return s
}
+// Contains the parameters for CreateNetworkInterfacePermission.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionRequest
+type CreateNetworkInterfacePermissionInput struct {
+ _ struct{} `type:"structure"`
+
+ // The AWS account ID.
+ AwsAccountId *string `type:"string"`
+
+ // The AWS service. Currently not supported.
+ AwsService *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the network interface.
+ //
+ // NetworkInterfaceId is a required field
+ NetworkInterfaceId *string `type:"string" required:"true"`
+
+ // The type of permission to grant.
+ //
+ // Permission is a required field
+ Permission *string `type:"string" required:"true" enum:"InterfacePermissionType"`
+}
+
+// String returns the string representation
+func (s CreateNetworkInterfacePermissionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkInterfacePermissionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateNetworkInterfacePermissionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfacePermissionInput"}
+ if s.NetworkInterfaceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId"))
+ }
+ if s.Permission == nil {
+ invalidParams.Add(request.NewErrParamRequired("Permission"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAwsAccountId sets the AwsAccountId field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetAwsAccountId(v string) *CreateNetworkInterfacePermissionInput {
+ s.AwsAccountId = &v
+ return s
+}
+
+// SetAwsService sets the AwsService field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetAwsService(v string) *CreateNetworkInterfacePermissionInput {
+ s.AwsService = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetDryRun(v bool) *CreateNetworkInterfacePermissionInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetNetworkInterfaceId(v string) *CreateNetworkInterfacePermissionInput {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetPermission sets the Permission field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateNetworkInterfacePermissionInput {
+ s.Permission = &v
+ return s
+}
+
+// Contains the output of CreateNetworkInterfacePermission.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionResult
+type CreateNetworkInterfacePermissionOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the permission for the network interface.
+ InterfacePermission *NetworkInterfacePermission `locationName:"interfacePermission" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkInterfacePermissionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkInterfacePermissionOutput) GoString() string {
+ return s.String()
+}
+
+// SetInterfacePermission sets the InterfacePermission field's value.
+func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *NetworkInterfacePermission) *CreateNetworkInterfacePermissionOutput {
+ s.InterfacePermission = v
+ return s
+}
+
// Contains the parameters for CreatePlacementGroup.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroupRequest
type CreatePlacementGroupInput struct {
@@ -21824,6 +26121,9 @@ type CreateVolumeInput struct {
// The snapshot from which to create the volume.
SnapshotId *string `type:"string"`
+ // The tags to apply to the volume during creation.
+ TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
+
// The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned
// IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard
// for Magnetic volumes.
@@ -21897,6 +26197,12 @@ func (s *CreateVolumeInput) SetSnapshotId(v string) *CreateVolumeInput {
return s
}
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *CreateVolumeInput) SetTagSpecifications(v []*TagSpecification) *CreateVolumeInput {
+ s.TagSpecifications = v
+ return s
+}
+
// SetVolumeType sets the VolumeType field's value.
func (s *CreateVolumeInput) SetVolumeType(v string) *CreateVolumeInput {
s.VolumeType = &v
@@ -23343,6 +27649,93 @@ func (s DeleteNetworkInterfaceOutput) GoString() string {
return s.String()
}
+// Contains the parameters for DeleteNetworkInterfacePermission.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionRequest
+type DeleteNetworkInterfacePermissionInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // Specify true to remove the permission even if the network interface is attached
+ // to an instance.
+ Force *bool `type:"boolean"`
+
+ // The ID of the network interface permission.
+ //
+ // NetworkInterfacePermissionId is a required field
+ NetworkInterfacePermissionId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkInterfacePermissionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkInterfacePermissionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteNetworkInterfacePermissionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfacePermissionInput"}
+ if s.NetworkInterfacePermissionId == nil {
+ invalidParams.Add(request.NewErrParamRequired("NetworkInterfacePermissionId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteNetworkInterfacePermissionInput) SetDryRun(v bool) *DeleteNetworkInterfacePermissionInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetForce sets the Force field's value.
+func (s *DeleteNetworkInterfacePermissionInput) SetForce(v bool) *DeleteNetworkInterfacePermissionInput {
+ s.Force = &v
+ return s
+}
+
+// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value.
+func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(v string) *DeleteNetworkInterfacePermissionInput {
+ s.NetworkInterfacePermissionId = &v
+ return s
+}
+
+// Contains the output for DeleteNetworkInterfacePermission.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionResult
+type DeleteNetworkInterfacePermissionOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds, otherwise returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkInterfacePermissionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkInterfacePermissionOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetworkInterfacePermissionOutput {
+ s.Return = &v
+ return s
+}
+
// Contains the parameters for DeletePlacementGroup.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroupRequest
type DeletePlacementGroupInput struct {
@@ -25258,6 +29651,126 @@ func (s *DescribeEgressOnlyInternetGatewaysOutput) SetNextToken(v string) *Descr
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusRequest
+type DescribeElasticGpusInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more Elastic GPU IDs.
+ ElasticGpuIds []*string `locationName:"ElasticGpuId" locationNameList:"item" type:"list"`
+
+ // One or more filters.
+ //
+ // * availability-zone - The Availability Zone in which the Elastic GPU resides.
+ //
+ // * elastic-gpu-health - The status of the Elastic GPU (OK | IMPAIRED).
+ //
+ // * elastic-gpu-state - The state of the Elastic GPU (ATTACHED).
+ //
+ // * elastic-gpu-type - The type of Elastic GPU; for example, eg1.medium.
+ //
+ // * instance-id - The ID of the instance to which the Elastic GPU is associated.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeElasticGpusInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeElasticGpusInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeElasticGpusInput) SetDryRun(v bool) *DescribeElasticGpusInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetElasticGpuIds sets the ElasticGpuIds field's value.
+func (s *DescribeElasticGpusInput) SetElasticGpuIds(v []*string) *DescribeElasticGpusInput {
+ s.ElasticGpuIds = v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeElasticGpusInput) SetFilters(v []*Filter) *DescribeElasticGpusInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeElasticGpusInput) SetMaxResults(v int64) *DescribeElasticGpusInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusInput {
+ s.NextToken = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusResult
+type DescribeElasticGpusOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the Elastic GPUs.
+ ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" type:"list"`
+
+ // The total number of items to return. If the total number of items available
+ // is more than the value specified in max-items then a Next-Token will be provided
+ // in the output that you can use to resume pagination.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeElasticGpusOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeElasticGpusOutput) GoString() string {
+ return s.String()
+}
+
+// SetElasticGpuSet sets the ElasticGpuSet field's value.
+func (s *DescribeElasticGpusOutput) SetElasticGpuSet(v []*ElasticGpus) *DescribeElasticGpusOutput {
+ s.ElasticGpuSet = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeElasticGpusOutput) SetMaxResults(v int64) *DescribeElasticGpusOutput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeExportTasks.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasksRequest
type DescribeExportTasksInput struct {
@@ -25409,6 +29922,164 @@ func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesRequest
+type DescribeFpgaImagesInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * create-time - The creation time of the AFI.
+ //
+ // * fpga-image-id - The FPGA image identifier (AFI ID).
+ //
+ // * fpga-image-global-id - The global FPGA image identifier (AGFI ID).
+ //
+ // * name - The name of the AFI.
+ //
+ // * owner-id - The AWS account ID of the AFI owner.
+ //
+ // * product-code - The product code.
+ //
+ // * shell-version - The version of the AWS Shell that was used to create
+ // the bitstream.
+ //
+ // * state - The state of the AFI (pending | failed | available | unavailable).
+ //
+ // * tag:key=value - The key/value combination of a tag assigned to the resource.
+ // Specify the key of the tag in the filter name and the value of the tag
+ // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
+ // for the filter name and X for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. This filter is
+ // independent of the tag-value filter. For example, if you use both the
+ // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
+ // assigned both the tag key Purpose (regardless of what the tag's value
+ // is), and the tag value X (regardless of what the tag's key is). If you
+ // want to list only resources where Purpose is X, see the tag:key=value
+ // filter.
+ //
+ // * tag-value - The value of a tag assigned to the resource. This filter
+ // is independent of the tag-key filter.
+ //
+ // * update-time - The time of the most recent update.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more AFI IDs.
+ FpgaImageIds []*string `locationName:"FpgaImageId" locationNameList:"item" type:"list"`
+
+ // The maximum number of results to return in a single call.
+ MaxResults *int64 `min:"5" type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `min:"1" type:"string"`
+
+ // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender
+ // of the request), or an AWS owner alias (valid values are amazon | aws-marketplace).
+ Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeFpgaImagesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFpgaImagesInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeFpgaImagesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImagesInput"}
+ if s.MaxResults != nil && *s.MaxResults < 5 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5))
+ }
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeFpgaImagesInput) SetDryRun(v bool) *DescribeFpgaImagesInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeFpgaImagesInput) SetFilters(v []*Filter) *DescribeFpgaImagesInput {
+ s.Filters = v
+ return s
+}
+
+// SetFpgaImageIds sets the FpgaImageIds field's value.
+func (s *DescribeFpgaImagesInput) SetFpgaImageIds(v []*string) *DescribeFpgaImagesInput {
+ s.FpgaImageIds = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeFpgaImagesInput) SetMaxResults(v int64) *DescribeFpgaImagesInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeFpgaImagesInput) SetNextToken(v string) *DescribeFpgaImagesInput {
+ s.NextToken = &v
+ return s
+}
+
+// SetOwners sets the Owners field's value.
+func (s *DescribeFpgaImagesInput) SetOwners(v []*string) *DescribeFpgaImagesInput {
+ s.Owners = v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesResult
+type DescribeFpgaImagesOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about one or more FPGA images.
+ FpgaImages []*FpgaImage `locationName:"fpgaImageSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeFpgaImagesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFpgaImagesOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImages sets the FpgaImages field's value.
+func (s *DescribeFpgaImagesOutput) SetFpgaImages(v []*FpgaImage) *DescribeFpgaImagesOutput {
+ s.FpgaImages = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeFpgaImagesOutput) SetNextToken(v string) *DescribeFpgaImagesOutput {
+ s.NextToken = &v
+ return s
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferingsRequest
type DescribeHostReservationOfferingsInput struct {
_ struct{} `type:"structure"`
@@ -26891,18 +31562,6 @@ type DescribeInstancesInput struct {
//
// * architecture - The instance architecture (i386 | x86_64).
//
- // * association.public-ip - The address of the Elastic IP address (IPv4)
- // bound to the network interface.
- //
- // * association.ip-owner-id - The owner of the Elastic IP address (IPv4)
- // associated with the network interface.
- //
- // * association.allocation-id - The allocation ID returned when you allocated
- // the Elastic IP address (IPv4) for your network interface.
- //
- // * association.association-id - The association ID returned when the network
- // interface was associated with an IPv4 address.
- //
// * availability-zone - The Availability Zone of the instance.
//
// * block-device-mapping.attach-time - The attach time for an EBS volume
@@ -26988,6 +31647,18 @@ type DescribeInstancesInput struct {
// * network-interface.addresses.association.ip-owner-id - The owner ID of
// the private IPv4 address associated with the network interface.
//
+ // * network-interface.association.public-ip - The address of the Elastic
+ // IP address (IPv4) bound to the network interface.
+ //
+ // * network-interface.association.ip-owner-id - The owner of the Elastic
+ // IP address (IPv4) associated with the network interface.
+ //
+ // * network-interface.association.allocation-id - The allocation ID returned
+ // when you allocated the Elastic IP address (IPv4) for your network interface.
+ //
+ // * network-interface.association.association-id - The association ID returned
+ // when the network interface was associated with an IPv4 address.
+ //
// * network-interface.attachment.attachment-id - The ID of the interface
// attachment.
//
@@ -27729,7 +32400,7 @@ func (s *DescribeNetworkAclsOutput) SetNetworkAcls(v []*NetworkAcl) *DescribeNet
type DescribeNetworkInterfaceAttributeInput struct {
_ struct{} `type:"structure"`
- // The attribute of the network interface.
+ // The attribute of the network interface. This parameter is required.
Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"`
// Checks whether you have the required permissions for the action, without
@@ -27846,6 +32517,107 @@ func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *Attribut
return s
}
+// Contains the parameters for DescribeNetworkInterfacePermissions.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsRequest
+type DescribeNetworkInterfacePermissionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // One or more filters.
+ //
+ // * network-interface-permission.network-interface-permission-id - The ID
+ // of the permission.
+ //
+ // * network-interface-permission.network-interface-id - The ID of the network
+ // interface.
+ //
+ // * network-interface-permission.aws-account-id - The AWS account ID.
+ //
+ // * network-interface-permission.aws-service - The AWS service.
+ //
+ // * network-interface-permission.permission - The type of permission (INSTANCE-ATTACH
+ // | EIP-ASSOCIATE).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. If
+ // this parameter is not specified, up to 50 results are returned by default.
+ MaxResults *int64 `type:"integer"`
+
+ // One or more network interface permission IDs.
+ NetworkInterfacePermissionIds []*string `locationName:"NetworkInterfacePermissionId" type:"list"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfacePermissionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfacePermissionsInput) GoString() string {
+ return s.String()
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetFilters(v []*Filter) *DescribeNetworkInterfacePermissionsInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetMaxResults(v int64) *DescribeNetworkInterfacePermissionsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNetworkInterfacePermissionIds sets the NetworkInterfacePermissionIds field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetNetworkInterfacePermissionIds(v []*string) *DescribeNetworkInterfacePermissionsInput {
+ s.NetworkInterfacePermissionIds = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsInput {
+ s.NextToken = &v
+ return s
+}
+
+// Contains the output for DescribeNetworkInterfacePermissions.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsResult
+type DescribeNetworkInterfacePermissionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The network interface permissions.
+ NetworkInterfacePermissions []*NetworkInterfacePermission `locationName:"networkInterfacePermissions" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfacePermissionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfacePermissionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetNetworkInterfacePermissions sets the NetworkInterfacePermissions field's value.
+func (s *DescribeNetworkInterfacePermissionsOutput) SetNetworkInterfacePermissions(v []*NetworkInterfacePermission) *DescribeNetworkInterfacePermissionsOutput {
+ s.NetworkInterfacePermissions = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeNetworkInterfacePermissionsOutput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeNetworkInterfaces.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacesRequest
type DescribeNetworkInterfacesInput struct {
@@ -28659,6 +33431,9 @@ type DescribeReservedInstancesOfferingsInput struct {
// with a tenancy of dedicated is applied to instances that run in a VPC on
// single-tenant hardware (i.e., Dedicated Instances).
//
+ // Important: The host value cannot be used with this parameter. Use the default
+ // or dedicated values only.
+ //
// Default: default
InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
@@ -28890,7 +33665,8 @@ type DescribeRouteTablesInput struct {
// * association.subnet-id - The ID of the subnet involved in the association.
//
// * association.main - Indicates whether the route table is the main route
- // table for the VPC (true | false).
+ // table for the VPC (true | false). Route tables that do not have an association
+ // ID are not returned in the response.
//
// * route-table-id - The ID of the route table.
//
@@ -29620,7 +34396,7 @@ type DescribeSnapshotsInput struct {
//
// * owner-alias - Value from an Amazon-maintained list (amazon | aws-marketplace
// | microsoft) of snapshot owners. Not to be confused with the user-configured
- // AWS account alias, which is set from the IAM consolew.
+ // AWS account alias, which is set from the IAM console.
//
// * owner-id - The ID of the AWS account that owns the snapshot.
//
@@ -30886,7 +35662,7 @@ func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput {
type DescribeVolumeAttributeInput struct {
_ struct{} `type:"structure"`
- // The instance attribute.
+ // The attribute of the volume. This parameter is required.
Attribute *string `type:"string" enum:"VolumeAttributeName"`
// Checks whether you have the required permissions for the action, without
@@ -33807,6 +38583,193 @@ func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *Eg
return s
}
+// Describes the association between an instance and an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuAssociation
+type ElasticGpuAssociation struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the association.
+ ElasticGpuAssociationId *string `locationName:"elasticGpuAssociationId" type:"string"`
+
+ // The state of the association between the instance and the Elastic GPU.
+ ElasticGpuAssociationState *string `locationName:"elasticGpuAssociationState" type:"string"`
+
+ // The time the Elastic GPU was associated with the instance.
+ ElasticGpuAssociationTime *string `locationName:"elasticGpuAssociationTime" type:"string"`
+
+ // The ID of the Elastic GPU.
+ ElasticGpuId *string `locationName:"elasticGpuId" type:"string"`
+}
+
+// String returns the string representation
+func (s ElasticGpuAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuAssociation) GoString() string {
+ return s.String()
+}
+
+// SetElasticGpuAssociationId sets the ElasticGpuAssociationId field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuAssociationId(v string) *ElasticGpuAssociation {
+ s.ElasticGpuAssociationId = &v
+ return s
+}
+
+// SetElasticGpuAssociationState sets the ElasticGpuAssociationState field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuAssociationState(v string) *ElasticGpuAssociation {
+ s.ElasticGpuAssociationState = &v
+ return s
+}
+
+// SetElasticGpuAssociationTime sets the ElasticGpuAssociationTime field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuAssociationTime(v string) *ElasticGpuAssociation {
+ s.ElasticGpuAssociationTime = &v
+ return s
+}
+
+// SetElasticGpuId sets the ElasticGpuId field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation {
+ s.ElasticGpuId = &v
+ return s
+}
+
+// Describes the status of an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuHealth
+type ElasticGpuHealth struct {
+ _ struct{} `type:"structure"`
+
+ // The health status.
+ Status *string `locationName:"status" type:"string" enum:"ElasticGpuStatus"`
+}
+
+// String returns the string representation
+func (s ElasticGpuHealth) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuHealth) GoString() string {
+ return s.String()
+}
+
+// SetStatus sets the Status field's value.
+func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth {
+ s.Status = &v
+ return s
+}
+
+// A specification for an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuSpecification
+type ElasticGpuSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of Elastic GPU.
+ //
+ // Type is a required field
+ Type *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ElasticGpuSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuSpecification) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ElasticGpuSpecification) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ElasticGpuSpecification"}
+ if s.Type == nil {
+ invalidParams.Add(request.NewErrParamRequired("Type"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetType sets the Type field's value.
+func (s *ElasticGpuSpecification) SetType(v string) *ElasticGpuSpecification {
+ s.Type = &v
+ return s
+}
+
+// Describes an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpus
+type ElasticGpus struct {
+ _ struct{} `type:"structure"`
+
+ // The Availability Zone in the which the Elastic GPU resides.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The status of the Elastic GPU.
+ ElasticGpuHealth *ElasticGpuHealth `locationName:"elasticGpuHealth" type:"structure"`
+
+ // The ID of the Elastic GPU.
+ ElasticGpuId *string `locationName:"elasticGpuId" type:"string"`
+
+ // The state of the Elastic GPU.
+ ElasticGpuState *string `locationName:"elasticGpuState" type:"string" enum:"ElasticGpuState"`
+
+ // The type of Elastic GPU.
+ ElasticGpuType *string `locationName:"elasticGpuType" type:"string"`
+
+ // The ID of the instance to which the Elastic GPU is attached.
+ InstanceId *string `locationName:"instanceId" type:"string"`
+}
+
+// String returns the string representation
+func (s ElasticGpus) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpus) GoString() string {
+ return s.String()
+}
+
+// SetAvailabilityZone sets the AvailabilityZone field's value.
+func (s *ElasticGpus) SetAvailabilityZone(v string) *ElasticGpus {
+ s.AvailabilityZone = &v
+ return s
+}
+
+// SetElasticGpuHealth sets the ElasticGpuHealth field's value.
+func (s *ElasticGpus) SetElasticGpuHealth(v *ElasticGpuHealth) *ElasticGpus {
+ s.ElasticGpuHealth = v
+ return s
+}
+
+// SetElasticGpuId sets the ElasticGpuId field's value.
+func (s *ElasticGpus) SetElasticGpuId(v string) *ElasticGpus {
+ s.ElasticGpuId = &v
+ return s
+}
+
+// SetElasticGpuState sets the ElasticGpuState field's value.
+func (s *ElasticGpus) SetElasticGpuState(v string) *ElasticGpus {
+ s.ElasticGpuState = &v
+ return s
+}
+
+// SetElasticGpuType sets the ElasticGpuType field's value.
+func (s *ElasticGpus) SetElasticGpuType(v string) *ElasticGpus {
+ s.ElasticGpuType = &v
+ return s
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus {
+ s.InstanceId = &v
+ return s
+}
+
// Contains the parameters for EnableVgwRoutePropagation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagationRequest
type EnableVgwRoutePropagationInput struct {
@@ -34482,6 +39445,182 @@ func (s *FlowLog) SetTrafficType(v string) *FlowLog {
return s
}
+// Describes an Amazon FPGA image (AFI).
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImage
+type FpgaImage struct {
+ _ struct{} `type:"structure"`
+
+ // The date and time the AFI was created.
+ CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The description of the AFI.
+ Description *string `locationName:"description" type:"string"`
+
+ // The global FPGA image identifier (AGFI ID).
+ FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"`
+
+ // The FPGA image identifier (AFI ID).
+ FpgaImageId *string `locationName:"fpgaImageId" type:"string"`
+
+ // The name of the AFI.
+ Name *string `locationName:"name" type:"string"`
+
+ // The alias of the AFI owner. Possible values include self, amazon, and aws-marketplace.
+ OwnerAlias *string `locationName:"ownerAlias" type:"string"`
+
+ // The AWS account ID of the AFI owner.
+ OwnerId *string `locationName:"ownerId" type:"string"`
+
+ // Information about the PCI bus.
+ PciId *PciId `locationName:"pciId" type:"structure"`
+
+ // The product codes for the AFI.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The version of the AWS Shell that was used to create the bitstream.
+ ShellVersion *string `locationName:"shellVersion" type:"string"`
+
+ // Information about the state of the AFI.
+ State *FpgaImageState `locationName:"state" type:"structure"`
+
+ // Any tags assigned to the AFI.
+ Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"`
+
+ // The time of the most recent update to the AFI.
+ UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"`
+}
+
+// String returns the string representation
+func (s FpgaImage) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FpgaImage) GoString() string {
+ return s.String()
+}
+
+// SetCreateTime sets the CreateTime field's value.
+func (s *FpgaImage) SetCreateTime(v time.Time) *FpgaImage {
+ s.CreateTime = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *FpgaImage) SetDescription(v string) *FpgaImage {
+ s.Description = &v
+ return s
+}
+
+// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value.
+func (s *FpgaImage) SetFpgaImageGlobalId(v string) *FpgaImage {
+ s.FpgaImageGlobalId = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *FpgaImage) SetFpgaImageId(v string) *FpgaImage {
+ s.FpgaImageId = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *FpgaImage) SetName(v string) *FpgaImage {
+ s.Name = &v
+ return s
+}
+
+// SetOwnerAlias sets the OwnerAlias field's value.
+func (s *FpgaImage) SetOwnerAlias(v string) *FpgaImage {
+ s.OwnerAlias = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *FpgaImage) SetOwnerId(v string) *FpgaImage {
+ s.OwnerId = &v
+ return s
+}
+
+// SetPciId sets the PciId field's value.
+func (s *FpgaImage) SetPciId(v *PciId) *FpgaImage {
+ s.PciId = v
+ return s
+}
+
+// SetProductCodes sets the ProductCodes field's value.
+func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage {
+ s.ProductCodes = v
+ return s
+}
+
+// SetShellVersion sets the ShellVersion field's value.
+func (s *FpgaImage) SetShellVersion(v string) *FpgaImage {
+ s.ShellVersion = &v
+ return s
+}
+
+// SetState sets the State field's value.
+func (s *FpgaImage) SetState(v *FpgaImageState) *FpgaImage {
+ s.State = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *FpgaImage) SetTags(v []*Tag) *FpgaImage {
+ s.Tags = v
+ return s
+}
+
+// SetUpdateTime sets the UpdateTime field's value.
+func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage {
+ s.UpdateTime = &v
+ return s
+}
+
+// Describes the state of the bitstream generation process for an Amazon FPGA
+// image (AFI).
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageState
+type FpgaImageState struct {
+ _ struct{} `type:"structure"`
+
+ // The state. The following are the possible values:
+ //
+ // * pending - AFI bitstream generation is in progress.
+ //
+ // * available - The AFI is available for use.
+ //
+ // * failed - AFI bitstream generation failed.
+ //
+ // * unavailable - The AFI is no longer available for use.
+ Code *string `locationName:"code" type:"string" enum:"FpgaImageStateCode"`
+
+ // If the state is failed, this is the error message.
+ Message *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s FpgaImageState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FpgaImageState) GoString() string {
+ return s.String()
+}
+
+// SetCode sets the Code field's value.
+func (s *FpgaImageState) SetCode(v string) *FpgaImageState {
+ s.Code = &v
+ return s
+}
+
+// SetMessage sets the Message field's value.
+func (s *FpgaImageState) SetMessage(v string) *FpgaImageState {
+ s.Message = &v
+ return s
+}
+
// Contains the parameters for GetConsoleOutput.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutputRequest
type GetConsoleOutputInput struct {
@@ -37272,6 +42411,9 @@ type Instance struct {
// Optimized instance.
EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+ // The Elastic GPU associated with the instance.
+ ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"`
+
// Specifies whether enhanced networking with ENA is enabled.
EnaSupport *bool `locationName:"enaSupport" type:"boolean"`
@@ -37429,6 +42571,12 @@ func (s *Instance) SetEbsOptimized(v bool) *Instance {
return s
}
+// SetElasticGpuAssociations sets the ElasticGpuAssociations field's value.
+func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instance {
+ s.ElasticGpuAssociations = v
+ return s
+}
+
// SetEnaSupport sets the EnaSupport field's value.
func (s *Instance) SetEnaSupport(v bool) *Instance {
s.EnaSupport = &v
@@ -39585,7 +44733,7 @@ type ModifyInstanceAttributeInput struct {
BlockDeviceMappings []*InstanceBlockDeviceMappingSpecification `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
// If the value is true, you can't terminate the instance using the Amazon EC2
- // console, CLI, or API; otherwise, you can. You cannot use this paramater for
+ // console, CLI, or API; otherwise, you can. You cannot use this parameter for
// Spot Instances.
DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
@@ -41888,6 +47036,110 @@ func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterface
return s
}
+// Describes a permission for a network interface.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermission
+type NetworkInterfacePermission struct {
+ _ struct{} `type:"structure"`
+
+ // The AWS account ID.
+ AwsAccountId *string `locationName:"awsAccountId" type:"string"`
+
+ // The AWS service.
+ AwsService *string `locationName:"awsService" type:"string"`
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The ID of the network interface permission.
+ NetworkInterfacePermissionId *string `locationName:"networkInterfacePermissionId" type:"string"`
+
+ // The type of permission.
+ Permission *string `locationName:"permission" type:"string" enum:"InterfacePermissionType"`
+
+ // Information about the state of the permission.
+ PermissionState *NetworkInterfacePermissionState `locationName:"permissionState" type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterfacePermission) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfacePermission) GoString() string {
+ return s.String()
+}
+
+// SetAwsAccountId sets the AwsAccountId field's value.
+func (s *NetworkInterfacePermission) SetAwsAccountId(v string) *NetworkInterfacePermission {
+ s.AwsAccountId = &v
+ return s
+}
+
+// SetAwsService sets the AwsService field's value.
+func (s *NetworkInterfacePermission) SetAwsService(v string) *NetworkInterfacePermission {
+ s.AwsService = &v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *NetworkInterfacePermission) SetNetworkInterfaceId(v string) *NetworkInterfacePermission {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value.
+func (s *NetworkInterfacePermission) SetNetworkInterfacePermissionId(v string) *NetworkInterfacePermission {
+ s.NetworkInterfacePermissionId = &v
+ return s
+}
+
+// SetPermission sets the Permission field's value.
+func (s *NetworkInterfacePermission) SetPermission(v string) *NetworkInterfacePermission {
+ s.Permission = &v
+ return s
+}
+
+// SetPermissionState sets the PermissionState field's value.
+func (s *NetworkInterfacePermission) SetPermissionState(v *NetworkInterfacePermissionState) *NetworkInterfacePermission {
+ s.PermissionState = v
+ return s
+}
+
+// Describes the state of a network interface permission.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermissionState
+type NetworkInterfacePermissionState struct {
+ _ struct{} `type:"structure"`
+
+ // The state of the permission.
+ State *string `locationName:"state" type:"string" enum:"NetworkInterfacePermissionStateCode"`
+
+ // A status message, if applicable.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+}
+
+// String returns the string representation
+func (s NetworkInterfacePermissionState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfacePermissionState) GoString() string {
+ return s.String()
+}
+
+// SetState sets the State field's value.
+func (s *NetworkInterfacePermissionState) SetState(v string) *NetworkInterfacePermissionState {
+ s.State = &v
+ return s
+}
+
+// SetStatusMessage sets the StatusMessage field's value.
+func (s *NetworkInterfacePermissionState) SetStatusMessage(v string) *NetworkInterfacePermissionState {
+ s.StatusMessage = &v
+ return s
+}
+
// Describes the private IPv4 address of a network interface.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePrivateIpAddress
type NetworkInterfacePrivateIpAddress struct {
@@ -41973,6 +47225,59 @@ func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration {
return s
}
+// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI
+// bus.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PciId
+type PciId struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the device.
+ DeviceId *string `type:"string"`
+
+ // The ID of the subsystem.
+ SubsystemId *string `type:"string"`
+
+ // The ID of the vendor for the subsystem.
+ SubsystemVendorId *string `type:"string"`
+
+ // The ID of the vendor.
+ VendorId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s PciId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PciId) GoString() string {
+ return s.String()
+}
+
+// SetDeviceId sets the DeviceId field's value.
+func (s *PciId) SetDeviceId(v string) *PciId {
+ s.DeviceId = &v
+ return s
+}
+
+// SetSubsystemId sets the SubsystemId field's value.
+func (s *PciId) SetSubsystemId(v string) *PciId {
+ s.SubsystemId = &v
+ return s
+}
+
+// SetSubsystemVendorId sets the SubsystemVendorId field's value.
+func (s *PciId) SetSubsystemVendorId(v string) *PciId {
+ s.SubsystemVendorId = &v
+ return s
+}
+
+// SetVendorId sets the VendorId field's value.
+func (s *PciId) SetVendorId(v string) *PciId {
+ s.VendorId = &v
+ return s
+}
+
// Describes the VPC peering connection options.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PeeringConnectionOptions
type PeeringConnectionOptions struct {
@@ -42084,6 +47389,9 @@ type Placement struct {
// is not supported for the ImportInstance command.
HostId *string `locationName:"hostId" type:"string"`
+ // Reserved for future use.
+ SpreadDomain *string `locationName:"spreadDomain" type:"string"`
+
// The tenancy of the instance (if the instance is running in a VPC). An instance
// with a tenancy of dedicated runs on single-tenant hardware. The host tenancy
// is not supported for the ImportInstance command.
@@ -42124,6 +47432,12 @@ func (s *Placement) SetHostId(v string) *Placement {
return s
}
+// SetSpreadDomain sets the SpreadDomain field's value.
+func (s *Placement) SetSpreadDomain(v string) *Placement {
+ s.SpreadDomain = &v
+ return s
+}
+
// SetTenancy sets the Tenancy field's value.
func (s *Placement) SetTenancy(v string) *Placement {
s.Tenancy = &v
@@ -43245,7 +48559,9 @@ type RegisterImageInput struct {
// the architecture specified in the manifest file.
Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
- // The billing product codes.
+ // The billing product codes. Your account must be authorized to specify billing
+ // product codes. Otherwise, you can use the AWS Marketplace to bill for the
+ // use of an AMI.
BillingProducts []*string `locationName:"BillingProduct" locationNameList:"item" type:"list"`
// One or more block device mapping entries.
@@ -44501,7 +49817,7 @@ type RequestSpotInstancesInput struct {
// Default: Instances are launched and terminated individually
LaunchGroup *string `locationName:"launchGroup" type:"string"`
- // Describes the launch specification for an instance.
+ // The launch specification.
LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"`
// The maximum hourly price (bid) for any Spot instance launched to fulfill
@@ -44690,7 +50006,9 @@ type RequestSpotLaunchSpecification struct {
// The name of the key pair.
KeyName *string `locationName:"keyName" type:"string"`
- // Describes the monitoring of an instance.
+ // Indicates whether basic or detailed monitoring is enabled for the instance.
+ //
+ // Default: Disabled
Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"`
// One or more network interfaces. If you specify a network interface, you must
@@ -44703,8 +50021,12 @@ type RequestSpotLaunchSpecification struct {
// The ID of the RAM disk.
RamdiskId *string `locationName:"ramdiskId" type:"string"`
+ // One or more security group IDs.
SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
+ // One or more security groups. When requesting instances in a VPC, you must
+ // specify the IDs of the security groups. When requesting instances in EC2-Classic,
+ // you can specify the names or the IDs of the security groups.
SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"`
// The ID of the subnet in which to launch the instance.
@@ -46683,6 +52005,9 @@ type RunInstancesInput struct {
// Default: false
EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+ // An Elastic GPU to associate with the instance.
+ ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"`
+
// The IAM instance profile.
IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
@@ -46794,6 +52119,11 @@ type RunInstancesInput struct {
// [EC2-VPC] The ID of the subnet to launch the instance into.
SubnetId *string `type:"string"`
+ // The tags to apply to the resources during launch. You can tag instances and
+ // volumes. The specified tags are applied to all instances or volumes that
+ // are created during launch.
+ TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
+
// The user data to make available to the instance. For more information, see
// Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html)
// (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data)
@@ -46825,6 +52155,16 @@ func (s *RunInstancesInput) Validate() error {
if s.MinCount == nil {
invalidParams.Add(request.NewErrParamRequired("MinCount"))
}
+ if s.ElasticGpuSpecification != nil {
+ for i, v := range s.ElasticGpuSpecification {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecification", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
if s.Monitoring != nil {
if err := s.Monitoring.Validate(); err != nil {
invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams))
@@ -46883,6 +52223,12 @@ func (s *RunInstancesInput) SetEbsOptimized(v bool) *RunInstancesInput {
return s
}
+// SetElasticGpuSpecification sets the ElasticGpuSpecification field's value.
+func (s *RunInstancesInput) SetElasticGpuSpecification(v []*ElasticGpuSpecification) *RunInstancesInput {
+ s.ElasticGpuSpecification = v
+ return s
+}
+
// SetIamInstanceProfile sets the IamInstanceProfile field's value.
func (s *RunInstancesInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RunInstancesInput {
s.IamInstanceProfile = v
@@ -46991,6 +52337,12 @@ func (s *RunInstancesInput) SetSubnetId(v string) *RunInstancesInput {
return s
}
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *RunInstancesInput) SetTagSpecifications(v []*TagSpecification) *RunInstancesInput {
+ s.TagSpecifications = v
+ return s
+}
+
// SetUserData sets the UserData field's value.
func (s *RunInstancesInput) SetUserData(v string) *RunInstancesInput {
s.UserData = &v
@@ -49010,6 +54362,9 @@ type SpotFleetLaunchSpecification struct {
// subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
SubnetId *string `locationName:"subnetId" type:"string"`
+ // The tags to apply during creation.
+ TagSpecifications []*SpotFleetTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"`
+
// The user data to make available to the instances. If you are using an AWS
// SDK or command line tool, Base64-encoding is performed for you, and you can
// load the text from a file. Otherwise, you must provide Base64-encoded text.
@@ -49145,6 +54500,12 @@ func (s *SpotFleetLaunchSpecification) SetSubnetId(v string) *SpotFleetLaunchSpe
return s
}
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *SpotFleetLaunchSpecification) SetTagSpecifications(v []*SpotFleetTagSpecification) *SpotFleetLaunchSpecification {
+ s.TagSpecifications = v
+ return s
+}
+
// SetUserData sets the UserData field's value.
func (s *SpotFleetLaunchSpecification) SetUserData(v string) *SpotFleetLaunchSpecification {
s.UserData = &v
@@ -49454,6 +54815,41 @@ func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetReques
return s
}
+// The tags for a Spot fleet resource.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetTagSpecification
+type SpotFleetTagSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of resource. Currently, the only resource type that is supported
+ // is instance.
+ ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
+
+ // The tags.
+ Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s SpotFleetTagSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotFleetTagSpecification) GoString() string {
+ return s.String()
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *SpotFleetTagSpecification) SetResourceType(v string) *SpotFleetTagSpecification {
+ s.ResourceType = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification {
+ s.Tags = v
+ return s
+}
+
// Describes a Spot instance request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceRequest
type SpotInstanceRequest struct {
@@ -50244,6 +55640,40 @@ func (s *Storage) SetS3(v *S3Storage) *Storage {
return s
}
+// Describes a storage location in Amazon S3.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StorageLocation
+type StorageLocation struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the S3 bucket.
+ Bucket *string `type:"string"`
+
+ // The key.
+ Key *string `type:"string"`
+}
+
+// String returns the string representation
+func (s StorageLocation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StorageLocation) GoString() string {
+ return s.String()
+}
+
+// SetBucket sets the Bucket field's value.
+func (s *StorageLocation) SetBucket(v string) *StorageLocation {
+ s.Bucket = &v
+ return s
+}
+
+// SetKey sets the Key field's value.
+func (s *StorageLocation) SetKey(v string) *StorageLocation {
+ s.Key = &v
+ return s
+}
+
// Describes a subnet.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Subnet
type Subnet struct {
@@ -50531,6 +55961,41 @@ func (s *TagDescription) SetValue(v string) *TagDescription {
return s
}
+// The tags to apply to a resource when the resource is being created.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TagSpecification
+type TagSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of resource to tag. Currently, the resource types that support tagging
+ // on creation are instance and volume.
+ ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
+
+ // The tags to apply to the resource.
+ Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s TagSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TagSpecification) GoString() string {
+ return s.String()
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *TagSpecification) SetResourceType(v string) *TagSpecification {
+ s.ResourceType = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification {
+ s.Tags = v
+ return s
+}
+
// Information about the Convertible Reserved Instance offering.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetConfiguration
type TargetConfiguration struct {
@@ -52219,15 +57684,15 @@ func (s *VpcIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *VpcCidrBlockState
type VpcPeeringConnection struct {
_ struct{} `type:"structure"`
- // Information about the accepter VPC. CIDR block information is not returned
- // when creating a VPC peering connection, or when describing a VPC peering
- // connection that's in the initiating-request or pending-acceptance state.
+ // Information about the accepter VPC. CIDR block information is only returned
+ // when describing an active VPC peering connection.
AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"`
// The time that an unaccepted VPC peering connection will expire.
ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"`
- // Information about the requester VPC.
+ // Information about the requester VPC. CIDR block information is only returned
+ // when describing an active VPC peering connection.
RequesterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"requesterVpcInfo" type:"structure"`
// The status of the VPC peering connection.
@@ -52938,6 +58403,19 @@ const (
DomainTypeStandard = "standard"
)
+const (
+ // ElasticGpuStateAttached is a ElasticGpuState enum value
+ ElasticGpuStateAttached = "ATTACHED"
+)
+
+const (
+ // ElasticGpuStatusOk is a ElasticGpuStatus enum value
+ ElasticGpuStatusOk = "OK"
+
+ // ElasticGpuStatusImpaired is a ElasticGpuStatus enum value
+ ElasticGpuStatusImpaired = "IMPAIRED"
+)
+
const (
// EventCodeInstanceReboot is a EventCode enum value
EventCodeInstanceReboot = "instance-reboot"
@@ -53018,6 +58496,20 @@ const (
FlowLogsResourceTypeNetworkInterface = "NetworkInterface"
)
+const (
+ // FpgaImageStateCodePending is a FpgaImageStateCode enum value
+ FpgaImageStateCodePending = "pending"
+
+ // FpgaImageStateCodeFailed is a FpgaImageStateCode enum value
+ FpgaImageStateCodeFailed = "failed"
+
+ // FpgaImageStateCodeAvailable is a FpgaImageStateCode enum value
+ FpgaImageStateCodeAvailable = "available"
+
+ // FpgaImageStateCodeUnavailable is a FpgaImageStateCode enum value
+ FpgaImageStateCodeUnavailable = "unavailable"
+)
+
const (
// GatewayTypeIpsec1 is a GatewayType enum value
GatewayTypeIpsec1 = "ipsec.1"
@@ -53392,6 +58884,15 @@ const (
// InstanceTypeG28xlarge is a InstanceType enum value
InstanceTypeG28xlarge = "g2.8xlarge"
+ // InstanceTypeG34xlarge is a InstanceType enum value
+ InstanceTypeG34xlarge = "g3.4xlarge"
+
+ // InstanceTypeG38xlarge is a InstanceType enum value
+ InstanceTypeG38xlarge = "g3.8xlarge"
+
+ // InstanceTypeG316xlarge is a InstanceType enum value
+ InstanceTypeG316xlarge = "g3.16xlarge"
+
// InstanceTypeCg14xlarge is a InstanceType enum value
InstanceTypeCg14xlarge = "cg1.4xlarge"
@@ -53423,6 +58924,14 @@ const (
InstanceTypeF116xlarge = "f1.16xlarge"
)
+const (
+ // InterfacePermissionTypeInstanceAttach is a InterfacePermissionType enum value
+ InterfacePermissionTypeInstanceAttach = "INSTANCE-ATTACH"
+
+ // InterfacePermissionTypeEipAssociate is a InterfacePermissionType enum value
+ InterfacePermissionTypeEipAssociate = "EIP-ASSOCIATE"
+)
+
const (
// ListingStateAvailable is a ListingState enum value
ListingStateAvailable = "available"
@@ -53504,6 +59013,20 @@ const (
NetworkInterfaceAttributeAttachment = "attachment"
)
+const (
+ // NetworkInterfacePermissionStateCodePending is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodePending = "pending"
+
+ // NetworkInterfacePermissionStateCodeGranted is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodeGranted = "granted"
+
+ // NetworkInterfacePermissionStateCodeRevoking is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodeRevoking = "revoking"
+
+ // NetworkInterfacePermissionStateCodeRevoked is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodeRevoked = "revoked"
+)
+
const (
// NetworkInterfaceStatusAvailable is a NetworkInterfaceStatus enum value
NetworkInterfaceStatusAvailable = "available"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
new file mode 100644
index 000000000..547167782
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
@@ -0,0 +1,31 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package ec2 provides the client and types for making API
+// requests to Amazon Elastic Compute Cloud.
+//
+// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
+// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
+// need to invest in hardware up front, so you can develop and deploy applications
+// faster.
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service.
+//
+// See ec2 package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/
+//
+// Using the Client
+//
+// To Amazon Elastic Compute Cloud with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
+//
+// See the SDK's documentation for more information on how to use the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws.Config documentation for more information on configuring SDK clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon Elastic Compute Cloud client EC2 for more
+// information on creating client for this service.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#New
+package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go
index f90fa6ec5..3d61d7e35 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go
@@ -1,3 +1,3 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
index c289b5b04..ba4433d38 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
@@ -11,13 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/ec2query"
)
-// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
-// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
-// need to invest in hardware up front, so you can develop and deploy applications
-// faster.
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15
+// EC2 provides the API operation methods for making requests to
+// Amazon Elastic Compute Cloud. See this package's package overview docs
+// for details on the service.
+//
+// EC2 methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type EC2 struct {
*client.Client
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
index 7917cbdaf..6914a666b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
@@ -1,1060 +1,1621 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
import (
- "github.com/aws/aws-sdk-go/private/waiter"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilBundleTaskComplete uses the Amazon EC2 API operation
// DescribeBundleTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilBundleTaskComplete(input *DescribeBundleTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeBundleTasks",
- Delay: 15,
+ return c.WaitUntilBundleTaskCompleteWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilBundleTaskCompleteWithContext is an extended version of WaitUntilBundleTaskComplete.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilBundleTaskCompleteWithContext(ctx aws.Context, input *DescribeBundleTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilBundleTaskComplete",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "BundleTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "BundleTasks[].State",
Expected: "complete",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "BundleTasks[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "BundleTasks[].State",
Expected: "failed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeBundleTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeBundleTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilConversionTaskCancelled uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCancelled(input *DescribeConversionTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeConversionTasks",
- Delay: 15,
+ return c.WaitUntilConversionTaskCancelledWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilConversionTaskCancelledWithContext is an extended version of WaitUntilConversionTaskCancelled.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilConversionTaskCancelledWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilConversionTaskCancelled",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ConversionTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "cancelled",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeConversionTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeConversionTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilConversionTaskCompleted uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCompleted(input *DescribeConversionTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeConversionTasks",
- Delay: 15,
+ return c.WaitUntilConversionTaskCompletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilConversionTaskCompletedWithContext is an extended version of WaitUntilConversionTaskCompleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilConversionTaskCompletedWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilConversionTaskCompleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ConversionTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "completed",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "ConversionTasks[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "cancelled",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "ConversionTasks[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "cancelling",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeConversionTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeConversionTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilConversionTaskDeleted uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskDeleted(input *DescribeConversionTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeConversionTasks",
- Delay: 15,
+ return c.WaitUntilConversionTaskDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilConversionTaskDeletedWithContext is an extended version of WaitUntilConversionTaskDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilConversionTaskDeletedWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilConversionTaskDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ConversionTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeConversionTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeConversionTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilCustomerGatewayAvailable uses the Amazon EC2 API operation
// DescribeCustomerGateways to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeCustomerGateways",
- Delay: 15,
+ return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilCustomerGatewayAvailableWithContext is an extended version of WaitUntilCustomerGatewayAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilCustomerGatewayAvailableWithContext(ctx aws.Context, input *DescribeCustomerGatewaysInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilCustomerGatewayAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "CustomerGateways[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "CustomerGateways[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "CustomerGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "CustomerGateways[].State",
Expected: "deleted",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "CustomerGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "CustomerGateways[].State",
Expected: "deleting",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeCustomerGatewaysInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeCustomerGatewaysRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilExportTaskCancelled uses the Amazon EC2 API operation
// DescribeExportTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCancelled(input *DescribeExportTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeExportTasks",
- Delay: 15,
+ return c.WaitUntilExportTaskCancelledWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilExportTaskCancelledWithContext is an extended version of WaitUntilExportTaskCancelled.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilExportTaskCancelledWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilExportTaskCancelled",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ExportTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ExportTasks[].State",
Expected: "cancelled",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeExportTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeExportTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilExportTaskCompleted uses the Amazon EC2 API operation
// DescribeExportTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeExportTasks",
- Delay: 15,
+ return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilExportTaskCompletedWithContext is an extended version of WaitUntilExportTaskCompleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilExportTaskCompletedWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilExportTaskCompleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ExportTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ExportTasks[].State",
Expected: "completed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeExportTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeExportTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilImageAvailable uses the Amazon EC2 API operation
// DescribeImages to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeImages",
- Delay: 15,
+ return c.WaitUntilImageAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilImageAvailableWithContext is an extended version of WaitUntilImageAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilImageAvailableWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilImageAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Images[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Images[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Images[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Images[].State",
Expected: "failed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilImageExists uses the Amazon EC2 API operation
// DescribeImages to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilImageExists(input *DescribeImagesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeImages",
- Delay: 15,
+ return c.WaitUntilImageExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilImageExistsWithContext is an extended version of WaitUntilImageExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilImageExistsWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilImageExists",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(Images[]) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(Images[]) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidAMIID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceExists uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 5,
+ return c.WaitUntilInstanceExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceExistsWithContext is an extended version of WaitUntilInstanceExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceExistsWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceExists",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(Reservations[]) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(Reservations[]) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidInstanceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceRunning uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceRunning(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 15,
+ return c.WaitUntilInstanceRunningWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceRunningWithContext is an extended version of WaitUntilInstanceRunning.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceRunningWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceRunning",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "running",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "shutting-down",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "stopping",
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidInstanceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceStatusOk uses the Amazon EC2 API operation
// DescribeInstanceStatus to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceStatusOk(input *DescribeInstanceStatusInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstanceStatus",
- Delay: 15,
+ return c.WaitUntilInstanceStatusOkWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceStatusOkWithContext is an extended version of WaitUntilInstanceStatusOk.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceStatusOkWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceStatusOk",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "InstanceStatuses[].InstanceStatus.Status",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "InstanceStatuses[].InstanceStatus.Status",
Expected: "ok",
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidInstanceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstanceStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstanceStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceStopped uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceStopped(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 15,
+ return c.WaitUntilInstanceStoppedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceStoppedWithContext is an extended version of WaitUntilInstanceStopped.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceStoppedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceStopped",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "stopped",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "pending",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceTerminated uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 15,
+ return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceTerminatedWithContext is an extended version of WaitUntilInstanceTerminated.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceTerminated",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "pending",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "stopping",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilKeyPairExists uses the Amazon EC2 API operation
// DescribeKeyPairs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeKeyPairs",
- Delay: 5,
+ return c.WaitUntilKeyPairExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilKeyPairExistsWithContext is an extended version of WaitUntilKeyPairExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilKeyPairExistsWithContext(ctx aws.Context, input *DescribeKeyPairsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilKeyPairExists",
MaxAttempts: 6,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(KeyPairs[].KeyName) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(KeyPairs[].KeyName) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidKeyPair.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeKeyPairsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeKeyPairsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilNatGatewayAvailable uses the Amazon EC2 API operation
// DescribeNatGateways to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeNatGateways",
- Delay: 15,
+ return c.WaitUntilNatGatewayAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilNatGatewayAvailableWithContext is an extended version of WaitUntilNatGatewayAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilNatGatewayAvailableWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilNatGatewayAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "NatGateways[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "NatGateways[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "NatGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State",
Expected: "failed",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "NatGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State",
Expected: "deleting",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "NatGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State",
Expected: "deleted",
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "NatGatewayNotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeNatGatewaysInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeNatGatewaysRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilNetworkInterfaceAvailable uses the Amazon EC2 API operation
// DescribeNetworkInterfaces to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeNetworkInterfaces",
- Delay: 20,
+ return c.WaitUntilNetworkInterfaceAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilNetworkInterfaceAvailableWithContext is an extended version of WaitUntilNetworkInterfaceAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilNetworkInterfaceAvailableWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilNetworkInterfaceAvailable",
MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(20 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "NetworkInterfaces[].Status",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "NetworkInterfaces[].Status",
Expected: "available",
},
{
- State: "failure",
- Matcher: "error",
- Argument: "",
+ State: request.FailureWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidNetworkInterfaceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeNetworkInterfacesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeNetworkInterfacesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilPasswordDataAvailable uses the Amazon EC2 API operation
// GetPasswordData to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error {
- waiterCfg := waiter.Config{
- Operation: "GetPasswordData",
- Delay: 15,
+ return c.WaitUntilPasswordDataAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilPasswordDataAvailableWithContext is an extended version of WaitUntilPasswordDataAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilPasswordDataAvailableWithContext(ctx aws.Context, input *GetPasswordDataInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilPasswordDataAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(PasswordData) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(PasswordData) > `0`",
Expected: true,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *GetPasswordDataInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.GetPasswordDataRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSnapshotCompleted uses the Amazon EC2 API operation
// DescribeSnapshots to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSnapshotCompleted(input *DescribeSnapshotsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSnapshots",
- Delay: 15,
+ return c.WaitUntilSnapshotCompletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSnapshotCompletedWithContext is an extended version of WaitUntilSnapshotCompleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSnapshotCompletedWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSnapshotCompleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Snapshots[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Snapshots[].State",
Expected: "completed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeSnapshotsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSnapshotsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSpotInstanceRequestFulfilled uses the Amazon EC2 API operation
// DescribeSpotInstanceRequests to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSpotInstanceRequestFulfilled(input *DescribeSpotInstanceRequestsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSpotInstanceRequests",
- Delay: 15,
+ return c.WaitUntilSpotInstanceRequestFulfilledWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSpotInstanceRequestFulfilledWithContext is an extended version of WaitUntilSpotInstanceRequestFulfilled.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context, input *DescribeSpotInstanceRequestsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSpotInstanceRequestFulfilled",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "fulfilled",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "schedule-expired",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "canceled-before-fulfillment",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "bad-parameters",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "system-error",
},
+ {
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
+ Expected: "InvalidSpotInstanceRequestID.NotFound",
+ },
+ },
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeSpotInstanceRequestsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSpotInstanceRequestsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
},
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSubnetAvailable uses the Amazon EC2 API operation
// DescribeSubnets to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSubnets",
- Delay: 15,
+ return c.WaitUntilSubnetAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSubnetAvailableWithContext is an extended version of WaitUntilSubnetAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSubnetAvailableWithContext(ctx aws.Context, input *DescribeSubnetsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSubnetAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Subnets[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Subnets[].State",
Expected: "available",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeSubnetsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSubnetsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSystemStatusOk uses the Amazon EC2 API operation
// DescribeInstanceStatus to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstanceStatus",
- Delay: 15,
+ return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSystemStatusOkWithContext is an extended version of WaitUntilSystemStatusOk.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSystemStatusOkWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSystemStatusOk",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "InstanceStatuses[].SystemStatus.Status",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "InstanceStatuses[].SystemStatus.Status",
Expected: "ok",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstanceStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstanceStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVolumeAvailable uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeAvailable(input *DescribeVolumesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVolumes",
- Delay: 15,
+ return c.WaitUntilVolumeAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVolumeAvailableWithContext is an extended version of WaitUntilVolumeAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVolumeAvailableWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVolumeAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Volumes[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Volumes[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Volumes[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVolumeDeleted uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVolumes",
- Delay: 15,
+ return c.WaitUntilVolumeDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVolumeDeletedWithContext is an extended version of WaitUntilVolumeDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVolumeDeletedWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVolumeDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Volumes[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State",
Expected: "deleted",
},
{
- State: "success",
- Matcher: "error",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVolume.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVolumeInUse uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVolumes",
- Delay: 15,
+ return c.WaitUntilVolumeInUseWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVolumeInUseWithContext is an extended version of WaitUntilVolumeInUse.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVolumeInUseWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVolumeInUse",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Volumes[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State",
Expected: "in-use",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Volumes[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Volumes[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcAvailable uses the Amazon EC2 API operation
// DescribeVpcs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcs",
- Delay: 15,
+ return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcAvailableWithContext is an extended version of WaitUntilVpcAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcAvailableWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Vpcs[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Vpcs[].State",
Expected: "available",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcExists uses the Amazon EC2 API operation
// DescribeVpcs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcs",
- Delay: 1,
+ return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcExistsWithContext is an extended version of WaitUntilVpcExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcExistsWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcExists",
MaxAttempts: 5,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(1 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVpcID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcPeeringConnectionDeleted uses the Amazon EC2 API operation
// DescribeVpcPeeringConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcPeeringConnections",
- Delay: 15,
+ return c.WaitUntilVpcPeeringConnectionDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcPeeringConnectionDeletedWithContext is an extended version of WaitUntilVpcPeeringConnectionDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcPeeringConnectionDeletedWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcPeeringConnectionDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "VpcPeeringConnections[].Status.Code",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "VpcPeeringConnections[].Status.Code",
Expected: "deleted",
},
{
- State: "success",
- Matcher: "error",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVpcPeeringConnectionID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcPeeringConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcPeeringConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcPeeringConnectionExists uses the Amazon EC2 API operation
// DescribeVpcPeeringConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionExists(input *DescribeVpcPeeringConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcPeeringConnections",
- Delay: 15,
+ return c.WaitUntilVpcPeeringConnectionExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcPeeringConnectionExistsWithContext is an extended version of WaitUntilVpcPeeringConnectionExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcPeeringConnectionExistsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcPeeringConnectionExists",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVpcPeeringConnectionID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcPeeringConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcPeeringConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpnConnectionAvailable uses the Amazon EC2 API operation
// DescribeVpnConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpnConnections",
- Delay: 15,
+ return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpnConnectionAvailableWithContext is an extended version of WaitUntilVpnConnectionAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpnConnectionAvailableWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpnConnectionAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "VpnConnections[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "VpnConnections[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "VpnConnections[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State",
Expected: "deleting",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "VpnConnections[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpnConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpnConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpnConnectionDeleted uses the Amazon EC2 API operation
// DescribeVpnConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionDeleted(input *DescribeVpnConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpnConnections",
- Delay: 15,
+ return c.WaitUntilVpnConnectionDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpnConnectionDeletedWithContext is an extended version of WaitUntilVpnConnectionDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpnConnectionDeletedWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpnConnectionDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "VpnConnections[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "VpnConnections[].State",
Expected: "deleted",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "VpnConnections[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State",
Expected: "pending",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpnConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpnConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
index fc46f5145..f9136852f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
@@ -1,11 +1,11 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package ecr provides a client for Amazon EC2 Container Registry.
package ecr
import (
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -14,19 +14,18 @@ const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability"
// BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the
// client's request for the BatchCheckLayerAvailability operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BatchCheckLayerAvailability for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BatchCheckLayerAvailability method directly
-// instead.
+// See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
// req, resp := client.BatchCheckLayerAvailabilityRequest(params)
@@ -84,27 +83,41 @@ func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabil
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
req, out := c.BatchCheckLayerAvailabilityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BatchCheckLayerAvailability for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) {
+ req, out := c.BatchCheckLayerAvailabilityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opBatchDeleteImage = "BatchDeleteImage"
// BatchDeleteImageRequest generates a "aws/request.Request" representing the
// client's request for the BatchDeleteImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BatchDeleteImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BatchDeleteImage method directly
-// instead.
+// See BatchDeleteImage for more information on using the BatchDeleteImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BatchDeleteImageRequest method.
// req, resp := client.BatchDeleteImageRequest(params)
@@ -165,27 +178,41 @@ func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
req, out := c.BatchDeleteImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BatchDeleteImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) {
+ req, out := c.BatchDeleteImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opBatchGetImage = "BatchGetImage"
// BatchGetImageRequest generates a "aws/request.Request" representing the
// client's request for the BatchGetImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BatchGetImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BatchGetImage method directly
-// instead.
+// See BatchGetImage for more information on using the BatchGetImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BatchGetImageRequest method.
// req, resp := client.BatchGetImageRequest(params)
@@ -239,27 +266,41 @@ func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
req, out := c.BatchGetImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BatchGetImageWithContext is the same as BatchGetImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BatchGetImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) {
+ req, out := c.BatchGetImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCompleteLayerUpload = "CompleteLayerUpload"
// CompleteLayerUploadRequest generates a "aws/request.Request" representing the
// client's request for the CompleteLayerUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CompleteLayerUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CompleteLayerUpload method directly
-// instead.
+// See CompleteLayerUpload for more information on using the CompleteLayerUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CompleteLayerUploadRequest method.
// req, resp := client.CompleteLayerUploadRequest(params)
@@ -335,27 +376,41 @@ func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
req, out := c.CompleteLayerUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CompleteLayerUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) {
+ req, out := c.CompleteLayerUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateRepository = "CreateRepository"
// CreateRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the CreateRepository operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRepository for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRepository method directly
-// instead.
+// See CreateRepository for more information on using the CreateRepository
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRepositoryRequest method.
// req, resp := client.CreateRepositoryRequest(params)
@@ -413,27 +468,41 @@ func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
req, out := c.CreateRepositoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateRepositoryWithContext is the same as CreateRepository with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateRepository for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) {
+ req, out := c.CreateRepositoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRepository = "DeleteRepository"
// DeleteRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepository operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRepository for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRepository method directly
-// instead.
+// See DeleteRepository for more information on using the DeleteRepository
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRepositoryRequest method.
// req, resp := client.DeleteRepositoryRequest(params)
@@ -491,27 +560,41 @@ func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
req, out := c.DeleteRepositoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRepositoryWithContext is the same as DeleteRepository with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRepository for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) {
+ req, out := c.DeleteRepositoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
// DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepositoryPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRepositoryPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRepositoryPolicy method directly
-// instead.
+// See DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRepositoryPolicyRequest method.
// req, resp := client.DeleteRepositoryPolicyRequest(params)
@@ -568,27 +651,41 @@ func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
req, out := c.DeleteRepositoryPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRepositoryPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) {
+ req, out := c.DeleteRepositoryPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImages = "DescribeImages"
// DescribeImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImages method directly
-// instead.
+// See DescribeImages for more information on using the DescribeImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImagesRequest method.
// req, resp := client.DescribeImagesRequest(params)
@@ -656,8 +753,23 @@ func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImagesWithContext is the same as DescribeImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
+ req, out := c.DescribeImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeImagesPages iterates over the pages of a DescribeImages operation,
@@ -677,31 +789,55 @@ func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput,
// return pageNum <= 3
// })
//
-func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(p *DescribeImagesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeImagesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeImagesOutput), lastPage)
- })
+func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error {
+ return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeImagesPagesWithContext same as DescribeImagesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeRepositories = "DescribeRepositories"
// DescribeRepositoriesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRepositories operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRepositories for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRepositories method directly
-// instead.
+// See DescribeRepositories for more information on using the DescribeRepositories
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRepositoriesRequest method.
// req, resp := client.DescribeRepositoriesRequest(params)
@@ -760,8 +896,23 @@ func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
req, out := c.DescribeRepositoriesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeRepositories for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) {
+ req, out := c.DescribeRepositoriesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation,
@@ -781,31 +932,55 @@ func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeR
// return pageNum <= 3
// })
//
-func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(p *DescribeRepositoriesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeRepositoriesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeRepositoriesOutput), lastPage)
- })
+func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error {
+ return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeRepositoriesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeRepositoriesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opGetAuthorizationToken = "GetAuthorizationToken"
// GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetAuthorizationToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetAuthorizationToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetAuthorizationToken method directly
-// instead.
+// See GetAuthorizationToken for more information on using the GetAuthorizationToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetAuthorizationTokenRequest method.
// req, resp := client.GetAuthorizationTokenRequest(params)
@@ -861,27 +1036,41 @@ func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
req, out := c.GetAuthorizationTokenRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetAuthorizationToken for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) {
+ req, out := c.GetAuthorizationTokenRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
// GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
// client's request for the GetDownloadUrlForLayer operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetDownloadUrlForLayer for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetDownloadUrlForLayer method directly
-// instead.
+// See GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetDownloadUrlForLayerRequest method.
// req, resp := client.GetDownloadUrlForLayerRequest(params)
@@ -947,27 +1136,41 @@ func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
req, out := c.GetDownloadUrlForLayerRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetDownloadUrlForLayer for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) {
+ req, out := c.GetDownloadUrlForLayerRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetRepositoryPolicy = "GetRepositoryPolicy"
// GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetRepositoryPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetRepositoryPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetRepositoryPolicy method directly
-// instead.
+// See GetRepositoryPolicy for more information on using the GetRepositoryPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetRepositoryPolicyRequest method.
// req, resp := client.GetRepositoryPolicyRequest(params)
@@ -1024,27 +1227,41 @@ func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
req, out := c.GetRepositoryPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetRepositoryPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) {
+ req, out := c.GetRepositoryPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opInitiateLayerUpload = "InitiateLayerUpload"
// InitiateLayerUploadRequest generates a "aws/request.Request" representing the
// client's request for the InitiateLayerUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See InitiateLayerUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the InitiateLayerUpload method directly
-// instead.
+// See InitiateLayerUpload for more information on using the InitiateLayerUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the InitiateLayerUploadRequest method.
// req, resp := client.InitiateLayerUploadRequest(params)
@@ -1101,27 +1318,41 @@ func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
req, out := c.InitiateLayerUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See InitiateLayerUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) {
+ req, out := c.InitiateLayerUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListImages = "ListImages"
// ListImagesRequest generates a "aws/request.Request" representing the
// client's request for the ListImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListImages method directly
-// instead.
+// See ListImages for more information on using the ListImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListImagesRequest method.
// req, resp := client.ListImagesRequest(params)
@@ -1186,8 +1417,23 @@ func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
req, out := c.ListImagesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListImagesWithContext is the same as ListImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) {
+ req, out := c.ListImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListImagesPages iterates over the pages of a ListImages operation,
@@ -1207,31 +1453,55 @@ func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
// return pageNum <= 3
// })
//
-func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(p *ListImagesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListImagesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListImagesOutput), lastPage)
- })
+func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error {
+ return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListImagesPagesWithContext same as ListImagesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opPutImage = "PutImage"
// PutImageRequest generates a "aws/request.Request" representing the
// client's request for the PutImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutImage method directly
-// instead.
+// See PutImage for more information on using the PutImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutImageRequest method.
// req, resp := client.PutImageRequest(params)
@@ -1302,27 +1572,41 @@ func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, outpu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
req, out := c.PutImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutImageWithContext is the same as PutImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) {
+ req, out := c.PutImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opSetRepositoryPolicy = "SetRepositoryPolicy"
// SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the SetRepositoryPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See SetRepositoryPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the SetRepositoryPolicy method directly
-// instead.
+// See SetRepositoryPolicy for more information on using the SetRepositoryPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the SetRepositoryPolicyRequest method.
// req, resp := client.SetRepositoryPolicyRequest(params)
@@ -1375,27 +1659,41 @@ func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
req, out := c.SetRepositoryPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See SetRepositoryPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) {
+ req, out := c.SetRepositoryPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUploadLayerPart = "UploadLayerPart"
// UploadLayerPartRequest generates a "aws/request.Request" representing the
// client's request for the UploadLayerPart operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadLayerPart for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadLayerPart method directly
-// instead.
+// See UploadLayerPart for more information on using the UploadLayerPart
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadLayerPartRequest method.
// req, resp := client.UploadLayerPartRequest(params)
@@ -1466,8 +1764,23 @@ func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
req, out := c.UploadLayerPartRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UploadLayerPartWithContext is the same as UploadLayerPart with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UploadLayerPart for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) {
+ req, out := c.UploadLayerPartRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// An object representing authorization data for an Amazon ECR registry.
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
new file mode 100644
index 000000000..987aa72fa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
@@ -0,0 +1,33 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package ecr provides the client and types for making API
+// requests to Amazon EC2 Container Registry.
+//
+// Amazon EC2 Container Registry (Amazon ECR) is a managed AWS Docker registry
+// service. Customers can use the familiar Docker CLI to push, pull, and manage
+// images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon
+// ECR supports private Docker repositories with resource-based permissions
+// using AWS IAM so that specific users or Amazon EC2 instances can access repositories
+// and images. Developers can use the Docker CLI to author and manage images.
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21 for more information on this service.
+//
+// See ecr package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/
+//
+// Using the Client
+//
+// To Amazon EC2 Container Registry with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
+//
+// See the SDK's documentation for more information on how to use the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws.Config documentation for more information on configuring SDK clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon EC2 Container Registry client ECR for more
+// information on creating client for this service.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/#New
+package ecr
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go
index c51948bc7..4399e6a29 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ecr
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go
index 2c7904b75..95de12e25 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ecr
@@ -11,15 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
-// Amazon EC2 Container Registry (Amazon ECR) is a managed AWS Docker registry
-// service. Customers can use the familiar Docker CLI to push, pull, and manage
-// images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon
-// ECR supports private Docker repositories with resource-based permissions
-// using AWS IAM so that specific users or Amazon EC2 instances can access repositories
-// and images. Developers can use the Docker CLI to author and manage images.
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21
+// ECR provides the API operation methods for making requests to
+// Amazon EC2 Container Registry. See this package's package overview docs
+// for details on the service.
+//
+// ECR methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type ECR struct {
*client.Client
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
index 9b205f3f0..e65ef266f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
@@ -1,6 +1,5 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package s3 provides a client for Amazon Simple Storage Service.
package s3
import (
@@ -8,6 +7,7 @@ import (
"io"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
@@ -18,19 +18,18 @@ const opAbortMultipartUpload = "AbortMultipartUpload"
// AbortMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the AbortMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AbortMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AbortMultipartUpload method directly
-// instead.
+// See AbortMultipartUpload for more information on using the AbortMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AbortMultipartUploadRequest method.
// req, resp := client.AbortMultipartUploadRequest(params)
@@ -79,27 +78,41 @@ func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
req, out := c.AbortMultipartUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AbortMultipartUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
+ req, out := c.AbortMultipartUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCompleteMultipartUpload = "CompleteMultipartUpload"
// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the CompleteMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CompleteMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CompleteMultipartUpload method directly
-// instead.
+// See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CompleteMultipartUploadRequest method.
// req, resp := client.CompleteMultipartUploadRequest(params)
@@ -139,27 +152,41 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
req, out := c.CompleteMultipartUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CompleteMultipartUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
+ req, out := c.CompleteMultipartUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCopyObject = "CopyObject"
// CopyObjectRequest generates a "aws/request.Request" representing the
// client's request for the CopyObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopyObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopyObject method directly
-// instead.
+// See CopyObject for more information on using the CopyObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopyObjectRequest method.
// req, resp := client.CopyObjectRequest(params)
@@ -205,27 +232,41 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
req, out := c.CopyObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CopyObjectWithContext is the same as CopyObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopyObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
+ req, out := c.CopyObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateBucket = "CreateBucket"
// CreateBucketRequest generates a "aws/request.Request" representing the
// client's request for the CreateBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateBucket method directly
-// instead.
+// See CreateBucket for more information on using the CreateBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateBucketRequest method.
// req, resp := client.CreateBucketRequest(params)
@@ -273,27 +314,41 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
req, out := c.CreateBucketRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateBucketWithContext is the same as CreateBucket with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateBucket for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
+ req, out := c.CreateBucketRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateMultipartUpload = "CreateMultipartUpload"
// CreateMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the CreateMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateMultipartUpload method directly
-// instead.
+// See CreateMultipartUpload for more information on using the CreateMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateMultipartUploadRequest method.
// req, resp := client.CreateMultipartUploadRequest(params)
@@ -339,27 +394,41 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
req, out := c.CreateMultipartUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateMultipartUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
+ req, out := c.CreateMultipartUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucket = "DeleteBucket"
// DeleteBucketRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucket method directly
-// instead.
+// See DeleteBucket for more information on using the DeleteBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketRequest method.
// req, resp := client.DeleteBucketRequest(params)
@@ -402,27 +471,41 @@ func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
req, out := c.DeleteBucketRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketWithContext is the same as DeleteBucket with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucket for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
+ req, out := c.DeleteBucketRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
// DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketAnalyticsConfiguration method directly
-// instead.
+// See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
// req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
@@ -465,27 +548,41 @@ func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyt
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
+ req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketCors = "DeleteBucketCors"
// DeleteBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketCors method directly
-// instead.
+// See DeleteBucketCors for more information on using the DeleteBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketCorsRequest method.
// req, resp := client.DeleteBucketCorsRequest(params)
@@ -527,27 +624,41 @@ func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
req, out := c.DeleteBucketCorsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketCors for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
+ req, out := c.DeleteBucketCorsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
// DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketInventoryConfiguration method directly
-// instead.
+// See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
// req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
@@ -590,27 +701,41 @@ func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInvent
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
req, out := c.DeleteBucketInventoryConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketInventoryConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
+ req, out := c.DeleteBucketInventoryConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
// DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketLifecycle method directly
-// instead.
+// See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketLifecycleRequest method.
// req, resp := client.DeleteBucketLifecycleRequest(params)
@@ -652,27 +777,41 @@ func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
req, out := c.DeleteBucketLifecycleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketLifecycle for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
+ req, out := c.DeleteBucketLifecycleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
// DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketMetricsConfiguration method directly
-// instead.
+// See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
// req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
@@ -715,27 +854,41 @@ func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsC
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
req, out := c.DeleteBucketMetricsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketMetricsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
+ req, out := c.DeleteBucketMetricsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketPolicy = "DeleteBucketPolicy"
// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketPolicy method directly
-// instead.
+// See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketPolicyRequest method.
// req, resp := client.DeleteBucketPolicyRequest(params)
@@ -777,27 +930,41 @@ func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
req, out := c.DeleteBucketPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
+ req, out := c.DeleteBucketPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketReplication = "DeleteBucketReplication"
// DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketReplication method directly
-// instead.
+// See DeleteBucketReplication for more information on using the DeleteBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketReplicationRequest method.
// req, resp := client.DeleteBucketReplicationRequest(params)
@@ -839,27 +1006,41 @@ func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
req, out := c.DeleteBucketReplicationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketReplication for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
+ req, out := c.DeleteBucketReplicationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketTagging = "DeleteBucketTagging"
// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketTagging method directly
-// instead.
+// See DeleteBucketTagging for more information on using the DeleteBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketTaggingRequest method.
// req, resp := client.DeleteBucketTaggingRequest(params)
@@ -901,27 +1082,41 @@ func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
req, out := c.DeleteBucketTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
+ req, out := c.DeleteBucketTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketWebsite = "DeleteBucketWebsite"
// DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketWebsite method directly
-// instead.
+// See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketWebsiteRequest method.
// req, resp := client.DeleteBucketWebsiteRequest(params)
@@ -963,27 +1158,41 @@ func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
req, out := c.DeleteBucketWebsiteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketWebsite for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
+ req, out := c.DeleteBucketWebsiteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteObject = "DeleteObject"
// DeleteObjectRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObject method directly
-// instead.
+// See DeleteObject for more information on using the DeleteObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectRequest method.
// req, resp := client.DeleteObjectRequest(params)
@@ -1025,27 +1234,41 @@ func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
req, out := c.DeleteObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteObjectWithContext is the same as DeleteObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
+ req, out := c.DeleteObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteObjectTagging = "DeleteObjectTagging"
// DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObjectTagging method directly
-// instead.
+// See DeleteObjectTagging for more information on using the DeleteObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectTaggingRequest method.
// req, resp := client.DeleteObjectTaggingRequest(params)
@@ -1085,27 +1308,41 @@ func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
req, out := c.DeleteObjectTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteObjectTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
+ req, out := c.DeleteObjectTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteObjects = "DeleteObjects"
// DeleteObjectsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObjects operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObjects for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObjects method directly
-// instead.
+// See DeleteObjects for more information on using the DeleteObjects
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectsRequest method.
// req, resp := client.DeleteObjectsRequest(params)
@@ -1146,27 +1383,41 @@ func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
req, out := c.DeleteObjectsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteObjectsWithContext is the same as DeleteObjects with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteObjects for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
+ req, out := c.DeleteObjectsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
// GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAccelerateConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAccelerateConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAccelerateConfiguration method directly
-// instead.
+// See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
// req, resp := client.GetBucketAccelerateConfigurationRequest(params)
@@ -1206,27 +1457,41 @@ func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateC
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
req, out := c.GetBucketAccelerateConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketAccelerateConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
+ req, out := c.GetBucketAccelerateConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketAcl = "GetBucketAcl"
// GetBucketAclRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAcl method directly
-// instead.
+// See GetBucketAcl for more information on using the GetBucketAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAclRequest method.
// req, resp := client.GetBucketAclRequest(params)
@@ -1266,27 +1531,41 @@ func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
req, out := c.GetBucketAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketAclWithContext is the same as GetBucketAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
+ req, out := c.GetBucketAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
// GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAnalyticsConfiguration method directly
-// instead.
+// See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
// req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
@@ -1327,27 +1606,41 @@ func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
req, out := c.GetBucketAnalyticsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketAnalyticsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
+ req, out := c.GetBucketAnalyticsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketCors = "GetBucketCors"
// GetBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketCors method directly
-// instead.
+// See GetBucketCors for more information on using the GetBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketCorsRequest method.
// req, resp := client.GetBucketCorsRequest(params)
@@ -1387,27 +1680,41 @@ func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
req, out := c.GetBucketCorsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketCorsWithContext is the same as GetBucketCors with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketCors for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
+ req, out := c.GetBucketCorsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
// GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketInventoryConfiguration method directly
-// instead.
+// See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketInventoryConfigurationRequest method.
// req, resp := client.GetBucketInventoryConfigurationRequest(params)
@@ -1448,27 +1755,41 @@ func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
req, out := c.GetBucketInventoryConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketInventoryConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
+ req, out := c.GetBucketInventoryConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLifecycle = "GetBucketLifecycle"
// GetBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLifecycle method directly
-// instead.
+// See GetBucketLifecycle for more information on using the GetBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLifecycleRequest method.
// req, resp := client.GetBucketLifecycleRequest(params)
@@ -1511,27 +1832,41 @@ func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
req, out := c.GetBucketLifecycleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLifecycle for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
+ req, out := c.GetBucketLifecycleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
// GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLifecycleConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLifecycleConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLifecycleConfiguration method directly
-// instead.
+// See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
// req, resp := client.GetBucketLifecycleConfigurationRequest(params)
@@ -1571,27 +1906,41 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
req, out := c.GetBucketLifecycleConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLifecycleConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
+ req, out := c.GetBucketLifecycleConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLocation = "GetBucketLocation"
// GetBucketLocationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLocation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLocation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLocation method directly
-// instead.
+// See GetBucketLocation for more information on using the GetBucketLocation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLocationRequest method.
// req, resp := client.GetBucketLocationRequest(params)
@@ -1631,27 +1980,41 @@ func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
req, out := c.GetBucketLocationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLocation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
+ req, out := c.GetBucketLocationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLogging = "GetBucketLogging"
// GetBucketLoggingRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLogging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLogging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLogging method directly
-// instead.
+// See GetBucketLogging for more information on using the GetBucketLogging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLoggingRequest method.
// req, resp := client.GetBucketLoggingRequest(params)
@@ -1692,27 +2055,41 @@ func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
req, out := c.GetBucketLoggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLogging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
+ req, out := c.GetBucketLoggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
// GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketMetricsConfiguration method directly
-// instead.
+// See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketMetricsConfigurationRequest method.
// req, resp := client.GetBucketMetricsConfigurationRequest(params)
@@ -1753,27 +2130,41 @@ func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
req, out := c.GetBucketMetricsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketMetricsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
+ req, out := c.GetBucketMetricsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketNotification = "GetBucketNotification"
// GetBucketNotificationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketNotification operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketNotification for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketNotification method directly
-// instead.
+// See GetBucketNotification for more information on using the GetBucketNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketNotificationRequest method.
// req, resp := client.GetBucketNotificationRequest(params)
@@ -1816,27 +2207,41 @@ func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurat
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
req, out := c.GetBucketNotificationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketNotification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
+ req, out := c.GetBucketNotificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
// GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketNotificationConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketNotificationConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketNotificationConfiguration method directly
-// instead.
+// See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketNotificationConfigurationRequest method.
// req, resp := client.GetBucketNotificationConfigurationRequest(params)
@@ -1876,27 +2281,41 @@ func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificat
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
req, out := c.GetBucketNotificationConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketNotificationConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
+ req, out := c.GetBucketNotificationConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketPolicy = "GetBucketPolicy"
// GetBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketPolicy method directly
-// instead.
+// See GetBucketPolicy for more information on using the GetBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketPolicyRequest method.
// req, resp := client.GetBucketPolicyRequest(params)
@@ -1936,27 +2355,41 @@ func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.R
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
req, out := c.GetBucketPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
+ req, out := c.GetBucketPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketReplication = "GetBucketReplication"
// GetBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketReplication method directly
-// instead.
+// See GetBucketReplication for more information on using the GetBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketReplicationRequest method.
// req, resp := client.GetBucketReplicationRequest(params)
@@ -1996,27 +2429,41 @@ func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
req, out := c.GetBucketReplicationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketReplication for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
+ req, out := c.GetBucketReplicationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketRequestPayment = "GetBucketRequestPayment"
// GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketRequestPayment operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketRequestPayment for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketRequestPayment method directly
-// instead.
+// See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketRequestPaymentRequest method.
// req, resp := client.GetBucketRequestPaymentRequest(params)
@@ -2056,27 +2503,41 @@ func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
req, out := c.GetBucketRequestPaymentRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketRequestPayment for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
+ req, out := c.GetBucketRequestPaymentRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketTagging = "GetBucketTagging"
// GetBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketTagging method directly
-// instead.
+// See GetBucketTagging for more information on using the GetBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketTaggingRequest method.
// req, resp := client.GetBucketTaggingRequest(params)
@@ -2116,27 +2577,41 @@ func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
req, out := c.GetBucketTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
+ req, out := c.GetBucketTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketVersioning = "GetBucketVersioning"
// GetBucketVersioningRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketVersioning operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketVersioning for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketVersioning method directly
-// instead.
+// See GetBucketVersioning for more information on using the GetBucketVersioning
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketVersioningRequest method.
// req, resp := client.GetBucketVersioningRequest(params)
@@ -2176,27 +2651,41 @@ func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
req, out := c.GetBucketVersioningRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketVersioning for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
+ req, out := c.GetBucketVersioningRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketWebsite = "GetBucketWebsite"
// GetBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketWebsite method directly
-// instead.
+// See GetBucketWebsite for more information on using the GetBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketWebsiteRequest method.
// req, resp := client.GetBucketWebsiteRequest(params)
@@ -2236,27 +2725,41 @@ func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
req, out := c.GetBucketWebsiteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketWebsite for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
+ req, out := c.GetBucketWebsiteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObject = "GetObject"
// GetObjectRequest generates a "aws/request.Request" representing the
// client's request for the GetObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObject method directly
-// instead.
+// See GetObject for more information on using the GetObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectRequest method.
// req, resp := client.GetObjectRequest(params)
@@ -2301,27 +2804,41 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
req, out := c.GetObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectWithContext is the same as GetObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
+ req, out := c.GetObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObjectAcl = "GetObjectAcl"
// GetObjectAclRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectAcl method directly
-// instead.
+// See GetObjectAcl for more information on using the GetObjectAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectAclRequest method.
// req, resp := client.GetObjectAclRequest(params)
@@ -2366,27 +2883,41 @@ func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
req, out := c.GetObjectAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectAclWithContext is the same as GetObjectAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObjectAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
+ req, out := c.GetObjectAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObjectTagging = "GetObjectTagging"
// GetObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectTagging method directly
-// instead.
+// See GetObjectTagging for more information on using the GetObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectTaggingRequest method.
// req, resp := client.GetObjectTaggingRequest(params)
@@ -2426,27 +2957,41 @@ func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
req, out := c.GetObjectTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObjectTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
+ req, out := c.GetObjectTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObjectTorrent = "GetObjectTorrent"
// GetObjectTorrentRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectTorrent operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectTorrent for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectTorrent method directly
-// instead.
+// See GetObjectTorrent for more information on using the GetObjectTorrent
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectTorrentRequest method.
// req, resp := client.GetObjectTorrentRequest(params)
@@ -2486,27 +3031,41 @@ func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
req, out := c.GetObjectTorrentRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObjectTorrent for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
+ req, out := c.GetObjectTorrentRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opHeadBucket = "HeadBucket"
// HeadBucketRequest generates a "aws/request.Request" representing the
// client's request for the HeadBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See HeadBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the HeadBucket method directly
-// instead.
+// See HeadBucket for more information on using the HeadBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the HeadBucketRequest method.
// req, resp := client.HeadBucketRequest(params)
@@ -2554,27 +3113,41 @@ func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, ou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
req, out := c.HeadBucketRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// HeadBucketWithContext is the same as HeadBucket with the addition of
+// the ability to pass a context and additional request options.
+//
+// See HeadBucket for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
+ req, out := c.HeadBucketRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opHeadObject = "HeadObject"
// HeadObjectRequest generates a "aws/request.Request" representing the
// client's request for the HeadObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See HeadObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the HeadObject method directly
-// instead.
+// See HeadObject for more information on using the HeadObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the HeadObjectRequest method.
// req, resp := client.HeadObjectRequest(params)
@@ -2607,41 +3180,53 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou
// object itself. This operation is useful if you're only interested in an object's
// metadata. To use HEAD, you must have READ access to the object.
//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
+// for more information on returned errors.
+//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation HeadObject for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
req, out := c.HeadObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// HeadObjectWithContext is the same as HeadObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See HeadObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
+ req, out := c.HeadObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketAnalyticsConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketAnalyticsConfigurations method directly
-// instead.
+// See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
@@ -2681,27 +3266,41 @@ func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalytics
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBucketAnalyticsConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
+ req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketInventoryConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketInventoryConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketInventoryConfigurations method directly
-// instead.
+// See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
// req, resp := client.ListBucketInventoryConfigurationsRequest(params)
@@ -2741,27 +3340,41 @@ func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventory
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
req, out := c.ListBucketInventoryConfigurationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBucketInventoryConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
+ req, out := c.ListBucketInventoryConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketMetricsConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketMetricsConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketMetricsConfigurations method directly
-// instead.
+// See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
// req, resp := client.ListBucketMetricsConfigurationsRequest(params)
@@ -2801,27 +3414,41 @@ func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConf
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
req, out := c.ListBucketMetricsConfigurationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBucketMetricsConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
+ req, out := c.ListBucketMetricsConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBuckets = "ListBuckets"
// ListBucketsRequest generates a "aws/request.Request" representing the
// client's request for the ListBuckets operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBuckets for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBuckets method directly
-// instead.
+// See ListBuckets for more information on using the ListBuckets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketsRequest method.
// req, resp := client.ListBucketsRequest(params)
@@ -2861,27 +3488,41 @@ func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
req, out := c.ListBucketsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketsWithContext is the same as ListBuckets with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBuckets for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
+ req, out := c.ListBucketsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListMultipartUploads = "ListMultipartUploads"
// ListMultipartUploadsRequest generates a "aws/request.Request" representing the
// client's request for the ListMultipartUploads operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListMultipartUploads for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListMultipartUploads method directly
-// instead.
+// See ListMultipartUploads for more information on using the ListMultipartUploads
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListMultipartUploadsRequest method.
// req, resp := client.ListMultipartUploadsRequest(params)
@@ -2927,8 +3568,23 @@ func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
req, out := c.ListMultipartUploadsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListMultipartUploads for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
+ req, out := c.ListMultipartUploadsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
@@ -2948,31 +3604,55 @@ func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultip
// return pageNum <= 3
// })
//
-func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(p *ListMultipartUploadsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListMultipartUploadsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListMultipartUploadsOutput), lastPage)
- })
+func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
+ return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListMultipartUploadsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListMultipartUploadsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListObjectVersions = "ListObjectVersions"
// ListObjectVersionsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectVersions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjectVersions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjectVersions method directly
-// instead.
+// See ListObjectVersions for more information on using the ListObjectVersions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectVersionsRequest method.
// req, resp := client.ListObjectVersionsRequest(params)
@@ -3018,8 +3698,23 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
req, out := c.ListObjectVersionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListObjectVersions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
+ req, out := c.ListObjectVersionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
@@ -3039,31 +3734,55 @@ func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVers
// return pageNum <= 3
// })
//
-func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(p *ListObjectVersionsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListObjectVersionsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListObjectVersionsOutput), lastPage)
- })
+func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
+ return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListObjectVersionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListObjectVersionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListObjects = "ListObjects"
// ListObjectsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjects operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjects for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjects method directly
-// instead.
+// See ListObjects for more information on using the ListObjects
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectsRequest method.
// req, resp := client.ListObjectsRequest(params)
@@ -3116,8 +3835,23 @@ func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
req, out := c.ListObjectsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListObjectsWithContext is the same as ListObjects with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListObjects for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
+ req, out := c.ListObjectsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListObjectsPages iterates over the pages of a ListObjects operation,
@@ -3137,31 +3871,55 @@ func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
// return pageNum <= 3
// })
//
-func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(p *ListObjectsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListObjectsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListObjectsOutput), lastPage)
- })
+func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
+ return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListObjectsPagesWithContext same as ListObjectsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListObjectsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListObjectsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListObjectsV2 = "ListObjectsV2"
// ListObjectsV2Request generates a "aws/request.Request" representing the
// client's request for the ListObjectsV2 operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjectsV2 for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjectsV2 method directly
-// instead.
+// See ListObjectsV2 for more information on using the ListObjectsV2
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectsV2Request method.
// req, resp := client.ListObjectsV2Request(params)
@@ -3215,8 +3973,23 @@ func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
req, out := c.ListObjectsV2Request(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListObjectsV2 for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
+ req, out := c.ListObjectsV2Request(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
@@ -3236,31 +4009,55 @@ func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, err
// return pageNum <= 3
// })
//
-func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(p *ListObjectsV2Output, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListObjectsV2Request(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListObjectsV2Output), lastPage)
- })
+func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
+ return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListObjectsV2Input
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListObjectsV2Request(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListParts = "ListParts"
// ListPartsRequest generates a "aws/request.Request" representing the
// client's request for the ListParts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListParts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListParts method directly
-// instead.
+// See ListParts for more information on using the ListParts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListPartsRequest method.
// req, resp := client.ListPartsRequest(params)
@@ -3306,8 +4103,23 @@ func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, outp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
req, out := c.ListPartsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListPartsWithContext is the same as ListParts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListParts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
+ req, out := c.ListPartsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListPartsPages iterates over the pages of a ListParts operation,
@@ -3327,31 +4139,55 @@ func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
// return pageNum <= 3
// })
//
-func (c *S3) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListPartsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListPartsOutput), lastPage)
- })
+func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
+ return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListPartsPagesWithContext same as ListPartsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListPartsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListPartsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
// PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAccelerateConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAccelerateConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAccelerateConfiguration method directly
-// instead.
+// See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
// req, resp := client.PutBucketAccelerateConfigurationRequest(params)
@@ -3393,27 +4229,41 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
req, out := c.PutBucketAccelerateConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketAccelerateConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
+ req, out := c.PutBucketAccelerateConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketAcl = "PutBucketAcl"
// PutBucketAclRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAcl method directly
-// instead.
+// See PutBucketAcl for more information on using the PutBucketAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAclRequest method.
// req, resp := client.PutBucketAclRequest(params)
@@ -3455,27 +4305,41 @@ func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
req, out := c.PutBucketAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketAclWithContext is the same as PutBucketAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
+ req, out := c.PutBucketAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
// PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAnalyticsConfiguration method directly
-// instead.
+// See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
// req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
@@ -3518,27 +4382,41 @@ func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
req, out := c.PutBucketAnalyticsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketAnalyticsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
+ req, out := c.PutBucketAnalyticsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketCors = "PutBucketCors"
// PutBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketCors method directly
-// instead.
+// See PutBucketCors for more information on using the PutBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketCorsRequest method.
// req, resp := client.PutBucketCorsRequest(params)
@@ -3580,27 +4458,41 @@ func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
req, out := c.PutBucketCorsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketCorsWithContext is the same as PutBucketCors with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketCors for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
+ req, out := c.PutBucketCorsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
// PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketInventoryConfiguration method directly
-// instead.
+// See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketInventoryConfigurationRequest method.
// req, resp := client.PutBucketInventoryConfigurationRequest(params)
@@ -3643,27 +4535,41 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
req, out := c.PutBucketInventoryConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketInventoryConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
+ req, out := c.PutBucketInventoryConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketLifecycle = "PutBucketLifecycle"
// PutBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLifecycle method directly
-// instead.
+// See PutBucketLifecycle for more information on using the PutBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLifecycleRequest method.
// req, resp := client.PutBucketLifecycleRequest(params)
@@ -3708,27 +4614,41 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
req, out := c.PutBucketLifecycleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketLifecycle for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
+ req, out := c.PutBucketLifecycleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
// PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLifecycleConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLifecycleConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLifecycleConfiguration method directly
-// instead.
+// See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
// req, resp := client.PutBucketLifecycleConfigurationRequest(params)
@@ -3771,27 +4691,41 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
req, out := c.PutBucketLifecycleConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketLifecycleConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
+ req, out := c.PutBucketLifecycleConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketLogging = "PutBucketLogging"
// PutBucketLoggingRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLogging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLogging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLogging method directly
-// instead.
+// See PutBucketLogging for more information on using the PutBucketLogging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLoggingRequest method.
// req, resp := client.PutBucketLoggingRequest(params)
@@ -3835,27 +4769,41 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
req, out := c.PutBucketLoggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketLogging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
+ req, out := c.PutBucketLoggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
// PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketMetricsConfiguration method directly
-// instead.
+// See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketMetricsConfigurationRequest method.
// req, resp := client.PutBucketMetricsConfigurationRequest(params)
@@ -3898,27 +4846,41 @@ func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
req, out := c.PutBucketMetricsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketMetricsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
+ req, out := c.PutBucketMetricsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketNotification = "PutBucketNotification"
// PutBucketNotificationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketNotification operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketNotification for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketNotification method directly
-// instead.
+// See PutBucketNotification for more information on using the PutBucketNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketNotificationRequest method.
// req, resp := client.PutBucketNotificationRequest(params)
@@ -3963,27 +4925,41 @@ func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
req, out := c.PutBucketNotificationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketNotification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
+ req, out := c.PutBucketNotificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
// PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketNotificationConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketNotificationConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketNotificationConfiguration method directly
-// instead.
+// See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketNotificationConfigurationRequest method.
// req, resp := client.PutBucketNotificationConfigurationRequest(params)
@@ -4025,27 +5001,41 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
req, out := c.PutBucketNotificationConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketNotificationConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
+ req, out := c.PutBucketNotificationConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketPolicy = "PutBucketPolicy"
// PutBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketPolicy method directly
-// instead.
+// See PutBucketPolicy for more information on using the PutBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketPolicyRequest method.
// req, resp := client.PutBucketPolicyRequest(params)
@@ -4088,27 +5078,41 @@ func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.R
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
req, out := c.PutBucketPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
+ req, out := c.PutBucketPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketReplication = "PutBucketReplication"
// PutBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketReplication method directly
-// instead.
+// See PutBucketReplication for more information on using the PutBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketReplicationRequest method.
// req, resp := client.PutBucketReplicationRequest(params)
@@ -4151,27 +5155,41 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
req, out := c.PutBucketReplicationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketReplication for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
+ req, out := c.PutBucketReplicationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketRequestPayment = "PutBucketRequestPayment"
// PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketRequestPayment operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketRequestPayment for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketRequestPayment method directly
-// instead.
+// See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketRequestPaymentRequest method.
// req, resp := client.PutBucketRequestPaymentRequest(params)
@@ -4217,27 +5235,41 @@ func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
req, out := c.PutBucketRequestPaymentRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketRequestPayment for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
+ req, out := c.PutBucketRequestPaymentRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketTagging = "PutBucketTagging"
// PutBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketTagging method directly
-// instead.
+// See PutBucketTagging for more information on using the PutBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketTaggingRequest method.
// req, resp := client.PutBucketTaggingRequest(params)
@@ -4279,27 +5311,41 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
req, out := c.PutBucketTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
+ req, out := c.PutBucketTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketVersioning = "PutBucketVersioning"
// PutBucketVersioningRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketVersioning operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketVersioning for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketVersioning method directly
-// instead.
+// See PutBucketVersioning for more information on using the PutBucketVersioning
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketVersioningRequest method.
// req, resp := client.PutBucketVersioningRequest(params)
@@ -4342,27 +5388,41 @@ func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
req, out := c.PutBucketVersioningRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketVersioning for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
+ req, out := c.PutBucketVersioningRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketWebsite = "PutBucketWebsite"
// PutBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketWebsite method directly
-// instead.
+// See PutBucketWebsite for more information on using the PutBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketWebsiteRequest method.
// req, resp := client.PutBucketWebsiteRequest(params)
@@ -4404,27 +5464,41 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
req, out := c.PutBucketWebsiteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketWebsite for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
+ req, out := c.PutBucketWebsiteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutObject = "PutObject"
// PutObjectRequest generates a "aws/request.Request" representing the
// client's request for the PutObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObject method directly
-// instead.
+// See PutObject for more information on using the PutObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectRequest method.
// req, resp := client.PutObjectRequest(params)
@@ -4464,27 +5538,41 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
req, out := c.PutObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutObjectWithContext is the same as PutObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
+ req, out := c.PutObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutObjectAcl = "PutObjectAcl"
// PutObjectAclRequest generates a "aws/request.Request" representing the
// client's request for the PutObjectAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObjectAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObjectAcl method directly
-// instead.
+// See PutObjectAcl for more information on using the PutObjectAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectAclRequest method.
// req, resp := client.PutObjectAclRequest(params)
@@ -4530,27 +5618,41 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
req, out := c.PutObjectAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutObjectAclWithContext is the same as PutObjectAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutObjectAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
+ req, out := c.PutObjectAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutObjectTagging = "PutObjectTagging"
// PutObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the PutObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObjectTagging method directly
-// instead.
+// See PutObjectTagging for more information on using the PutObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectTaggingRequest method.
// req, resp := client.PutObjectTaggingRequest(params)
@@ -4590,27 +5692,41 @@ func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
req, out := c.PutObjectTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutObjectTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
+ req, out := c.PutObjectTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRestoreObject = "RestoreObject"
// RestoreObjectRequest generates a "aws/request.Request" representing the
// client's request for the RestoreObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RestoreObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RestoreObject method directly
-// instead.
+// See RestoreObject for more information on using the RestoreObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RestoreObjectRequest method.
// req, resp := client.RestoreObjectRequest(params)
@@ -4655,27 +5771,41 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
req, out := c.RestoreObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RestoreObjectWithContext is the same as RestoreObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RestoreObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
+ req, out := c.RestoreObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUploadPart = "UploadPart"
// UploadPartRequest generates a "aws/request.Request" representing the
// client's request for the UploadPart operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadPart for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadPart method directly
-// instead.
+// See UploadPart for more information on using the UploadPart
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadPartRequest method.
// req, resp := client.UploadPartRequest(params)
@@ -4721,27 +5851,41 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
req, out := c.UploadPartRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UploadPartWithContext is the same as UploadPart with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UploadPart for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
+ req, out := c.UploadPartRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUploadPartCopy = "UploadPartCopy"
// UploadPartCopyRequest generates a "aws/request.Request" representing the
// client's request for the UploadPartCopy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadPartCopy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadPartCopy method directly
-// instead.
+// See UploadPartCopy for more information on using the UploadPartCopy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadPartCopyRequest method.
// req, resp := client.UploadPartCopyRequest(params)
@@ -4781,8 +5925,23 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
req, out := c.UploadPartCopyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UploadPartCopy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
+ req, out := c.UploadPartCopyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// Specifies the days since the initiation of an Incomplete Multipart Upload
@@ -4870,6 +6029,13 @@ func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInp
return s
}
+func (s *AbortMultipartUploadInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
s.Key = &v
@@ -5279,6 +6445,13 @@ func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDes
return s
}
+func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetBucketAccountId sets the BucketAccountId field's value.
func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
s.BucketAccountId = &v
@@ -5637,7 +6810,7 @@ type CompleteMultipartUploadInput struct {
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"`
+ MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Confirms that the requester knows that she or he will be charged for the
// request. Bucket owners need not specify this parameter in their requests.
@@ -5687,6 +6860,13 @@ func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUpl
return s
}
+func (s *CompleteMultipartUploadInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
s.Key = &v
@@ -5760,6 +6940,13 @@ func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUp
return s
}
+func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetETag sets the ETag field's value.
func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
s.ETag = &v
@@ -6085,6 +7272,13 @@ func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
return s
}
+func (s *CopyObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCacheControl sets the CacheControl field's value.
func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
s.CacheControl = &v
@@ -6157,6 +7351,13 @@ func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput
return s
}
+func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
+ if s.CopySourceSSECustomerKey == nil {
+ return v
+ }
+ return *s.CopySourceSSECustomerKey
+}
+
// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
s.CopySourceSSECustomerKeyMD5 = &v
@@ -6229,6 +7430,13 @@ func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
return s
}
+func (s *CopyObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -6471,7 +7679,7 @@ type CreateBucketInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure"`
+ CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Allows grantee the read, write, read ACP, and write ACP permissions on the
// bucket.
@@ -6525,6 +7733,13 @@ func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
return s
}
+func (s *CreateBucketInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
s.CreateBucketConfiguration = v
@@ -6666,6 +7881,9 @@ type CreateMultipartUploadInput struct {
// The type of storage to use for the object. Defaults to 'STANDARD'.
StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
+ // The tag-set for the object. The tag-set must be encoded as URL Query parameters
+ Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
+
// If the bucket is configured as a website, redirects requests for this object
// to another object in the same bucket or to an external URL. Amazon S3 stores
// the value of this header in the object metadata.
@@ -6713,6 +7931,13 @@ func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadI
return s
}
+func (s *CreateMultipartUploadInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCacheControl sets the CacheControl field's value.
func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
s.CacheControl = &v
@@ -6803,6 +8028,13 @@ func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipar
return s
}
+func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
s.SSECustomerKeyMD5 = &v
@@ -6827,6 +8059,12 @@ func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartU
return s
}
+// SetTagging sets the Tagging field's value.
+func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
+ s.Tagging = &v
+ return s
+}
+
// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
s.WebsiteRedirectLocation = &v
@@ -6904,6 +8142,13 @@ func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUpload
return s
}
+func (s *CreateMultipartUploadOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
s.Key = &v
@@ -7050,6 +8295,13 @@ func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBuc
return s
}
+func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
s.Id = &v
@@ -7108,6 +8360,13 @@ func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
return s
}
+func (s *DeleteBucketCorsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput
type DeleteBucketCorsOutput struct {
_ struct{} `type:"structure"`
@@ -7160,6 +8419,13 @@ func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
return s
}
+func (s *DeleteBucketInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest
type DeleteBucketInventoryConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -7207,6 +8473,13 @@ func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBuc
return s
}
+func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
s.Id = &v
@@ -7265,6 +8538,13 @@ func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleI
return s
}
+func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput
type DeleteBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
@@ -7327,6 +8607,13 @@ func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucke
return s
}
+func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
s.Id = &v
@@ -7400,6 +8687,13 @@ func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
return s
}
+func (s *DeleteBucketPolicyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput
type DeleteBucketPolicyOutput struct {
_ struct{} `type:"structure"`
@@ -7452,6 +8746,13 @@ func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicat
return s
}
+func (s *DeleteBucketReplicationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput
type DeleteBucketReplicationOutput struct {
_ struct{} `type:"structure"`
@@ -7504,6 +8805,13 @@ func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput
return s
}
+func (s *DeleteBucketTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput
type DeleteBucketTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -7556,6 +8864,13 @@ func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput
return s
}
+func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput
type DeleteBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
@@ -7690,6 +9005,13 @@ func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
return s
}
+func (s *DeleteObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
s.Key = &v
@@ -7808,6 +9130,13 @@ func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput
return s
}
+func (s *DeleteObjectTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
s.Key = &v
@@ -7852,7 +9181,7 @@ type DeleteObjectsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// Delete is a required field
- Delete *Delete `locationName:"Delete" type:"structure" required:"true"`
+ Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// The concatenation of the authentication device's serial number, a space,
// and the value that is displayed on your authentication device.
@@ -7902,6 +9231,13 @@ func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
return s
}
+func (s *DeleteObjectsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelete sets the Delete field's value.
func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
s.Delete = v
@@ -8051,6 +9387,13 @@ func (s *Destination) SetBucket(v string) *Destination {
return s
}
+func (s *Destination) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetStorageClass sets the StorageClass field's value.
func (s *Destination) SetStorageClass(v string) *Destination {
s.StorageClass = &v
@@ -8221,6 +9564,13 @@ func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAc
return s
}
+func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput
type GetBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -8282,6 +9632,13 @@ func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
return s
}
+func (s *GetBucketAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput
type GetBucketAclOutput struct {
_ struct{} `type:"structure"`
@@ -8361,6 +9718,13 @@ func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAna
return s
}
+func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
s.Id = &v
@@ -8428,6 +9792,13 @@ func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
return s
}
+func (s *GetBucketCorsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput
type GetBucketCorsOutput struct {
_ struct{} `type:"structure"`
@@ -8498,6 +9869,13 @@ func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInv
return s
}
+func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
s.Id = &v
@@ -8565,6 +9943,13 @@ func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLif
return s
}
+func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput
type GetBucketLifecycleConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -8625,6 +10010,13 @@ func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
return s
}
+func (s *GetBucketLifecycleInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput
type GetBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
@@ -8685,6 +10077,13 @@ func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
return s
}
+func (s *GetBucketLocationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput
type GetBucketLocationOutput struct {
_ struct{} `type:"structure"`
@@ -8745,6 +10144,13 @@ func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
return s
}
+func (s *GetBucketLoggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput
type GetBucketLoggingOutput struct {
_ struct{} `type:"structure"`
@@ -8815,6 +10221,13 @@ func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetri
return s
}
+func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
s.Id = &v
@@ -8884,6 +10297,13 @@ func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBuck
return s
}
+func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest
type GetBucketPolicyInput struct {
_ struct{} `type:"structure"`
@@ -8921,6 +10341,13 @@ func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
return s
}
+func (s *GetBucketPolicyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput
type GetBucketPolicyOutput struct {
_ struct{} `type:"structure" payload:"Policy"`
@@ -8982,6 +10409,13 @@ func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInp
return s
}
+func (s *GetBucketReplicationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput
type GetBucketReplicationOutput struct {
_ struct{} `type:"structure" payload:"ReplicationConfiguration"`
@@ -9044,6 +10478,13 @@ func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaym
return s
}
+func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput
type GetBucketRequestPaymentOutput struct {
_ struct{} `type:"structure"`
@@ -9105,6 +10546,13 @@ func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
return s
}
+func (s *GetBucketTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput
type GetBucketTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -9166,6 +10614,13 @@ func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput
return s
}
+func (s *GetBucketVersioningInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput
type GetBucketVersioningOutput struct {
_ struct{} `type:"structure"`
@@ -9238,6 +10693,13 @@ func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
return s
}
+func (s *GetBucketWebsiteInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput
type GetBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
@@ -9340,6 +10802,13 @@ func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
return s
}
+func (s *GetObjectAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
s.Key = &v
@@ -9513,6 +10982,13 @@ func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
return s
}
+func (s *GetObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetIfMatch sets the IfMatch field's value.
func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
s.IfMatch = &v
@@ -9609,6 +11085,13 @@ func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
return s
}
+func (s *GetObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -9953,6 +11436,13 @@ func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
return s
}
+func (s *GetObjectTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
s.Key = &v
@@ -10049,6 +11539,13 @@ func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
return s
}
+func (s *GetObjectTorrentInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
s.Key = &v
@@ -10137,7 +11634,7 @@ func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
type Grant struct {
_ struct{} `type:"structure"`
- Grantee *Grantee `type:"structure"`
+ Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
// Specifies the permission given to the grantee.
Permission *string `type:"string" enum:"Permission"`
@@ -10292,6 +11789,13 @@ func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
return s
}
+func (s *HeadBucketInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput
type HeadBucketOutput struct {
_ struct{} `type:"structure"`
@@ -10403,6 +11907,13 @@ func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
return s
}
+func (s *HeadObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetIfMatch sets the IfMatch field's value.
func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
s.IfMatch = &v
@@ -10463,6 +11974,13 @@ func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
return s
}
+func (s *HeadObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -11081,6 +12599,13 @@ func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDes
return s
}
+func (s *InventoryS3BucketDestination) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetFormat sets the Format field's value.
func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
s.Format = &v
@@ -11611,6 +13136,13 @@ func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucket
return s
}
+func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
s.ContinuationToken = &v
@@ -11717,6 +13249,13 @@ func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucket
return s
}
+func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
s.ContinuationToken = &v
@@ -11823,6 +13362,13 @@ func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMe
return s
}
+func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
s.ContinuationToken = &v
@@ -11998,6 +13544,13 @@ func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInp
return s
}
+func (s *ListMultipartUploadsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelimiter sets the Delimiter field's value.
func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
s.Delimiter = &v
@@ -12095,6 +13648,13 @@ func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOu
return s
}
+func (s *ListMultipartUploadsOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCommonPrefixes sets the CommonPrefixes field's value.
func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
s.CommonPrefixes = v
@@ -12222,6 +13782,13 @@ func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
return s
}
+func (s *ListObjectVersionsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelimiter sets the Delimiter field's value.
func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
s.Delimiter = &v
@@ -12449,6 +14016,13 @@ func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
return s
}
+func (s *ListObjectsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelimiter sets the Delimiter field's value.
func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
s.Delimiter = &v
@@ -12661,6 +14235,13 @@ func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
return s
}
+func (s *ListObjectsV2Input) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
s.ContinuationToken = &v
@@ -12910,6 +14491,13 @@ func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
return s
}
+func (s *ListPartsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
s.Key = &v
@@ -13017,6 +14605,13 @@ func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
return s
}
+func (s *ListPartsOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetInitiator sets the Initiator field's value.
func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
s.Initiator = v
@@ -13900,7 +15495,7 @@ type PutBucketAccelerateConfigurationInput struct {
// Specifies the Accelerate Configuration you want to set for the bucket.
//
// AccelerateConfiguration is a required field
- AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"`
+ AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Name of the bucket for which the accelerate configuration is set.
//
@@ -13946,6 +15541,13 @@ func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAc
return s
}
+func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput
type PutBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -13968,7 +15570,7 @@ type PutBucketAclInput struct {
// The canned ACL to apply to the bucket.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
- AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
+ AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -14036,6 +15638,13 @@ func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
return s
}
+func (s *PutBucketAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetGrantFullControl sets the GrantFullControl field's value.
func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
s.GrantFullControl = &v
@@ -14088,7 +15697,7 @@ type PutBucketAnalyticsConfigurationInput struct {
// The configuration and any analyses for the analytics filter.
//
// AnalyticsConfiguration is a required field
- AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true"`
+ AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// The name of the bucket to which an analytics configuration is stored.
//
@@ -14147,6 +15756,13 @@ func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAna
return s
}
+func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
s.Id = &v
@@ -14176,7 +15792,7 @@ type PutBucketCorsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// CORSConfiguration is a required field
- CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true"`
+ CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14216,6 +15832,13 @@ func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
return s
}
+func (s *PutBucketCorsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCORSConfiguration sets the CORSConfiguration field's value.
func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
s.CORSConfiguration = v
@@ -14254,7 +15877,7 @@ type PutBucketInventoryConfigurationInput struct {
// Specifies the inventory configuration.
//
// InventoryConfiguration is a required field
- InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true"`
+ InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14297,6 +15920,13 @@ func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInv
return s
}
+func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
s.Id = &v
@@ -14331,7 +15961,7 @@ type PutBucketLifecycleConfigurationInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
+ LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14368,6 +15998,13 @@ func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLif
return s
}
+func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
s.LifecycleConfiguration = v
@@ -14396,7 +16033,7 @@ type PutBucketLifecycleInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
+ LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14433,6 +16070,13 @@ func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
return s
}
+func (s *PutBucketLifecycleInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
s.LifecycleConfiguration = v
@@ -14462,7 +16106,7 @@ type PutBucketLoggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// BucketLoggingStatus is a required field
- BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true"`
+ BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14502,6 +16146,13 @@ func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
return s
}
+func (s *PutBucketLoggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
s.BucketLoggingStatus = v
@@ -14540,7 +16191,7 @@ type PutBucketMetricsConfigurationInput struct {
// Specifies the metrics configuration.
//
// MetricsConfiguration is a required field
- MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true"`
+ MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14583,6 +16234,13 @@ func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetri
return s
}
+func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
s.Id = &v
@@ -14621,7 +16279,7 @@ type PutBucketNotificationConfigurationInput struct {
// this element is empty, notifications are turned off on the bucket.
//
// NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"`
+ NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14661,6 +16319,13 @@ func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucket
return s
}
+func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetNotificationConfiguration sets the NotificationConfiguration field's value.
func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
s.NotificationConfiguration = v
@@ -14690,7 +16355,7 @@ type PutBucketNotificationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"`
+ NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14725,6 +16390,13 @@ func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationI
return s
}
+func (s *PutBucketNotificationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetNotificationConfiguration sets the NotificationConfiguration field's value.
func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
s.NotificationConfiguration = v
@@ -14791,6 +16463,13 @@ func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
return s
}
+func (s *PutBucketPolicyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetPolicy sets the Policy field's value.
func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
s.Policy = &v
@@ -14823,7 +16502,7 @@ type PutBucketReplicationInput struct {
// replication configuration size can be up to 2 MB.
//
// ReplicationConfiguration is a required field
- ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true"`
+ ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14863,6 +16542,13 @@ func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInp
return s
}
+func (s *PutBucketReplicationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetReplicationConfiguration sets the ReplicationConfiguration field's value.
func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
s.ReplicationConfiguration = v
@@ -14892,7 +16578,7 @@ type PutBucketRequestPaymentInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// RequestPaymentConfiguration is a required field
- RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"`
+ RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14932,6 +16618,13 @@ func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaym
return s
}
+func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
s.RequestPaymentConfiguration = v
@@ -14961,7 +16654,7 @@ type PutBucketTaggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// Tagging is a required field
- Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
+ Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -15001,6 +16694,13 @@ func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
return s
}
+func (s *PutBucketTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetTagging sets the Tagging field's value.
func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
s.Tagging = v
@@ -15034,7 +16734,7 @@ type PutBucketVersioningInput struct {
MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
// VersioningConfiguration is a required field
- VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"`
+ VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -15069,6 +16769,13 @@ func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput
return s
}
+func (s *PutBucketVersioningInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetMFA sets the MFA field's value.
func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
s.MFA = &v
@@ -15104,7 +16811,7 @@ type PutBucketWebsiteInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// WebsiteConfiguration is a required field
- WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"`
+ WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -15144,6 +16851,13 @@ func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
return s
}
+func (s *PutBucketWebsiteInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
s.WebsiteConfiguration = v
@@ -15172,7 +16886,7 @@ type PutObjectAclInput struct {
// The canned ACL to apply to the object.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
- AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
+ AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -15258,6 +16972,13 @@ func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
return s
}
+func (s *PutObjectAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetGrantFullControl sets the GrantFullControl field's value.
func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
s.GrantFullControl = &v
@@ -15480,6 +17201,13 @@ func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
return s
}
+func (s *PutObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCacheControl sets the CacheControl field's value.
func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
s.CacheControl = &v
@@ -15576,6 +17304,13 @@ func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
return s
}
+func (s *PutObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -15718,7 +17453,7 @@ type PutObjectTaggingInput struct {
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
// Tagging is a required field
- Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
+ Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -15766,6 +17501,13 @@ func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
return s
}
+func (s *PutObjectTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
s.Key = &v
@@ -16252,7 +17994,7 @@ type RestoreObjectInput struct {
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
+ RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -16297,6 +18039,13 @@ func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
return s
}
+func (s *RestoreObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
s.Key = &v
@@ -16772,7 +18521,7 @@ func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
type TargetGrant struct {
_ struct{} `type:"structure"`
- Grantee *Grantee `type:"structure"`
+ Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
// Logging permissions assigned to the Grantee for the bucket.
Permission *string `type:"string" enum:"BucketLogsPermission"`
@@ -17112,6 +18861,13 @@ func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
return s
}
+func (s *UploadPartCopyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCopySource sets the CopySource field's value.
func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
s.CopySource = &v
@@ -17160,6 +18916,13 @@ func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartC
return s
}
+func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
+ if s.CopySourceSSECustomerKey == nil {
+ return v
+ }
+ return *s.CopySourceSSECustomerKey
+}
+
// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
s.CopySourceSSECustomerKeyMD5 = &v
@@ -17196,6 +18959,13 @@ func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
return s
}
+func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
s.SSECustomerKeyMD5 = &v
@@ -17395,6 +19165,13 @@ func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
return s
}
+func (s *UploadPartInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContentLength sets the ContentLength field's value.
func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
s.ContentLength = &v
@@ -17431,6 +19208,13 @@ func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
return s
}
+func (s *UploadPartInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
s.SSECustomerKeyMD5 = &v
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
index c3a2702da..bc68a46ac 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
@@ -12,6 +12,69 @@ import (
var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`)
+// NormalizeBucketLocation is a utility function which will update the
+// passed in value to always be a region ID. Generally this would be used
+// with GetBucketLocation API operation.
+//
+// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
+//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
+// for more information on the values that can be returned.
+func NormalizeBucketLocation(loc string) string {
+ switch loc {
+ case "":
+ loc = "us-east-1"
+ case "EU":
+ loc = "eu-west-1"
+ }
+
+ return loc
+}
+
+// NormalizeBucketLocationHandler is a request handler which will update the
+// GetBucketLocation's result LocationConstraint value to always be a region ID.
+//
+// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
+//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
+// for more information on the values that can be returned.
+//
+// req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{
+// Bucket: aws.String(bucket),
+// })
+// req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
+// err := req.Send()
+var NormalizeBucketLocationHandler = request.NamedHandler{
+ Name: "awssdk.s3.NormalizeBucketLocation",
+ Fn: func(req *request.Request) {
+ if req.Error != nil {
+ return
+ }
+
+ out := req.Data.(*GetBucketLocationOutput)
+ loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint))
+ out.LocationConstraint = aws.String(loc)
+ },
+}
+
+// WithNormalizeBucketLocation is a request option which will update the
+// GetBucketLocation's result LocationConstraint value to always be a region ID.
+//
+// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
+//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
+// for more information on the values that can be returned.
+//
+// result, err := svc.GetBucketLocationWithContext(ctx,
+// &s3.GetBucketLocationInput{
+// Bucket: aws.String(bucket),
+// },
+// s3.WithNormalizeBucketLocation,
+// )
+func WithNormalizeBucketLocation(r *request.Request) {
+ r.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
+}
+
func buildGetBucketLocation(r *request.Request) {
if r.DataFilled() {
out := r.Data.(*GetBucketLocationOutput)
@@ -24,7 +87,7 @@ func buildGetBucketLocation(r *request.Request) {
match := reBucketLocation.FindSubmatch(b)
if len(match) > 1 {
loc := string(match[1])
- out.LocationConstraint = &loc
+ out.LocationConstraint = aws.String(loc)
}
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
index 846334723..899d5e8d1 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
@@ -44,3 +44,21 @@ func defaultInitRequestFn(r *request.Request) {
r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError)
}
}
+
+// bucketGetter is an accessor interface to grab the "Bucket" field from
+// an S3 type.
+type bucketGetter interface {
+ getBucket() string
+}
+
+// sseCustomerKeyGetter is an accessor interface to grab the "SSECustomerKey"
+// field from an S3 type.
+type sseCustomerKeyGetter interface {
+ getSSECustomerKey() string
+}
+
+// copySourceSSECustomerKeyGetter is an accessor interface to grab the
+// "CopySourceSSECustomerKey" field from an S3 type.
+type copySourceSSECustomerKeyGetter interface {
+ getCopySourceSSECustomerKey() string
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
new file mode 100644
index 000000000..30068d159
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
@@ -0,0 +1,26 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package s3 provides the client and types for making API
+// requests to Amazon Simple Storage Service.
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service.
+//
+// See s3 package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/
+//
+// Using the Client
+//
+// To Amazon Simple Storage Service with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
+//
+// See the SDK's documentation for more information on how to use the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws.Config documentation for more information on configuring SDK clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon Simple Storage Service client S3 for more
+// information on creating client for this service.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
+package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
new file mode 100644
index 000000000..b794a63ba
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
@@ -0,0 +1,109 @@
+// Upload Managers
+//
+// The s3manager package's Uploader provides concurrent upload of content to S3
+// by taking advantage of S3's Multipart APIs. The Uploader also supports both
+// io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker
+// for optimizations if the Body satisfies that type. Once the Uploader instance
+// is created you can call Upload concurrently from multiple goroutines safely.
+//
+// // The session the S3 Uploader will use
+// sess := session.Must(session.NewSession())
+//
+// // Create an uploader with the session and default options
+// uploader := s3manager.NewUploader(sess)
+//
+// f, err := os.Open(filename)
+// if err != nil {
+// return fmt.Errorf("failed to open file %q, %v", filename, err)
+// }
+//
+// // Upload the file to S3.
+// result, err := uploader.Upload(&s3manager.UploadInput{
+// Bucket: aws.String(myBucket),
+// Key: aws.String(myString),
+// Body: f,
+// })
+// if err != nil {
+// return fmt.Errorf("failed to upload file, %v", err)
+// }
+// fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location))
+//
+// See the s3manager package's Uploader type documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader
+//
+// Download Manager
+//
+// The s3manager package's Downloader provides concurrently downloading of Objects
+// from S3. The Downloader will write S3 Object content with an io.WriterAt.
+// Once the Downloader instance is created you can call Upload concurrently from
+// multiple goroutines safely.
+//
+// // The session the S3 Downloader will use
+// sess := session.Must(session.NewSession())
+//
+// // Create a downloader with the session and default options
+// downloader := s3manager.NewDownloader(sess)
+//
+// // Create a file to write the S3 Object contents to.
+// f, err := os.Create(filename)
+// if err != nil {
+// return fmt.Errorf("failed to create file %q, %v", filename, err)
+// }
+//
+// // Write the contents of S3 Object to the file
+// n, err := downloader.Download(f, &s3.GetObjectInput{
+// Bucket: aws.String(myBucket),
+// Key: aws.String(myString),
+// })
+// if err != nil {
+// return fmt.Errorf("failed to upload file, %v", err)
+// }
+// fmt.Printf("file downloaded, %d bytes\n", n)
+//
+// See the s3manager package's Downloader type documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader
+//
+// Get Bucket Region
+//
+// GetBucketRegion will attempt to get the region for a bucket using a region
+// hint to determine which AWS partition to perform the query on. Use this utility
+// to determine the region a bucket is in.
+//
+// sess := session.Must(session.NewSession())
+//
+// bucket := "my-bucket"
+// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
+// if err != nil {
+// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
+// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
+// }
+// return err
+// }
+// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
+//
+// See the s3manager package's GetBucketRegion function documentation for more information
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion
+//
+// S3 Crypto Client
+//
+// The s3crypto package provides the tools to upload and download encrypted
+// content from S3. The Encryption and Decryption clients can be used concurrently
+// once the client is created.
+//
+// sess := session.Must(session.NewSession())
+//
+// // Create the decryption client.
+// svc := s3crypto.NewDecryptionClient(sess)
+//
+// // The object will be downloaded from S3 and decrypted locally. By metadata
+// // about the object's encryption will instruct the decryption client how
+// // decrypt the content of the object. By default KMS is used for keys.
+// result, err := svc.GetObject(&s3.GetObjectInput {
+// Bucket: aws.String(myBucket),
+// Key: aws.String(myKey),
+// })
+//
+// See the s3crypto package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/
+//
+package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
index 13ebbdad9..931cb17bb 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
index ec3ffe448..a7fbc2de2 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
@@ -8,7 +8,6 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -113,15 +112,9 @@ func updateEndpointForAccelerate(r *request.Request) {
// Attempts to retrieve the bucket name from the request input parameters.
// If no bucket is found, or the field is empty "", false will be returned.
func bucketNameFromReqParams(params interface{}) (string, bool) {
- b, _ := awsutil.ValuesAtPath(params, "Bucket")
- if len(b) == 0 {
- return "", false
- }
-
- if bucket, ok := b[0].(*string); ok {
- if bucketStr := aws.StringValue(bucket); bucketStr != "" {
- return bucketStr, true
- }
+ if iface, ok := params.(bucketGetter); ok {
+ b := iface.getBucket()
+ return b, len(b) > 0
}
return "", false
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
index c2f840e3a..34e71df0f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package s3iface provides an interface to enable mocking the Amazon Simple Storage Service service client
// for testing your code.
@@ -9,6 +9,7 @@
package s3iface
import (
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/s3"
)
@@ -20,7 +21,7 @@ import (
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the the SDK's request pipeline.
+// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon Simple Storage Service.
@@ -59,319 +60,328 @@ import (
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type S3API interface {
+ AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
+ AbortMultipartUploadWithContext(aws.Context, *s3.AbortMultipartUploadInput, ...request.Option) (*s3.AbortMultipartUploadOutput, error)
AbortMultipartUploadRequest(*s3.AbortMultipartUploadInput) (*request.Request, *s3.AbortMultipartUploadOutput)
- AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
-
+ CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error)
+ CompleteMultipartUploadWithContext(aws.Context, *s3.CompleteMultipartUploadInput, ...request.Option) (*s3.CompleteMultipartUploadOutput, error)
CompleteMultipartUploadRequest(*s3.CompleteMultipartUploadInput) (*request.Request, *s3.CompleteMultipartUploadOutput)
- CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error)
-
+ CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
+ CopyObjectWithContext(aws.Context, *s3.CopyObjectInput, ...request.Option) (*s3.CopyObjectOutput, error)
CopyObjectRequest(*s3.CopyObjectInput) (*request.Request, *s3.CopyObjectOutput)
- CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
-
+ CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
+ CreateBucketWithContext(aws.Context, *s3.CreateBucketInput, ...request.Option) (*s3.CreateBucketOutput, error)
CreateBucketRequest(*s3.CreateBucketInput) (*request.Request, *s3.CreateBucketOutput)
- CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
-
+ CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
+ CreateMultipartUploadWithContext(aws.Context, *s3.CreateMultipartUploadInput, ...request.Option) (*s3.CreateMultipartUploadOutput, error)
CreateMultipartUploadRequest(*s3.CreateMultipartUploadInput) (*request.Request, *s3.CreateMultipartUploadOutput)
- CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
-
+ DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
+ DeleteBucketWithContext(aws.Context, *s3.DeleteBucketInput, ...request.Option) (*s3.DeleteBucketOutput, error)
DeleteBucketRequest(*s3.DeleteBucketInput) (*request.Request, *s3.DeleteBucketOutput)
- DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
-
+ DeleteBucketAnalyticsConfiguration(*s3.DeleteBucketAnalyticsConfigurationInput) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
+ DeleteBucketAnalyticsConfigurationWithContext(aws.Context, *s3.DeleteBucketAnalyticsConfigurationInput, ...request.Option) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
DeleteBucketAnalyticsConfigurationRequest(*s3.DeleteBucketAnalyticsConfigurationInput) (*request.Request, *s3.DeleteBucketAnalyticsConfigurationOutput)
- DeleteBucketAnalyticsConfiguration(*s3.DeleteBucketAnalyticsConfigurationInput) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
-
+ DeleteBucketCors(*s3.DeleteBucketCorsInput) (*s3.DeleteBucketCorsOutput, error)
+ DeleteBucketCorsWithContext(aws.Context, *s3.DeleteBucketCorsInput, ...request.Option) (*s3.DeleteBucketCorsOutput, error)
DeleteBucketCorsRequest(*s3.DeleteBucketCorsInput) (*request.Request, *s3.DeleteBucketCorsOutput)
- DeleteBucketCors(*s3.DeleteBucketCorsInput) (*s3.DeleteBucketCorsOutput, error)
-
+ DeleteBucketInventoryConfiguration(*s3.DeleteBucketInventoryConfigurationInput) (*s3.DeleteBucketInventoryConfigurationOutput, error)
+ DeleteBucketInventoryConfigurationWithContext(aws.Context, *s3.DeleteBucketInventoryConfigurationInput, ...request.Option) (*s3.DeleteBucketInventoryConfigurationOutput, error)
DeleteBucketInventoryConfigurationRequest(*s3.DeleteBucketInventoryConfigurationInput) (*request.Request, *s3.DeleteBucketInventoryConfigurationOutput)
- DeleteBucketInventoryConfiguration(*s3.DeleteBucketInventoryConfigurationInput) (*s3.DeleteBucketInventoryConfigurationOutput, error)
-
+ DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error)
+ DeleteBucketLifecycleWithContext(aws.Context, *s3.DeleteBucketLifecycleInput, ...request.Option) (*s3.DeleteBucketLifecycleOutput, error)
DeleteBucketLifecycleRequest(*s3.DeleteBucketLifecycleInput) (*request.Request, *s3.DeleteBucketLifecycleOutput)
- DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error)
-
+ DeleteBucketMetricsConfiguration(*s3.DeleteBucketMetricsConfigurationInput) (*s3.DeleteBucketMetricsConfigurationOutput, error)
+ DeleteBucketMetricsConfigurationWithContext(aws.Context, *s3.DeleteBucketMetricsConfigurationInput, ...request.Option) (*s3.DeleteBucketMetricsConfigurationOutput, error)
DeleteBucketMetricsConfigurationRequest(*s3.DeleteBucketMetricsConfigurationInput) (*request.Request, *s3.DeleteBucketMetricsConfigurationOutput)
- DeleteBucketMetricsConfiguration(*s3.DeleteBucketMetricsConfigurationInput) (*s3.DeleteBucketMetricsConfigurationOutput, error)
-
+ DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
+ DeleteBucketPolicyWithContext(aws.Context, *s3.DeleteBucketPolicyInput, ...request.Option) (*s3.DeleteBucketPolicyOutput, error)
DeleteBucketPolicyRequest(*s3.DeleteBucketPolicyInput) (*request.Request, *s3.DeleteBucketPolicyOutput)
- DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
-
+ DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error)
+ DeleteBucketReplicationWithContext(aws.Context, *s3.DeleteBucketReplicationInput, ...request.Option) (*s3.DeleteBucketReplicationOutput, error)
DeleteBucketReplicationRequest(*s3.DeleteBucketReplicationInput) (*request.Request, *s3.DeleteBucketReplicationOutput)
- DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error)
-
+ DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
+ DeleteBucketTaggingWithContext(aws.Context, *s3.DeleteBucketTaggingInput, ...request.Option) (*s3.DeleteBucketTaggingOutput, error)
DeleteBucketTaggingRequest(*s3.DeleteBucketTaggingInput) (*request.Request, *s3.DeleteBucketTaggingOutput)
- DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
-
+ DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error)
+ DeleteBucketWebsiteWithContext(aws.Context, *s3.DeleteBucketWebsiteInput, ...request.Option) (*s3.DeleteBucketWebsiteOutput, error)
DeleteBucketWebsiteRequest(*s3.DeleteBucketWebsiteInput) (*request.Request, *s3.DeleteBucketWebsiteOutput)
- DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error)
-
+ DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
+ DeleteObjectWithContext(aws.Context, *s3.DeleteObjectInput, ...request.Option) (*s3.DeleteObjectOutput, error)
DeleteObjectRequest(*s3.DeleteObjectInput) (*request.Request, *s3.DeleteObjectOutput)
- DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
-
+ DeleteObjectTagging(*s3.DeleteObjectTaggingInput) (*s3.DeleteObjectTaggingOutput, error)
+ DeleteObjectTaggingWithContext(aws.Context, *s3.DeleteObjectTaggingInput, ...request.Option) (*s3.DeleteObjectTaggingOutput, error)
DeleteObjectTaggingRequest(*s3.DeleteObjectTaggingInput) (*request.Request, *s3.DeleteObjectTaggingOutput)
- DeleteObjectTagging(*s3.DeleteObjectTaggingInput) (*s3.DeleteObjectTaggingOutput, error)
-
+ DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
+ DeleteObjectsWithContext(aws.Context, *s3.DeleteObjectsInput, ...request.Option) (*s3.DeleteObjectsOutput, error)
DeleteObjectsRequest(*s3.DeleteObjectsInput) (*request.Request, *s3.DeleteObjectsOutput)
- DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
-
+ GetBucketAccelerateConfiguration(*s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
+ GetBucketAccelerateConfigurationWithContext(aws.Context, *s3.GetBucketAccelerateConfigurationInput, ...request.Option) (*s3.GetBucketAccelerateConfigurationOutput, error)
GetBucketAccelerateConfigurationRequest(*s3.GetBucketAccelerateConfigurationInput) (*request.Request, *s3.GetBucketAccelerateConfigurationOutput)
- GetBucketAccelerateConfiguration(*s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
-
+ GetBucketAcl(*s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
+ GetBucketAclWithContext(aws.Context, *s3.GetBucketAclInput, ...request.Option) (*s3.GetBucketAclOutput, error)
GetBucketAclRequest(*s3.GetBucketAclInput) (*request.Request, *s3.GetBucketAclOutput)
- GetBucketAcl(*s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
-
+ GetBucketAnalyticsConfiguration(*s3.GetBucketAnalyticsConfigurationInput) (*s3.GetBucketAnalyticsConfigurationOutput, error)
+ GetBucketAnalyticsConfigurationWithContext(aws.Context, *s3.GetBucketAnalyticsConfigurationInput, ...request.Option) (*s3.GetBucketAnalyticsConfigurationOutput, error)
GetBucketAnalyticsConfigurationRequest(*s3.GetBucketAnalyticsConfigurationInput) (*request.Request, *s3.GetBucketAnalyticsConfigurationOutput)
- GetBucketAnalyticsConfiguration(*s3.GetBucketAnalyticsConfigurationInput) (*s3.GetBucketAnalyticsConfigurationOutput, error)
-
+ GetBucketCors(*s3.GetBucketCorsInput) (*s3.GetBucketCorsOutput, error)
+ GetBucketCorsWithContext(aws.Context, *s3.GetBucketCorsInput, ...request.Option) (*s3.GetBucketCorsOutput, error)
GetBucketCorsRequest(*s3.GetBucketCorsInput) (*request.Request, *s3.GetBucketCorsOutput)
- GetBucketCors(*s3.GetBucketCorsInput) (*s3.GetBucketCorsOutput, error)
-
+ GetBucketInventoryConfiguration(*s3.GetBucketInventoryConfigurationInput) (*s3.GetBucketInventoryConfigurationOutput, error)
+ GetBucketInventoryConfigurationWithContext(aws.Context, *s3.GetBucketInventoryConfigurationInput, ...request.Option) (*s3.GetBucketInventoryConfigurationOutput, error)
GetBucketInventoryConfigurationRequest(*s3.GetBucketInventoryConfigurationInput) (*request.Request, *s3.GetBucketInventoryConfigurationOutput)
- GetBucketInventoryConfiguration(*s3.GetBucketInventoryConfigurationInput) (*s3.GetBucketInventoryConfigurationOutput, error)
-
+ GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error)
+ GetBucketLifecycleWithContext(aws.Context, *s3.GetBucketLifecycleInput, ...request.Option) (*s3.GetBucketLifecycleOutput, error)
GetBucketLifecycleRequest(*s3.GetBucketLifecycleInput) (*request.Request, *s3.GetBucketLifecycleOutput)
- GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error)
-
+ GetBucketLifecycleConfiguration(*s3.GetBucketLifecycleConfigurationInput) (*s3.GetBucketLifecycleConfigurationOutput, error)
+ GetBucketLifecycleConfigurationWithContext(aws.Context, *s3.GetBucketLifecycleConfigurationInput, ...request.Option) (*s3.GetBucketLifecycleConfigurationOutput, error)
GetBucketLifecycleConfigurationRequest(*s3.GetBucketLifecycleConfigurationInput) (*request.Request, *s3.GetBucketLifecycleConfigurationOutput)
- GetBucketLifecycleConfiguration(*s3.GetBucketLifecycleConfigurationInput) (*s3.GetBucketLifecycleConfigurationOutput, error)
-
+ GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error)
+ GetBucketLocationWithContext(aws.Context, *s3.GetBucketLocationInput, ...request.Option) (*s3.GetBucketLocationOutput, error)
GetBucketLocationRequest(*s3.GetBucketLocationInput) (*request.Request, *s3.GetBucketLocationOutput)
- GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error)
-
+ GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error)
+ GetBucketLoggingWithContext(aws.Context, *s3.GetBucketLoggingInput, ...request.Option) (*s3.GetBucketLoggingOutput, error)
GetBucketLoggingRequest(*s3.GetBucketLoggingInput) (*request.Request, *s3.GetBucketLoggingOutput)
- GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error)
-
+ GetBucketMetricsConfiguration(*s3.GetBucketMetricsConfigurationInput) (*s3.GetBucketMetricsConfigurationOutput, error)
+ GetBucketMetricsConfigurationWithContext(aws.Context, *s3.GetBucketMetricsConfigurationInput, ...request.Option) (*s3.GetBucketMetricsConfigurationOutput, error)
GetBucketMetricsConfigurationRequest(*s3.GetBucketMetricsConfigurationInput) (*request.Request, *s3.GetBucketMetricsConfigurationOutput)
- GetBucketMetricsConfiguration(*s3.GetBucketMetricsConfigurationInput) (*s3.GetBucketMetricsConfigurationOutput, error)
-
+ GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error)
+ GetBucketNotificationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfigurationDeprecated, error)
GetBucketNotificationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfigurationDeprecated)
- GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error)
-
+ GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error)
+ GetBucketNotificationConfigurationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfiguration, error)
GetBucketNotificationConfigurationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfiguration)
- GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error)
-
+ GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
+ GetBucketPolicyWithContext(aws.Context, *s3.GetBucketPolicyInput, ...request.Option) (*s3.GetBucketPolicyOutput, error)
GetBucketPolicyRequest(*s3.GetBucketPolicyInput) (*request.Request, *s3.GetBucketPolicyOutput)
- GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
-
+ GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error)
+ GetBucketReplicationWithContext(aws.Context, *s3.GetBucketReplicationInput, ...request.Option) (*s3.GetBucketReplicationOutput, error)
GetBucketReplicationRequest(*s3.GetBucketReplicationInput) (*request.Request, *s3.GetBucketReplicationOutput)
- GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error)
-
+ GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error)
+ GetBucketRequestPaymentWithContext(aws.Context, *s3.GetBucketRequestPaymentInput, ...request.Option) (*s3.GetBucketRequestPaymentOutput, error)
GetBucketRequestPaymentRequest(*s3.GetBucketRequestPaymentInput) (*request.Request, *s3.GetBucketRequestPaymentOutput)
- GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error)
-
+ GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
+ GetBucketTaggingWithContext(aws.Context, *s3.GetBucketTaggingInput, ...request.Option) (*s3.GetBucketTaggingOutput, error)
GetBucketTaggingRequest(*s3.GetBucketTaggingInput) (*request.Request, *s3.GetBucketTaggingOutput)
- GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
-
+ GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
+ GetBucketVersioningWithContext(aws.Context, *s3.GetBucketVersioningInput, ...request.Option) (*s3.GetBucketVersioningOutput, error)
GetBucketVersioningRequest(*s3.GetBucketVersioningInput) (*request.Request, *s3.GetBucketVersioningOutput)
- GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
-
+ GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error)
+ GetBucketWebsiteWithContext(aws.Context, *s3.GetBucketWebsiteInput, ...request.Option) (*s3.GetBucketWebsiteOutput, error)
GetBucketWebsiteRequest(*s3.GetBucketWebsiteInput) (*request.Request, *s3.GetBucketWebsiteOutput)
- GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error)
-
+ GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
+ GetObjectWithContext(aws.Context, *s3.GetObjectInput, ...request.Option) (*s3.GetObjectOutput, error)
GetObjectRequest(*s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput)
- GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
-
+ GetObjectAcl(*s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error)
+ GetObjectAclWithContext(aws.Context, *s3.GetObjectAclInput, ...request.Option) (*s3.GetObjectAclOutput, error)
GetObjectAclRequest(*s3.GetObjectAclInput) (*request.Request, *s3.GetObjectAclOutput)
- GetObjectAcl(*s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error)
-
+ GetObjectTagging(*s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error)
+ GetObjectTaggingWithContext(aws.Context, *s3.GetObjectTaggingInput, ...request.Option) (*s3.GetObjectTaggingOutput, error)
GetObjectTaggingRequest(*s3.GetObjectTaggingInput) (*request.Request, *s3.GetObjectTaggingOutput)
- GetObjectTagging(*s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error)
-
+ GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error)
+ GetObjectTorrentWithContext(aws.Context, *s3.GetObjectTorrentInput, ...request.Option) (*s3.GetObjectTorrentOutput, error)
GetObjectTorrentRequest(*s3.GetObjectTorrentInput) (*request.Request, *s3.GetObjectTorrentOutput)
- GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error)
-
+ HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
+ HeadBucketWithContext(aws.Context, *s3.HeadBucketInput, ...request.Option) (*s3.HeadBucketOutput, error)
HeadBucketRequest(*s3.HeadBucketInput) (*request.Request, *s3.HeadBucketOutput)
- HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
-
+ HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
+ HeadObjectWithContext(aws.Context, *s3.HeadObjectInput, ...request.Option) (*s3.HeadObjectOutput, error)
HeadObjectRequest(*s3.HeadObjectInput) (*request.Request, *s3.HeadObjectOutput)
- HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
-
+ ListBucketAnalyticsConfigurations(*s3.ListBucketAnalyticsConfigurationsInput) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
+ ListBucketAnalyticsConfigurationsWithContext(aws.Context, *s3.ListBucketAnalyticsConfigurationsInput, ...request.Option) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
ListBucketAnalyticsConfigurationsRequest(*s3.ListBucketAnalyticsConfigurationsInput) (*request.Request, *s3.ListBucketAnalyticsConfigurationsOutput)
- ListBucketAnalyticsConfigurations(*s3.ListBucketAnalyticsConfigurationsInput) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
-
+ ListBucketInventoryConfigurations(*s3.ListBucketInventoryConfigurationsInput) (*s3.ListBucketInventoryConfigurationsOutput, error)
+ ListBucketInventoryConfigurationsWithContext(aws.Context, *s3.ListBucketInventoryConfigurationsInput, ...request.Option) (*s3.ListBucketInventoryConfigurationsOutput, error)
ListBucketInventoryConfigurationsRequest(*s3.ListBucketInventoryConfigurationsInput) (*request.Request, *s3.ListBucketInventoryConfigurationsOutput)
- ListBucketInventoryConfigurations(*s3.ListBucketInventoryConfigurationsInput) (*s3.ListBucketInventoryConfigurationsOutput, error)
-
+ ListBucketMetricsConfigurations(*s3.ListBucketMetricsConfigurationsInput) (*s3.ListBucketMetricsConfigurationsOutput, error)
+ ListBucketMetricsConfigurationsWithContext(aws.Context, *s3.ListBucketMetricsConfigurationsInput, ...request.Option) (*s3.ListBucketMetricsConfigurationsOutput, error)
ListBucketMetricsConfigurationsRequest(*s3.ListBucketMetricsConfigurationsInput) (*request.Request, *s3.ListBucketMetricsConfigurationsOutput)
- ListBucketMetricsConfigurations(*s3.ListBucketMetricsConfigurationsInput) (*s3.ListBucketMetricsConfigurationsOutput, error)
-
+ ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
+ ListBucketsWithContext(aws.Context, *s3.ListBucketsInput, ...request.Option) (*s3.ListBucketsOutput, error)
ListBucketsRequest(*s3.ListBucketsInput) (*request.Request, *s3.ListBucketsOutput)
- ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
-
+ ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
+ ListMultipartUploadsWithContext(aws.Context, *s3.ListMultipartUploadsInput, ...request.Option) (*s3.ListMultipartUploadsOutput, error)
ListMultipartUploadsRequest(*s3.ListMultipartUploadsInput) (*request.Request, *s3.ListMultipartUploadsOutput)
- ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
-
ListMultipartUploadsPages(*s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool) error
-
- ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*request.Request, *s3.ListObjectVersionsOutput)
+ ListMultipartUploadsPagesWithContext(aws.Context, *s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool, ...request.Option) error
ListObjectVersions(*s3.ListObjectVersionsInput) (*s3.ListObjectVersionsOutput, error)
+ ListObjectVersionsWithContext(aws.Context, *s3.ListObjectVersionsInput, ...request.Option) (*s3.ListObjectVersionsOutput, error)
+ ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*request.Request, *s3.ListObjectVersionsOutput)
ListObjectVersionsPages(*s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool) error
-
- ListObjectsRequest(*s3.ListObjectsInput) (*request.Request, *s3.ListObjectsOutput)
+ ListObjectVersionsPagesWithContext(aws.Context, *s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool, ...request.Option) error
ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
+ ListObjectsWithContext(aws.Context, *s3.ListObjectsInput, ...request.Option) (*s3.ListObjectsOutput, error)
+ ListObjectsRequest(*s3.ListObjectsInput) (*request.Request, *s3.ListObjectsOutput)
ListObjectsPages(*s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool) error
-
- ListObjectsV2Request(*s3.ListObjectsV2Input) (*request.Request, *s3.ListObjectsV2Output)
+ ListObjectsPagesWithContext(aws.Context, *s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool, ...request.Option) error
ListObjectsV2(*s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
+ ListObjectsV2WithContext(aws.Context, *s3.ListObjectsV2Input, ...request.Option) (*s3.ListObjectsV2Output, error)
+ ListObjectsV2Request(*s3.ListObjectsV2Input) (*request.Request, *s3.ListObjectsV2Output)
ListObjectsV2Pages(*s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool) error
-
- ListPartsRequest(*s3.ListPartsInput) (*request.Request, *s3.ListPartsOutput)
+ ListObjectsV2PagesWithContext(aws.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, ...request.Option) error
ListParts(*s3.ListPartsInput) (*s3.ListPartsOutput, error)
+ ListPartsWithContext(aws.Context, *s3.ListPartsInput, ...request.Option) (*s3.ListPartsOutput, error)
+ ListPartsRequest(*s3.ListPartsInput) (*request.Request, *s3.ListPartsOutput)
ListPartsPages(*s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool) error
-
- PutBucketAccelerateConfigurationRequest(*s3.PutBucketAccelerateConfigurationInput) (*request.Request, *s3.PutBucketAccelerateConfigurationOutput)
+ ListPartsPagesWithContext(aws.Context, *s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool, ...request.Option) error
PutBucketAccelerateConfiguration(*s3.PutBucketAccelerateConfigurationInput) (*s3.PutBucketAccelerateConfigurationOutput, error)
-
- PutBucketAclRequest(*s3.PutBucketAclInput) (*request.Request, *s3.PutBucketAclOutput)
+ PutBucketAccelerateConfigurationWithContext(aws.Context, *s3.PutBucketAccelerateConfigurationInput, ...request.Option) (*s3.PutBucketAccelerateConfigurationOutput, error)
+ PutBucketAccelerateConfigurationRequest(*s3.PutBucketAccelerateConfigurationInput) (*request.Request, *s3.PutBucketAccelerateConfigurationOutput)
PutBucketAcl(*s3.PutBucketAclInput) (*s3.PutBucketAclOutput, error)
-
- PutBucketAnalyticsConfigurationRequest(*s3.PutBucketAnalyticsConfigurationInput) (*request.Request, *s3.PutBucketAnalyticsConfigurationOutput)
+ PutBucketAclWithContext(aws.Context, *s3.PutBucketAclInput, ...request.Option) (*s3.PutBucketAclOutput, error)
+ PutBucketAclRequest(*s3.PutBucketAclInput) (*request.Request, *s3.PutBucketAclOutput)
PutBucketAnalyticsConfiguration(*s3.PutBucketAnalyticsConfigurationInput) (*s3.PutBucketAnalyticsConfigurationOutput, error)
-
- PutBucketCorsRequest(*s3.PutBucketCorsInput) (*request.Request, *s3.PutBucketCorsOutput)
+ PutBucketAnalyticsConfigurationWithContext(aws.Context, *s3.PutBucketAnalyticsConfigurationInput, ...request.Option) (*s3.PutBucketAnalyticsConfigurationOutput, error)
+ PutBucketAnalyticsConfigurationRequest(*s3.PutBucketAnalyticsConfigurationInput) (*request.Request, *s3.PutBucketAnalyticsConfigurationOutput)
PutBucketCors(*s3.PutBucketCorsInput) (*s3.PutBucketCorsOutput, error)
-
- PutBucketInventoryConfigurationRequest(*s3.PutBucketInventoryConfigurationInput) (*request.Request, *s3.PutBucketInventoryConfigurationOutput)
+ PutBucketCorsWithContext(aws.Context, *s3.PutBucketCorsInput, ...request.Option) (*s3.PutBucketCorsOutput, error)
+ PutBucketCorsRequest(*s3.PutBucketCorsInput) (*request.Request, *s3.PutBucketCorsOutput)
PutBucketInventoryConfiguration(*s3.PutBucketInventoryConfigurationInput) (*s3.PutBucketInventoryConfigurationOutput, error)
-
- PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*request.Request, *s3.PutBucketLifecycleOutput)
+ PutBucketInventoryConfigurationWithContext(aws.Context, *s3.PutBucketInventoryConfigurationInput, ...request.Option) (*s3.PutBucketInventoryConfigurationOutput, error)
+ PutBucketInventoryConfigurationRequest(*s3.PutBucketInventoryConfigurationInput) (*request.Request, *s3.PutBucketInventoryConfigurationOutput)
PutBucketLifecycle(*s3.PutBucketLifecycleInput) (*s3.PutBucketLifecycleOutput, error)
-
- PutBucketLifecycleConfigurationRequest(*s3.PutBucketLifecycleConfigurationInput) (*request.Request, *s3.PutBucketLifecycleConfigurationOutput)
+ PutBucketLifecycleWithContext(aws.Context, *s3.PutBucketLifecycleInput, ...request.Option) (*s3.PutBucketLifecycleOutput, error)
+ PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*request.Request, *s3.PutBucketLifecycleOutput)
PutBucketLifecycleConfiguration(*s3.PutBucketLifecycleConfigurationInput) (*s3.PutBucketLifecycleConfigurationOutput, error)
-
- PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*request.Request, *s3.PutBucketLoggingOutput)
+ PutBucketLifecycleConfigurationWithContext(aws.Context, *s3.PutBucketLifecycleConfigurationInput, ...request.Option) (*s3.PutBucketLifecycleConfigurationOutput, error)
+ PutBucketLifecycleConfigurationRequest(*s3.PutBucketLifecycleConfigurationInput) (*request.Request, *s3.PutBucketLifecycleConfigurationOutput)
PutBucketLogging(*s3.PutBucketLoggingInput) (*s3.PutBucketLoggingOutput, error)
-
- PutBucketMetricsConfigurationRequest(*s3.PutBucketMetricsConfigurationInput) (*request.Request, *s3.PutBucketMetricsConfigurationOutput)
+ PutBucketLoggingWithContext(aws.Context, *s3.PutBucketLoggingInput, ...request.Option) (*s3.PutBucketLoggingOutput, error)
+ PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*request.Request, *s3.PutBucketLoggingOutput)
PutBucketMetricsConfiguration(*s3.PutBucketMetricsConfigurationInput) (*s3.PutBucketMetricsConfigurationOutput, error)
-
- PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*request.Request, *s3.PutBucketNotificationOutput)
+ PutBucketMetricsConfigurationWithContext(aws.Context, *s3.PutBucketMetricsConfigurationInput, ...request.Option) (*s3.PutBucketMetricsConfigurationOutput, error)
+ PutBucketMetricsConfigurationRequest(*s3.PutBucketMetricsConfigurationInput) (*request.Request, *s3.PutBucketMetricsConfigurationOutput)
PutBucketNotification(*s3.PutBucketNotificationInput) (*s3.PutBucketNotificationOutput, error)
-
- PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*request.Request, *s3.PutBucketNotificationConfigurationOutput)
+ PutBucketNotificationWithContext(aws.Context, *s3.PutBucketNotificationInput, ...request.Option) (*s3.PutBucketNotificationOutput, error)
+ PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*request.Request, *s3.PutBucketNotificationOutput)
PutBucketNotificationConfiguration(*s3.PutBucketNotificationConfigurationInput) (*s3.PutBucketNotificationConfigurationOutput, error)
-
- PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*request.Request, *s3.PutBucketPolicyOutput)
+ PutBucketNotificationConfigurationWithContext(aws.Context, *s3.PutBucketNotificationConfigurationInput, ...request.Option) (*s3.PutBucketNotificationConfigurationOutput, error)
+ PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*request.Request, *s3.PutBucketNotificationConfigurationOutput)
PutBucketPolicy(*s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
-
- PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*request.Request, *s3.PutBucketReplicationOutput)
+ PutBucketPolicyWithContext(aws.Context, *s3.PutBucketPolicyInput, ...request.Option) (*s3.PutBucketPolicyOutput, error)
+ PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*request.Request, *s3.PutBucketPolicyOutput)
PutBucketReplication(*s3.PutBucketReplicationInput) (*s3.PutBucketReplicationOutput, error)
-
- PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*request.Request, *s3.PutBucketRequestPaymentOutput)
+ PutBucketReplicationWithContext(aws.Context, *s3.PutBucketReplicationInput, ...request.Option) (*s3.PutBucketReplicationOutput, error)
+ PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*request.Request, *s3.PutBucketReplicationOutput)
PutBucketRequestPayment(*s3.PutBucketRequestPaymentInput) (*s3.PutBucketRequestPaymentOutput, error)
-
- PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*request.Request, *s3.PutBucketTaggingOutput)
+ PutBucketRequestPaymentWithContext(aws.Context, *s3.PutBucketRequestPaymentInput, ...request.Option) (*s3.PutBucketRequestPaymentOutput, error)
+ PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*request.Request, *s3.PutBucketRequestPaymentOutput)
PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)
-
- PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*request.Request, *s3.PutBucketVersioningOutput)
+ PutBucketTaggingWithContext(aws.Context, *s3.PutBucketTaggingInput, ...request.Option) (*s3.PutBucketTaggingOutput, error)
+ PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*request.Request, *s3.PutBucketTaggingOutput)
PutBucketVersioning(*s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error)
-
- PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*request.Request, *s3.PutBucketWebsiteOutput)
+ PutBucketVersioningWithContext(aws.Context, *s3.PutBucketVersioningInput, ...request.Option) (*s3.PutBucketVersioningOutput, error)
+ PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*request.Request, *s3.PutBucketVersioningOutput)
PutBucketWebsite(*s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error)
-
- PutObjectRequest(*s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput)
+ PutBucketWebsiteWithContext(aws.Context, *s3.PutBucketWebsiteInput, ...request.Option) (*s3.PutBucketWebsiteOutput, error)
+ PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*request.Request, *s3.PutBucketWebsiteOutput)
PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error)
-
- PutObjectAclRequest(*s3.PutObjectAclInput) (*request.Request, *s3.PutObjectAclOutput)
+ PutObjectWithContext(aws.Context, *s3.PutObjectInput, ...request.Option) (*s3.PutObjectOutput, error)
+ PutObjectRequest(*s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput)
PutObjectAcl(*s3.PutObjectAclInput) (*s3.PutObjectAclOutput, error)
-
- PutObjectTaggingRequest(*s3.PutObjectTaggingInput) (*request.Request, *s3.PutObjectTaggingOutput)
+ PutObjectAclWithContext(aws.Context, *s3.PutObjectAclInput, ...request.Option) (*s3.PutObjectAclOutput, error)
+ PutObjectAclRequest(*s3.PutObjectAclInput) (*request.Request, *s3.PutObjectAclOutput)
PutObjectTagging(*s3.PutObjectTaggingInput) (*s3.PutObjectTaggingOutput, error)
-
- RestoreObjectRequest(*s3.RestoreObjectInput) (*request.Request, *s3.RestoreObjectOutput)
+ PutObjectTaggingWithContext(aws.Context, *s3.PutObjectTaggingInput, ...request.Option) (*s3.PutObjectTaggingOutput, error)
+ PutObjectTaggingRequest(*s3.PutObjectTaggingInput) (*request.Request, *s3.PutObjectTaggingOutput)
RestoreObject(*s3.RestoreObjectInput) (*s3.RestoreObjectOutput, error)
-
- UploadPartRequest(*s3.UploadPartInput) (*request.Request, *s3.UploadPartOutput)
+ RestoreObjectWithContext(aws.Context, *s3.RestoreObjectInput, ...request.Option) (*s3.RestoreObjectOutput, error)
+ RestoreObjectRequest(*s3.RestoreObjectInput) (*request.Request, *s3.RestoreObjectOutput)
UploadPart(*s3.UploadPartInput) (*s3.UploadPartOutput, error)
-
- UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput)
+ UploadPartWithContext(aws.Context, *s3.UploadPartInput, ...request.Option) (*s3.UploadPartOutput, error)
+ UploadPartRequest(*s3.UploadPartInput) (*request.Request, *s3.UploadPartOutput)
UploadPartCopy(*s3.UploadPartCopyInput) (*s3.UploadPartCopyOutput, error)
+ UploadPartCopyWithContext(aws.Context, *s3.UploadPartCopyInput, ...request.Option) (*s3.UploadPartCopyOutput, error)
+ UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput)
WaitUntilBucketExists(*s3.HeadBucketInput) error
+ WaitUntilBucketExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error
WaitUntilBucketNotExists(*s3.HeadBucketInput) error
+ WaitUntilBucketNotExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error
WaitUntilObjectExists(*s3.HeadObjectInput) error
+ WaitUntilObjectExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error
WaitUntilObjectNotExists(*s3.HeadObjectInput) error
+ WaitUntilObjectNotExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error
}
var _ S3API = (*s3.S3)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
new file mode 100644
index 000000000..33931c6a6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
@@ -0,0 +1,500 @@
+package s3manager
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/client"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/service/s3"
+ "github.com/aws/aws-sdk-go/service/s3/s3iface"
+)
+
+const (
+ // DefaultBatchSize is the batch size we initialize when constructing a batch delete client.
+ // This value is used when calling DeleteObjects. This represents how many objects to delete
+ // per DeleteObjects call.
+ DefaultBatchSize = 100
+)
+
+// BatchError will contain the key and bucket of the object that failed to
+// either upload or download.
+type BatchError struct {
+ Errors Errors
+ code string
+ message string
+}
+
+// Errors is a typed alias for a slice of errors to satisfy the error
+// interface.
+type Errors []Error
+
+func (errs Errors) Error() string {
+ buf := bytes.NewBuffer(nil)
+ for i, err := range errs {
+ buf.WriteString(err.Error())
+ if i+1 < len(errs) {
+ buf.WriteString("\n")
+ }
+ }
+ return buf.String()
+}
+
+// Error will contain the original error, bucket, and key of the operation that failed
+// during batch operations.
+type Error struct {
+ OrigErr error
+ Bucket *string
+ Key *string
+}
+
+func newError(err error, bucket, key *string) Error {
+ return Error{
+ err,
+ bucket,
+ key,
+ }
+}
+
+func (err *Error) Error() string {
+ return fmt.Sprintf("failed to upload %q to %q:\n%s", err.Key, err.Bucket, err.OrigErr.Error())
+}
+
+// NewBatchError will return a BatchError that satisfies the awserr.Error interface.
+func NewBatchError(code, message string, err []Error) awserr.Error {
+ return &BatchError{
+ Errors: err,
+ code: code,
+ message: message,
+ }
+}
+
+// Code will return the code associated with the batch error.
+func (err *BatchError) Code() string {
+ return err.code
+}
+
+// Message will return the message associated with the batch error.
+func (err *BatchError) Message() string {
+ return err.message
+}
+
+func (err *BatchError) Error() string {
+ return awserr.SprintError(err.Code(), err.Message(), "", err.Errors)
+}
+
+// OrigErr will return the original error. Which, in this case, will always be nil
+// for batched operations.
+func (err *BatchError) OrigErr() error {
+ return err.Errors
+}
+
+// BatchDeleteIterator is an interface that uses the scanner pattern to
+// iterate through what needs to be deleted.
+type BatchDeleteIterator interface {
+ Next() bool
+ Err() error
+ DeleteObject() BatchDeleteObject
+}
+
+// DeleteListIterator is an alternative iterator for the BatchDelete client. This will
+// iterate through a list of objects and delete the objects.
+//
+// Example:
+// iter := &s3manager.DeleteListIterator{
+// Client: svc,
+// Input: &s3.ListObjectsInput{
+// Bucket: aws.String("bucket"),
+// MaxKeys: aws.Int64(5),
+// },
+// Paginator: request.Pagination{
+// NewRequest: func() (*request.Request, error) {
+// var inCpy *ListObjectsInput
+// if input != nil {
+// tmp := *input
+// inCpy = &tmp
+// }
+// req, _ := c.ListObjectsRequest(inCpy)
+// return req, nil
+// },
+// },
+// }
+//
+// batcher := s3manager.NewBatchDeleteWithClient(svc)
+// if err := batcher.Delete(aws.BackgroundContext(), iter); err != nil {
+// return err
+// }
+type DeleteListIterator struct {
+ Bucket *string
+ Paginator request.Pagination
+ objects []*s3.Object
+}
+
+// NewDeleteListIterator will return a new DeleteListIterator.
+func NewDeleteListIterator(svc s3iface.S3API, input *s3.ListObjectsInput, opts ...func(*DeleteListIterator)) BatchDeleteIterator {
+ iter := &DeleteListIterator{
+ Bucket: input.Bucket,
+ Paginator: request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *s3.ListObjectsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := svc.ListObjectsRequest(inCpy)
+ return req, nil
+ },
+ },
+ }
+
+ for _, opt := range opts {
+ opt(iter)
+ }
+ return iter
+}
+
+// Next will use the S3API client to iterate through a list of objects.
+func (iter *DeleteListIterator) Next() bool {
+ if len(iter.objects) > 0 {
+ iter.objects = iter.objects[1:]
+ }
+
+ if len(iter.objects) == 0 && iter.Paginator.Next() {
+ iter.objects = iter.Paginator.Page().(*s3.ListObjectsOutput).Contents
+ }
+
+ return len(iter.objects) > 0
+}
+
+// Err will return the last known error from Next.
+func (iter *DeleteListIterator) Err() error {
+ return iter.Paginator.Err()
+}
+
+// DeleteObject will return the current object to be deleted.
+func (iter *DeleteListIterator) DeleteObject() BatchDeleteObject {
+ return BatchDeleteObject{
+ Object: &s3.DeleteObjectInput{
+ Bucket: iter.Bucket,
+ Key: iter.objects[0].Key,
+ },
+ }
+}
+
+// BatchDelete will use the s3 package's service client to perform a batch
+// delete.
+type BatchDelete struct {
+ Client s3iface.S3API
+ BatchSize int
+}
+
+// NewBatchDeleteWithClient will return a new delete client that can delete a batched amount of
+// objects.
+//
+// Example:
+// batcher := s3manager.NewBatchDeleteWithClient(client, size)
+//
+// objects := []BatchDeleteObject{
+// {
+// Object: &s3.DeleteObjectInput {
+// Key: aws.String("key"),
+// Bucket: aws.String("bucket"),
+// },
+// },
+// }
+//
+// if err := batcher.Delete(&s3manager.DeleteObjectsIterator{
+// Objects: objects,
+// }); err != nil {
+// return err
+// }
+func NewBatchDeleteWithClient(client s3iface.S3API, options ...func(*BatchDelete)) *BatchDelete {
+ svc := &BatchDelete{
+ Client: client,
+ BatchSize: DefaultBatchSize,
+ }
+
+ for _, opt := range options {
+ opt(svc)
+ }
+
+ return svc
+}
+
+// NewBatchDelete will return a new delete client that can delete a batched amount of
+// objects.
+//
+// Example:
+// batcher := s3manager.NewBatchDelete(sess, size)
+//
+// objects := []BatchDeleteObject{
+// {
+// Object: &s3.DeleteObjectInput {
+// Key: aws.String("key"),
+// Bucket: aws.String("bucket"),
+// },
+// },
+// }
+//
+// if err := batcher.Delete(&s3manager.DeleteObjectsIterator{
+// Objects: objects,
+// }); err != nil {
+// return err
+// }
+func NewBatchDelete(c client.ConfigProvider, options ...func(*BatchDelete)) *BatchDelete {
+ client := s3.New(c)
+ return NewBatchDeleteWithClient(client, options...)
+}
+
+// BatchDeleteObject is a wrapper object for calling the batch delete operation.
+type BatchDeleteObject struct {
+ Object *s3.DeleteObjectInput
+ // After will run after each iteration during the batch process. This function will
+ // be executed whether or not the request was successful.
+ After func() error
+}
+
+// DeleteObjectsIterator is an interface that uses the scanner pattern to iterate
+// through a series of objects to be deleted.
+type DeleteObjectsIterator struct {
+ Objects []BatchDeleteObject
+ index int
+ inc bool
+}
+
+// Next will increment the default iterator's index and and ensure that there
+// is another object to iterator to.
+func (iter *DeleteObjectsIterator) Next() bool {
+ if iter.inc {
+ iter.index++
+ } else {
+ iter.inc = true
+ }
+ return iter.index < len(iter.Objects)
+}
+
+// Err will return an error. Since this is just used to satisfy the BatchDeleteIterator interface
+// this will only return nil.
+func (iter *DeleteObjectsIterator) Err() error {
+ return nil
+}
+
+// DeleteObject will return the BatchDeleteObject at the current batched index.
+func (iter *DeleteObjectsIterator) DeleteObject() BatchDeleteObject {
+ object := iter.Objects[iter.index]
+ return object
+}
+
+// Delete will use the iterator to queue up objects that need to be deleted.
+// Once the batch size is met, this will call the deleteBatch function.
+func (d *BatchDelete) Delete(ctx aws.Context, iter BatchDeleteIterator) error {
+ var errs []Error
+ objects := []BatchDeleteObject{}
+ var input *s3.DeleteObjectsInput
+
+ for iter.Next() {
+ o := iter.DeleteObject()
+
+ if input == nil {
+ input = initDeleteObjectsInput(o.Object)
+ }
+
+ parity := hasParity(input, o)
+ if parity {
+ input.Delete.Objects = append(input.Delete.Objects, &s3.ObjectIdentifier{
+ Key: o.Object.Key,
+ VersionId: o.Object.VersionId,
+ })
+ objects = append(objects, o)
+ }
+
+ if len(input.Delete.Objects) == d.BatchSize || !parity {
+ if err := deleteBatch(d, input, objects); err != nil {
+ errs = append(errs, err...)
+ }
+
+ objects = objects[:0]
+ input = nil
+
+ if !parity {
+ objects = append(objects, o)
+ input = initDeleteObjectsInput(o.Object)
+ input.Delete.Objects = append(input.Delete.Objects, &s3.ObjectIdentifier{
+ Key: o.Object.Key,
+ VersionId: o.Object.VersionId,
+ })
+ }
+ }
+ }
+
+ if input != nil && len(input.Delete.Objects) > 0 {
+ if err := deleteBatch(d, input, objects); err != nil {
+ errs = append(errs, err...)
+ }
+ }
+
+ if len(errs) > 0 {
+ return NewBatchError("BatchedDeleteIncomplete", "some objects have failed to be deleted.", errs)
+ }
+ return nil
+}
+
+func initDeleteObjectsInput(o *s3.DeleteObjectInput) *s3.DeleteObjectsInput {
+ return &s3.DeleteObjectsInput{
+ Bucket: o.Bucket,
+ MFA: o.MFA,
+ RequestPayer: o.RequestPayer,
+ Delete: &s3.Delete{},
+ }
+}
+
+// deleteBatch will delete a batch of items in the objects parameters.
+func deleteBatch(d *BatchDelete, input *s3.DeleteObjectsInput, objects []BatchDeleteObject) []Error {
+ errs := []Error{}
+
+ if result, err := d.Client.DeleteObjects(input); err != nil {
+ for i := 0; i < len(input.Delete.Objects); i++ {
+ errs = append(errs, newError(err, input.Bucket, input.Delete.Objects[i].Key))
+ }
+ } else if len(result.Errors) > 0 {
+ for i := 0; i < len(result.Errors); i++ {
+ errs = append(errs, newError(err, input.Bucket, result.Errors[i].Key))
+ }
+ }
+ for _, object := range objects {
+ if object.After == nil {
+ continue
+ }
+ if err := object.After(); err != nil {
+ errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
+ }
+ }
+
+ return errs
+}
+
+func hasParity(o1 *s3.DeleteObjectsInput, o2 BatchDeleteObject) bool {
+ if o1.Bucket != nil && o2.Object.Bucket != nil {
+ if *o1.Bucket != *o2.Object.Bucket {
+ return false
+ }
+ } else if o1.Bucket != o2.Object.Bucket {
+ return false
+ }
+
+ if o1.MFA != nil && o2.Object.MFA != nil {
+ if *o1.MFA != *o2.Object.MFA {
+ return false
+ }
+ } else if o1.MFA != o2.Object.MFA {
+ return false
+ }
+
+ if o1.RequestPayer != nil && o2.Object.RequestPayer != nil {
+ if *o1.RequestPayer != *o2.Object.RequestPayer {
+ return false
+ }
+ } else if o1.RequestPayer != o2.Object.RequestPayer {
+ return false
+ }
+
+ return true
+}
+
+// BatchDownloadIterator is an interface that uses the scanner pattern to iterate
+// through a series of objects to be downloaded.
+type BatchDownloadIterator interface {
+ Next() bool
+ Err() error
+ DownloadObject() BatchDownloadObject
+}
+
+// BatchDownloadObject contains all necessary information to run a batch operation once.
+type BatchDownloadObject struct {
+ Object *s3.GetObjectInput
+ Writer io.WriterAt
+ // After will run after each iteration during the batch process. This function will
+ // be executed whether or not the request was successful.
+ After func() error
+}
+
+// DownloadObjectsIterator implements the BatchDownloadIterator interface and allows for batched
+// download of objects.
+type DownloadObjectsIterator struct {
+ Objects []BatchDownloadObject
+ index int
+ inc bool
+}
+
+// Next will increment the default iterator's index and and ensure that there
+// is another object to iterator to.
+func (batcher *DownloadObjectsIterator) Next() bool {
+ if batcher.inc {
+ batcher.index++
+ } else {
+ batcher.inc = true
+ }
+ return batcher.index < len(batcher.Objects)
+}
+
+// DownloadObject will return the BatchDownloadObject at the current batched index.
+func (batcher *DownloadObjectsIterator) DownloadObject() BatchDownloadObject {
+ object := batcher.Objects[batcher.index]
+ return object
+}
+
+// Err will return an error. Since this is just used to satisfy the BatchDeleteIterator interface
+// this will only return nil.
+func (batcher *DownloadObjectsIterator) Err() error {
+ return nil
+}
+
+// BatchUploadIterator is an interface that uses the scanner pattern to
+// iterate through what needs to be uploaded.
+type BatchUploadIterator interface {
+ Next() bool
+ Err() error
+ UploadObject() BatchUploadObject
+}
+
+// UploadObjectsIterator implements the BatchUploadIterator interface and allows for batched
+// upload of objects.
+type UploadObjectsIterator struct {
+ Objects []BatchUploadObject
+ index int
+ inc bool
+}
+
+// Next will increment the default iterator's index and and ensure that there
+// is another object to iterator to.
+func (batcher *UploadObjectsIterator) Next() bool {
+ if batcher.inc {
+ batcher.index++
+ } else {
+ batcher.inc = true
+ }
+ return batcher.index < len(batcher.Objects)
+}
+
+// Err will return an error. Since this is just used to satisfy the BatchUploadIterator interface
+// this will only return nil.
+func (batcher *UploadObjectsIterator) Err() error {
+ return nil
+}
+
+// UploadObject will return the BatchUploadObject at the current batched index.
+func (batcher *UploadObjectsIterator) UploadObject() BatchUploadObject {
+ object := batcher.Objects[batcher.index]
+ return object
+}
+
+// BatchUploadObject contains all necessary information to run a batch operation once.
+type BatchUploadObject struct {
+ Object *UploadInput
+ // After will run after each iteration during the batch process. This function will
+ // be executed whether or not the request was successful.
+ After func() error
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
new file mode 100644
index 000000000..ce5176400
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
@@ -0,0 +1,83 @@
+package s3manager
+
+import (
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/client"
+ "github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/service/s3"
+ "github.com/aws/aws-sdk-go/service/s3/s3iface"
+)
+
+// GetBucketRegion will attempt to get the region for a bucket using the
+// regionHint to determine which AWS partition to perform the query on.
+//
+// The request will not be signed, and will not use your AWS credentials.
+//
+// A "NotFound" error code will be returned if the bucket does not exist in
+// the AWS partition the regionHint belongs to.
+//
+// For example to get the region of a bucket which exists in "eu-central-1"
+// you could provide a region hint of "us-west-2".
+//
+// sess := session.Must(session.NewSession())
+//
+// bucket := "my-bucket"
+// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
+// if err != nil {
+// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
+// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
+// }
+// return err
+// }
+// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
+//
+func GetBucketRegion(ctx aws.Context, c client.ConfigProvider, bucket, regionHint string, opts ...request.Option) (string, error) {
+ svc := s3.New(c, &aws.Config{
+ Region: aws.String(regionHint),
+ })
+ return GetBucketRegionWithClient(ctx, svc, bucket, opts...)
+}
+
+const bucketRegionHeader = "X-Amz-Bucket-Region"
+
+// GetBucketRegionWithClient is the same as GetBucketRegion with the exception
+// that it takes a S3 service client instead of a Session. The regionHint is
+// derived from the region the S3 service client was created in.
+//
+// See GetBucketRegion for more information.
+func GetBucketRegionWithClient(ctx aws.Context, svc s3iface.S3API, bucket string, opts ...request.Option) (string, error) {
+ req, _ := svc.HeadBucketRequest(&s3.HeadBucketInput{
+ Bucket: aws.String(bucket),
+ })
+ req.Config.S3ForcePathStyle = aws.Bool(true)
+ req.Config.Credentials = credentials.AnonymousCredentials
+ req.SetContext(ctx)
+
+ // Disable HTTP redirects to prevent an invalid 301 from eating the response
+ // because Go's HTTP client will fail, and drop the response if an 301 is
+ // received without a location header. S3 will return a 301 without the
+ // location header for HeadObject API calls.
+ req.DisableFollowRedirects = true
+
+ var bucketRegion string
+ req.Handlers.Send.PushBack(func(r *request.Request) {
+ bucketRegion = r.HTTPResponse.Header.Get(bucketRegionHeader)
+ if len(bucketRegion) == 0 {
+ return
+ }
+ r.HTTPResponse.StatusCode = 200
+ r.HTTPResponse.Status = "OK"
+ r.Error = nil
+ })
+
+ req.ApplyOptions(opts...)
+
+ if err := req.Send(); err != nil {
+ return "", err
+ }
+
+ bucketRegion = s3.NormalizeBucketLocation(bucketRegion)
+
+ return bucketRegion, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
index 0841077ab..d30f2b6b3 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
@@ -31,15 +31,30 @@ const DefaultDownloadConcurrency = 5
type Downloader struct {
// The buffer size (in bytes) to use when buffering data into chunks and
// sending them as parts to S3. The minimum allowed part size is 5MB, and
- // if this value is set to zero, the DefaultPartSize value will be used.
+ // if this value is set to zero, the DefaultDownloadPartSize value will be used.
+ //
+ // PartSize is ignored if the Range input parameter is provided.
PartSize int64
// The number of goroutines to spin up in parallel when sending parts.
// If this is set to zero, the DefaultDownloadConcurrency value will be used.
+ //
+ // Concurrency is ignored if the Range input parameter is provided.
Concurrency int
// An S3 client to use when performing downloads.
S3 s3iface.S3API
+
+ // List of request options that will be passed down to individual API
+ // operation requests made by the downloader.
+ RequestOptions []request.Option
+}
+
+// WithDownloaderRequestOptions appends to the Downloader's API request options.
+func WithDownloaderRequestOptions(opts ...request.Option) func(*Downloader) {
+ return func(d *Downloader) {
+ d.RequestOptions = append(d.RequestOptions, opts...)
+ }
}
// NewDownloader creates a new Downloader instance to downloads objects from
@@ -119,32 +134,125 @@ type maxRetrier interface {
//
// The w io.WriterAt can be satisfied by an os.File to do multipart concurrent
// downloads, or in memory []byte wrapper using aws.WriteAtBuffer.
+//
+// If the GetObjectInput's Range value is provided that will cause the downloader
+// to perform a single GetObjectInput request for that object's range. This will
+// caused the part size, and concurrency configurations to be ignored.
func (d Downloader) Download(w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
- impl := downloader{w: w, in: input, ctx: d}
+ return d.DownloadWithContext(aws.BackgroundContext(), w, input, options...)
+}
+
+// DownloadWithContext downloads an object in S3 and writes the payload into w
+// using concurrent GET requests.
+//
+// DownloadWithContext is the same as Download with the additional support for
+// Context input parameters. The Context must not be nil. A nil Context will
+// cause a panic. Use the Context to add deadlining, timeouts, ect. The
+// DownloadWithContext may create sub-contexts for individual underlying
+// requests.
+//
+// Additional functional options can be provided to configure the individual
+// download. These options are copies of the Downloader instance Download is
+// called from. Modifying the options will not impact the original Downloader
+// instance. Use the WithDownloaderRequestOptions helper function to pass in request
+// options that will be applied to all API operations made with this downloader.
+//
+// The w io.WriterAt can be satisfied by an os.File to do multipart concurrent
+// downloads, or in memory []byte wrapper using aws.WriteAtBuffer.
+//
+// It is safe to call this method concurrently across goroutines.
+//
+// If the GetObjectInput's Range value is provided that will cause the downloader
+// to perform a single GetObjectInput request for that object's range. This will
+// caused the part size, and concurrency configurations to be ignored.
+func (d Downloader) DownloadWithContext(ctx aws.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
+ impl := downloader{w: w, in: input, cfg: d, ctx: ctx}
for _, option := range options {
- option(&impl.ctx)
+ option(&impl.cfg)
}
+ impl.cfg.RequestOptions = append(impl.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager"))
if s, ok := d.S3.(maxRetrier); ok {
impl.partBodyMaxRetries = s.MaxRetries()
}
impl.totalBytes = -1
- if impl.ctx.Concurrency == 0 {
- impl.ctx.Concurrency = DefaultDownloadConcurrency
+ if impl.cfg.Concurrency == 0 {
+ impl.cfg.Concurrency = DefaultDownloadConcurrency
}
- if impl.ctx.PartSize == 0 {
- impl.ctx.PartSize = DefaultDownloadPartSize
+ if impl.cfg.PartSize == 0 {
+ impl.cfg.PartSize = DefaultDownloadPartSize
}
return impl.download()
}
+// DownloadWithIterator will download a batched amount of objects in S3 and writes them
+// to the io.WriterAt specificed in the iterator.
+//
+// Example:
+// svc := s3manager.NewDownloader(session)
+//
+// fooFile, err := os.Open("/tmp/foo.file")
+// if err != nil {
+// return err
+// }
+//
+// barFile, err := os.Open("/tmp/bar.file")
+// if err != nil {
+// return err
+// }
+//
+// objects := []s3manager.BatchDownloadObject {
+// {
+// Input: &s3.GetObjectInput {
+// Bucket: aws.String("bucket"),
+// Key: aws.String("foo"),
+// },
+// Writer: fooFile,
+// },
+// {
+// Input: &s3.GetObjectInput {
+// Bucket: aws.String("bucket"),
+// Key: aws.String("bar"),
+// },
+// Writer: barFile,
+// },
+// }
+//
+// iter := &s3manager.DownloadObjectsIterator{Objects: objects}
+// if err := svc.DownloadWithIterator(aws.BackgroundContext(), iter); err != nil {
+// return err
+// }
+func (d Downloader) DownloadWithIterator(ctx aws.Context, iter BatchDownloadIterator, opts ...func(*Downloader)) error {
+ var errs []Error
+ for iter.Next() {
+ object := iter.DownloadObject()
+ if _, err := d.DownloadWithContext(ctx, object.Writer, object.Object, opts...); err != nil {
+ errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
+ }
+
+ if object.After == nil {
+ continue
+ }
+
+ if err := object.After(); err != nil {
+ errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
+ }
+ }
+
+ if len(errs) > 0 {
+ return NewBatchError("BatchedDownloadIncomplete", "some objects have failed to download.", errs)
+ }
+ return nil
+}
+
// downloader is the implementation structure used internally by Downloader.
type downloader struct {
- ctx Downloader
+ ctx aws.Context
+ cfg Downloader
in *s3.GetObjectInput
w io.WriterAt
@@ -163,14 +271,22 @@ type downloader struct {
// download performs the implementation of the object download across ranged
// GETs.
func (d *downloader) download() (n int64, err error) {
+ // If range is specified fall back to single download of that range
+ // this enables the functionality of ranged gets with the downloader but
+ // at the cost of no multipart downloads.
+ if rng := aws.StringValue(d.in.Range); len(rng) > 0 {
+ d.downloadRange(rng)
+ return d.written, d.err
+ }
+
// Spin off first worker to check additional header information
d.getChunk()
if total := d.getTotalBytes(); total >= 0 {
// Spin up workers
- ch := make(chan dlchunk, d.ctx.Concurrency)
+ ch := make(chan dlchunk, d.cfg.Concurrency)
- for i := 0; i < d.ctx.Concurrency; i++ {
+ for i := 0; i < d.cfg.Concurrency; i++ {
d.wg.Add(1)
go d.downloadPart(ch)
}
@@ -182,8 +298,8 @@ func (d *downloader) download() (n int64, err error) {
}
// Queue the next range of bytes to read.
- ch <- dlchunk{w: d.w, start: d.pos, size: d.ctx.PartSize}
- d.pos += d.ctx.PartSize
+ ch <- dlchunk{w: d.w, start: d.pos, size: d.cfg.PartSize}
+ d.pos += d.cfg.PartSize
}
// Wait for completion
@@ -219,13 +335,17 @@ func (d *downloader) downloadPart(ch chan dlchunk) {
defer d.wg.Done()
for {
chunk, ok := <-ch
- if !ok || d.getErr() != nil {
+ if !ok {
break
}
+ if d.getErr() != nil {
+ // Drain the channel if there is an error, to prevent deadlocking
+ // of download producer.
+ continue
+ }
if err := d.downloadChunk(chunk); err != nil {
d.setErr(err)
- break
}
}
}
@@ -237,30 +357,46 @@ func (d *downloader) getChunk() {
return
}
- chunk := dlchunk{w: d.w, start: d.pos, size: d.ctx.PartSize}
- d.pos += d.ctx.PartSize
+ chunk := dlchunk{w: d.w, start: d.pos, size: d.cfg.PartSize}
+ d.pos += d.cfg.PartSize
if err := d.downloadChunk(chunk); err != nil {
d.setErr(err)
}
}
-// downloadChunk downloads the chunk froom s3
+// downloadRange downloads an Object given the passed in Byte-Range value.
+// The chunk used down download the range will be configured for that range.
+func (d *downloader) downloadRange(rng string) {
+ if d.getErr() != nil {
+ return
+ }
+
+ chunk := dlchunk{w: d.w, start: d.pos}
+ // Ranges specified will short circuit the multipart download
+ chunk.withRange = rng
+
+ if err := d.downloadChunk(chunk); err != nil {
+ d.setErr(err)
+ }
+
+ // Update the position based on the amount of data received.
+ d.pos = d.written
+}
+
+// downloadChunk downloads the chunk from s3
func (d *downloader) downloadChunk(chunk dlchunk) error {
in := &s3.GetObjectInput{}
awsutil.Copy(in, d.in)
// Get the next byte range of data
- rng := fmt.Sprintf("bytes=%d-%d", chunk.start, chunk.start+chunk.size-1)
- in.Range = &rng
+ in.Range = aws.String(chunk.ByteRange())
var n int64
var err error
for retry := 0; retry <= d.partBodyMaxRetries; retry++ {
- req, resp := d.ctx.S3.GetObjectRequest(in)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
-
- err = req.Send()
+ var resp *s3.GetObjectOutput
+ resp, err = d.cfg.S3.GetObjectWithContext(d.ctx, in, d.cfg.RequestOptions...)
if err != nil {
return err
}
@@ -273,7 +409,7 @@ func (d *downloader) downloadChunk(chunk dlchunk) error {
}
chunk.cur = 0
- logMessage(d.ctx.S3, aws.LogDebugWithRequestRetries,
+ logMessage(d.cfg.S3, aws.LogDebugWithRequestRetries,
fmt.Sprintf("DEBUG: object part body download interrupted %s, err, %v, retrying attempt %d",
aws.StringValue(in.Key), err, retry))
}
@@ -320,7 +456,7 @@ func (d *downloader) setTotalBytes(resp *s3.GetObjectOutput) {
}
if resp.ContentRange == nil {
- // ContentRange is nil when the full file contents is provied, and
+ // ContentRange is nil when the full file contents is provided, and
// is not chunked. Use ContentLength instead.
if resp.ContentLength != nil {
d.totalBytes = *resp.ContentLength
@@ -379,12 +515,18 @@ type dlchunk struct {
start int64
size int64
cur int64
+
+ // specifies the byte range the chunk should be downloaded with.
+ withRange string
}
// Write wraps io.WriterAt for the dlchunk, writing from the dlchunk's start
// position to its end (or EOF).
+//
+// If a range is specified on the dlchunk the size will be ignored when writing.
+// as the total size may not of be known ahead of time.
func (c *dlchunk) Write(p []byte) (n int, err error) {
- if c.cur >= c.size {
+ if c.cur >= c.size && len(c.withRange) == 0 {
return 0, io.EOF
}
@@ -393,3 +535,13 @@ func (c *dlchunk) Write(p []byte) (n int, err error) {
return
}
+
+// ByteRange returns a HTTP Byte-Range header value that should be used by the
+// client to request the chunk's range.
+func (c *dlchunk) ByteRange() string {
+ if len(c.withRange) != 0 {
+ return c.withRange
+ }
+
+ return fmt.Sprintf("bytes=%d-%d", c.start, c.start+c.size-1)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
index a27722634..fc1f47205 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
@@ -202,13 +202,20 @@ type UploadOutput struct {
UploadID string
}
+// WithUploaderRequestOptions appends to the Uploader's API request options.
+func WithUploaderRequestOptions(opts ...request.Option) func(*Uploader) {
+ return func(u *Uploader) {
+ u.RequestOptions = append(u.RequestOptions, opts...)
+ }
+}
+
// The Uploader structure that calls Upload(). It is safe to call Upload()
// on this structure for multiple objects and across concurrent goroutines.
// Mutating the Uploader's properties is not safe to be done concurrently.
type Uploader struct {
// The buffer size (in bytes) to use when buffering data into chunks and
// sending them as parts to S3. The minimum allowed part size is 5MB, and
- // if this value is set to zero, the DefaultPartSize value will be used.
+ // if this value is set to zero, the DefaultUploadPartSize value will be used.
PartSize int64
// The number of goroutines to spin up in parallel when sending parts.
@@ -232,6 +239,10 @@ type Uploader struct {
// The client to use when uploading to S3.
S3 s3iface.S3API
+
+ // List of request options that will be passed down to individual API
+ // operation requests made by the uploader.
+ RequestOptions []request.Option
}
// NewUploader creates a new Uploader instance to upload objects to S3. Pass In
@@ -308,6 +319,9 @@ func NewUploaderWithClient(svc s3iface.S3API, options ...func(*Uploader)) *Uploa
// upload. These options are copies of the Uploader instance Upload is called from.
// Modifying the options will not impact the original Uploader instance.
//
+// Use the WithUploaderRequestOptions helper function to pass in request
+// options that will be applied to all API operations made with this uploader.
+//
// It is safe to call this method concurrently across goroutines.
//
// Example:
@@ -327,18 +341,97 @@ func NewUploaderWithClient(svc s3iface.S3API, options ...func(*Uploader)) *Uploa
// u.LeavePartsOnError = true // Don't delete the parts if the upload fails.
// })
func (u Uploader) Upload(input *UploadInput, options ...func(*Uploader)) (*UploadOutput, error) {
- i := uploader{in: input, ctx: u}
+ return u.UploadWithContext(aws.BackgroundContext(), input, options...)
+}
- for _, option := range options {
- option(&i.ctx)
+// UploadWithContext uploads an object to S3, intelligently buffering large
+// files into smaller chunks and sending them in parallel across multiple
+// goroutines. You can configure the buffer size and concurrency through the
+// Uploader's parameters.
+//
+// UploadWithContext is the same as Upload with the additional support for
+// Context input parameters. The Context must not be nil. A nil Context will
+// cause a panic. Use the context to add deadlining, timeouts, ect. The
+// UploadWithContext may create sub-contexts for individual underlying requests.
+//
+// Additional functional options can be provided to configure the individual
+// upload. These options are copies of the Uploader instance Upload is called from.
+// Modifying the options will not impact the original Uploader instance.
+//
+// Use the WithUploaderRequestOptions helper function to pass in request
+// options that will be applied to all API operations made with this uploader.
+//
+// It is safe to call this method concurrently across goroutines.
+func (u Uploader) UploadWithContext(ctx aws.Context, input *UploadInput, opts ...func(*Uploader)) (*UploadOutput, error) {
+ i := uploader{in: input, cfg: u, ctx: ctx}
+
+ for _, opt := range opts {
+ opt(&i.cfg)
}
+ i.cfg.RequestOptions = append(i.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager"))
return i.upload()
}
+// UploadWithIterator will upload a batched amount of objects to S3. This operation uses
+// the iterator pattern to know which object to upload next. Since this is an interface this
+// allows for custom defined functionality.
+//
+// Example:
+// svc:= s3manager.NewUploader(sess)
+//
+// objects := []BatchUploadObject{
+// {
+// Object: &s3manager.UploadInput {
+// Key: aws.String("key"),
+// Bucket: aws.String("bucket"),
+// },
+// },
+// }
+//
+// iter := &s3managee.UploadObjectsIterator{Objects: objects}
+// if err := svc.UploadWithIterator(aws.BackgroundContext(), iter); err != nil {
+// return err
+// }
+func (u Uploader) UploadWithIterator(ctx aws.Context, iter BatchUploadIterator, opts ...func(*Uploader)) error {
+ var errs []Error
+ for iter.Next() {
+ object := iter.UploadObject()
+ if _, err := u.UploadWithContext(ctx, object.Object, opts...); err != nil {
+ s3Err := Error{
+ OrigErr: err,
+ Bucket: object.Object.Bucket,
+ Key: object.Object.Key,
+ }
+
+ errs = append(errs, s3Err)
+ }
+
+ if object.After == nil {
+ continue
+ }
+
+ if err := object.After(); err != nil {
+ s3Err := Error{
+ OrigErr: err,
+ Bucket: object.Object.Bucket,
+ Key: object.Object.Key,
+ }
+
+ errs = append(errs, s3Err)
+ }
+ }
+
+ if len(errs) > 0 {
+ return NewBatchError("BatchedUploadIncomplete", "some objects have failed to upload.", errs)
+ }
+ return nil
+}
+
// internal structure to manage an upload to S3.
type uploader struct {
- ctx Uploader
+ ctx aws.Context
+ cfg Uploader
in *UploadInput
@@ -351,7 +444,7 @@ type uploader struct {
func (u *uploader) upload() (*UploadOutput, error) {
u.init()
- if u.ctx.PartSize < MinUploadPartSize {
+ if u.cfg.PartSize < MinUploadPartSize {
msg := fmt.Sprintf("part size must be at least %d bytes", MinUploadPartSize)
return nil, awserr.New("ConfigError", msg, nil)
}
@@ -370,11 +463,11 @@ func (u *uploader) upload() (*UploadOutput, error) {
// init will initialize all default options.
func (u *uploader) init() {
- if u.ctx.Concurrency == 0 {
- u.ctx.Concurrency = DefaultUploadConcurrency
+ if u.cfg.Concurrency == 0 {
+ u.cfg.Concurrency = DefaultUploadConcurrency
}
- if u.ctx.PartSize == 0 {
- u.ctx.PartSize = DefaultUploadPartSize
+ if u.cfg.PartSize == 0 {
+ u.cfg.PartSize = DefaultUploadPartSize
}
// Try to get the total size for some optimizations
@@ -399,10 +492,10 @@ func (u *uploader) initSize() {
// Try to adjust partSize if it is too small and account for
// integer division truncation.
- if u.totalSize/u.ctx.PartSize >= int64(u.ctx.MaxUploadParts) {
+ if u.totalSize/u.cfg.PartSize >= int64(u.cfg.MaxUploadParts) {
// Add one to the part size to account for remainders
// during the size calculation. e.g odd number of bytes.
- u.ctx.PartSize = (u.totalSize / int64(u.ctx.MaxUploadParts)) + 1
+ u.cfg.PartSize = (u.totalSize / int64(u.cfg.MaxUploadParts)) + 1
}
}
}
@@ -420,11 +513,11 @@ func (u *uploader) nextReader() (io.ReadSeeker, int, error) {
case readerAtSeeker:
var err error
- n := u.ctx.PartSize
+ n := u.cfg.PartSize
if u.totalSize >= 0 {
bytesLeft := u.totalSize - u.readerPos
- if bytesLeft <= u.ctx.PartSize {
+ if bytesLeft <= u.cfg.PartSize {
err = io.EOF
n = bytesLeft
}
@@ -436,7 +529,7 @@ func (u *uploader) nextReader() (io.ReadSeeker, int, error) {
return reader, int(n), err
default:
- part := make([]byte, u.ctx.PartSize)
+ part := make([]byte, u.cfg.PartSize)
n, err := readFillBuf(r, part)
u.readerPos += int64(n)
@@ -462,8 +555,11 @@ func (u *uploader) singlePart(buf io.ReadSeeker) (*UploadOutput, error) {
awsutil.Copy(params, u.in)
params.Body = buf
- req, out := u.ctx.S3.PutObjectRequest(params)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
+ // Need to use request form because URL generated in request is
+ // used in return.
+ req, out := u.cfg.S3.PutObjectRequest(params)
+ req.SetContext(u.ctx)
+ req.ApplyOptions(u.cfg.RequestOptions...)
if err := req.Send(); err != nil {
return nil, err
}
@@ -506,16 +602,15 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker) (*UploadOutput, error) {
awsutil.Copy(params, u.in)
// Create the multipart
- req, resp := u.ctx.S3.CreateMultipartUploadRequest(params)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- if err := req.Send(); err != nil {
+ resp, err := u.cfg.S3.CreateMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
return nil, err
}
u.uploadID = *resp.UploadId
// Create the workers
- ch := make(chan chunk, u.ctx.Concurrency)
- for i := 0; i < u.ctx.Concurrency; i++ {
+ ch := make(chan chunk, u.cfg.Concurrency)
+ for i := 0; i < u.cfg.Concurrency; i++ {
u.wg.Add(1)
go u.readChunk(ch)
}
@@ -525,15 +620,14 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker) (*UploadOutput, error) {
ch <- chunk{buf: firstBuf, num: num}
// Read and queue the rest of the parts
- var err error
for u.geterr() == nil && err == nil {
num++
// This upload exceeded maximum number of supported parts, error now.
- if num > int64(u.ctx.MaxUploadParts) || num > int64(MaxUploadParts) {
+ if num > int64(u.cfg.MaxUploadParts) || num > int64(MaxUploadParts) {
var msg string
- if num > int64(u.ctx.MaxUploadParts) {
+ if num > int64(u.cfg.MaxUploadParts) {
msg = fmt.Sprintf("exceeded total allowed configured MaxUploadParts (%d). Adjust PartSize to fit in this limit",
- u.ctx.MaxUploadParts)
+ u.cfg.MaxUploadParts)
} else {
msg = fmt.Sprintf("exceeded total allowed S3 limit MaxUploadParts (%d). Adjust PartSize to fit in this limit",
MaxUploadParts)
@@ -607,7 +701,7 @@ func (u *multiuploader) readChunk(ch chan chunk) {
// send performs an UploadPart request and keeps track of the completed
// part information.
func (u *multiuploader) send(c chunk) error {
- req, resp := u.ctx.S3.UploadPartRequest(&s3.UploadPartInput{
+ params := &s3.UploadPartInput{
Bucket: u.in.Bucket,
Key: u.in.Key,
Body: c.buf,
@@ -615,9 +709,9 @@ func (u *multiuploader) send(c chunk) error {
SSECustomerAlgorithm: u.in.SSECustomerAlgorithm,
SSECustomerKey: u.in.SSECustomerKey,
PartNumber: &c.num,
- })
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- if err := req.Send(); err != nil {
+ }
+ resp, err := u.cfg.S3.UploadPartWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
return err
}
@@ -649,17 +743,19 @@ func (u *multiuploader) seterr(e error) {
// fail will abort the multipart unless LeavePartsOnError is set to true.
func (u *multiuploader) fail() {
- if u.ctx.LeavePartsOnError {
+ if u.cfg.LeavePartsOnError {
return
}
- req, _ := u.ctx.S3.AbortMultipartUploadRequest(&s3.AbortMultipartUploadInput{
+ params := &s3.AbortMultipartUploadInput{
Bucket: u.in.Bucket,
Key: u.in.Key,
UploadId: &u.uploadID,
- })
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- req.Send()
+ }
+ _, err := u.cfg.S3.AbortMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
+ logMessage(u.cfg.S3, aws.LogDebug, fmt.Sprintf("failed to abort multipart upload, %v", err))
+ }
}
// complete successfully completes a multipart upload and returns the response.
@@ -672,14 +768,14 @@ func (u *multiuploader) complete() *s3.CompleteMultipartUploadOutput {
// Parts must be sorted in PartNumber order.
sort.Sort(u.parts)
- req, resp := u.ctx.S3.CompleteMultipartUploadRequest(&s3.CompleteMultipartUploadInput{
+ params := &s3.CompleteMultipartUploadInput{
Bucket: u.in.Bucket,
Key: u.in.Key,
UploadId: &u.uploadID,
MultipartUpload: &s3.CompletedMultipartUpload{Parts: u.parts},
- })
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- if err := req.Send(); err != nil {
+ }
+ resp, err := u.cfg.S3.CompleteMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
u.seterr(err)
u.fail()
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
index 5e6f2299e..614e477d3 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
@@ -11,10 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/restxml"
)
-// S3 is a client for Amazon S3.
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01
+// S3 provides the API operation methods for making requests to
+// Amazon Simple Storage Service. See this package's package overview docs
+// for details on the service.
+//
+// S3 methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type S3 struct {
*client.Client
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
index 268ea2fb4..8010c4fa1 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
@@ -5,17 +5,27 @@ import (
"encoding/base64"
"github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil)
func validateSSERequiresSSL(r *request.Request) {
- if r.HTTPRequest.URL.Scheme != "https" {
- p, _ := awsutil.ValuesAtPath(r.Params, "SSECustomerKey||CopySourceSSECustomerKey")
- if len(p) > 0 {
+ if r.HTTPRequest.URL.Scheme == "https" {
+ return
+ }
+
+ if iface, ok := r.Params.(sseCustomerKeyGetter); ok {
+ if len(iface.getSSECustomerKey()) > 0 {
r.Error = errSSERequiresSSL
+ return
+ }
+ }
+
+ if iface, ok := r.Params.(copySourceSSECustomerKeyGetter); ok {
+ if len(iface.getCopySourceSSECustomerKey()) > 0 {
+ r.Error = errSSERequiresSSL
+ return
}
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
index ed91c5872..bcca8627a 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
@@ -23,17 +23,22 @@ func unmarshalError(r *request.Request) {
defer r.HTTPResponse.Body.Close()
defer io.Copy(ioutil.Discard, r.HTTPResponse.Body)
+ hostID := r.HTTPResponse.Header.Get("X-Amz-Id-2")
+
// Bucket exists in a different region, and request needs
// to be made to the correct region.
if r.HTTPResponse.StatusCode == http.StatusMovedPermanently {
- r.Error = awserr.NewRequestFailure(
- awserr.New("BucketRegionError",
- fmt.Sprintf("incorrect region, the bucket is not in '%s' region",
- aws.StringValue(r.Config.Region)),
- nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
+ r.Error = requestFailure{
+ RequestFailure: awserr.NewRequestFailure(
+ awserr.New("BucketRegionError",
+ fmt.Sprintf("incorrect region, the bucket is not in '%s' region",
+ aws.StringValue(r.Config.Region)),
+ nil),
+ r.HTTPResponse.StatusCode,
+ r.RequestID,
+ ),
+ hostID: hostID,
+ }
return
}
@@ -48,6 +53,7 @@ func unmarshalError(r *request.Request) {
} else {
errCode = resp.Code
errMsg = resp.Message
+ err = nil
}
// Fallback to status code converted to message if still no error code
@@ -57,9 +63,41 @@ func unmarshalError(r *request.Request) {
errMsg = statusText
}
- r.Error = awserr.NewRequestFailure(
- awserr.New(errCode, errMsg, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
+ r.Error = requestFailure{
+ RequestFailure: awserr.NewRequestFailure(
+ awserr.New(errCode, errMsg, err),
+ r.HTTPResponse.StatusCode,
+ r.RequestID,
+ ),
+ hostID: hostID,
+ }
+}
+
+// A RequestFailure provides access to the S3 Request ID and Host ID values
+// returned from API operation errors. Getting the error as a string will
+// return the formated error with the same information as awserr.RequestFailure,
+// while also adding the HostID value from the response.
+type RequestFailure interface {
+ awserr.RequestFailure
+
+ // Host ID is the S3 Host ID needed for debug, and contacting support
+ HostID() string
+}
+
+type requestFailure struct {
+ awserr.RequestFailure
+
+ hostID string
+}
+
+func (r requestFailure) Error() string {
+ extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s",
+ r.StatusCode(), r.RequestID(), r.hostID)
+ return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr())
+}
+func (r requestFailure) String() string {
+ return r.Error()
+}
+func (r requestFailure) HostID() string {
+ return r.hostID
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
index 5e16be4ba..2596c694b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
@@ -1,139 +1,214 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
import (
- "github.com/aws/aws-sdk-go/private/waiter"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilBucketExists uses the Amazon S3 API operation
// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadBucket",
- Delay: 5,
+ return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilBucketExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 301,
},
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 403,
},
{
- State: "retry",
- Matcher: "status",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadBucketInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadBucketRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilBucketNotExists uses the Amazon S3 API operation
// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadBucket",
- Delay: 5,
+ return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilBucketNotExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadBucketInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadBucketRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilObjectExists uses the Amazon S3 API operation
// HeadObject to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadObject",
- Delay: 5,
+ return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilObjectExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "retry",
- Matcher: "status",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadObjectInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadObjectRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilObjectNotExists uses the Amazon S3 API operation
// HeadObject to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadObject",
- Delay: 5,
+ return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilObjectNotExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadObjectInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadObjectRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
index ad42b4c97..3b8be4378 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
@@ -1,11 +1,11 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package sts provides a client for AWS Security Token Service.
package sts
import (
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -14,19 +14,18 @@ const opAssumeRole = "AssumeRole"
// AssumeRoleRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRole operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRole for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRole method directly
-// instead.
+// See AssumeRole for more information on using the AssumeRole
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleRequest method.
// req, resp := client.AssumeRoleRequest(params)
@@ -172,27 +171,41 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) {
req, out := c.AssumeRoleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssumeRoleWithContext is the same as AssumeRole with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssumeRole for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleInput, opts ...request.Option) (*AssumeRoleOutput, error) {
+ req, out := c.AssumeRoleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
// AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleWithSAML operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRoleWithSAML for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRoleWithSAML method directly
-// instead.
+// See AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleWithSAMLRequest method.
// req, resp := client.AssumeRoleWithSAMLRequest(params)
@@ -331,27 +344,41 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) {
req, out := c.AssumeRoleWithSAMLRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssumeRoleWithSAMLWithContext is the same as AssumeRoleWithSAML with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssumeRoleWithSAML for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *AssumeRoleWithSAMLInput, opts ...request.Option) (*AssumeRoleWithSAMLOutput, error) {
+ req, out := c.AssumeRoleWithSAMLRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
// AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleWithWebIdentity operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRoleWithWebIdentity for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRoleWithWebIdentity method directly
-// instead.
+// See AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleWithWebIdentityRequest method.
// req, resp := client.AssumeRoleWithWebIdentityRequest(params)
@@ -519,27 +546,41 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) {
req, out := c.AssumeRoleWithWebIdentityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssumeRoleWithWebIdentityWithContext is the same as AssumeRoleWithWebIdentity with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssumeRoleWithWebIdentity for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, input *AssumeRoleWithWebIdentityInput, opts ...request.Option) (*AssumeRoleWithWebIdentityOutput, error) {
+ req, out := c.AssumeRoleWithWebIdentityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
// DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the
// client's request for the DecodeAuthorizationMessage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DecodeAuthorizationMessage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DecodeAuthorizationMessage method directly
-// instead.
+// See DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DecodeAuthorizationMessageRequest method.
// req, resp := client.DecodeAuthorizationMessageRequest(params)
@@ -617,27 +658,41 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) {
req, out := c.DecodeAuthorizationMessageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DecodeAuthorizationMessageWithContext is the same as DecodeAuthorizationMessage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DecodeAuthorizationMessage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *DecodeAuthorizationMessageInput, opts ...request.Option) (*DecodeAuthorizationMessageOutput, error) {
+ req, out := c.DecodeAuthorizationMessageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetCallerIdentity = "GetCallerIdentity"
// GetCallerIdentityRequest generates a "aws/request.Request" representing the
// client's request for the GetCallerIdentity operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetCallerIdentity for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetCallerIdentity method directly
-// instead.
+// See GetCallerIdentity for more information on using the GetCallerIdentity
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetCallerIdentityRequest method.
// req, resp := client.GetCallerIdentityRequest(params)
@@ -678,27 +733,41 @@ func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) {
req, out := c.GetCallerIdentityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetCallerIdentityWithContext is the same as GetCallerIdentity with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetCallerIdentity for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCallerIdentityInput, opts ...request.Option) (*GetCallerIdentityOutput, error) {
+ req, out := c.GetCallerIdentityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetFederationToken = "GetFederationToken"
// GetFederationTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetFederationToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetFederationToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetFederationToken method directly
-// instead.
+// See GetFederationToken for more information on using the GetFederationToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetFederationTokenRequest method.
// req, resp := client.GetFederationTokenRequest(params)
@@ -833,27 +902,41 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) {
req, out := c.GetFederationTokenRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetFederationTokenWithContext is the same as GetFederationToken with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetFederationToken for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetFederationTokenInput, opts ...request.Option) (*GetFederationTokenOutput, error) {
+ req, out := c.GetFederationTokenRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetSessionToken = "GetSessionToken"
// GetSessionTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetSessionToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetSessionToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetSessionToken method directly
-// instead.
+// See GetSessionToken for more information on using the GetSessionToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetSessionTokenRequest method.
// req, resp := client.GetSessionTokenRequest(params)
@@ -947,8 +1030,23 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) {
req, out := c.GetSessionTokenRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetSessionTokenWithContext is the same as GetSessionToken with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetSessionToken for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionTokenInput, opts ...request.Option) (*GetSessionTokenOutput, error) {
+ req, out := c.GetSessionTokenRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest
@@ -980,7 +1078,7 @@ type AssumeRoleInput struct {
//
// The regex used to validated this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@:\/-
+ // also include underscores or any of the following characters: =,.@:/-
ExternalId *string `min:"2" type:"string"`
// An IAM policy in JSON format.
@@ -2164,9 +2262,9 @@ type GetSessionTokenInput struct {
// You can find the device for an IAM user by going to the AWS Management Console
// and viewing the user's security credentials.
//
- // The regex used to validate this parameter is a string of characters consisting
+ // The regex used to validated this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
+ // also include underscores or any of the following characters: =,.@:/-
SerialNumber *string `min:"9" type:"string"`
// The value provided by the MFA device, if MFA is required. If any policy requires
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
new file mode 100644
index 000000000..a43fa8055
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
@@ -0,0 +1,72 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package sts provides the client and types for making API
+// requests to AWS Security Token Service.
+//
+// The AWS Security Token Service (STS) is a web service that enables you to
+// request temporary, limited-privilege credentials for AWS Identity and Access
+// Management (IAM) users or for users that you authenticate (federated users).
+// This guide provides descriptions of the STS API. For more detailed information
+// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
+//
+// As an alternative to using the API, you can use one of the AWS SDKs, which
+// consist of libraries and sample code for various programming languages and
+// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient
+// way to create programmatic access to STS. For example, the SDKs take care
+// of cryptographically signing requests, managing errors, and retrying requests
+// automatically. For information about the AWS SDKs, including how to download
+// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/).
+//
+// For information about setting up signatures and authorization through the
+// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)
+// in the AWS General Reference. For general information about the Query API,
+// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html)
+// in Using IAM. For information about using security tokens with other AWS
+// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)
+// in the IAM User Guide.
+//
+// If you're new to AWS and need additional technical information about a specific
+// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/
+// (http://aws.amazon.com/documentation/).
+//
+// Endpoints
+//
+// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com
+// that maps to the US East (N. Virginia) region. Additional regions are available
+// and are activated by default. For more information, see Activating and Deactivating
+// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
+//
+// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region)
+// in the AWS General Reference.
+//
+// Recording API requests
+//
+// STS supports AWS CloudTrail, which is a service that records AWS calls for
+// your AWS account and delivers log files to an Amazon S3 bucket. By using
+// information collected by CloudTrail, you can determine what requests were
+// successfully made to STS, who made the request, when it was made, and so
+// on. To learn more about CloudTrail, including how to turn it on and find
+// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html).
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service.
+//
+// See sts package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/
+//
+// Using the Client
+//
+// To AWS Security Token Service with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
+//
+// See the SDK's documentation for more information on how to use the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws.Config documentation for more information on configuring SDK clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the AWS Security Token Service client STS for more
+// information on creating client for this service.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New
+package sts
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
index dbcd66759..e24884ef3 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sts
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
index 9c4bfb838..1ee5839e0 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sts
@@ -11,54 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/query"
)
-// The AWS Security Token Service (STS) is a web service that enables you to
-// request temporary, limited-privilege credentials for AWS Identity and Access
-// Management (IAM) users or for users that you authenticate (federated users).
-// This guide provides descriptions of the STS API. For more detailed information
-// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
+// STS provides the API operation methods for making requests to
+// AWS Security Token Service. See this package's package overview docs
+// for details on the service.
//
-// As an alternative to using the API, you can use one of the AWS SDKs, which
-// consist of libraries and sample code for various programming languages and
-// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient
-// way to create programmatic access to STS. For example, the SDKs take care
-// of cryptographically signing requests, managing errors, and retrying requests
-// automatically. For information about the AWS SDKs, including how to download
-// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/).
-//
-// For information about setting up signatures and authorization through the
-// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)
-// in the AWS General Reference. For general information about the Query API,
-// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html)
-// in Using IAM. For information about using security tokens with other AWS
-// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)
-// in the IAM User Guide.
-//
-// If you're new to AWS and need additional technical information about a specific
-// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/
-// (http://aws.amazon.com/documentation/).
-//
-// Endpoints
-//
-// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com
-// that maps to the US East (N. Virginia) region. Additional regions are available
-// and are activated by default. For more information, see Activating and Deactivating
-// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region)
-// in the AWS General Reference.
-//
-// Recording API requests
-//
-// STS supports AWS CloudTrail, which is a service that records AWS calls for
-// your AWS account and delivers log files to an Amazon S3 bucket. By using
-// information collected by CloudTrail, you can determine what requests were
-// successfully made to STS, who made the request, when it was made, and so
-// on. To learn more about CloudTrail, including how to turn it on and find
-// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html).
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15
+// STS methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type STS struct {
*client.Client
}
diff --git a/vendor/github.com/denverdino/aliyungo/common/client.go b/vendor/github.com/denverdino/aliyungo/common/client.go
index d186ebd82..a59789fee 100755
--- a/vendor/github.com/denverdino/aliyungo/common/client.go
+++ b/vendor/github.com/denverdino/aliyungo/common/client.go
@@ -32,6 +32,7 @@ type Client struct {
serviceCode string
regionID Region
businessInfo string
+ userAgent string
}
// NewClient creates a new instance of ECS client
@@ -107,6 +108,11 @@ func (client *Client) SetBusinessInfo(businessInfo string) {
}
}
+// SetUserAgent sets user agent to the request/response message
+func (client *Client) SetUserAgent(userAgent string) {
+ client.userAgent = userAgent
+}
+
// Invoke sends the raw HTTP request for ECS services
func (client *Client) Invoke(action string, args interface{}, response interface{}) error {
@@ -131,6 +137,8 @@ func (client *Client) Invoke(action string, args interface{}, response interface
// TODO move to util and add build val flag
httpReq.Header.Set("X-SDK-Client", `AliyunGO/`+Version+client.businessInfo)
+ httpReq.Header.Set("User-Agent", httpReq.UserAgent()+ " " +client.userAgent)
+
t0 := time.Now()
httpResp, err := client.httpClient.Do(httpReq)
t1 := time.Now()
@@ -200,6 +208,8 @@ func (client *Client) InvokeByFlattenMethod(action string, args interface{}, res
// TODO move to util and add build val flag
httpReq.Header.Set("X-SDK-Client", `AliyunGO/`+Version+client.businessInfo)
+ httpReq.Header.Set("User-Agent", httpReq.UserAgent()+ " " +client.userAgent)
+
t0 := time.Now()
httpResp, err := client.httpClient.Do(httpReq)
t1 := time.Now()
@@ -281,6 +291,8 @@ func (client *Client) InvokeByAnyMethod(method, action, path string, args interf
// TODO move to util and add build val flag
httpReq.Header.Set("X-SDK-Client", `AliyunGO/`+Version+client.businessInfo)
+ httpReq.Header.Set("User-Agent", httpReq.Header.Get("User-Agent")+ " " +client.userAgent)
+
t0 := time.Now()
httpResp, err := client.httpClient.Do(httpReq)
t1 := time.Now()
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/disks.go b/vendor/github.com/denverdino/aliyungo/ecs/disks.go
index f1d1e9341..7a67c380d 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/disks.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/disks.go
@@ -110,10 +110,7 @@ type DescribeDisksResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&describedisks
func (client *Client) DescribeDisks(args *DescribeDisksArgs) (disks []DiskItemType, pagination *common.PaginationResult, err error) {
- response := DescribeDisksResponse{}
-
- err = client.Invoke("DescribeDisks", args, &response)
-
+ response, err := client.DescribeDisksWithRaw(args)
if err != nil {
return nil, nil, err
}
@@ -121,6 +118,18 @@ func (client *Client) DescribeDisks(args *DescribeDisksArgs) (disks []DiskItemTy
return response.Disks.Disk, &response.PaginationResult, err
}
+func (client *Client) DescribeDisksWithRaw(args *DescribeDisksArgs) (response *DescribeDisksResponse, err error) {
+ response = &DescribeDisksResponse{}
+
+ err = client.Invoke("DescribeDisks", args, response)
+
+ if err != nil {
+ return nil, err
+ }
+
+ return response, err
+}
+
type CreateDiskArgs struct {
RegionId common.Region
ZoneId string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/forward_entry.go b/vendor/github.com/denverdino/aliyungo/ecs/forward_entry.go
index 2a316e18e..ad716a1a5 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/forward_entry.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/forward_entry.go
@@ -79,12 +79,7 @@ func (client *Client) CreateForwardEntry(args *CreateForwardEntryArgs) (resp *Cr
func (client *Client) DescribeForwardTableEntries(args *DescribeForwardTableEntriesArgs) (forwardTableEntries []ForwardTableEntrySetType,
pagination *common.PaginationResult, err error) {
-
- args.Validate()
- response := DescribeForwardTableEntriesResponse{}
-
- err = client.Invoke("DescribeForwardTableEntries", args, &response)
-
+ response, err := client.DescribeForwardTableEntriesWithRaw(args)
if err != nil {
return nil, nil, err
}
@@ -92,6 +87,19 @@ func (client *Client) DescribeForwardTableEntries(args *DescribeForwardTableEntr
return response.ForwardTableEntries.ForwardTableEntry, &response.PaginationResult, nil
}
+func (client *Client) DescribeForwardTableEntriesWithRaw(args *DescribeForwardTableEntriesArgs) (response *DescribeForwardTableEntriesResponse, err error) {
+ args.Validate()
+ response = &DescribeForwardTableEntriesResponse{}
+
+ err = client.Invoke("DescribeForwardTableEntries", args, response)
+
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
func (client *Client) ModifyForwardEntry(args *ModifyForwardEntryArgs) error {
response := ModifyForwardEntryResponse{}
return client.Invoke("ModifyForwardEntry", args, &response)
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/images.go b/vendor/github.com/denverdino/aliyungo/ecs/images.go
index 0a4e1e2c0..54fe86def 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/images.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/images.go
@@ -37,7 +37,7 @@ const (
ImageUsageNone = ImageUsage("none")
)
-// DescribeImagesArgs repsents arguements to describe images
+// DescribeImagesArgs repsents arguments to describe images
type DescribeImagesArgs struct {
RegionId common.Region
ImageId string
@@ -63,12 +63,12 @@ type DescribeImagesResponse struct {
type DiskDeviceMapping struct {
SnapshotId string
//Why Size Field is string-type.
- Size string
- Device string
+ Size string
+ Device string
//For import images
- Format string
- OSSBucket string
- OSSObject string
+ Format string
+ OSSBucket string
+ OSSObject string
}
//
@@ -102,21 +102,28 @@ type ImageType struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/image&describeimages
func (client *Client) DescribeImages(args *DescribeImagesArgs) (images []ImageType, pagination *common.PaginationResult, err error) {
-
- args.Validate()
- response := DescribeImagesResponse{}
- err = client.Invoke("DescribeImages", args, &response)
+ response, err := client.DescribeImagesWithRaw(args)
if err != nil {
return nil, nil, err
}
return response.Images.Image, &response.PaginationResult, nil
}
-// CreateImageArgs repsents arguements to create image
+func (client *Client) DescribeImagesWithRaw(args *DescribeImagesArgs) (response *DescribeImagesResponse, err error) {
+ args.Validate()
+ response = &DescribeImagesResponse{}
+ err = client.Invoke("DescribeImages", args, response)
+ if err != nil {
+ return nil, err
+ }
+ return response, nil
+}
+
+// CreateImageArgs repsents arguments to create image
type CreateImageArgs struct {
RegionId common.Region
SnapshotId string
- InstanceId string
+ InstanceId string
ImageName string
ImageVersion string
Description string
@@ -163,7 +170,7 @@ func (client *Client) DeleteImage(regionId common.Region, imageId string) error
return client.Invoke("DeleteImage", &args, &response)
}
-// ModifyImageSharePermission repsents arguements to share image
+// ModifyImageSharePermission repsents arguments to share image
type ModifyImageSharePermissionArgs struct {
RegionId common.Region
ImageId string
@@ -232,17 +239,16 @@ func (client *Client) CopyImage(args *CopyImageArgs) (string, error) {
return response.ImageId, nil
}
-
-// ImportImageArgs repsents arguements to import image from oss
+// ImportImageArgs repsents arguments to import image from oss
type ImportImageArgs struct {
- RegionId common.Region
- ImageName string
- ImageVersion string
- Description string
- ClientToken string
- Architecture string
- OSType string
- Platform string
+ RegionId common.Region
+ ImageName string
+ ImageVersion string
+ Description string
+ ClientToken string
+ Architecture string
+ OSType string
+ Platform string
DiskDeviceMappings struct {
DiskDeviceMapping []DiskDeviceMapping
}
@@ -259,8 +265,8 @@ func (client *Client) ImportImage(args *ImportImageArgs) (string, error) {
type ImportImageResponse struct {
common.Response
- RegionId common.Region
- ImageId string
+ RegionId common.Region
+ ImageId string
ImportTaskId string
}
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/instances.go b/vendor/github.com/denverdino/aliyungo/ecs/instances.go
index d127d55ab..4eb999537 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/instances.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/instances.go
@@ -15,7 +15,7 @@ type InstanceStatus string
// Constants of InstanceStatus
const (
- Creating = InstanceStatus("Creating") // For backward compatability
+ Creating = InstanceStatus("Creating") // For backward compatibility
Pending = InstanceStatus("Pending")
Running = InstanceStatus("Running")
Starting = InstanceStatus("Starting")
@@ -94,10 +94,7 @@ type DescribeInstanceStatusResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&describeinstancestatus
func (client *Client) DescribeInstanceStatus(args *DescribeInstanceStatusArgs) (instanceStatuses []InstanceStatusItemType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeInstanceStatusResponse{}
-
- err = client.Invoke("DescribeInstanceStatus", args, &response)
+ response, err := client.DescribeInstanceStatusWithRaw(args)
if err == nil {
return response.InstanceStatuses.InstanceStatus, &response.PaginationResult, nil
@@ -106,6 +103,18 @@ func (client *Client) DescribeInstanceStatus(args *DescribeInstanceStatusArgs) (
return nil, nil, err
}
+func (client *Client) DescribeInstanceStatusWithRaw(args *DescribeInstanceStatusArgs) (response *DescribeInstanceStatusResponse, err error) {
+ args.Validate()
+ response = &DescribeInstanceStatusResponse{}
+
+ err = client.Invoke("DescribeInstanceStatus", args, response)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
type StopInstanceArgs struct {
InstanceId string
ForceStop bool
@@ -254,6 +263,7 @@ type InstanceAttributesType struct {
Tag []TagItemType
}
SpotStrategy SpotStrategyType
+ KeyPairName string
}
type DescribeInstanceAttributeResponse struct {
@@ -408,16 +418,24 @@ type DescribeInstancesResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&describeinstances
func (client *Client) DescribeInstances(args *DescribeInstancesArgs) (instances []InstanceAttributesType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeInstancesResponse{}
-
- err = client.Invoke("DescribeInstances", args, &response)
-
- if err == nil {
- return response.Instances.Instance, &response.PaginationResult, nil
+ response, err := client.DescribeInstancesWithRaw(args)
+ if err != nil {
+ return nil, nil, err
}
- return nil, nil, err
+ return response.Instances.Instance, &response.PaginationResult, nil
+}
+
+func (client *Client) DescribeInstancesWithRaw(args *DescribeInstancesArgs) (response *DescribeInstancesResponse, err error) {
+ args.Validate()
+ response = &DescribeInstancesResponse{}
+
+ err = client.Invoke("DescribeInstances", args, &response)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
}
type DeleteInstanceArgs struct {
@@ -517,6 +535,7 @@ type CreateInstanceArgs struct {
AutoRenew bool
AutoRenewPeriod int
SpotStrategy SpotStrategyType
+ KeyPairName string
}
type CreateInstanceResponse struct {
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go b/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go
index dfcb74d32..10e00638e 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go
@@ -83,12 +83,7 @@ type DescribeNatGatewaysArgs struct {
func (client *Client) DescribeNatGateways(args *DescribeNatGatewaysArgs) (natGateways []NatGatewaySetType,
pagination *common.PaginationResult, err error) {
-
- args.Validate()
- response := DescribeNatGatewayResponse{}
-
- err = client.Invoke("DescribeNatGateways", args, &response)
-
+ response, err := client.DescribeNatGatewaysWithRaw(args)
if err == nil {
return response.NatGateways.NatGateway, &response.PaginationResult, nil
}
@@ -96,6 +91,19 @@ func (client *Client) DescribeNatGateways(args *DescribeNatGatewaysArgs) (natGat
return nil, nil, err
}
+func (client *Client) DescribeNatGatewaysWithRaw(args *DescribeNatGatewaysArgs) (response *DescribeNatGatewayResponse, err error) {
+ args.Validate()
+ response = &DescribeNatGatewayResponse{}
+
+ err = client.Invoke("DescribeNatGateways", args, response)
+
+ if err == nil {
+ return response, nil
+ }
+
+ return nil, err
+}
+
type ModifyNatGatewayAttributeArgs struct {
RegionId common.Region
NatGatewayId string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/networks.go b/vendor/github.com/denverdino/aliyungo/ecs/networks.go
index fecc7af1a..100835c37 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/networks.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/networks.go
@@ -146,11 +146,7 @@ type DescribeEipAddressesResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&describeeipaddresses
func (client *Client) DescribeEipAddresses(args *DescribeEipAddressesArgs) (eipAddresses []EipAddressSetType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeEipAddressesResponse{}
-
- err = client.Invoke("DescribeEipAddresses", args, &response)
-
+ response, err := client.DescribeEipAddressesWithRaw(args)
if err == nil {
return response.EipAddresses.EipAddress, &response.PaginationResult, nil
}
@@ -158,6 +154,19 @@ func (client *Client) DescribeEipAddresses(args *DescribeEipAddressesArgs) (eipA
return nil, nil, err
}
+func (client *Client) DescribeEipAddressesWithRaw(args *DescribeEipAddressesArgs) (response *DescribeEipAddressesResponse, err error) {
+ args.Validate()
+ response = &DescribeEipAddressesResponse{}
+
+ err = client.Invoke("DescribeEipAddresses", args, response)
+
+ if err == nil {
+ return response, nil
+ }
+
+ return nil, err
+}
+
type ModifyEipAddressAttributeArgs struct {
AllocationId string
Bandwidth int
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go b/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go
index 01f43127c..cc85cb129 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/route_tables.go
@@ -76,11 +76,7 @@ type DescribeRouteTablesResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/routertable&describeroutetables
func (client *Client) DescribeRouteTables(args *DescribeRouteTablesArgs) (routeTables []RouteTableSetType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeRouteTablesResponse{}
-
- err = client.Invoke("DescribeRouteTables", args, &response)
-
+ response, err := client.DescribeRouteTablesWithRaw(args)
if err == nil {
return response.RouteTables.RouteTable, &response.PaginationResult, nil
}
@@ -88,6 +84,19 @@ func (client *Client) DescribeRouteTables(args *DescribeRouteTablesArgs) (routeT
return nil, nil, err
}
+func (client *Client) DescribeRouteTablesWithRaw(args *DescribeRouteTablesArgs) (response *DescribeRouteTablesResponse, err error) {
+ args.Validate()
+ response = &DescribeRouteTablesResponse{}
+
+ err = client.Invoke("DescribeRouteTables", args, &response)
+
+ if err == nil {
+ return response, nil
+ }
+
+ return nil, err
+}
+
type NextHopType string
const (
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go b/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go
index eaec701de..54af3a798 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/security_groups.go
@@ -108,11 +108,7 @@ type DescribeSecurityGroupsResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/securitygroup&describesecuritygroups
func (client *Client) DescribeSecurityGroups(args *DescribeSecurityGroupsArgs) (securityGroupItems []SecurityGroupItemType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeSecurityGroupsResponse{}
-
- err = client.Invoke("DescribeSecurityGroups", args, &response)
-
+ response, err := client.DescribeSecurityGroupsWithRaw(args)
if err != nil {
return nil, nil, err
}
@@ -120,6 +116,19 @@ func (client *Client) DescribeSecurityGroups(args *DescribeSecurityGroupsArgs) (
return response.SecurityGroups.SecurityGroup, &response.PaginationResult, nil
}
+func (client *Client) DescribeSecurityGroupsWithRaw(args *DescribeSecurityGroupsArgs) (response *DescribeSecurityGroupsResponse, err error) {
+ args.Validate()
+ response = &DescribeSecurityGroupsResponse{}
+
+ err = client.Invoke("DescribeSecurityGroups", args, response)
+
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
type CreateSecurityGroupArgs struct {
RegionId common.Region
SecurityGroupName string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go b/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go
index fb6f9c8e1..f3c1b09c5 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/snapshots.go
@@ -41,11 +41,7 @@ type DescribeSnapshotsResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/snapshot&describesnapshots
func (client *Client) DescribeSnapshots(args *DescribeSnapshotsArgs) (snapshots []SnapshotType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeSnapshotsResponse{}
-
- err = client.Invoke("DescribeSnapshots", args, &response)
-
+ response, err := client.DescribeSnapshotsWithRaw(args)
if err != nil {
return nil, nil, err
}
@@ -53,6 +49,19 @@ func (client *Client) DescribeSnapshots(args *DescribeSnapshotsArgs) (snapshots
}
+func (client *Client) DescribeSnapshotsWithRaw(args *DescribeSnapshotsArgs) (response *DescribeSnapshotsResponse, err error) {
+ args.Validate()
+ response = &DescribeSnapshotsResponse{}
+
+ err = client.Invoke("DescribeSnapshots", args, response)
+
+ if err != nil {
+ return nil, err
+ }
+ return response, nil
+
+}
+
type DeleteSnapshotArgs struct {
SnapshotId string
}
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go b/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go
index aa75574c3..d9806d769 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/snat_entry.go
@@ -70,12 +70,7 @@ func (client *Client) CreateSnatEntry(args *CreateSnatEntryArgs) (resp *CreateSn
func (client *Client) DescribeSnatTableEntries(args *DescribeSnatTableEntriesArgs) (snatTableEntries []SnatEntrySetType,
pagination *common.PaginationResult, err error) {
-
- args.Validate()
- response := DescribeSnatTableEntriesResponse{}
-
- err = client.Invoke("DescribeSnatTableEntries", args, &response)
-
+ response, err := client.DescribeSnatTableEntriesWithRaw(args)
if err != nil {
return nil, nil, err
}
@@ -83,6 +78,19 @@ func (client *Client) DescribeSnatTableEntries(args *DescribeSnatTableEntriesArg
return response.SnatTableEntries.SnatTableEntry, &response.PaginationResult, nil
}
+func (client *Client) DescribeSnatTableEntriesWithRaw(args *DescribeSnatTableEntriesArgs) ( response *DescribeSnatTableEntriesResponse, err error) {
+ args.Validate()
+ response = &DescribeSnatTableEntriesResponse{}
+
+ err = client.Invoke("DescribeSnatTableEntries", args, response)
+
+ if err != nil {
+ return nil, err
+ }
+
+ return response, nil
+}
+
func (client *Client) ModifySnatEntry(args *ModifySnatEntryArgs) error {
response := ModifySnatEntryResponse{}
return client.Invoke("ModifySnatEntry", args, &response)
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go b/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go
index bd742442e..76f1a3803 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/ssh_key_pair.go
@@ -77,10 +77,7 @@ type DescribeKeyPairsResponse struct {
//
// You can read doc at https://help.aliyun.com/document_detail/51773.html?spm=5176.doc51774.6.912.lyE0iX
func (client *Client) DescribeKeyPairs(args *DescribeKeyPairsArgs) (KeyPairs []KeyPairItemType, pagination *common.PaginationResult, err error) {
- response := DescribeKeyPairsResponse{}
-
- err = client.Invoke("DescribeKeyPairs", args, &response)
-
+ response, err := client.DescribeKeyPairsWithRaw(args)
if err != nil {
return nil, nil, err
}
@@ -88,6 +85,18 @@ func (client *Client) DescribeKeyPairs(args *DescribeKeyPairsArgs) (KeyPairs [
return response.KeyPairs.KeyPair, &response.PaginationResult, err
}
+func (client *Client) DescribeKeyPairsWithRaw(args *DescribeKeyPairsArgs) (response *DescribeKeyPairsResponse, err error) {
+ response = &DescribeKeyPairsResponse{}
+
+ err = client.Invoke("DescribeKeyPairs", args, response)
+
+ if err != nil {
+ return nil, err
+ }
+
+ return response, err
+}
+
type AttachKeyPairArgs struct {
RegionId common.Region
KeyPairName string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/tags.go b/vendor/github.com/denverdino/aliyungo/ecs/tags.go
index 5ffd4931a..fb2519a1d 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/tags.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/tags.go
@@ -76,15 +76,23 @@ type DescribeResourceByTagsResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/tags&describeresourcebytags
func (client *Client) DescribeResourceByTags(args *DescribeResourceByTagsArgs) (resources []ResourceItemType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeResourceByTagsResponse{}
- err = client.Invoke("DescribeResourceByTags", args, &response)
+ response, err := client.DescribeResourceByTagsWithRaw(args)
if err != nil {
return nil, nil, err
}
return response.Resources.Resource, &response.PaginationResult, nil
}
+func (client *Client) DescribeResourceByTagsWithRaw(args *DescribeResourceByTagsArgs) (response *DescribeResourceByTagsResponse, err error) {
+ args.Validate()
+ response = &DescribeResourceByTagsResponse{}
+ err = client.Invoke("DescribeResourceByTags", args, response)
+ if err != nil {
+ return nil, err
+ }
+ return response, nil
+}
+
type TagItemType struct {
TagKey string
TagValue string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go b/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go
index 80faf21ca..d66fe1027 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/vpcs.go
@@ -95,16 +95,24 @@ type DescribeVpcsResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vpc&describevpcs
func (client *Client) DescribeVpcs(args *DescribeVpcsArgs) (vpcs []VpcSetType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeVpcsResponse{}
-
- err = client.Invoke("DescribeVpcs", args, &response)
-
- if err == nil {
- return response.Vpcs.Vpc, &response.PaginationResult, nil
+ response, err := client.DescribeVpcsWithRaw(args)
+ if err != nil {
+ return nil, nil, err
}
- return nil, nil, err
+ return response.Vpcs.Vpc, &response.PaginationResult, nil
+}
+
+func (client *Client) DescribeVpcsWithRaw(args *DescribeVpcsArgs) (response *DescribeVpcsResponse, err error) {
+ args.Validate()
+ response = &DescribeVpcsResponse{}
+
+ err = client.Invoke("DescribeVpcs", args, response)
+ if err != nil {
+ return nil, err
+ }
+
+ return response, err
}
type ModifyVpcAttributeArgs struct {
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/vrouters.go b/vendor/github.com/denverdino/aliyungo/ecs/vrouters.go
index 059a324bd..04d43daa8 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/vrouters.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/vrouters.go
@@ -37,11 +37,7 @@ type DescribeVRoutersResponse struct {
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vrouter&describevrouters
func (client *Client) DescribeVRouters(args *DescribeVRoutersArgs) (vrouters []VRouterSetType, pagination *common.PaginationResult, err error) {
- args.Validate()
- response := DescribeVRoutersResponse{}
-
- err = client.Invoke("DescribeVRouters", args, &response)
-
+ response, err := client.DescribeVRoutersWithRaw(args)
if err == nil {
return response.VRouters.VRouter, &response.PaginationResult, nil
}
@@ -49,6 +45,19 @@ func (client *Client) DescribeVRouters(args *DescribeVRoutersArgs) (vrouters []V
return nil, nil, err
}
+func (client *Client) DescribeVRoutersWithRaw(args *DescribeVRoutersArgs) (response *DescribeVRoutersResponse, err error) {
+ args.Validate()
+ response = &DescribeVRoutersResponse{}
+
+ err = client.Invoke("DescribeVRouters", args, response)
+
+ if err == nil {
+ return response, nil
+ }
+
+ return nil, err
+}
+
type ModifyVRouterAttributeArgs struct {
VRouterId string
VRouterName string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/vswitches.go b/vendor/github.com/denverdino/aliyungo/ecs/vswitches.go
index 8a879ec80..22d5ec8ea 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/vswitches.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/vswitches.go
@@ -53,6 +53,7 @@ func (client *Client) DeleteVSwitch(VSwitchId string) error {
}
type DescribeVSwitchesArgs struct {
+ RegionId common.Region
VpcId string
VSwitchId string
ZoneId string
@@ -94,10 +95,7 @@ type DescribeVSwitchesResponse struct {
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vswitch&describevswitches
func (client *Client) DescribeVSwitches(args *DescribeVSwitchesArgs) (vswitches []VSwitchSetType, pagination *common.PaginationResult, err error) {
args.Validate()
- response := DescribeVSwitchesResponse{}
-
- err = client.Invoke("DescribeVSwitches", args, &response)
-
+ response, err := client.DescribeVSwitchesWithRaw(args)
if err == nil {
return response.VSwitches.VSwitch, &response.PaginationResult, nil
}
@@ -105,6 +103,19 @@ func (client *Client) DescribeVSwitches(args *DescribeVSwitchesArgs) (vswitches
return nil, nil, err
}
+func (client *Client) DescribeVSwitchesWithRaw(args *DescribeVSwitchesArgs) (response *DescribeVSwitchesResponse, err error) {
+ args.Validate()
+ response = &DescribeVSwitchesResponse{}
+
+ err = client.Invoke("DescribeVSwitches", args, &response)
+
+ if err == nil {
+ return response, nil
+ }
+
+ return nil, err
+}
+
type ModifyVSwitchAttributeArgs struct {
VSwitchId string
VSwitchName string
diff --git a/vendor/github.com/denverdino/aliyungo/ecs/zones.go b/vendor/github.com/denverdino/aliyungo/ecs/zones.go
index 4818c760f..61ecb0759 100644
--- a/vendor/github.com/denverdino/aliyungo/ecs/zones.go
+++ b/vendor/github.com/denverdino/aliyungo/ecs/zones.go
@@ -11,6 +11,34 @@ const (
ResourceTypeIOOptimizedInstance = ResourceType("IoOptimized")
)
+// The sub-item of the type AvailableResourcesType
+type SupportedResourceType string
+
+const (
+ SupportedInstanceType = SupportedResourceType("supportedInstanceType")
+ SupportedInstanceTypeFamily = SupportedResourceType("supportedInstanceTypeFamily")
+ SupportedInstanceGeneration = SupportedResourceType("supportedInstanceGeneration")
+ SupportedSystemDiskCategory = SupportedResourceType("supportedSystemDiskCategory")
+ SupportedDataDiskCategory = SupportedResourceType("supportedDataDiskCategory")
+ SupportedNetworkCategory = SupportedResourceType("supportedNetworkCategory")
+
+)
+//
+// You can read doc at https://help.aliyun.com/document_detail/25670.html?spm=5176.doc25640.2.1.J24zQt
+type ResourcesInfoType struct {
+ ResourcesInfo []AvailableResourcesType
+}
+// Because the sub-item of AvailableResourcesType starts with supported and golang struct cann't refer them, this uses map to parse ResourcesInfo
+type AvailableResourcesType struct {
+ IoOptimized bool
+ NetworkTypes map[SupportedResourceType][]string
+ InstanceGenerations map[SupportedResourceType][]string
+ InstanceTypeFamilies map[SupportedResourceType][]string
+ InstanceTypes map[SupportedResourceType][]string
+ SystemDiskCategories map[SupportedResourceType][]DiskCategory
+ DataDiskCategories map[SupportedResourceType][]DiskCategory
+}
+
type DescribeZonesArgs struct {
RegionId common.Region
}
@@ -36,6 +64,7 @@ type AvailableInstanceTypesType struct {
type ZoneType struct {
ZoneId string
LocalName string
+ AvailableResources ResourcesInfoType
AvailableInstanceTypes AvailableInstanceTypesType
AvailableResourceCreation AvailableResourceCreationType
AvailableDiskCategories AvailableDiskCategoriesType
@@ -50,16 +79,25 @@ type DescribeZonesResponse struct {
// DescribeZones describes zones
func (client *Client) DescribeZones(regionId common.Region) (zones []ZoneType, err error) {
- args := DescribeZonesArgs{
- RegionId: regionId,
- }
- response := DescribeZonesResponse{}
-
- err = client.Invoke("DescribeZones", &args, &response)
-
+ response, err := client.DescribeZonesWithRaw(regionId)
if err == nil {
return response.Zones.Zone, nil
}
return []ZoneType{}, err
}
+
+func (client *Client) DescribeZonesWithRaw(regionId common.Region) (response *DescribeZonesResponse, err error) {
+ args := DescribeZonesArgs{
+ RegionId: regionId,
+ }
+ response = &DescribeZonesResponse{}
+
+ err = client.Invoke("DescribeZones", &args, response)
+
+ if err == nil {
+ return response, nil
+ }
+
+ return nil, err
+}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/api.go b/vendor/github.com/denverdino/aliyungo/ram/api.go
index 8ad173b78..d8f50296e 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/api.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/api.go
@@ -13,11 +13,11 @@ type RamClientInterface interface {
DeleteUser(userQuery UserQueryRequest) (RamCommonResponse, error)
ListUsers(listParams ListUserRequest) (ListUserResponse, error)
- //TODO login ram console
- CreateLoginProfile()
- GetLoginProfile()
- DeleteLoginProfile()
- UpdateLoginProfile()
+ //ram login profile
+ CreateLoginProfile(req ProfileRequest) (ProfileResponse, error)
+ GetLoginProfile(req UserQueryRequest) (ProfileResponse, error)
+ DeleteLoginProfile(req UserQueryRequest) (RamCommonResponse, error)
+ UpdateLoginProfile(req ProfileRequest) (ProfileResponse, error)
//ram ak
CreateAccessKey(userQuery UserQueryRequest) (AccessKeyResponse, error)
@@ -25,23 +25,24 @@ type RamClientInterface interface {
DeleteAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
ListAccessKeys(userQuery UserQueryRequest) (AccessKeyListResponse, error)
- //TODO MFA
- CreateVirtualMFADevices()
- ListVirtualMFADevices()
- DeleteVirtualMFADevices()
- BindMFADevice()
- GetUserMFAInfo()
+ //ram mfa
+ CreateVirtualMFADevice(req MFARequest) (MFAResponse, error)
+ ListVirtualMFADevices() (MFAListResponse, error)
+ DeleteVirtualMFADevice(req MFADeleteRequest) (RamCommonResponse, error)
+ BindMFADevice(req MFABindRequest) (RamCommonResponse, error)
+ UnbindMFADevice(req UserQueryRequest) (MFAUserResponse, error)
+ GetUserMFAInfo(req UserQueryRequest) (MFAUserResponse, error)
- //TODO group
- CreateGroup()
- GetGroup()
- UpdateGroup()
- ListGroup()
- DeleteGroup()
- AddUserToGroup()
- RemoveUserFromGroup()
- ListGroupsForUser()
- ListUsersForGroup()
+ //ram group
+ CreateGroup(req GroupRequest) (GroupResponse, error)
+ GetGroup(req GroupQueryRequest) (GroupResponse, error)
+ UpdateGroup(req GroupUpdateRequest) (GroupResponse, error)
+ ListGroup(req GroupListRequest) (GroupListResponse, error)
+ DeleteGroup(req GroupQueryRequest) (RamCommonResponse, error)
+ AddUserToGroup(req UserRelateGroupRequest) (RamCommonResponse, error)
+ RemoveUserFromGroup(req UserRelateGroupRequest) (RamCommonResponse, error)
+ ListGroupsForUser(req UserQueryRequest) (GroupListResponse, error)
+ ListUsersForGroup(req GroupQueryRequest) (ListUserResponse, error)
CreateRole(role RoleRequest) (RoleResponse, error)
GetRole(roleQuery RoleQueryRequest) (RoleResponse, error)
@@ -56,24 +57,28 @@ type RamClientInterface interface {
ListPolicies(policyQuery PolicyQueryRequest) (PolicyQueryResponse, error)
ListPoliciesForUser(userQuery UserQueryRequest) (PolicyListResponse, error)
- //TODO policy
+ //ram policy version
CreatePolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
GetPolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
+ GetPolicyVersionNew(policyReq PolicyRequest) (PolicyVersionResponseNew, error)
DeletePolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error)
ListPolicyVersions(policyReq PolicyRequest) (PolicyVersionResponse, error)
+ ListPolicyVersionsNew(policyReq PolicyRequest) (PolicyVersionsResponse, error)
AttachPolicyToUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
DetachPolicyFromUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
- ListEnitiesForPolicy()
- SetDefaultPolicyVersion()
- ListPoliciesForGroup()
+ ListEntitiesForPolicy(policyReq PolicyRequest) (PolicyListEntitiesResponse, error)
+ SetDefaultPolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error)
+ ListPoliciesForGroup(groupQuery GroupQueryRequest) (PolicyListResponse, error)
+ AttachPolicyToGroup(attachPolicyRequest AttachPolicyToGroupRequest) (RamCommonResponse, error)
+ DetachPolicyFromGroup(attachPolicyRequest AttachPolicyToGroupRequest) (RamCommonResponse, error)
AttachPolicyToRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
DetachPolicyFromRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
ListPoliciesForRole(roleQuery RoleQueryRequest) (PolicyListResponse, error)
- //TODO security apis
- SetAccountAlias(accountAlias AccountAlias) (RamCommonResponse, error)
+ //ram security
+ SetAccountAlias(accountAlias AccountAliasRequest) (RamCommonResponse, error)
GetAccountAlias() (AccountAliasResponse, error)
ClearAccountAlias() (RamCommonResponse, error)
SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error)
- GetPasswordPolicy(accountAlias AccountAlias) (PasswordPolicyResponse, error)
+ GetPasswordPolicy() (PasswordPolicyResponse, error)
}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/group.go b/vendor/github.com/denverdino/aliyungo/ram/group.go
index a64e68fb4..6f1224f5f 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/group.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/group.go
@@ -1,11 +1,118 @@
package ram
-func (client *RamClient) CreateGroup() {}
-func (client *RamClient) GetGroup() {}
-func (client *RamClient) UpdateGroup() {}
-func (client *RamClient) ListGroup() {}
-func (client *RamClient) DeleteGroup() {}
-func (client *RamClient) AddUserToGroup() {}
-func (client *RamClient) RemoveUserFromGroup() {}
-func (client *RamClient) ListGroupsForUser() {}
-func (client *RamClient) ListUsersForGroup() {}
+type GroupRequest struct {
+ Group
+}
+
+type GroupQueryRequest struct {
+ GroupName string
+}
+
+type GroupUpdateRequest struct {
+ GroupName string
+ NewGroupName string
+ NewComments string
+}
+
+type GroupListRequest struct {
+ Marker string
+ MaxItems int8
+}
+
+type UserRelateGroupRequest struct {
+ UserName string
+ GroupName string
+}
+
+type GroupResponse struct {
+ RamCommonResponse
+ Group Group
+}
+
+type GroupListResponse struct {
+ RamCommonResponse
+ Groups struct {
+ Group []Group
+ }
+}
+
+func (client *RamClient) CreateGroup(req GroupRequest) (GroupResponse, error) {
+ var resp GroupResponse
+ err := client.Invoke("CreateGroup", req, &resp)
+ if err != nil {
+ return GroupResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) GetGroup(req GroupQueryRequest) (GroupResponse, error) {
+ var resp GroupResponse
+ err := client.Invoke("GetGroup", req, &resp)
+ if err != nil {
+ return GroupResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) UpdateGroup(req GroupUpdateRequest) (GroupResponse, error) {
+ var resp GroupResponse
+ err := client.Invoke("UpdateGroup", req, &resp)
+ if err != nil {
+ return GroupResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) ListGroup(req GroupListRequest) (GroupListResponse, error) {
+ var resp GroupListResponse
+ err := client.Invoke("ListGroups", req, &resp)
+ if err != nil {
+ return GroupListResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) DeleteGroup(req GroupQueryRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("DeleteGroup", req, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) AddUserToGroup(req UserRelateGroupRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("AddUserToGroup", req, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) RemoveUserFromGroup(req UserRelateGroupRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("RemoveUserFromGroup", req, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) ListGroupsForUser(req UserQueryRequest) (GroupListResponse, error) {
+ var resp GroupListResponse
+ err := client.Invoke("ListGroupsForUser", req, &resp)
+ if err != nil {
+ return GroupListResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) ListUsersForGroup(req GroupQueryRequest) (ListUserResponse, error) {
+ var resp ListUserResponse
+ err := client.Invoke("ListUsersForGroup", req, &resp)
+ if err != nil {
+ return ListUserResponse{}, err
+ }
+ return resp, nil
+}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/mfa.go b/vendor/github.com/denverdino/aliyungo/ram/mfa.go
index 07d6b3945..708dfe262 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/mfa.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/mfa.go
@@ -1,11 +1,87 @@
package ram
-func (client *RamClient) CreateVirtualMFADevices() {}
+type MFARequest struct {
+ VirtualMFADeviceName string
+}
-func (client *RamClient) ListVirtualMFADevices() {}
+type MFADeleteRequest struct {
+ MFADevice
+}
-func (client *RamClient) DeleteVirtualMFADevices() {}
+type MFABindRequest struct {
+ SerialNumber string
+ UserName string
+ AuthenticationCode1 string
+ AuthenticationCode2 string
+}
-func (client *RamClient) BindMFADevice() {}
+type MFAResponse struct {
+ RamCommonResponse
+ VirtualMFADevice VirtualMFADevice
+}
-func (client *RamClient) GetUserMFAInfo() {}
+type MFAListResponse struct {
+ RamCommonResponse
+ VirtualMFADevices struct {
+ VirtualMFADevice []VirtualMFADevice
+ }
+}
+
+type MFAUserResponse struct {
+ RamCommonResponse
+ MFADevice MFADevice
+}
+
+func (client *RamClient) CreateVirtualMFADevice(req MFARequest) (MFAResponse, error) {
+ var resp MFAResponse
+ err := client.Invoke("CreateVirtualMFADevice", req, &resp)
+ if err != nil {
+ return MFAResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) ListVirtualMFADevices() (MFAListResponse, error) {
+ var resp MFAListResponse
+ err := client.Invoke("ListVirtualMFADevices", struct{}{}, &resp)
+ if err != nil {
+ return MFAListResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) DeleteVirtualMFADevice(req MFADeleteRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("DeleteVirtualMFADevice", req, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) BindMFADevice(req MFABindRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("BindMFADevice", req, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) UnbindMFADevice(req UserQueryRequest) (MFAUserResponse, error) {
+ var resp MFAUserResponse
+ err := client.Invoke("UnbindMFADevice", req, &resp)
+ if err != nil {
+ return MFAUserResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) GetUserMFAInfo(req UserQueryRequest) (MFAUserResponse, error) {
+ var resp MFAUserResponse
+ err := client.Invoke("GetUserMFAInfo", req, &resp)
+ if err != nil {
+ return MFAUserResponse{}, err
+ }
+ return resp, nil
+}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/policy.go b/vendor/github.com/denverdino/aliyungo/ram/policy.go
index 2eaed4f4e..b0a84b86d 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/policy.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/policy.go
@@ -52,6 +52,41 @@ type AttachPolicyToRoleRequest struct {
RoleName string
}
+type PolicyVersionResponseNew struct {
+ RamCommonResponse
+ PolicyVersion struct {
+ IsDefaultVersion bool
+ VersionId string
+ CreateDate string
+ PolicyDocument string
+ }
+}
+
+type AttachPolicyToGroupRequest struct {
+ PolicyRequest
+ GroupName string
+}
+
+type PolicyVersionsResponse struct {
+ RamCommonResponse
+ PolicyVersions struct {
+ PolicyVersion []PolicyVersion
+ }
+}
+
+type PolicyListEntitiesResponse struct {
+ RamCommonResponse
+ Groups struct {
+ Group []Group
+ }
+ Users struct {
+ User []User
+ }
+ Roles struct {
+ Role []Role
+ }
+}
+
func (client *RamClient) CreatePolicy(policyReq PolicyRequest) (PolicyResponse, error) {
var resp PolicyResponse
err := client.Invoke("CreatePolicy", policyReq, &resp)
@@ -106,6 +141,15 @@ func (client *RamClient) GetPolicyVersion(policyReq PolicyRequest) (PolicyVersio
return resp, nil
}
+func (client *RamClient) GetPolicyVersionNew(policyReq PolicyRequest) (PolicyVersionResponseNew, error) {
+ var resp PolicyVersionResponseNew
+ err := client.Invoke("GetPolicyVersion", policyReq, &resp)
+ if err != nil {
+ return PolicyVersionResponseNew{}, err
+ }
+ return resp, nil
+}
+
func (client *RamClient) DeletePolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error) {
var resp RamCommonResponse
err := client.Invoke("DeletePolicyVersion", policyReq, &resp)
@@ -124,8 +168,23 @@ func (client *RamClient) ListPolicyVersions(policyReq PolicyRequest) (PolicyVers
return resp, nil
}
-//TODO
-func (client *RamClient) SetDefaultPolicyVersion() {}
+func (client *RamClient) ListPolicyVersionsNew(policyReq PolicyRequest) (PolicyVersionsResponse, error) {
+ var resp PolicyVersionsResponse
+ err := client.Invoke("ListPolicyVersions", policyReq, &resp)
+ if err != nil {
+ return PolicyVersionsResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) SetDefaultPolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("SetDefaultPolicyVersion", policyReq, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
func (client *RamClient) AttachPolicyToUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error) {
var resp RamCommonResponse
@@ -145,8 +204,14 @@ func (client *RamClient) DetachPolicyFromUser(attachPolicyRequest AttachPolicyRe
return resp, nil
}
-//TODO
-func (client *RamClient) ListEnitiesForPolicy() {}
+func (client *RamClient) ListEntitiesForPolicy(policyReq PolicyRequest) (PolicyListEntitiesResponse, error) {
+ var resp PolicyListEntitiesResponse
+ err := client.Invoke("ListEntitiesForPolicy", policyReq, &resp)
+ if err != nil {
+ return PolicyListEntitiesResponse{}, err
+ }
+ return resp, nil
+}
func (client *RamClient) ListPoliciesForUser(userQuery UserQueryRequest) (PolicyListResponse, error) {
var resp PolicyListResponse
@@ -190,6 +255,29 @@ func (client *RamClient) ListPoliciesForRole(roleQuery RoleQueryRequest) (Policy
//
//Group related
//
-//TODO
-//
-func (client *RamClient) ListPoliciesForGroup() {}
+func (client *RamClient) AttachPolicyToGroup(attachPolicyRequest AttachPolicyToGroupRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("AttachPolicyToGroup", attachPolicyRequest, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) DetachPolicyFromGroup(attachPolicyRequest AttachPolicyToGroupRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("DetachPolicyFromGroup", attachPolicyRequest, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) ListPoliciesForGroup(groupQuery GroupQueryRequest) (PolicyListResponse, error) {
+ var resp PolicyListResponse
+ err := client.Invoke("ListPoliciesForGroup", groupQuery, &resp)
+ if err != nil {
+ return PolicyListResponse{}, err
+ }
+ return resp, nil
+}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/profile.go b/vendor/github.com/denverdino/aliyungo/ram/profile.go
index 91dd32e31..fb8276193 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/profile.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/profile.go
@@ -7,18 +7,50 @@ package ram
UpdateLoginProfile()
*/
-func (client *RamClient) CreateLoginProfile() {
-
+type ProfileRequest struct {
+ UserName string
+ Password string
+ PasswordResetRequired bool
+ MFABindRequired bool
}
-func (client *RamClient) GetLoginProfile() {
-
+type ProfileResponse struct {
+ RamCommonResponse
+ LoginProfile LoginProfile
}
-func (client *RamClient) DeleteLoginProfile() {
-
+func (client *RamClient) CreateLoginProfile(req ProfileRequest) (ProfileResponse, error) {
+ var resp ProfileResponse
+ err := client.Invoke("CreateLoginProfile", req, &resp)
+ if err != nil {
+ return ProfileResponse{}, err
+ }
+ return resp, nil
}
-func (client *RamClient) UpdateLoginProfile() {
-
+func (client *RamClient) GetLoginProfile(req UserQueryRequest) (ProfileResponse, error) {
+ var resp ProfileResponse
+ err := client.Invoke("GetLoginProfile", req, &resp)
+ if err != nil {
+ return ProfileResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) DeleteLoginProfile(req UserQueryRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("DeleteLoginProfile", req, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
+}
+
+func (client *RamClient) UpdateLoginProfile(req ProfileRequest) (ProfileResponse, error) {
+ var resp ProfileResponse
+ err := client.Invoke("UpdateLoginProfile", req, &resp)
+ if err != nil {
+ return ProfileResponse{}, err
+ }
+ return resp, nil
}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/security.go b/vendor/github.com/denverdino/aliyungo/ram/security.go
index da5f4a78e..5421ba0b9 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/security.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/security.go
@@ -22,19 +22,51 @@ type PasswordPolicyRequest struct {
PasswordPolicy
}
-func (client *RamClient) SetAccountAlias(accountalias AccountAlias) (RamCommonResponse, error) {
- return RamCommonResponse{}, nil
+type AccountAliasRequest struct {
+ AccountAlias string
+}
+
+func (client *RamClient) SetAccountAlias(accountalias AccountAliasRequest) (RamCommonResponse, error) {
+ var resp RamCommonResponse
+ err := client.Invoke("SetAccountAlias", accountalias, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
}
func (client *RamClient) GetAccountAlias() (AccountAliasResponse, error) {
- return AccountAliasResponse{}, nil
+ var resp AccountAliasResponse
+ err := client.Invoke("GetAccountAlias", struct{}{}, &resp)
+ if err != nil {
+ return AccountAliasResponse{}, err
+ }
+ return resp, nil
}
+
func (client *RamClient) ClearAccountAlias() (RamCommonResponse, error) {
- return RamCommonResponse{}, nil
+ var resp RamCommonResponse
+ err := client.Invoke("ClearAccountAlias", struct{}{}, &resp)
+ if err != nil {
+ return RamCommonResponse{}, err
+ }
+ return resp, nil
}
+
func (client *RamClient) SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error) {
- return PasswordPolicyResponse{}, nil
+ var resp PasswordPolicyResponse
+ err := client.Invoke("SetPasswordPolicy", passwordPolicy, &resp)
+ if err != nil {
+ return PasswordPolicyResponse{}, err
+ }
+ return resp, nil
}
-func (client *RamClient) GetPasswordPolicy(accountAlias AccountAlias) (PasswordPolicyResponse, error) {
- return PasswordPolicyResponse{}, nil
+
+func (client *RamClient) GetPasswordPolicy() (PasswordPolicyResponse, error) {
+ var resp PasswordPolicyResponse
+ err := client.Invoke("GetPasswordPolicy", struct{}{}, &resp)
+ if err != nil {
+ return PasswordPolicyResponse{}, err
+ }
+ return resp, nil
}
diff --git a/vendor/github.com/denverdino/aliyungo/ram/types.go b/vendor/github.com/denverdino/aliyungo/ram/types.go
index 0a82b959c..c7bb91879 100644
--- a/vendor/github.com/denverdino/aliyungo/ram/types.go
+++ b/vendor/github.com/denverdino/aliyungo/ram/types.go
@@ -39,12 +39,21 @@ type User struct {
}
type LoginProfile struct {
+ UserName string
+ PasswordResetRequired bool
+ MFABindRequired bool
}
type MFADevice struct {
+ SerialNumber string
}
type VirtualMFADevice struct {
+ SerialNumber string
+ Base32StringSeed string
+ QRCodePNG string
+ ActivateDate string
+ User User
}
type AccessKey struct {
@@ -55,6 +64,8 @@ type AccessKey struct {
}
type Group struct {
+ GroupName string
+ Comments string
}
type Role struct {
@@ -77,6 +88,13 @@ type Policy struct {
AttachmentCount int64
}
+type PolicyVersion struct {
+ VersionId string
+ IsDefaultVersion bool
+ CreateDate string
+ PolicyDocument string
+}
+
type PolicyDocument struct {
Statement []PolicyItem
Version string
diff --git a/vendor/github.com/denverdino/aliyungo/slb/listeners.go b/vendor/github.com/denverdino/aliyungo/slb/listeners.go
index dedc67588..4861abc1f 100644
--- a/vendor/github.com/denverdino/aliyungo/slb/listeners.go
+++ b/vendor/github.com/denverdino/aliyungo/slb/listeners.go
@@ -100,6 +100,7 @@ type HTTPListenerType struct {
HealthCheckTimeout int
HealthCheckInterval int
HealthCheckHttpCode HealthCheckHttpCodeType
+ VServerGroup FlagType
VServerGroupId string
Gzip FlagType
}
@@ -144,6 +145,7 @@ type TCPListenerType struct {
Bandwidth int
Scheduler SchedulerType
PersistenceTimeout int
+ HealthCheck FlagType
HealthCheckType HealthCheckType
HealthCheckDomain string
HealthCheckURI string
@@ -153,6 +155,7 @@ type TCPListenerType struct {
HealthCheckConnectTimeout int
HealthCheckInterval int
HealthCheckHttpCode HealthCheckHttpCodeType
+ VServerGroup FlagType
VServerGroupId string
}
@@ -174,11 +177,13 @@ type UDPListenerType struct {
Bandwidth int
Scheduler SchedulerType
PersistenceTimeout int
+ HealthCheck FlagType
HealthCheckConnectPort int
HealthyThreshold int
UnhealthyThreshold int
HealthCheckConnectTimeout int
HealthCheckInterval int
+ VServerGroup FlagType
VServerGroupId string
}
type CreateLoadBalancerUDPListenerArgs UDPListenerType
diff --git a/vendor/github.com/dylanmei/winrmtest/wsman.go b/vendor/github.com/dylanmei/winrmtest/wsman.go
index c6d1c247b..35234da47 100644
--- a/vendor/github.com/dylanmei/winrmtest/wsman.go
+++ b/vendor/github.com/dylanmei/winrmtest/wsman.go
@@ -8,8 +8,7 @@ import (
"strconv"
"strings"
- "github.com/masterzen/winrm/soap"
- "github.com/masterzen/xmlpath"
+ "github.com/antchfx/xquery/xml"
"github.com/satori/go.uuid"
)
@@ -57,7 +56,7 @@ func (w *wsman) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
rw.Header().Add("Content-Type", "application/soap+xml")
defer r.Body.Close()
- env, err := xmlpath.Parse(r.Body)
+ env, err := xmlquery.Parse(r.Body)
if err != nil {
return
@@ -130,41 +129,32 @@ func (w *wsman) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
}
}
-func readAction(env *xmlpath.Node) string {
- xpath, err := xmlpath.CompileWithNamespace(
- "//a:Action", soap.GetAllNamespaces())
-
- if err != nil {
+func readAction(env *xmlquery.Node) string {
+ xpath := xmlquery.FindOne(env, "//a:Action")
+ if xpath == nil {
return ""
}
- action, _ := xpath.String(env)
- return action
+ return xpath.InnerText()
}
-func readCommand(env *xmlpath.Node) string {
- xpath, err := xmlpath.CompileWithNamespace(
- "//rsp:Command", soap.GetAllNamespaces())
-
- if err != nil {
+func readCommand(env *xmlquery.Node) string {
+ xpath := xmlquery.FindOne(env, "//rsp:Command")
+ if xpath == nil {
return ""
}
- command, _ := xpath.String(env)
- if unquoted, err := strconv.Unquote(command); err == nil {
+ if unquoted, err := strconv.Unquote(xpath.InnerText()); err == nil {
return unquoted
}
- return command
+ return xpath.InnerText()
}
-func readCommandIDFromDesiredStream(env *xmlpath.Node) string {
- xpath, err := xmlpath.CompileWithNamespace(
- "//rsp:DesiredStream/@CommandId", soap.GetAllNamespaces())
-
- if err != nil {
+func readCommandIDFromDesiredStream(env *xmlquery.Node) string {
+ xpath := xmlquery.FindOne(env, "//rsp:DesiredStream")
+ if xpath == nil {
return ""
}
- id, _ := xpath.String(env)
- return id
+ return xpath.SelectAttr("CommandId")
}
diff --git a/vendor/github.com/hashicorp/atlas-go/archive/archive.go b/vendor/github.com/hashicorp/atlas-go/archive/archive.go
index 0a025b21f..91310ad5a 100644
--- a/vendor/github.com/hashicorp/atlas-go/archive/archive.go
+++ b/vendor/github.com/hashicorp/atlas-go/archive/archive.go
@@ -372,6 +372,8 @@ func copyDirWalkFn(
return filepath.Walk(target, copyDirWalkFn(
tarW, target, subpath, opts, vcsInclude))
}
+ // return now so that we don't try to copy twice
+ return nil
}
return copyConcreteEntry(tarW, subpath, path, info)
@@ -418,7 +420,7 @@ func copyConcreteEntry(
if _, err = io.Copy(tarW, f); err != nil {
return fmt.Errorf(
- "failed copying file to archive: %s", path)
+ "failed copying file to archive: %s, %s", path, err)
}
return nil
@@ -474,35 +476,22 @@ func copyExtras(w *tar.Writer, extra map[string]string) error {
}
func readLinkFull(path string, info os.FileInfo) (string, os.FileInfo, error) {
- // Read the symlink continously until we reach a concrete file.
- target := path
- tries := 0
- for info.Mode()&os.ModeSymlink != 0 {
- var err error
- target, err = os.Readlink(target)
- if err != nil {
- return "", nil, err
- }
- if !filepath.IsAbs(target) {
- target, err = filepath.Abs(target)
- if err != nil {
- return "", nil, err
- }
- }
- info, err = os.Lstat(target)
- if err != nil {
- return "", nil, err
- }
-
- tries++
- if tries > 100 {
- return "", nil, fmt.Errorf(
- "Symlink for %s is too deep, over 100 levels deep",
- path)
- }
+ target, err := filepath.EvalSymlinks(path)
+ if err != nil {
+ return "", nil, err
}
- return target, info, nil
+ target, err = filepath.Abs(target)
+ if err != nil {
+ return "", nil, err
+ }
+
+ fi, err := os.Lstat(target)
+ if err != nil {
+ return "", nil, err
+ }
+
+ return target, fi, nil
}
// readCloseRemover is an io.ReadCloser implementation that will remove
diff --git a/vendor/github.com/hashicorp/go-checkpoint/checkpoint.go b/vendor/github.com/hashicorp/go-checkpoint/checkpoint.go
index 4695bd9c2..36e572999 100644
--- a/vendor/github.com/hashicorp/go-checkpoint/checkpoint.go
+++ b/vendor/github.com/hashicorp/go-checkpoint/checkpoint.go
@@ -18,6 +18,7 @@ import (
"path/filepath"
"reflect"
"runtime"
+ "strconv"
"strings"
"time"
@@ -204,6 +205,12 @@ func Check(p *CheckParams) (*CheckResponse, error) {
return &CheckResponse{}, nil
}
+ // set a default timeout of 3 sec for the check request (in milliseconds)
+ timeout := 3000
+ if _, err := strconv.Atoi(os.Getenv("CHECKPOINT_TIMEOUT")); err == nil {
+ timeout, _ = strconv.Atoi(os.Getenv("CHECKPOINT_TIMEOUT"))
+ }
+
// If we have a cached result, then use that
if r, err := checkCache(p.Version, p.CacheFile, p.CacheDuration); err != nil {
return nil, err
@@ -250,6 +257,11 @@ func Check(p *CheckParams) (*CheckResponse, error) {
req.Header.Add("User-Agent", "HashiCorp/go-checkpoint")
client := cleanhttp.DefaultClient()
+
+ // We use a short timeout since checking for new versions is not critical
+ // enough to block on if checkpoint is broken/slow.
+ client.Timeout = time.Duration(timeout) * time.Millisecond
+
resp, err := client.Do(req)
if err != nil {
return nil, err
diff --git a/vendor/github.com/kardianos/osext/README.md b/vendor/github.com/kardianos/osext/README.md
index 61350baba..15cbc3d95 100644
--- a/vendor/github.com/kardianos/osext/README.md
+++ b/vendor/github.com/kardianos/osext/README.md
@@ -1,7 +1,12 @@
### Extensions to the "os" package.
+[![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext)
+
## Find the current Executable and ExecutableFolder.
+As of go1.8 the Executable function may be found in `os`. The Executable function
+in the std lib `os` package is used if available.
+
There is sometimes utility in finding the current executable file
that is running. This can be used for upgrading the current executable
or finding resources located relative to the executable file. Both
diff --git a/vendor/github.com/kardianos/osext/osext_go18.go b/vendor/github.com/kardianos/osext/osext_go18.go
new file mode 100644
index 000000000..009d8a926
--- /dev/null
+++ b/vendor/github.com/kardianos/osext/osext_go18.go
@@ -0,0 +1,9 @@
+//+build go1.8,!openbsd
+
+package osext
+
+import "os"
+
+func executable() (string, error) {
+ return os.Executable()
+}
diff --git a/vendor/github.com/kardianos/osext/osext_plan9.go b/vendor/github.com/kardianos/osext/osext_plan9.go
index 655750c54..95e237137 100644
--- a/vendor/github.com/kardianos/osext/osext_plan9.go
+++ b/vendor/github.com/kardianos/osext/osext_plan9.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//+build !go1.8
+
package osext
import (
diff --git a/vendor/github.com/kardianos/osext/osext_procfs.go b/vendor/github.com/kardianos/osext/osext_procfs.go
index d59847ee5..e1f16f885 100644
--- a/vendor/github.com/kardianos/osext/osext_procfs.go
+++ b/vendor/github.com/kardianos/osext/osext_procfs.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux netbsd solaris dragonfly
+// +build !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly
package osext
@@ -16,7 +16,7 @@ import (
func executable() (string, error) {
switch runtime.GOOS {
- case "linux":
+ case "linux", "android":
const deletedTag = " (deleted)"
execpath, err := os.Readlink("/proc/self/exe")
if err != nil {
diff --git a/vendor/github.com/kardianos/osext/osext_sysctl.go b/vendor/github.com/kardianos/osext/osext_sysctl.go
index 66da0bcf9..33cee2522 100644
--- a/vendor/github.com/kardianos/osext/osext_sysctl.go
+++ b/vendor/github.com/kardianos/osext/osext_sysctl.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin freebsd openbsd
+// +build !go1.8,darwin !go1.8,freebsd openbsd
package osext
diff --git a/vendor/github.com/kardianos/osext/osext_windows.go b/vendor/github.com/kardianos/osext/osext_windows.go
index 72d282cf8..074b3b385 100644
--- a/vendor/github.com/kardianos/osext/osext_windows.go
+++ b/vendor/github.com/kardianos/osext/osext_windows.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//+build !go1.8
+
package osext
import (
diff --git a/vendor/github.com/masterzen/winrm/ntlm.go b/vendor/github.com/masterzen/winrm/ntlm.go
index f2ac707a4..6a0ee1060 100644
--- a/vendor/github.com/masterzen/winrm/ntlm.go
+++ b/vendor/github.com/masterzen/winrm/ntlm.go
@@ -1,7 +1,7 @@
package winrm
import (
- ntlmssp "github.com/Azure/go-ntlmssp"
+ "github.com/Azure/go-ntlmssp"
"github.com/masterzen/winrm/soap"
)
diff --git a/vendor/github.com/masterzen/winrm/request.go b/vendor/github.com/masterzen/winrm/request.go
index 8e43449bb..37b226534 100644
--- a/vendor/github.com/masterzen/winrm/request.go
+++ b/vendor/github.com/masterzen/winrm/request.go
@@ -8,8 +8,8 @@ import (
)
func genUUID() string {
- uuid, _ := uuid.NewV4()
- return "uuid:" + uuid.String()
+ id, _ := uuid.NewV4()
+ return "uuid:" + id.String()
}
func defaultHeaders(message *soap.SoapMessage, url string, params *Parameters) *soap.SoapHeader {
@@ -37,10 +37,10 @@ func NewOpenShellRequest(uri string, params *Parameters) *soap.SoapMessage {
AddOption(soap.NewHeaderOption("WINRS_CODEPAGE", "65001")).
Build()
- body := message.CreateBodyElement("Shell", soap.NS_WIN_SHELL)
- input := message.CreateElement(body, "InputStreams", soap.NS_WIN_SHELL)
+ body := message.CreateBodyElement("Shell", soap.DOM_NS_WIN_SHELL)
+ input := message.CreateElement(body, "InputStreams", soap.DOM_NS_WIN_SHELL)
input.SetContent("stdin")
- output := message.CreateElement(body, "OutputStreams", soap.NS_WIN_SHELL)
+ output := message.CreateElement(body, "OutputStreams", soap.DOM_NS_WIN_SHELL)
output.SetContent("stdout stderr")
return message
@@ -77,16 +77,16 @@ func NewExecuteCommandRequest(uri, shellId, command string, arguments []string,
AddOption(soap.NewHeaderOption("WINRS_SKIP_CMD_SHELL", "FALSE")).
Build()
- body := message.CreateBodyElement("CommandLine", soap.NS_WIN_SHELL)
+ body := message.CreateBodyElement("CommandLine", soap.DOM_NS_WIN_SHELL)
// ensure special characters like & don't mangle the request XML
command = ""
- commandElement := message.CreateElement(body, "Command", soap.NS_WIN_SHELL)
+ commandElement := message.CreateElement(body, "Command", soap.DOM_NS_WIN_SHELL)
commandElement.SetContent(command)
for _, arg := range arguments {
arg = ""
- argumentsElement := message.CreateElement(body, "Arguments", soap.NS_WIN_SHELL)
+ argumentsElement := message.CreateElement(body, "Arguments", soap.DOM_NS_WIN_SHELL)
argumentsElement.SetContent(arg)
}
@@ -104,8 +104,8 @@ func NewGetOutputRequest(uri, shellId, commandId, streams string, params *Parame
ShellId(shellId).
Build()
- receive := message.CreateBodyElement("Receive", soap.NS_WIN_SHELL)
- desiredStreams := message.CreateElement(receive, "DesiredStream", soap.NS_WIN_SHELL)
+ receive := message.CreateBodyElement("Receive", soap.DOM_NS_WIN_SHELL)
+ desiredStreams := message.CreateElement(receive, "DesiredStream", soap.DOM_NS_WIN_SHELL)
desiredStreams.SetAttr("CommandId", commandId)
desiredStreams.SetContent(streams)
@@ -126,8 +126,8 @@ func NewSendInputRequest(uri, shellId, commandId string, input []byte, params *P
content := base64.StdEncoding.EncodeToString(input)
- send := message.CreateBodyElement("Send", soap.NS_WIN_SHELL)
- streams := message.CreateElement(send, "Stream", soap.NS_WIN_SHELL)
+ send := message.CreateBodyElement("Send", soap.DOM_NS_WIN_SHELL)
+ streams := message.CreateElement(send, "Stream", soap.DOM_NS_WIN_SHELL)
streams.SetAttr("Name", "stdin")
streams.SetAttr("CommandId", commandId)
streams.SetContent(content)
@@ -146,9 +146,9 @@ func NewSignalRequest(uri string, shellId string, commandId string, params *Para
ShellId(shellId).
Build()
- signal := message.CreateBodyElement("Signal", soap.NS_WIN_SHELL)
+ signal := message.CreateBodyElement("Signal", soap.DOM_NS_WIN_SHELL)
signal.SetAttr("CommandId", commandId)
- code := message.CreateElement(signal, "Code", soap.NS_WIN_SHELL)
+ code := message.CreateElement(signal, "Code", soap.DOM_NS_WIN_SHELL)
code.SetContent("http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/terminate")
return message
diff --git a/vendor/github.com/masterzen/winrm/response.go b/vendor/github.com/masterzen/winrm/response.go
index 52852313a..b5ca8cc94 100644
--- a/vendor/github.com/masterzen/winrm/response.go
+++ b/vendor/github.com/masterzen/winrm/response.go
@@ -7,46 +7,45 @@ import (
"strconv"
"strings"
+ "github.com/ChrisTrenkamp/goxpath"
+ "github.com/ChrisTrenkamp/goxpath/tree"
+ "github.com/ChrisTrenkamp/goxpath/tree/xmltree"
"github.com/masterzen/winrm/soap"
- "github.com/masterzen/xmlpath"
)
-func first(node *xmlpath.Node, xpath string) (string, error) {
- path, err := xmlpath.CompileWithNamespace(xpath, soap.GetAllNamespaces())
+func first(node tree.Node, xpath string) (string, error) {
+ nodes, err := xPath(node, xpath)
if err != nil {
return "", err
}
- content, _ := path.String(node)
- return content, nil
+ if len(nodes) < 1 {
+ return "", err
+ }
+ return nodes[0].ResValue(), nil
}
-func any(node *xmlpath.Node, xpath string) (bool, error) {
- path, err := xmlpath.CompileWithNamespace(xpath, soap.GetAllNamespaces())
+func any(node tree.Node, xpath string) (bool, error) {
+ nodes, err := xPath(node, xpath)
if err != nil {
return false, err
}
-
- return path.Exists(node), nil
-
+ if len(nodes) > 0 {
+ return true, nil
+ }
+ return false, nil
}
-func xpath(node *xmlpath.Node, xpath string) ([]xmlpath.Node, error) {
- path, err := xmlpath.CompileWithNamespace(xpath, soap.GetAllNamespaces())
+func xPath(node tree.Node, xpath string) (tree.NodeSet, error) {
+ xpExec := goxpath.MustParse(xpath)
+ nodes, err := xpExec.ExecNode(node, soap.GetAllXPathNamespaces())
if err != nil {
return nil, err
}
-
- nodes := make([]xmlpath.Node, 0, 1)
- iter := path.Iter(node)
- for iter.Next() {
- nodes = append(nodes, *(iter.Node()))
- }
-
return nodes, nil
}
func ParseOpenShellResponse(response string) (string, error) {
- doc, err := xmlpath.Parse(strings.NewReader(response))
+ doc, err := xmltree.ParseXML(strings.NewReader(response))
if err != nil {
return "", err
}
@@ -54,7 +53,7 @@ func ParseOpenShellResponse(response string) (string, error) {
}
func ParseExecuteCommandResponse(response string) (string, error) {
- doc, err := xmlpath.Parse(strings.NewReader(response))
+ doc, err := xmltree.ParseXML(strings.NewReader(response))
if err != nil {
return "", err
}
@@ -67,16 +66,16 @@ func ParseSlurpOutputErrResponse(response string, stdout, stderr io.Writer) (boo
exitCode int
)
- doc, err := xmlpath.Parse(strings.NewReader(response))
+ doc, err := xmltree.ParseXML(strings.NewReader(response))
- stdouts, _ := xpath(doc, "//rsp:Stream[@Name='stdout']")
+ stdouts, _ := xPath(doc, "//rsp:Stream[@Name='stdout']")
for _, node := range stdouts {
- content, _ := base64.StdEncoding.DecodeString(node.String())
+ content, _ := base64.StdEncoding.DecodeString(node.ResValue())
stdout.Write(content)
}
- stderrs, _ := xpath(doc, "//rsp:Stream[@Name='stderr']")
+ stderrs, _ := xPath(doc, "//rsp:Stream[@Name='stderr']")
for _, node := range stderrs {
- content, _ := base64.StdEncoding.DecodeString(node.String())
+ content, _ := base64.StdEncoding.DecodeString(node.ResValue())
stderr.Write(content)
}
@@ -101,11 +100,11 @@ func ParseSlurpOutputResponse(response string, stream io.Writer, streamType stri
exitCode int
)
- doc, err := xmlpath.Parse(strings.NewReader(response))
+ doc, err := xmltree.ParseXML(strings.NewReader(response))
- nodes, _ := xpath(doc, fmt.Sprintf("//rsp:Stream[@Name='%s']", streamType))
+ nodes, _ := xPath(doc, fmt.Sprintf("//rsp:Stream[@Name='%s']", streamType))
for _, node := range nodes {
- content, _ := base64.StdEncoding.DecodeString(node.String())
+ content, _ := base64.StdEncoding.DecodeString(node.ResValue())
stream.Write(content)
}
diff --git a/vendor/github.com/masterzen/winrm/shell.go b/vendor/github.com/masterzen/winrm/shell.go
index 055fa891b..0f33348f7 100644
--- a/vendor/github.com/masterzen/winrm/shell.go
+++ b/vendor/github.com/masterzen/winrm/shell.go
@@ -27,10 +27,10 @@ func (s *Shell) Execute(command string, arguments ...string) (*Command, error) {
}
// Close will terminate this shell. No commands can be issued once the shell is closed.
-func (shell *Shell) Close() error {
- request := NewDeleteShellRequest(shell.client.url, shell.id, &shell.client.Parameters)
+func (s *Shell) Close() error {
+ request := NewDeleteShellRequest(s.client.url, s.id, &s.client.Parameters)
defer request.Free()
- _, err := shell.client.sendRequest(request)
+ _, err := s.client.sendRequest(request)
return err
}
diff --git a/vendor/github.com/masterzen/winrm/soap/header.go b/vendor/github.com/masterzen/winrm/soap/header.go
index 1a2ac0881..6aeaebe2e 100644
--- a/vendor/github.com/masterzen/winrm/soap/header.go
+++ b/vendor/github.com/masterzen/winrm/soap/header.go
@@ -1,8 +1,9 @@
package soap
import (
- "github.com/masterzen/simplexml/dom"
"strconv"
+
+ "github.com/masterzen/simplexml/dom"
)
type HeaderOption struct {
@@ -99,62 +100,62 @@ func (self *SoapHeader) Options(options []HeaderOption) *SoapHeader {
}
func (self *SoapHeader) Build() *SoapMessage {
- header := self.createElement(self.message.envelope, "Header", NS_SOAP_ENV)
+ header := self.createElement(self.message.envelope, "Header", DOM_NS_SOAP_ENV)
if self.to != "" {
- to := self.createElement(header, "To", NS_ADDRESSING)
+ to := self.createElement(header, "To", DOM_NS_ADDRESSING)
to.SetContent(self.to)
}
if self.replyTo != "" {
- replyTo := self.createElement(header, "ReplyTo", NS_ADDRESSING)
- a := self.createMUElement(replyTo, "Address", NS_ADDRESSING, true)
+ replyTo := self.createElement(header, "ReplyTo", DOM_NS_ADDRESSING)
+ a := self.createMUElement(replyTo, "Address", DOM_NS_ADDRESSING, true)
a.SetContent(self.replyTo)
}
if self.maxEnvelopeSize != "" {
- envelope := self.createMUElement(header, "MaxEnvelopeSize", NS_WSMAN_DMTF, true)
+ envelope := self.createMUElement(header, "MaxEnvelopeSize", DOM_NS_WSMAN_DMTF, true)
envelope.SetContent(self.maxEnvelopeSize)
}
if self.timeout != "" {
- timeout := self.createElement(header, "OperationTimeout", NS_WSMAN_DMTF)
+ timeout := self.createElement(header, "OperationTimeout", DOM_NS_WSMAN_DMTF)
timeout.SetContent(self.timeout)
}
if self.id != "" {
- id := self.createElement(header, "MessageID", NS_ADDRESSING)
+ id := self.createElement(header, "MessageID", DOM_NS_ADDRESSING)
id.SetContent(self.id)
}
if self.locale != "" {
- locale := self.createMUElement(header, "Locale", NS_WSMAN_DMTF, false)
+ locale := self.createMUElement(header, "Locale", DOM_NS_WSMAN_DMTF, false)
locale.SetAttr("xml:lang", self.locale)
- datalocale := self.createMUElement(header, "DataLocale", NS_WSMAN_MSFT, false)
+ datalocale := self.createMUElement(header, "DataLocale", DOM_NS_WSMAN_MSFT, false)
datalocale.SetAttr("xml:lang", self.locale)
}
if self.action != "" {
- action := self.createMUElement(header, "Action", NS_ADDRESSING, true)
+ action := self.createMUElement(header, "Action", DOM_NS_ADDRESSING, true)
action.SetContent(self.action)
}
if self.shellId != "" {
- selectorSet := self.createElement(header, "SelectorSet", NS_WSMAN_DMTF)
- selector := self.createElement(selectorSet, "Selector", NS_WSMAN_DMTF)
+ selectorSet := self.createElement(header, "SelectorSet", DOM_NS_WSMAN_DMTF)
+ selector := self.createElement(selectorSet, "Selector", DOM_NS_WSMAN_DMTF)
selector.SetAttr("Name", "ShellId")
selector.SetContent(self.shellId)
}
if self.resourceURI != "" {
- resource := self.createMUElement(header, "ResourceURI", NS_WSMAN_DMTF, true)
+ resource := self.createMUElement(header, "ResourceURI", DOM_NS_WSMAN_DMTF, true)
resource.SetContent(self.resourceURI)
}
if len(self.options) > 0 {
- set := self.createElement(header, "OptionSet", NS_WSMAN_DMTF)
+ set := self.createElement(header, "OptionSet", DOM_NS_WSMAN_DMTF)
for _, option := range self.options {
- e := self.createElement(set, "Option", NS_WSMAN_DMTF)
+ e := self.createElement(set, "Option", DOM_NS_WSMAN_DMTF)
e.SetAttr("Name", option.key)
e.SetContent(option.value)
}
diff --git a/vendor/github.com/masterzen/winrm/soap/message.go b/vendor/github.com/masterzen/winrm/soap/message.go
index 09c37bd46..1c3b2ecc8 100644
--- a/vendor/github.com/masterzen/winrm/soap/message.go
+++ b/vendor/github.com/masterzen/winrm/soap/message.go
@@ -27,7 +27,7 @@ func NewMessage() (message *SoapMessage) {
e := dom.CreateElement("Envelope")
doc.SetRoot(e)
AddUsualNamespaces(e)
- NS_SOAP_ENV.SetTo(e)
+ DOM_NS_SOAP_ENV.SetTo(e)
message = &SoapMessage{document: doc, envelope: e}
return
@@ -36,7 +36,7 @@ func NewMessage() (message *SoapMessage) {
func (message *SoapMessage) NewBody() (body *dom.Element) {
body = dom.CreateElement("Body")
message.envelope.AddChild(body)
- NS_SOAP_ENV.SetTo(body)
+ DOM_NS_SOAP_ENV.SetTo(body)
return
}
diff --git a/vendor/github.com/masterzen/winrm/soap/namespaces.go b/vendor/github.com/masterzen/winrm/soap/namespaces.go
index fda49f49e..e7f5e22f5 100644
--- a/vendor/github.com/masterzen/winrm/soap/namespaces.go
+++ b/vendor/github.com/masterzen/winrm/soap/namespaces.go
@@ -1,24 +1,59 @@
package soap
import (
+ "github.com/ChrisTrenkamp/goxpath"
"github.com/masterzen/simplexml/dom"
- "github.com/masterzen/xmlpath"
)
+// Namespaces
+const (
+ NS_SOAP_ENV = "http://www.w3.org/2003/05/soap-envelope"
+ NS_ADDRESSING = "http://schemas.xmlsoap.org/ws/2004/08/addressing"
+ NS_CIMBINDING = "http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd"
+ NS_ENUM = "http://schemas.xmlsoap.org/ws/2004/09/enumeration"
+ NS_TRANSFER = "http://schemas.xmlsoap.org/ws/2004/09/transfer"
+ NS_WSMAN_DMTF = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
+ NS_WSMAN_MSFT = "http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"
+ NS_SCHEMA_INST = "http://www.w3.org/2001/XMLSchema-instance"
+ NS_WIN_SHELL = "http://schemas.microsoft.com/wbem/wsman/1/windows/shell"
+ NS_WSMAN_FAULT = "http://schemas.microsoft.com/wbem/wsman/1/wsmanfault"
+)
+
+// Namespace Prefixes
+const (
+ NSP_SOAP_ENV = "env"
+ NSP_ADDRESSING = "a"
+ NSP_CIMBINDING = "b"
+ NSP_ENUM = "n"
+ NSP_TRANSFER = "x"
+ NSP_WSMAN_DMTF = "w"
+ NSP_WSMAN_MSFT = "p"
+ NSP_SCHEMA_INST = "xsi"
+ NSP_WIN_SHELL = "rsp"
+ NSP_WSMAN_FAULT = "f"
+)
+
+// DOM Namespaces
var (
- NS_SOAP_ENV = dom.Namespace{"env", "http://www.w3.org/2003/05/soap-envelope"}
- NS_ADDRESSING = dom.Namespace{"a", "http://schemas.xmlsoap.org/ws/2004/08/addressing"}
- NS_CIMBINDING = dom.Namespace{"b", "http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd"}
- NS_ENUM = dom.Namespace{"n", "http://schemas.xmlsoap.org/ws/2004/09/enumeration"}
- NS_TRANSFER = dom.Namespace{"x", "http://schemas.xmlsoap.org/ws/2004/09/transfer"}
- NS_WSMAN_DMTF = dom.Namespace{"w", "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"}
- NS_WSMAN_MSFT = dom.Namespace{"p", "http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"}
- NS_SCHEMA_INST = dom.Namespace{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}
- NS_WIN_SHELL = dom.Namespace{"rsp", "http://schemas.microsoft.com/wbem/wsman/1/windows/shell"}
- NS_WSMAN_FAULT = dom.Namespace{"f", "http://schemas.microsoft.com/wbem/wsman/1/wsmanfault"}
+ DOM_NS_SOAP_ENV = dom.Namespace{"env", "http://www.w3.org/2003/05/soap-envelope"}
+ DOM_NS_ADDRESSING = dom.Namespace{"a", "http://schemas.xmlsoap.org/ws/2004/08/addressing"}
+ DOM_NS_CIMBINDING = dom.Namespace{"b", "http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd"}
+ DOM_NS_ENUM = dom.Namespace{"n", "http://schemas.xmlsoap.org/ws/2004/09/enumeration"}
+ DOM_NS_TRANSFER = dom.Namespace{"x", "http://schemas.xmlsoap.org/ws/2004/09/transfer"}
+ DOM_NS_WSMAN_DMTF = dom.Namespace{"w", "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"}
+ DOM_NS_WSMAN_MSFT = dom.Namespace{"p", "http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"}
+ DOM_NS_SCHEMA_INST = dom.Namespace{"xsi", "http://www.w3.org/2001/XMLSchema-instance"}
+ DOM_NS_WIN_SHELL = dom.Namespace{"rsp", "http://schemas.microsoft.com/wbem/wsman/1/windows/shell"}
+ DOM_NS_WSMAN_FAULT = dom.Namespace{"f", "http://schemas.microsoft.com/wbem/wsman/1/wsmanfault"}
)
-var MostUsed = [...]dom.Namespace{NS_SOAP_ENV, NS_ADDRESSING, NS_WIN_SHELL, NS_WSMAN_DMTF, NS_WSMAN_MSFT}
+var MostUsed = [...]dom.Namespace{
+ DOM_NS_SOAP_ENV,
+ DOM_NS_ADDRESSING,
+ DOM_NS_WIN_SHELL,
+ DOM_NS_WSMAN_DMTF,
+ DOM_NS_WSMAN_MSFT,
+}
func AddUsualNamespaces(node *dom.Element) {
for _, ns := range MostUsed {
@@ -26,12 +61,21 @@ func AddUsualNamespaces(node *dom.Element) {
}
}
-func GetAllNamespaces() []xmlpath.Namespace {
- var ns = []dom.Namespace{NS_WIN_SHELL, NS_ADDRESSING, NS_WSMAN_DMTF, NS_WSMAN_MSFT, NS_SOAP_ENV}
-
- var xmlpathNs = make([]xmlpath.Namespace, 0, 4)
- for _, namespace := range ns {
- xmlpathNs = append(xmlpathNs, xmlpath.Namespace{Prefix: namespace.Prefix, Uri: namespace.Uri})
+func GetAllXPathNamespaces() func(o *goxpath.Opts) {
+ ns := map[string]string{
+ NSP_SOAP_ENV: NS_SOAP_ENV,
+ NSP_ADDRESSING: NS_ADDRESSING,
+ NSP_CIMBINDING: NS_CIMBINDING,
+ NSP_ENUM: NS_ENUM,
+ NSP_TRANSFER: NS_TRANSFER,
+ NSP_WSMAN_DMTF: NS_WSMAN_DMTF,
+ NSP_WSMAN_MSFT: NS_WSMAN_MSFT,
+ NSP_SCHEMA_INST: NS_SCHEMA_INST,
+ NSP_WIN_SHELL: NS_WIN_SHELL,
+ NSP_WSMAN_FAULT: NS_WSMAN_FAULT,
+ }
+
+ return func(o *goxpath.Opts) {
+ o.NS = ns
}
- return xmlpathNs
}
diff --git a/vendor/github.com/masterzen/xmlpath/LICENSE b/vendor/github.com/masterzen/xmlpath/LICENSE
deleted file mode 100644
index 53320c352..000000000
--- a/vendor/github.com/masterzen/xmlpath/LICENSE
+++ /dev/null
@@ -1,185 +0,0 @@
-This software is licensed under the LGPLv3, included below.
-
-As a special exception to the GNU Lesser General Public License version 3
-("LGPL3"), the copyright holders of this Library give you permission to
-convey to a third party a Combined Work that links statically or dynamically
-to this Library without providing any Minimal Corresponding Source or
-Minimal Application Code as set out in 4d or providing the installation
-information set out in section 4e, provided that you comply with the other
-provisions of LGPL3 and provided that you meet, for the Application the
-terms and conditions of the license(s) which apply to the Application.
-
-Except as stated in this special exception, the provisions of LGPL3 will
-continue to comply in full to this Library. If you modify this Library, you
-may apply this exception to your version of this Library, but you are not
-obliged to do so. If you do not wish to do so, delete this exception
-statement from your version. This exception does not (and cannot) modify any
-license terms which apply to the Application, with which you must still
-comply.
-
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/vendor/github.com/masterzen/xmlpath/doc.go b/vendor/github.com/masterzen/xmlpath/doc.go
deleted file mode 100644
index d1acf6c07..000000000
--- a/vendor/github.com/masterzen/xmlpath/doc.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Package xmlpath implements a strict subset of the XPath specification for the Go language.
-//
-// The XPath specification is available at:
-//
-// http://www.w3.org/TR/xpath
-//
-// Path expressions supported by this package are in the following format,
-// with all components being optional:
-//
-// /axis-name::node-test[predicate]/axis-name::node-test[predicate]
-//
-// At the moment, xmlpath is compatible with the XPath specification
-// to the following extent:
-//
-// - All axes are supported ("child", "following-sibling", etc)
-// - All abbreviated forms are supported (".", "//", etc)
-// - All node types except for namespace are supported
-// - Predicates are restricted to [N], [path], and [path=literal] forms
-// - Only a single predicate is supported per path step
-// - Namespaces are experimentally supported
-// - Richer expressions
-//
-// For example, assuming the following document:
-//
-//
-//
-//
-// 0836217462
-// Being a Dog Is a Full-Time Job
-// I'd dog paddle the deepest ocean.
-//
-//
-// Charles M Schulz
-// 1922-11-26
-// 2000-02-12
-//
-//
-// Peppermint Patty
-// 1966-08-22
-// bold, brash and tomboyish
-//
-//
-// Snoopy
-// 1950-10-04
-// extroverted beagle
-//
-//
-//
-//
-// The following examples are valid path expressions, and the first
-// match has the indicated value:
-//
-// /library/book/isbn => "0836217462"
-// library/*/isbn => "0836217462"
-// /library/book/../book/./isbn => "0836217462"
-// /library/book/character[2]/name => "Snoopy"
-// /library/book/character[born='1950-10-04']/name => "Snoopy"
-// /library/book//node()[@id='PP']/name => "Peppermint Patty"
-// //book[author/@id='CMS']/title => "Being a Dog Is a Full-Time Job"},
-// /library/book/preceding::comment() => " Great book. "
-//
-// To run an expression, compile it, and then apply the compiled path to any
-// number of context nodes, from one or more parsed xml documents:
-//
-// path := xmlpath.MustCompile("/library/book/isbn")
-// root, err := xmlpath.Parse(file)
-// if err != nil {
-// log.Fatal(err)
-// }
-// if value, ok := path.String(root); ok {
-// fmt.Println("Found:", value)
-// }
-//
-// To use xmlpath with namespaces, it is required to give the supported set of namespace
-// when compiling:
-//
-//
-// var namespaces = []xmlpath.Namespace {
-// { "s", "http://www.w3.org/2003/05/soap-envelope" },
-// { "a", "http://schemas.xmlsoap.org/ws/2004/08/addressing" },
-// }
-// path, err := xmlpath.CompileWithNamespace("/s:Header/a:To", namespaces)
-// if err != nil {
-// log.Fatal(err)
-// }
-// root, err := xmlpath.Parse(file)
-// if err != nil {
-// log.Fatal(err)
-// }
-// if value, ok := path.String(root); ok {
-// fmt.Println("Found:", value)
-// }
-//
-
-package xmlpath
diff --git a/vendor/github.com/masterzen/xmlpath/parser.go b/vendor/github.com/masterzen/xmlpath/parser.go
deleted file mode 100644
index 88c1523a3..000000000
--- a/vendor/github.com/masterzen/xmlpath/parser.go
+++ /dev/null
@@ -1,233 +0,0 @@
-package xmlpath
-
-import (
- "encoding/xml"
- "io"
-)
-
-// Node is an item in an xml tree that was compiled to
-// be processed via xml paths. A node may represent:
-//
-// - An element in the xml document ()
-// - An attribute of an element in the xml document (href="...")
-// - A comment in the xml document ()
-// - A processing instruction in the xml document (...?>)
-// - Some text within the xml document
-//
-type Node struct {
- kind nodeKind
- name xml.Name
- attr string
- text []byte
-
- nodes []Node
- pos int
- end int
-
- up *Node
- down []*Node
-}
-
-type nodeKind int
-
-const (
- anyNode nodeKind = iota
- startNode
- endNode
- attrNode
- textNode
- commentNode
- procInstNode
-)
-
-// String returns the string value of node.
-//
-// The string value of a node is:
-//
-// - For element nodes, the concatenation of all text nodes within the element.
-// - For text nodes, the text itself.
-// - For attribute nodes, the attribute value.
-// - For comment nodes, the text within the comment delimiters.
-// - For processing instruction nodes, the content of the instruction.
-//
-func (node *Node) String() string {
- if node.kind == attrNode {
- return node.attr
- }
- return string(node.Bytes())
-}
-
-// Bytes returns the string value of node as a byte slice.
-// See Node.String for a description of what the string value of a node is.
-func (node *Node) Bytes() []byte {
- if node.kind == attrNode {
- return []byte(node.attr)
- }
- if node.kind != startNode {
- return node.text
- }
- var text []byte
- for i := node.pos; i < node.end; i++ {
- if node.nodes[i].kind == textNode {
- text = append(text, node.nodes[i].text...)
- }
- }
- return text
-}
-
-// equals returns whether the string value of node is equal to s,
-// without allocating memory.
-func (node *Node) equals(s string) bool {
- if node.kind == attrNode {
- return s == node.attr
- }
- if node.kind != startNode {
- if len(s) != len(node.text) {
- return false
- }
- for i := range s {
- if s[i] != node.text[i] {
- return false
- }
- }
- return true
- }
- si := 0
- for i := node.pos; i < node.end; i++ {
- if node.nodes[i].kind == textNode {
- for _, c := range node.nodes[i].text {
- if si > len(s) {
- return false
- }
- if s[si] != c {
- return false
- }
- si++
- }
- }
- }
- return si == len(s)
-}
-
-// Parse reads an xml document from r, parses it, and returns its root node.
-func Parse(r io.Reader) (*Node, error) {
- return ParseDecoder(xml.NewDecoder(r))
-}
-
-// ParseHTML reads an HTML-like document from r, parses it, and returns
-// its root node.
-func ParseHTML(r io.Reader) (*Node, error) {
- d := xml.NewDecoder(r)
- d.Strict = false
- d.AutoClose = xml.HTMLAutoClose
- d.Entity = xml.HTMLEntity
- return ParseDecoder(d)
-}
-
-// ParseDecoder parses the xml document being decoded by d and returns
-// its root node.
-func ParseDecoder(d *xml.Decoder) (*Node, error) {
- var nodes []Node
- var text []byte
-
- // The root node.
- nodes = append(nodes, Node{kind: startNode})
-
- for {
- t, err := d.Token()
- if err == io.EOF {
- break
- }
- if err != nil {
- return nil, err
- }
- switch t := t.(type) {
- case xml.EndElement:
- nodes = append(nodes, Node{
- kind: endNode,
- })
- case xml.StartElement:
- nodes = append(nodes, Node{
- kind: startNode,
- name: t.Name,
- })
- for _, attr := range t.Attr {
- nodes = append(nodes, Node{
- kind: attrNode,
- name: attr.Name,
- attr: attr.Value,
- })
- }
- case xml.CharData:
- texti := len(text)
- text = append(text, t...)
- nodes = append(nodes, Node{
- kind: textNode,
- text: text[texti : texti+len(t)],
- })
- case xml.Comment:
- texti := len(text)
- text = append(text, t...)
- nodes = append(nodes, Node{
- kind: commentNode,
- text: text[texti : texti+len(t)],
- })
- case xml.ProcInst:
- texti := len(text)
- text = append(text, t.Inst...)
- nodes = append(nodes, Node{
- kind: procInstNode,
- name: xml.Name{Local: t.Target},
- text: text[texti : texti+len(t.Inst)],
- })
- }
- }
-
- // Close the root node.
- nodes = append(nodes, Node{kind: endNode})
-
- stack := make([]*Node, 0, len(nodes))
- downs := make([]*Node, len(nodes))
- downCount := 0
-
- for pos := range nodes {
-
- switch nodes[pos].kind {
-
- case startNode, attrNode, textNode, commentNode, procInstNode:
- node := &nodes[pos]
- node.nodes = nodes
- node.pos = pos
- if len(stack) > 0 {
- node.up = stack[len(stack)-1]
- }
- if node.kind == startNode {
- stack = append(stack, node)
- } else {
- node.end = pos + 1
- }
-
- case endNode:
- node := stack[len(stack)-1]
- node.end = pos
- stack = stack[:len(stack)-1]
-
- // Compute downs. Doing that here is what enables the
- // use of a slice of a contiguous pre-allocated block.
- node.down = downs[downCount:downCount]
- for i := node.pos + 1; i < node.end; i++ {
- if nodes[i].up == node {
- switch nodes[i].kind {
- case startNode, textNode, commentNode, procInstNode:
- node.down = append(node.down, &nodes[i])
- downCount++
- }
- }
- }
- if len(stack) == 0 {
- return node, nil
- }
- }
- }
- return nil, io.EOF
-}
diff --git a/vendor/github.com/masterzen/xmlpath/path.go b/vendor/github.com/masterzen/xmlpath/path.go
deleted file mode 100644
index f35af70ae..000000000
--- a/vendor/github.com/masterzen/xmlpath/path.go
+++ /dev/null
@@ -1,642 +0,0 @@
-package xmlpath
-
-import (
- "fmt"
- "strconv"
- "unicode/utf8"
-)
-
-// Namespace represents a given XML Namespace
-type Namespace struct {
- Prefix string
- Uri string
-}
-
-// Path is a compiled path that can be applied to a context
-// node to obtain a matching node set.
-// A single Path can be applied concurrently to any number
-// of context nodes.
-type Path struct {
- path string
- steps []pathStep
-}
-
-// Iter returns an iterator that goes over the list of nodes
-// that p matches on the given context.
-func (p *Path) Iter(context *Node) *Iter {
- iter := Iter{
- make([]pathStepState, len(p.steps)),
- make([]bool, len(context.nodes)),
- }
- for i := range p.steps {
- iter.state[i].step = &p.steps[i]
- }
- iter.state[0].init(context)
- return &iter
-}
-
-// Exists returns whether any nodes match p on the given context.
-func (p *Path) Exists(context *Node) bool {
- return p.Iter(context).Next()
-}
-
-// String returns the string value of the first node matched
-// by p on the given context.
-//
-// See the documentation of Node.String.
-func (p *Path) String(context *Node) (s string, ok bool) {
- iter := p.Iter(context)
- if iter.Next() {
- return iter.Node().String(), true
- }
- return "", false
-}
-
-// Bytes returns as a byte slice the string value of the first
-// node matched by p on the given context.
-//
-// See the documentation of Node.String.
-func (p *Path) Bytes(node *Node) (b []byte, ok bool) {
- iter := p.Iter(node)
- if iter.Next() {
- return iter.Node().Bytes(), true
- }
- return nil, false
-}
-
-// Iter iterates over node sets.
-type Iter struct {
- state []pathStepState
- seen []bool
-}
-
-// Node returns the current node.
-// Must only be called after Iter.Next returns true.
-func (iter *Iter) Node() *Node {
- state := iter.state[len(iter.state)-1]
- if state.pos == 0 {
- panic("Iter.Node called before Iter.Next")
- }
- if state.node == nil {
- panic("Iter.Node called after Iter.Next false")
- }
- return state.node
-}
-
-// Next iterates to the next node in the set, if any, and
-// returns whether there is a node available.
-func (iter *Iter) Next() bool {
- tip := len(iter.state) - 1
-outer:
- for {
- for !iter.state[tip].next() {
- tip--
- if tip == -1 {
- return false
- }
- }
- for tip < len(iter.state)-1 {
- tip++
- iter.state[tip].init(iter.state[tip-1].node)
- if !iter.state[tip].next() {
- tip--
- continue outer
- }
- }
- if iter.seen[iter.state[tip].node.pos] {
- continue
- }
- iter.seen[iter.state[tip].node.pos] = true
- return true
- }
- panic("unreachable")
-}
-
-type pathStepState struct {
- step *pathStep
- node *Node
- pos int
- idx int
- aux int
-}
-
-func (s *pathStepState) init(node *Node) {
- s.node = node
- s.pos = 0
- s.idx = 0
- s.aux = 0
-}
-
-func (s *pathStepState) next() bool {
- for s._next() {
- s.pos++
- if s.step.pred == nil {
- return true
- }
- if s.step.pred.bval {
- if s.step.pred.path.Exists(s.node) {
- return true
- }
- } else if s.step.pred.path != nil {
- iter := s.step.pred.path.Iter(s.node)
- for iter.Next() {
- if iter.Node().equals(s.step.pred.sval) {
- return true
- }
- }
- } else {
- if s.step.pred.ival == s.pos {
- return true
- }
- }
- }
- return false
-}
-
-func (s *pathStepState) _next() bool {
- if s.node == nil {
- return false
- }
- if s.step.root && s.idx == 0 {
- for s.node.up != nil {
- s.node = s.node.up
- }
- }
-
- switch s.step.axis {
-
- case "self":
- if s.idx == 0 && s.step.match(s.node) {
- s.idx++
- return true
- }
-
- case "parent":
- if s.idx == 0 && s.node.up != nil && s.step.match(s.node.up) {
- s.idx++
- s.node = s.node.up
- return true
- }
-
- case "ancestor", "ancestor-or-self":
- if s.idx == 0 && s.step.axis == "ancestor-or-self" {
- s.idx++
- if s.step.match(s.node) {
- return true
- }
- }
- for s.node.up != nil {
- s.node = s.node.up
- s.idx++
- if s.step.match(s.node) {
- return true
- }
- }
-
- case "child":
- var down []*Node
- if s.idx == 0 {
- down = s.node.down
- } else {
- down = s.node.up.down
- }
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "descendant", "descendant-or-self":
- if s.idx == 0 {
- s.idx = s.node.pos
- s.aux = s.node.end
- if s.step.axis == "descendant" {
- s.idx++
- }
- }
- for s.idx < s.aux {
- node := &s.node.nodes[s.idx]
- s.idx++
- if node.kind == attrNode {
- continue
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "following":
- if s.idx == 0 {
- s.idx = s.node.end
- }
- for s.idx < len(s.node.nodes) {
- node := &s.node.nodes[s.idx]
- s.idx++
- if node.kind == attrNode {
- continue
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "following-sibling":
- var down []*Node
- if s.node.up != nil {
- down = s.node.up.down
- if s.idx == 0 {
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if node == s.node {
- break
- }
- }
- }
- }
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "preceding":
- if s.idx == 0 {
- s.aux = s.node.pos // Detect ancestors.
- s.idx = s.node.pos - 1
- }
- for s.idx >= 0 {
- node := &s.node.nodes[s.idx]
- s.idx--
- if node.kind == attrNode {
- continue
- }
- if node == s.node.nodes[s.aux].up {
- s.aux = s.node.nodes[s.aux].up.pos
- continue
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "preceding-sibling":
- var down []*Node
- if s.node.up != nil {
- down = s.node.up.down
- if s.aux == 0 {
- s.aux = 1
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if node == s.node {
- s.idx--
- break
- }
- }
- }
- }
- for s.idx >= 0 {
- node := down[s.idx]
- s.idx--
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "attribute":
- if s.idx == 0 {
- s.idx = s.node.pos + 1
- s.aux = s.node.end
- }
- for s.idx < s.aux {
- node := &s.node.nodes[s.idx]
- s.idx++
- if node.kind != attrNode {
- break
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- }
-
- s.node = nil
- return false
-}
-
-type pathPredicate struct {
- path *Path
- sval string
- ival int
- bval bool
-}
-
-type pathStep struct {
- root bool
- axis string
- name string
- prefix string
- uri string
- kind nodeKind
- pred *pathPredicate
-}
-
-func (step *pathStep) match(node *Node) bool {
- return node.kind != endNode &&
- (step.kind == anyNode || step.kind == node.kind) &&
- (step.name == "*" || (node.name.Local == step.name && (node.name.Space != "" && node.name.Space == step.uri || node.name.Space == "")))
-}
-
-// MustCompile returns the compiled path, and panics if
-// there are any errors.
-func MustCompile(path string) *Path {
- e, err := Compile(path)
- if err != nil {
- panic(err)
- }
- return e
-}
-
-// Compile returns the compiled path.
-func Compile(path string) (*Path, error) {
- c := pathCompiler{path, 0, []Namespace{} }
- if path == "" {
- return nil, c.errorf("empty path")
- }
- p, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- return p, nil
-}
-
-// Compile the path with the knowledge of the given namespaces
-func CompileWithNamespace(path string, ns []Namespace) (*Path, error) {
- c := pathCompiler{path, 0, ns}
- if path == "" {
- return nil, c.errorf("empty path")
- }
- p, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- return p, nil
-}
-
-type pathCompiler struct {
- path string
- i int
- ns []Namespace
-}
-
-func (c *pathCompiler) errorf(format string, args ...interface{}) error {
- return fmt.Errorf("compiling xml path %q:%d: %s", c.path, c.i, fmt.Sprintf(format, args...))
-}
-
-func (c *pathCompiler) parsePath() (path *Path, err error) {
- var steps []pathStep
- var start = c.i
- for {
- step := pathStep{axis: "child"}
-
- if c.i == 0 && c.skipByte('/') {
- step.root = true
- if len(c.path) == 1 {
- step.name = "*"
- }
- }
- if c.peekByte('/') {
- step.axis = "descendant-or-self"
- step.name = "*"
- } else if c.skipByte('@') {
- mark := c.i
- if !c.skipName() {
- return nil, c.errorf("missing name after @")
- }
- step.axis = "attribute"
- step.name = c.path[mark:c.i]
- step.kind = attrNode
- } else {
- mark := c.i
- if c.skipName() {
- step.name = c.path[mark:c.i]
- }
- if step.name == "" {
- return nil, c.errorf("missing name")
- } else if step.name == "*" {
- step.kind = startNode
- } else if step.name == "." {
- step.axis = "self"
- step.name = "*"
- } else if step.name == ".." {
- step.axis = "parent"
- step.name = "*"
- } else {
- if c.skipByte(':') {
- if !c.skipByte(':') {
- mark = c.i
- if c.skipName() {
- step.prefix = step.name
- step.name = c.path[mark:c.i]
- // check prefix
- found := false
- for _, ns := range c.ns {
- if ns.Prefix == step.prefix {
- step.uri = ns.Uri
- found = true
- break
- }
- }
- if !found {
- return nil, c.errorf("unknown namespace prefix: %s", step.prefix)
- }
- } else {
- return nil, c.errorf("missing name after namespace prefix")
- }
- } else {
- switch step.name {
- case "attribute":
- step.kind = attrNode
- case "self", "child", "parent":
- case "descendant", "descendant-or-self":
- case "ancestor", "ancestor-or-self":
- case "following", "following-sibling":
- case "preceding", "preceding-sibling":
- default:
- return nil, c.errorf("unsupported axis: %q", step.name)
- }
- step.axis = step.name
-
- mark = c.i
- if !c.skipName() {
- return nil, c.errorf("missing name")
- }
- step.name = c.path[mark:c.i]
- }
- }
- if c.skipByte('(') {
- conflict := step.kind != anyNode
- switch step.name {
- case "node":
- // must be anyNode
- case "text":
- step.kind = textNode
- case "comment":
- step.kind = commentNode
- case "processing-instruction":
- step.kind = procInstNode
- default:
- return nil, c.errorf("unsupported expression: %s()", step.name)
- }
- if conflict {
- return nil, c.errorf("%s() cannot succeed on axis %q", step.name, step.axis)
- }
-
- literal, err := c.parseLiteral()
- if err == errNoLiteral {
- step.name = "*"
- } else if err != nil {
- return nil, c.errorf("%v", err)
- } else if step.kind == procInstNode {
- step.name = literal
- } else {
- return nil, c.errorf("%s() has no arguments", step.name)
- }
- if !c.skipByte(')') {
- return nil, c.errorf("missing )")
- }
- } else if step.name == "*" && step.kind == anyNode {
- step.kind = startNode
- }
- }
- }
- if c.skipByte('[') {
- step.pred = &pathPredicate{}
- if ival, ok := c.parseInt(); ok {
- if ival == 0 {
- return nil, c.errorf("positions start at 1")
- }
- step.pred.ival = ival
- } else {
- path, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- if path.path[0] == '-' {
- if _, err = strconv.Atoi(path.path); err == nil {
- return nil, c.errorf("positions must be positive")
- }
- }
- step.pred.path = path
- if c.skipByte('=') {
- sval, err := c.parseLiteral()
- if err != nil {
- return nil, c.errorf("%v", err)
- }
- step.pred.sval = sval
- } else {
- step.pred.bval = true
- }
- }
- if !c.skipByte(']') {
- return nil, c.errorf("expected ']'")
- }
- }
- steps = append(steps, step)
- //fmt.Printf("step: %#v\n", step)
- if !c.skipByte('/') {
- if (start == 0 || start == c.i) && c.i < len(c.path) {
- return nil, c.errorf("unexpected %q", c.path[c.i])
- }
- return &Path{steps: steps, path: c.path[start:c.i]}, nil
- }
- }
- panic("unreachable")
-}
-
-var errNoLiteral = fmt.Errorf("expected a literal string")
-
-func (c *pathCompiler) parseLiteral() (string, error) {
- if c.skipByte('"') {
- mark := c.i
- if !c.skipByteFind('"') {
- return "", fmt.Errorf(`missing '"'`)
- }
- return c.path[mark:c.i-1], nil
- }
- if c.skipByte('\'') {
- mark := c.i
- if !c.skipByteFind('\'') {
- return "", fmt.Errorf(`missing "'"`)
- }
- return c.path[mark:c.i-1], nil
- }
- return "", errNoLiteral
-}
-
-func (c *pathCompiler) parseInt() (v int, ok bool) {
- mark := c.i
- for c.i < len(c.path) && c.path[c.i] >= '0' && c.path[c.i] <= '9' {
- v *= 10
- v += int(c.path[c.i]) - '0'
- c.i++
- }
- if c.i == mark {
- return 0, false
- }
- return v, true
-}
-
-func (c *pathCompiler) skipByte(b byte) bool {
- if c.i < len(c.path) && c.path[c.i] == b {
- c.i++
- return true
- }
- return false
-}
-
-func (c *pathCompiler) skipByteFind(b byte) bool {
- for i := c.i; i < len(c.path); i++ {
- if c.path[i] == b {
- c.i = i+1
- return true
- }
- }
- return false
-}
-
-func (c *pathCompiler) peekByte(b byte) bool {
- return c.i < len(c.path) && c.path[c.i] == b
-}
-
-func (c *pathCompiler) skipName() bool {
- if c.i >= len(c.path) {
- return false
- }
- if c.path[c.i] == '*' {
- c.i++
- return true
- }
- start := c.i
- for c.i < len(c.path) && (c.path[c.i] >= utf8.RuneSelf || isNameByte(c.path[c.i])) {
- c.i++
- }
- return c.i > start
-}
-
-func isNameByte(c byte) bool {
- return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '_' || c == '.' || c == '-'
-}
diff --git a/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go b/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go
index 3d6a7f5d2..2890e55ef 100644
--- a/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go
+++ b/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go
@@ -176,13 +176,30 @@ func cleanupContent(client *winrm.Client, filePath string) error {
}
defer shell.Close()
- cmd, err := shell.Execute("powershell", "Remove-Item", filePath, "-ErrorAction SilentlyContinue")
+ script := fmt.Sprintf(`Remove-Item %s -ErrorAction SilentlyContinue`, filePath)
+
+ cmd, err := shell.Execute(winrm.Powershell(script))
if err != nil {
return err
}
+ defer cmd.Close()
+
+ var wg sync.WaitGroup
+ copyFunc := func(w io.Writer, r io.Reader) {
+ defer wg.Done()
+ io.Copy(w, r)
+ }
+
+ wg.Add(2)
+ go copyFunc(os.Stdout, cmd.Stdout)
+ go copyFunc(os.Stderr, cmd.Stderr)
cmd.Wait()
- cmd.Close()
+ wg.Wait()
+
+ if cmd.ExitCode() != 0 {
+ return fmt.Errorf("cleanup operation returned code=%d", cmd.ExitCode())
+ }
return nil
}
diff --git a/vendor/github.com/packer-community/winrmcp/winrmcp/endpoint.go b/vendor/github.com/packer-community/winrmcp/winrmcp/endpoint.go
index a39d32159..bcf83d481 100644
--- a/vendor/github.com/packer-community/winrmcp/winrmcp/endpoint.go
+++ b/vendor/github.com/packer-community/winrmcp/winrmcp/endpoint.go
@@ -11,14 +11,14 @@ import (
"github.com/masterzen/winrm"
)
-func parseEndpoint(addr string, https bool, insecure bool, caCert []byte, timeout time.Duration) (*winrm.Endpoint, error) {
+func parseEndpoint(addr string, https bool, insecure bool, tlsServerName string, caCert []byte, timeout time.Duration) (*winrm.Endpoint, error) {
var host string
var port int
if addr == "" {
return nil, errors.New("Couldn't convert \"\" to an address.")
}
- if !strings.Contains(addr, ":") {
+ if !strings.Contains(addr, ":") || (strings.HasPrefix(addr, "[") && strings.HasSuffix(addr, "]")) {
host = addr
port = 5985
} else {
@@ -26,7 +26,8 @@ func parseEndpoint(addr string, https bool, insecure bool, caCert []byte, timeou
if err != nil {
return nil, fmt.Errorf("Couldn't convert \"%s\" to an address.", addr)
}
- host = shost
+ // Check for IPv6 addresses and reformat appropriately
+ host = IpFormat(shost)
port, err = strconv.Atoi(sport)
if err != nil {
return nil, errors.New("Couldn't convert \"%s\" to a port number.")
@@ -34,11 +35,24 @@ func parseEndpoint(addr string, https bool, insecure bool, caCert []byte, timeou
}
return &winrm.Endpoint{
- Host: host,
- Port: port,
- HTTPS: https,
- Insecure: insecure,
- CACert: caCert,
- Timeout: timeout,
+ Host: host,
+ Port: port,
+ HTTPS: https,
+ Insecure: insecure,
+ TLSServerName: tlsServerName,
+ CACert: caCert,
+ Timeout: timeout,
}, nil
}
+
+// IpFormat formats the IP correctly, so we don't provide IPv6 address in an IPv4 format during node communication.
+// We return the ip parameter as is if it's an IPv4 address or a hostname.
+func IpFormat(ip string) string {
+ ipObj := net.ParseIP(ip)
+ // Return the ip/host as is if it's either a hostname or an IPv4 address.
+ if ipObj == nil || ipObj.To4() != nil {
+ return ip
+ }
+
+ return fmt.Sprintf("[%s]", ip)
+}
diff --git a/vendor/github.com/packer-community/winrmcp/winrmcp/winrmcp.go b/vendor/github.com/packer-community/winrmcp/winrmcp/winrmcp.go
index 1a5241851..df2c2e3e0 100644
--- a/vendor/github.com/packer-community/winrmcp/winrmcp/winrmcp.go
+++ b/vendor/github.com/packer-community/winrmcp/winrmcp/winrmcp.go
@@ -20,6 +20,7 @@ type Config struct {
Auth Auth
Https bool
Insecure bool
+ TLSServerName string
CACertBytes []byte
ConnectTimeout time.Duration
OperationTimeout time.Duration
@@ -33,7 +34,7 @@ type Auth struct {
}
func New(addr string, config *Config) (*Winrmcp, error) {
- endpoint, err := parseEndpoint(addr, config.Https, config.Insecure, config.CACertBytes, config.ConnectTimeout)
+ endpoint, err := parseEndpoint(addr, config.Https, config.Insecure, config.TLSServerName, config.CACertBytes, config.ConnectTimeout)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore b/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore
deleted file mode 100644
index 75eab1e65..000000000
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore
+++ /dev/null
@@ -1,33 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
-/.idea/
-.idea/compiler.xml
-.idea/copyright/
-.idea/encodings.xml
-.idea/misc.xml
-.idea/modules.xml
-.idea/profitbricks-sdk-go.iml
-.idea/vcs.xml
-.idea/workspace.xml
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md b/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md
index b41efd679..a36630aea 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md
@@ -1,342 +1,2270 @@
-# Go SDK
-
-The ProfitBricks Client Library for [Go](https://www.golang.org/) provides you with access to the ProfitBricks REST API. It is designed for developers who are building applications in Go.
-
-This guide will walk you through getting setup with the library and performing various actions against the API.
-
-# Table of Contents
-* [Concepts](#concepts)
-* [Getting Started](#getting-started)
-* [Installation](#installation)
-* [How to: Create Data Center](#how-to-create-data-center)
-* [How to: Delete Data Center](#how-to-delete-data-center)
-* [How to: Create Server](#how-to-create-server)
-* [How to: List Available Images](#how-to-list-available-images)
-* [How to: Create Storage Volume](#how-to-create-storage-volume)
-* [How to: Update Cores and Memory](#how-to-update-cores-and-memory)
-* [How to: Attach or Detach Storage Volume](#how-to-attach-or-detach-storage-volume)
-* [How to: List Servers, Volumes, and Data Centers](#how-to-list-servers-volumes-and-data-centers)
-* [Example](#example)
-* [Return Types](#return-types)
-* [Support](#support)
-
-
-# Concepts
-
-The Go SDK wraps the latest version of the ProfitBricks REST API. All API operations are performed over SSL and authenticated using your ProfitBricks portal credentials. The API can be accessed within an instance running in ProfitBricks or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
-
-# Getting Started
-
-Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup) for a ProfitBricks account. The credentials you setup during sign-up will be used to authenticate against the API.
-
-Install the Go language from: [Go Installation](https://golang.org/doc/install)
-
-The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you'll need to set when developing Go code. This is an example of pointing to a workspace configured underneath your home directory:
-
-```
-mkdir -p ~/go/bin
-export GOPATH=~/go
-export GOBIN=$GOPATH/bin
-export PATH=$PATH:$GOBIN
-```
-
-# Installation
-
-The following go command will download `profitbricks-sdk-go` to your configured `GOPATH`:
-
-```go
-go get "github.com/profitbricks/profitbricks-sdk-go"
-```
-
-The source code of the package will be located at:
-
- $GOBIN\src\profitbricks-sdk-go
-
-Create main package file *example.go*:
-
-```go
-package main
-
-import (
- "fmt"
-)
-
-func main() {
-}
-```
-
-Import GO SDK:
-
-```go
-import(
- "github.com/profitbricks/profitbricks-sdk-go"
-)
-```
-
-Add your credentials for connecting to ProfitBricks:
-
-```go
-profitbricks.SetAuth("username", "password")
-```
-
-Set depth:
-
-```go
-profitbricks.SetDepth("5")
-```
-
-Depth controls the amount of data returned from the REST server ( range 1-5 ). The larger the number the more information is returned from the server. This is especially useful if you are looking for the information in the nested objects.
-
-**Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file.
-
-# How To's
-
-## How To: Create Data Center
-
-ProfitBricks introduces the concept of Data Centers. These are logically separated from one another and allow you to have a self-contained environment for all servers, volumes, networking, snapshots, and so forth. The goal is to give you the same experience as you would have if you were running your own physical data center.
-
-The following code example shows you how to programmatically create a data center:
-
-```go
-dcrequest := profitbricks.Datacenter{
- Properties: profitbricks.DatacenterProperties{
- Name: "example.go3",
- Description: "description",
- Location: "us/lasdev",
- },
- }
-
-datacenter := profitbricks.CreateDatacenter(dcrequest)
-```
-
-## How To: Create Data Center with Multiple Resources
-
-To create a complex Data Center you would do this. As you can see, you can create quite a few of the objects you will need later all in one request.:
-
-```go
-datacenter := model.Datacenter{
- Properties: model.DatacenterProperties{
- Name: "composite test",
- Location:location,
- },
- Entities:model.DatacenterEntities{
- Servers: &model.Servers{
- Items:[]model.Server{
- model.Server{
- Properties: model.ServerProperties{
- Name : "server1",
- Ram: 2048,
- Cores: 1,
- },
- Entities:model.ServerEntities{
- Volumes: &model.AttachedVolumes{
- Items:[]model.Volume{
- model.Volume{
- Properties: model.VolumeProperties{
- Type_:"HDD",
- Size:10,
- Name:"volume1",
- Image:"1f46a4a3-3f47-11e6-91c6-52540005ab80",
- Bus:"VIRTIO",
- ImagePassword:"test1234",
- SshKeys: []string{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoLVLHON4BSK3D8L4H79aFo..."},
- },
- },
- },
- },
- Nics: &model.Nics{
- Items: []model.Nic{
- model.Nic{
- Properties: model.NicProperties{
- Name : "nic",
- Lan : "1",
- },
- },
- },
- },
- },
- },
- },
- },
- },
- }
-
-dc := CompositeCreateDatacenter(datacenter)
-
-```
-
-
-## How To: Delete Data Center
-
-You will want to exercise a bit of caution here. Removing a data center will destroy all objects contained within that data center -- servers, volumes, snapshots, and so on.
-
-The code to remove a data center is as follows. This example assumes you want to remove previously data center:
-
-```go
-profitbricks.DeleteDatacenter(response.Id)
-```
-
-## How To: Create Server
-
-The server create method has a list of required parameters followed by a hash of optional parameters. The optional parameters are specified within the "options" hash and the variable names match the [REST API](https://devops.profitbricks.com/api/rest/) parameters.
-
-The following example shows you how to create a new server in the data center created above:
-
-```go
-req := profitbricks.Server{
- Properties: profitbricks.ServerProperties{
- Name: "go01",
- Ram: 1024,
- Cores: 2,
- },
-}
-server := CreateServer(datacenter.Id, req)
-```
-
-## How To: List Available Images
-
-A list of disk and ISO images are available from ProfitBricks for immediate use. These can be easily viewed and selected. The following shows you how to get a list of images. This list represents both CDROM images and HDD images.
-
-```go
-images := profitbricks.ListImages()
-```
-
-This will return a [collection](#Collection) object
-
-## How To: Create Storage Volume
-
-ProfitBricks allows for the creation of multiple storage volumes that can be attached and detached as needed. It is useful to attach an image when creating a storage volume. The storage size is in gigabytes.
-
-```go
-volumerequest := profitbricks.Volume{
- Properties: profitbricks.VolumeProperties{
- Size: 1,
- Name: "Volume Test",
- LicenceType: "LINUX",
- Type: "HDD",
- },
-}
-
-storage := CreateVolume(datacenter.Id, volumerequest)
-```
-
-## How To: Update Cores and Memory
-
-ProfitBricks allows users to dynamically update cores, memory, and disk independently of each other. This removes the restriction of needing to upgrade to the next size available size to receive an increase in memory. You can now simply increase the instances memory keeping your costs in-line with your resource needs.
-
-Note: The memory parameter value must be a multiple of 256, e.g. 256, 512, 768, 1024, and so forth.
-
-The following code illustrates how you can update cores and memory:
-
-```go
-serverupdaterequest := profitbricks.ServerProperties{
- Cores: 1,
- Ram: 256,
-}
-
-resp := PatchServer(datacenter.Id, server.Id, serverupdaterequest)
-```
-
-## How To: Attach or Detach Storage Volume
-
-ProfitBricks allows for the creation of multiple storage volumes. You can detach and reattach these on the fly. This allows for various scenarios such as re-attaching a failed OS disk to another server for possible recovery or moving a volume to another location and spinning it up.
-
-The following illustrates how you would attach and detach a volume and CDROM to/from a server:
-
-```go
-profitbricks.AttachVolume(datacenter.Id, server.Id, volume.Id)
-profitbricks.AttachCdrom(datacenter.Id, server.Id, images.Items[0].Id)
-
-profitbricks.DetachVolume(datacenter.Id, server.Id, volume.Id)
-profitbricks.DetachCdrom(datacenter.Id, server.Id, images.Items[0].Id)
-```
-
-## How To: List Servers, Volumes, and Data Centers
-
-Go SDK provides standard functions for retrieving a list of volumes, servers, and datacenters.
-
-The following code illustrates how to pull these three list types:
-
-```go
-volumes := profitbricks.ListVolumes(datacenter.Id)
-
-servers := profitbricks.ListServers(datacenter.Id)
-
-datacenters := profitbricks.ListDatacenters()
-```
-
-## Example
-
-```go
-package main
-
-import (
- "fmt"
- "time"
-
- "github.com/profitbricks/profitbricks-sdk-go"
-)
-
-func main() {
-
- //Sets username and password
- profitbricks.SetAuth("username", "password")
- //Sets depth.
- profitbricks.SetDepth("5")
-
- dcrequest := profitbricks.Datacenter{
- Properties: profitbricks.DatacenterProperties{
- Name: "example.go3",
- Description: "description",
- Location: "us/lasdev",
- },
- }
-
- datacenter := profitbricks.CreateDatacenter(dcrequest)
-
- serverrequest := profitbricks.Server{
- Properties: profitbricks.ServerProperties{
- Name: "go01",
- Ram: 1024,
- Cores: 2,
- },
- }
- server := profitbricks.CreateServer(datacenter.Id, serverrequest)
-
- volumerequest := profitbricks.Volume{
- Properties: profitbricks.VolumeProperties{
- Size: 1,
- Name: "Volume Test",
- LicenceType: "LINUX",
- Type: "HDD",
- },
- }
-
- storage := profitbricks.CreateVolume(datacenter.Id, volumerequest)
-
- serverupdaterequest := profitbricks.ServerProperties{
- Name: "go01renamed",
- Cores: 1,
- Ram: 256,
- }
-
- profitbricks.PatchServer(datacenter.Id, server.Id, serverupdaterequest)
- //It takes a moment for a volume to be provisioned so we wait.
- time.Sleep(60 * time.Second)
-
- profitbricks.AttachVolume(datacenter.Id, server.Id, storage.Id)
-
- volumes := profitbricks.ListVolumes(datacenter.Id)
- fmt.Println(volumes.Items)
- servers := profitbricks.ListServers(datacenter.Id)
- fmt.Println(servers.Items)
- datacenters := profitbricks.ListDatacenters()
- fmt.Println(datacenters.Items)
-
- profitbricks.DeleteServer(datacenter.Id, server.Id)
- profitbricks.DeleteDatacenter(datacenter.Id)
-}
-```
-
-# Support
-You are welcome to contact us with questions or comments at [ProfitBricks DevOps Central](https://devops.profitbricks.com/). Please report any issues via [GitHub's issue tracker](https://github.com/profitbricks/profitbricks-sdk-go/issues).
\ No newline at end of file
+# Go SDK
+
+Version: profitbricks-sdk-go **4.0.2**
+
+The ProfitBricks Client Library for [Go](https://www.golang.org/) provides you with access to the ProfitBricks REST API. It is designed for developers who are building applications in Go.
+
+This guide will walk you through getting setup with the library and performing various actions against the API.
+
+## Table of Contents
+
+* [Description](#description)
+* [Getting Started](#getting-started)
+ * [Installation](#installation)
+ * [Authenticating](#authenticating)
+ * [Error Handling](#error-handling)
+* [Reference](#reference)
+ * [Data Centers](#data-centers)
+ * [List Data Centers](#list-data-centers)
+ * [Retrieve a Data Center](#retrieve-a-data-center)
+ * [Create a Data Center](#create-a-data-center)
+ * [Update a Data Center](#update-a-data-center)
+ * [Delete a Data Center](#delete-a-data-center)
+ * [Locations](#locations)
+ * [List Locations](#list-locations)
+ * [Get a Location](#get-a-location)
+ * [Servers](#servers)
+ * [List Servers](#list-servers)
+ * [Retrieve a Server](#retrieve-a-server)
+ * [Create a Server](#create-a-server)
+ * [Update a Server](#update-a-server)
+ * [Delete a Server](#delete-a-server)
+ * [List Attached Volumes](#list-attached-volumes)
+ * [Attach a Volume](#attach-a-volume)
+ * [Retrieve an Attached Volume](#retrieve-an-attached-volume)
+ * [Detach a Volume](#detach-a-volume)
+ * [List Attached CD-ROMs](#list-attached-cd-roms)
+ * [Attach a CD-ROM](#attach-a-cd-rom)
+ * [Retrieve an Attached CD-ROM](#retrieve-an-attached-cd-rom)
+ * [Detach a CD-ROM](#detach-a-cd-rom)
+ * [Reboot a Server](#reboot-a-server)
+ * [Start a Server](#start-a-server)
+ * [Stop a Server](#stop-a-server)
+ * [Images](#images)
+ * [List Images](#list-images)
+ * [Get an Image](#get-an-image)
+ * [Update an Image](#update-an-image)
+ * [Delete an Image](#delete-an-image)
+ * [Volumes](#volumes)
+ * [List Volumes](#list-volumes)
+ * [Get a Volume](#get-a-volume)
+ * [Create a Volume](#create-a-volume)
+ * [Update a Volume](#update-a-volume)
+ * [Delete a Volume](#delete-a-volume)
+ * [Create a Volume Snapshot](#create-a-volume-snapshot)
+ * [Restore a Volume Snapshot](#restore-a-volume-snapshot)
+ * [Snapshots](#snapshots)
+ * [List Snapshots](#list-snapshots)
+ * [Get a Snapshot](#get-a-snapshot)
+ * [Update a Snapshot](#update-a-snapshot)
+ * [Delete a Snapshot](#delete-a-snapshot)
+ * [IP Blocks](#ip-blocks)
+ * [List IP Blocks](#list-ip-blocks)
+ * [Get an IP Block](#get-an-ip-block)
+ * [Create an IP Block](#create-an-ip-block)
+ * [Delete an IP Block](#delete-an-ip-block)
+ * [LANs](#lans)
+ * [List LANs](#list-lans)
+ * [Create a LAN](#create-a-lan)
+ * [Get a LAN](#get-a-lan)
+ * [Update a LAN](#update-a-lan)
+ * [Delete a LAN](#delete-a-lan)
+ * [Network Interfaces (NICs)](#network-interfaces-nics)
+ * [List NICs](#list-nics)
+ * [Get a NIC](#get-a-nic)
+ * [Create a NIC](#create-a-nic)
+ * [Update a NIC](#update-a-nic)
+ * [Delete a NIC](#delete-a-nic)
+ * [Firewall Rules](#firewall-rules)
+ * [List Firewall Rules](#list-firewall-rules)
+ * [Get a Firewall Rule](#get-a-firewall-rule)
+ * [Create a Firewall Rule](#create-a-firewall-rule)
+ * [Update a Firewall Rule](#update-a-firewall-rule)
+ * [Delete a Firewall Rule](#delete-a-firewall-rule)
+ * [Load Balancers](#load-balancers)
+ * [List Load Balancers](#list-load-balancers)
+ * [Get a Load Balancer](#get-a-load-balancer)
+ * [Create a Load Balancer](#create-a-load-balancer)
+ * [Update a Load Balancer](#update-a-load-balancer)
+ * [List Load Balanced NICs](#list-load-balanced-nics)
+ * [Get a Load Balanced NIC](#get-a-load-balanced-nic)
+ * [Associate NIC to a Load Balancer](#associate-nic-to-a-load-balancer)
+ * [Remove a NIC Association](#remove-a-nic-association)
+ * [Requests](#requests)
+ * [List Requests](#list-requests)
+ * [Get a Request](#get-a-request)
+ * [Get a Request Status](#get-a-request-status)
+ * [Contract Resources](#contract-resources)
+ * [Users Management](#users-management)
+ * [List Groups](#list-groups)
+ * [Retrieve a Group](#retrieve-a-group)
+ * [Create a Group](#create-a-group)
+ * [Update a Group](#update-a-group)
+ * [Delete a Group](#delete-a-group)
+ * [List Shares](#list-shares)
+ * [Retrieve a Share](#retrieve-a-share)
+ * [Add a Share](#add-a-share)
+ * [Update a Share](#update-a-share)
+ * [Delete a Share](#delete-a-share)
+ * [List Users in a Group](#list-users-in-a-group)
+ * [Add User to Group](#add-user-to-group)
+ * [Remove User from a Group](#remove-user-from-a-group)
+ * [List Users](#list-users)
+ * [Retrieve a User](#retrieve-a-user)
+ * [Create a User](#create-a-user)
+ * [Update a User](#update-a-user)
+ * [Delete a User](#delete-a-user)
+ * [List Resources](#list-resources)
+ * [List All Resources of a Type](#list-all-resources-of-a-type)
+ * [List a specific Resource Type](#list-a-specific-resource-type)
+* [Example](#example)
+* [Support](#support)
+* [Testing](#testing)
+* [Contributing](#contributing)
+
+
+# Description
+
+The Go SDK wraps the latest version of the ProfitBricks REST API. All API operations are performed over SSL and authenticated using your ProfitBricks portal credentials. The API can be accessed within an instance running in ProfitBricks or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
+
+## Getting Started
+
+Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup) for a ProfitBricks account. The credentials you setup during sign-up will be used to authenticate against the API.
+
+### Installation
+
+Install the Go language from: [Go Installation](https://golang.org/doc/install)
+
+The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you'll need to set when developing Go code. This is an example of pointing to a workspace configured underneath your home directory:
+
+```
+mkdir -p ~/go/bin
+export GOPATH=~/go
+export GOBIN=$GOPATH/bin
+export PATH=$PATH:$GOBIN
+```
+
+
+The following go command will download `profitbricks-sdk-go` to your configured `GOPATH`:
+
+```go
+go get "github.com/profitbricks/profitbricks-sdk-go"
+```
+
+The source code of the package will be located at:
+
+ $GOBIN\src\profitbricks-sdk-go
+
+Create main package file *example.go*:
+
+```go
+package main
+
+import (
+ "fmt"
+)
+
+func main() {
+}
+```
+
+Import GO SDK:
+
+```go
+import(
+ "github.com/profitbricks/profitbricks-sdk-go"
+)
+```
+
+
+### Authenticating
+Add your credentials for connecting to ProfitBricks:
+
+```go
+profitbricks.SetAuth("username", "password")
+```
+
+
+
+**Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file.
+
+### Error Handling
+
+The SDK will raise custom exceptions when the Cloud API returns an error. There are four response types:
+
+| HTTP Code | Description |
+|---|---|
+| 401 | The supplied user credentials are invalid. |
+| 404 | The requested resource cannot be found. |
+| 422 | The request body includes invalid JSON. |
+| 429 | The Cloud API rate limit has been exceeded. |
+
+# Concepts
+
+The Go SDK wraps the latest version of the ProfitBricks REST API. All API operations are performed over SSL and authenticated using your ProfitBricks portal credentials. The API can be accessed within an instance running in ProfitBricks or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
+
+# Getting Started
+
+Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup) for a ProfitBricks account. The credentials you setup during sign-up will be used to authenticate against the API.
+
+Install the Go language from: [Go Installation](https://golang.org/doc/install)
+
+The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you'll need to set when developing Go code. This is an example of pointing to a workspace configured underneath your home directory:
+
+```
+mkdir -p ~/go/bin
+export GOPATH=~/go
+export GOBIN=$GOPATH/bin
+export PATH=$PATH:$GOBIN
+```
+
+# Installation
+
+The following go command will download `profitbricks-sdk-go` to your configured `GOPATH`:
+
+```go
+go get "github.com/profitbricks/profitbricks-sdk-go"
+```
+
+The source code of the package will be located at:
+
+ $GOBIN\src\profitbricks-sdk-go
+
+Create main package file *example.go*:
+
+```go
+package main
+
+import (
+ "fmt"
+)
+
+func main() {
+}
+```
+
+Import GO SDK:
+
+```go
+import(
+ "github.com/profitbricks/profitbricks-sdk-go"
+)
+```
+
+Add your credentials for connecting to ProfitBricks:
+
+```go
+profitbricks.SetAuth("username", "password")
+```
+
+Set depth:
+
+```go
+profitbricks.SetDepth("5")
+```
+
+Depth controls the amount of data returned from the REST server ( range 1-5 ). The larger the number the more information is returned from the server. This is especially useful if you are looking for the information in the nested objects.
+
+**Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file.
+
+
+## Reference
+
+This section provides details on all the available operations and the arguments they accept. Brief code snippets demonstrating usage are also included.
+
+
+##### Depth
+
+Many of the *List* or *Get* operations will accept an optional *depth* argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The detail returned varies somewhat depending on the resource being queried, however it generally follows this pattern.
+
+| Depth | Description |
+|:-:|---|
+| 0 | Only direct properties are included. Children are not included. |
+| 1 | Direct properties and children's references are returned. |
+| 2 | Direct properties and children's properties are returned. |
+| 3 | Direct properties, children's properties, and descendant's references are returned. |
+| 4 | Direct properties, children's properties, and descendant's properties are returned. |
+| 5 | Returns all available properties. |
+
+This SDK sets the *Depth=5* by default as that works well in the majority of cases. You may find that setting *Depth* to a lower or higher value could simplify a later operation by reducing or increasing the data available in the response object.
+
+### Data Centers
+
+Virtual Data Centers (VDCs) are the foundation of the ProfitBricks platform. VDCs act as logical containers for all other objects you will be creating, e.g., servers. You can provision as many VDCs as you want. VDCs have their own private network and are logically segmented from each other to create isolation.
+
+#### List Data Centers
+
+This operation will list all currently provisioned VDCs that your account credentials provide access to.
+
+There are no request arguments that need to be supplied.
+
+Call `ListDatacenters`:
+
+ ListDatacenters()
+
+---
+
+#### Retrieve a Data Center
+
+Use this to retrieve details about a specific VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| dcid | Yes | string | The ID of the data center. |
+
+Pass the arguments to `GetDatacenter`:
+
+ GetDatacenter(dcid string)
+
+---
+
+#### Create a Data Center
+
+Use this operation to create a new VDC. You can create a "simple" VDC by supplying just the required *Name* and *Location* arguments. This operation also has the capability of provisioning a "complex" VDC by supplying additional arguments for servers, volumes, LANs, and/or load balancers.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenter | **yes** | object | A [Datacenter object](#datacenter-resource-object) describing the VDC being created. |
+
+Build the `Datacenter` resource object:
+
+ var obj = Datacenter{
+ Properties: DatacenterProperties{
+ Name: "GO SDK Test",
+ Description: "GO SDK test datacenter",
+ Location: location,
+ },
+ }
+
+Pass the object to `CreateDatacenter`:
+
+ CreateDatacenter(obj)
+
+##### Datacenter Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | The name of the VDC. |
+| Location | **yes** | string | The physical ProfitBricks location where the VDC will be created. |
+| Description | no | string | A description for the VDC, e.g. staging, production. |
+| Servers | no | list | A list of one or more [Server objects](#server-resource-object) to be created. |
+| Volumes | no | list | A list of one or more [Volume objects](#volume-resource-object) to be created. |
+| Lans | no | list | A list of one or more [LAN objects](#lan-resource-object) to be created. |
+| Loadbalancers | no | list | A list of one or more [LoadBalancer objects](#load-balancer-resource-object) to be created. |
+
+The following table outlines the locations currently supported:
+
+| Value| Country | City |
+|---|---|---|
+| us/las | United States | Las Vegas |
+| us/ewr | United States | Newark |
+| de/fra | Germany | Frankfurt |
+| de/fkb | Germany | Karlsruhe |
+
+**NOTES**:
+
+* The value for `Name` cannot contain the following characters: (@, /, , |, ‘’, ‘).
+* You cannot change the VDC `Location` once it has been provisioned.
+
+---
+
+#### Update a Data Center
+
+After retrieving a VDC, either by ID or as a create response object, you can change its properties by calling the `update_datacenter` method. Some arguments may not be changed using `update_datacenter`.
+
+The following table describes the available request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcid | **yes** | string | The ID of the VDC. |
+| Name | no | string | The new name of the VDC. |
+| Description | no | string | The new description of the VDC. |
+
+Build the `DatacenterProperties` resource object:
+
+ var obj = DatacenterProperties{Name: "new Name",Description: "new desc"}
+
+Pass the arguments to `PatchDatacenter`:
+
+PatchDatacenter(dcid string, obj DatacenterProperties)
+
+---
+
+#### Delete a Data Center
+
+This will remove all objects within the VDC and remove the VDC object itself.
+
+**NOTE**: This is a highly destructive operation which should be used with extreme caution!
+
+The following table describes the available request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcid | **yes** | string | The ID of the VDC that you want to delete. |
+
+Pass the argument to `DeleteDatacenter`:
+
+ DeleteDatacenter(dcid)
+
+---
+
+### Locations
+
+Locations are the physical ProfitBricks data centers where you can provision your VDCs.
+
+#### List Locations
+
+The `ListLocations` operation will return the list of currently available locations.
+
+There are no request arguments to supply.
+
+ ListLocations()
+
+---
+
+#### Get a Location
+
+Retrieves the attributes of a specific location.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| locationid | **yes** | string | The ID consisting of country/city. |
+
+Pass the argument to `GetLocation`:
+
+ GetLocation("us/las")
+
+---
+
+#### Get a Regional Location
+
+Retrieves the locations available in a specific region.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| regionid | **yes** | string | The ID consisting of country/city. |
+
+Pass the argument to `GetRegionalLocations`:
+
+ GetRegionalLocations("us")
+
+---
+
+### Servers
+
+#### List Servers
+
+You can retrieve a list of all the servers provisioned inside a specific VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcid | **yes** | string | The ID of the VDC. |
+
+Pass the arguments to `ListServers`:
+
+ ListServers(dcid)
+
+---
+
+#### Retrieve a Server
+
+Returns information about a specific server such as its configuration, provisioning status, etc.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `GetServer`:
+
+ GetServer(dcId, serverId)
+
+---
+
+#### Create a Server
+
+Creates a server within an existing VDC. You can configure additional properties such as specifying a boot volume and connecting the server to a LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| server | **yes** | object | A [Server object](#server-resource-object) describing the server being created. |
+
+Build a [Server](#server-resource-object) object:
+
+ var server = Server{
+ Properties: ServerProperties{
+ Name: "GO SDK Test",
+ Ram: 1024,
+ Cores: 1,
+ AvailabilityZone: "ZONE_1",
+ CpuFamily: "INTEL_XEON",
+ },
+ }
+
+Pass the object and other arguments to `CreateServer`:
+
+ CreateServer(datacenterId, server)
+
+##### Server Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | The name of the server. |
+| Cores | **yes** | int | The total number of cores for the server. |
+| Ram | **yes** | int | The amount of memory for the server in MB, e.g. 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set `RamHotPlug` to *true* then you must use a minimum of 1024 MB. |
+| AvailabilityZone | no | string | The availability zone in which the server should exist. |
+| CpuFamily | no | string | Sets the CPU type. "AMD_OPTERON" or "INTEL_XEON". Defaults to "AMD_OPTERON". |
+| BootVolume | no | string | A volume ID that the server will boot from. If not *nil* then `BootCdrom` has to be *nil*. |
+| BootCdrom | no | string | A CD-ROM image ID used for booting. If not *nil* then `BootVolume` has to be *nil*. |
+| Cdroms | no | list | A list of existing volume IDs that you want to connect to the server. |
+| Volumes | no | list | One or more [Volume objects](#volume-resource-object) that you want to create and attach to the server.|
+| Nics | no | list | One or more [NIC objects](#nic-resource-object) that you wish to create at the time the server is provisioned. |
+
+The following table outlines the server availability zones currently supported:
+
+| Availability Zone | Comment |
+|---|---|
+| AUTO | Automatically Selected Zone |
+| ZONE_1 | Fire Zone 1 |
+| ZONE_2 | Fire Zone 2 |
+
+---
+
+#### Update a Server
+
+Perform updates to the attributes of a server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| Name | no | string | The name of the server. |
+| Cores | no | int | The number of cores for the server. |
+| Ram | no | int | The amount of memory in the server. |
+| AvailabilityZone | no | string | The new availability zone for the server. |
+| CpuFamily | no | string | Sets the CPU type. "AMD_OPTERON" or "INTEL_XEON". Defaults to "AMD_OPTERON". |
+| BootVolume | no | string | A volume ID used for booting. If not *nil* then `BootCdrom` has to be *nil*. |
+| BootCdrom | no | string | A CD-ROM image ID used for booting. If not *nil* then `BootVolume` has to be *nil*. |
+
+Build a [ServerProperties](#serverproperties) object:
+
+ var server = ServerProperties{
+ Name: "GO SDK Test RENAME",
+ }
+
+
+Pass the arguments to `update_server`:
+
+ PatchServer(datacenterId, serverId, server)
+
+---
+
+#### Delete a Server
+
+This will remove a server from a VDC. **NOTE**: This will not automatically remove the storage volume(s) attached to a server. A separate operation is required to delete a storage volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server that will be deleted. |
+
+Pass the arguments to `delete_server`:
+
+ DeleteServer(datacenterId, serverId)
+
+---
+
+#### List Attached Volumes
+
+Retrieves a list of volumes attached to the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `ListAttachedVolumes`:
+
+ ListAttachedVolumes(datacenterId, serverId)
+
+---
+
+#### Attach a Volume
+
+This will attach a pre-existing storage volume to the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| volumeId | **yes** | string | The ID of a storage volume. |
+
+Pass the arguments to `AttachVolume`:
+
+AttachVolume(datacenterId, serverId, volumeId)
+
+---
+
+#### Retrieve an Attached Volume
+
+This will retrieve the properties of an attached volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| volumeId | **yes** | string | The ID of the attached volume. |
+
+Pass the arguments to `get_attached_volume`:
+
+ GetAttachedVolume(srv_dc_id, srv_srvid, srv_vol)
+
+---
+
+#### Detach a Volume
+
+This will detach the volume from the server. Depending on the volume `hot_unplug` settings, this may result in the server being rebooted. If `disc_virtio_hot_unplug` has been set to *true*, then a reboot should not be required.
+
+This will **NOT** delete the volume from your VDC. You will need to make a separate request to delete a volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| volumeId | **yes** | string | The ID of the attached volume. |
+
+Pass the arguments to `detach_volume`:
+
+ DetachVolume(datacenterId, serverId, volumeId)
+
+---
+
+#### List Attached CD-ROMs
+
+Retrieves a list of CD-ROMs attached to a server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `ListAttachedCdroms`:
+
+ ListAttachedCdroms(srv_dc_id, srv_srvid)
+
+---
+
+#### Attach a CD-ROM
+
+You can attach a CD-ROM to an existing server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| cdromId | **yes** | string | The ID of a CD-ROM. |
+
+Pass the arguments to `attach_cdrom`:
+
+ AttachCdrom(datacenterId, serverId, cdromId)
+
+---
+
+#### Retrieve an Attached CD-ROM
+
+You can retrieve a specific CD-ROM attached to the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| cdromId | **yes** | string | The ID of the attached CD-ROM. |
+
+Pass the arguments to `GetAttachedCdrom`:
+
+GetAttachedCdrom(datacenterId, serverId, cdromId)
+
+---
+
+#### Detach a CD-ROM
+
+This will detach a CD-ROM from the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| cdromId | **yes** | string | The ID of the attached CD-ROM. |
+
+Pass the arguments to `DetachCdrom`:
+
+ DetachCdrom(datacenterId, serverId, cdromId)
+
+---
+
+#### Reboot a Server
+
+This will force a hard reboot of the server. Do not use this method if you want to gracefully reboot the machine. This is the equivalent of powering off the machine and turning it back on.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `RebootServer`:
+
+ RebootServer(datacenterId, serverId)
+
+---
+
+#### Start a Server
+
+This will start a server. If a DHCP assigned public IP was deallocated when the server was stopped, then a new IP will be assigned.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `StartServer`:
+
+ StartServer(datacenterId, serverId)
+
+---
+
+#### Stop a Server
+
+This will stop a server. The machine will be forcefully powered off, billing will cease, and the public IP, if one is allocated, will be deallocated.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `StopServer`:
+
+ StopServer(datacenterId, serverId)
+
+---
+
+### Images
+
+#### List Images
+
+Retrieve a list of images.
+
+Just call the `ListImages`:
+
+ ListImages()
+
+---
+
+#### Get an Image
+
+Retrieves the attributes of a specific image.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| imgId | **yes** | string | The ID of the image. |
+
+Pass the arguments to `GetImage`:
+
+ GetImage(imgid)
+
+---
+
+
+### Volumes
+
+#### List Volumes
+
+Retrieve a list of volumes within the VDC. If you want to retrieve a list of volumes attached to a server please see the [List Attached Volumes](#list-attached-volumes) entry in the Server section for details.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+
+Pass the arguments to `ListVolumes`:
+
+ ListVolumes(datacenterId)
+
+---
+
+#### Get a Volume
+
+Retrieves the attributes of a given volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+
+Pass the arguments to `GetVolume`:
+
+ GetVolume(datacenterId, volumeId)
+
+---
+
+#### Create a Volume
+
+Creates a volume within the VDC. This will NOT attach the volume to a server. Please see the [Attach a Volume](#attach-a-volume) entry in the Server section for details on how to attach storage volumes.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenter_id | **yes** | string | The ID of the VDC. |
+| volume | **yes** | object | A [Volume object](#volume-resource-object) you wish to create. |
+
+Build the `Volume` resource object:
+
+ var request = Volume{
+ Properties: VolumeProperties{
+ Size: 2,
+ Name: "GO SDK Test",
+ ImageAlias: "ubuntu:latest",
+ Bus: "VIRTIO",
+ SshKeys: []string{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoLVLHON4BSK3D8L4H79aFo..."},
+ Type: "HDD",
+ ImagePassword: "test1234",
+ AvailabilityZone: "ZONE_3",
+ },
+ }
+
+Pass the object and arguments to `CreateVolume`:
+
+ CreateVolume(dcID, request)
+
+##### Volume Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of the volume. |
+| Size | **yes** | int | The size of the volume in GB. |
+| Bus | no | string | The bus type of the volume (VIRTIO or IDE). Default: VIRTIO. |
+| Image | **yes** | string | The image or snapshot ID. Can be left empty for a data volume, however you'll need to set the `licence_type`. Default: *null* |
+| Type | **yes** | string | The volume type, HDD or SSD. Default: HDD|
+| LicenceType | **yes** | string | The licence type of the volume. Options: LINUX, WINDOWS, WINDOWS2016, UNKNOWN, OTHER. Default: UNKNOWN |
+| ImagePassword | **yes** | string | A password to set on the volume for the appropriate root or administrative account. This field may only be set in creation requests. When reading, it always returns *null*. The password has to contain 8-50 characters. Only these characters are allowed: [abcdefghjkmnpqrstuvxABCDEFGHJKLMNPQRSTUVX23456789] |
+| ImageAlias | **yes** | string | An alias to a ProfitBricks public image. Use instead of "image".] |
+| SshKeys | **yes** | string | SSH keys to allow access to the volume via SSH. |
+| AvailabilityZone | no | string | The storage availability zone assigned to the volume. Valid values: AUTO, ZONE_1, ZONE_2, or ZONE_3. This only applies to HDD volumes. Leave blank or set to AUTO when provisioning SSD volumes. |
+
+The following table outlines the various licence types you can define:
+
+| Licence Type | Comment |
+|---|---|
+| WINDOWS2016 | Use this for the Microsoft Windows Server 2016 operating system. |
+| WINDOWS | Use this for the Microsoft Windows Server 2008 and 2012 operating systems. |
+| LINUX |Use this for Linux distributions such as CentOS, Ubuntu, Debian, etc. |
+| OTHER | Use this for any volumes that do not match one of the other licence types. |
+| UNKNOWN | This value may be inherited when you've uploaded an image and haven't set the license type. Use one of the options above instead. |
+
+The following table outlines the storage availability zones currently supported:
+
+| Availability Zone | Comment |
+|---|---|
+| AUTO | Automatically Selected Zone |
+| ZONE_1 | Fire Zone 1 |
+| ZONE_2 | Fire Zone 2 |
+| ZONE_3 | Fire Zone 3 |
+
+**Note:** You will need to provide either the `Image` or the `LicenceType` arguments when creating a volume. A `LicenceType` is required, but if `Image` is supplied, it is already set and cannot be changed. Either the `ImagePassword` or `SshKeys` arguments need to be supplied when creating a volume using one of the official ProfitBricks images. Only official ProfitBricks provided images support the `SshKeys` and `ImagePassword` arguments.
+
+---
+
+#### Update a Volume
+
+You can update various attributes of an existing volume; however, some restrictions are in place:
+
+You can increase the size of an existing storage volume. You cannot reduce the size of an existing storage volume. The volume size will be increased without requiring a reboot if the relevant hot plug settings (`disc_virtio_hot_plug`, `disc_virtio_hot_unplug`, etc.) have been set to *true*. The additional capacity is not added automatically added to any partition, therefore you will need to handle that inside the OS afterwards. Once you have increased the volume size you cannot decrease the volume size.
+
+Since an existing volume is being modified, none of the request arguments are specifically required as long as the changes being made satisfy the requirements for creating a volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+| Name | no | string | The name of the volume. |
+| Size | no | int | The size of the volume in GB. You may only increase the `size` when updating. |
+| Bus | no | string | The bus type of the volume (VIRTIO or IDE). Default: VIRTIO. |
+| LicenceType | no | string | The licence type of the volume. Options: LINUX, WINDOWS, WINDOWS2016, UNKNOWN, OTHER. You may get an error trying to update `LicenceType` depending on the `Image` that was used to create the volume. For example, you cannot update the `LicenceType` for a volume created from a ProfitBricks supplied OS image. |
+
+**Note**: Trying to change the `Image`, `Type`, or `AvailabilityZone` in an update request will result in an error.
+
+Pass the arguments to `PatchVolume`:
+
+ var obj := VolumeProperties{
+ Name: "GO SDK Test - RENAME",
+ Size: 5,
+ }
+ PatchVolume(datacenterId, volumeId, obj)
+
+---
+
+#### Delete a Volume
+
+Deletes the specified volume. This will result in the volume being removed from your data center. Use this with caution.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+
+Pass the arguments to `DeleteVolume`:
+
+ DeleteVolume(datacenterId, volumeId)
+
+---
+
+#### Create a Volume Snapshot
+
+Creates a snapshot of a volume within the VDC. You can use a snapshot to create a new storage volume or to restore a storage volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+| Name | no | string | The name of the snapshot. |
+| Description | no | string | The description of the snapshot. |
+
+Pass the arguments to `CreateSnapshot`:
+
+ CreateSnapshot(datacenterId, volumeId, Name,Description)
+
+---
+
+#### Restore a Volume Snapshot
+
+This will restore a snapshot onto a volume. A snapshot is created as just another image that can be used to create new volumes or to restore an existing volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+| snapshotId | **yes** | string | The ID of the snapshot. |
+
+Pass the arguments to `restore_snapshot`:
+
+ RestoreSnapshot(datacenterId, volumeId, snapshotId)
+
+---
+
+### Snapshots
+
+#### List Snapshots
+
+Call the `ListSnapshots`:
+
+ ListSnapshots()
+
+---
+
+#### Get a Snapshot
+
+Retrieves the attributes of a specific snapshot.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| snapshotId | **yes** | string | The ID of the snapshot. |
+
+Pass the arguments to `GetSnapshot`:
+
+ GetSnapshot(snapshotId)
+
+---
+
+#### Update a Snapshot
+
+Perform updates to attributes of a snapshot.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| snapshotId | **yes** | string | The ID of the snapshot. |
+| Name | no | string | The name of the snapshot. |
+| Description | no | string | The description of the snapshot. |
+| LicenceType | no | string | The snapshot's licence type: LINUX, WINDOWS, WINDOWS2016, or OTHER. |
+| CpuHotPlug | no | bool | This volume is capable of CPU hot plug (no reboot required) |
+| CpuHotUnplug | no | bool | This volume is capable of CPU hot unplug (no reboot required) |
+| RamHotPlug | no | bool | This volume is capable of memory hot plug (no reboot required) |
+| RamHotUnplug | no | bool | This volume is capable of memory hot unplug (no reboot required) |
+| NicHotPlug | no | bool | This volume is capable of NIC hot plug (no reboot required) |
+| NicHotUnplug | no | bool | This volume is capable of NIC hot unplug (no reboot required) |
+| DiscVirtioHotPlug | no | bool | This volume is capable of VirtIO drive hot plug (no reboot required) |
+| DiscVirtioHotUnplug | no | bool | This volume is capable of VirtIO drive hot unplug (no reboot required) |
+| DiscScsiHotPlug | no | bool | This volume is capable of SCSI drive hot plug (no reboot required) |
+| DiscScsiHotUnplug | no | bool | This volume is capable of SCSI drive hot unplug (no reboot required) |
+
+Pass the arguments to `UpdateSnapshot`:
+
+ UpdateSnapshot(snapshotId, SnapshotProperties{Name: newValue})
+
+---
+
+#### Delete a Snapshot
+
+Deletes the specified snapshot.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| snapshotId | **yes** | string | The ID of the snapshot. |
+
+Pass the arguments to `DeleteSnapshot`:
+
+ DeleteSnapshot(snapshotId)
+
+---
+
+### IP Blocks
+
+The IP block operations assist with managing reserved /static public IP addresses.
+
+#### List IP Blocks
+
+Retrieve a list of available IP blocks.
+
+
+ ListIpBlocks()
+
+---
+
+#### Get an IP Block
+
+Retrieves the attributes of a specific IP block.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| ipblock_id | **yes** | string | The ID of the IP block. |
+
+Pass the arguments to `get_ipblock`:
+
+ response = client.get_ipblock('UUID')
+
+---
+
+#### Create an IP Block
+
+Creates an IP block. Creating an IP block is a bit different than some of the other available create operations. IP blocks are not attached to a particular VDC, but rather to a location. Therefore, you must specify a valid `location` along with a `size` argument indicating the number of IP addresses you want to reserve in the IP block. Any resources using an IP address from an IP block must be in the same `location`.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenter_id | **yes** | string | The ID of the VDC. |
+| ipblock | **yes** | object | An [IPBlock object](#ipblock-resource-object) you wish to create. |
+
+To create an IP block, define the `IPBlock` resource object:
+
+ var ipblock = IpBlock{
+ Properties: IpBlockProperties{
+ Name: "GO SDK Test",
+ Size: 2,
+ Location: location,
+ },
+ }
+
+Pass it to `ReserveIpBlock`:
+
+ ReserveIpBlock(ipblock)
+
+##### IPBlock Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Location | **yes** | string | This must be one of the available locations: us/las, us/ewr, de/fra, de/fkb. |
+| Size | **yes** | int | The size of the IP block you want. |
+| Name | no | string | A descriptive name for the IP block |
+
+The following table outlines the locations currently supported:
+
+| Value| Country | City |
+|---|---|---|
+| us/las | United States | Las Vegas |
+| us/ewr | United States | Newark |
+| de/fra | Germany | Frankfurt |
+| de/fkb | Germany | Karlsruhe |
+
+---
+
+#### Delete an IP Block
+
+Deletes the specified IP Block.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| ipblkid | **yes** | string | The ID of the IP block. |
+
+Pass the arguments to `ReleaseIpBlock`:
+
+ ReleaseIpBlock(ipblkid)
+
+---
+
+### LANs
+
+#### List LANs
+
+Retrieve a list of LANs within the VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterd | **yes** | string | The ID of the VDC. |
+
+
+Pass the arguments to `ListLans`:
+
+ ListLans(datacenterd)
+
+---
+
+#### Create a LAN
+
+Creates a LAN within a VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lan | **yes** | object | A [LAN object](#lan-resource-object) describing the LAN to create. |
+
+Create the `LAN` resource object:
+
+ var request = CreateLanRequest{
+ Properties: CreateLanProperties{
+ Public: true,
+ Name: "GO SDK Test with failover",
+ },
+ Entities: &LanEntities{
+ Nics: lanNics,
+ },
+ }
+
+Pass the object and arguments to `create_lan`:
+
+ CreateLan(datacenterId, request)
+
+##### LAN Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of your LAN. |
+| Public | **Yes** | bool | Boolean indicating if the LAN faces the public Internet or not. |
+| Nics | no | list | One or more NIC IDs attached to the LAN. |
+
+---
+
+#### Get a LAN
+
+Retrieves the attributes of a given LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lanId | **yes** | int | The ID of the LAN. |
+
+Pass the arguments to `GetLan`:
+
+ GetLan(datacenterId, lanId)
+
+---
+
+#### Update a LAN
+
+Perform updates to attributes of a LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lanId | **yes** | int | The ID of the LAN. |
+| Name | no | string | A descriptive name for the LAN. |
+| Public | no | bool | Boolean indicating if the LAN faces the public Internet or not. |
+| IpFailover | no | array | A list of IP fail-over dicts. |
+
+Pass the arguments to `update_lan`:
+
+ var obj = LanProperties{
+ Properties: LanProperties{
+ Public: true,
+ Name: "GO SDK Test with failover",
+ }
+ PatchLan(datacenterId, lanId, obj)
+
+---
+
+#### Delete a LAN
+
+Deletes the specified LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lanId | **yes** | string | The ID of the LAN. |
+
+Pass the arguments to `delete_lan`:
+
+ DeleteLan(lan_dcid, lanid)
+---
+
+### Network Interfaces (NICs)
+
+#### List NICs
+
+Retrieve a list of LANs within the VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `ListNics`:
+
+ ListNics(datacenterId, serverId)
+
+---
+
+#### Get a NIC
+
+Retrieves the attributes of a given NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+Pass the arguments to `GetNic`:
+
+ GetNic(datacenterId, serverId, nicId)
+
+---
+
+#### Create a NIC
+
+Adds a NIC to the target server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string| The ID of the server. |
+| nic | **yes** | object | A [NIC object](#nic-resource-object) describing the NIC to be created. |
+
+Create the `NIC` resource object:
+
+ var nic = Nic{
+ Properties: &NicProperties{
+ Lan: 1,
+ Name: "GO SDK Test",
+ Nat: false,
+ Dhcp: true,
+ FirewallActive: true,
+ Ips: []string{"10.0.0.1"},
+ },
+ }
+
+Pass the object and arguments to `create_nic`:
+
+ CreateNic(datacenterId, serverId, nic)
+
+##### NIC Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of the NIC. |
+| Ips | no | list | IP addresses assigned to the NIC. |
+| Dhcp | no | bool | Set to *false* if you wish to disable DHCP on the NIC. Default: *true*. |
+| Lan | **yes** | int | The LAN ID the NIC will sit on. If the LAN ID does not exist it will be created. |
+| Nat | no | bool | Indicates the private IP address has outbound access to the public internet. |
+| FirewallActive | no | bool | Set this to *true* to enable the ProfitBricks firewall, *false* to disable. |
+| Firewallrules | no | list | A list of [FirewallRule objects](#firewall-rule-resource-object) to be created with the NIC. |
+
+---
+
+#### Update a NIC
+
+You can update -- in full or partially -- various attributes on the NIC; however, some restrictions are in place:
+
+The primary address of a NIC connected to a load balancer can only be changed by changing the IP of the load balancer. You can also add additional reserved, public IPs to the NIC.
+
+The user can specify and assign private IPs manually. Valid IP addresses for private networks are 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string| The ID of the server. |
+| nicId | **yes** | string| The ID of the NIC. |
+| Name | no | string | The name of the NIC. |
+| Ips | no | list | IPs assigned to the NIC represented as a list of strings. |
+| Dhcp | no | bool | Boolean value that indicates if the NIC is using DHCP or not. |
+| Lan | no | int | The LAN ID the NIC sits on. |
+| Nat | no | bool | Indicates the private IP address has outbound access to the public internet. |
+| FirewallActive | no | bool | Set this to *true* to enable the ProfitBricks firewall, *false* to disable. |
+
+Pass the arguments to `update_nic`:
+
+ var obj = NicProperties{Name: "GO SDK Test - RENAME", Lan: 1}
+ PatchNic(nic_dcid, nic_srvid, nicid, obj)
+
+---
+
+#### Delete a NIC
+
+Deletes the specified NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string| The ID of the server. |
+| nicId | **yes** | string| The ID of the NIC. |
+
+Pass the arguments to `DeleteNic`:
+
+ DeleteNic(nic_dcid, nic_srvid, nicid)
+
+---
+
+### Firewall Rules
+
+#### List Firewall Rules
+
+Retrieves a list of firewall rules associated with a particular NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+Pass the arguments to `ListFirewallRules`:
+
+ ListFirewallRules(datacenterId, serverId, nicId)
+
+---
+
+#### Get a Firewall Rule
+
+Retrieves the attributes of a given firewall rule.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRuleId | **yes** | string | The ID of the firewall rule. |
+
+Pass the arguments to `get_firewall_rule`:
+
+ GetFirewallRule(datacenterId, serverId, nicId, firewallRuleId)
+
+---
+
+#### Create a Firewall Rule
+
+This will add a firewall rule to the NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRule | **yes** | object | A [FirewallRule object](#firewall-rule-resource-object) describing the firewall rule to be created. |
+
+Create the `FirewallRule` resource object:
+
+ var firewallRule FirewallRule{
+ Properties: FirewallruleProperties{
+ Name: "SSH",
+ Protocol: "TCP",
+ SourceMac: "01:23:45:67:89:00",
+ PortRangeStart: 22,
+ PortRangeEnd: 22,
+ },
+ }
+
+Pass the object and arguments to `create_firewall_rule`:
+
+ CreateFirewallRule(datacenterId, serverId, nicId, firewallRule)
+
+##### Firewall Rule Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of the firewall rule. |
+| Protocol | **yes** | string | The protocol for the rule: TCP, UDP, ICMP, ANY. |
+| SourceMac | no | string | Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. A *nil* value allows all source MAC address. |
+| SourceIp | no | string | Only traffic originating from the respective IPv4 address is allowed. A *nil* value allows all source IPs. |
+| TargetIp | no | string | In case the target NIC has multiple IP addresses, only traffic directed to the respective IP address of the NIC is allowed. A *nil* value allows all target IPs. |
+| PortRangeStart | no | string | Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| PortRangeEnd | no | string | Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| IcmpType | no | string | Defines the allowed type (from 0 to 254) if the protocol ICMP is chosen. A *nil* value allows all types. |
+| IcmpCode | no | string | Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. A *nil* value allows all codes. |
+
+---
+
+#### Update a Firewall Rule
+
+Perform updates to an existing firewall rule. You will notice that some arguments, such as `protocol` cannot be updated. If the `protocol` needs to be changed, you can [delete](#delete-a-firewall-rule) the firewall rule and then [create](#create-a-firewall-rule) new one to replace it.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRuleId | **yes** | string | The ID of the firewall rule. |
+| Name | no | string | The name of the firewall rule. |
+| SourceMac | no | string | Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. A *nil* value allows all source MAC address. |
+| SourceIp | no | string | Only traffic originating from the respective IPv4 address is allowed. A *nil* value allows all source IPs. |
+| TargetIp | no | string | In case the target NIC has multiple IP addresses, only traffic directed to the respective IP address of the NIC is allowed. A *nil* value allows all target IPs. |
+| PortRangeStart | no | string | Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| PortRangeEnd | no | string | Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| IcmpType | no | string | Defines the allowed type (from 0 to 254) if the protocol ICMP is chosen. A *nil* value allows all types. |
+| IcmpCode | no | string | Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. A *nil* value allows all codes. |
+
+Pass the arguments to `PatchFirewallRule`:
+
+ props := FirewallruleProperties{
+ Name: "SSH - RENAME",
+ }
+ PatchFirewallRule(dcID, srv_srvid, nicid, fwId, props)
+
+---
+
+#### Delete a Firewall Rule
+
+Removes a firewall rule.
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRuleId | **yes** | string | The ID of the firewall rule. |
+
+Pass the arguments to `DeleteFirewallRule`:
+
+ DeleteFirewallRule(dcID, srv_srvid, nicid, fwId)
+
+---
+
+### Load Balancers
+
+#### List Load Balancers
+
+Retrieve a list of load balancers within the data center.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+
+
+Pass the arguments to `ListLoadbalancers`:
+
+ ListLoadbalancers(datacenterId)
+
+---
+
+#### Get a Load Balancer
+
+Retrieves the attributes of a given load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+
+Pass the arguments to `GetLoadbalancer`:
+
+ GetLoadbalancer(datacenterId, loadbalancerId)
+
+---
+
+#### Create a Load Balancer
+
+Creates a load balancer within the VDC. Load balancers can be used for public or private IP traffic.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancer | **yes** | object | A [LoadBalancer object](#load-balancer-resource-object) describing the load balancer to be created. |
+
+Create the `LoadBalancer` resource object:
+
+ var loadbalancer = Loadbalancer{
+ Properties: LoadbalancerProperties{
+ Name: "GO SDK Test",
+ Ip: "10.0.0.1",
+ Dhcp: true,
+ }
+ }
+Pass the object and arguments to `CreateLoadbalancer`:
+
+ CreateLoadbalancer(datacenterId, loadbalancer)
+
+##### Load Balancer Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | The name of the load balancer. |
+| Ip | no | string | IPv4 address of the load balancer. All attached NICs will inherit this IP. |
+| Dhcp | no | bool | Indicates if the load balancer will reserve an IP using DHCP. |
+| Balancednics | no | list | List of NIC IDs taking part in load-balancing. All balanced NICs inherit the IP of the load balancer. |
+
+---
+
+#### Update a Load Balancer
+
+Perform updates to attributes of a load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| Name | no | string | The name of the load balancer. |
+| Ip | no | string | The IP of the load balancer. |
+| Dhcp | no | bool | Indicates if the load balancer will reserve an IP using DHCP. |
+
+Pass the arguments to `PatchLoadbalancer`:
+
+ var obj = LoadbalancerProperties{Name: "GO SDK Test - RENAME"}
+ PatchLoadbalancer(datacenterId, loadbalancerId, obj)
+
+---
+
+#### Delete a Load Balancer
+
+Deletes the specified load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+
+Pass the arguments to `DeleteLoadbalancer`:
+
+ DeleteLoadbalancer(datacenterId, loadbalancerId)
+
+---
+
+#### List Load Balanced NICs
+
+This will retrieve a list of NICs associated with the load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+
+Pass the arguments to `ListBalancedNics`:
+
+ ListBalancedNics(datacenterId, loadbalancerId)
+
+---
+
+#### Get a Load Balanced NIC
+
+Retrieves the attributes of a given load balanced NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+
+Pass the arguments to `GetBalancedNic`:
+
+ GetBalancedNic(datacenterId, loadbalancerId, nicId)
+
+---
+
+#### Associate NIC to a Load Balancer
+
+This will associate a NIC to a load balancer, enabling the NIC to participate in load-balancing.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+Pass the arguments to `add_loadbalanced_nics`:
+
+ AssociateNic(datacenterId, loadbalancerId, nicId)
+
+---
+
+#### Remove a NIC Association
+
+Removes the association of a NIC with a load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| nicId | **yes** | string | The ID of the NIC you are removing from the load balancer. |
+
+Pass the arguments to `DeleteBalancedNic`:
+
+ DeleteBalancedNic(datacenterId, loadbalancerId, nicId)
+
+---
+
+### Requests
+
+Each call to the ProfitBricks Cloud API is assigned a request ID. These operations can be used to get information about the requests that have been submitted and their current status.
+
+#### List Requests
+
+
+ ListRequests()
+
+---
+
+#### Get a Request
+
+Retrieves the attributes of a specific request. This operation shares the same `get_request` method used for getting request status, however the response it determined by the boolean value you pass for *status*. To get details about the request itself, you want to pass a *status* of *False*.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| request_id | **yes** | string | The ID of the request. |
+| status | **yes** | bool | Set to *False* to have the request details returned. |
+
+Pass the arguments to `get_request`:
+
+ response = client.get_request(
+ request_id='UUID',
+ status=False)
+
+---
+
+#### Get a Request Status
+
+Retrieves the status of a request. This operation shares the same `get_request` method used for getting the details of a request, however the response it determined by the boolean value you pass for *status*. To get the request status, you want to pass a *status* of *True*.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| path | **yes** | string | The ID of the request. Retrieved from response header location |
+
+
+Pass the arguments to `get_request`:
+
+ GetRequestStatus(path)
+
+---
+
+### Contract Resources
+
+#### List Contract Resources
+
+Returns information about the resource limits for a particular contract and the current resource usage.
+
+```
+GetContractResources()
+```
+
+---
+
+### Users Management
+These operations are designed to allow you to orchestrate users and resources via the Cloud API. Previously this functionality required use of the DCD (Data Center Designer) web application.
+
+#### List Groups
+This retrieves a full list of all groups.
+
+```
+ListGroups()
+```
+
+
+#### Retrieve a Group
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupId | Yes | string | The ID of the specific group to retrieve. |
+
+```
+GetGroup(groupid)
+```
+
+#### Create a Group
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+|---|---|---|---|
+| group | Group |See [Group Object](#group-resource-object) | Yes |
+
+Build the `Group` resource object:
+
+ var group = Group{
+ Properties: GroupProperties{
+ Name: "GO SDK Test",
+ CreateDataCenter: &TRUE,
+ CreateSnapshot: &TRUE,
+ ReserveIp: &TRUE,
+ AccessActivityLog: &TRUE,
+ },
+ }
+
+Pass the object to `CreateGroup`:
+
+```
+CreateGroup(group Group)
+```
+
+##### Group Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | A name that was given to the group. |
+| CreateDataCenter | no | bool | The group has permission to create virtual data centers. |
+| CreateSnapshot | no | bool | The group has permission to create snapshots. |
+| ReserveIp | no | bool | The group has permission to reserve IP addresses. |
+| AccessActivityLog | no | bool | The group has permission to access the activity log. |
+
+#### Update a Group
+
+Use this operation to update a group.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupId | **yes** | string | The ID of the specific group to retrieve. |
+| group | Group |See [Group Object](#group-resource-object) | Yes |
+
+```
+UpdateGroup(groupId, group Group)
+```
+
+---
+
+#### Delete a Group
+
+This will remove all objects within the data center and remove the data center object itself.
+Use this operation to delete a single group. Resources that are assigned to the group are NOT deleted, but are no longer accessible to the group members unless the member is a Contract Owner, Admin, or Resource Owner.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupId | **yes** | string | The ID of the specific group to retrieve. |
+
+```
+DeleteGroup(groupId)
+```
+
+---
+
+#### List Shares
+Retrieves a full list of all the resources that are shared through this group and lists the permissions granted to the group members for each shared resource.
+
+```
+ListShares()
+```
+
+#### Retrieve a Share
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group to retrieve. |
+| resourceId | **yes** | string | The ID of the specific resource to retrieve. |
+
+```
+GetShare(groupid, resourceId)
+```
+
+---
+
+#### Add a Share
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group to add a resource too. |
+| resourceId | **yes** | string | The ID of the specific resource to add. |
+| share | **yes** | Share | See [Share Object](#share-resource-object) |
+
+Build the `Share` resource object:
+
+ var share = Share{
+ Properties: ShareProperties{
+ SharePrivilege: true,
+ EditPrivilege: true,
+ },
+ }
+
+Pass the object to `AddShare`:
+
+```
+AddShare(share Share, groupid, resourceId)
+```
+
+##### Share Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| EditPrivilege | no | bool | The group has permission to edit privileges on this resource. |
+| SharePrivilege | no | bool | The group has permission to share this resource. |
+
+---
+
+#### Update a Share
+
+Use this to update the permissions that a group has for a specific resource share.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group to add a resource too. |
+| resourceId | **yes** | string | The ID of the specific resource to add. |
+| share | **yes** | Share | See [Share Object](#share-resource-object) |
+
+```
+UpdateShare(groupid, resourceId, obj)
+```
+
+
+#### Delete a Share
+
+This will remove all objects within the data center and remove the data center object itself.
+Use this operation to delete a single group. Resources that are assigned to the group are NOT deleted, but are no longer accessible to the group members unless the member is a Contract Owner, Admin, or Resource Owner.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupid | **yes** | string | The ID of the specific group containing the resource to delete. |
+| resourceId | **yes** | string | The ID of the specific resource to delete. |
+
+```
+DeleteShare(groupid, resourceId)
+```
+
+---
+
+#### List Users in a Group
+Retrieves a full list of all the users that are members of a particular group.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupid | **yes** | string | The ID of the specific group to retrieve a user list for. |
+
+```
+ListGroupUsers(groupid)
+```
+
+---
+
+
+#### Add User to Group
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group you want to add a user to. |
+| userid | **yes** | string | The ID of the specific user to add to the group. |
+
+
+```
+AddUserToGroup(groupid, userid)
+```
+
+---
+
+#### Remove User from a Group
+
+Use this operation to remove a user from a group.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupid | **yes** | string | The ID of the specific group you want to remove a user from. |
+| userid | **yes** | string | The ID of the specific user to remove from the group. |
+
+```
+DeleteUserFromGroup(groupid, userid)
+```
+
+---
+
+#### List Users
+Retrieve a list of all the users that have been created under a contract.
+
+```
+ListUsers()
+```
+
+---
+
+#### Retrieve a User
+Retrieve details about a specific user including what groups and resources the user is associated with.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| userid | **yes** | string | The ID of the specific user to retrieve information about. |
+
+```
+GetUser(userid)
+```
+
+---
+
+#### Create a User
+Creates a new user under a particular contract.
+
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| user | **yes** | User | See [User Object](#user-resource-object) |
+
+Build the `User` resource object:
+
+ var user = User{
+ Properties: &UserProperties{
+ Firstname: "John",
+ Lastname: "Doe",
+ Email: email,
+ Password: "abc123-321CBA",
+ Administrator: false,
+ ForceSecAuth: false,
+ SecAuthActive: false,
+ },
+ }
+
+Pass the object to `CreateUser`:
+
+```
+CreateUser(user User)
+```
+
+##### User Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Firstname | **yes** | bool | The first name of the user. |
+| Lastname | **yes** | bool | The last name of the user. |
+| Email | **yes** | bool | The e-mail address of the user. |
+| Password | **yes** | bool | A password for the user. |
+| Administrator | no | bool | Indicates if the user has administrative rights. |
+| ForceSecAuth | no | bool | Indicates if secure (two-factor) authentication was enabled for the user. |
+| SecAuthActive | no | bool | Indicates if secure (two-factor) authentication is enabled for the user. |
+
+---
+
+#### Update a User
+
+Update details about a specific user including their privileges.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| userid | **Yes** | string | The ID of the specific user to update. |
+
+
+```
+user := UserProperties{
+ Firstname: "go sdk ",
+ Lastname: newName,
+ Email: "test@go.com",
+ Password: "abc123-321CBA",
+ Administrator: false,
+ ForceSecAuth: false,
+ SecAuthActive: false,
+ }
+UpdateUser(userid, user)
+```
+
+---
+
+#### Delete a User
+
+Blacklists the user, disabling them. The user is not completely purged, therefore if you anticipate needing to create a user with the same name in the future, we suggest renaming the user before you delete it.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| userid | **Yes** | string | The ID of the specific user to update. |
+
+```
+DeleteUser(userid)
+```
+
+---
+
+#### List Resources
+Retrieves a list of all resources and optionally their group associations.
+
+*Note*: This API call can take a significant amount of time to return when there are a large number of provisioned resources. You may wish to consult the next section on how to list resources of a particular type.
+
+```
+ListResources()
+```
+
+---
+
+#### List All Resources of a Type
+Lists all shareable resources of a specific type. Optionally include their association with groups, permissions that a group has for the resource, and users that are members of the group. Because you are scoping your request to a specific resource type, this API will likely return faster than querying `/um/resources`.
+
+
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| resourcetype | **Yes** | string | The specific type of resources to retrieve information about. |
+
+The values available for resourcetype are listed in this table:
+
+| Resource Type | Description |
+|---|---|
+| datacenter | A virtual data center. |
+| image | A private image that has been uploaded to ProfitBricks. |
+| snapshot | A snapshot of a storage volume. |
+| ipblock | An IP block that has been reserved. |
+
+```
+ListResourcesByType(resourcetype)
+```
+
+---
+
+#### List a specific Resource Type
+
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| resourcetype | **Yes** | string | The specific type of resources to retrieve information about. |
+| resourceId | **Yes** | string | The ID of the specific resource to retrieve information about. |
+
+The values available for resourcetype are listed in this table:
+
+| Resource Type | Description |
+|---|---|
+| datacenter | A virtual data center. |
+| image | A private image that has been uploaded to ProfitBricks. |
+| snapshot | A snapshot of a storage volume. |
+| ipblock | An IP block that has been reserved. |
+
+```
+GetResourceByType(resourcetype, resourceId)
+```
+
+---
+
+## Example
+
+```go
+package main
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/profitbricks/profitbricks-sdk-go"
+)
+
+func main() {
+
+ //Sets username and password
+ profitbricks.SetAuth("username", "password")
+ //Sets depth.
+ profitbricks.SetDepth("5")
+
+ dcrequest := profitbricks.Datacenter{
+ Properties: profitbricks.DatacenterProperties{
+ Name: "example.go3",
+ Description: "description",
+ Location: "us/lasdev",
+ },
+ }
+
+ datacenter := profitbricks.CreateDatacenter(dcrequest)
+
+ serverrequest := profitbricks.Server{
+ Properties: profitbricks.ServerProperties{
+ Name: "go01",
+ Ram: 1024,
+ Cores: 2,
+ },
+ }
+ server := profitbricks.CreateServer(datacenter.Id, serverrequest)
+
+ volumerequest := profitbricks.Volume{
+ Properties: profitbricks.VolumeProperties{
+ Size: 1,
+ Name: "Volume Test",
+ LicenceType: "LINUX",
+ Type: "HDD",
+ },
+ }
+
+ storage := profitbricks.CreateVolume(datacenter.Id, volumerequest)
+
+ serverupdaterequest := profitbricks.ServerProperties{
+ Name: "go01renamed",
+ Cores: 1,
+ Ram: 256,
+ }
+
+ profitbricks.PatchServer(datacenter.Id, server.Id, serverupdaterequest)
+ //It takes a moment for a volume to be provisioned so we wait.
+ time.Sleep(60 * time.Second)
+
+ profitbricks.AttachVolume(datacenter.Id, server.Id, storage.Id)
+
+ volumes := profitbricks.ListVolumes(datacenter.Id)
+ fmt.Println(volumes.Items)
+ servers := profitbricks.ListServers(datacenter.Id)
+ fmt.Println(servers.Items)
+ datacenters := profitbricks.ListDatacenters()
+ fmt.Println(datacenters.Items)
+
+ profitbricks.DeleteServer(datacenter.Id, server.Id)
+ profitbricks.DeleteDatacenter(datacenter.Id)
+}
+```
+
+# Support
+You are welcome to contact us with questions or comments at [ProfitBricks DevOps Central](https://devops.profitbricks.com/). Please report any issues via [GitHub's issue tracker](https://github.com/profitbricks/profitbricks-sdk-go/issues).
+
+## Testing
+
+You can run all test by using the command `go test -timeout=120m` or run a single test by specifying the name of the test file `go test servers_test.go`
+
+## Contributing
+
+1. Fork it ( https://github.com/profitbricks/profitbricks-sdk-go/fork )
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create a new Pull Request
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go
index 567108951..368a111a0 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go
@@ -1,7 +1,7 @@
package profitbricks
-// Endpoint is the base url for REST requests .
-var Endpoint = "https://api.profitbricks.com/rest/v2"
+// Endpoint is the base url for REST requests.
+var Endpoint = "https://api.profitbricks.com/cloudapi/v4"
// Username for authentication .
var Username string
@@ -11,7 +11,9 @@ var Passwd string
// SetEndpoint is used to set the REST Endpoint. Endpoint is declared in config.go
func SetEndpoint(newendpoint string) string {
- Endpoint = newendpoint
+ if newendpoint != "" {
+ Endpoint = newendpoint
+ }
return Endpoint
}
@@ -21,3 +23,7 @@ func SetAuth(u, p string) {
Username = u
Passwd = p
}
+
+func SetUserAgent(userAgent string) {
+ AgentHeader = userAgent
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go
new file mode 100644
index 000000000..cd4fa2c3c
--- /dev/null
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go
@@ -0,0 +1,60 @@
+package profitbricks
+
+import (
+ "encoding/json"
+ "net/http"
+ "strconv"
+)
+
+type ContractResources struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Properties ContractResourcesProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type ContractResourcesProperties struct {
+ PBContractNumber string `json:"PB-Contract-Number,omitempty"`
+ Owner string `json:"owner,omitempty"`
+ Status string `json:"status,omitempty"`
+ ResourceLimits *ResourcesLimits `json:"resourceLimits,omitempty"`
+}
+
+type ResourcesLimits struct {
+ CoresPerServer int32 `json:"coresPerServer,omitempty"`
+ CoresPerContract int32 `json:"coresPerContract,omitempty"`
+ CoresProvisioned int32 `json:"coresProvisioned,omitempty"`
+ RamPerServer int32 `json:"ramPerServer,omitempty"`
+ RamPerContract int32 `json:"ramPerContract,omitempty"`
+ RamProvisioned int32 `json:"ramProvisioned,omitempty"`
+ HddLimitPerVolume int64 `json:"hddLimitPerVolume,omitempty"`
+ HddLimitPerContract int64 `json:"hddLimitPerContract,omitempty"`
+ HddVolumeProvisioned int64 `json:"hddVolumeProvisioned,omitempty"`
+ SsdLimitPerVolume int64 `json:"ssdLimitPerVolume,omitempty"`
+ SsdLimitPerContract int64 `json:"ssdLimitPerContract,omitempty"`
+ SsdVolumeProvisioned int64 `json:"ssdVolumeProvisioned,omitempty"`
+ ReservableIps int32 `json:"reservableIps,omitempty"`
+ ReservedIpsOnContract int32 `json:"reservedIpsOnContract,omitempty"`
+ ReservedIpsInUse int32 `json:"reservedIpsInUse,omitempty"`
+}
+
+func GetContractResources() ContractResources {
+ path := contract_resource_path()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toContractResources(resp)
+}
+
+func toContractResources(resp Resp) ContractResources {
+ var col ContractResources
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go
index eb3d9094f..1bdf22d60 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go
@@ -8,18 +8,18 @@ import (
)
type Datacenter struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties DatacenterProperties `json:"properties,omitempty"`
- Entities DatacenterEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties DatacenterProperties `json:"properties,omitempty"`
+ Entities DatacenterEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
-type DatacenterElementMetadata struct {
+type Metadata struct {
CreatedDate time.Time `json:"createdDate,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Etag string `json:"etag,omitempty"`
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go
index 11cae62a5..1d5ef4ec4 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go
@@ -7,26 +7,26 @@ import (
)
type FirewallRule struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties FirewallruleProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties FirewallruleProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type FirewallruleProperties struct {
- Name string `json:"name,omitempty"`
- Protocol string `json:"protocol,omitempty"`
- SourceMac string `json:"sourceMac,omitempty"`
- SourceIp string `json:"sourceIp,omitempty"`
- TargetIp string `json:"targetIp,omitempty"`
- IcmpCode int `json:"icmpCode,omitempty"`
- IcmpType int `json:"icmpType,omitempty"`
- PortRangeStart int `json:"portRangeStart,omitempty"`
- PortRangeEnd int `json:"portRangeEnd,omitempty"`
+ Name string `json:"name,omitempty"`
+ Protocol string `json:"protocol,omitempty"`
+ SourceMac *string `json:"sourceMac,omitempty"`
+ SourceIp *string `json:"sourceIp,omitempty"`
+ TargetIp *string `json:"targetIp,omitempty"`
+ IcmpCode *int `json:"icmpCode,omitempty"`
+ IcmpType *int `json:"icmpType,omitempty"`
+ PortRangeStart *int `json:"portRangeStart,omitempty"`
+ PortRangeEnd *int `json:"portRangeEnd,omitempty"`
}
type FirewallRules struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go
index 95ec9e25a..fa2ba2140 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go
@@ -6,14 +6,14 @@ import (
)
type Image struct {
- Id string `json:"id,omitempty"`
- Type string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties ImageProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties ImageProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type ImageProperties struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go
index 1b78262bb..e6be130e2 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go
@@ -7,17 +7,18 @@ import (
)
type IpBlock struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties IpBlockProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties IpBlockProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type IpBlockProperties struct {
+ Name string `json:"name,omitempty"`
Ips []string `json:"ips,omitempty"`
Location string `json:"location,omitempty"`
Size int `json:"size,omitempty"`
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go
index 2b7f85ed4..e855d80d6 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go
@@ -6,27 +6,50 @@ import (
"net/http"
)
-type Lan struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties LanProperties `json:"properties,omitempty"`
- Entities *LanEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+type CreateLanRequest struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties CreateLanProperties `json:"properties,omitempty"`
+ Entities *LanEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
-type LanProperties struct {
+type CreateLanProperties struct {
Name string `json:"name,omitempty"`
Public bool `json:"public,omitempty"`
}
+type Lan struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties LanProperties `json:"properties,omitempty"`
+ Entities *LanEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type LanProperties struct {
+ Name string `json:"name,omitempty"`
+ Public bool `json:"public,omitempty"`
+ IpFailover []IpFailover `json:"ipFailover"`
+}
+
type LanEntities struct {
Nics *LanNics `json:"nics,omitempty"`
}
+type IpFailover struct {
+ NicUuid string `json:"nicUuid,omitempty"`
+ Ip string `json:"ip,omitempty"`
+}
+
type LanNics struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
@@ -55,7 +78,7 @@ func ListLans(dcid string) Lans {
// CreateLan creates a lan in the datacenter
// from a jason []byte and returns a Instance struct
-func CreateLan(dcid string, request Lan) Lan {
+func CreateLan(dcid string, request CreateLanRequest) Lan {
obj, _ := json.Marshal(request)
path := lan_col_path(dcid)
url := mk_url(path)
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go
index 2a5b3389f..8d2f71ba6 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go
@@ -7,15 +7,15 @@ import (
)
type Loadbalancer struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties LoadbalancerProperties `json:"properties,omitempty"`
- Entities LoadbalancerEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties LoadbalancerProperties `json:"properties,omitempty"`
+ Entities LoadbalancerEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type LoadbalancerProperties struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go
index 279429464..c62f6e7cc 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go
@@ -6,14 +6,14 @@ import (
)
type Location struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties Properties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata Metadata `json:"metadata,omitempty"`
+ Properties LocationProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type Locations struct {
@@ -26,8 +26,10 @@ type Locations struct {
StatusCode int `json:"headers,omitempty"`
}
-type Properties struct {
- Name string `json:"name,omitempty"`
+type LocationProperties struct {
+ Name string `json:"name,omitempty"`
+ Features []string `json:"features,omitempty"`
+ ImageAliases []string `json:"imageAliases,omitempty"`
}
// ListLocations returns location collection data
@@ -38,6 +40,14 @@ func ListLocations() Locations {
return toLocations(do(req))
}
+// GetRegionalLocations returns a list of available locations in a specific region
+func GetRegionalLocations(regid string) Locations {
+ url := mk_url(location_reg_path(regid)) + `?depth=` + Depth
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toLocations(do(req))
+}
+
// GetLocation returns location data
func GetLocation(locid string) Location {
url := mk_url(location_path(locid)) + `?depth=` + Depth
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go
index 74764f56b..3c0a0225c 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go
@@ -7,24 +7,25 @@ import (
)
type Nic struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties NicProperties `json:"properties,omitempty"`
- Entities *NicEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties *NicProperties `json:"properties,omitempty"`
+ Entities *NicEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type NicProperties struct {
Name string `json:"name,omitempty"`
Mac string `json:"mac,omitempty"`
Ips []string `json:"ips,omitempty"`
- Dhcp bool `json:"dhcp,omitempty"`
+ Dhcp bool `json:"dhcp"`
Lan int `json:"lan,omitempty"`
FirewallActive bool `json:"firewallActive,omitempty"`
+ Nat bool `json:"nat,omitempty"`
}
type NicEntities struct {
@@ -56,8 +57,8 @@ func ListNics(dcid, srvid string) Nics {
// CreateNic creates a nic on a server
// from a jason []byte and returns a Instance struct
-func CreateNic(dcid string, srvid string, request Nic) Nic {
- obj, _ := json.Marshal(request)
+func CreateNic(dcid string, srvid string, nic Nic) Nic {
+ obj, _ := json.Marshal(nic)
path := nic_col_path(dcid, srvid)
url := mk_url(path) + `?depth=` + Depth
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go
index 3b3c7f50d..f85f793aa 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go
@@ -45,19 +45,9 @@ func location_path(locid string) string {
return location_col_path() + slash(locid)
}
-// request_col_path returns the string "/requests"
-func request_col_path() string {
- return slash("requests")
-}
-
-// request_path returns the string "/requests/"
-func request_path(requestid string) string {
- return request_col_path() + slash(requestid)
-}
-
-// request_status_path returns the string "/requests/status"
-func request_status_path(requestid string) string {
- return request_path(requestid) + slash("status")
+// location_path returns the string "/locations/"
+func location_reg_path(regid string) string {
+ return location_col_path() + slash(regid)
}
// snapshot_col_path returns the string "/snapshots"
@@ -65,11 +55,6 @@ func snapshot_col_path() string {
return slash("snapshots")
}
-// snapshot_path returns the string "/snapshots/"
-func snapshot_path(snapid string) string {
- return snapshot_col_path() + slash(snapid)
-}
-
// lan_col_path returns the string "/datacenters//lans"
func lan_col_path(dcid string) string {
return dc_path(dcid) + slash("lans")
@@ -115,12 +100,6 @@ func volume_path(dcid, volid string) string {
return volume_col_path(dcid) + slash(volid)
}
-// lan_nic_col_path returns the string /datacenters//lans//nics
-func lan_nic_col(dcid, lanid string) string {
- return lan_path(dcid, lanid) + slash("nics")
-
-}
-
// balnic_col_path returns the string "/loadbalancers//balancednics"
func balnic_col_path(dcid, lbalid string) string {
return lbal_path(dcid, lbalid) + slash("balancednics")
@@ -171,3 +150,67 @@ func fwrule_col_path(dcid, srvid, nicid string) string {
func fwrule_path(dcid, srvid, nicid, fwruleid string) string {
return fwrule_col_path(dcid, srvid, nicid) + slash(fwruleid)
}
+
+// contract_resource_path returns the string "/contracts"
+func contract_resource_path() string {
+ return slash("contracts")
+}
+
+func um() string {
+ return slash("um")
+}
+
+// um_groups returns the string "/groups"
+func um_groups() string {
+ return um() + slash("groups")
+}
+
+// um_group_path returns the string "/groups/groupid"
+func um_group_path(grpid string) string {
+ return um_groups() + slash(grpid)
+}
+
+// um_group_shares returns the string "groups/{groupId}/shares"
+func um_group_shares(grpid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("shares")
+}
+
+// um_group_share_path returns the string "groups/{groupId}/shares/{resourceId}"
+func um_group_share_path(grpid string, resourceid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("shares") + slash(resourceid)
+}
+
+// um_group_users returns the string "/groups/groupid/users"
+func um_group_users(grpid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("users")
+}
+
+// um_group_users_path returns the string "/groups/groupid/users/userid"
+func um_group_users_path(grpid string, usrid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("users") + slash(usrid)
+}
+
+// um_users returns the string "/users"
+func um_users() string {
+ return um() + slash("users")
+}
+
+// um_users returns the string "/users/usrid"
+func um_users_path(usrid string) string {
+ return um() + slash("users") + slash(usrid)
+}
+
+// um_resources returns the string "/resources"
+func um_resources() string {
+ return um() + slash("resources")
+}
+
+// um_resources_type returns the string "/resources/resourceType"
+func um_resources_type(restype string) string {
+ return um() + slash("resources") + slash(restype)
+}
+
+// um_resources_type_path returns the string "resources/{resourceType}/{resourceId}"
+func um_resources_type_path(restype string, resourceid string) string {
+ return um() + slash("resources") + slash(restype) + slash(resourceid)
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go
index b5f21c17d..893b23ca5 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go
@@ -9,15 +9,18 @@ import (
)
//FullHeader is the standard header to include with all http requests except is_patch and is_command
-const FullHeader = "application/vnd.profitbricks.resource+json"
+const FullHeader = "application/json"
+
+var AgentHeader = "profitbricks-sdk-go/3.0.1"
//PatchHeader is used with is_patch .
-const PatchHeader = "application/vnd.profitbricks.partial-properties+json"
+const PatchHeader = "application/json"
//CommandHeader is used with is_command
const CommandHeader = "application/x-www-form-urlencoded"
var Depth = "5"
+var Pretty = true
// SetDepth is used to set Depth
func SetDepth(newdepth string) string {
@@ -25,6 +28,12 @@ func SetDepth(newdepth string) string {
return Depth
}
+// SetDepth is used to set Depth
+func SetPretty(pretty bool) bool {
+ Pretty = pretty
+ return Pretty
+}
+
// mk_url either:
// returns the path (if it`s a full url)
// or
@@ -32,7 +41,8 @@ func SetDepth(newdepth string) string {
func mk_url(path string) string {
if strings.HasPrefix(path, "http") {
//REMOVE AFTER TESTING
- path := strings.Replace(path, "https://api.profitbricks.com/rest/v2", Endpoint, 1)
+ //FIXME @jasmin Is this still relevant?
+ path := strings.Replace(path, "https://api.profitbricks.com/cloudapi/v3", Endpoint, 1)
// END REMOVE
return path
}
@@ -48,6 +58,7 @@ func mk_url(path string) string {
func do(req *http.Request) Resp {
client := &http.Client{}
req.SetBasicAuth(Username, Passwd)
+ req.Header.Add("User-Agent", AgentHeader)
resp, err := client.Do(req)
if err != nil {
panic(err)
@@ -67,6 +78,7 @@ func is_delete(path string) Resp {
url := mk_url(path)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Content-Type", FullHeader)
+ req.Header.Add("User-Agent", AgentHeader)
return do(req)
}
@@ -76,5 +88,6 @@ func is_command(path string, jason string) Resp {
body := json.RawMessage(jason)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(body))
req.Header.Add("Content-Type", CommandHeader)
+ req.Header.Add("User-Agent", AgentHeader)
return do(req)
}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go
index 023ae1a4a..6ce284d37 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go
@@ -3,6 +3,7 @@ package profitbricks
import (
"encoding/json"
"net/http"
+ "time"
)
type RequestStatus struct {
@@ -26,6 +27,55 @@ type RequestTarget struct {
Status string `json:"status,omitempty"`
}
+type Requests struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Request `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Request struct {
+ ID string `json:"id"`
+ Type string `json:"type"`
+ Href string `json:"href"`
+ Metadata struct {
+ CreatedDate time.Time `json:"createdDate"`
+ CreatedBy string `json:"createdBy"`
+ Etag string `json:"etag"`
+ RequestStatus struct {
+ ID string `json:"id"`
+ Type string `json:"type"`
+ Href string `json:"href"`
+ } `json:"requestStatus"`
+ } `json:"metadata"`
+ Properties struct {
+ Method string `json:"method"`
+ Headers interface{} `json:"headers"`
+ Body interface{} `json:"body"`
+ URL string `json:"url"`
+ } `json:"properties"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+func ListRequests() Requests {
+ url := mk_url("/requests") + `?depth=` + Depth
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toRequests(do(req))
+}
+
+func GetRequest(req_id string) Request {
+ url := mk_url("/requests/"+req_id) + `?depth=` + Depth
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toRequest(do(req))
+}
+
func GetRequestStatus(path string) RequestStatus {
url := mk_url(path) + `?depth=` + Depth
req, _ := http.NewRequest("GET", url, nil)
@@ -41,3 +91,21 @@ func toRequestStatus(resp Resp) RequestStatus {
server.StatusCode = resp.StatusCode
return server
}
+
+func toRequests(resp Resp) Requests {
+ var server Requests
+ json.Unmarshal(resp.Body, &server)
+ server.Response = string(resp.Body)
+ server.Headers = &resp.Headers
+ server.StatusCode = resp.StatusCode
+ return server
+}
+
+func toRequest(resp Resp) Request {
+ var server Request
+ json.Unmarshal(resp.Body, &server)
+ server.Response = string(resp.Body)
+ server.Headers = &resp.Headers
+ server.StatusCode = resp.StatusCode
+ return server
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go
index 12d68e0d2..b0449db37 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go
@@ -15,13 +15,6 @@ func MkJson(i interface{}) string {
return string(jason)
}
-// MetaData is a map for metadata returned in a Resp.Body
-type StringMap map[string]string
-
-type StringIfaceMap map[string]interface{}
-
-type StringCollectionMap map[string]Collection
-
// Resp is the struct returned by all Rest request functions
type Resp struct {
Req *http.Request
@@ -37,25 +30,3 @@ func (r *Resp) PrintHeaders() {
}
}
-
-type Id_Type_Href struct {
- Id string `json:"id"`
- Type string `json:"type"`
- Href string `json:"href"`
-}
-
-type MetaData StringIfaceMap
-
-type Instance struct {
- Id_Type_Href
- MetaData StringMap `json:"metaData,omitempty"`
- Properties StringIfaceMap `json:"properties,omitempty"`
- Entities StringCollectionMap `json:"entities,omitempty"`
- Resp Resp `json:"-"`
-}
-
-type Collection struct {
- Id_Type_Href
- Items []Instance `json:"items,omitempty"`
- Resp Resp `json:"-"`
-}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go
index 256d57985..d876a0efd 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go
@@ -3,20 +3,19 @@ package profitbricks
import (
"bytes"
"encoding/json"
- "fmt"
"net/http"
)
type Server struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties ServerProperties `json:"properties,omitempty"`
- Entities *ServerEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties ServerProperties `json:"properties,omitempty"`
+ Entities *ServerEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type ServerProperties struct {
@@ -81,7 +80,6 @@ func GetServer(dcid, srvid string) Server {
path := server_path(dcid, srvid)
url := mk_url(path) + `?depth=` + Depth
req, _ := http.NewRequest("GET", url, nil)
- fmt.Println(path)
req.Header.Add("Content-Type", FullHeader)
return toServer(do(req))
}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go
index a5f54c04f..225414be3 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go
@@ -7,14 +7,14 @@ import (
)
type Snapshot struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties SnapshotProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata Metadata `json:"metadata,omitempty"`
+ Properties SnapshotProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type SnapshotProperties struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go
index 35df1f929..c3a26137a 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go
@@ -2,9 +2,48 @@ package profitbricks
import (
"fmt"
+ "os"
+ "strings"
"time"
)
+func mkVolume(dcID string) string {
+
+ var request = Volume{
+ Properties: VolumeProperties{
+ Size: 2,
+ Name: "Volume Test",
+ Type: "HDD",
+ ImagePassword: "test1234",
+ ImageAlias: "ubuntu:latest",
+ },
+ }
+
+ resp := CreateVolume(dcID, request)
+ waitTillProvisioned(resp.Headers.Get("Location"))
+ return resp.Id
+}
+
+func mkipid(name string) string {
+ var obj = IpBlock{
+ Properties: IpBlockProperties{
+ Name: "GO SDK Test",
+ Size: 1,
+ Location: "us/las",
+ },
+ }
+
+ resp := ReserveIpBlock(obj)
+ return resp.Id
+}
+
+func mksnapshotId(name string, dcId string) string {
+ svolumeId := mkVolume(dcId)
+ resp := CreateSnapshot(dcId, svolumeId, name, "description")
+ waitTillProvisioned(resp.Headers.Get("Location"))
+ return resp.Id
+}
+
func mkdcid(name string) string {
request := Datacenter{
Properties: DatacenterProperties{
@@ -14,11 +53,6 @@ func mkdcid(name string) string {
},
}
dc := CreateDatacenter(request)
- fmt.Println("===========================")
- fmt.Println("Created a DC " + name)
- fmt.Println("Created a DC id " + dc.Id)
- fmt.Println(dc.StatusCode)
- fmt.Println("===========================")
return dc.Id
}
@@ -31,42 +65,82 @@ func mksrvid(srv_dcid string) string {
},
}
srv := CreateServer(srv_dcid, req)
- fmt.Println("===========================")
- fmt.Println("Created a server " + srv.Id)
- fmt.Println(srv.StatusCode)
- fmt.Println("===========================")
-
waitTillProvisioned(srv.Headers.Get("Location"))
return srv.Id
}
func mknic(lbal_dcid, serverid string) string {
var request = Nic{
- Properties: NicProperties{
- Name: "GO SDK Original Nic",
- Lan: 1,
+ Properties: &NicProperties{
+ Lan: 1,
+ Name: "GO SDK Test",
+ Nat: false,
+ Dhcp: true,
+ FirewallActive: true,
+ Ips: []string{"10.0.0.1"},
},
}
resp := CreateNic(lbal_dcid, serverid, request)
- fmt.Println("===========================")
- fmt.Println("created a nic at server " + serverid)
+ waitTillProvisioned(resp.Headers.Get("Location"))
+ return resp.Id
+}
- fmt.Println("created a nic with id " + resp.Id)
- fmt.Println(resp.StatusCode)
- fmt.Println("===========================")
+func mknic_custom(lbal_dcid, serverid string, lanid int, ips []string) string {
+ var request = Nic{
+ Properties: &NicProperties{
+ Lan: lanid,
+ Name: "GO SDK Test",
+ Nat: false,
+ Dhcp: true,
+ FirewallActive: true,
+ Ips: ips,
+ },
+ }
+
+ resp := CreateNic(lbal_dcid, serverid, request)
+ waitTillProvisioned(resp.Headers.Get("Location"))
return resp.Id
}
func waitTillProvisioned(path string) {
- waitCount := 20
- fmt.Println(path)
+ waitCount := 120
for i := 0; i < waitCount; i++ {
request := GetRequestStatus(path)
if request.Metadata.Status == "DONE" {
break
}
- time.Sleep(10 * time.Second)
+ time.Sleep(1 * time.Second)
i++
}
}
+
+func getImageId(location string, imageName string, imageType string) string {
+ if imageName == "" {
+ return ""
+ }
+
+ SetAuth(os.Getenv("PROFITBRICKS_USERNAME"), os.Getenv("PROFITBRICKS_PASSWORD"))
+
+ images := ListImages()
+ if images.StatusCode > 299 {
+ fmt.Printf("Error while fetching the list of images %s", images.Response)
+ }
+
+ if len(images.Items) > 0 {
+ for _, i := range images.Items {
+ imgName := ""
+ if i.Properties.Name != "" {
+ imgName = i.Properties.Name
+ }
+
+ if imageType == "SSD" {
+ imageType = "HDD"
+ }
+ if imgName != "" && strings.Contains(strings.ToLower(imgName), strings.ToLower(imageName)) && i.Properties.ImageType == imageType && i.Properties.Location == location && i.Properties.Public == true {
+ return i.Id
+ }
+ }
+ }
+ return ""
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go
new file mode 100644
index 000000000..fe7ef9b7d
--- /dev/null
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go
@@ -0,0 +1,402 @@
+package profitbricks
+
+import (
+ "bytes"
+ "encoding/json"
+ "net/http"
+ "strconv"
+)
+
+type Groups struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Group `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Group struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Properties GroupProperties `json:"properties,omitempty"`
+ Entities *GroupEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type GroupProperties struct {
+ Name string `json:"name,omitempty"`
+ CreateDataCenter *bool `json:"createDataCenter,omitempty"`
+ CreateSnapshot *bool `json:"createSnapshot,omitempty"`
+ ReserveIp *bool `json:"reserveIp,omitempty"`
+ AccessActivityLog *bool `json:"accessActivityLog,omitempty"`
+}
+
+type GroupEntities struct {
+ Users Users `json:"users,omitempty"`
+ Resources Resources `json:"resources,omitempty"`
+}
+
+type Users struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []User `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type User struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties *UserProperties `json:"properties,omitempty"`
+ Entities *UserEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type UserProperties struct {
+ Firstname string `json:"firstname,omitempty"`
+ Lastname string `json:"lastname,omitempty"`
+ Email string `json:"email,omitempty"`
+ Password string `json:"password,omitempty"`
+ Administrator bool `json:"administrator,omitempty"`
+ ForceSecAuth bool `json:"forceSecAuth,omitempty"`
+ SecAuthActive bool `json:"secAuthActive,omitempty"`
+}
+
+type UserEntities struct {
+ Groups Groups `json:"groups,omitempty"`
+ Owns Owns `json:"owns,omitempty"`
+}
+
+type Resources struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Resource `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Resource struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Entities *ResourceEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type ResourceEntities struct {
+ Groups Groups `json:"groups,omitempty"`
+}
+
+type Owns struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Entity `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Entity struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Shares struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Share `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Share struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Properties ShareProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type ShareProperties struct {
+ EditPrivilege *bool `json:"editPrivilege,omitempty"`
+ SharePrivilege *bool `json:"sharePrivilege,omitempty"`
+}
+
+//Group fucntions
+func ListGroups() Groups {
+ path := um_groups()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toGroups(resp)
+}
+
+func GetGroup(groupid string) Group {
+ path := um_group_path(groupid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toGroup(do(req))
+}
+
+func CreateGroup(grp Group) Group {
+ obj, _ := json.Marshal(grp)
+ path := um_groups()
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toGroup(do(req))
+}
+
+func UpdateGroup(groupid string, obj Group) Group {
+ jason_patch := []byte(MkJson(obj))
+ path := um_group_path(groupid)
+ url := mk_url(path) + `?depth=` + Depth
+ req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jason_patch))
+ req.Header.Add("Content-Type", PatchHeader)
+ return toGroup(do(req))
+}
+
+func DeleteGroup(groupid string) Resp {
+ path := um_group_path(groupid)
+ return is_delete(path)
+}
+
+func toGroup(resp Resp) Group {
+ var grp Group
+ json.Unmarshal(resp.Body, &grp)
+ grp.Response = string(resp.Body)
+ grp.Headers = &resp.Headers
+ grp.StatusCode = resp.StatusCode
+ return grp
+}
+
+func toGroups(resp Resp) Groups {
+ var col Groups
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+//Shares functions
+func ListShares(grpid string) Shares {
+ path := um_group_shares(grpid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toShares(resp)
+}
+
+func GetShare(groupid string, resourceid string) Share {
+ path := um_group_share_path(groupid, resourceid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toShare(do(req))
+}
+
+func AddShare(share Share, groupid string, resourceid string) Share {
+ obj, _ := json.Marshal(share)
+ path := um_group_share_path(groupid, resourceid)
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toShare(do(req))
+}
+
+func UpdateShare(groupid string, resourceid string, obj Share) Share {
+ jason_patch := []byte(MkJson(obj))
+ path := um_group_share_path(groupid, resourceid)
+ url := mk_url(path) + `?depth=` + Depth
+ req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jason_patch))
+ req.Header.Add("Content-Type", PatchHeader)
+ return toShare(do(req))
+}
+
+func DeleteShare(groupid string, resourceid string) Resp {
+ path := um_group_share_path(groupid, resourceid)
+ return is_delete(path)
+}
+
+func toShare(resp Resp) Share {
+ var shr Share
+ json.Unmarshal(resp.Body, &shr)
+ shr.Response = string(resp.Body)
+ shr.Headers = &resp.Headers
+ shr.StatusCode = resp.StatusCode
+ return shr
+}
+
+func toShares(resp Resp) Shares {
+ var col Shares
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+//Users in a group
+func ListGroupUsers(groupid string) Users {
+ path := um_group_users(groupid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toUsers(resp)
+}
+
+func AddUserToGroup(groupid string, userid string) User {
+ var usr User
+ usr.Id = userid
+ obj, _ := json.Marshal(usr)
+ path := um_group_users(groupid)
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toUser(do(req))
+}
+
+func DeleteUserFromGroup(groupid string, userid string) Resp {
+ path := um_group_users_path(groupid, userid)
+ return is_delete(path)
+}
+
+func toUser(resp Resp) User {
+ var usr User
+ json.Unmarshal(resp.Body, &usr)
+ usr.Response = string(resp.Body)
+ usr.Headers = &resp.Headers
+ usr.StatusCode = resp.StatusCode
+ return usr
+}
+
+func toUsers(resp Resp) Users {
+ var col Users
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+//Users
+func ListUsers() Users {
+ path := um_users()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toUsers(resp)
+}
+
+func GetUser(usrid string) User {
+ path := um_users_path(usrid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toUser(do(req))
+}
+
+func CreateUser(usr User) User {
+ obj, _ := json.Marshal(usr)
+ path := um_users()
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toUser(do(req))
+}
+
+func UpdateUser(userid string, obj User) User {
+ jason_patch := []byte(MkJson(obj))
+ path := um_users_path(userid)
+ url := mk_url(path)
+ req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jason_patch))
+ req.Header.Add("Content-Type", PatchHeader)
+ return toUser(do(req))
+}
+
+func DeleteUser(groupid string) Resp {
+ path := um_users_path(groupid)
+ return is_delete(path)
+}
+
+//Resources
+func ListResources() Resources {
+ path := um_resources()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toResources(resp)
+}
+
+func GetResourceByType(resourcetype string, resourceid string) Resource {
+ path := um_resources_type_path(resourcetype, resourceid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toResource(resp)
+}
+
+func ListResourcesByType(resourcetype string) Resources {
+ path := um_resources_type(resourcetype)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toResources(resp)
+}
+
+func toResources(resp Resp) Resources {
+ var col Resources
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+func toResource(resp Resp) Resource {
+ var col Resource
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go
index 2982448d7..ebab8c4ee 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go
@@ -4,24 +4,27 @@ import (
"bytes"
"encoding/json"
"net/http"
+ "net/url"
)
type Volume struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties VolumeProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties VolumeProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type VolumeProperties struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Size int `json:"size,omitempty"`
+ AvailabilityZone string `json:"availabilityZone,omitempty"`
Image string `json:"image,omitempty"`
+ ImageAlias string `json:"imageAlias,omitempty"`
ImagePassword string `json:"imagePassword,omitempty"`
SshKeys []string `json:"sshKeys,omitempty"`
Bus string `json:"bus,omitempty"`
@@ -95,12 +98,14 @@ func DeleteVolume(dcid, volid string) Resp {
return is_delete(path)
}
-func CreateSnapshot(dcid string, volid string, name string) Snapshot {
+func CreateSnapshot(dcid string, volid string, name string, description string) Snapshot {
var path = volume_path(dcid, volid)
path = path + "/create-snapshot"
- url := mk_url(path)
- body := json.RawMessage("name=" + name)
- req, _ := http.NewRequest("POST", url, bytes.NewBuffer(body))
+ req_url := mk_url(path)
+ data := url.Values{}
+ data.Set("name", name)
+ data.Add("description", description)
+ req, _ := http.NewRequest("POST", req_url, bytes.NewBufferString(data.Encode()))
req.Header.Add("Content-Type", CommandHeader)
return toSnapshot(do(req))
}
diff --git a/vendor/github.com/satori/go.uuid/LICENSE b/vendor/github.com/satori/go.uuid/LICENSE
index 6a1fb910d..488357b8a 100644
--- a/vendor/github.com/satori/go.uuid/LICENSE
+++ b/vendor/github.com/satori/go.uuid/LICENSE
@@ -1,4 +1,4 @@
-Copyright (C) 2013-2015 by Maxim Bublis
+Copyright (C) 2013-2016 by Maxim Bublis
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/vendor/github.com/satori/go.uuid/README.md b/vendor/github.com/satori/go.uuid/README.md
index 48d4937f4..b6aad1c81 100644
--- a/vendor/github.com/satori/go.uuid/README.md
+++ b/vendor/github.com/satori/go.uuid/README.md
@@ -1,6 +1,7 @@
# UUID package for Go language
[![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid)
+[![Coverage Status](https://coveralls.io/repos/github/satori/go.uuid/badge.svg?branch=master)](https://coveralls.io/github/satori/go.uuid)
[![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid)
This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs.
@@ -22,9 +23,7 @@ Use the `go` command:
## Requirements
-UUID package requires any stable version of Go Programming Language.
-
-It is tested against following versions of Go: 1.0-1.5
+UUID package requires Go >= 1.2.
## Example
@@ -60,7 +59,7 @@ func main() {
## Copyright
-Copyright (C) 2013-2015 by Maxim Bublis .
+Copyright (C) 2013-2016 by Maxim Bublis .
UUID package released under MIT License.
See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details.
diff --git a/vendor/github.com/satori/go.uuid/uuid.go b/vendor/github.com/satori/go.uuid/uuid.go
index 03841d86e..295f3fc2c 100644
--- a/vendor/github.com/satori/go.uuid/uuid.go
+++ b/vendor/github.com/satori/go.uuid/uuid.go
@@ -127,6 +127,13 @@ func unixTimeFunc() uint64 {
// described in RFC 4122.
type UUID [16]byte
+// NullUUID can be used with the standard sql package to represent a
+// UUID value that can be NULL in the database
+type NullUUID struct {
+ UUID UUID
+ Valid bool
+}
+
// The nil UUID is special form of UUID that is specified to have all
// 128 bits set to zero.
var Nil = UUID{}
@@ -227,30 +234,48 @@ func (u UUID) MarshalText() (text []byte, err error) {
// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8"
func (u *UUID) UnmarshalText(text []byte) (err error) {
if len(text) < 32 {
- err = fmt.Errorf("uuid: invalid UUID string: %s", text)
+ err = fmt.Errorf("uuid: UUID string too short: %s", text)
return
}
- if bytes.Equal(text[:9], urnPrefix) {
- text = text[9:]
- } else if text[0] == '{' {
- text = text[1:]
+ t := text[:]
+ braced := false
+
+ if bytes.Equal(t[:9], urnPrefix) {
+ t = t[9:]
+ } else if t[0] == '{' {
+ braced = true
+ t = t[1:]
}
b := u[:]
- for _, byteGroup := range byteGroups {
- if text[0] == '-' {
- text = text[1:]
+ for i, byteGroup := range byteGroups {
+ if i > 0 {
+ if t[0] != '-' {
+ err = fmt.Errorf("uuid: invalid string format")
+ return
+ }
+ t = t[1:]
}
- _, err = hex.Decode(b[:byteGroup/2], text[:byteGroup])
+ if len(t) < byteGroup {
+ err = fmt.Errorf("uuid: UUID string too short: %s", text)
+ return
+ }
+ if i == 4 && len(t) > byteGroup &&
+ ((braced && t[byteGroup] != '}') || len(t[byteGroup:]) > 1 || !braced) {
+ err = fmt.Errorf("uuid: UUID string too long: %s", text)
+ return
+ }
+
+ _, err = hex.Decode(b[:byteGroup/2], t[:byteGroup])
if err != nil {
return
}
- text = text[byteGroup:]
+ t = t[byteGroup:]
b = b[byteGroup/2:]
}
@@ -298,6 +323,27 @@ func (u *UUID) Scan(src interface{}) error {
return fmt.Errorf("uuid: cannot convert %T to UUID", src)
}
+// Value implements the driver.Valuer interface.
+func (u NullUUID) Value() (driver.Value, error) {
+ if !u.Valid {
+ return nil, nil
+ }
+ // Delegate to UUID Value function
+ return u.UUID.Value()
+}
+
+// Scan implements the sql.Scanner interface.
+func (u *NullUUID) Scan(src interface{}) error {
+ if src == nil {
+ u.UUID, u.Valid = Nil, false
+ return nil
+ }
+
+ // Delegate to UUID Scan function
+ u.Valid = true
+ return u.UUID.Scan(src)
+}
+
// FromBytes returns UUID converted from raw byte slice input.
// It will return error if the slice isn't 16 bytes long.
func FromBytes(input []byte) (u UUID, err error) {
diff --git a/vendor/github.com/vmware/govmomi/CHANGELOG.md b/vendor/github.com/vmware/govmomi/CHANGELOG.md
new file mode 100644
index 000000000..2dc436bf1
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/CHANGELOG.md
@@ -0,0 +1,263 @@
+# 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.
diff --git a/vendor/github.com/vmware/govmomi/CONTRIBUTING.md b/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
new file mode 100644
index 000000000..f6645cbf4
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
@@ -0,0 +1,101 @@
+# 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.
diff --git a/vendor/github.com/vmware/govmomi/CONTRIBUTORS b/vendor/github.com/vmware/govmomi/CONTRIBUTORS
new file mode 100644
index 000000000..22630d95e
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/CONTRIBUTORS
@@ -0,0 +1,61 @@
+# 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
diff --git a/vendor/github.com/vmware/govmomi/LICENSE.txt b/vendor/github.com/vmware/govmomi/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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.
diff --git a/vendor/github.com/vmware/govmomi/Makefile b/vendor/github.com/vmware/govmomi/Makefile
new file mode 100644
index 000000000..9ffd57516
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/Makefile
@@ -0,0 +1,24 @@
+.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 $$(find . -mindepth 1 -maxdepth 1 -type d -not -name vendor)
+
+test:
+ go test -v $(TEST_OPTS) ./...
+
+install:
+ go install -v github.com/vmware/govmomi/govc
+ go install -v github.com/vmware/govmomi/vcsim
+
+doc: install
+ ./govc/usage.sh > ./govc/USAGE.md
diff --git a/vendor/github.com/vmware/govmomi/README.md b/vendor/github.com/vmware/govmomi/README.md
new file mode 100644
index 000000000..b5978ddb0
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/README.md
@@ -0,0 +1,78 @@
+[![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-6-5/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).
diff --git a/vendor/github.com/vmware/govmomi/client.go b/vendor/github.com/vmware/govmomi/client.go
new file mode 100644
index 000000000..e3dc7976a
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/client.go
@@ -0,0 +1,167 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/find/doc.go b/vendor/github.com/vmware/govmomi/find/doc.go
new file mode 100644
index 000000000..0c8acee01
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/find/doc.go
@@ -0,0 +1,37 @@
+/*
+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
diff --git a/vendor/github.com/vmware/govmomi/find/error.go b/vendor/github.com/vmware/govmomi/find/error.go
new file mode 100644
index 000000000..684526dab
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/find/error.go
@@ -0,0 +1,64 @@
+/*
+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
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/find/finder.go b/vendor/github.com/vmware/govmomi/find/finder.go
new file mode 100644
index 000000000..04d0e891a
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/find/finder.go
@@ -0,0 +1,1021 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/find/recurser.go b/vendor/github.com/vmware/govmomi/find/recurser.go
new file mode 100644
index 000000000..806029568
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/find/recurser.go
@@ -0,0 +1,253 @@
+/*
+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"
+ "strings"
+
+ "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
+ }
+
+ all := parts
+ 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 {
+ matched = strings.HasSuffix(e.Path, path.Join(all...))
+ if matched {
+ // name contains a '/'
+ out = append(out, e)
+ }
+
+ 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
+}
diff --git a/vendor/github.com/vmware/govmomi/list/lister.go b/vendor/github.com/vmware/govmomi/list/lister.go
new file mode 100644
index 000000000..2ee32e6bc
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/list/lister.go
@@ -0,0 +1,563 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/list/path.go b/vendor/github.com/vmware/govmomi/list/path.go
new file mode 100644
index 000000000..f3a106520
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/list/path.go
@@ -0,0 +1,44 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/authorization_manager.go b/vendor/github.com/vmware/govmomi/object/authorization_manager.go
new file mode 100644
index 000000000..b703258fe
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/authorization_manager.go
@@ -0,0 +1,174 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go b/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go
new file mode 100644
index 000000000..4fa520f5a
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go
@@ -0,0 +1,86 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go b/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go
new file mode 100644
index 000000000..225f41b6d
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go
@@ -0,0 +1,86 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/common.go b/vendor/github.com/vmware/govmomi/object/common.go
new file mode 100644
index 000000000..8f0a94ff6
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/common.go
@@ -0,0 +1,120 @@
+/*
+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
+
+ 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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/compute_resource.go b/vendor/github.com/vmware/govmomi/object/compute_resource.go
new file mode 100644
index 000000000..ac1c73019
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/compute_resource.go
@@ -0,0 +1,124 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go b/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go
new file mode 100644
index 000000000..60b78df2b
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go
@@ -0,0 +1,135 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go b/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go
new file mode 100644
index 000000000..cb8b965dc
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go
@@ -0,0 +1,166 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/datacenter.go b/vendor/github.com/vmware/govmomi/object/datacenter.go
new file mode 100644
index 000000000..adddc5ffa
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/datacenter.go
@@ -0,0 +1,90 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/datastore.go b/vendor/github.com/vmware/govmomi/object/datastore.go
new file mode 100644
index 000000000..fc696cdf2
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/datastore.go
@@ -0,0 +1,438 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/datastore_file.go b/vendor/github.com/vmware/govmomi/object/datastore_file.go
new file mode 100644
index 000000000..d4813a756
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/datastore_file.go
@@ -0,0 +1,408 @@
+/*
+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}
+}
diff --git a/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go b/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go
new file mode 100644
index 000000000..7164fbbed
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go
@@ -0,0 +1,145 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/object/datastore_path.go b/vendor/github.com/vmware/govmomi/object/datastore_path.go
new file mode 100644
index 000000000..ea152103d
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/datastore_path.go
@@ -0,0 +1,65 @@
+/*
+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}, " ")
+}
diff --git a/vendor/github.com/vmware/govmomi/object/diagnostic_log.go b/vendor/github.com/vmware/govmomi/object/diagnostic_log.go
new file mode 100644
index 000000000..466d0ee91
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/diagnostic_log.go
@@ -0,0 +1,76 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go b/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go
new file mode 100644
index 000000000..5baf1ad90
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go
@@ -0,0 +1,104 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go b/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go
new file mode 100644
index 000000000..864bb783f
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go
@@ -0,0 +1,73 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go b/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go
new file mode 100644
index 000000000..29ee52d95
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go
@@ -0,0 +1,67 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/extension_manager.go b/vendor/github.com/vmware/govmomi/object/extension_manager.go
new file mode 100644
index 000000000..94ade017c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/extension_manager.go
@@ -0,0 +1,113 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/file_manager.go b/vendor/github.com/vmware/govmomi/object/file_manager.go
new file mode 100644
index 000000000..ba947be20
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/file_manager.go
@@ -0,0 +1,126 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/folder.go b/vendor/github.com/vmware/govmomi/object/folder.go
new file mode 100644
index 000000000..7a69949f9
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/folder.go
@@ -0,0 +1,227 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/history_collector.go b/vendor/github.com/vmware/govmomi/object/history_collector.go
new file mode 100644
index 000000000..afdcab78b
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/history_collector.go
@@ -0,0 +1,72 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_account_manager.go b/vendor/github.com/vmware/govmomi/object/host_account_manager.go
new file mode 100644
index 000000000..640aff860
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_account_manager.go
@@ -0,0 +1,65 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_certificate_info.go b/vendor/github.com/vmware/govmomi/object/host_certificate_info.go
new file mode 100644
index 000000000..52c26a9dd
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_certificate_info.go
@@ -0,0 +1,250 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go b/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go
new file mode 100644
index 000000000..2875a9fc1
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go
@@ -0,0 +1,162 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_config_manager.go b/vendor/github.com/vmware/govmomi/object/host_config_manager.go
new file mode 100644
index 000000000..123227ecc
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_config_manager.go
@@ -0,0 +1,196 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go b/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go
new file mode 100644
index 000000000..b0c9e08a1
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go
@@ -0,0 +1,65 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_datastore_system.go b/vendor/github.com/vmware/govmomi/object/host_datastore_system.go
new file mode 100644
index 000000000..7b738e611
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_datastore_system.go
@@ -0,0 +1,119 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_date_time_system.go b/vendor/github.com/vmware/govmomi/object/host_date_time_system.go
new file mode 100644
index 000000000..7c9203d7b
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_date_time_system.go
@@ -0,0 +1,69 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_firewall_system.go b/vendor/github.com/vmware/govmomi/object/host_firewall_system.go
new file mode 100644
index 000000000..0b1440253
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_firewall_system.go
@@ -0,0 +1,181 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_network_system.go b/vendor/github.com/vmware/govmomi/object/host_network_system.go
new file mode 100644
index 000000000..c21e1ec35
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_network_system.go
@@ -0,0 +1,358 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_service_system.go b/vendor/github.com/vmware/govmomi/object/host_service_system.go
new file mode 100644
index 000000000..a66b32c17
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_service_system.go
@@ -0,0 +1,88 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_storage_system.go b/vendor/github.com/vmware/govmomi/object/host_storage_system.go
new file mode 100644
index 000000000..2a433ff2a
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_storage_system.go
@@ -0,0 +1,145 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_system.go b/vendor/github.com/vmware/govmomi/object/host_system.go
new file mode 100644
index 000000000..a350edfde
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_system.go
@@ -0,0 +1,153 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go b/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go
new file mode 100644
index 000000000..01e7e9cd4
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go
@@ -0,0 +1,93 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go b/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go
new file mode 100644
index 000000000..65e4587f6
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go
@@ -0,0 +1,117 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/host_vsan_system.go b/vendor/github.com/vmware/govmomi/object/host_vsan_system.go
new file mode 100644
index 000000000..5ab234d5e
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/host_vsan_system.go
@@ -0,0 +1,88 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/http_nfc_lease.go b/vendor/github.com/vmware/govmomi/object/http_nfc_lease.go
new file mode 100644
index 000000000..3ca53558b
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/http_nfc_lease.go
@@ -0,0 +1,143 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/object/namespace_manager.go b/vendor/github.com/vmware/govmomi/object/namespace_manager.go
new file mode 100644
index 000000000..f463b368c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/namespace_manager.go
@@ -0,0 +1,76 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/network.go b/vendor/github.com/vmware/govmomi/object/network.go
new file mode 100644
index 000000000..d1dc7ce01
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/network.go
@@ -0,0 +1,56 @@
+/*
+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 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(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) {
+ var e mo.Network
+
+ // Use Network.Name rather than Common.Name as the latter does not return the complete name if it contains a '/'
+ // We can't use Common.ObjectName here either as we need the ManagedEntity.Name field is not set since mo.Network
+ // has its own Name field.
+ err := n.Properties(ctx, n.Reference(), []string{"name"}, &e)
+ if err != nil {
+ return nil, err
+ }
+
+ backing := &types.VirtualEthernetCardNetworkBackingInfo{
+ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{
+ DeviceName: e.Name,
+ },
+ }
+
+ return backing, nil
+}
diff --git a/vendor/github.com/vmware/govmomi/object/network_reference.go b/vendor/github.com/vmware/govmomi/object/network_reference.go
new file mode 100644
index 000000000..7716bdb38
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/network_reference.go
@@ -0,0 +1,31 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/object/opaque_network.go b/vendor/github.com/vmware/govmomi/object/opaque_network.go
new file mode 100644
index 000000000..47ce4cefe
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/opaque_network.go
@@ -0,0 +1,57 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/option_manager.go b/vendor/github.com/vmware/govmomi/object/option_manager.go
new file mode 100644
index 000000000..7f93273aa
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/option_manager.go
@@ -0,0 +1,59 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/ovf_manager.go b/vendor/github.com/vmware/govmomi/object/ovf_manager.go
new file mode 100644
index 000000000..7fedf689f
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/ovf_manager.go
@@ -0,0 +1,104 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/resource_pool.go b/vendor/github.com/vmware/govmomi/object/resource_pool.go
new file mode 100644
index 000000000..791fd3822
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/resource_pool.go
@@ -0,0 +1,137 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/search_index.go b/vendor/github.com/vmware/govmomi/object/search_index.go
new file mode 100644
index 000000000..4b0a525d5
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/search_index.go
@@ -0,0 +1,163 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/storage_pod.go b/vendor/github.com/vmware/govmomi/object/storage_pod.go
new file mode 100644
index 000000000..188b91a00
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/storage_pod.go
@@ -0,0 +1,34 @@
+/*
+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),
+ },
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go b/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go
new file mode 100644
index 000000000..579bcd4d7
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go
@@ -0,0 +1,179 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/task.go b/vendor/github.com/vmware/govmomi/object/task.go
new file mode 100644
index 000000000..8572b4363
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/task.go
@@ -0,0 +1,53 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/object/types.go b/vendor/github.com/vmware/govmomi/object/types.go
new file mode 100644
index 000000000..aefb611fd
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/types.go
@@ -0,0 +1,65 @@
+/*
+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)
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/object/virtual_app.go b/vendor/github.com/vmware/govmomi/object/virtual_app.go
new file mode 100644
index 000000000..4811178f1
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/virtual_app.go
@@ -0,0 +1,105 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/virtual_device_list.go b/vendor/github.com/vmware/govmomi/object/virtual_device_list.go
new file mode 100644
index 000000000..24821aa6b
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/virtual_device_list.go
@@ -0,0 +1,922 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go b/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go
new file mode 100644
index 000000000..b26e2f71c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go
@@ -0,0 +1,170 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go b/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go
new file mode 100644
index 000000000..642cd62f6
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go
@@ -0,0 +1,97 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/virtual_machine.go b/vendor/github.com/vmware/govmomi/object/virtual_machine.go
new file mode 100644
index 000000000..02c4e2371
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/virtual_machine.go
@@ -0,0 +1,759 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go b/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go
new file mode 100644
index 000000000..f6caf9870
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go
@@ -0,0 +1,21 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/property/collector.go b/vendor/github.com/vmware/govmomi/property/collector.go
new file mode 100644
index 000000000..04a9e7737
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/property/collector.go
@@ -0,0 +1,201 @@
+/*
+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-60/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvmodl.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)
+}
diff --git a/vendor/github.com/vmware/govmomi/property/filter.go b/vendor/github.com/vmware/govmomi/property/filter.go
new file mode 100644
index 000000000..8284b0c7d
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/property/filter.go
@@ -0,0 +1,139 @@
+/*
+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"
+ "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:
+ s := match.(string)
+ if s == "*" {
+ return true // TODO: path.Match fails if s contains a '/'
+ }
+ m, _ := path.Match(s, 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
+}
diff --git a/vendor/github.com/vmware/govmomi/property/wait.go b/vendor/github.com/vmware/govmomi/property/wait.go
new file mode 100644
index 000000000..689477bfb
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/property/wait.go
@@ -0,0 +1,153 @@
+/*
+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
+ }
+ }
+ }
+ }
+
+}
diff --git a/vendor/github.com/vmware/govmomi/session/keep_alive.go b/vendor/github.com/vmware/govmomi/session/keep_alive.go
new file mode 100644
index 000000000..a9d4c141c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/session/keep_alive.go
@@ -0,0 +1,127 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/session/manager.go b/vendor/github.com/vmware/govmomi/session/manager.go
new file mode 100644
index 000000000..b4591c1c4
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/session/manager.go
@@ -0,0 +1,201 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/task/error.go b/vendor/github.com/vmware/govmomi/task/error.go
new file mode 100644
index 000000000..5f6b8503f
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/task/error.go
@@ -0,0 +1,32 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/task/wait.go b/vendor/github.com/vmware/govmomi/task/wait.go
new file mode 100644
index 000000000..19fee5384
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/task/wait.go
@@ -0,0 +1,132 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/client.go b/vendor/github.com/vmware/govmomi/vim25/client.go
new file mode 100644
index 000000000..1289f33ef
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/client.go
@@ -0,0 +1,123 @@
+/*
+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"
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/debug/debug.go b/vendor/github.com/vmware/govmomi/vim25/debug/debug.go
new file mode 100644
index 000000000..22d547178
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/debug/debug.go
@@ -0,0 +1,81 @@
+/*
+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()
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/doc.go b/vendor/github.com/vmware/govmomi/vim25/doc.go
new file mode 100644
index 000000000..acb2c9f64
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/doc.go
@@ -0,0 +1,29 @@
+/*
+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
diff --git a/vendor/github.com/vmware/govmomi/vim25/methods/internal.go b/vendor/github.com/vmware/govmomi/vim25/methods/internal.go
new file mode 100644
index 000000000..a79adf3a8
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/methods/internal.go
@@ -0,0 +1,124 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/methods/methods.go b/vendor/github.com/vmware/govmomi/vim25/methods/methods.go
new file mode 100644
index 000000000..0895a81c6
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/methods/methods.go
@@ -0,0 +1,16144 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go b/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go
new file mode 100644
index 000000000..634fbfbd9
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go
@@ -0,0 +1,56 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go b/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go
new file mode 100644
index 000000000..d3da5b184
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go
@@ -0,0 +1,137 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/entity.go b/vendor/github.com/vmware/govmomi/vim25/mo/entity.go
new file mode 100644
index 000000000..193e6f71e
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/entity.go
@@ -0,0 +1,24 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/extra.go b/vendor/github.com/vmware/govmomi/vim25/mo/extra.go
new file mode 100644
index 000000000..254ef3594
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/extra.go
@@ -0,0 +1,61 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/mo.go b/vendor/github.com/vmware/govmomi/vim25/mo/mo.go
new file mode 100644
index 000000000..ede6e44d7
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/mo.go
@@ -0,0 +1,1757 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/reference.go b/vendor/github.com/vmware/govmomi/vim25/mo/reference.go
new file mode 100644
index 000000000..465edbe80
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/reference.go
@@ -0,0 +1,26 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/registry.go b/vendor/github.com/vmware/govmomi/vim25/mo/registry.go
new file mode 100644
index 000000000..deacf508b
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/registry.go
@@ -0,0 +1,21 @@
+/*
+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{}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go b/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go
new file mode 100644
index 000000000..e7ffc32ce
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go
@@ -0,0 +1,174 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go b/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go
new file mode 100644
index 000000000..0c9e5b034
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go
@@ -0,0 +1,247 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go b/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go
new file mode 100644
index 000000000..24cb3d59a
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go
@@ -0,0 +1,73 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/doc.go b/vendor/github.com/vmware/govmomi/vim25/progress/doc.go
new file mode 100644
index 000000000..a0458dd5c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/doc.go
@@ -0,0 +1,32 @@
+/*
+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.
+*/
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go b/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go
new file mode 100644
index 000000000..4f842ad95
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go
@@ -0,0 +1,54 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/reader.go b/vendor/github.com/vmware/govmomi/vim25/progress/reader.go
new file mode 100644
index 000000000..a981cb4e1
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/reader.go
@@ -0,0 +1,177 @@
+/*
+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))
+ }
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/report.go b/vendor/github.com/vmware/govmomi/vim25/progress/report.go
new file mode 100644
index 000000000..bf80263ff
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/report.go
@@ -0,0 +1,26 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/scale.go b/vendor/github.com/vmware/govmomi/vim25/progress/scale.go
new file mode 100644
index 000000000..988083920
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/scale.go
@@ -0,0 +1,76 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go b/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go
new file mode 100644
index 000000000..0bd35a47f
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go
@@ -0,0 +1,33 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/progress/tee.go b/vendor/github.com/vmware/govmomi/vim25/progress/tee.go
new file mode 100644
index 000000000..ab4607842
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/progress/tee.go
@@ -0,0 +1,41 @@
+/*
+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
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/retry.go b/vendor/github.com/vmware/govmomi/vim25/retry.go
new file mode 100644
index 000000000..b8807eef3
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/retry.go
@@ -0,0 +1,105 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/soap/client.go b/vendor/github.com/vmware/govmomi/vim25/soap/client.go
new file mode 100644
index 000000000..520929692
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/soap/client.go
@@ -0,0 +1,741 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/soap/debug.go b/vendor/github.com/vmware/govmomi/vim25/soap/debug.go
new file mode 100644
index 000000000..63518abca
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/soap/debug.go
@@ -0,0 +1,149 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/soap/error.go b/vendor/github.com/vmware/govmomi/vim25/soap/error.go
new file mode 100644
index 000000000..d89208522
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/soap/error.go
@@ -0,0 +1,115 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/soap/soap.go b/vendor/github.com/vmware/govmomi/vim25/soap/soap.go
new file mode 100644
index 000000000..a8baa0122
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/soap/soap.go
@@ -0,0 +1,41 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/base.go b/vendor/github.com/vmware/govmomi/vim25/types/base.go
new file mode 100644
index 000000000..3bb12b741
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/base.go
@@ -0,0 +1,19 @@
+/*
+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{}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/enum.go b/vendor/github.com/vmware/govmomi/vim25/types/enum.go
new file mode 100644
index 000000000..02f7f3cb5
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/enum.go
@@ -0,0 +1,4466 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/fault.go b/vendor/github.com/vmware/govmomi/vim25/types/fault.go
new file mode 100644
index 000000000..c2503fa5c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/fault.go
@@ -0,0 +1,32 @@
+/*
+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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/helpers.go b/vendor/github.com/vmware/govmomi/vim25/types/helpers.go
new file mode 100644
index 000000000..2364ed421
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/helpers.go
@@ -0,0 +1,52 @@
+/*
+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)
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/if.go b/vendor/github.com/vmware/govmomi/vim25/types/if.go
new file mode 100644
index 000000000..dbf594cfc
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/if.go
@@ -0,0 +1,3459 @@
+/*
+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()
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/internal.go b/vendor/github.com/vmware/govmomi/vim25/types/internal.go
new file mode 100644
index 000000000..0c2693499
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/internal.go
@@ -0,0 +1,266 @@
+/*
+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"`
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/registry.go b/vendor/github.com/vmware/govmomi/vim25/types/registry.go
new file mode 100644
index 000000000..ff7c302d3
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/registry.go
@@ -0,0 +1,43 @@
+/*
+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
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/types/types.go b/vendor/github.com/vmware/govmomi/vim25/types/types.go
new file mode 100644
index 000000000..cb7035824
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/types/types.go
@@ -0,0 +1,53334 @@
+/*
+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"`
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE b/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE
new file mode 100644
index 000000000..744875676
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE
@@ -0,0 +1,27 @@
+Copyright (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.
diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/extras.go b/vendor/github.com/vmware/govmomi/vim25/xml/extras.go
new file mode 100644
index 000000000..9a15b7c8e
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/xml/extras.go
@@ -0,0 +1,99 @@
+/*
+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())
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go b/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go
new file mode 100644
index 000000000..39bbac1d1
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go
@@ -0,0 +1,949 @@
+// 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("")
+ p.WriteString(t.Target)
+ if len(t.Inst) > 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 %s> 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 %s> does not match start tag <%s>", name.Local, top.Local)
+ }
+ return fmt.Errorf("xml: end tag %s> 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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/read.go b/vendor/github.com/vmware/govmomi/vim25/xml/read.go
new file mode 100644
index 000000000..fe35fce6c
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/xml/read.go
@@ -0,0 +1,781 @@
+// 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
+ }
+ }
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go b/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go
new file mode 100644
index 000000000..086e83b69
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go
@@ -0,0 +1,366 @@
+// 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
+}
diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/xml.go b/vendor/github.com/vmware/govmomi/vim25/xml/xml.go
new file mode 100644
index 000000000..6c6c5c821
--- /dev/null
+++ b/vendor/github.com/vmware/govmomi/vim25/xml/xml.go
@@ -0,0 +1,1939 @@
+// 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 " + name.Local + ">")
+ 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 " + name.Local + ">")
+ return false
+ case s.name.Space != name.Space:
+ d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space +
+ "closed by " + name.Local + "> 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 " + name.Local + " and >")
+ 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 type)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpProxies.insert" call.
@@ -32921,7 +54968,8 @@ func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operati
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -32936,7 +54984,7 @@ func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operati
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -32964,6 +55012,7 @@ type TargetHttpProxiesListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves the list of TargetHttpProxy resources available to
@@ -32975,10 +55024,9 @@ func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCa
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -32990,20 +55038,18 @@ func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCa
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -33013,12 +55059,30 @@ func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesList
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -33053,23 +55117,34 @@ func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProx
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpProxiesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpProxies.list" call.
@@ -33104,7 +55179,8 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -33117,19 +55193,23 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -33138,7 +55218,7 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -33186,6 +55266,7 @@ type TargetHttpProxiesSetUrlMapCall struct {
urlmapreference *UrlMapReference
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// SetUrlMap: Changes the URL map for TargetHttpProxy.
@@ -33214,27 +55295,37 @@ func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHtt
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"targetHttpProxy": c.targetHttpProxy,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpProxies.setUrlMap" call.
@@ -33269,7 +55360,8 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -33285,7 +55377,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -33320,6 +55412,7 @@ type TargetHttpsProxiesDeleteCall struct {
targetHttpsProxy string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified TargetHttpsProxy resource.
@@ -33346,21 +55439,32 @@ func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttps
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpsProxiesDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"targetHttpsProxy": c.targetHttpsProxy,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpsProxies.delete" call.
@@ -33395,7 +55499,8 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -33411,7 +55516,7 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -33444,6 +55549,7 @@ type TargetHttpsProxiesGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified TargetHttpsProxy resource. Get a list of
@@ -33481,24 +55587,35 @@ func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsPro
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpsProxiesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"targetHttpsProxy": c.targetHttpsProxy,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpsProxies.get" call.
@@ -33533,7 +55650,8 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -33549,7 +55667,7 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -33582,6 +55700,7 @@ type TargetHttpsProxiesInsertCall struct {
targethttpsproxy *TargetHttpsProxy
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Insert: Creates a TargetHttpsProxy resource in the specified project
@@ -33609,26 +55728,36 @@ func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttps
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpsProxiesInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpsProxies.insert" call.
@@ -33663,7 +55792,8 @@ func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operat
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -33678,7 +55808,7 @@ func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operat
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -33706,6 +55836,7 @@ type TargetHttpsProxiesListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves the list of TargetHttpsProxy resources available to
@@ -33716,10 +55847,9 @@ func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesList
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -33731,20 +55861,18 @@ func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesList
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -33754,12 +55882,30 @@ func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesLi
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -33794,23 +55940,34 @@ func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsPr
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpsProxiesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpsProxies.list" call.
@@ -33845,7 +56002,8 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -33858,19 +56016,23 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -33879,7 +56041,7 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -33927,6 +56089,7 @@ type TargetHttpsProxiesSetSslCertificatesCall struct {
targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy.
@@ -33954,27 +56117,37 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context)
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"targetHttpsProxy": c.targetHttpsProxy,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpsProxies.setSslCertificates" call.
@@ -34009,7 +56182,8 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34025,7 +56199,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -34061,6 +56235,7 @@ type TargetHttpsProxiesSetUrlMapCall struct {
urlmapreference *UrlMapReference
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// SetUrlMap: Changes the URL map for TargetHttpsProxy.
@@ -34088,27 +56263,37 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHt
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"targetHttpsProxy": c.targetHttpsProxy,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetHttpsProxies.setUrlMap" call.
@@ -34143,7 +56328,8 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34159,7 +56345,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -34194,6 +56380,7 @@ type TargetInstancesAggregatedListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// AggregatedList: Retrieves an aggregated list of target instances.
@@ -34204,10 +56391,9 @@ func (r *TargetInstancesService) AggregatedList(project string) *TargetInstances
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -34219,20 +56405,18 @@ func (r *TargetInstancesService) AggregatedList(project string) *TargetInstances
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -34242,12 +56426,30 @@ func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstanc
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -34282,23 +56484,34 @@ func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *Target
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetInstancesAggregatedListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetInstances.aggregatedList" call.
@@ -34333,7 +56546,8 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34346,19 +56560,23 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -34367,7 +56585,7 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -34415,6 +56633,7 @@ type TargetInstancesDeleteCall struct {
targetInstance string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified TargetInstance resource.
@@ -34443,22 +56662,33 @@ func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstance
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetInstancesDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
"targetInstance": c.targetInstance,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetInstances.delete" call.
@@ -34493,7 +56723,8 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34510,7 +56741,7 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -34551,6 +56782,7 @@ type TargetInstancesGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified TargetInstance resource. Get a list of
@@ -34590,25 +56822,36 @@ func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGe
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetInstancesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
"targetInstance": c.targetInstance,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetInstances.get" call.
@@ -34643,7 +56886,8 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34660,7 +56904,7 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -34701,6 +56945,7 @@ type TargetInstancesInsertCall struct {
targetinstance *TargetInstance
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Insert: Creates a TargetInstance resource in the specified project
@@ -34730,27 +56975,37 @@ func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstance
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetInstancesInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetInstances.insert" call.
@@ -34785,7 +57040,8 @@ func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34801,7 +57057,7 @@ func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -34837,6 +57093,7 @@ type TargetInstancesListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves a list of TargetInstance resources available to the
@@ -34849,10 +57106,9 @@ func (r *TargetInstancesService) List(project string, zone string) *TargetInstan
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -34864,20 +57120,18 @@ func (r *TargetInstancesService) List(project string, zone string) *TargetInstan
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -34887,12 +57141,30 @@ func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -34927,24 +57199,35 @@ func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesL
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetInstancesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetInstances.list" call.
@@ -34979,7 +57262,8 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -34993,19 +57277,23 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -35014,7 +57302,7 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -35070,6 +57358,7 @@ type TargetPoolsAddHealthCheckCall struct {
targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// AddHealthCheck: Adds health check URLs to a target pool.
@@ -35099,28 +57388,38 @@ func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPool
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsAddHealthCheckCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.addHealthCheck" call.
@@ -35155,7 +57454,8 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -35172,7 +57472,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -35216,6 +57516,7 @@ type TargetPoolsAddInstanceCall struct {
targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// AddInstance: Adds an instance to a target pool.
@@ -35245,28 +57546,38 @@ func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAd
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsAddInstanceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.addInstance" call.
@@ -35301,7 +57612,8 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -35318,7 +57630,7 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -35360,6 +57672,7 @@ type TargetPoolsAggregatedListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// AggregatedList: Retrieves an aggregated list of target pools.
@@ -35370,10 +57683,9 @@ func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregat
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -35385,20 +57697,18 @@ func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregat
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -35408,12 +57718,30 @@ func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggreg
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -35448,23 +57776,34 @@ func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPool
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsAggregatedListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.aggregatedList" call.
@@ -35499,7 +57838,8 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -35512,19 +57852,23 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -35533,7 +57877,7 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -35581,6 +57925,7 @@ type TargetPoolsDeleteCall struct {
targetPool string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified target pool.
@@ -35609,22 +57954,33 @@ func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteC
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.delete" call.
@@ -35659,7 +58015,8 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -35676,7 +58033,7 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -35717,6 +58074,7 @@ type TargetPoolsGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified target pool. Get a list of available
@@ -35756,25 +58114,36 @@ func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.get" call.
@@ -35809,7 +58178,8 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -35826,7 +58196,7 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -35868,6 +58238,7 @@ type TargetPoolsGetHealthCall struct {
instancereference *InstanceReference
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// GetHealth: Gets the most recent health check results for each IP for
@@ -35898,28 +58269,38 @@ func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetH
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsGetHealthCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.getHealth" call.
@@ -35954,7 +58335,8 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -35971,7 +58353,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -36015,6 +58397,7 @@ type TargetPoolsInsertCall struct {
targetpool *TargetPool
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Insert: Creates a target pool in the specified project and region
@@ -36044,27 +58427,37 @@ func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertC
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.insert" call.
@@ -36099,7 +58492,8 @@ func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -36115,7 +58509,7 @@ func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -36151,6 +58545,7 @@ type TargetPoolsListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves a list of target pools available to the specified
@@ -36163,10 +58558,9 @@ func (r *TargetPoolsService) List(project string, region string) *TargetPoolsLis
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -36178,20 +58572,18 @@ func (r *TargetPoolsService) List(project string, region string) *TargetPoolsLis
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -36201,12 +58593,30 @@ func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall {
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -36241,24 +58651,35 @@ func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.list" call.
@@ -36293,7 +58714,8 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList,
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -36307,19 +58729,23 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList,
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -36328,7 +58754,7 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList,
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -36384,6 +58810,7 @@ type TargetPoolsRemoveHealthCheckCall struct {
targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// RemoveHealthCheck: Removes health check URL from a target pool.
@@ -36413,28 +58840,38 @@ func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetP
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.removeHealthCheck" call.
@@ -36469,7 +58906,8 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -36486,7 +58924,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -36530,6 +58968,7 @@ type TargetPoolsRemoveInstanceCall struct {
targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// RemoveInstance: Removes instance URL from a target pool.
@@ -36559,28 +58998,38 @@ func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPool
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsRemoveInstanceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.removeInstance" call.
@@ -36615,7 +59064,8 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -36632,7 +59082,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -36676,6 +59126,7 @@ type TargetPoolsSetBackupCall struct {
targetreference *TargetReference
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// SetBackup: Changes a backup target pool's configurations.
@@ -36712,28 +59163,38 @@ func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetB
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetPoolsSetBackupCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetPool": c.targetPool,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetPools.setBackup" call.
@@ -36768,7 +59229,8 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation,
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -36791,7 +59253,7 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation,
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -36825,27 +59287,452 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation,
}
-// method id "compute.targetVpnGateways.aggregatedList":
+// method id "compute.targetSslProxies.delete":
-type TargetVpnGatewaysAggregatedListCall struct {
+type TargetSslProxiesDeleteCall struct {
+ s *Service
+ project string
+ targetSslProxy string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes the specified TargetSslProxy resource.
+func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall {
+ c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetSslProxy = targetSslProxy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetSslProxy": c.targetSslProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.delete" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes the specified TargetSslProxy resource.",
+ // "httpMethod": "DELETE",
+ // "id": "compute.targetSslProxies.delete",
+ // "parameterOrder": [
+ // "project",
+ // "targetSslProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetSslProxy": {
+ // "description": "Name of the TargetSslProxy resource to delete.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies/{targetSslProxy}",
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetSslProxies.get":
+
+type TargetSslProxiesGetCall struct {
+ s *Service
+ project string
+ targetSslProxy string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Returns the specified TargetSslProxy resource. Get a list of
+// available target SSL proxies by making a list() request.
+func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall {
+ c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetSslProxy = targetSslProxy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetSslProxy": c.targetSslProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.get" call.
+// Exactly one of *TargetSslProxy or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *TargetSslProxy.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TargetSslProxy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.",
+ // "httpMethod": "GET",
+ // "id": "compute.targetSslProxies.get",
+ // "parameterOrder": [
+ // "project",
+ // "targetSslProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetSslProxy": {
+ // "description": "Name of the TargetSslProxy resource to return.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies/{targetSslProxy}",
+ // "response": {
+ // "$ref": "TargetSslProxy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetSslProxies.insert":
+
+type TargetSslProxiesInsertCall struct {
+ s *Service
+ project string
+ targetsslproxy *TargetSslProxy
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Creates a TargetSslProxy resource in the specified project
+// using the data included in the request.
+func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall {
+ c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetsslproxy = targetsslproxy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxy)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.insert" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetSslProxies.insert",
+ // "parameterOrder": [
+ // "project"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies",
+ // "request": {
+ // "$ref": "TargetSslProxy"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetSslProxies.list":
+
+type TargetSslProxiesListCall struct {
s *Service
project string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
-// AggregatedList: Retrieves an aggregated list of target VPN gateways.
-func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall {
- c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+// List: Retrieves the list of TargetSslProxy resources available to the
+// specified project.
+func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall {
+ c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -36857,20 +59744,1675 @@ func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGate
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
+func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of results per page that should be returned. If the number of
+// available results is larger than maxResults, Compute Engine returns a
+// nextPageToken that can be used to get the next page of results in
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
+func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": Specifies a page
+// token to use. Set pageToken to the nextPageToken returned by a
+// previous list request to get the next page of results.
+func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.list" call.
+// Exactly one of *TargetSslProxyList or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TargetSslProxyList.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TargetSslProxyList{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.",
+ // "httpMethod": "GET",
+ // "id": "compute.targetSslProxies.list",
+ // "parameterOrder": [
+ // "project"
+ // ],
+ // "parameters": {
+ // "filter": {
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "default": "500",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ // "format": "uint32",
+ // "location": "query",
+ // "minimum": "0",
+ // "type": "integer"
+ // },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies",
+ // "response": {
+ // "$ref": "TargetSslProxyList"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "compute.targetSslProxies.setBackendService":
+
+type TargetSslProxiesSetBackendServiceCall struct {
+ s *Service
+ project string
+ targetSslProxy string
+ targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetBackendService: Changes the BackendService for TargetSslProxy.
+func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall {
+ c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetSslProxy = targetSslProxy
+ c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetbackendservicerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetSslProxy": c.targetSslProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.setBackendService" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Changes the BackendService for TargetSslProxy.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetSslProxies.setBackendService",
+ // "parameterOrder": [
+ // "project",
+ // "targetSslProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetSslProxy": {
+ // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService",
+ // "request": {
+ // "$ref": "TargetSslProxiesSetBackendServiceRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetSslProxies.setProxyHeader":
+
+type TargetSslProxiesSetProxyHeaderCall struct {
+ s *Service
+ project string
+ targetSslProxy string
+ targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy.
+func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall {
+ c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetSslProxy = targetSslProxy
+ c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetproxyheaderrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetSslProxy": c.targetSslProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.setProxyHeader" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Changes the ProxyHeaderType for TargetSslProxy.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetSslProxies.setProxyHeader",
+ // "parameterOrder": [
+ // "project",
+ // "targetSslProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetSslProxy": {
+ // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader",
+ // "request": {
+ // "$ref": "TargetSslProxiesSetProxyHeaderRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetSslProxies.setSslCertificates":
+
+type TargetSslProxiesSetSslCertificatesCall struct {
+ s *Service
+ project string
+ targetSslProxy string
+ targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetSslCertificates: Changes SslCertificates for TargetSslProxy.
+func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall {
+ c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetSslProxy = targetSslProxy
+ c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetsslcertificatesrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetSslProxy": c.targetSslProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetSslProxies.setSslCertificates" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Changes SslCertificates for TargetSslProxy.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetSslProxies.setSslCertificates",
+ // "parameterOrder": [
+ // "project",
+ // "targetSslProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetSslProxy": {
+ // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates",
+ // "request": {
+ // "$ref": "TargetSslProxiesSetSslCertificatesRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetTcpProxies.delete":
+
+type TargetTcpProxiesDeleteCall struct {
+ s *Service
+ project string
+ targetTcpProxy string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes the specified TargetTcpProxy resource.
+func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall {
+ c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetTcpProxy = targetTcpProxy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetTcpProxiesDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetTcpProxy": c.targetTcpProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetTcpProxies.delete" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes the specified TargetTcpProxy resource.",
+ // "httpMethod": "DELETE",
+ // "id": "compute.targetTcpProxies.delete",
+ // "parameterOrder": [
+ // "project",
+ // "targetTcpProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetTcpProxy": {
+ // "description": "Name of the TargetTcpProxy resource to delete.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}",
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetTcpProxies.get":
+
+type TargetTcpProxiesGetCall struct {
+ s *Service
+ project string
+ targetTcpProxy string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Returns the specified TargetTcpProxy resource. Get a list of
+// available target TCP proxies by making a list() request.
+func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall {
+ c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetTcpProxy = targetTcpProxy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetTcpProxiesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetTcpProxy": c.targetTcpProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetTcpProxies.get" call.
+// Exactly one of *TargetTcpProxy or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *TargetTcpProxy.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TargetTcpProxy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.",
+ // "httpMethod": "GET",
+ // "id": "compute.targetTcpProxies.get",
+ // "parameterOrder": [
+ // "project",
+ // "targetTcpProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetTcpProxy": {
+ // "description": "Name of the TargetTcpProxy resource to return.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}",
+ // "response": {
+ // "$ref": "TargetTcpProxy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetTcpProxies.insert":
+
+type TargetTcpProxiesInsertCall struct {
+ s *Service
+ project string
+ targettcpproxy *TargetTcpProxy
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Creates a TargetTcpProxy resource in the specified project
+// using the data included in the request.
+func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall {
+ c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targettcpproxy = targettcpproxy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetTcpProxiesInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxy)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetTcpProxies.insert" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetTcpProxies.insert",
+ // "parameterOrder": [
+ // "project"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetTcpProxies",
+ // "request": {
+ // "$ref": "TargetTcpProxy"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetTcpProxies.list":
+
+type TargetTcpProxiesListCall struct {
+ s *Service
+ project string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Retrieves the list of TargetTcpProxy resources available to the
+// specified project.
+func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall {
+ c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ return c
+}
+
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
+//
+// The field_name is the name of the field you want to compare. Only
+// atomic field types are supported (string, number, boolean). The
+// comparison_string must be either eq (equals) or ne (not equals). The
+// literal_string is the string value to filter to. The literal value
+// must be valid for the type of field you are filtering by (string,
+// number, boolean). For string fields, the literal value is interpreted
+// as a regular expression using RE2 syntax. The literal value must
+// match the entire field.
+//
+// For example, to filter for instances that do not have a name of
+// example-instance, you would use name ne example-instance.
+//
+// You can filter on nested fields. For example, you could filter on
+// instances that have set the scheduling.automaticRestart field to
+// true. Use filtering on nested fields to take advantage of labels to
+// organize and search for results based on label values.
+//
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
+func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of results per page that should be returned. If the number of
+// available results is larger than maxResults, Compute Engine returns a
+// nextPageToken that can be used to get the next page of results in
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
+func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": Specifies a page
+// token to use. Set pageToken to the nextPageToken returned by a
+// previous list request to get the next page of results.
+func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetTcpProxiesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetTcpProxies.list" call.
+// Exactly one of *TargetTcpProxyList or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TargetTcpProxyList.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TargetTcpProxyList{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.",
+ // "httpMethod": "GET",
+ // "id": "compute.targetTcpProxies.list",
+ // "parameterOrder": [
+ // "project"
+ // ],
+ // "parameters": {
+ // "filter": {
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "default": "500",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ // "format": "uint32",
+ // "location": "query",
+ // "minimum": "0",
+ // "type": "integer"
+ // },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetTcpProxies",
+ // "response": {
+ // "$ref": "TargetTcpProxyList"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "compute.targetTcpProxies.setBackendService":
+
+type TargetTcpProxiesSetBackendServiceCall struct {
+ s *Service
+ project string
+ targetTcpProxy string
+ targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetBackendService: Changes the BackendService for TargetTcpProxy.
+func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall {
+ c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetTcpProxy = targetTcpProxy
+ c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetbackendservicerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetTcpProxy": c.targetTcpProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetTcpProxies.setBackendService" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Changes the BackendService for TargetTcpProxy.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetTcpProxies.setBackendService",
+ // "parameterOrder": [
+ // "project",
+ // "targetTcpProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetTcpProxy": {
+ // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService",
+ // "request": {
+ // "$ref": "TargetTcpProxiesSetBackendServiceRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetTcpProxies.setProxyHeader":
+
+type TargetTcpProxiesSetProxyHeaderCall struct {
+ s *Service
+ project string
+ targetTcpProxy string
+ targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy.
+func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall {
+ c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.targetTcpProxy = targetTcpProxy
+ c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetproxyheaderrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "targetTcpProxy": c.targetTcpProxy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.targetTcpProxies.setProxyHeader" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Changes the ProxyHeaderType for TargetTcpProxy.",
+ // "httpMethod": "POST",
+ // "id": "compute.targetTcpProxies.setProxyHeader",
+ // "parameterOrder": [
+ // "project",
+ // "targetTcpProxy"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetTcpProxy": {
+ // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader",
+ // "request": {
+ // "$ref": "TargetTcpProxiesSetProxyHeaderRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.targetVpnGateways.aggregatedList":
+
+type TargetVpnGatewaysAggregatedListCall struct {
+ s *Service
+ project string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// AggregatedList: Retrieves an aggregated list of target VPN gateways.
+func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall {
+ c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ return c
+}
+
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
+//
+// The field_name is the name of the field you want to compare. Only
+// atomic field types are supported (string, number, boolean). The
+// comparison_string must be either eq (equals) or ne (not equals). The
+// literal_string is the string value to filter to. The literal value
+// must be valid for the type of field you are filtering by (string,
+// number, boolean). For string fields, the literal value is interpreted
+// as a regular expression using RE2 syntax. The literal value must
+// match the entire field.
+//
+// For example, to filter for instances that do not have a name of
+// example-instance, you would use name ne example-instance.
+//
+// You can filter on nested fields. For example, you could filter on
+// instances that have set the scheduling.automaticRestart field to
+// true. Use filtering on nested fields to take advantage of labels to
+// organize and search for results based on label values.
+//
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -36880,12 +61422,30 @@ func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGa
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -36920,23 +61480,34 @@ func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *Targ
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetVpnGateways.aggregatedList" call.
@@ -36971,7 +61542,8 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -36984,19 +61556,23 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -37005,7 +61581,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -37053,6 +61629,7 @@ type TargetVpnGatewaysDeleteCall struct {
targetVpnGateway string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified target VPN gateway.
@@ -37080,22 +61657,33 @@ func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGat
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetVpnGatewaysDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetVpnGateway": c.targetVpnGateway,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetVpnGateways.delete" call.
@@ -37130,7 +61718,8 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -37147,7 +61736,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -37188,6 +61777,7 @@ type TargetVpnGatewaysGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified target VPN gateway. Get a list of
@@ -37226,25 +61816,36 @@ func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewa
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetVpnGatewaysGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"targetVpnGateway": c.targetVpnGateway,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetVpnGateways.get" call.
@@ -37279,7 +61880,8 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -37296,7 +61898,7 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -37337,6 +61939,7 @@ type TargetVpnGatewaysInsertCall struct {
targetvpngateway *TargetVpnGateway
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Insert: Creates a target VPN gateway in the specified project and
@@ -37365,27 +61968,37 @@ func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGat
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetVpnGatewaysInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetVpnGateways.insert" call.
@@ -37420,7 +62033,8 @@ func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operati
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -37436,7 +62050,7 @@ func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operati
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -37472,6 +62086,7 @@ type TargetVpnGatewaysListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves a list of target VPN gateways available to the
@@ -37483,10 +62098,9 @@ func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVp
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -37498,20 +62112,18 @@ func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVp
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -37521,12 +62133,30 @@ func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysList
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -37561,24 +62191,35 @@ func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatew
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *TargetVpnGatewaysListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.targetVpnGateways.list" call.
@@ -37613,7 +62254,8 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -37627,19 +62269,23 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -37648,7 +62294,7 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -37702,6 +62348,7 @@ type UrlMapsDeleteCall struct {
urlMap string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified UrlMap resource.
@@ -37729,21 +62376,32 @@ func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"urlMap": c.urlMap,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.delete" call.
@@ -37778,7 +62436,8 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -37794,7 +62453,7 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -37827,6 +62486,7 @@ type UrlMapsGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified UrlMap resource. Get a list of available
@@ -37865,24 +62525,35 @@ func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"urlMap": c.urlMap,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.get" call.
@@ -37917,7 +62588,8 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) {
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -37933,7 +62605,7 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) {
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -37966,6 +62638,7 @@ type UrlMapsInsertCall struct {
urlmap *UrlMap
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Insert: Creates a UrlMap resource in the specified project using the
@@ -37994,26 +62667,36 @@ func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.insert" call.
@@ -38048,7 +62731,8 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -38063,7 +62747,7 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -38083,6 +62767,153 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
}
+// method id "compute.urlMaps.invalidateCache":
+
+type UrlMapsInvalidateCacheCall struct {
+ s *Service
+ project string
+ urlMap string
+ cacheinvalidationrule *CacheInvalidationRule
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// InvalidateCache: Initiates a cache invalidation operation,
+// invalidating the specified path, scoped to the specified UrlMap.
+func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall {
+ c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.urlMap = urlMap
+ c.cacheinvalidationrule = cacheinvalidationrule
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsInvalidateCacheCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.cacheinvalidationrule)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/invalidateCache")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "urlMap": c.urlMap,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.urlMaps.invalidateCache" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.",
+ // "httpMethod": "POST",
+ // "id": "compute.urlMaps.invalidateCache",
+ // "parameterOrder": [
+ // "project",
+ // "urlMap"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "urlMap": {
+ // "description": "Name of the UrlMap scoping this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/urlMaps/{urlMap}/invalidateCache",
+ // "request": {
+ // "$ref": "CacheInvalidationRule"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.urlMaps.list":
type UrlMapsListCall struct {
@@ -38091,6 +62922,7 @@ type UrlMapsListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves the list of UrlMap resources available to the
@@ -38102,10 +62934,9 @@ func (r *UrlMapsService) List(project string) *UrlMapsListCall {
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -38117,20 +62948,18 @@ func (r *UrlMapsService) List(project string) *UrlMapsListCall {
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -38140,12 +62969,30 @@ func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall {
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -38180,23 +63027,34 @@ func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.list" call.
@@ -38231,7 +63089,8 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error)
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -38244,19 +63103,23 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error)
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -38265,7 +63128,7 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error)
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -38313,10 +63176,12 @@ type UrlMapsPatchCall struct {
urlmap *UrlMap
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
-// Patch: Updates the entire content of the UrlMap resource. This method
-// supports patch semantics.
+// Patch: Patches the specified UrlMap resource with the data included
+// in the request. This method supports PATCH semantics and uses the
+// JSON merge patch format and processing rules.
// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch
func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall {
c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -38342,27 +63207,37 @@ func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"urlMap": c.urlMap,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.patch" call.
@@ -38397,12 +63272,13 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
// {
- // "description": "Updates the entire content of the UrlMap resource. This method supports patch semantics.",
+ // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
// "httpMethod": "PATCH",
// "id": "compute.urlMaps.patch",
// "parameterOrder": [
@@ -38413,12 +63289,12 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
// "urlMap": {
- // "description": "Name of the UrlMap resource to update.",
+ // "description": "Name of the UrlMap resource to patch.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
@@ -38434,7 +63310,8 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
- // "https://www.googleapis.com/auth/compute"
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
// ]
// }
@@ -38449,9 +63326,11 @@ type UrlMapsUpdateCall struct {
urlmap *UrlMap
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
-// Update: Updates the entire content of the UrlMap resource.
+// Update: Updates the specified UrlMap resource with the data included
+// in the request.
// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update
func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall {
c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -38477,27 +63356,37 @@ func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsUpdateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"urlMap": c.urlMap,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.update" call.
@@ -38532,12 +63421,13 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
// {
- // "description": "Updates the entire content of the UrlMap resource.",
+ // "description": "Updates the specified UrlMap resource with the data included in the request.",
// "httpMethod": "PUT",
// "id": "compute.urlMaps.update",
// "parameterOrder": [
@@ -38548,7 +63438,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -38584,6 +63474,7 @@ type UrlMapsValidateCall struct {
urlmapsvalidaterequest *UrlMapsValidateRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Validate: Runs static validation for the UrlMap. In particular, the
@@ -38614,27 +63505,37 @@ func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *UrlMapsValidateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"urlMap": c.urlMap,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.urlMaps.validate" call.
@@ -38669,7 +63570,8 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -38685,7 +63587,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -38720,6 +63622,7 @@ type VpnTunnelsAggregatedListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// AggregatedList: Retrieves an aggregated list of VPN tunnels.
@@ -38729,10 +63632,9 @@ func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregated
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -38744,20 +63646,18 @@ func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregated
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -38767,12 +63667,30 @@ func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregat
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -38807,23 +63725,34 @@ func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsA
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *VpnTunnelsAggregatedListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.vpnTunnels.aggregatedList" call.
@@ -38858,7 +63787,8 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -38871,19 +63801,23 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -38892,7 +63826,7 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
@@ -38940,6 +63874,7 @@ type VpnTunnelsDeleteCall struct {
vpnTunnel string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified VpnTunnel resource.
@@ -38967,22 +63902,33 @@ func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCal
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *VpnTunnelsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"vpnTunnel": c.vpnTunnel,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.vpnTunnels.delete" call.
@@ -39017,7 +63963,8 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -39034,7 +63981,7 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -39075,6 +64022,7 @@ type VpnTunnelsGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified VpnTunnel resource. Get a list of
@@ -39113,25 +64061,36 @@ func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *VpnTunnelsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"vpnTunnel": c.vpnTunnel,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.vpnTunnels.get" call.
@@ -39166,7 +64125,8 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error)
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -39183,7 +64143,7 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error)
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -39224,6 +64184,7 @@ type VpnTunnelsInsertCall struct {
vpntunnel *VpnTunnel
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Insert: Creates a VpnTunnel resource in the specified project and
@@ -39252,27 +64213,37 @@ func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCal
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *VpnTunnelsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel)
if err != nil {
return nil, err
}
- ctype := "application/json"
+ reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
})
- req.Header.Set("Content-Type", ctype)
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.vpnTunnels.insert" call.
@@ -39307,7 +64278,8 @@ func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -39323,7 +64295,7 @@ func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -39359,6 +64331,7 @@ type VpnTunnelsListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves a list of VpnTunnel resources contained in the
@@ -39370,10 +64343,9 @@ func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListC
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -39385,20 +64357,18 @@ func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListC
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -39408,12 +64378,30 @@ func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall {
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -39448,24 +64436,35 @@ func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *VpnTunnelsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.vpnTunnels.list" call.
@@ -39500,7 +64499,8 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -39514,19 +64514,23 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -39535,7 +64539,7 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -39590,6 +64594,7 @@ type ZoneOperationsDeleteCall struct {
operation string
urlParams_ gensupport.URLParams
ctx_ context.Context
+ header_ http.Header
}
// Delete: Deletes the specified zone-specific Operations resource.
@@ -39618,22 +64623,33 @@ func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsD
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ZoneOperationsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
"operation": c.operation,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.zoneOperations.delete" call.
@@ -39668,7 +64684,7 @@ func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -39699,6 +64715,7 @@ type ZoneOperationsGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Retrieves the specified zone-specific Operations resource.
@@ -39737,25 +64754,36 @@ func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetC
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ZoneOperationsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
"operation": c.operation,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.zoneOperations.get" call.
@@ -39790,7 +64818,8 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -39814,7 +64843,7 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -39848,6 +64877,7 @@ type ZoneOperationsListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves a list of Operation resources contained within the
@@ -39860,10 +64890,9 @@ func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperation
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -39875,20 +64904,18 @@ func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperation
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -39898,12 +64925,30 @@ func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall {
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -39938,24 +64983,35 @@ func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsLis
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ZoneOperationsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.zoneOperations.list" call.
@@ -39990,7 +65046,8 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -40004,19 +65061,23 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -40025,7 +65086,7 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -40080,6 +65141,7 @@ type ZonesGetCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// Get: Returns the specified Zone resource. Get a list of available
@@ -40118,24 +65180,35 @@ func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ZonesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.zones.get" call.
@@ -40170,7 +65243,8 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -40186,7 +65260,7 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
@@ -40219,6 +65293,7 @@ type ZonesListCall struct {
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
+ header_ http.Header
}
// List: Retrieves the list of Zone resources available to the specified
@@ -40230,10 +65305,9 @@ func (r *ZonesService) List(project string) *ZonesListCall {
return c
}
-// Filter sets the optional parameter "filter": Sets a filter expression
-// for filtering listed resources, in the form filter={expression}. Your
-// {expression} must be in the format: field_name comparison_string
-// literal_string.
+// Filter sets the optional parameter "filter": Sets a filter
+// {expression} for filtering listed resources. Your {expression} must
+// be in the format: field_name comparison_string literal_string.
//
// The field_name is the name of the field you want to compare. Only
// atomic field types are supported (string, number, boolean). The
@@ -40245,20 +65319,18 @@ func (r *ZonesService) List(project string) *ZonesListCall {
// match the entire field.
//
// For example, to filter for instances that do not have a name of
-// example-instance, you would use filter=name ne
-// example-instance.
+// example-instance, you would use name ne example-instance.
//
-// Compute Engine Beta API Only: When filtering in the Beta API, you can
-// also filter on nested fields. For example, you could filter on
+// You can filter on nested fields. For example, you could filter on
// instances that have set the scheduling.automaticRestart field to
// true. Use filtering on nested fields to take advantage of labels to
// organize and search for results based on label values.
//
-// The Beta API also supports filtering on multiple expressions by
-// providing each separate expression within parentheses. For example,
-// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
-// Multiple expressions are treated as AND expressions, meaning that
-// resources must match all expressions to pass the filters.
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart eq
+// true) (zone eq us-central1-f). Multiple expressions are treated as
+// AND expressions, meaning that resources must match all expressions to
+// pass the filters.
func (c *ZonesListCall) Filter(filter string) *ZonesListCall {
c.urlParams_.Set("filter", filter)
return c
@@ -40268,12 +65340,30 @@ func (c *ZonesListCall) Filter(filter string) *ZonesListCall {
// number of results per page that should be returned. If the number of
// available results is larger than maxResults, Compute Engine returns a
// nextPageToken that can be used to get the next page of results in
-// subsequent list requests.
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
// PageToken sets the optional parameter "pageToken": Specifies a page
// token to use. Set pageToken to the nextPageToken returned by a
// previous list request to get the next page of results.
@@ -40308,23 +65398,34 @@ func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
return c
}
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ZonesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
})
- req.Header.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- req.Header.Set("If-None-Match", c.ifNoneMatch_)
- }
- if c.ctx_ != nil {
- return ctxhttp.Do(c.ctx_, c.s.client, req)
- }
- return c.s.client.Do(req)
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.zones.list" call.
@@ -40359,7 +65460,8 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) {
HTTPStatusCode: res.StatusCode,
},
}
- if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
+ target := &ret
+ if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
@@ -40372,19 +65474,23 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) {
// ],
// "parameters": {
// "filter": {
- // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
+ // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
// "location": "query",
// "type": "string"
// },
// "maxResults": {
// "default": "500",
- // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
// "format": "uint32",
// "location": "query",
- // "maximum": "500",
// "minimum": "0",
// "type": "integer"
// },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageToken": {
// "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
// "location": "query",
@@ -40393,7 +65499,7 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) {
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
- // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// }
diff --git a/vendor/google.golang.org/api/gensupport/buffer.go b/vendor/google.golang.org/api/gensupport/buffer.go
index 4b8ec1424..992104911 100644
--- a/vendor/google.golang.org/api/gensupport/buffer.go
+++ b/vendor/google.golang.org/api/gensupport/buffer.go
@@ -11,8 +11,8 @@ import (
"google.golang.org/api/googleapi"
)
-// ResumableBuffer buffers data from an io.Reader to support uploading media in retryable chunks.
-type ResumableBuffer struct {
+// MediaBuffer buffers data from an io.Reader to support uploading media in retryable chunks.
+type MediaBuffer struct {
media io.Reader
chunk []byte // The current chunk which is pending upload. The capacity is the chunk size.
@@ -22,42 +22,42 @@ type ResumableBuffer struct {
off int64
}
-func NewResumableBuffer(media io.Reader, chunkSize int) *ResumableBuffer {
- return &ResumableBuffer{media: media, chunk: make([]byte, 0, chunkSize)}
+func NewMediaBuffer(media io.Reader, chunkSize int) *MediaBuffer {
+ return &MediaBuffer{media: media, chunk: make([]byte, 0, chunkSize)}
}
// Chunk returns the current buffered chunk, the offset in the underlying media
// from which the chunk is drawn, and the size of the chunk.
// Successive calls to Chunk return the same chunk between calls to Next.
-func (rb *ResumableBuffer) Chunk() (chunk io.Reader, off int64, size int, err error) {
+func (mb *MediaBuffer) Chunk() (chunk io.Reader, off int64, size int, err error) {
// There may already be data in chunk if Next has not been called since the previous call to Chunk.
- if rb.err == nil && len(rb.chunk) == 0 {
- rb.err = rb.loadChunk()
+ if mb.err == nil && len(mb.chunk) == 0 {
+ mb.err = mb.loadChunk()
}
- return bytes.NewReader(rb.chunk), rb.off, len(rb.chunk), rb.err
+ return bytes.NewReader(mb.chunk), mb.off, len(mb.chunk), mb.err
}
// loadChunk will read from media into chunk, up to the capacity of chunk.
-func (rb *ResumableBuffer) loadChunk() error {
- bufSize := cap(rb.chunk)
- rb.chunk = rb.chunk[:bufSize]
+func (mb *MediaBuffer) loadChunk() error {
+ bufSize := cap(mb.chunk)
+ mb.chunk = mb.chunk[:bufSize]
read := 0
var err error
for err == nil && read < bufSize {
var n int
- n, err = rb.media.Read(rb.chunk[read:])
+ n, err = mb.media.Read(mb.chunk[read:])
read += n
}
- rb.chunk = rb.chunk[:read]
+ mb.chunk = mb.chunk[:read]
return err
}
// Next advances to the next chunk, which will be returned by the next call to Chunk.
// Calls to Next without a corresponding prior call to Chunk will have no effect.
-func (rb *ResumableBuffer) Next() {
- rb.off += int64(len(rb.chunk))
- rb.chunk = rb.chunk[0:0]
+func (mb *MediaBuffer) Next() {
+ mb.off += int64(len(mb.chunk))
+ mb.chunk = mb.chunk[0:0]
}
type readerTyper struct {
diff --git a/vendor/google.golang.org/api/gensupport/header.go b/vendor/google.golang.org/api/gensupport/header.go
new file mode 100644
index 000000000..cb5e67c77
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/header.go
@@ -0,0 +1,22 @@
+// Copyright 2017 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 gensupport
+
+import (
+ "fmt"
+ "runtime"
+ "strings"
+)
+
+// GoogleClientHeader returns the value to use for the x-goog-api-client
+// header, which is used internally by Google.
+func GoogleClientHeader(generatorVersion, clientElement string) string {
+ elts := []string{"gl-go/" + strings.Replace(runtime.Version(), " ", "_", -1)}
+ if clientElement != "" {
+ elts = append(elts, clientElement)
+ }
+ elts = append(elts, fmt.Sprintf("gdcl/%s", generatorVersion))
+ return strings.Join(elts, " ")
+}
diff --git a/vendor/google.golang.org/api/gensupport/json.go b/vendor/google.golang.org/api/gensupport/json.go
index dd7bcd2eb..c01e32189 100644
--- a/vendor/google.golang.org/api/gensupport/json.go
+++ b/vendor/google.golang.org/api/gensupport/json.go
@@ -12,29 +12,43 @@ import (
)
// MarshalJSON returns a JSON encoding of schema containing only selected fields.
-// A field is selected if:
-// * it has a non-empty value, or
-// * its field name is present in forceSendFields, and
-// * it is not a nil pointer or nil interface.
+// A field is selected if any of the following is true:
+// * it has a non-empty value
+// * its field name is present in forceSendFields and it is not a nil pointer or nil interface
+// * its field name is present in nullFields.
// The JSON key for each selected field is taken from the field's json: struct tag.
-func MarshalJSON(schema interface{}, forceSendFields []string) ([]byte, error) {
- if len(forceSendFields) == 0 {
+func MarshalJSON(schema interface{}, forceSendFields, nullFields []string) ([]byte, error) {
+ if len(forceSendFields) == 0 && len(nullFields) == 0 {
return json.Marshal(schema)
}
- mustInclude := make(map[string]struct{})
+ mustInclude := make(map[string]bool)
for _, f := range forceSendFields {
- mustInclude[f] = struct{}{}
+ mustInclude[f] = true
+ }
+ useNull := make(map[string]bool)
+ useNullMaps := make(map[string]map[string]bool)
+ for _, nf := range nullFields {
+ parts := strings.SplitN(nf, ".", 2)
+ field := parts[0]
+ if len(parts) == 1 {
+ useNull[field] = true
+ } else {
+ if useNullMaps[field] == nil {
+ useNullMaps[field] = map[string]bool{}
+ }
+ useNullMaps[field][parts[1]] = true
+ }
}
- dataMap, err := schemaToMap(schema, mustInclude)
+ dataMap, err := schemaToMap(schema, mustInclude, useNull, useNullMaps)
if err != nil {
return nil, err
}
return json.Marshal(dataMap)
}
-func schemaToMap(schema interface{}, mustInclude map[string]struct{}) (map[string]interface{}, error) {
+func schemaToMap(schema interface{}, mustInclude, useNull map[string]bool, useNullMaps map[string]map[string]bool) (map[string]interface{}, error) {
m := make(map[string]interface{})
s := reflect.ValueOf(schema)
st := s.Type()
@@ -54,10 +68,36 @@ func schemaToMap(schema interface{}, mustInclude map[string]struct{}) (map[strin
v := s.Field(i)
f := st.Field(i)
+
+ if useNull[f.Name] {
+ if !isEmptyValue(v) {
+ return nil, fmt.Errorf("field %q in NullFields has non-empty value", f.Name)
+ }
+ m[tag.apiName] = nil
+ continue
+ }
+
if !includeField(v, f, mustInclude) {
continue
}
+ // If map fields are explicitly set to null, use a map[string]interface{}.
+ if f.Type.Kind() == reflect.Map && useNullMaps[f.Name] != nil {
+ ms, ok := v.Interface().(map[string]string)
+ if !ok {
+ return nil, fmt.Errorf("field %q has keys in NullFields but is not a map[string]string", f.Name)
+ }
+ mi := map[string]interface{}{}
+ for k, v := range ms {
+ mi[k] = v
+ }
+ for k := range useNullMaps[f.Name] {
+ mi[k] = nil
+ }
+ m[tag.apiName] = mi
+ continue
+ }
+
// nil maps are treated as empty maps.
if f.Type.Kind() == reflect.Map && v.IsNil() {
m[tag.apiName] = map[string]string{}
@@ -127,7 +167,7 @@ func parseJSONTag(val string) (jsonTag, error) {
}
// Reports whether the struct field "f" with value "v" should be included in JSON output.
-func includeField(v reflect.Value, f reflect.StructField, mustInclude map[string]struct{}) bool {
+func includeField(v reflect.Value, f reflect.StructField, mustInclude map[string]bool) bool {
// The regular JSON encoding of a nil pointer is "null", which means "delete this field".
// Therefore, we could enable field deletion by honoring pointer fields' presence in the mustInclude set.
// However, many fields are not pointers, so there would be no way to delete these fields.
@@ -144,8 +184,7 @@ func includeField(v reflect.Value, f reflect.StructField, mustInclude map[string
return false
}
- _, ok := mustInclude[f.Name]
- return ok || !isEmptyValue(v)
+ return mustInclude[f.Name] || !isEmptyValue(v)
}
// isEmptyValue reports whether v is the empty value for its type. This
diff --git a/vendor/google.golang.org/api/gensupport/jsonfloat.go b/vendor/google.golang.org/api/gensupport/jsonfloat.go
new file mode 100644
index 000000000..cb02335d2
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/jsonfloat.go
@@ -0,0 +1,57 @@
+// Copyright 2016 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package gensupport
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "math"
+)
+
+// JSONFloat64 is a float64 that supports proper unmarshaling of special float
+// values in JSON, according to
+// https://developers.google.com/protocol-buffers/docs/proto3#json. Although
+// that is a proto-to-JSON spec, it applies to all Google APIs.
+//
+// The jsonpb package
+// (https://github.com/golang/protobuf/blob/master/jsonpb/jsonpb.go) has
+// similar functionality, but only for direct translation from proto messages
+// to JSON.
+type JSONFloat64 float64
+
+func (f *JSONFloat64) UnmarshalJSON(data []byte) error {
+ var ff float64
+ if err := json.Unmarshal(data, &ff); err == nil {
+ *f = JSONFloat64(ff)
+ return nil
+ }
+ var s string
+ if err := json.Unmarshal(data, &s); err == nil {
+ switch s {
+ case "NaN":
+ ff = math.NaN()
+ case "Infinity":
+ ff = math.Inf(1)
+ case "-Infinity":
+ ff = math.Inf(-1)
+ default:
+ return fmt.Errorf("google.golang.org/api/internal: bad float string %q", s)
+ }
+ *f = JSONFloat64(ff)
+ return nil
+ }
+ return errors.New("google.golang.org/api/internal: data not float or string")
+}
diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/gensupport/media.go
index 817f46f5d..c6410e89a 100644
--- a/vendor/google.golang.org/api/gensupport/media.go
+++ b/vendor/google.golang.org/api/gensupport/media.go
@@ -176,25 +176,24 @@ func typeHeader(contentType string) textproto.MIMEHeader {
// chunkSize is the size of the chunk that media should be split into.
// If chunkSize is non-zero and the contents of media do not fit in a single
// chunk (or there is an error reading media), then media will be returned as a
-// ResumableBuffer. Otherwise, media will be returned as a Reader.
+// MediaBuffer. Otherwise, media will be returned as a Reader.
//
// After PrepareUpload has been called, media should no longer be used: the
// media content should be accessed via one of the return values.
-func PrepareUpload(media io.Reader, chunkSize int) (io.Reader,
- *ResumableBuffer) {
+func PrepareUpload(media io.Reader, chunkSize int) (io.Reader, *MediaBuffer) {
if chunkSize == 0 { // do not chunk
return media, nil
}
- rb := NewResumableBuffer(media, chunkSize)
- rdr, _, _, err := rb.Chunk()
+ mb := NewMediaBuffer(media, chunkSize)
+ rdr, _, _, err := mb.Chunk()
if err == io.EOF { // we can upload this in a single request
return rdr, nil
}
- // err might be a non-EOF error. If it is, the next call to rb.Chunk will
- // return the same error. Returning a ResumableBuffer ensures that this error
+ // err might be a non-EOF error. If it is, the next call to mb.Chunk will
+ // return the same error. Returning a MediaBuffer ensures that this error
// will be handled at some point.
- return nil, rb
+ return nil, mb
}
diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/gensupport/resumable.go
index b3e774aa4..dcd591f7f 100644
--- a/vendor/google.golang.org/api/gensupport/resumable.go
+++ b/vendor/google.golang.org/api/gensupport/resumable.go
@@ -5,6 +5,7 @@
package gensupport
import (
+ "errors"
"fmt"
"io"
"net/http"
@@ -12,14 +13,9 @@ import (
"time"
"golang.org/x/net/context"
- "golang.org/x/net/context/ctxhttp"
)
const (
- // statusResumeIncomplete is the code returned by the Google uploader
- // when the transfer is not yet complete.
- statusResumeIncomplete = 308
-
// statusTooManyRequests is returned by the storage API if the
// per-project limits have been temporarily exceeded. The request
// should be retried.
@@ -35,7 +31,7 @@ type ResumableUpload struct {
URI string
UserAgent string // User-Agent for header of the request
// Media is the object being uploaded.
- Media *ResumableBuffer
+ Media *MediaBuffer
// MediaType defines the media type, e.g. "image/jpeg".
MediaType string
@@ -80,8 +76,23 @@ func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader,
req.Header.Set("Content-Range", contentRange)
req.Header.Set("Content-Type", rx.MediaType)
req.Header.Set("User-Agent", rx.UserAgent)
- return ctxhttp.Do(ctx, rx.Client, req)
+ // Google's upload endpoint uses status code 308 for a
+ // different purpose than the "308 Permanent Redirect"
+ // since-standardized in RFC 7238. Because of the conflict in
+ // semantics, Google added this new request header which
+ // causes it to not use "308" and instead reply with 200 OK
+ // and sets the upload-specific "X-HTTP-Status-Code-Override:
+ // 308" response header.
+ req.Header.Set("X-GUploader-No-308", "yes")
+
+ return SendRequest(ctx, rx.Client, req)
+}
+
+func statusResumeIncomplete(resp *http.Response) bool {
+ // This is how the server signals "status resume incomplete"
+ // when X-GUploader-No-308 is set to "yes":
+ return resp != nil && resp.Header.Get("X-Http-Status-Code-Override") == "308"
}
// reportProgress calls a user-supplied callback to report upload progress.
@@ -112,11 +123,17 @@ func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, e
return res, err
}
- if res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK {
+ // We sent "X-GUploader-No-308: yes" (see comment elsewhere in
+ // this file), so we don't expect to get a 308.
+ if res.StatusCode == 308 {
+ return nil, errors.New("unexpected 308 response status code")
+ }
+
+ if res.StatusCode == http.StatusOK {
rx.reportProgress(off, off+int64(size))
}
- if res.StatusCode == statusResumeIncomplete {
+ if statusResumeIncomplete(res) {
rx.Media.Next()
}
return res, nil
@@ -135,6 +152,8 @@ func contextDone(ctx context.Context) bool {
// It retries using the provided back off strategy until cancelled or the
// strategy indicates to stop retrying.
// It is called from the auto-generated API code and is not visible to the user.
+// Before sending an HTTP request, Upload calls any registered hook functions,
+// and calls the returned functions after the request returns (see send.go).
// rx is private to the auto-generated API code.
// Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close.
func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) {
@@ -176,7 +195,7 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err
// If the chunk was uploaded successfully, but there's still
// more to go, upload the next chunk without any delay.
- if status == statusResumeIncomplete {
+ if statusResumeIncomplete(resp) {
pause = 0
backoff.Reset()
resp.Body.Close()
diff --git a/vendor/google.golang.org/api/gensupport/retry.go b/vendor/google.golang.org/api/gensupport/retry.go
index 7f83d1da9..c60b3c394 100644
--- a/vendor/google.golang.org/api/gensupport/retry.go
+++ b/vendor/google.golang.org/api/gensupport/retry.go
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package gensupport
import (
@@ -55,23 +69,17 @@ func DefaultBackoffStrategy() BackoffStrategy {
// shouldRetry returns true if the HTTP response / error indicates that the
// request should be attempted again.
func shouldRetry(status int, err error) bool {
- // Retry for 5xx response codes.
- if 500 <= status && status < 600 {
+ if 500 <= status && status <= 599 {
return true
}
-
- // Retry on statusTooManyRequests{
if status == statusTooManyRequests {
return true
}
-
- // Retry on unexpected EOFs and temporary network errors.
if err == io.ErrUnexpectedEOF {
return true
}
if err, ok := err.(net.Error); ok {
return err.Temporary()
}
-
return false
}
diff --git a/vendor/google.golang.org/api/gensupport/send.go b/vendor/google.golang.org/api/gensupport/send.go
new file mode 100644
index 000000000..3d22f638f
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/send.go
@@ -0,0 +1,55 @@
+// Copyright 2016 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 gensupport
+
+import (
+ "net/http"
+
+ "golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
+)
+
+// Hook is the type of a function that is called once before each HTTP request
+// that is sent by a generated API. It returns a function that is called after
+// the request returns.
+// Hooks are not called if the context is nil.
+type Hook func(ctx context.Context, req *http.Request) func(resp *http.Response)
+
+var hooks []Hook
+
+// RegisterHook registers a Hook to be called before each HTTP request by a
+// generated API. Hooks are called in the order they are registered. Each
+// hook can return a function; if it is non-nil, it is called after the HTTP
+// request returns. These functions are called in the reverse order.
+// RegisterHook should not be called concurrently with itself or SendRequest.
+func RegisterHook(h Hook) {
+ hooks = append(hooks, h)
+}
+
+// SendRequest sends a single HTTP request using the given client.
+// If ctx is non-nil, it calls all hooks, then sends the request with
+// ctxhttp.Do, then calls any functions returned by the hooks in reverse order.
+func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
+ if ctx == nil {
+ return client.Do(req)
+ }
+ // Call hooks in order of registration, store returned funcs.
+ post := make([]func(resp *http.Response), len(hooks))
+ for i, h := range hooks {
+ fn := h(ctx, req)
+ post[i] = fn
+ }
+
+ // Send request.
+ resp, err := ctxhttp.Do(ctx, client, req)
+
+ // Call returned funcs in reverse order.
+ for i := len(post) - 1; i >= 0; i-- {
+ if fn := post[i]; fn != nil {
+ fn(resp)
+ }
+ }
+ return resp, err
+}
diff --git a/vendor/gopkg.in/xmlpath.v2/LICENSE b/vendor/gopkg.in/xmlpath.v2/LICENSE
deleted file mode 100644
index 4ccd784ba..000000000
--- a/vendor/gopkg.in/xmlpath.v2/LICENSE
+++ /dev/null
@@ -1,187 +0,0 @@
-Copyright (c) 2013-2014 Canonical Inc.
-
-This software is licensed under the LGPLv3, included below.
-
-As a special exception to the GNU Lesser General Public License version 3
-("LGPL3"), the copyright holders of this Library give you permission to
-convey to a third party a Combined Work that links statically or dynamically
-to this Library without providing any Minimal Corresponding Source or
-Minimal Application Code as set out in 4d or providing the installation
-information set out in section 4e, provided that you comply with the other
-provisions of LGPL3 and provided that you meet, for the Application the
-terms and conditions of the license(s) which apply to the Application.
-
-Except as stated in this special exception, the provisions of LGPL3 will
-continue to comply in full to this Library. If you modify this Library, you
-may apply this exception to your version of this Library, but you are not
-obliged to do so. If you do not wish to do so, delete this exception
-statement from your version. This exception does not (and cannot) modify any
-license terms which apply to the Application, with which you must still
-comply.
-
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/vendor/gopkg.in/xmlpath.v2/README.md b/vendor/gopkg.in/xmlpath.v2/README.md
deleted file mode 100644
index 4d10f697b..000000000
--- a/vendor/gopkg.in/xmlpath.v2/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-Installation and usage
-----------------------
-
-See [gopkg.in/xmlpath.v2](https://gopkg.in/xmlpath.v2) for documentation and usage details.
diff --git a/vendor/gopkg.in/xmlpath.v2/cmd/webpath/main.go b/vendor/gopkg.in/xmlpath.v2/cmd/webpath/main.go
deleted file mode 100644
index 0f66d40cc..000000000
--- a/vendor/gopkg.in/xmlpath.v2/cmd/webpath/main.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "gopkg.in/xmlpath.v2"
- "io"
- "net/http"
- "os"
- "regexp"
- "strings"
-)
-
-var all = flag.Bool("all", false, "print all occurrences rather than the first one")
-var trim = flag.Bool("trim", false, "trim spaces around results")
-var line = flag.Bool("line", false, "reformat each match as a single line")
-var quiet = flag.Bool("q", false, "run quietly with no stdout output")
-
-func main() {
- flag.Parse()
- if len(flag.Args()) != 2 {
- fmt.Fprintf(os.Stderr, "usage: webpath \n")
- os.Exit(1)
- }
-
- if err := run(); err != nil {
- fmt.Fprintf(os.Stderr, "error: %v\n", err)
- os.Exit(1)
- }
-}
-
-var whitespace = regexp.MustCompile("[ \t\n]+")
-
-func run() error {
- args := flag.Args()
-
- path, err := xmlpath.Compile(args[0])
- if err != nil {
- return err
- }
-
- loc := args[1]
-
- var body io.Reader
- if strings.HasPrefix(loc, "https:") || strings.HasPrefix(loc, "http:") {
- resp, err := http.Get(args[1])
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- body = resp.Body
- } else {
- file, err := os.Open(loc)
- if err != nil {
- return err
- }
- defer file.Close()
- body = file
- }
-
- n, err := xmlpath.ParseHTML(body)
- if err != nil {
- return err
- }
-
- iter := path.Iter(n)
- ok := false
- for iter.Next() {
- ok = true
- if *quiet {
- break
- }
- s := iter.Node().String()
- if *line {
- s = strings.TrimSpace(whitespace.ReplaceAllString(s, " "))
- } else if *trim {
- s = strings.TrimSpace(s)
- }
- fmt.Println(s)
- if !*all {
- break
- }
- }
- if !ok {
- os.Exit(1)
- }
- return nil
-}
diff --git a/vendor/gopkg.in/xmlpath.v2/doc.go b/vendor/gopkg.in/xmlpath.v2/doc.go
deleted file mode 100644
index e81d7370a..000000000
--- a/vendor/gopkg.in/xmlpath.v2/doc.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Package xmlpath implements a strict subset of the XPath specification for the Go language.
-//
-// The XPath specification is available at:
-//
-// http://www.w3.org/TR/xpath
-//
-// Path expressions supported by this package are in the following format,
-// with all components being optional:
-//
-// /axis-name::node-test[predicate]/axis-name::node-test[predicate]
-//
-// At the moment, xmlpath is compatible with the XPath specification
-// to the following extent:
-//
-// - All axes are supported ("child", "following-sibling", etc)
-// - All abbreviated forms are supported (".", "//", etc)
-// - All node types except for namespace are supported
-// - Predicates may be [N], [path], [not(path)], [path=literal] or [contains(path, literal)]
-// - Predicates may be joined with "or", "and", and parenthesis
-// - Richer expressions and namespaces are not supported
-//
-// For example, assuming the following document:
-//
-//
-//
-//
-// 0836217462
-// Being a Dog Is a Full-Time Job
-// I'd dog paddle the deepest ocean.
-//
-//
-// Charles M Schulz
-// 1922-11-26
-// 2000-02-12
-//
-//
-// Peppermint Patty
-// 1966-08-22
-// bold, brash and tomboyish
-//
-//
-// Snoopy
-// 1950-10-04
-// extroverted beagle
-//
-//
-//
-//
-// The following examples are valid path expressions, and the first
-// match has the indicated value:
-//
-// /library/book/isbn => "0836217462"
-// library/*/isbn => "0836217462"
-// /library/book/../book/./isbn => "0836217462"
-// /library/book/character[2]/name => "Snoopy"
-// /library/book/character[born='1950-10-04']/name => "Snoopy"
-// /library/book//node()[@id='PP']/name => "Peppermint Patty"
-// //book[author/@id='CMS']/title => "Being a Dog Is a Full-Time Job",
-// /library/book/preceding::comment() => " Great book. "
-// //*[contains(born,'1922')]/name => "Charles M Schulz"
-// //*[@id='PP' or @id='Snoopy']/born => {"1966-08-22", "1950-10-04"}
-//
-// To run an expression, compile it, and then apply the compiled path to any
-// number of context nodes, from one or more parsed xml documents:
-//
-// path := xmlpath.MustCompile("/library/book/isbn")
-// root, err := xmlpath.Parse(file)
-// if err != nil {
-// log.Fatal(err)
-// }
-// if value, ok := path.String(root); ok {
-// fmt.Println("Found:", value)
-// }
-//
-package xmlpath
diff --git a/vendor/gopkg.in/xmlpath.v2/parser.go b/vendor/gopkg.in/xmlpath.v2/parser.go
deleted file mode 100644
index 64267aa49..000000000
--- a/vendor/gopkg.in/xmlpath.v2/parser.go
+++ /dev/null
@@ -1,396 +0,0 @@
-package xmlpath
-
-import (
- "golang.org/x/net/html"
- "encoding/xml"
- "io"
- "strings"
-)
-
-// Node is an item in an xml tree that was compiled to
-// be processed via xml paths. A node may represent:
-//
-// - An element in the xml document ()
-// - An attribute of an element in the xml document (href="...")
-// - A comment in the xml document ()
-// - A processing instruction in the xml document (...?>)
-// - Some text within the xml document
-//
-type Node struct {
- kind nodeKind
- name xml.Name
- attr string
- text []byte
-
- nodes []Node
- pos int
- end int
-
- up *Node
- down []*Node
-}
-
-type nodeKind int
-
-const (
- anyNode nodeKind = iota
- startNode
- endNode
- attrNode
- textNode
- commentNode
- procInstNode
-)
-
-// String returns the string value of node.
-//
-// The string value of a node is:
-//
-// - For element nodes, the concatenation of all text nodes within the element.
-// - For text nodes, the text itself.
-// - For attribute nodes, the attribute value.
-// - For comment nodes, the text within the comment delimiters.
-// - For processing instruction nodes, the content of the instruction.
-//
-func (node *Node) String() string {
- if node.kind == attrNode {
- return node.attr
- }
- return string(node.Bytes())
-}
-
-// Bytes returns the string value of node as a byte slice.
-// See Node.String for a description of what the string value of a node is.
-func (node *Node) Bytes() []byte {
- if node.kind == attrNode {
- return []byte(node.attr)
- }
- if node.kind != startNode {
- return node.text
- }
- size := 0
- for i := node.pos; i < node.end; i++ {
- if node.nodes[i].kind == textNode {
- size += len(node.nodes[i].text)
- }
- }
- text := make([]byte, 0, size)
- for i := node.pos; i < node.end; i++ {
- if node.nodes[i].kind == textNode {
- text = append(text, node.nodes[i].text...)
- }
- }
- return text
-}
-
-// equals returns whether the string value of node is equal to s,
-// without allocating memory.
-func (node *Node) equals(s string) bool {
- if node.kind == attrNode {
- return s == node.attr
- }
- if node.kind != startNode {
- if len(s) != len(node.text) {
- return false
- }
- for i := range s {
- if s[i] != node.text[i] {
- return false
- }
- }
- return true
- }
- si := 0
- for i := node.pos; i < node.end; i++ {
- if node.nodes[i].kind == textNode {
- for _, c := range node.nodes[i].text {
- if si > len(s) {
- return false
- }
- if s[si] != c {
- return false
- }
- si++
- }
- }
- }
- return si == len(s)
-}
-
-// contains returns whether the string value of node contains s,
-// without allocating memory.
-func (node *Node) contains(s string) (ok bool) {
- if len(s) == 0 {
- return true
- }
- if node.kind == attrNode {
- return strings.Contains(node.attr, s)
- }
- s0 := s[0]
- for i := node.pos; i < node.end; i++ {
- if node.nodes[i].kind == textNode {
- text := node.nodes[i].text
- NextTry:
- for ci, c := range text {
- if c != s0 {
- continue
- }
- si := 1
- for ci++; ci < len(text) && si < len(s); ci++ {
- if s[si] != text[ci] {
- continue NextTry
- }
- si++
- }
- if si == len(s) {
- return true
- }
- for j := i + 1; j < node.end; j++ {
- if node.nodes[j].kind == textNode {
- for _, c := range node.nodes[j].text {
- if s[si] != c {
- continue NextTry
- }
- si++
- if si == len(s) {
- return true
- }
- }
- }
- }
- }
- }
- }
- return false
-}
-
-// Parse reads an xml document from r, parses it, and returns its root node.
-func Parse(r io.Reader) (*Node, error) {
- return ParseDecoder(xml.NewDecoder(r))
-}
-
-// ParseDecoder parses the xml document being decoded by d and returns
-// its root node.
-func ParseDecoder(d *xml.Decoder) (*Node, error) {
- var nodes []Node
- var text []byte
-
- // The root node.
- nodes = append(nodes, Node{kind: startNode})
-
- for {
- t, err := d.Token()
- if err == io.EOF {
- break
- }
- if err != nil {
- return nil, err
- }
- switch t := t.(type) {
- case xml.EndElement:
- nodes = append(nodes, Node{
- kind: endNode,
- })
- case xml.StartElement:
- nodes = append(nodes, Node{
- kind: startNode,
- name: t.Name,
- })
- for _, attr := range t.Attr {
- nodes = append(nodes, Node{
- kind: attrNode,
- name: attr.Name,
- attr: attr.Value,
- })
- }
- case xml.CharData:
- texti := len(text)
- text = append(text, t...)
- nodes = append(nodes, Node{
- kind: textNode,
- text: text[texti : texti+len(t)],
- })
- case xml.Comment:
- texti := len(text)
- text = append(text, t...)
- nodes = append(nodes, Node{
- kind: commentNode,
- text: text[texti : texti+len(t)],
- })
- case xml.ProcInst:
- texti := len(text)
- text = append(text, t.Inst...)
- nodes = append(nodes, Node{
- kind: procInstNode,
- name: xml.Name{Local: t.Target},
- text: text[texti : texti+len(t.Inst)],
- })
- }
- }
-
- // Close the root node.
- nodes = append(nodes, Node{kind: endNode})
-
- stack := make([]*Node, 0, len(nodes))
- downs := make([]*Node, len(nodes))
- downCount := 0
-
- for pos := range nodes {
-
- switch nodes[pos].kind {
-
- case startNode, attrNode, textNode, commentNode, procInstNode:
- node := &nodes[pos]
- node.nodes = nodes
- node.pos = pos
- if len(stack) > 0 {
- node.up = stack[len(stack)-1]
- }
- if node.kind == startNode {
- stack = append(stack, node)
- } else {
- node.end = pos + 1
- }
-
- case endNode:
- node := stack[len(stack)-1]
- node.end = pos
- stack = stack[:len(stack)-1]
-
- // Compute downs. Doing that here is what enables the
- // use of a slice of a contiguous pre-allocated block.
- node.down = downs[downCount:downCount]
- for i := node.pos + 1; i < node.end; i++ {
- if nodes[i].up == node {
- switch nodes[i].kind {
- case startNode, textNode, commentNode, procInstNode:
- node.down = append(node.down, &nodes[i])
- downCount++
- }
- }
- }
- if len(stack) == 0 {
- return node, nil
- }
- }
- }
- return nil, io.EOF
-}
-
-// ParseHTML reads an HTML document from r, parses it using a proper HTML
-// parser, and returns its root node.
-//
-// The document will be processed as a properly structured HTML document,
-// emulating the behavior of a browser when processing it. This includes
-// putting the content inside proper and tags, if the
-// provided text misses them.
-func ParseHTML(r io.Reader) (*Node, error) {
- ns, err := html.ParseFragment(r, nil)
- if err != nil {
- return nil, err
- }
-
- var nodes []Node
- var text []byte
-
- n := ns[0]
-
- // The root node.
- nodes = append(nodes, Node{kind: startNode})
-
- for n != nil {
- switch n.Type {
- case html.DocumentNode:
- case html.ElementNode:
- nodes = append(nodes, Node{
- kind: startNode,
- name: xml.Name{Local: n.Data, Space: n.Namespace},
- })
- for _, attr := range n.Attr {
- nodes = append(nodes, Node{
- kind: attrNode,
- name: xml.Name{Local: attr.Key, Space: attr.Namespace},
- attr: attr.Val,
- })
- }
- case html.TextNode:
- texti := len(text)
- text = append(text, n.Data...)
- nodes = append(nodes, Node{
- kind: textNode,
- text: text[texti : texti+len(n.Data)],
- })
- case html.CommentNode:
- texti := len(text)
- text = append(text, n.Data...)
- nodes = append(nodes, Node{
- kind: commentNode,
- text: text[texti : texti+len(n.Data)],
- })
- }
-
- if n.FirstChild != nil {
- n = n.FirstChild
- continue
- }
-
- for n != nil {
- if n.Type == html.ElementNode {
- nodes = append(nodes, Node{kind: endNode})
- }
- if n.NextSibling != nil {
- n = n.NextSibling
- break
- }
- n = n.Parent
- }
- }
-
- // Close the root node.
- nodes = append(nodes, Node{kind: endNode})
-
- stack := make([]*Node, 0, len(nodes))
- downs := make([]*Node, len(nodes))
- downCount := 0
-
- for pos := range nodes {
-
- switch nodes[pos].kind {
-
- case startNode, attrNode, textNode, commentNode, procInstNode:
- node := &nodes[pos]
- node.nodes = nodes
- node.pos = pos
- if len(stack) > 0 {
- node.up = stack[len(stack)-1]
- }
- if node.kind == startNode {
- stack = append(stack, node)
- } else {
- node.end = pos + 1
- }
-
- case endNode:
- node := stack[len(stack)-1]
- node.end = pos
- stack = stack[:len(stack)-1]
-
- // Compute downs. Doing that here is what enables the
- // use of a slice of a contiguous pre-allocated block.
- node.down = downs[downCount:downCount]
- for i := node.pos + 1; i < node.end; i++ {
- if nodes[i].up == node {
- switch nodes[i].kind {
- case startNode, textNode, commentNode, procInstNode:
- node.down = append(node.down, &nodes[i])
- downCount++
- }
- }
- }
- if len(stack) == 0 {
- return node, nil
- }
- }
- }
- return nil, io.EOF
-}
diff --git a/vendor/gopkg.in/xmlpath.v2/path.go b/vendor/gopkg.in/xmlpath.v2/path.go
deleted file mode 100644
index db38ed573..000000000
--- a/vendor/gopkg.in/xmlpath.v2/path.go
+++ /dev/null
@@ -1,790 +0,0 @@
-package xmlpath
-
-import (
- "fmt"
- "strconv"
- "unicode/utf8"
-)
-
-// Path is a compiled path that can be applied to a context
-// node to obtain a matching node set.
-// A single Path can be applied concurrently to any number
-// of context nodes.
-type Path struct {
- path string
- steps []pathStep
-}
-
-// Iter returns an iterator that goes over the list of nodes
-// that p matches on the given context.
-func (p *Path) Iter(context *Node) *Iter {
- iter := Iter{
- make([]pathStepState, len(p.steps)),
- make([]bool, len(context.nodes)),
- }
- for i := range p.steps {
- iter.state[i].step = &p.steps[i]
- }
- iter.state[0].init(context)
- return &iter
-}
-
-// Exists returns whether any nodes match p on the given context.
-func (p *Path) Exists(context *Node) bool {
- return p.Iter(context).Next()
-}
-
-// String returns the string value of the first node matched
-// by p on the given context.
-//
-// See the documentation of Node.String.
-func (p *Path) String(context *Node) (s string, ok bool) {
- iter := p.Iter(context)
- if iter.Next() {
- return iter.Node().String(), true
- }
- return "", false
-}
-
-// Bytes returns as a byte slice the string value of the first
-// node matched by p on the given context.
-//
-// See the documentation of Node.String.
-func (p *Path) Bytes(node *Node) (b []byte, ok bool) {
- iter := p.Iter(node)
- if iter.Next() {
- return iter.Node().Bytes(), true
- }
- return nil, false
-}
-
-// Iter iterates over node sets.
-type Iter struct {
- state []pathStepState
- seen []bool
-}
-
-// Node returns the current node.
-// Must only be called after Iter.Next returns true.
-func (iter *Iter) Node() *Node {
- state := iter.state[len(iter.state)-1]
- if state.pos == 0 {
- panic("Iter.Node called before Iter.Next")
- }
- if state.node == nil {
- panic("Iter.Node called after Iter.Next false")
- }
- return state.node
-}
-
-// Next iterates to the next node in the set, if any, and
-// returns whether there is a node available.
-func (iter *Iter) Next() bool {
- tip := len(iter.state) - 1
-outer:
- for {
- for !iter.state[tip].next() {
- tip--
- if tip == -1 {
- return false
- }
- }
- for tip < len(iter.state)-1 {
- tip++
- iter.state[tip].init(iter.state[tip-1].node)
- if !iter.state[tip].next() {
- tip--
- continue outer
- }
- }
- if iter.seen[iter.state[tip].node.pos] {
- continue
- }
- iter.seen[iter.state[tip].node.pos] = true
- return true
- }
- panic("unreachable")
-}
-
-type pathStepState struct {
- step *pathStep
- node *Node
- pos int
- idx int
- aux int
-}
-
-func (s *pathStepState) init(node *Node) {
- s.node = node
- s.pos = 0
- s.idx = 0
- s.aux = 0
-}
-
-func (s *pathStepState) next() bool {
- for s._next() {
- s.pos++
- if s.step.pred == nil || s.test(s.step.pred) {
- return true
- }
- }
- return false
-}
-
-func (s *pathStepState) test(pred predicate) bool {
- switch pred := pred.(type) {
- case positionPredicate:
- if pred.pos == s.pos {
- return true
- }
- case existsPredicate:
- if pred.path.Exists(s.node) {
- return true
- }
- case equalsPredicate:
- iter := pred.path.Iter(s.node)
- for iter.Next() {
- if iter.Node().equals(pred.value) {
- return true
- }
- }
- case containsPredicate:
- iter := pred.path.Iter(s.node)
- for iter.Next() {
- if iter.Node().contains(pred.value) {
- return true
- }
- }
- case notPredicate:
- iter := pred.path.Iter(s.node)
- if !iter.Next() {
- return true
- }
- case andPredicate:
- for _, sub := range pred.sub {
- if !s.test(sub) {
- return false
- }
- }
- return true
- case orPredicate:
- for _, sub := range pred.sub {
- if s.test(sub) {
- return true
- }
- }
- default:
- panic(fmt.Sprintf("internal error: unknown predicate type: %#v", s.step.pred))
- }
- return false
-}
-
-func (s *pathStepState) _next() bool {
- if s.node == nil {
- return false
- }
- if s.step.root && s.idx == 0 {
- for s.node.up != nil {
- s.node = s.node.up
- }
- }
-
- switch s.step.axis {
-
- case "self":
- if s.idx == 0 && s.step.match(s.node) {
- s.idx++
- return true
- }
-
- case "parent":
- if s.idx == 0 && s.node.up != nil && s.step.match(s.node.up) {
- s.idx++
- s.node = s.node.up
- return true
- }
-
- case "ancestor", "ancestor-or-self":
- if s.idx == 0 && s.step.axis == "ancestor-or-self" {
- s.idx++
- if s.step.match(s.node) {
- return true
- }
- }
- for s.node.up != nil {
- s.node = s.node.up
- s.idx++
- if s.step.match(s.node) {
- return true
- }
- }
-
- case "child":
- var down []*Node
- if s.idx == 0 {
- down = s.node.down
- } else {
- down = s.node.up.down
- }
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "descendant", "descendant-or-self":
- if s.idx == 0 {
- s.idx = s.node.pos
- s.aux = s.node.end
- if s.step.axis == "descendant" {
- s.idx++
- }
- }
- for s.idx < s.aux {
- node := &s.node.nodes[s.idx]
- s.idx++
- if node.kind == attrNode {
- continue
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "following":
- if s.idx == 0 {
- s.idx = s.node.end
- }
- for s.idx < len(s.node.nodes) {
- node := &s.node.nodes[s.idx]
- s.idx++
- if node.kind == attrNode {
- continue
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "following-sibling":
- var down []*Node
- if s.node.up != nil {
- down = s.node.up.down
- if s.idx == 0 {
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if node == s.node {
- break
- }
- }
- }
- }
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "preceding":
- if s.idx == 0 {
- s.aux = s.node.pos // Detect ancestors.
- s.idx = s.node.pos - 1
- }
- for s.idx >= 0 {
- node := &s.node.nodes[s.idx]
- s.idx--
- if node.kind == attrNode {
- continue
- }
- if node == s.node.nodes[s.aux].up {
- s.aux = s.node.nodes[s.aux].up.pos
- continue
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "preceding-sibling":
- var down []*Node
- if s.node.up != nil {
- down = s.node.up.down
- if s.aux == 0 {
- s.aux = 1
- for s.idx < len(down) {
- node := down[s.idx]
- s.idx++
- if node == s.node {
- s.idx--
- break
- }
- }
- }
- }
- for s.idx >= 0 {
- node := down[s.idx]
- s.idx--
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- case "attribute":
- if s.idx == 0 {
- s.idx = s.node.pos + 1
- s.aux = s.node.end
- }
- for s.idx < s.aux {
- node := &s.node.nodes[s.idx]
- s.idx++
- if node.kind != attrNode {
- break
- }
- if s.step.match(node) {
- s.node = node
- return true
- }
- }
-
- }
-
- s.node = nil
- return false
-}
-
-type positionPredicate struct {
- pos int
-}
-
-type existsPredicate struct {
- path *Path
-}
-
-type equalsPredicate struct {
- path *Path
- value string
-}
-
-type containsPredicate struct {
- path *Path
- value string
-}
-
-type notPredicate struct {
- path *Path
-}
-
-type andPredicate struct {
- sub []predicate
-}
-
-type orPredicate struct {
- sub []predicate
-}
-
-// predicate is a marker interface for predicate types.
-type predicate interface {
- predicate()
-}
-
-func (positionPredicate) predicate() {}
-func (existsPredicate) predicate() {}
-func (equalsPredicate) predicate() {}
-func (containsPredicate) predicate() {}
-func (notPredicate) predicate() {}
-func (andPredicate) predicate() {}
-func (orPredicate) predicate() {}
-
-type pathStep struct {
- root bool
- axis string
- name string
- kind nodeKind
- pred predicate
-}
-
-func (step *pathStep) match(node *Node) bool {
- return node.kind != endNode &&
- (step.kind == anyNode || step.kind == node.kind) &&
- (step.name == "*" || node.name.Local == step.name)
-}
-
-// MustCompile returns the compiled path, and panics if
-// there are any errors.
-func MustCompile(path string) *Path {
- e, err := Compile(path)
- if err != nil {
- panic(err)
- }
- return e
-}
-
-// Compile returns the compiled path.
-func Compile(path string) (*Path, error) {
- c := pathCompiler{path, 0}
- if path == "" {
- return nil, c.errorf("empty path")
- }
- p, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- return p, nil
-}
-
-type pathCompiler struct {
- path string
- i int
-}
-
-func (c *pathCompiler) errorf(format string, args ...interface{}) error {
- return fmt.Errorf("compiling xml path %q:%d: %s", c.path, c.i, fmt.Sprintf(format, args...))
-}
-
-func (c *pathCompiler) parsePath() (path *Path, err error) {
- var steps []pathStep
- var start = c.i
- for {
- step := pathStep{axis: "child"}
-
- c.skipSpaces()
- if c.i == 0 && c.skipByte('/') {
- c.skipSpaces()
- step.root = true
- if len(c.path) == 1 {
- step.name = "*"
- }
- }
- if c.peekByte('/') {
- step.axis = "descendant-or-self"
- step.name = "*"
- } else if c.skipByte('@') {
- mark := c.i
- if !c.skipName() {
- return nil, c.errorf("missing name after @")
- }
- step.axis = "attribute"
- step.name = c.path[mark:c.i]
- step.kind = attrNode
- } else {
- mark := c.i
- if c.skipName() {
- step.name = c.path[mark:c.i]
- c.skipSpaces()
- }
- if step.name == "" {
- return nil, c.errorf("missing name")
- } else if step.name == "*" {
- step.kind = startNode
- } else if step.name == "." {
- step.axis = "self"
- step.name = "*"
- } else if step.name == ".." {
- step.axis = "parent"
- step.name = "*"
- } else {
- if c.skipByte(':') {
- if !c.skipByte(':') {
- return nil, c.errorf("missing ':'")
- }
- c.skipSpaces()
- switch step.name {
- case "attribute":
- step.kind = attrNode
- case "self", "child", "parent":
- case "descendant", "descendant-or-self":
- case "ancestor", "ancestor-or-self":
- case "following", "following-sibling":
- case "preceding", "preceding-sibling":
- default:
- return nil, c.errorf("unsupported axis: %q", step.name)
- }
- step.axis = step.name
-
- mark = c.i
- if !c.skipName() {
- return nil, c.errorf("missing name")
- }
- step.name = c.path[mark:c.i]
-
- c.skipSpaces()
- }
- if c.skipByte('(') {
- c.skipSpaces()
- conflict := step.kind != anyNode
- switch step.name {
- case "node":
- // must be anyNode
- case "text":
- step.kind = textNode
- case "comment":
- step.kind = commentNode
- case "processing-instruction":
- step.kind = procInstNode
- default:
- return nil, c.errorf("unsupported expression: %s()", step.name)
- }
- if conflict {
- return nil, c.errorf("%s() cannot succeed on axis %q", step.name, step.axis)
- }
-
- name := step.name
- literal, err := c.parseLiteral()
- if err == errNoLiteral {
- step.name = "*"
- } else if err != nil {
- return nil, c.errorf("%v", err)
- } else if step.kind == procInstNode {
- c.skipSpaces()
- step.name = literal
- } else {
- return nil, c.errorf("%s() has no arguments", name)
- }
- if !c.skipByte(')') {
- return nil, c.errorf("%s() missing ')'", name)
- }
- c.skipSpaces()
- } else if step.name == "*" && step.kind == anyNode {
- step.kind = startNode
- }
- }
- }
- if c.skipByte('[') {
- c.skipSpaces()
- type state struct {
- sub []predicate
- and bool
- }
- var stack []state
- var sub []predicate
- var and bool
- NextPred:
- if c.skipByte('(') {
- stack = append(stack, state{sub, and})
- sub = nil
- and = false
- }
- var next predicate
- if pos, ok := c.parseInt(); ok {
- if pos == 0 {
- return nil, c.errorf("positions start at 1")
- }
- next = positionPredicate{pos}
- } else if c.skipString("contains(") {
- path, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- c.skipSpaces()
- if !c.skipByte(',') {
- return nil, c.errorf("contains() expected ',' followed by a literal string")
- }
- c.skipSpaces()
- value, err := c.parseLiteral()
- if err != nil {
- return nil, err
- }
- c.skipSpaces()
- if !c.skipByte(')') {
- return nil, c.errorf("contains() missing ')'")
- }
- next = containsPredicate{path, value}
- } else if c.skipString("not(") {
- // TODO Generalize to handle any predicate expression.
- path, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- c.skipSpaces()
- if !c.skipByte(')') {
- return nil, c.errorf("not() missing ')'")
- }
- next = notPredicate{path}
- } else {
- path, err := c.parsePath()
- if err != nil {
- return nil, err
- }
- if path.path[0] == '-' {
- if _, err = strconv.Atoi(path.path); err == nil {
- return nil, c.errorf("positions must be positive")
- }
- }
- c.skipSpaces()
- if c.skipByte('=') {
- c.skipSpaces()
- value, err := c.parseLiteral()
- if err != nil {
- return nil, c.errorf("%v", err)
- }
- next = equalsPredicate{path, value}
- } else {
- next = existsPredicate{path}
- }
- }
- HandleNext:
- if and {
- p := sub[len(sub)-1].(andPredicate)
- p.sub = append(p.sub, next)
- sub[len(sub)-1] = p
- } else {
- sub = append(sub, next)
- }
- if c.skipSpaces() {
- mark := c.i
- if c.skipString("and") && c.skipSpaces() {
- if !and {
- and = true
- sub[len(sub)-1] = andPredicate{[]predicate{sub[len(sub)-1]}}
- }
- goto NextPred
- } else if c.skipString("or") && c.skipSpaces() {
- and = false
- goto NextPred
- } else {
- c.i = mark
- }
- }
- if c.skipByte(')') {
- if len(stack) == 0 {
- return nil, c.errorf("unexpected ')'")
- }
- if len(sub) == 1 {
- next = sub[0]
- } else {
- next = orPredicate{sub}
- }
- s := stack[len(stack)-1]
- stack = stack[:len(stack)-1]
- sub = s.sub
- and = s.and
- goto HandleNext
- }
- if len(stack) > 0 {
- return nil, c.errorf("expected ')'")
- }
- if len(sub) == 1 {
- step.pred = sub[0]
- } else {
- step.pred = orPredicate{sub}
- }
- if !c.skipByte(']') {
- return nil, c.errorf("expected ']'")
- }
- c.skipSpaces()
- }
- steps = append(steps, step)
- //fmt.Printf("step: %#v\n", step)
- if !c.skipByte('/') {
- if (start == 0 || start == c.i) && c.i < len(c.path) {
- return nil, c.errorf("unexpected %q", c.path[c.i])
- }
- return &Path{steps: steps, path: c.path[start:c.i]}, nil
- }
- }
- panic("unreachable")
-}
-
-var errNoLiteral = fmt.Errorf("expected a literal string")
-
-func (c *pathCompiler) parseLiteral() (string, error) {
- if c.skipByte('"') {
- mark := c.i
- if !c.skipByteFind('"') {
- return "", fmt.Errorf(`missing '"'`)
- }
- return c.path[mark : c.i-1], nil
- }
- if c.skipByte('\'') {
- mark := c.i
- if !c.skipByteFind('\'') {
- return "", fmt.Errorf(`missing "'"`)
- }
- return c.path[mark : c.i-1], nil
- }
- return "", errNoLiteral
-}
-
-func (c *pathCompiler) parseInt() (v int, ok bool) {
- mark := c.i
- for c.i < len(c.path) && c.path[c.i] >= '0' && c.path[c.i] <= '9' {
- v *= 10
- v += int(c.path[c.i]) - '0'
- c.i++
- }
- if c.i == mark {
- return 0, false
- }
- return v, true
-}
-
-func (c *pathCompiler) skipByte(b byte) bool {
- if c.i < len(c.path) && c.path[c.i] == b {
- c.i++
- return true
- }
- return false
-}
-
-func (c *pathCompiler) skipByteFind(b byte) bool {
- for i := c.i; i < len(c.path); i++ {
- if c.path[i] == b {
- c.i = i + 1
- return true
- }
- }
- return false
-}
-
-func (c *pathCompiler) peekByte(b byte) bool {
- return c.i < len(c.path) && c.path[c.i] == b
-}
-
-func (c *pathCompiler) skipSpaces() bool {
- mark := c.i
- for c.i < len(c.path) {
- if c.path[c.i] != ' ' {
- break
- }
- c.i++
- }
- return c.i != mark
-}
-
-func (c *pathCompiler) skipString(s string) bool {
- if c.i+len(s) <= len(c.path) && c.path[c.i:c.i+len(s)] == s {
- c.i += len(s)
- return true
- }
- return false
-}
-
-func (c *pathCompiler) skipName() bool {
- if c.i >= len(c.path) {
- return false
- }
- if c.path[c.i] == '*' {
- c.i++
- return true
- }
- start := c.i
- for c.i < len(c.path) && (c.path[c.i] >= utf8.RuneSelf || isNameByte(c.path[c.i])) {
- c.i++
- }
- return c.i > start
-}
-
-func isNameByte(c byte) bool {
- return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '_' || c == '.' || c == '-'
-}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index d8aac32d0..f9b17b648 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -119,12 +119,108 @@
"path": "github.com/Azure/go-ntlmssp",
"revision": "e0b63eb299a769ea4b04dadfe530f6074b277afb"
},
+ {
+ "checksumSHA1": "++XyYR/ZfYoCxGn5vTlXzQZ9eo0=",
+ "path": "github.com/ChrisTrenkamp/goxpath",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "1+6R+HYdVVS4O8VOqVCIqSKi+oY=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/execxp",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "71fcaKxTSwiQzcTFTyCiqdd/8EU=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/lexer",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "BjldQE0Gsl7CbqFa4wLQpzhmX64=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/parser",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "Use9Tov7dtRIy/gv3GixcpEX5iA=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/parser/findutil",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "s2jqwMBbEzDDUQrEYZF++NzQ+7I=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/parser/intfns",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "zpOX2X+RjsnqZSmz3GWFq1lzOrU=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/parser/pathexpr",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "ujivLLH1kuIm2qom2NFTSH5OUvQ=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/xconst",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "wlR2+4lvPs2YWYZAkBrSA0gKe9I=",
+ "path": "github.com/ChrisTrenkamp/goxpath/internal/xsort",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "krxNPvjZJdXdhUGNkGW8JhOcT/c=",
+ "path": "github.com/ChrisTrenkamp/goxpath/tree",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "5XIJCUHiiwINtP9GrIs4wx+KSGA=",
+ "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "6Lbaq/4cANAcTffrBEuNvCi2msA=",
+ "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "KsQub+ZaW39dp9tDTYNKXlxaZgk=",
+ "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
+ {
+ "checksumSHA1": "2ZSbmMkCfHuLQanoHtVD7/kTygs=",
+ "path": "github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode",
+ "revision": "4fe03583929022c9c96829401ffabc755e69782e",
+ "revisionTime": "2017-06-25T21:53:50Z"
+ },
{
"checksumSHA1": "HttiPj314X1a0i2Jen1p6lRH/vE=",
"path": "github.com/aliyun/aliyun-oss-go-sdk/oss",
"revision": "e6dbea820a9f304b43d3b357dd48ced23b86df72",
"revisionTime": "2017-01-13T02:27:42Z"
},
+ {
+ "checksumSHA1": "taUAhOa8gx2Hxqo32pXQWhi7Bhg=",
+ "path": "github.com/antchfx/xpath",
+ "revision": "b5c552e1acbdd77b5e369eab0efd1e0f9d7090e4",
+ "revisionTime": "2017-07-28T05:37:31Z"
+ },
+ {
+ "checksumSHA1": "4X1rYuDMZj8Bkr1LcEzigyKGrwQ=",
+ "path": "github.com/antchfx/xquery/xml",
+ "revision": "eb8c3c17260731e52f9420af1508a47bfaf217a8",
+ "revisionTime": "2017-07-30T11:54:35Z"
+ },
{
"checksumSHA1": "gc98KRYAAiw4g1FrSTsuggSNv8k=",
"path": "github.com/approvals/go-approval-tests",
@@ -146,233 +242,307 @@
"revision": "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2"
},
{
- "checksumSHA1": "ZjwjHipLn1qcBhMcS7iakI6xnwA=",
+ "checksumSHA1": "7vSTKBRZq6azJnhm1k6XmNxu97M=",
"path": "github.com/aws/aws-sdk-go",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "D7lKOBHog4Y/ETUWhgmTCcNyzHc=",
+ "checksumSHA1": "BRgDFkYJonSbN+/ugKMUuSXkS4c=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/awserr",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/awsutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "iThCyNRL/oQFD9CF2SYgBGl+aww=",
+ "checksumSHA1": "n98FANpNeRT5kf6pizdpI7nm6Sw=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/client",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/client/metadata",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "Fl8vRSCY0MbM04cmiz/0MID+goA=",
+ "checksumSHA1": "7/8j/q0TWtOgXyvEcv4B2Dhl00o=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/corehandlers",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "zu5C95rmCZff6NYZb62lEaT5ibE=",
+ "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "6cj/zsRmcxkE1TLS+v910GbQYg0=",
+ "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "lqh3fG7wCochvB4iHAZJuhhEJW0=",
+ "checksumSHA1": "ZdtYh3ZHSgP/WEIaqwJHTEhpkbs=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/defaults",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/ec2metadata",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "JTrzEDPXL3pUUH+dMCixz9T9rLY=",
+ "checksumSHA1": "W45tSKW4ZVgBk9H4lx5RbGi9OVg=",
"path": "github.com/aws/aws-sdk-go/aws/endpoints",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "M78rTxU55Qagqr3MYj91im2031E=",
+ "checksumSHA1": "Rdm9v0vpqsO1Ka9rwktfL19D8A8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/request",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "u6tKvFGcRQ1xtby1ONjgyUTgcpg=",
+ "checksumSHA1": "SK5Mn4Ga9+equOQTYA1DTSb3LWY=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/session",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "0FvPLvkBUpTElfUc/FZtPsJfuV0=",
+ "checksumSHA1": "1+ZxEwzc1Vz8X2l+kXkS2iATtas=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/signer/v4",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
+ },
+ {
+ "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=",
+ "path": "github.com/aws/aws-sdk-go/internal/shareddefaults",
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "1QmQ3FqV37w0Zi44qv8pA1GeR0A=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "O6hcK24yI6w7FA+g4Pbr+eQ7pys=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/query",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "hqTEmgtchF9SwVTW0IQId2eLUKM=",
+ "checksumSHA1": "Drt1JfLMa0DQEZLWrnMlTWaIcC8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "szZSLm3BlYkL3vqlZhNAlYk8iwM=",
+ "checksumSHA1": "VCTh+dEaqqhog5ncy/WTt9+/gFM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "lZ1z4xAbT8euCzKoAsnEYic60VE=",
+ "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "Eo9yODN5U99BK0pMzoqnBm7PCrY=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/waiter",
"revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revisionTime": "2017-02-24T22:28:38Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "ecCVL8+SptmQlojrGtL8mQdaJ6E=",
+ "checksumSHA1": "1mbCBXbu6m8bfRAq1+7Cul4VXkU=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/ec2",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "B6qHy1+Rrp9lQCBR/JDRT72kuCI=",
+ "checksumSHA1": "YNq7YhasHn9ceelWX2aG0Cg0Ga0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/ecr",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "eEWM4wKzVbRqAwIy3MdMCDUGs2s=",
+ "checksumSHA1": "SEKg+cGyOj6dKdK5ltUHsoL4R4Y=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "B3FgQ8T7ewtG+q0uLnofdFfp/TE=",
+ "checksumSHA1": "RVrBBPDYg3ViwQDLBanFehkdqkM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3/s3iface",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "Tr7Q8zpGveIlcort1+Og9hhG+hk=",
+ "checksumSHA1": "LlIpD3fzngPXshFh/5tuCWlrYzI=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3/s3manager",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "Knj17ZMPWkGYTm2hZxEgnuboMM4=",
+ "checksumSHA1": "MerduaV3PxtZAWvOGpgoBIglo38=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/sts",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "7SbTaY0kaYxgQrG3/9cjrI+BcyU=",
@@ -396,34 +566,34 @@
"revision": "6d212800a42e8ab5c146b8ace3490ee17e5225f9"
},
{
- "checksumSHA1": "4YIveqfMA1MH8oX8YMG7rDSl+ms=",
+ "checksumSHA1": "b2m7aICkBOz9JqmnX2kdDN4wgjI=",
"path": "github.com/denverdino/aliyungo/common",
- "revision": "920561accef9a3e387f10bf8f93be73d6bb55054",
- "revisionTime": "2017-05-25T09:08:54Z"
+ "revision": "b8a81c0f54003ea306ef566807919955d639cd48",
+ "revisionTime": "2017-08-02T08:24:47Z"
},
{
- "checksumSHA1": "x4l/zVF/J4ibAH39pNrSvTnFsPI=",
+ "checksumSHA1": "5UYxIc/DZ5g0SM7qwXskoyNOc78=",
"path": "github.com/denverdino/aliyungo/ecs",
- "revision": "920561accef9a3e387f10bf8f93be73d6bb55054",
- "revisionTime": "2017-05-25T09:08:54Z"
+ "revision": "b8a81c0f54003ea306ef566807919955d639cd48",
+ "revisionTime": "2017-08-02T08:24:47Z"
},
{
- "checksumSHA1": "40PbgN4Emct6AIiJbhPoEdd+vIA=",
+ "checksumSHA1": "VfIjW9Tf2eLmHrgrvk1wRnBaxTE=",
"path": "github.com/denverdino/aliyungo/ram",
- "revision": "920561accef9a3e387f10bf8f93be73d6bb55054",
- "revisionTime": "2017-05-25T09:08:54Z"
+ "revision": "b8a81c0f54003ea306ef566807919955d639cd48",
+ "revisionTime": "2017-08-02T08:24:47Z"
},
{
- "checksumSHA1": "iZftKqx5jdcEaMJNJhrb5QwmMuc=",
+ "checksumSHA1": "pQHH9wpyS0e4wpW0erxe3D7OILM=",
"path": "github.com/denverdino/aliyungo/slb",
- "revision": "920561accef9a3e387f10bf8f93be73d6bb55054",
- "revisionTime": "2017-05-25T09:08:54Z"
+ "revision": "b8a81c0f54003ea306ef566807919955d639cd48",
+ "revisionTime": "2017-08-02T08:24:47Z"
},
{
"checksumSHA1": "piZlmhWPLGxYkXLysTrjcXllO4c=",
"path": "github.com/denverdino/aliyungo/util",
- "revision": "920561accef9a3e387f10bf8f93be73d6bb55054",
- "revisionTime": "2017-05-25T09:08:54Z"
+ "revision": "b8a81c0f54003ea306ef566807919955d639cd48",
+ "revisionTime": "2017-08-02T08:24:47Z"
},
{
"checksumSHA1": "D37uI+U+FYvTJIdG2TTozXe7i7U=",
@@ -444,9 +614,10 @@
"revision": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
},
{
- "checksumSHA1": "by8KnjbSvP58haObPorGWR2CJfk=",
+ "checksumSHA1": "RNNn+CRYa4KxYIbs6W83JvMpZhw=",
"path": "github.com/dylanmei/winrmtest",
- "revision": "025617847eb2cf9bd1d851bc3b22ed28e6245ce5"
+ "revision": "c2fbb09e6c084fe3ebe95fce0f1cc5297c152026",
+ "revisionTime": "2017-08-19T15:36:34Z"
},
{
"checksumSHA1": "PkPgpx/FYoIJCbihlRZEp7oHG9Q=",
@@ -579,11 +750,11 @@
"revisionTime": "2017-06-23T01:44:30Z"
},
{
- "checksumSHA1": "FUiF2WLrih0JdHsUTMMDz3DRokw=",
+ "checksumSHA1": "izBSRxLAHN+a/XpAku0in05UzlY=",
"comment": "20141209094003-92-g95fa852",
"path": "github.com/hashicorp/atlas-go/archive",
- "revision": "1792bd8de119ba49b17fd8d3c3c1f488ec613e62",
- "revisionTime": "2016-11-07T20:49:10Z"
+ "revision": "17522f63497eefcffc90d528ca1eeaded2b529d3",
+ "revisionTime": "2017-08-08T16:18:53Z"
},
{
"checksumSHA1": "IR7S+SOsSUnPnLxgRrfemXfCqNM=",
@@ -598,10 +769,10 @@
"revision": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
},
{
- "checksumSHA1": "vnuMNXv3FJSg/I8ig04OTEHjk1c=",
+ "checksumSHA1": "D267IUMW2rcb+vNe3QU+xhfSrgY=",
"path": "github.com/hashicorp/go-checkpoint",
- "revision": "a8d0786e7fa88adb6b3bcaa341a99af7f9740671",
- "revisionTime": "2017-06-24T02:34:07Z"
+ "revision": "1545e56e46dec3bba264e41fde2c1e2aa65b5dd4",
+ "revisionTime": "2017-10-09T17:35:28Z"
},
{
"checksumSHA1": "fSe5y1UgTDeYlnFfUcDA1zzcw+U=",
@@ -658,9 +829,10 @@
"revisionTime": "2017-05-04T20:45:05Z"
},
{
- "checksumSHA1": "6nmAJBw2phU9MUmkUnqFvbO5urg=",
+ "checksumSHA1": "gEjGS03N1eysvpQ+FCHTxPcbxXc=",
"path": "github.com/kardianos/osext",
- "revision": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc"
+ "revision": "ae77be60afb1dcacde03767a8c37337fad28ac14",
+ "revisionTime": "2017-05-10T13:15:34Z"
},
{
"checksumSHA1": "yIeeBxrnquUChoE+Rpz7qU6WygQ=",
@@ -705,21 +877,16 @@
"revision": "95ba30457eb1121fa27753627c774c7cd4e90083"
},
{
- "checksumSHA1": "LY1os7cX/gWXWTWYCHCtEaf5jSw=",
+ "checksumSHA1": "8z5kCCFRsBkhXic9jxxeIV3bBn8=",
"path": "github.com/masterzen/winrm",
- "revision": "1ca0ba637a877ee12b69abc73c6161fccb77b70a",
- "revisionTime": "2017-06-01T21:16:37Z"
+ "revision": "a2df6b1315e6fd5885eb15c67ed259e85854125f",
+ "revisionTime": "2017-08-14T13:39:27Z"
},
{
- "checksumSHA1": "KTsgWipT3ennAAtaKxEZairxero=",
+ "checksumSHA1": "XFSXma+KmkhkIPsh4dTd/eyja5s=",
"path": "github.com/masterzen/winrm/soap",
- "revision": "1ca0ba637a877ee12b69abc73c6161fccb77b70a",
- "revisionTime": "2017-06-01T21:16:37Z"
- },
- {
- "checksumSHA1": "bx+egnFe0OB0BZBcgZcaqsvcmS4=",
- "path": "github.com/masterzen/xmlpath",
- "revision": "13f4951698adc0fa9c1dda3e275d489a24201161"
+ "revision": "a2df6b1315e6fd5885eb15c67ed259e85854125f",
+ "revisionTime": "2017-08-14T13:39:27Z"
},
{
"checksumSHA1": "NkbetqlpWBi3gP08JDneC+axTKw=",
@@ -792,10 +959,10 @@
"revision": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
},
{
- "checksumSHA1": "CeruhvOoHGjNlO+8M7WSUUz1oXA=",
+ "checksumSHA1": "XXmfaQ8fEupEgaGd6PptrLnrE54=",
"path": "github.com/packer-community/winrmcp/winrmcp",
- "revision": "eda77c146d051992c737322f60a4f690c9538aa1",
- "revisionTime": "2017-01-17T09:42:35Z"
+ "revision": "e1b7d6e6b1b1a27984270784190f1d06ad91888b",
+ "revisionTime": "2017-09-29T21:51:32Z"
},
{
"checksumSHA1": "oaXvjFg802gS/wx1bx2gAQwa7XQ=",
@@ -854,9 +1021,16 @@
"revision": "792786c7400a136282c1664665ae0a8db921c6c2"
},
{
- "checksumSHA1": "TvF3ym5sZVNqGlUOS9HgOIl/sZM=",
+ "checksumSHA1": "Kq0fF7R65dDcGReuhf47O3LQgrY=",
+ "path": "github.com/profitbricks/profitbricks-sdk-go",
+ "revision": "7bdb11aecb0e457ea23c86898c6b49bfc0eb4bb1",
+ "revisionTime": "2017-08-01T13:52:49Z"
+ },
+ {
+ "checksumSHA1": "zmC8/3V4ls53DJlNTKDZwPSC/dA=",
"path": "github.com/satori/go.uuid",
- "revision": "d41af8bb6a7704f00bc3b7cba9355ae6a5a80048"
+ "revision": "5bf94b69c6b68ee1b541973bb8e1144db23a194b",
+ "revisionTime": "2017-03-21T23:07:31Z"
},
{
"checksumSHA1": "iqUXcP3VA+G1/gVLRpQpBUt/BuA=",
@@ -885,6 +1059,96 @@
"path": "github.com/ugorji/go/codec/codecgen",
"revision": "646ae4a518c1c3be0739df898118d9bccf993858"
},
+ {
+ "checksumSHA1": "AGBqaHqBx5wJdVRsQt4GeawjbXA=",
+ "path": "github.com/vmware/govmomi",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "hb70n+hgA6nsrZWYQQT+aRgvye0=",
+ "path": "github.com/vmware/govmomi/find",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "J3JrwZagGYMX6oNMkdsUFf8hHo8=",
+ "path": "github.com/vmware/govmomi/list",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "19WR4gS1r3wGL6jAL9g624scugo=",
+ "path": "github.com/vmware/govmomi/object",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "f9sokKYs210zdH/VVF0ycBUO9cc=",
+ "path": "github.com/vmware/govmomi/property",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "eqoHqcnyVN3klOJ89N7xmJhRgu0=",
+ "path": "github.com/vmware/govmomi/session",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "FQR3yNgiShaqUiJREkeqQCKYJ84=",
+ "path": "github.com/vmware/govmomi/task",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "zLg5y/6xx/yr8swoqdyxISyQfoU=",
+ "path": "github.com/vmware/govmomi/vim25",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "xLvppq0NUD6Hv2GIx1gh75xUzyM=",
+ "path": "github.com/vmware/govmomi/vim25/debug",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "FIwHoeb/lzICWAoECQkmKLJg4PE=",
+ "path": "github.com/vmware/govmomi/vim25/methods",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "kiVMrAiW8EBFQvhDMHdE9SFe3N4=",
+ "path": "github.com/vmware/govmomi/vim25/mo",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "tN9fHudMKhR3LjGw/V0fM4xXUJw=",
+ "path": "github.com/vmware/govmomi/vim25/progress",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "c/IZCAPYN0p+ODQ/o/1vmfOgz6M=",
+ "path": "github.com/vmware/govmomi/vim25/soap",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "zthVYB/EefaNfVGrhBluqkd8ZyE=",
+ "path": "github.com/vmware/govmomi/vim25/types",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
+ {
+ "checksumSHA1": "6XLRzLEvncx5ORtvBjp41KfRTjc=",
+ "path": "github.com/vmware/govmomi/vim25/xml",
+ "revision": "c2105a174311351d7b23833ba22f65c374be0ce4",
+ "revisionTime": "2017-07-07T01:13:25Z"
+ },
{
"checksumSHA1": "mWcSPrZfr9TKc4aoQEPlZ7fBdp0=",
"path": "github.com/xanzy/go-cloudstack/cloudstack",
@@ -938,12 +1202,20 @@
{
"checksumSHA1": "vqc3a+oTUGX8PmD0TS+qQ7gmN8I=",
"path": "golang.org/x/net/html",
- "revision": "6ccd6698c634f5d835c40c1c31848729e0cecda1"
+ "revision": "1c05540f6879653db88113bc4a2b70aec4bd491f",
+ "revisionTime": "2017-08-04T00:04:37Z"
},
{
- "checksumSHA1": "00eQaGynDYrv3tL+C7l9xH0IDZg=",
+ "checksumSHA1": "z79z5msRzgU48FCZxSuxfU8b4rs=",
"path": "golang.org/x/net/html/atom",
- "revision": "6ccd6698c634f5d835c40c1c31848729e0cecda1"
+ "revision": "1c05540f6879653db88113bc4a2b70aec4bd491f",
+ "revisionTime": "2017-08-04T00:04:37Z"
+ },
+ {
+ "checksumSHA1": "barUU39reQ7LdgYLA323hQ/UGy4=",
+ "path": "golang.org/x/net/html/charset",
+ "revision": "1c05540f6879653db88113bc4a2b70aec4bd491f",
+ "revisionTime": "2017-08-04T00:04:37Z"
},
{
"checksumSHA1": "mktBVED98G2vv+OKcSgtnFVZC1Y=",
@@ -971,25 +1243,112 @@
"revision": "8a57ed94ffd43444c0879fe75701732a38afc985"
},
{
- "checksumSHA1": "/SO2lR1gexhKSppnoHk8iflTre4=",
+ "checksumSHA1": "NzQ3QYllWwK+3GZliu11jMU6xwo=",
"path": "golang.org/x/sys/unix",
- "revision": "50c6bc5e4292a1d4e65c6e9be5f53be28bcbe28e"
+ "revision": "c84c1ab9fd18cdd4c23dd021c10f5f46dea95e46",
+ "revisionTime": "2017-08-11T22:05:22Z"
+ },
+ {
+ "checksumSHA1": "Mr4ur60bgQJnQFfJY0dGtwWwMPE=",
+ "path": "golang.org/x/text/encoding",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "DSdlK4MKI/a3U8Zaee2XKBe01Fo=",
+ "path": "golang.org/x/text/encoding/charmap",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "4G6XCBh9Pf3zXDWr/4+P4/BlrSg=",
+ "path": "golang.org/x/text/encoding/htmlindex",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "zeHyHebIZl1tGuwGllIhjfci+wI=",
+ "path": "golang.org/x/text/encoding/internal",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "7kYqxy64WhMjFIFZgN7tJ3lbKxM=",
+ "path": "golang.org/x/text/encoding/internal/identifier",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "2YqVpmvjWGEBATyUphTP1MS34JE=",
+ "path": "golang.org/x/text/encoding/japanese",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "+ErWCAdaMwO4PLtrk9D/Hh+7oQM=",
+ "path": "golang.org/x/text/encoding/korean",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "mTuZi5urYwgDIO8+Gfql2pv8Vwg=",
+ "path": "golang.org/x/text/encoding/simplifiedchinese",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "D+VI4j0Wjzr8SeupWdOB5KBdFOw=",
+ "path": "golang.org/x/text/encoding/traditionalchinese",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
},
{
"checksumSHA1": "G9LfJI9gySazd+MyyC6QbTHx4to=",
"path": "golang.org/x/text/encoding/unicode",
- "revision": "16e1d1f27f7aba51c74c0aeb7a7ee31a75c5c63c",
- "revisionTime": "2016-10-12T14:34:48Z"
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
},
{
- "checksumSHA1": "hrUTmck0J+LE+lBtCvHvemNDY8U=",
+ "checksumSHA1": "hyNCcTwMQnV6/MK8uUW9E5H0J0M=",
+ "path": "golang.org/x/text/internal/tag",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "Qk7dljcrEK1BJkAEZguxAbG9dSo=",
+ "path": "golang.org/x/text/internal/utf8internal",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "SymSEo6vQqD+yGDQ1eOmZywzybs=",
+ "path": "golang.org/x/text/language",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "IV4MN7KGBSocu/5NR3le3sxup4Y=",
+ "path": "golang.org/x/text/runes",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "ziMb9+ANGRJSSIuxYdRbA+cDRBQ=",
+ "path": "golang.org/x/text/transform",
+ "revision": "e56139fd9c5bc7244c76116c68e500765bb6db6b",
+ "revisionTime": "2017-07-04T19:41:35Z"
+ },
+ {
+ "checksumSHA1": "NbZXrCwb2NvwV+g6yF0NXSG63A0=",
"path": "google.golang.org/api/compute/v1",
- "revision": "ff0a1ff302946b997eb1832381419d1f95143483"
+ "revision": "e381d638237fe32daa8eaa3321cf8db7b8203965",
+ "revisionTime": "2017-07-07T17:19:04Z"
},
{
- "checksumSHA1": "0PgeEtxSD/Vg/53Vctpf0Lk9V/k=",
+ "checksumSHA1": "gvrxuXnqGhfzY0O3MFbS8XhMH/k=",
"path": "google.golang.org/api/gensupport",
- "revision": "ff0a1ff302946b997eb1832381419d1f95143483"
+ "revision": "e665075b5ff79143ba49c58fab02df9dc122afd5",
+ "revisionTime": "2017-07-09T10:32:00Z"
},
{
"checksumSHA1": "yQREK/OWrz9PLljbr127+xFk6J0=",
@@ -1090,16 +1449,6 @@
"checksumSHA1": "U7dGDNwEHORvJFMoNSXErKE7ITg=",
"path": "google.golang.org/cloud/internal",
"revision": "5a3b06f8b5da3b7c3a93da43163b872c86c509ef"
- },
- {
- "checksumSHA1": "gY2M/3SCxqgrPz+P/N6JQ+m/wnA=",
- "path": "gopkg.in/xmlpath.v2",
- "revision": "860cbeca3ebcc600db0b213c0e83ad6ce91f5739"
- },
- {
- "checksumSHA1": "0dDWcU08d0FS4d99NCgCkGLjjqw=",
- "path": "gopkg.in/xmlpath.v2/cmd/webpath",
- "revision": "860cbeca3ebcc600db0b213c0e83ad6ce91f5739"
}
],
"rootPath": "github.com/hashicorp/packer"
diff --git a/version/version.go b/version/version.go
index 34863e0ad..f3d38291a 100644
--- a/version/version.go
+++ b/version/version.go
@@ -9,7 +9,7 @@ import (
var GitCommit string
// The main version number that is being run at the moment.
-const Version = "1.0.3"
+const Version = "1.1.2"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
diff --git a/website/config.rb b/website/config.rb
index d0e359056..93d234cbe 100644
--- a/website/config.rb
+++ b/website/config.rb
@@ -2,7 +2,7 @@ set :base_url, "https://www.packer.io/"
activate :hashicorp do |h|
h.name = "packer"
- h.version = "1.0.2"
+ h.version = "1.1.1"
h.github_slug = "hashicorp/packer"
h.website_root = "website"
end
@@ -27,8 +27,8 @@ helpers do
return "#{page.data.page_title} - Packer by HashiCorp"
end
- "Packer by HashiCorp"
- end
+ "Packer by HashiCorp"
+ end
# Get the description for the page
#
@@ -81,7 +81,7 @@ helpers do
def body_classes_for(page)
classes = []
- if !(layout = page.data.layout).blank?
+ if !(page.data.layout).blank?
classes << "layout-#{page.data.layout}"
end
diff --git a/website/packer.json b/website/packer.json
index 72b288ed0..fd2618f17 100644
--- a/website/packer.json
+++ b/website/packer.json
@@ -10,15 +10,12 @@
"type": "docker",
"image": "hashicorp/middleman-hashicorp:0.3.28",
"discard": "true",
- "run_command": ["-d", "-i", "-t", "{{ .Image }}", "/bin/sh"]
+ "volumes": {
+ "{{ pwd }}": "/website"
+ }
}
],
"provisioners": [
- {
- "type": "file",
- "source": ".",
- "destination": "/website"
- },
{
"type": "shell",
"environment_vars": [
@@ -30,7 +27,7 @@
"inline": [
"bundle check || bundle install",
"bundle exec middleman build",
- "/bin/sh ./scripts/deploy.sh"
+ "/bin/bash ./scripts/deploy.sh"
]
}
]
diff --git a/website/redirects.txt b/website/redirects.txt
new file mode 100644
index 000000000..0c7f48106
--- /dev/null
+++ b/website/redirects.txt
@@ -0,0 +1,56 @@
+#
+# REDIRECTS FILE
+#
+# This is a sample redirect file. Redirects allow individual projects to add
+# their own redirect rules in a declarative manner using Fastly edge
+# dictionaries.
+#
+# FORMAT
+#
+# Redirects are in the format. There must be at least one space between the
+# original path and the new path, and there must be exactly two entries per
+# line.
+#
+# /original-path /new-path
+#
+# GLOB MATCHING
+#
+# Because of the way lookup tables work, there is no support for glob matching.
+# Fastly does not provide a way to iterate through the lookup table, so it is
+# not possible to run through the table and find anything that matches. As such
+# URLs must match directly.
+#
+# More complex redirects are possible, but must be added directly to the
+# configuration. Please contact the release engineering team for assistance.
+#
+# DELETING
+#
+# Deleting items is not supported at this time. To delete an item, contact the
+# release engineering team and they will delete the dictionary item.
+#
+# MISC
+#
+# - Blank lines are ignored
+# - Comments are hash-style
+# - URLs are limited to 256 characters
+# - Items are case-sensitive (please use all lowercase)
+#
+
+/docs/installation.html /docs/install/index.html
+/docs/command-line/machine-readable.html /docs/commands/index.html
+/docs/command-line/introduction.html /docs/commands/index.html
+/docs/templates/introduction.html /docs/templates/index.html
+/docs/builders/azure-arm.html /docs/builders/azure.html
+/docs/templates/veewee-to-packer.html /guides/veewee-to-packer.html
+/docs/extend/developing-plugins.html /docs/extending/plugins.html
+/docs/extending/developing-plugins.html /docs/extending/plugins.html
+/docs/extend/builder.html /docs/extending/custom-builders.html
+/docs/getting-started/setup.html /docs/getting-started/install.html
+/docs/other/community.html /community-tools.html
+/downloads-community.html /community-tools.html
+/community /community.html
+/community/index.html /community.html
+/docs/other/environmental-variables.html /docs/other/environment-variables.html
+/docs/platforms.html /docs/builders/index.html
+/intro/platforms.html /docs/builders/index.html
+/docs/templates/configuration-templates.html /docs/templates/engine.html
diff --git a/website/scripts/deploy.sh b/website/scripts/deploy.sh
index 96856842a..c3592e155 100755
--- a/website/scripts/deploy.sh
+++ b/website/scripts/deploy.sh
@@ -1,9 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
PROJECT="packer"
PROJECT_URL="www.packer.io"
FASTLY_SERVICE_ID="7GrxRJP3PVBuqQbyxYQ0MV"
+FASTLY_DICTIONARY_ID="7CE9Ko06dSFrv8XqDgMZvo"
# Ensure the proper AWS environment variables are set
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
@@ -93,7 +94,76 @@ if [ -z "$NO_UPLOAD" ]; then
modify "s3://hc-sites/$PROJECT/latest/"
fi
-# Perform a soft-purge of the surrogate key.
+# Add redirects if they exist
+if [ -z "$NO_REDIRECTS" ] || [ ! test -f "./redirects.txt" ]; then
+ echo "Adding redirects..."
+ fields=()
+ while read -r line; do
+ [[ "$line" =~ ^#.* ]] && continue
+ [[ -z "$line" ]] && continue
+
+ # Read fields
+ IFS=" " read -ra parts <<<"$line"
+ fields+=("${parts[@]}")
+ done < "./redirects.txt"
+
+ # Check we have pairs
+ if [ $((${#fields[@]} % 2)) -ne 0 ]; then
+ echo "Bad redirects (not an even number)!"
+ exit 1
+ fi
+
+ # Check we don't have more than 1000 entries (yes, it says 2000 below, but that
+ # is because we've split into multiple lines).
+ if [ "${#fields}" -gt 2000 ]; then
+ echo "More than 1000 entries!"
+ exit 1
+ fi
+
+ # Validations
+ for field in "${fields[@]}"; do
+ if [ "${#field}" -gt 256 ]; then
+ echo "'$field' is > 256 characters!"
+ exit 1
+ fi
+
+ if [ "${field:0:1}" != "/" ]; then
+ echo "'$field' does not start with /!"
+ exit 1
+ fi
+ done
+
+ # Build the payload for single-request updates.
+ jq_args=()
+ jq_query="."
+ for (( i=0; i<${#fields[@]}; i+=2 )); do
+ original="${fields[i]}"
+ redirect="${fields[i+1]}"
+ echo "Redirecting ${original} -> ${redirect}"
+ jq_args+=(--arg "key$((i/2))" "${original}")
+ jq_args+=(--arg "value$((i/2))" "${redirect}")
+ jq_query+="| .items |= (. + [{op: \"upsert\", item_key: \$key$((i/2)), item_value: \$value$((i/2))}])"
+ done
+
+ # Do not post empty items (the API gets sad)
+ if [ "${#jq_args[@]}" -ne 0 ]; then
+ json="$(jq "${jq_args[@]}" "${jq_query}" <<<'{"items": []}')"
+
+ # Post the JSON body
+ curl \
+ --fail \
+ --silent \
+ --output /dev/null \
+ --request "PATCH" \
+ --header "Fastly-Key: $FASTLY_API_KEY" \
+ --header "Content-type: application/json" \
+ --header "Accept: application/json" \
+ --data "$json"\
+ "https://api.fastly.com/service/$FASTLY_SERVICE_ID/dictionary/$FASTLY_DICTIONARY_ID/items"
+ fi
+fi
+
+# Perform a purge of the surrogate key.
if [ -z "$NO_PURGE" ]; then
echo "Purging Fastly cache..."
curl \
@@ -118,8 +188,13 @@ if [ -z "$NO_WARM" ]; then
echo "wget --recursive --delete-after https://$PROJECT_URL/"
echo ""
wget \
- --recursive \
--delete-after \
- --quiet \
+ --level inf \
+ --no-directories \
+ --no-host-directories \
+ --no-verbose \
+ --page-requisites \
+ --recursive \
+ --spider \
"https://$PROJECT_URL/"
fi
diff --git a/website/source/community-plugins.html.md b/website/source/community-plugins.html.md
new file mode 100644
index 000000000..48f2f740c
--- /dev/null
+++ b/website/source/community-plugins.html.md
@@ -0,0 +1,42 @@
+---
+layout: "community"
+page_title: "Community Maintained Plugins"
+sidebar_current: "community-plugins"
+description: |-
+ Packer maintains these core plugins.
+---
+
+# Community Maintained Plugins
+
+The following plugins (i.e. Builders, Provisioners, and Post-Processors) are
+maintained by HashiCorp. Any plugins not on this list are maintained by the
+community, and not actively contributed to by HashiCorp, although they are
+still distributed with Packer.
+
+## Builders
+
+- Amazon EC2
+- Azure
+- Docker
+- Google Cloud
+- VMware
+- VirtualBox
+
+## Provisioners
+
+- File
+- PowerShell
+- Shell
+- Windows Restart
+- Windows Shell
+
+## Post-Processors
+
+- Amazon Import
+- Artifice
+- Atlas
+- Docker
+- Local Shell
+- Manifest
+- Vagrant
+- Vagrant Cloud
diff --git a/website/source/downloads-community.html.md b/website/source/community-tools.html.md
similarity index 71%
rename from website/source/downloads-community.html.md
rename to website/source/community-tools.html.md
index 17d44525f..5a31fa7cc 100644
--- a/website/source/downloads-community.html.md
+++ b/website/source/community-tools.html.md
@@ -1,7 +1,7 @@
---
-layout: "downloads"
+layout: "community"
page_title: "Download Packer Community Projects"
-sidebar_current: "downloads-community"
+sidebar_current: "community-tools"
description: |-
Packer has a vibrant community of contributors who have built a number of
great tools on top of Packer. There are also quite a few projects
@@ -41,41 +41,8 @@ power of Packer templates.
- [racker](https://github.com/aspring/racker) - an opinionated Ruby DSL for generating Packer templates
+- [packerlicious](https://github.com/mayn/packerlicious) - a python library for generating Packer templates
+
## Other
- [suitcase](https://github.com/tmclaugh/suitcase) - Packer based build system for CentOS OS images
-
-## Community Maintained Plugins
-
-The following plugins (i.e. Builders, Provisioners, and Post-Processors) are
-maintained by HashiCorp. Any plugins not on this list are maintained by the
-community, and not actively contributed to by HashiCorp, although they are
-still distributed with Packer.
-
-### Builders
-
-- Amazon EC2
-- Azure
-- Docker
-- Google Cloud
-- VMware
-- VirtualBox
-
-### Provisioners
-
-- File
-- PowerShell
-- Shell
-- Windows Restart
-- Windows Shell
-
-### Post-Processors
-
-- Amazon Import
-- Artifice
-- Atlas
-- Docker
-- Local Shell
-- Manifest
-- Vagrant
-- Vagrant Cloud
diff --git a/website/source/community.html.erb b/website/source/community.html.erb
index 0dd8a7c0c..ef6130d6c 100644
--- a/website/source/community.html.erb
+++ b/website/source/community.html.erb
@@ -1,6 +1,7 @@
---
-layout: "inner"
+layout: "community"
page_title: "Community"
+sidebar_current: "community-index"
description: |-
Packer is an open source project with a growing community.
---
@@ -32,96 +33,3 @@ description: |-
Paid HashiCorp training courses
are also available in a city near you. Private training courses are also available.
-
People
-
- The following people are some of the faces behind Packer. They each
- contribute to Packer in some core way. Over time, faces may appear and
- disappear from this list as contributors come and go. In addition to
- the faces below, Packer is a project by
- HashiCorp, so many HashiCorp
- employees actively contribute to Packer.
-
- Mitchell Hashimoto is the creator of Packer. He developed the
- core of Packer as well as the Amazon, VirtualBox, and VMware
- builders. In addition to Packer, Mitchell is the creator of
- Vagrant. He is self
- described as "automation obsessed."
-
- Jack Pearkes created and maintains the DigitalOcean builder
- for Packer. Outside of Packer, Jack is an avid open source
- contributor and software consultant.
-
- Ross Smith maintains our
- VMware builder on Windows, and provides other valuable assistance. Ross is an
- open source enthusiast, published author, and freelance consultant.
-
Matt maintains Packer for HashiCorp. After
- picking up Chef for a job, he decided that continually provisioning the
- same machine was bound for trouble. Luckily Packer had just been created,
- and was the answer to his prayers. Now he works on it professionally, and
- couldn't be happier.
-
Megan maintains Packer for HashiCorp; in her past life she used Packer and Vagrant in her work as a cloud infrastructure developer.
-
-
-
-
-
-
diff --git a/website/source/docs/builders/alicloud-ecs.html.md b/website/source/docs/builders/alicloud-ecs.html.md
index 6db22f4fd..4042e526e 100644
--- a/website/source/docs/builders/alicloud-ecs.html.md
+++ b/website/source/docs/builders/alicloud-ecs.html.md
@@ -4,6 +4,7 @@ description: |
customized images based on an existing base images.
layout: docs
page_title: Alicloud Image Builder
+sidebar_current: 'docs-builders-alicloud-ecs'
---
# Alicloud Image Builder
@@ -115,11 +116,9 @@ builder.
- `zone_id` (string) - ID of the zone to which the disk belongs.
-- `io_optimized` (string) - I/O optimized. Optional values are:
- - none: none I/O Optimized
- - optimized: I/O Optimized
+- `io_optimized` (bool) - I/O optimized.
- Default value: none for Generation I instances; optimized for other instances.
+ Default value: false for Generation I instances; true for other instances.
- `force_stop_instance` (bool) - Whether to force shutdown upon device restart.
The default value is `false`.
@@ -169,6 +168,9 @@ builder.
- PayByTraffic
If this parameter is not specified, the default value is `PayByBandwidth`.
+ For the regions out of China, currently only support `PayByTraffic`, you must
+ set it manfully.
+
- `internet_max_bandwidth_out` (string) - Maximum outgoing bandwidth to the public
network, measured in Mbps (Mega bit per second).
diff --git a/website/source/docs/builders/amazon-chroot.html.md b/website/source/docs/builders/amazon-chroot.html.md
index ee2629578..90da1a8f7 100644
--- a/website/source/docs/builders/amazon-chroot.html.md
+++ b/website/source/docs/builders/amazon-chroot.html.md
@@ -128,11 +128,10 @@ each category, the available configuration keys are alphabetized.
source AMI will be attached. This defaults to "" (empty string), which
forces Packer to find an open device automatically.
-- `enhanced_networking` (boolean) - Enable enhanced
- networking (SriovNetSupport and ENA) on HVM-compatible AMIs. If true, add
- `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make
- sure enhanced networking is enabled on your instance. See [Amazon's
- documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking)
+- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy.
+ Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). Default `false`.
- `force_deregister` (boolean) - Force Packer to first deregister an existing
AMI if one with the same name already exists. Default `false`.
@@ -142,7 +141,8 @@ each category, the available configuration keys are alphabetized.
- `encrypt_boot` (boolean) - Instruct packer to automatically create a copy of the
AMI with an encrypted boot volume (discarding the initial unencrypted AMI in the
- process). Default `false`.
+ process). Packer will always run this operation, even if the base
+ AMI has an encrypted boot volume to start with. Default `false`.
- `kms_key_id` (string) - The ID of the KMS key to use for boot volume encryption.
This only applies to the main `region`, other regions where the AMI will be copied
@@ -219,7 +219,7 @@ each category, the available configuration keys are alphabetized.
- `mount_options` (array of strings) - Options to supply the `mount` command
when mounting devices. Each option will be prefixed with `-o` and supplied
to the `mount` command ran by Packer. Because this command is ran in a
- shell, user discrestion is advised. See [this manual page for the mount
+ shell, user discretion is advised. See [this manual page for the mount
command](http://linuxcommand.org/man_pages/mount8.html) for valid file
system specific options
@@ -269,7 +269,7 @@ each category, the available configuration keys are alphabetized.
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
- "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
@@ -292,6 +292,12 @@ each category, the available configuration keys are alphabetized.
- `most_recent` (bool) - Selects the newest created image when true.
This is most useful for selecting a daily distro build.
+- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but not ENA)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM
+ policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
+ Default `false`.
+
- `tags` (object of key/value strings) - Tags applied to the AMI. This is a
[template engine](/docs/templates/engine.html)
where the `SourceAMI` variable is replaced with the source AMI ID and
diff --git a/website/source/docs/builders/amazon-ebs.html.md b/website/source/docs/builders/amazon-ebs.html.md
index f028d5d80..db438116d 100644
--- a/website/source/docs/builders/amazon-ebs.html.md
+++ b/website/source/docs/builders/amazon-ebs.html.md
@@ -165,11 +165,10 @@ builder.
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Default `false`.
-- `enhanced_networking` (boolean) - Enable enhanced
- networking (SriovNetSupport and ENA) on HVM-compatible AMIs. If true, add
- `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make
- sure enhanced networking is enabled on your instance. See [Amazon's
- documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking)
+- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy.
+ Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). Default `false`.
- `force_deregister` (boolean) - Force Packer to first deregister an existing
AMI if one with the same name already exists. Default `false`.
@@ -179,7 +178,8 @@ builder.
- `encrypt_boot` (boolean) - Instruct packer to automatically create a copy of the
AMI with an encrypted boot volume (discarding the initial unencrypted AMI in the
- process). Default `false`.
+ process). Packer will always run this operation, even if the base
+ AMI has an encrypted boot volume to start with. Default `false`.
- `kms_key_id` (string) - The ID of the KMS key to use for boot volume encryption.
This only applies to the main `region`, other regions where the AMI will be copied
@@ -235,6 +235,11 @@ builder.
described above. Note that if this is specified, you must omit the
`security_group_id`.
+- `temporary_security_group_source_cidr` (string) - An IPv4 CIDR block to be authorized
+ access to the instance, when packer is creating a temporary security group.
+ The default is `0.0.0.0/0` (ie, allow any IPv4 source). This is only used
+ when `security_group_id` or `security_group_ids` is not specified.
+
- `shutdown_behavior` (string) - Automatically terminate instances on shutdown
in case Packer exits ungracefully. Possible values are "stop" and "terminate",
default is `stop`.
@@ -264,7 +269,7 @@ builder.
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
- "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
@@ -301,6 +306,12 @@ builder.
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`, `Windows`,
`Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`, `Windows (Amazon VPC)`
+- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but not ENA)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM
+ policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
+ Default `false`.
+
- `ssh_keypair_name` (string) - If specified, this is the key that will be
used for SSH with the machine. The key must match a key pair name loaded
up into Amazon EC2. By default, this is blank, and Packer will
@@ -445,8 +456,8 @@ images exist when this template is run:
"ssh_username": "ubuntu",
"ami_name": "packer-quick-start {{timestamp}}",
"tags": {
- "OS_Version": "Ubuntu",
- "Release": "Latest"
+ "OS_Version": "Ubuntu",
+ "Release": "Latest"
}
}
```
diff --git a/website/source/docs/builders/amazon-ebssurrogate.html.md b/website/source/docs/builders/amazon-ebssurrogate.html.md
index abe3cac8a..57fd3408b 100644
--- a/website/source/docs/builders/amazon-ebssurrogate.html.md
+++ b/website/source/docs/builders/amazon-ebssurrogate.html.md
@@ -158,11 +158,10 @@ builder.
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Default `false`.
-- `enhanced_networking` (boolean) - Enable enhanced
- networking (SriovNetSupport and ENA) on HVM-compatible AMIs. If true, add
- `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make
- sure enhanced networking is enabled on your instance. See [Amazon's
- documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking)
+- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy.
+ Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). Default `false`.
- `force_deregister` (boolean) - Force Packer to first deregister an existing
AMI if one with the same name already exists. Default `false`.
@@ -172,7 +171,8 @@ builder.
- `encrypt_boot` (boolean) - Instruct packer to automatically create a copy of the
AMI with an encrypted boot volume (discarding the initial unencrypted AMI in the
- process). Default `false`.
+ process). Packer will always run this operation, even if the base
+ AMI has an encrypted boot volume to start with. Default `false`.
- `kms_key_id` (string) - The ID of the KMS key to use for boot volume encryption.
This only applies to the main `region`, other regions where the AMI will be copied
@@ -228,6 +228,11 @@ builder.
described above. Note that if this is specified, you must omit the
`security_group_id`.
+- `temporary_security_group_source_cidr` (string) - An IPv4 CIDR block to be authorized
+ access to the instance, when packer is creating a temporary security group.
+ The default is `0.0.0.0/0` (ie, allow any IPv4 source). This is only used
+ when `security_group_id` or `security_group_ids` is not specified.
+
- `shutdown_behavior` (string) - Automatically terminate instances on shutdown
incase packer exits ungracefully. Possible values are "stop" and "terminate",
default is `stop`.
@@ -257,7 +262,7 @@ builder.
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
- "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
@@ -294,6 +299,12 @@ builder.
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`, `Windows`,
`Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`, `Windows (Amazon VPC)`
+- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but not ENA)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM
+ policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
+ Default `false`.
+
- `ssh_keypair_name` (string) - If specified, this is the key that will be
used for SSH with the machine. The key must match a key pair name loaded
up into Amazon EC2. By default, this is blank, and Packer will
diff --git a/website/source/docs/builders/amazon-ebsvolume.html.md b/website/source/docs/builders/amazon-ebsvolume.html.md
index c27c54148..78a9815e9 100644
--- a/website/source/docs/builders/amazon-ebsvolume.html.md
+++ b/website/source/docs/builders/amazon-ebsvolume.html.md
@@ -104,11 +104,10 @@ builder.
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Default `false`.
-- `enhanced_networking` (boolean) - Enable enhanced
- networking (SriovNetSupport and ENA) on HVM-compatible AMIs. If true, add
- `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make
- sure enhanced networking is enabled on your instance. See [Amazon's
- documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking)
+- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy.
+ Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). Default `false`.
- `iam_instance_profile` (string) - The name of an [IAM instance
profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
@@ -148,6 +147,11 @@ builder.
described above. Note that if this is specified, you must omit the
`security_group_id`.
+- `temporary_security_group_source_cidr` (string) - An IPv4 CIDR block to be authorized
+ access to the instance, when packer is creating a temporary security group.
+ The default is `0.0.0.0/0` (ie, allow any IPv4 source). This is only used
+ when `security_group_id` or `security_group_ids` is not specified.
+
- `shutdown_behavior` (string) - Automatically terminate instances on shutdown
in case Packer exits ungracefully. Possible values are `stop` and `terminate`.
Defaults to `stop`.
@@ -171,7 +175,7 @@ builder.
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
- "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
@@ -208,6 +212,12 @@ builder.
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`, `Windows`,
`Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)` or `Windows (Amazon VPC)`
+- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but not ENA)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM
+ policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
+ Default `false`.
+
- `ssh_keypair_name` (string) - If specified, this is the key that will be
used for SSH with the machine. By default, this is blank, and Packer will
generate a temporary key pair unless
diff --git a/website/source/docs/builders/amazon-instance.html.md b/website/source/docs/builders/amazon-instance.html.md
index c63e537a5..17be8a297 100644
--- a/website/source/docs/builders/amazon-instance.html.md
+++ b/website/source/docs/builders/amazon-instance.html.md
@@ -189,11 +189,10 @@ builder.
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Default `false`.
-- `enhanced_networking` (boolean) - Enable enhanced
- networking (SriovNetSupport and ENA) on HVM-compatible AMIs. If true, add
- `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make
- sure enhanced networking is enabled on your instance. See [Amazon's
- documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking)
+- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy.
+ Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). Default `false`.
- `force_deregister` (boolean) - Force Packer to first deregister an existing
AMI if one with the same name already exists. Defaults to `false`.
@@ -244,6 +243,11 @@ builder.
described above. Note that if this is specified, you must omit the
`security_group_id`.
+- `temporary_security_group_source_cidr` (string) - An IPv4 CIDR block to be authorized
+ access to the instance, when packer is creating a temporary security group.
+ The default is `0.0.0.0/0` (ie, allow any IPv4 source). This is only used
+ when `security_group_id` or `security_group_ids` is not specified.
+
- `skip_region_validation` (boolean) - Set to true if you want to skip
validation of the region configuration option. Defaults to `false`.
@@ -263,7 +267,7 @@ builder.
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
- "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
@@ -303,6 +307,12 @@ builder.
best spot price. This must be one of: `Linux/UNIX`, `SUSE Linux`, `Windows`,
`Linux/UNIX (Amazon VPC)`, `SUSE Linux (Amazon VPC)`, `Windows (Amazon VPC)`
+- `sriov_support` (boolean) - Enable enhanced networking (SriovNetSupport but not ENA)
+ on HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your AWS IAM
+ policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's
+ documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
+ Default `false`.
+
- `ssh_keypair_name` (string) - If specified, this is the key that will be
used for SSH with the machine. The key must match a key pair name loaded
up into Amazon EC2. By default, this is blank, and Packer will
@@ -457,3 +467,6 @@ sudo -i -n ec2-upload-bundle \
The available template variables should be self-explanatory based on the
parameters they're used to satisfy the `ec2-upload-bundle` command.
+Additionally, `{{.Token}}` is available when overriding this command. You must
+create your own bundle command with the addition of `-t {{.Token}} ` if you are
+assuming a role.
diff --git a/website/source/docs/builders/azure.html.md b/website/source/docs/builders/azure.html.md
index ec3916318..c497ec0f5 100644
--- a/website/source/docs/builders/azure.html.md
+++ b/website/source/docs/builders/azure.html.md
@@ -30,7 +30,7 @@ builder.
- `client_secret` (string) The password or secret for your service principal.
- `subscription_id` (string) Subscription under which the build will be performed. **The service principal specified in `client_id` must have full access to this subscription.**
-- `capture_container_name` (string) Destination container name. Essentially the "directory" where your VHD will be organized in Azure. The captured VHD's URL will be https://.blob.core.windows.net/system/Microsoft.Compute/Images//.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.vhd.
+- `capture_container_name` (string) Destination container name. Essentially the "directory" where your VHD will be organized in Azure. The captured VHD's URL will be `https://.blob.core.windows.net/system/Microsoft.Compute/Images//.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.vhd`.
- `image_publisher` (string) PublisherName for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details.
@@ -50,10 +50,13 @@ builder.
#### VHD or Managed Image
-The Azure builder can create either a VHD, or a managed image. When creating a VHD the following two options are required.
+The Azure builder can create either a VHD, or a managed image. If you
+are creating a VHD, you **must** start with a VHD. Likewise, if you
+want to create a managed image you **must** start with a managed
+image. When creating a VHD the following two options are required.
- `capture_container_name` (string) Destination container name. Essentially the "directory" where your VHD will be
- organized in Azure. The captured VHD's URL will be https://.blob.core.windows.net/system/Microsoft.Compute/Images//.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.vhd.
+ organized in Azure. The captured VHD's URL will be `https://.blob.core.windows.net/system/Microsoft.Compute/Images//.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.vhd`.
- `capture_name_prefix` (string) VHD prefix. The final artifacts will be named `PREFIX-osDisk.UUID` and
`PREFIX-vmTemplate.UUID`.
@@ -107,6 +110,10 @@ When creating a managed image the following two options are required.
- `image_url` (string) Specify a custom VHD to use. If this value is set, do not set image\_publisher, image\_offer,
image\_sku, or image\_version.
+
+- `managed_image_storage_account_type` (string) Specify the storage
+ account type for a managed image. Valid values are Standard_LRS
+ and Premium\_LRS. The default is Standard\_LRS.
- `object_id` (string) Specify an OAuth Object ID to protect WinRM certificates
created at runtime. This variable is required when creating images based on
@@ -131,9 +138,12 @@ When creating a managed image the following two options are required.
- `tenant_id` (string) The account identifier with which your `client_id` and `subscription_id` are associated. If not
specified, `tenant_id` will be looked up using `subscription_id`.
+- `private_virtual_network_with_public_ip` (boolean) This value allows you to set a `virtual_network_name` and obtain
+ a public IP. If this value is not set and `virtual_network_name` is defined Packer is only allowed to be executed
+ from a host on the same subnet / virtual network.
+
- `virtual_network_name` (string) Use a pre-existing virtual network for the VM. This option enables private
- communication with the VM, no public IP address is **used** or **provisioned**. This value should only be set if
- Packer is executed from a host on the same subnet / virtual network.
+ communication with the VM, no public IP address is **used** or **provisioned** (unless you set `private_virtual_network_with_public_ip`).
- `virtual_network_resource_group_name` (string) If virtual\_network\_name is set, this value **may** also be set. If
virtual\_network\_name is set, and this value is not set the builder attempts to determine the resource group
@@ -206,6 +216,24 @@ The following provisioner snippet shows how to sysprep a Windows VM. Deprovision
}
```
+In some circumstances the above isn't enough to reliably know that the sysprep is actually finished generalizing the image, the code below will wait for sysprep to write the image status in the registry and will exit after that. The possible states, in case you want to wait for another state, [are documented here](https://technet.microsoft.com/en-us/library/hh824815.aspx)
+
+``` json
+{
+ "provisioners": [
+ {
+ "type": "powershell",
+ "inline": [
+ "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit",
+ "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }"
+ ]
+ }
+ ]
+}
+
+
+```
+
### Linux
The following provisioner snippet shows how to deprovision a Linux VM. Deprovision should be the last operation executed by a build.
@@ -286,7 +314,7 @@ The Azure builder creates the following random values at runtime.
- KeyVault Name: a random 15-character name prefixed with pkrkv.
- OS Disk Name: a random 15-character name prefixed with pkros.
- Resource Group Name: a random 33-character name prefixed with packer-Resource-Group-.
-- SSH Key Pair: a 2,048-bit asymmetric key pair; can be overriden by the user.
+- SSH Key Pair: a 2,048-bit asymmetric key pair; can be overridden by the user.
The default alphabet used for random values is **0123456789bcdfghjklmnpqrstvwxyz**. The alphabet was reduced (no
vowels) to prevent running afoul of Azure decency controls.
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index 8c2d4d3b6..4a7f92ca9 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -34,36 +34,29 @@ builder.
### Required:
- `api_url` (string) - The CloudStack API endpoint we will connect to.
+ It can also be specified via environment variable `CLOUDSTACK_API_URL`,
+ if set.
-- `api_key` (string) - The API key used to sign all API requests.
-
-- `cidr_list` (array) - List of CIDR's that will have access to the new
- instance. This is needed in order for any provisioners to be able to
- connect to the instance. Usually this will be the NAT address of your
- current location. Only required when `use_local_ip_address` is `false`.
-
-- `instance_name` (string) - The name of the instance. Defaults to
- "packer-UUID" where UUID is dynamically generated.
+- `api_key` (string) - The API key used to sign all API requests. It
+ can also be specified via environment variable `CLOUDSTACK_API_KEY`,
+ if set.
- `network` (string) - The name or ID of the network to connect the instance
to.
- `secret_key` (string) - The secret key used to sign all API requests.
+ It can also be specified via environment variable `CLOUDSTACK_SECRET_KEY`,
+ if set.
- `service_offering` (string) - The name or ID of the service offering used
for the instance.
-- `soure_iso` (string) - The name or ID of an ISO that will be mounted before
- booting the instance. This option is mutual exclusive with `source_template`.
+- `source_iso` (string) - The name or ID of an ISO that will be mounted before
+ booting the instance. This option is mutually exclusive with `source_template`.
+ When using `source_iso`, both `disk_offering` and `hypervisor` are required.
- `source_template` (string) - The name or ID of the template used as base
- template for the instance. This option is mutual explusive with `source_iso`.
-
-- `template_name` (string) - The name of the new template. Defaults to
- "packer-{{timestamp}}" where timestamp will be the current time.
-
-- `template_display_text` (string) - The display text of the new template.
- Defaults to the `template_name`.
+ template for the instance. This option is mutually exclusive with `source_iso`.
- `template_os` (string) - The name or ID of the template OS for the new
template that will be created.
@@ -76,6 +69,16 @@ builder.
- `async_timeout` (int) - The time duration to wait for async calls to
finish. Defaults to 30m.
+- `cidr_list` (array) - List of CIDR's that will have access to the new
+ instance. This is needed in order for any provisioners to be able to
+ connect to the instance. Defaults to `[ "0.0.0.0/0" ]`. Only required
+ when `use_local_ip_address` is `false`.
+
+- `create_security_group` (boolean) - If `true` a temporary security group
+ will be created which allows traffic towards the instance from the
+ `cidr_list`. This option will be ignored if `security_groups` is also
+ defined. Requires `expunge` set to `true`. Defaults to `false`.
+
- `disk_offering` (string) - The name or ID of the disk offering used for the
instance. This option is only available (and also required) when using
`source_iso`.
@@ -83,10 +86,27 @@ builder.
- `disk_size` (int) - The size (in GB) of the root disk of the new instance.
This option is only available when using `source_template`.
+- `expunge` (boolean) - Set to `true` to expunge the instance when it is
+ destroyed. Defaults to `false`.
+
+- `http_directory` (string) - Path to a directory to serve using an
+ HTTP server. The files in this directory will be available over HTTP that
+ will be requestable from the virtual machine. This is useful for hosting
+ kickstart files and so on. By default this is "", which means no HTTP server
+ will be started. The address and port of the HTTP server will be available
+ as variables in `user_data`. This is covered in more detail below.
+
- `http_get_only` (boolean) - Some cloud providers only allow HTTP GET calls to
their CloudStack API. If using such a provider, you need to set this to `true`
in order for the provider to only make GET calls and no POST calls.
+- `http_port_min` and `http_port_max` (integer) - These are the minimum and
+ maximum port to use for the HTTP server started to serve the
+ `http_directory`. Because Packer often runs in parallel, Packer will choose
+ a randomly available port in this range to run the HTTP server. If you want
+ to force the HTTP server to be on one port, make this minimum and maximum
+ port the same. By default the values are 8000 and 9000, respectively.
+
- `hypervisor` (string) - The target hypervisor (e.g. `XenServer`, `KVM`) for
the new template. This option is required when using `source_iso`.
@@ -94,18 +114,37 @@ builder.
access the instance. The SSH key pair is assumed to be already available
within CloudStack.
+- `instance_name` (string) - The name of the instance. Defaults to
+ "packer-UUID" where UUID is dynamically generated.
+
- `project` (string) - The name or ID of the project to deploy the instance to.
- `public_ip_address` (string) - The public IP address or it's ID used for
connecting any provisioners to. If not provided, a temporary public IP
address will be associated and released during the Packer run.
+- `security_groups` (array of strings) - A list of security group IDs or names
+ to associate the instance with.
+
+- `ssh_agent_auth` (boolean) - If true, the local SSH agent will be used to
+ authenticate connections to the source instance. No temporary keypair will
+ be created, and the values of `ssh_password` and `ssh_private_key_file` will
+ be ignored. To use this option with a key pair already configured in the source
+ image, leave the `keypair` blank. To associate an existing key pair
+ with the source instance, set the `keypair` field to the name of the key pair.
+
- `ssl_no_verify` (boolean) - Set to `true` to skip SSL verification. Defaults
to `false`.
+- `template_display_text` (string) - The display text of the new template.
+ Defaults to the `template_name`.
+
- `template_featured` (boolean) - Set to `true` to indicate that the template
is featured. Defaults to `false`.
+- `template_name` (string) - The name of the new template. Defaults to
+ "packer-{{timestamp}}" where timestamp will be the current time.
+
- `template_public` (boolean) - Set to `true` to indicate that the template is
available for all accounts. Defaults to `false`.
@@ -118,11 +157,31 @@ builder.
- `template_scalable` (boolean) - Set to `true` to indicate that the template
contains tools to support dynamic scaling of VM cpu/memory. Defaults to `false`.
-- `user_data` (string) - User data to launch with the instance.
+- `temporary_keypair_name` (string) - The name of the temporary SSH key pair
+ to generate. By default, Packer generates a name that looks like
+ `packer_`, where <UUID> is a 36 character unique identifier.
+
+- `user_data` (string) - User data to launch with the instance. This is a
+ [template engine](/docs/templates/engine.html) see _User Data_ bellow for more
+ details.
+
+- `user_data_file` (string) - Path to a file that will be used for the user
+ data when launching the instance. This file will be parsed as a
+ [template engine](/docs/templates/engine.html) see _User Data_ bellow for more
+ details.
- `use_local_ip_address` (boolean) - Set to `true` to indicate that the
provisioners should connect to the local IP address of the instance.
+## User Data
+
+The available variables are:
+
+- `HTTPIP` and `HTTPPort` - The IP and port, respectively of an HTTP server
+ that is started serving the directory specified by the `http_directory`
+ configuration parameter. If `http_directory` isn't specified, these will be
+ blank.
+
## Basic Example
Here is a basic example.
@@ -135,13 +194,14 @@ Here is a basic example.
"secret_key": "YOUR_SECRET_KEY",
"disk_offering": "Small - 20GB",
- "cidr_list": ["0.0.0.0/0"],
"hypervisor": "KVM",
"network": "management",
"service_offering": "small",
"source_iso": "CentOS-7.0-1406-x86_64-Minimal",
"zone": "NL1",
+ "ssh_username": "root",
+
"template_name": "Centos7-x86_64-KVM-Packer",
"template_display_text": "Centos7-x86_64 KVM Packer",
"template_featured": true,
diff --git a/website/source/docs/builders/digitalocean.html.md b/website/source/docs/builders/digitalocean.html.md
index f42186af4..7af506319 100644
--- a/website/source/docs/builders/digitalocean.html.md
+++ b/website/source/docs/builders/digitalocean.html.md
@@ -82,6 +82,7 @@ builder.
default state timeout is "6m".
- `user_data` (string) - User data to launch with the Droplet.
+
- `user_data_file` (string) - Path to a file that will be used for the user
data when launching the Droplet.
diff --git a/website/source/docs/builders/docker.html.md b/website/source/docs/builders/docker.html.md
index 3b62a6f2f..f2f301ecb 100644
--- a/website/source/docs/builders/docker.html.md
+++ b/website/source/docs/builders/docker.html.md
@@ -80,7 +80,6 @@ from ubuntu as an simple example:
"LABEL version=1.0",
"ONBUILD RUN date",
"CMD [\"nginx\", \"-g\", \"daemon off;\"]",
- "MAINTAINER Captain Kirk",
"ENTRYPOINT /var/www/start.sh"
]
}
@@ -175,6 +174,10 @@ You must specify (only) one of `commit`, `discard`, or `export_path`.
`login_password` will be ignored. For more information see the
[section on ECR](#amazon-ec2-container-registry).
+* `exec_user` (string) - Username or UID (format: [:])
+ to run remote commands with. You may need this if you get permission errors
+ trying to run the `shell` or other provisioners.
+
- `login` (boolean) - Defaults to false. If true, the builder will login in
order to pull the image. The builder only logs in for the duration of
the pull. It always logs out afterwards. For log into ECR see `ecr_login`.
@@ -205,6 +208,14 @@ You must specify (only) one of `commit`, `discard`, or `export_path`.
mount into this container. The key of the object is the host path, the value
is the container path.
+- `container_dir` (string) - The directory inside container to mount
+ temp directory from host server for work [file provisioner](/docs/provisioners/file.html).
+ By default this is set to `/packer-files`.
+
+- `fix_upload_owner` (boolean) - If true, files uploaded to the container will
+ be owned by the user the container is running as. If false, the owner will depend
+ on the version of docker installed in the system. Defaults to true.
+
## Using the Artifact: Export
Once the tar artifact has been generated, you will likely want to import, tag,
@@ -354,19 +365,6 @@ While Docker has many features, Packer views Docker simply as an container
runner. To that end, Packer is able to repeatably build these containers
using portable provisioning scripts.
-Dockerfiles have some additional features that Packer doesn't support which are
-able to be worked around. Many of these features will be automated by Packer in
-the future:
-
-- Dockerfiles will snapshot the container at each step, allowing you to go
- back to any step in the history of building. Packer doesn't do this yet, but
- inter-step snapshotting is on the way.
-
-- Dockerfiles can contain information such as exposed ports, shared volumes,
- and other metadata. Packer builds a raw Docker container image that has none
- of this metadata. You can pass in much of this metadata at runtime with
- `docker run`.
-
## Overriding the host directory
By default, Packer creates a temporary folder under your home directory, and
diff --git a/website/source/docs/builders/googlecompute.html.md b/website/source/docs/builders/googlecompute.html.md
index 7fe6de1b7..12db018c4 100644
--- a/website/source/docs/builders/googlecompute.html.md
+++ b/website/source/docs/builders/googlecompute.html.md
@@ -174,6 +174,12 @@ builder.
Not required if you run Packer on a GCE instance with a service account.
Instructions for creating file or using service accounts are above.
+- `accelerator_count` (int) - Number of guest accelerator cards to add to the launched instance.
+
+- `accelerator_type` (string) - Full or partial URL of the guest accelerator type. GPU accelerators can only be used with
+ `"on_host_maintenance": "TERMINATE"` option set.
+ Example: `"projects/project_id/zones/europe-west1-b/acceleratorTypes/nvidia-tesla-k80"`
+
- `address` (string) - The name of a pre-allocated static external IP address.
Note, must be the name and not the actual IP address.
@@ -192,12 +198,18 @@ builder.
instead of a specific image name. The image family always returns its
latest image that is not deprecated.
+- `image_labels` (object of key/value strings) - Key/value pair labels to
+ apply to the created image.
+
- `image_name` (string) - The unique name of the resulting image. Defaults to
`"packer-{{timestamp}}"`.
- `instance_name` (string) - A name to give the launched instance. Beware that
this must be unique. Defaults to `"packer-{{uuid}}"`.
+- `labels` (object of key/value strings) - Key/value pair labels to apply to
+ the launched instance.
+
- `machine_type` (string) - The machine type. Defaults to `"n1-standard-1"`.
- `metadata` (object of key/value strings) - Metadata applied to the launched
@@ -281,7 +293,7 @@ the credentials provided in the builder config's `account_file`.
## Gotchas
-Centos and recent Debian images have root ssh access disabled by default. Set `ssh_username` to
+CentOS and recent Debian images have root ssh access disabled by default. Set `ssh_username` to
any user, which will be created by packer with sudo access.
The machine type must have a scratch disk, which means you can't use an
diff --git a/website/source/docs/builders/hyperv-iso.html.md b/website/source/docs/builders/hyperv-iso.html.md
index c4990646d..c2f7e9264 100644
--- a/website/source/docs/builders/hyperv-iso.html.md
+++ b/website/source/docs/builders/hyperv-iso.html.md
@@ -53,21 +53,22 @@ can be configured for this builder.
### Required:
-- `iso_checksum` (string) - The checksum for the OS ISO file. Because ISO
- files are so large, this is required and Packer will verify it prior
- to booting a virtual machine with the ISO attached. The type of the
- checksum is specified with `iso_checksum_type`, documented below.
+- `iso_checksum` (string) - The checksum for the OS ISO file or virtual
+ harddrive file. Because these files are so large, this is required and
+ Packer will verify it prior to booting a virtual machine with the ISO or
+ virtual harddrive attached. The type of the checksum is specified with
+ `iso_checksum_type`, documented below.
- `iso_checksum_type` (string) - The type of the checksum specified in
`iso_checksum`. Valid values are "none", "md5", "sha1", "sha256", or
"sha512" currently. While "none" will skip checksumming, this is not
- recommended since ISO files are generally large and corruption does happen
- from time to time.
+ recommended since ISO files and virtual harddrive files are generally large
+ and corruption does happen from time to time.
-- `iso_url` (string) - A URL to the ISO containing the installation image.
- This URL can be either an HTTP URL or a file URL (or path to a file).
- If this is an HTTP URL, Packer will download iso and cache it between
- runs.
+- `iso_url` (string) - A URL to the ISO containing the installation image or
+ virtual harddrive vhd or vhdx file to clone. This URL can be either an HTTP
+ URL or a file URL (or path to a file). If this is an HTTP URL, Packer will
+ download the file and cache it between runs.
### Optional:
@@ -113,7 +114,7 @@ can be configured for this builder.
characters (`*`, `?`, and `[]`) are allowed. Directory names are also allowed,
which will add all the files found in the directory to the floppy.
-- `floppy_dirs` (array of strings) - A list of directories to place onto
+- `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's
@@ -197,9 +198,14 @@ can be configured for this builder.
By default none is set. If none is set then a vlan is not set on the switch's network card.
If this value is set it should match the vlan specified in by `vlan_id`.
-- `vlan_id` (string) - This is the vlan of the virtual machine's network card for the new virtual
- machine. By default none is set. If none is set then vlans are not set on the virtual machine's
- network card.
+* `vhd_temp_path` (string) - A separate path to be used for storing the VM's
+ disk image. The purpose is to enable reading and writing to take place on
+ different physical disks (read from VHD temp path, write to regular temp
+ path while exporting the VM) to eliminate a single-disk bottleneck.
+
+- `vlan_id` (string) - This is the vlan of the virtual machine's network card
+ for the new virtual machine. By default none is set. If none is set then
+ vlans are not set on the virtual machine's network card.
- `vm_name` (string) - This is the name of the virtual machine for the new virtual
machine, without the file extension. By default this is "packer-BUILDNAME",
@@ -268,7 +274,10 @@ will be replaced by the proper key:
sending any additional keys. This is useful if you have to generally wait
for the UI to update before typing more.
-When using modifier keys `ctrl`, `alt`, `shift` ensure that you release them, otherwise they will be held down until the machine reboots. Use lowercase characters as well inside modifiers. For example: to simulate ctrl+c use `c`.
+When using modifier keys `ctrl`, `alt`, `shift` ensure that you release them,
+otherwise they will be held down until the machine reboots. Use lowercase
+characters as well inside modifiers. For example: to simulate ctrl+c use
+`c`.
In addition to the special keys, each command to type is treated as a
[template engine](/docs/templates/engine.html).
@@ -296,6 +305,9 @@ an Ubuntu 12.04 installer:
]
```
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
## Integration Services
Packer will automatically attach the integration services iso as a dvd drive
@@ -377,7 +389,7 @@ Packer config:
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "4h",
- "shutdown_command": "f:\\run-sysprep.cmd",
+ "shutdown_command": "f:\\run-sysprep.cmd",
"ram_size": 4096,
"cpu": 4,
"generation": 2,
@@ -495,7 +507,7 @@ autounattend.xml:
3128MSR
-
+
4true
@@ -590,7 +602,7 @@ autounattend.xml:
0truecache-proxy:3142
-
+
Finish Setup cache proxy during installation -->
@@ -828,7 +840,7 @@ sysprep-unattend.xml:
falsecache-proxy:3142
-Finish proxy after sysprep -->
+Finish proxy after sysprep -->
0809:00000809en-GB
diff --git a/website/source/docs/builders/hyperv-vmcx.html.md b/website/source/docs/builders/hyperv-vmcx.html.md
new file mode 100644
index 000000000..854710a23
--- /dev/null
+++ b/website/source/docs/builders/hyperv-vmcx.html.md
@@ -0,0 +1,1024 @@
+---
+description: |-
+ The Hyper-V Packer builder is able to clone an existing Hyper-V virtual machine and export them.
+layout: "docs"
+sidebar_current: 'docs-builders-hyperv-vmcx'
+page_title: "Hyper-V Builder (from an vmcx)"
+---
+
+# Hyper-V Builder (from a vmcx)
+
+Type: `hyperv-vmcx`
+
+The Hyper-V Packer builder is able to use exported virtual machines or clone existing
+[Hyper-V](https://www.microsoft.com/en-us/server-cloud/solutions/virtualization.aspx)
+virtual machines.
+
+The builder imports a virtual machine or clones an existing virtual machine boots it,
+and provisioning software within the OS, then shutting it down. The result of the
+Hyper-V builder is a directory containing all the files necessary to run the virtual
+machine portably.
+
+## Basic Example
+
+Here is a basic example. This example is not functional. It will start the
+OS installer but then fail because we don't provide the preseed file for
+Ubuntu to self-install. Still, the example serves to show the basic configuration:
+
+Import from folder:
+
+```json
+{
+ "type": "hyperv-vmcx",
+ "clone_from_vmxc_path": "c:\\virtual machines\\ubuntu-12.04.5-server-amd64",
+ "ssh_username": "packer",
+ "ssh_password": "packer",
+ "shutdown_command": "echo 'packer' | sudo -S shutdown -P now"
+}
+```
+
+Clone from existing virtual machine:
+
+```json
+{
+ "clone_from_vm_name": "ubuntu-12.04.5-server-amd64",
+ "shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
+ "ssh_password": "packer",
+ "ssh_username": "packer",
+ "type": "hyperv-vmcx"
+}
+```
+
+It is important to add a `shutdown_command`. By default Packer halts the
+virtual machine and the file system may not be sync'd. Thus, changes made in a
+provisioner might not be saved.
+
+## Configuration Reference
+
+There are many configuration options available for the Hyper-V builder.
+They are organized below into two categories: required and optional. Within
+each category, the available options are alphabetized and described.
+
+In addition to the options listed here, a
+[communicator](/docs/templates/communicator.html)
+can be configured for this builder.
+
+### Required for virtual machine import:
+
+- `clone_from_vmxc_path` (string) - The path to the exported virtual machine
+ folder.
+
+### Required for virtual machine clone:
+
+- `clone_from_vm_name` (string) - The name of the vm to clone from. Ideally
+ the machine to clone from should be shutdown.
+
+### Optional:
+
+- `clone_from_snapshot_name` (string) - The name of the snapshot
+
+- `clone_all_snapshots` (boolean) - Should all snapshots be cloned when the
+ machine is cloned.
+
+- `boot_command` (array of strings) - This is an array of commands to type
+ when the virtual machine is first booted. The goal of these commands should
+ be to type just enough to initialize the operating system installer.
+ Special keys can be typed as well, and are covered in the section below on
+ the boot command. If this is not specified, it is assumed the installer
+ will start itself.
+
+- `boot_wait` (string) - The time to wait after booting the initial virtual
+ machine before typing the `boot_command`. The value of this should be
+ a duration. Examples are "5s" and "1m30s" which will cause Packer to wait
+ five seconds and one minute 30 seconds, respectively. If this isn't
+ specified, the default is 10 seconds.
+
+- `cpu` (integer) - The number of cpus the virtual machine should use. If
+ this isn't specified, the default is 1 cpu.
+
+- `enable_dynamic_memory` (bool) - If true enable dynamic memory for virtual
+ machine. This defaults to false.
+
+- `enable_mac_spoofing` (bool) - If true enable mac spoofing for virtual
+ machine. This defaults to false.
+
+- `enable_secure_boot` (bool) - If true enable secure boot for virtual
+ machine. This defaults to false.
+
+- `enable_virtualization_extensions` (bool) - If true enable virtualization
+ extensions for virtual machine. This defaults to false. For nested
+ virtualization you need to enable mac spoofing, disable dynamic memory and
+ have at least 4GB of RAM for virtual machine.
+
+- `floppy_files` (array of strings) - A list of files to place onto a floppy
+ disk that is attached when the VM is booted. This is most useful for
+ unattended Windows installs, which look for an `Autounattend.xml` file on
+ removable media. By default, no floppy will be attached. All files listed
+ in this setting get placed into the root directory of the floppy and the
+ floppy is attached as the first floppy device. Currently, no support exists
+ for creating sub-directories on the floppy. Wildcard characters (*, ?, and
+ []) are allowed. Directory names are also allowed, which will add all the
+ files found in the directory to the floppy.
+
+- `floppy_dirs` (array of strings) - A list of directories to place onto the
+ floppy disk recursively. This is similar to the `floppy_files` option
+ except that the directory structure is preserved. This is useful for when
+ your floppy disk includes drivers or if you just want to organize it's
+ contents as a hierarchy. Wildcard characters (\*, ?, and \[\]) are allowed.
+ The maximum summary size of all files in the listed directories are the
+ same as in `floppy_files`.
+
+- `guest_additions_mode` (string) - How should guest additions be installed.
+ If value `attach` then attach iso image with by specified by
+ `guest_additions_path`. Otherwise guest additions is not installed.
+
+- `guest_additions_path` (string) - The path to the iso image for guest
+ additions.
+
+- `http_directory` (string) - Path to a directory to serve using an HTTP
+ server. The files in this directory will be available over HTTP that will
+ be requestable from the virtual machine. This is useful for hosting
+ kickstart files and so on. By default this is "", which means no HTTP
+ server will be started. The address and port of the HTTP server will be
+ available as variables in `boot_command`. This is covered in more detail
+ below.
+
+- `http_port_min` and `http_port_max` (integer) - These are the minimum and
+ maximum port to use for the HTTP server started to serve the
+ `http_directory`. Because Packer often runs in parallel, Packer will choose
+ a randomly available port in this range to run the HTTP server. If you want
+ to force the HTTP server to be on one port, make this minimum and maximum
+ port the same. By default the values are 8000 and 9000, respectively.
+
+- `iso_checksum` (string) - The checksum for the OS ISO file. Because ISO
+ files are so large, this is required and Packer will verify it prior to
+ booting a virtual machine with the ISO attached. The type of the checksum
+ is specified with `iso_checksum_type`, documented below.
+
+- `iso_checksum_type` (string) - The type of the checksum specified in
+ `iso_checksum`. Valid values are "none", "md5", "sha1", "sha256", or
+ "sha512" currently. While "none" will skip checksumming, this is not
+ recommended since ISO files are generally large and corruption does happen
+ from time to time.
+
+- `iso_url` (string) - A URL to the ISO or VHD containing the installation
+ image. This URL can be either an HTTP URL or a file URL (or path to
+ a file). If this is an HTTP URL, Packer will download iso and cache it
+ between runs.
+
+- `iso_urls` (array of strings) - Multiple URLs for the ISO or VHD to
+ download. Packer will try these in order. If anything goes wrong attempting
+ to download or while downloading a single URL, it will move on to the next.
+ All URLs must point to the same file (same checksum). By default this is
+ empty and `iso_url` is used. Only one of `iso_url` or `iso_urls` can be
+ specified.
+
+- `iso_target_extension` (string) - The extension of the iso file after
+ download. This defaults to "iso".
+
+- `iso_target_path` (string) - The path where the iso should be saved after
+ download. By default will go in the packer cache, with a hash of the
+ original filename as its name.
+
+- `output_directory` (string) - This is the path to the directory where the
+ resulting virtual machine will be created. This may be relative or
+ absolute. If relative, the path is relative to the working directory when
+ `packer` is executed. This directory must not exist or be empty prior to
+ running the builder. By default this is "output-BUILDNAME" where
+ "BUILDNAME" is the name of the build.
+
+- `ram_size` (integer) - The size, in megabytes, of the ram to create for the
+ VM. By default, this is 1 GB.
+
+* `secondary_iso_images` (array of strings) - A list of iso paths to attached
+ to a VM when it is booted. This is most useful for unattended Windows
+ installs, which look for an `Autounattend.xml` file on removable media. By
+ default, no secondary iso will be attached.
+
+- `shutdown_command` (string) - The command to use to gracefully shut down
+ the machine once all the provisioning is done. By default this is an empty
+ string, which tells Packer to just forcefully shut down the machine unless
+ a shutdown command takes place inside script so this may safely be omitted.
+ If one or more scripts require a reboot it is suggested to leave this blank
+ since reboots may fail and specify the final shutdown command in your last
+ script.
+
+- `shutdown_timeout` (string) - The amount of time to wait after executing
+ the `shutdown_command` for the virtual machine to actually shut down. If it
+ doesn't shut down in this time, it is an error. By default, the timeout is
+ "5m", or five minutes.
+
+- `skip_compaction` (bool) - If true skip compacting the hard disk for
+ virtual machine when exporting. This defaults to false.
+
+- `switch_name` (string) - The name of the switch to connect the virtual
+ machine to. Be defaulting this to an empty string, Packer will try to
+ determine the switch to use by looking for external switch that is up and
+ running.
+
+- `switch_vlan_id` (string) - This is the vlan of the virtual switch's
+ network card. By default none is set. If none is set then a vlan is not set
+ on the switch's network card. If this value is set it should match the vlan
+ specified in by `vlan_id`.
+
+- `vlan_id` (string) - This is the vlan of the virtual machine's network card
+ for the new virtual machine. By default none is set. If none is set then
+ vlans are not set on the virtual machine's network card.
+
+- `vm_name` (string) - This is the name of the virtual machine for the new
+ virtual machine, without the file extension. By default this is
+ "packer-BUILDNAME", where "BUILDNAME" is the name of the build.
+
+## Boot Command
+
+The `boot_command` configuration is very important: it specifies the keys
+to type when the virtual machine is first booted in order to start the
+OS installer. This command is typed after `boot_wait`, which gives the
+virtual machine some time to actually load the ISO.
+
+As documented above, the `boot_command` is an array of strings. The
+strings are all typed in sequence. It is an array only to improve readability
+within the template.
+
+The boot command is "typed" character for character over the virtual keyboard
+to the machine, simulating a human actually typing the keyboard. There are
+a set of special keys available. If these are in your boot command, they
+will be replaced by the proper key:
+
+- `` - Backspace
+
+- `` - Delete
+
+- `` and `` - Simulates an actual "enter" or "return" keypress.
+
+- `` - Simulates pressing the escape key.
+
+- `` - Simulates pressing the tab key.
+
+- `` - `` - Simulates pressing a function key.
+
+- `` `` `` `` - Simulates pressing an arrow key.
+
+- `` - Simulates pressing the spacebar.
+
+- `` - Simulates pressing the insert key.
+
+- `` `` - Simulates pressing the home and end keys.
+
+- `` `` - Simulates pressing the page up and page down keys.
+
+- `` `` - Simulates pressing the alt key.
+
+- `` `` - Simulates pressing the ctrl key.
+
+- `` `` - Simulates pressing the shift key.
+
+- `` `` - Simulates pressing and holding the alt key.
+
+- `` `` - Simulates pressing and holding the ctrl key.
+
+- `` `` - Simulates pressing and holding the shift key.
+
+- `` `` - Simulates releasing a held alt key.
+
+- `` `` - Simulates releasing a held ctrl key.
+
+- `` `` - Simulates releasing a held shift key.
+
+- `` `` `` - Adds a 1, 5 or 10 second pause before
+ sending any additional keys. This is useful if you have to generally wait
+ for the UI to update before typing more.
+
+When using modifier keys `ctrl`, `alt`, `shift` ensure that you release them, otherwise they will be held down until the machine reboots. Use lowercase characters as well inside modifiers. For example: to simulate ctrl+c use `c`.
+
+In addition to the special keys, each command to type is treated as a
+[configuration template](/docs/templates/configuration-templates.html).
+The available variables are:
+
+* `HTTPIP` and `HTTPPort` - The IP and port, respectively of an HTTP server
+ that is started serving the directory specified by the `http_directory`
+ configuration parameter. If `http_directory` isn't specified, these will
+ be blank!
+
+Example boot command. This is actually a working boot command used to start
+an Ubuntu 12.04 installer:
+
+```text
+[
+ "",
+ "/install/vmlinuz noapic ",
+ "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
+ "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
+ "hostname={{ .Name }} ",
+ "fb=false debconf/frontend=noninteractive ",
+ "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
+ "keyboard-configuration/variant=USA console-setup/ask_detect=false ",
+ "initrd=/install/initrd.gz -- "
+]
+```
+
+## Integration Services
+
+Packer will automatically attach the integration services iso as a dvd drive
+for the version of Hyper-V that is running.
+
+## Generation 1 vs Generation 2
+
+Floppy drives are no longer supported by generation 2 machines. This requires you to
+take another approach when dealing with preseed or answer files. Two possible options
+are using virtual dvd drives or using the built in web server.
+
+When dealing with Windows you need to enable UEFI drives for generation 2 virtual machines.
+
+## Creating iso from directory
+
+Programs like mkisofs can be used to create an iso from a directory.
+There is a [windows version of mkisofs](http://opensourcepack.blogspot.co.uk/p/cdrtools.html).
+
+Example powershell script. This is an actually working powershell script used to create a Windows answer iso:
+
+```text
+$isoFolder = "answer-iso"
+if (test-path $isoFolder){
+ remove-item $isoFolder -Force -Recurse
+}
+
+if (test-path windows\windows-2012R2-serverdatacenter-amd64\answer.iso){
+ remove-item windows\windows-2012R2-serverdatacenter-amd64\answer.iso -Force
+}
+
+mkdir $isoFolder
+
+copy windows\windows-2012R2-serverdatacenter-amd64\Autounattend.xml $isoFolder\
+copy windows\windows-2012R2-serverdatacenter-amd64\sysprep-unattend.xml $isoFolder\
+copy windows\common\set-power-config.ps1 $isoFolder\
+copy windows\common\microsoft-updates.ps1 $isoFolder\
+copy windows\common\win-updates.ps1 $isoFolder\
+copy windows\common\run-sysprep.ps1 $isoFolder\
+copy windows\common\run-sysprep.cmd $isoFolder\
+
+$textFile = "$isoFolder\Autounattend.xml"
+
+$c = Get-Content -Encoding UTF8 $textFile
+
+# Enable UEFI and disable Non EUFI
+$c | % { $_ -replace '','','Finish Non UEFI -->' } | % { $_ -replace '' } | % { $_ -replace 'Finish UEFI compatible -->','' } | sc -Path $textFile
+
+& .\mkisofs.exe -r -iso-level 4 -UDF -o windows\windows-2012R2-serverdatacenter-amd64\answer.iso $isoFolder
+
+if (test-path $isoFolder){
+ remove-item $isoFolder -Force -Recurse
+}
+```
+
+
+## Example For Windows Server 2012 R2 Generation 2
+
+Packer config:
+
+```javascript
+{
+ "builders": [
+ {
+ "vm_name":"windows2012r2",
+ "type": "hyperv-iso",
+ "disk_size": 61440,
+ "floppy_files": [],
+ "secondary_iso_images": [
+ "./windows/windows-2012R2-serverdatacenter-amd64/answer.iso"
+ ],
+ "http_directory": "./windows/common/http/",
+ "boot_wait": "0s",
+ "boot_command": [
+ "aaa"
+ ],
+ "iso_url": "http://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVER_EVAL_EN-US-IRM_SSS_X64FREE_EN-US_DV5.ISO",
+ "iso_checksum_type": "md5",
+ "iso_checksum": "458ff91f8abc21b75cb544744bf92e6a",
+ "communicator":"winrm",
+ "winrm_username": "vagrant",
+ "winrm_password": "vagrant",
+ "winrm_timeout" : "4h",
+ "shutdown_command": "f:\\run-sysprep.cmd",
+ "ram_size": 4096,
+ "cpu": 4,
+ "generation": 2,
+ "switch_name":"LAN",
+ "enable_secure_boot":true
+ }],
+ "provisioners": [{
+ "type": "powershell",
+ "elevated_user":"vagrant",
+ "elevated_password":"vagrant",
+ "scripts": [
+ "./windows/common/install-7zip.ps1",
+ "./windows/common/install-chef.ps1",
+ "./windows/common/compile-dotnet-assemblies.ps1",
+ "./windows/common/cleanup.ps1",
+ "./windows/common/ultradefrag.ps1",
+ "./windows/common/sdelete.ps1"
+ ]
+ }],
+ "post-processors": [
+ {
+ "type": "vagrant",
+ "keep_input_artifact": false,
+ "output": "{{.Provider}}_windows-2012r2_chef.box"
+ }
+ ]
+}
+```
+
+autounattend.xml:
+
+```xml
+
+
+
+
+
+ en-US
+
+ en-US
+ en-US
+ en-US
+ en-US
+ en-US
+
+
+
+
+
+
+
+ Primary
+ 1
+ 350
+
+
+ 2
+ Primary
+ true
+
+
+
+
+ true
+ NTFS
+
+ 1
+ 1
+
+
+ NTFS
+
+ C
+ 2
+ 2
+
+
+ 0
+ true
+
+
+
+
+
+
+ /IMAGE/NAME
+ Windows Server 2012 R2 SERVERSTANDARD
+
+
+
+ 0
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ OnError
+
+ true
+ Vagrant
+ Vagrant
+
+
+
+
+
+
+ false
+
+ vagrant-2012r2
+ Coordinated Universal Time
+
+
+
+ true
+
+
+ false
+ false
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+ vagrant
+ true
+
+ true
+ vagrant
+
+
+
+ cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
+ Set Execution Policy 64 Bit
+ 1
+ true
+
+
+ C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
+ Set Execution Policy 32 Bit
+ 2
+ true
+
+
+ cmd.exe /c winrm quickconfig -q
+ winrm quickconfig -q
+ 3
+ true
+
+
+ cmd.exe /c winrm quickconfig -transport:http
+ winrm quickconfig -transport:http
+ 4
+ true
+
+
+ cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
+ Win RM MaxTimoutms
+ 5
+ true
+
+
+ cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}
+ Win RM MaxMemoryPerShellMB
+ 6
+ true
+
+
+ cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
+ Win RM AllowUnencrypted
+ 7
+ true
+
+
+ cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
+ Win RM auth Basic
+ 8
+ true
+
+
+ cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
+ Win RM client auth Basic
+ 9
+ true
+
+
+ cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
+ Win RM listener Address/Port
+ 10
+ true
+
+
+ cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes
+ Win RM adv firewall enable
+ 11
+ true
+
+
+ cmd.exe /c netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
+ Win RM port open
+ 12
+ true
+
+
+ cmd.exe /c netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
+ Win RM port open
+ 13
+ true
+
+
+ cmd.exe /c net stop winrm
+ Stop Win RM Service
+ 14
+ true
+
+
+ cmd.exe /c sc config winrm start= disabled
+ Win RM Autostart
+ 15
+ true
+
+
+ %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f
+ 16
+ Show file extensions in Explorer
+
+
+ %SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f
+ 17
+ Enable QuickEdit mode
+
+
+ %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f
+ 18
+ Show Run command in Start Menu
+
+
+ %SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f
+ 19
+ Show Administrative Tools in Start Menu
+
+
+ %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f
+ 20
+ Zero Hibernation File
+
+
+ %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f
+ 21
+ Disable Hibernation Mode
+
+
+ cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
+ 22
+ Disable password expiration for vagrant user
+
+
+ cmd.exe /c winrm set winrm/config/winrs @{MaxShellsPerUser="30"}
+ Win RM MaxShellsPerUser
+ 23
+ true
+
+
+ cmd.exe /c winrm set winrm/config/winrs @{MaxProcessesPerShell="25"}
+ Win RM MaxProcessesPerShell
+ 24
+ true
+
+
+ %SystemRoot%\System32\reg.exe ADD "HKLM\System\CurrentControlSet\Services\Netlogon\Parameters" /v DisablePasswordChange /t REG_DWORD /d 1 /f
+ Turn off computer password
+ 25
+
+
+ cmd.exe /c netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
+ ICMP open for ping
+ 26
+ true
+
+
+
+ cmd.exe /c IF EXIST a:\set-power-config.ps1 (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\set-power-config.ps1) ELSE (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File f:\set-power-config.ps1)
+ 97
+ Turn off all power saving and timeouts
+ true
+
+
+ cmd.exe /c IF EXIST a:\microsoft-updates.ps1 (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\microsoft-updates.ps1) ELSE (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File f:\microsoft-updates.ps1)
+ 98
+ Enable Microsoft Updates
+ true
+
+
+ cmd.exe /c IF EXIST a:\win-updates.ps1 (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1) ELSE (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File f:\win-updates.ps1)
+ Install Windows Updates
+ 100
+ true
+
+
+
+
+ true
+ true
+ true
+ true
+ true
+ Work
+ 1
+
+
+
+ vagrant
+ true
+
+
+
+
+ vagrant
+ true
+
+ administrators
+ Vagrant
+ vagrant
+ Vagrant User
+
+
+
+
+ Coordinated Universal Time
+
+
+
+
+ false
+
+
+
+
+
+```
+
+sysprep-unattend.xml:
+
+```text
+
+
+
+
+ 1
+
+
+
+
+
+ 0809:00000809
+ en-GB
+ en-US
+ en-US
+ en-GB
+
+
+
+ true
+ true
+ true
+ true
+ Work
+ 1
+ true
+ true
+
+
+
+ vagrant
+ true
+
+
+
+
+ vagrant
+ true
+
+ administrators
+ Vagrant
+ vagrant
+ Vagrant User
+
+
+
+ true
+ Coordinated Universal Time
+
+ 2
+
+
+
+
+```
+
+## Example For Ubuntu Vivid Generation 2
+
+If you are running Windows under virtualization, you may need to create
+a virtual switch with an `External` connection type.
+
+### Packer config:
+
+```javascript
+{
+ "variables": {
+ "vm_name": "ubuntu-xenial",
+ "cpu": "2",
+ "ram_size": "1024",
+ "disk_size": "21440",
+ "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.1-server-amd64.iso",
+ "iso_checksum_type": "sha1",
+ "iso_checksum": "DE5EE8665048F009577763EFBF4A6F0558833E59"
+ },
+ "builders": [
+ {
+ "vm_name":"{{user `vm_name`}}",
+ "type": "hyperv-iso",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_additions_mode": "disable",
+ "iso_url": "{{user `iso_url`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "communicator":"ssh",
+ "ssh_username": "packer",
+ "ssh_password": "packer",
+ "ssh_timeout" : "4h",
+ "http_directory": "./",
+ "boot_wait": "5s",
+ "boot_command": [
+ "",
+ "set gfxpayload=1024x768",
+ "linux /install/vmlinuz ",
+ "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/hyperv-taliesins.cfg ",
+ "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
+ "hostname={{.Name}} ",
+ "fb=false debconf/frontend=noninteractive ",
+ "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
+ "keyboard-configuration/variant=USA console-setup/ask_detect=false ",
+ "initrd /install/initrd.gz",
+ "boot"
+ ],
+ "shutdown_command": "echo 'packer' | sudo -S -E shutdown -P now",
+ "ram_size": "{{user `ram_size`}}",
+ "cpu": "{{user `cpu`}}",
+ "generation": 2,
+ "enable_secure_boot": false
+ }]
+}
+```
+
+### preseed.cfg:
+
+```text
+## Options to set on the command line
+d-i debian-installer/locale string en_US.utf8
+d-i console-setup/ask_detect boolean false
+d-i console-setup/layout string us
+
+d-i netcfg/get_hostname string nl-ams-basebox3
+d-i netcfg/get_domain string unassigned-domain
+
+d-i time/zone string UTC
+d-i clock-setup/utc-auto boolean true
+d-i clock-setup/utc boolean true
+
+d-i kbd-chooser/method select American English
+
+d-i netcfg/wireless_wep string
+
+d-i base-installer/kernel/override-image string linux-server
+
+d-i debconf debconf/frontend select Noninteractive
+
+d-i pkgsel/install-language-support boolean false
+tasksel tasksel/first multiselect standard, ubuntu-server
+
+## Partitioning
+d-i partman-auto/method string lvm
+
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/device_remove_lvm boolean true
+d-i partman-lvm/confirm boolean true
+
+d-i partman-auto-lvm/guided_size string max
+d-i partman-auto/choose_recipe select atomic
+
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+
+# Write the changes to disks and configure LVM?
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+
+d-i partman-partitioning/no_bootable_gpt_biosgrub boolean false
+d-i partman-partitioning/no_bootable_gpt_efi boolean false
+d-i partman-efi/non_efi_system boolean true
+
+# Default user
+d-i passwd/user-fullname string packer
+d-i passwd/username string packer
+d-i passwd/user-password password packer
+d-i passwd/user-password-again password packer
+d-i user-setup/encrypt-home boolean false
+d-i user-setup/allow-password-weak boolean true
+
+# Minimum packages
+d-i pkgsel/include string openssh-server ntp linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common
+
+# Upgrade packages after debootstrap? (none, safe-upgrade, full-upgrade)
+# (note: set to none for speed)
+d-i pkgsel/upgrade select none
+
+d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+d-i finish-install/reboot_in_progress note
+
+d-i pkgsel/update-policy select none
+
+choose-mirror-bin mirror/http/proxy string
+```
diff --git a/website/source/docs/builders/hyperv.html.md b/website/source/docs/builders/hyperv.html.md
index d12e2a212..57f2015a9 100644
--- a/website/source/docs/builders/hyperv.html.md
+++ b/website/source/docs/builders/hyperv.html.md
@@ -12,9 +12,12 @@ sidebar_current: 'docs-builders-hyperv'
The HyperV Packer builder is able to create [Hyper-V](https://www.microsoft.com/en-us/server-cloud/solutions/virtualization.aspx)
virtual machines and export them.
-Packer currently only support building HyperV machines with an iso:
-
- [hyperv-iso](/docs/builders/hyperv-iso.html) - Starts from
an ISO file, creates a brand new Hyper-V VM, installs an OS,
provisions software within the OS, then exports that machine to create
an image. This is best for people who want to start from scratch.
+
+- [hyperv-vmcx](/docs/builders/hyperv-vmcx.html) - Clones an
+ an existing virtual machine, provisions software within the OS,
+ then exports that machine to create an image. This is best for
+ people who have existing base images and want to customize them.
\ No newline at end of file
diff --git a/website/source/docs/builders/lxc.html.md b/website/source/docs/builders/lxc.html.md
new file mode 100644
index 000000000..be4c249e8
--- /dev/null
+++ b/website/source/docs/builders/lxc.html.md
@@ -0,0 +1,112 @@
+---
+description: |
+ The `lxc` Packer builder builds containers for lxc1. The builder starts an LXC
+ container, runs provisioners within this container, then exports the container
+ as a tar.gz of the root file system.
+layout: docs
+page_title: 'LXC - Builders'
+sidebar_current: 'docs-builders-lxc`'
+...
+
+# LXC Builder
+
+Type: `lxc`
+
+The `lxc` Packer builder builds containers for lxc1. The builder starts an LXC
+container, runs provisioners within this container, then exports the container
+as a tar.gz of the root file system.
+
+The LXC builder requires a modern linux kernel and the `lxc` or `lxc1` package.
+This builder does not work with LXD.
+
+~> Note: to build Centos images on a Debian family host, you will need the `yum`
+package installed.
+ Some provisioners such as `ansible-local` get confused when running in
+a container of a different family. E.G. it will attempt to use `apt-get` to
+install packages, when running in a Centos container if the parent OS is Debian
+based.
+
+## Basic Example
+
+Below is a fully functioning example.
+
+``` {.javascript}
+{
+ "builders": [
+ {
+ "type": "lxc",
+ "name": "lxc-trusty",
+ "config_file": "/tmp/lxc/config",
+ "template_name": "ubuntu",
+ "template_environment_vars": [
+ "SUITE=trusty"
+ ]
+ },
+ {
+ "type": "lxc",
+ "name": "lxc-xenial",
+ "config_file": "/tmp/lxc/config",
+ "template_name": "ubuntu",
+ "template_environment_vars": [
+ "SUITE=xenial"
+ ]
+ },
+ {
+ "type": "lxc",
+ "name": "lxc-jessie",
+ "config_file": "/tmp/lxc/config",
+ "template_name": "debian",
+ "template_environment_vars": [
+ "SUITE=jessie"
+ ]
+ },
+ {
+ "type": "lxc",
+ "name": "lxc-centos-7-x64",
+ "config_file": "/tmp/lxc/config",
+ "template_name": "centos",
+ "template_parameters": [
+ "-R","7",
+ "-a","x86_64"
+ ]
+ }
+ ]
+}
+```
+
+## Configuration Reference
+
+### Required:
+
+- `config_file` (string) - The path to the lxc configuration file.
+
+- `template_name` (string) - The LXC template name to use.
+
+- `template_environment_vars` (array of strings) - Environmental variables to
+ use to build the template with.
+
+### Optional:
+
+- `target_runlevel` (int) - The minimum run level to wait for the container to
+ reach. Note some distributions (Ubuntu) simulate run levels and may report
+ 5 rather than 3.
+
+- `output_directory` (string) - The directory in which to save the exported
+ tar.gz. Defaults to `output-` in the current directory.
+
+- `container_name` (string) - The name of the LXC container. Usually stored in
+ `/var/lib/lxc/containers/`. Defaults to
+ `packer-`.
+
+- `command_wrapper` (string) - Allows you to specify a wrapper command, such
+ as `ssh` so you can execute packer builds on a remote host. Defaults to
+ Empty.
+
+- `init_timeout` (string) - The timeout in seconds to wait for the the
+ container to start. Defaults to 20 seconds.
+
+- `template_parameters` (array of strings) - Options to pass to the given
+ `lxc-template` command, usually located in
+ `/usr/share/lxc/templates/lxc-`. Note: This gets passed as
+ ARGV to the template command. Ensure you have an array of strings, as
+ a single string with spaces probably won't work. Defaults to `[]`.
diff --git a/website/source/docs/builders/lxd.html.md b/website/source/docs/builders/lxd.html.md
new file mode 100644
index 000000000..56dca60c2
--- /dev/null
+++ b/website/source/docs/builders/lxd.html.md
@@ -0,0 +1,60 @@
+---
+description: |
+ The `lxd` Packer builder builds containers for LXD. The builder starts an LXD
+ container, runs provisioners within this container, then saves the container
+ as an LXD image.
+layout: docs
+page_title: 'LXD - Builders'
+sidebar_current: 'docs-builders-lxd'
+...
+
+# LXD Builder
+
+Type: `lxd`
+
+The `lxd` Packer builder builds containers for LXD. The builder starts an LXD
+container, runs provisioners within this container, then saves the container
+as an LXD image.
+
+The LXD builder requires a modern linux kernel and the `lxd` package.
+This builder does not work with LXC.
+
+## Basic Example
+
+Below is a fully functioning example.
+
+``` {.javascript}
+{
+ "builders": [
+ {
+ "type": "lxd",
+ "name": "lxd-xenial",
+ "image": "ubuntu-daily:xenial",
+ "output_image": "ubuntu-xenial"
+ }
+ ]
+}
+```
+
+## Configuration Reference
+
+### Required:
+
+- `image` (string) - The source image to use when creating the build
+ container. This can be a (local or remote) image (name or fingerprint). E.G.
+ `my-base-image,` `ubuntu-daily:x,` `08fababf6f27`, ...
+
+ ~> Note: The builder may appear to pause if required to download
+ a remote image, as they are usually 100-200MB. `/var/log/lxd/lxd.log` will
+ mention starting such downloads.
+
+### Optional:
+
+- `name` (string) - The name of the started container. Defaults to
+ `packer-$PACKER_BUILD_NAME`.
+
+- `output_image` (string) - The name of the output artifact. Defaults to
+ `name`.
+
+- `command_wrapper` (string) - lets you prefix all builder commands, such as
+ with `ssh` for a remote build host. Defaults to `""`.
diff --git a/website/source/docs/builders/oracle-oci.html.md b/website/source/docs/builders/oracle-oci.html.md
new file mode 100644
index 000000000..3503d4fca
--- /dev/null
+++ b/website/source/docs/builders/oracle-oci.html.md
@@ -0,0 +1,143 @@
+---
+description:
+ The oracle-oci builder is able to create new custom images for use with Oracle
+ Cloud Infrastructure (OCI).
+layout: docs
+page_title: 'Oracle OCI - Builders'
+sidebar_current: 'docs-builders-oracle-oci'
+---
+
+# Oracle Cloud Infrastructure (OCI) Builder
+
+Type: `oracle-oci`
+
+The `oracle-oci` Packer builder is able to create new custom images for use
+with [Oracle Cloud Infrastructure](https://cloud.oracle.com) (OCI). The builder
+takes a base image, runs any provisioning necessary on the base image after
+launching it, and finally snapshots it creating a reusable custom image.
+
+It is recommended that you familiarise yourself with the
+[Key Concepts and Terminology](https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Concepts/concepts.htm)
+prior to using this builder if you have not done so already.
+
+The builder _does not_ manage images. Once it creates an image, it is up to you
+to use it or delete it.
+
+## Authorization
+
+The Oracle OCI API requires that requests be signed with the RSA public key
+associated with your [IAM](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm)
+user account. For a comprehensive example of how to configure the required
+authentication see the documentation on
+[Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm)
+([Oracle Cloud IDs](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm)).
+
+## Configuration Reference
+
+There are many configuration options available for the `oracle-oci` builder.
+In addition to the options listed here, a
+[communicator](/docs/templates/communicator.html) can be configured for this
+builder.
+
+### Required
+
+ - `availability_domain` (string) - The name of the
+ [Availability Domain](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm)
+ within which a new instance is launched and provisioned.
+ The names of the Availability Domains have a prefix that is specific to
+ your [tenancy](https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Concepts/concepts.htm#two).
+
+ To get a list of the Availability Domains, use the
+ [ListAvailabilityDomains](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/identity/latest/AvailabilityDomain/ListAvailabilityDomains)
+ operation, which is available in the IAM Service API.
+
+ - `base_image_ocid` (string) - The OCID of the [base image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/images.htm)
+ to use. This is the unique identifier of the image that will be used to
+ launch a new instance and provision it.
+
+ To get a list of the accepted image OCIDs, use the
+ [ListImages](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/latest/Image/ListImages)
+ operation available in the Core Services API.
+
+ - `compartment_ocid` (string) - The OCID of the
+ [compartment](https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Tasks/choosingcompartments.htm)
+
+ - `fingerprint` (string) - Fingerprint for the OCI API signing key.
+ Overrides value provided by the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ if present.
+
+ - `shape` (string) - The template that determines the number of
+ CPUs, amount of memory, and other resources allocated to a newly created
+ instance.
+
+ To get a list of the available shapes, use the
+ [ListShapes](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/20160918/Shape/ListShapes)
+ operation available in the Core Services API.
+
+ - `subnet_ocid` (string) - The name of the subnet within which a new instance
+ is launched and provisioned.
+
+ To get a list of your subnets, use the
+ [ListSubnets](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/latest/Subnet/ListSubnets)
+ operation available in the Core Services API.
+
+ Note: the subnet must be configured to allow access via your chosen
+ [communicator](/docs/templates/communicator.html) (communicator defaults to
+ [SSH tcp/22](/docs/templates/communicator.html#ssh_port)).
+
+
+### Optional
+
+ - `access_cfg_file` (string) - The path to the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm).
+ Defaults to `$HOME/.oci/config`.
+
+ - `access_cfg_file_account` (string) - The specific account in the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ to use. Defaults to `DEFAULT`.
+
+ - `image_name` (string) - The name to assign to the resulting custom image.
+
+ - `key_file` (string) - Full path and filename of the OCI API signing key.
+ Overrides value provided by the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ if present.
+
+ - `pass_phrase` (string) - Pass phrase used to decrypt the OCI API signing
+ key. Overrides value provided by the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ if present.
+
+ - `region` (string) - An Oracle Cloud Infrastructure region. Overrides
+ value provided by the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ if present.
+
+ - `tenancy_ocid` (string) - The OCID of your tenancy. Overrides value provided
+ by the
+ [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ if present.
+
+ - `user_ocid` (string) - The OCID of the user calling the OCI API. Overrides
+ value provided by the [OCI config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
+ if present.
+
+
+## Basic Example
+
+Here is a basic example. Note that account specific configuration has been
+substituted with the letter `a` and OCIDS have been shortened for brevity.
+
+``` {.json}
+{
+ "availability_domain": "aaaa:PHX-AD-1",
+ "base_image_ocid": "ocid1.image.oc1.phx.aaaaaaaa5yu6pw3riqtuhxzov7fdngi4tsteganmao54nq3pyxu3hxcuzmoa",
+ "compartment_ocid": "ocid1.compartment.oc1..aaa",
+ "image_name": "ExampleImage",
+ "shape": "VM.Standard1.1",
+ "ssh_username": "opc",
+ "subnet_ocid": "ocid1.subnet.oc1..aaa",
+ "type": "oracle-oci"
+}
+```
diff --git a/website/source/docs/builders/parallels-iso.html.md b/website/source/docs/builders/parallels-iso.html.md
index 14a484c97..5913c32c7 100644
--- a/website/source/docs/builders/parallels-iso.html.md
+++ b/website/source/docs/builders/parallels-iso.html.md
@@ -85,9 +85,6 @@ builder.
and "other". This can be omitted only if `parallels_tools_mode`
is "disable".
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
@@ -329,6 +326,9 @@ Ubuntu 12.04 installer:
]
```
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
## prlctl Commands
In order to perform extra customization of the virtual machine, a template can
diff --git a/website/source/docs/builders/parallels-pvm.html.md b/website/source/docs/builders/parallels-pvm.html.md
index 6a540b5b3..ba3d9c1a9 100644
--- a/website/source/docs/builders/parallels-pvm.html.md
+++ b/website/source/docs/builders/parallels-pvm.html.md
@@ -62,9 +62,6 @@ builder.
- `source_path` (string) - The path to a PVM directory that acts as the source
of this build.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
@@ -234,6 +231,9 @@ In addition to the special keys, each command to type is treated as a
[template engine](/docs/templates/engine.html). The
available variables are:
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
## prlctl Commands
In order to perform extra customization of the virtual machine, a template can
diff --git a/website/source/docs/builders/profitbricks.html.md b/website/source/docs/builders/profitbricks.html.md
index e317d5a0c..de76f3a09 100644
--- a/website/source/docs/builders/profitbricks.html.md
+++ b/website/source/docs/builders/profitbricks.html.md
@@ -39,7 +39,7 @@ builder.
- `location` (string) - Defaults to "us/las".
-- `ram` (integer) - Amount of RAM to use for this image. Defalts to "2048".
+- `ram` (integer) - Amount of RAM to use for this image. Defaults to "2048".
- `retries` (string) - Number of retries Packer will make status requests while waiting for the build to complete. Default value 120 seconds.
diff --git a/website/source/docs/builders/qemu.html.md b/website/source/docs/builders/qemu.html.md
index e297c0967..f9cbc1fcd 100644
--- a/website/source/docs/builders/qemu.html.md
+++ b/website/source/docs/builders/qemu.html.md
@@ -1,7 +1,6 @@
---
description: |
The Qemu Packer builder is able to create KVM and Xen virtual machine images.
- Support for Xen is experimental at this time.
layout: docs
page_title: 'QEMU - Builders'
sidebar_current: 'docs-builders-qemu'
@@ -12,8 +11,7 @@ sidebar_current: 'docs-builders-qemu'
Type: `qemu`
The Qemu Packer builder is able to create [KVM](http://www.linux-kvm.org) and
-[Xen](http://www.xenproject.org) virtual machine images. Support for Xen is
-experimental at this time.
+[Xen](http://www.xenproject.org) virtual machine images.
The builder builds a virtual machine by creating a new virtual machine from
scratch, booting it, installing an OS, rebooting the machine with the boot media
@@ -109,9 +107,6 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
boot directly from it. When passing a path to an IMG or QCOW2 file, you
should set `disk_image` to "true".
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `accelerator` (string) - The accelerator type to use when running the VM.
@@ -447,6 +442,9 @@ CentOS 6.4 installer:
}
```
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
### Troubleshooting
Some users have experienced errors complaining about invalid keymaps. This
diff --git a/website/source/docs/builders/virtualbox-iso.html.md b/website/source/docs/builders/virtualbox-iso.html.md
index 258f7ba90..5fa869ecd 100644
--- a/website/source/docs/builders/virtualbox-iso.html.md
+++ b/website/source/docs/builders/virtualbox-iso.html.md
@@ -77,12 +77,6 @@ builder.
This URL can be either an HTTP URL or a file URL (or path to a file). If
this is an HTTP URL, Packer will download it and cache it between runs.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
-- `ssh_password` (string) - The password to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
@@ -201,7 +195,7 @@ builder.
- `sata_port_count` (integer) - The number of ports available on any SATA
controller created, defaults to 1. VirtualBox supports up to 30 ports on a
- maxiumum of 1 SATA controller. Increasing this value can be useful if you
+ maximum of 1 SATA controller. Increasing this value can be useful if you
want to attach additional drives.
- `hard_drive_nonrotational` (boolean) - Forces some guests (i.e. Windows 7+)
@@ -420,6 +414,9 @@ Ubuntu 12.04 installer:
]
```
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
## Guest Additions
Packer will automatically download the proper guest additions for the version of
diff --git a/website/source/docs/builders/virtualbox-ovf.html.md b/website/source/docs/builders/virtualbox-ovf.html.md
index 5d6aa81fb..b8ff74d48 100644
--- a/website/source/docs/builders/virtualbox-ovf.html.md
+++ b/website/source/docs/builders/virtualbox-ovf.html.md
@@ -65,9 +65,6 @@ builder.
- `source_path` (string) - The path to an OVF or OVA file that acts as the
source of this build. It can also be a URL.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
@@ -205,6 +202,9 @@ builder.
`VBoxManage import`. This can be useful for passing "keepallmacs" or
"keepnatmacs" options for existing ovf images.
+- `keep_registered` (boolean) - Set this to `true` if you would like to keep
+ the VM registered with virtualbox. Defaults to `false`.
+
- `output_directory` (string) - This is the path to the directory where the
resulting virtual machine will be created. This may be relative or absolute.
If relative, the path is relative to the working directory when `packer`
@@ -370,6 +370,9 @@ Ubuntu 12.04 installer:
]
```
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
## Guest Additions
Packer will automatically download the proper guest additions for the version of
diff --git a/website/source/docs/builders/vmware-iso.html.md b/website/source/docs/builders/vmware-iso.html.md
index 4098182de..0d59274d1 100644
--- a/website/source/docs/builders/vmware-iso.html.md
+++ b/website/source/docs/builders/vmware-iso.html.md
@@ -42,6 +42,7 @@ self-install. Still, the example serves to show the basic configuration:
"iso_checksum": "af5f788aee1b32c4b2634734309cc9e9",
"iso_checksum_type": "md5",
"ssh_username": "packer",
+ "ssh_password": "packer",
"shutdown_command": "shutdown -P now"
}
```
@@ -80,9 +81,6 @@ builder.
This URL can be either an HTTP URL or a file URL (or path to a file). If
this is an HTTP URL, Packer will download it and cache it between runs.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
@@ -116,6 +114,9 @@ builder.
User's Guide](https://www.vmware.com/pdf/VirtualDiskManager.pdf) for desktop
VMware clients. For ESXi, refer to the proper ESXi documentation.
+* `disable_vnc` (bool) - Whether to create a VNC connection or not.
+ A `boot_command` cannot be used when this is `false`. Defaults to `false`.
+
- `floppy_files` (array of strings) - A list of files to place onto a floppy
disk that is attached when the VM is booted. This is most useful for
unattended Windows installs, which look for an `Autounattend.xml` file on
@@ -401,6 +402,9 @@ Ubuntu 12.04 installer:
]
```
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
+
## VMX Template
The heart of a VMware machine is the "vmx" file. This contains all the virtual
@@ -448,7 +452,8 @@ point, the vSphere API may be used.
Packer also requires VNC to issue boot commands during a build, which may be
disabled on some remote VMware Hypervisors. Please consult the appropriate
documentation on how to update VMware Hypervisor's firewall to allow these
-connections.
+connections. VNC can be disabled by not setting a `boot_command` and setting
+`disable_vnc` to `true`.
To use a remote VMware vSphere Hypervisor to build your virtual machine, fill in
the required `remote_*` configurations:
@@ -480,7 +485,8 @@ modify as well:
- `format` (string) - Either "ovf", "ova" or "vmx", this specifies the output
format of the exported virtual machine. This defaults to "ovf".
- Before using this option, you need to install `ovftool`.
+ Before using this option, you need to install `ovftool`. This option
+ works currently only with option remote_type set to "esx5".
### VNC port discovery
diff --git a/website/source/docs/builders/vmware-vmx.html.md b/website/source/docs/builders/vmware-vmx.html.md
index fb2fc2d86..389938d8f 100644
--- a/website/source/docs/builders/vmware-vmx.html.md
+++ b/website/source/docs/builders/vmware-vmx.html.md
@@ -56,9 +56,6 @@ builder.
- `source_path` (string) - Path to the source VMX file to clone.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
@@ -74,6 +71,9 @@ builder.
five seconds and one minute 30 seconds, respectively. If this isn't
specified, the default is 10 seconds.
+* `disable_vnc` (bool) - Whether to create a VNC connection or not.
+ A `boot_command` cannot be used when this is `false`. Defaults to `false`.
+
- `floppy_files` (array of strings) - A list of files to place onto a floppy
disk that is attached when the VM is booted. This is most useful for
unattended Windows installs, which look for an `Autounattend.xml` file on
@@ -272,3 +272,6 @@ Ubuntu 12.04 installer:
"initrd=/install/initrd.gz -- "
]
```
+
+For more examples of various boot commands, see the sample projects from our
+[community templates page](/community-tools.html#templates).
diff --git a/website/source/docs/extending/plugins.html.md b/website/source/docs/extending/plugins.html.md
index 0cc4aa724..180a6e8ea 100644
--- a/website/source/docs/extending/plugins.html.md
+++ b/website/source/docs/extending/plugins.html.md
@@ -1,7 +1,7 @@
---
description: |
Packer Plugins allow new functionality to be added to Packer without modifying
- the core source code. Packer plugins are able to add new commands, builders,
+ the core source code. Packer plugins are able to add new builders,
provisioners, hooks, and more.
layout: docs
page_title: 'Plugins - Extending'
@@ -11,10 +11,10 @@ sidebar_current: 'docs-extending-plugins'
# Plugins
Packer Plugins allow new functionality to be added to Packer without modifying
-the core source code. Packer plugins are able to add new commands, builders,
+the core source code. Packer plugins are able to add new builders,
provisioners, hooks, and more. In fact, much of Packer itself is implemented by
writing plugins that are simply distributed with Packer. For example, all the
-commands, builders, provisioners, and more that ship with Packer are implemented
+builders, provisioners, and more that ship with Packer are implemented
as Plugins that are simply hardcoded to load with Packer.
This page will cover how to install and use plugins. If you're interested in
@@ -60,8 +60,6 @@ The valid types for plugins are:
- `builder` - Plugins responsible for building images for a specific platform.
-- `command` - A CLI sub-command for `packer`.
-
- `post-processor` - A post-processor responsible for taking an artifact from
a builder and turning it into something else.
@@ -126,7 +124,7 @@ There are two steps involved in creating a plugin:
plugin, implement the `packer.Builder` interface.
2. Serve the interface by calling the appropriate plugin serving method in your
- main method. In the case of a builder, this is `plugin.ServeBuilder`.
+ main method. In the case of a builder, this is `plugin.RegisterBuilder`.
A basic example is shown below. In this example, assume the `Builder` struct
implements the `packer.Builder` interface:
@@ -140,11 +138,11 @@ import (
type Builder struct{}
func main() {
- plugin.ServeBuilder(new(Builder))
+ plugin.RegisterBuilder(new(Builder))
}
```
-**That's it!** `plugin.ServeBuilder` handles all the nitty gritty of
+**That's it!** `plugin.RegisterBuilder` handles all the nitty gritty of
communicating with Packer core and serving your builder over RPC. It can't get
much easier than that.
@@ -172,15 +170,14 @@ Packer will prefix any logs from plugins with the path to that plugin to make it
identifiable where the logs come from. Some example logs are shown below:
``` text
-2013/06/10 21:44:43 ui: Available commands are:
-2013/06/10 21:44:43 Loading command: build
-2013/06/10 21:44:43 packer-command-build: 2013/06/10 21:44:43 Plugin minimum port: 10000
-2013/06/10 21:44:43 packer-command-build: 2013/06/10 21:44:43 Plugin maximum port: 25000
-2013/06/10 21:44:43 packer-command-build: 2013/06/10 21:44:43 Plugin address: :10000
+2013/06/10 21:44:43 Loading builder: custom
+2013/06/10 21:44:43 packer-builder-custom: 2013/06/10 21:44:43 Plugin minimum port: 10000
+2013/06/10 21:44:43 packer-builder-custom: 2013/06/10 21:44:43 Plugin maximum port: 25000
+2013/06/10 21:44:43 packer-builder-custom: 2013/06/10 21:44:43 Plugin address: :10000
```
-As you can see, the log messages from the "build" command plugin are prefixed
-with "packer-command-build". Log output is *extremely* helpful in debugging
+As you can see, the log messages from the custom builder plugin are prefixed
+with "packer-builder-custom". Log output is *extremely* helpful in debugging
issues and you're encouraged to be as verbose as you need to be in order for the
logs to be helpful.
diff --git a/website/source/docs/post-processors/alicloud-import.html.md b/website/source/docs/post-processors/alicloud-import.html.md
index eec52c90d..356eea84b 100644
--- a/website/source/docs/post-processors/alicloud-import.html.md
+++ b/website/source/docs/post-processors/alicloud-import.html.md
@@ -4,9 +4,10 @@ description: |
various builders and imports it to an Alicloud customized image list.
layout: docs
page_title: 'Alicloud Import Post-Processor'
+sidebar_current: 'docs-post-processors-alicloud-import'
---
-# Aicloud Import Post-Processor
+# Alicloud Import Post-Processor
Type: `alicloud-import`
diff --git a/website/source/docs/post-processors/amazon-import.html.md b/website/source/docs/post-processors/amazon-import.html.md
index fdbba8264..0150d4a70 100644
--- a/website/source/docs/post-processors/amazon-import.html.md
+++ b/website/source/docs/post-processors/amazon-import.html.md
@@ -49,7 +49,7 @@ Optional:
- `ami_groups` (array of strings) - A list of groups that have access to
launch the imported AMI. By default no groups have permission to launch the
- AMI. `all` will make the AMI publically accessible. AWS currently doesn't
+ AMI. `all` will make the AMI publicly accessible. AWS currently doesn't
accept any value other than "all".
- `ami_name` (string) - The name of the ami within the console. If not
diff --git a/website/source/docs/post-processors/manifest.html.md b/website/source/docs/post-processors/manifest.html.md
index 9d930d241..774884fea 100644
--- a/website/source/docs/post-processors/manifest.html.md
+++ b/website/source/docs/post-processors/manifest.html.md
@@ -41,3 +41,64 @@ You can simply add `{"type":"manifest"}` to your post-processor section. Below i
]
}
```
+
+An example manifest file looks like:
+
+``` json
+{
+ "builds": [
+ {
+ "name": "docker",
+ "builder_type": "docker",
+ "build_time": 1507245986,
+ "files": [
+ {
+ "name": "packer_example",
+ "size": 102219776
+ }
+ ],
+ "artifact_id": "Container",
+ "packer_run_uuid": "6d5d3185-fa95-44e1-8775-9e64fe2e2d8f"
+ }
+ ],
+ "last_run_uuid": "6d5d3185-fa95-44e1-8775-9e64fe2e2d8f"
+}
+```
+
+If I run the build again, my new build will be added to the manifest file rather than replacing it, so you can always grab specific builds from the manifest by uuid.
+
+The mainfest above was generated from this packer.json:
+```
+{
+ "builders": [
+ {
+ "type": "docker",
+ "image": "ubuntu:latest",
+ "export_path": "packer_example",
+ "run_command": [ "-d", "-i", "-t", "--entrypoint=/bin/bash", "{{.Image}}" ]
+ }
+ ],
+ "provisioners": [
+ {
+ "type": "shell",
+ "inline": "mkdir /Setup"
+ },
+ {
+ "type": "file",
+ "source": "../scripts/dummy_bash.sh",
+ "destination": "/Setup"
+ },
+ {
+ "type": "shell",
+ "inline":["ls -alh /Setup/"]
+ }
+ ],
+ "post-processors": [
+ {
+ "type": "manifest",
+ "output": "manifest.json",
+ "strip_path": true
+ }
+ ]
+}
+```
diff --git a/website/source/docs/post-processors/vsphere-template.html.md b/website/source/docs/post-processors/vsphere-template.html.md
new file mode 100644
index 000000000..e72dc19cc
--- /dev/null
+++ b/website/source/docs/post-processors/vsphere-template.html.md
@@ -0,0 +1,53 @@
+---
+description: |
+ The Packer vSphere Template post-processor takes an artifact from the VMware-iso builder built on ESXi (i.e. remote)
+ and allows to mark a VM as a template and leaving it in a path of choice.
+layout: docs
+page_title: 'vSphere Template - Post-Processors'
+sidebar_current: 'docs-post-processors-vSphere-template'
+---
+
+# vSphere Template Post-Processor
+
+Type: `vsphere-template`
+
+The Packer vSphere template post-processor takes an artifact from the VMware-iso builder built on ESXi (i.e. remote) and
+allows to mark a VM as a template and leaving it in a path of choice.
+
+## Example
+
+An example is shown below, showing only the post-processor configuration:
+
+``` json
+{
+ "type": "vsphere-template",
+ "host": "vcenter.local",
+ "insecure": true,
+ "username": "root",
+ "password": "secret",
+ "datacenter": "mydatacenter",
+ "folder": "/packer-templates/os/distro-7"
+}
+```
+
+## Configuration
+
+There are many configuration options available for the post-processor. They are
+segmented below into two categories: required and optional parameters. Within
+each category, the available configuration keys are alphabetized.
+
+Required:
+
+- `host` (string) - The vSphere host that contains the VM built by the vmware-iso.
+
+- `password` (string) - Password to use to authenticate to the vSphere endpoint.
+
+- `username` (string) - The username to use to authenticate to the vSphere endpoint.
+
+Optional:
+
+- `datacenter` (string) - If you have more than one, you will need to specify which one the ESXi used.
+
+- `folder` (string) - Target path where the template will be created.
+
+- `insecure` (boolean) - If it's true skip verification of server certificate. Default is false
diff --git a/website/source/docs/post-processors/vsphere.html.md b/website/source/docs/post-processors/vsphere.html.md
index 9b16cac79..9a04fe7a3 100644
--- a/website/source/docs/post-processors/vsphere.html.md
+++ b/website/source/docs/post-processors/vsphere.html.md
@@ -36,9 +36,6 @@ Required:
- `password` (string) - Password to use to authenticate to the
vSphere endpoint.
-- `resource_pool` (string) - The resource pool to upload the VM to. This is
- *not required*.
-
- `username` (string) - The username to use to authenticate to the
vSphere endpoint.
@@ -52,6 +49,8 @@ Optional:
- `insecure` (boolean) - Whether or not the connection to vSphere can be done
over an insecure connection. By default this is false.
+- `resource_pool` (string) - The resource pool to upload the VM to.
+
- `vm_folder` (string) - The folder within the datastore to store the VM.
- `vm_network` (string) - The name of the VM network this VM will be
diff --git a/website/source/docs/provisioners/ansible-local.html.md b/website/source/docs/provisioners/ansible-local.html.md
index 3f9500534..e863db271 100644
--- a/website/source/docs/provisioners/ansible-local.html.md
+++ b/website/source/docs/provisioners/ansible-local.html.md
@@ -81,7 +81,7 @@ Optional:
remote machine.
When using an inventory file, it's also required to `--limit` the hosts to the
-specified host you're buiding. The `--limit` argument can be provided in the
+specified host you're building. The `--limit` argument can be provided in the
`extra_arguments` option.
An example inventory file may look like:
@@ -119,6 +119,9 @@ chi-appservers
cli](http://docs.ansible.com/ansible/galaxy.html#the-ansible-galaxy-command-line-tool)
on the remote machine. By default, this is empty.
+- `galaxycommand` (string) - The command to invoke ansible-galaxy.
+ By default, this is ansible-galaxy.
+
- `group_vars` (string) - a path to the directory containing ansible group
variables on your local system to be copied to the remote machine. By
default, this is empty.
diff --git a/website/source/docs/provisioners/ansible.html.md b/website/source/docs/provisioners/ansible.html.md
index 61719509e..97e548696 100644
--- a/website/source/docs/provisioners/ansible.html.md
+++ b/website/source/docs/provisioners/ansible.html.md
@@ -136,6 +136,16 @@ commonly useful Ansible variables:
machine that the script is running on. This is useful if you want to run
only certain parts of the playbook on systems built with certain builders.
+## Debugging
+
+To debug underlying issues with Ansible, add `"-vvvv"` to `"extra_arguments"` to enable verbose logging.
+
+``` json
+{
+ "extra_arguments": [ "-vvvv" ]
+}
+```
+
## Limitations
### Redhat / CentOS
@@ -231,3 +241,17 @@ This template should build a Windows Server 2012 image on Google Cloud Platform:
]
}
```
+
+### Too many SSH keys
+
+SSH servers only allow you to attempt to authenticate a certain number of times. All of your loaded keys will be tried before the dynamically generated key. If you have too many SSH keys loaded in your `ssh-agent`, the Ansible provisioner may fail authentication with a message similar to this:
+
+```console
+ googlecompute: fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '[127.0.0.1]:62684' (RSA) to the list of known hosts.\r\nReceived disconnect from 127.0.0.1 port 62684:2: too many authentication failures\r\nAuthentication failed.\r\n", "unreachable": true}
+```
+
+To unload all keys from your `ssh-agent`, run:
+
+```console
+$ ssh-add -D
+```
diff --git a/website/source/docs/provisioners/chef-client.html.md b/website/source/docs/provisioners/chef-client.html.md
index 93ec78725..54cd5e778 100644
--- a/website/source/docs/provisioners/chef-client.html.md
+++ b/website/source/docs/provisioners/chef-client.html.md
@@ -187,7 +187,7 @@ readability) to execute Chef:
When guest\_os\_type is set to "windows", Packer uses the following command to
execute Chef. The full path to Chef is required because the PATH environment
-variable changes don't immediately propogate to running processes.
+variable changes don't immediately propagate to running processes.
``` liquid
c:/opscode/chef/bin/chef-client.bat \
@@ -238,7 +238,7 @@ readability) to execute Chef:
When guest\_os\_type is set to "windows", Packer uses the following command to
execute Chef. The full path to Chef is required because the PATH environment
-variable changes don't immediately propogate to running processes.
+variable changes don't immediately propagate to running processes.
``` liquid
c:/opscode/chef/bin/knife.bat \
diff --git a/website/source/docs/provisioners/chef-solo.html.md b/website/source/docs/provisioners/chef-solo.html.md
index fa5595894..9ff9afcc5 100644
--- a/website/source/docs/provisioners/chef-solo.html.md
+++ b/website/source/docs/provisioners/chef-solo.html.md
@@ -153,7 +153,7 @@ readability) to execute Chef:
When guest\_os\_type is set to "windows", Packer uses the following command to
execute Chef. The full path to Chef is required because the PATH environment
-variable changes don't immediately propogate to running processes.
+variable changes don't immediately propagate to running processes.
``` liquid
c:/opscode/chef/bin/chef-solo.bat \
diff --git a/website/source/docs/provisioners/file.html.md b/website/source/docs/provisioners/file.html.md
index d00927fae..da78d4b61 100644
--- a/website/source/docs/provisioners/file.html.md
+++ b/website/source/docs/provisioners/file.html.md
@@ -45,7 +45,7 @@ The available configuration options are listed below. All elements are required.
directories must already exist.
- `direction` (string) - The direction of the file transfer. This defaults to
- "upload." If it is set to "download" then the file "source" in the machine
+ "upload". If it is set to "download" then the file "source" in the machine
will be downloaded locally to "destination"
## Directory Uploads
@@ -57,10 +57,7 @@ know.
First, the destination directory must already exist. If you need to create it,
use a shell provisioner just prior to the file provisioner in order to create
the directory. If the destination directory does not exist, the file
-provisioner may succeed, but it will have undefined results. Note that the
-`docker` builder does not have this requirement. It will create any needed
-destination directories, but it's generally best practice to not rely on this
-behavior.
+provisioner may succeed, but it will have undefined results.
Next, the existence of a trailing slash on the source path will determine
whether the directory name will be embedded within the destination, or whether
@@ -117,3 +114,15 @@ lrwxr-xr-x 1 mwhooker staff 5 Jan 27 17:10 file1link -> file1
]
}
```
+
+## Slowness when transferring large files over WinRM.
+
+Because of the way our WinRM transfers works, it can take a very long time to
+upload and download even moderately sized files. If you're experiencing
+slowness using the file provisioner on Windows, it's suggested that you set up
+an SSH server and use the [ssh
+communicator](/docs/templates/communicator.html#ssh-communicator). If you only
+want to transfer files to your guest, and if your builder supports it, you may
+also use the `http_directory` directive. This will cause that directory to be
+available to the guest over http, and set the environment variable
+`PACKER_HTTP_ADDR` to the address.
diff --git a/website/source/docs/provisioners/powershell.html.md b/website/source/docs/provisioners/powershell.html.md
index 87a9a76f6..f085a6e82 100644
--- a/website/source/docs/provisioners/powershell.html.md
+++ b/website/source/docs/provisioners/powershell.html.md
@@ -55,13 +55,30 @@ Optional parameters:
and Packer should therefore not convert Windows line endings to Unix line
endings (if there are any). By default this is false.
+- `elevated_execute_command` (string) - The command to use to execute the elevated
+ script. By default this is as follows:
+
+ ``` powershell
+ powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};. {{.Vars}}; &'{{.Path}}'; exit $LastExitCode }"
+ ```
+
+ The value of this is treated as [configuration
+ template](/docs/templates/engine.html). There are two
+ available variables: `Path`, which is the path to the script to run, and
+ `Vars`, which is the location of a temp file containing the list of `environment_vars`, if configured.
+
- `environment_vars` (array of strings) - An array of key/value pairs to
inject prior to the execute\_command. The format should be `key=value`.
Packer injects some environmental variables by default into the environment,
as well, which are covered in the section below.
- `execute_command` (string) - The command to use to execute the script. By
- default this is `powershell "& { {{.Vars}}{{.Path}}; exit $LastExitCode}"`.
+ default this is as follows:
+
+ ``` powershell
+ powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode }"
+ ```
+
The value of this is treated as [configuration
template](/docs/templates/engine.html). There are two
available variables: `Path`, which is the path to the script to run, and
diff --git a/website/source/docs/provisioners/puppet-masterless.html.md b/website/source/docs/provisioners/puppet-masterless.html.md
index c630f8412..63bc76576 100644
--- a/website/source/docs/provisioners/puppet-masterless.html.md
+++ b/website/source/docs/provisioners/puppet-masterless.html.md
@@ -59,6 +59,10 @@ Optional parameters:
variables](/docs/templates/engine.html) available. See
below for more information.
+- `guest_os_type` (string) - The target guest OS type, either "unix" or
+ "windows". Setting this to "windows" will cause the provisioner to use
+ Windows friendly paths and commands. By default, this is "unix".
+
- `extra_arguments` (array of strings) - This is an array of additional options to
pass to the puppet command when executing puppet. This allows for
customization of the `execute_command` without having to completely replace
@@ -99,12 +103,13 @@ multiple manifests you should use `manifest_file` instead.
executed to run Puppet are executed with `sudo`. If this is true, then the
sudo will be omitted.
-- `staging_directory` (string) - This is the directory where all the
- configuration of Puppet by Packer will be placed. By default this
- is "/tmp/packer-puppet-masterless". This directory doesn't need to exist but
- must have proper permissions so that the SSH user that Packer uses is able
- to create directories and write into this folder. If the permissions are not
- correct, use a shell provisioner prior to this to configure it properly.
+- `staging_directory` (string) - This is the directory where all the configuration
+ of Puppet by Packer will be placed. By default this is "/tmp/packer-puppet-masterless"
+ when guest OS type is unix and "C:/Windows/Temp/packer-puppet-masterless" when windows.
+ This directory doesn't need to exist but must have proper permissions so that the SSH
+ user that Packer uses is able to create directories and write into this folder.
+ If the permissions are not correct, use a shell provisioner prior to this to configure
+ it properly.
- `working_directory` (string) - This is the directory from which the puppet
command will be run. When using hiera with a relative path, this option
@@ -117,17 +122,31 @@ multiple manifests you should use `manifest_file` instead.
By default, Packer uses the following command (broken across multiple lines for
readability) to execute Puppet:
-``` liquid
-cd {{.WorkingDir}} && \
-{{.FacterVars}}{{if .Sudo}} sudo -E {{end}} \
-{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}{{end}}puppet apply \
- --verbose \
- --modulepath='{{.ModulePath}}' \
- {{if ne .HieraConfigPath ""}}--hiera_config='{{.HieraConfigPath}}' {{end}} \
- {{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}} \
- --detailed-exitcodes \
- {{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}} \
- {{.ManifestFile}}
+```
+cd {{.WorkingDir}} &&
+ {{if ne .FacterVars ""}}{{.FacterVars}} {{end}}
+{{if .Sudo}}sudo -E {{end}}
+{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}
+puppet apply --verbose --modulepath='{{.ModulePath}}'
+ {{if ne .HieraConfigPath ""}}--hiera_config='{{.HieraConfigPath}}' {{end}}
+{{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}}
+--detailed-exitcodes
+ {{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}
+{{.ManifestFile}}
+```
+
+The following command is used if guest OS type is windows:
+
+```
+cd {{.WorkingDir}} &&
+ {{.FacterVars}} &&
+ {{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}
+puppet apply --verbose --modulepath='{{.ModulePath}}'
+ {{if ne .HieraConfigPath ""}}--hiera_config='{{.HieraConfigPath}}' {{end}}
+{{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}}
+--detailed-exitcodes
+ {{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}
+{{.ManifestFile}}
```
This command can be customized using the `execute_command` configuration. As you
diff --git a/website/source/docs/provisioners/puppet-server.html.md b/website/source/docs/provisioners/puppet-server.html.md
index 61a06d228..6adfd6b0b 100644
--- a/website/source/docs/provisioners/puppet-server.html.md
+++ b/website/source/docs/provisioners/puppet-server.html.md
@@ -81,20 +81,38 @@ listed below:
or `%PATH%` environment variable, but some builders (notably, the Docker one) do
not run profile-setup scripts, therefore the path is usually empty.
-- `execute_command` (string) - This is optional. The command used to execute Puppet. This has
- various [configuration template
- variables](/docs/templates/engine.html) available. See
- below for more information. By default, Packer uses the following command:
+- `guest_os_type` (string) - The target guest OS type, either "unix" or
+ "windows". Setting this to "windows" will cause the provisioner to use
+ Windows friendly paths and commands. By default, this is "unix".
-``` liquid
-{{.FacterVars}} {{if .Sudo}} sudo -E {{end}} \
- {{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet agent --onetime --no-daemonize \
- {{if ne .PuppetServer \"\"}}--server='{{.PuppetServer}}' {{end}} \
- {{if ne .Options \"\"}}{{.Options}} {{end}} \
- {{if ne .PuppetNode \"\"}}--certname={{.PuppetNode}} {{end}} \
- {{if ne .ClientCertPath \"\"}}--certdir='{{.ClientCertPath}}' {{end}} \
- {{if ne .ClientPrivateKeyPath \"\"}}--privatekeydir='{{.ClientPrivateKeyPath}}' \
- {{end}} --detailed-exitcodes
+- `execute_command` (string) - This is optional. The command used to execute Puppet. This has
+ various [configuration template variables](/docs/templates/engine.html) available. By default,
+ Packer uses the following command (broken across multiple lines for readability) to execute Puppet:
+
+```
+{{.FacterVars}} {{if .Sudo}}sudo -E {{end}}
+{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}puppet agent
+--onetime --no-daemonize
+{{if ne .PuppetServer ""}}--server='{{.PuppetServer}}' {{end}}
+{{if ne .Options ""}}{{.Options}} {{end}}
+{{if ne .PuppetNode ""}}--certname={{.PuppetNode}} {{end}}
+{{if ne .ClientCertPath ""}}--certdir='{{.ClientCertPath}}' {{end}}
+{{if ne .ClientPrivateKeyPath ""}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}
+--detailed-exitcodes
+```
+
+The following command is used if guest OS type is windows:
+
+```
+{{.FacterVars}}
+{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}puppet agent
+--onetime --no-daemonize
+{{if ne .PuppetServer ""}}--server='{{.PuppetServer}}' {{end}}
+{{if ne .Options ""}}{{.Options}} {{end}}
+{{if ne .PuppetNode ""}}--certname={{.PuppetNode}} {{end}}
+{{if ne .ClientCertPath ""}}--certdir='{{.ClientCertPath}}' {{end}}
+{{if ne .ClientPrivateKeyPath ""}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}
+--detailed-exitcodes
```
## Default Facts
diff --git a/website/source/docs/provisioners/salt-masterless.html.md b/website/source/docs/provisioners/salt-masterless.html.md
index 91d1fe7cc..443f37561 100644
--- a/website/source/docs/provisioners/salt-masterless.html.md
+++ b/website/source/docs/provisioners/salt-masterless.html.md
@@ -28,7 +28,13 @@ The example below is fully functional.
## Configuration Reference
The reference of available configuration options is listed below. The only
-required argument is the path to your local salt state tree.
+required element is "local_state_tree".
+
+Required:
+
+- `local_state_tree` (string) - The path to your local [state
+ tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
+ This will be uploaded to the `remote_state_tree` on the remote.
Optional:
@@ -54,10 +60,6 @@ Optional:
roots](http://docs.saltstack.com/ref/configuration/master.html#pillar-configuration).
This will be uploaded to the `remote_pillar_roots` on the remote.
-- `local_state_tree` (string) - The path to your local [state
- tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
- This will be uploaded to the `remote_state_tree` on the remote.
-
- `custom_state` (string) - A state to be run instead of `state.highstate`.
Defaults to `state.highstate` if unspecified.
diff --git a/website/source/docs/provisioners/shell.html.md b/website/source/docs/provisioners/shell.html.md
index efa99aa37..77b9a7659 100644
--- a/website/source/docs/provisioners/shell.html.md
+++ b/website/source/docs/provisioners/shell.html.md
@@ -72,9 +72,9 @@ Optional parameters:
available variables: `Path`, which is the path to the script to run, and
`Vars`, which is the list of `environment_vars`, if configured.
-- `expect_disconnect` (bool) - Defaults to true. Whether to error if the
+- `expect_disconnect` (bool) - Defaults to `false`. Whether to error if the
server disconnects us. A disconnect might happen if you restart the ssh
- server or reboot the host. May default to false in the future.
+ server or reboot the host.
- `inline_shebang` (string) - The
[shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29) value to use when
@@ -123,6 +123,12 @@ Some operating systems default to a non-root user. For example if you login as
The `-S` flag tells `sudo` to read the password from stdin, which in this case
is being piped in with the value of `packer`.
+The above example won't work if your environment vars contain spaces or single quotes; in these cases try removing the single quotes:
+
+``` text
+"echo 'packer' | sudo -S env {{ .Vars }} {{ .Path }}"
+```
+
By setting the `execute_command` to this, your script(s) can run with root
privileges without worrying about password prompts.
diff --git a/website/source/docs/templates/communicator.html.md b/website/source/docs/templates/communicator.html.md
index 07d6229ed..3d919e272 100644
--- a/website/source/docs/templates/communicator.html.md
+++ b/website/source/docs/templates/communicator.html.md
@@ -67,8 +67,7 @@ The SSH communicator has the following options:
- `ssh_bastion_password` (string) - The password to use to authenticate
with the bastion host.
-- `ssh_bastion_port` (integer) - The port of the bastion host. Defaults to
- 1.
+- `ssh_bastion_port` (integer) - The port of the bastion host. Defaults to 1.
- `ssh_bastion_private_key_file` (string) - A private key file to use
to authenticate with the bastion host.
@@ -76,8 +75,8 @@ The SSH communicator has the following options:
- `ssh_bastion_username` (string) - The username to connect to the bastion
host.
-- `ssh_disable_agent` (boolean) - If true, SSH agent forwarding will be
- disabled. Defaults to false.
+- `ssh_disable_agent_forwarding` (boolean) - If true, SSH agent forwarding
+ will be disabled. Defaults to false.
- `ssh_file_transfer_method` (`scp` or `sftp`) - How to transfer files, Secure
copy (default) or SSH File Transfer Protocol.
@@ -94,7 +93,7 @@ The SSH communicator has the following options:
- `ssh_port` (integer) - The port to connect to SSH. This defaults to 22.
- `ssh_private_key_file` (string) - Path to a PEM encoded private key
- file to use to authentiate with SSH.
+ file to use to authenticate with SSH.
- `ssh_pty` (boolean) - If true, a PTY will be requested for the SSH
connection. This defaults to false.
diff --git a/website/source/docs/templates/engine.html.md b/website/source/docs/templates/engine.html.md
index 06f5d277d..b699e64c2 100644
--- a/website/source/docs/templates/engine.html.md
+++ b/website/source/docs/templates/engine.html.md
@@ -113,7 +113,7 @@ Formatting for the function `isotime` uses the magic reference date **Mon Jan 2
Numeric
- -
+ -
01
@@ -148,19 +148,19 @@ Formatting for the function `isotime` uses the magic reference date **Mon Jan 2
January (Jan)
- -
+ -
- -
+ -
- -
+ -
- -
+ -
- -
+ -
MST
diff --git a/website/source/docs/templates/user-variables.html.md b/website/source/docs/templates/user-variables.html.md
index 7a7efe92b..bcc22339b 100644
--- a/website/source/docs/templates/user-variables.html.md
+++ b/website/source/docs/templates/user-variables.html.md
@@ -95,6 +95,43 @@ single source of input to a template that a user can easily discover using
that is evaluated by shell during a variable expansion. As Packer doesn't run
inside a shell, it won't expand `~`.
+## Using array values
+
+Some templates call for array values. You can use template variables for these,
+too. For example, the `amazon-ebs` builder has a configuration parameter called
+`ami_regions`, which takes an array of regions that it will copy the AMI to.
+You can parameterize this by using a variable that is a list of regions, joined
+by a `,`. For example:
+
+```json
+{
+ "variables": {
+ "destination_regions": "us-west-1,us-west-2"
+ },
+ "builders": [
+ {
+ "ami_name": "packer-qs-{{timestamp}}",
+ "instance_type": "t2.micro",
+ "region": "us-east-1",
+ "source_ami_filter": {
+ "filters": {
+ "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "root-device-type": "ebs",
+ "virtualization-type": "hvm"
+ },
+ "most_recent": true,
+ "owners": [
+ "099720109477"
+ ]
+ },
+ "ami_regions": "{{user `destination_regions`}}",
+ "ssh_username": "ubuntu",
+ "type": "amazon-ebs"
+ }
+ ]
+}
+```
+
## Setting Variables
Now that we covered how to define and use user variables within a
diff --git a/website/source/intro/getting-started/build-image.html.md b/website/source/intro/getting-started/build-image.html.md
index 9da68041e..23f60252d 100644
--- a/website/source/intro/getting-started/build-image.html.md
+++ b/website/source/intro/getting-started/build-image.html.md
@@ -12,9 +12,8 @@ description: |-
# Build an Image
With Packer installed, let's just dive right into it and build our first image.
-Our first image will be an [Amazon EC2 AMI](https://aws.amazon.com/ec2/) with
-Redis pre-installed. This is just an example. Packer can create images for [many
-platforms][platforms] with anything pre-installed.
+Our first image will be an [Amazon EC2 AMI](https://aws.amazon.com/ec2/)
+This is just an example. Packer can create images for [many platforms][platforms].
If you don't have an AWS account, [create one now](https://aws.amazon.com/free/).
For the example, we'll use a "t2.micro" instance to build our image, which
@@ -58,7 +57,7 @@ briefly. Create a file `example.json` and fill it with the following contents:
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
- "name": "*ubuntu-xenial-16.04-amd64-server-*",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
@@ -161,8 +160,8 @@ typically represent an ID (such as in the case of an AMI) or a set of files
(such as for a VMware virtual machine). In this example, we only have a single
artifact: the AMI in us-east-1 that was created.
-This AMI is ready to use. If you wanted you could go and launch this AMI right now
-and it would work great.
+This AMI is ready to use. If you wanted you could go and launch this AMI right
+now and it would work great.
-> **Note:** Your AMI ID will surely be different than the one above. If you
try to launch the one in the example output above, you will get an error. If you
@@ -200,4 +199,290 @@ image was pretty useless in this case (nothing was changed about it), this page
should've given you a general idea of how Packer works, what templates are and
how to validate and build templates into machine images.
+## Some more examples:
+
+### Another Linux Example, with provisioners:
+Create a file named `welcome.txt` and add the following:
+```
+WELCOME TO PACKER!
+```
+
+Create a file named `example.sh` and add the following:
+```
+#!/bin/bash
+echo "hello
+```
+
+Set your access key and id as environment variables, so we don't need to pass
+them in through the command line:
+```
+export AWS_ACCESS_KEY_ID=MYACCESSKEYID
+export AWS_SECRET_ACCESS_KEY=MYSECRETACCESSKEY
+```
+
+Now save the following text in a file named `firstrun.json`:
+
+```
+{
+ "variables": {
+ "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
+ "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
+ "region": "us-east-1"
+ },
+ "builders": [
+ {
+ "access_key": "{{user `aws_access_key`}}",
+ "ami_name": "packer-linux-aws-demo-{{timestamp}}",
+ "instance_type": "t2.micro",
+ "region": "us-east-1",
+ "secret_key": "{{user `aws_secret_key`}}",
+ "source_ami_filter": {
+ "filters": {
+ "virtualization-type": "hvm",
+ "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
+ "root-device-type": "ebs"
+ },
+ "owners": ["099720109477"],
+ "most_recent": true
+ },
+ "ssh_username": "ubuntu",
+ "type": "amazon-ebs"
+ }
+ ],
+ "provisioners": [
+ {
+ "type": "file",
+ "source": "./welcome.txt",
+ "destination": "/home/ubuntu/"
+ },
+ {
+ "type": "shell",
+ "inline":[
+ "ls -al /home/ubuntu",
+ "cat /home/ubuntu/welcome.txt"
+ ]
+ },
+ {
+ "type": "shell",
+ "script": "./example.sh"
+ }
+ ]
+}
+```
+
+and to build, run `packer build firstrun.json`
+
+Note that if you wanted to use a `source_ami` instead of a `source_ami_filter`
+it might look something like this: `"source_ami": "ami-fce3c696",`
+
+Your output will look like this:
+
+```
+amazon-ebs output will be in this color.
+
+==> amazon-ebs: Prevalidating AMI Name: packer-linux-aws-demo-1507231105
+ amazon-ebs: Found Image ID: ami-fce3c696
+==> amazon-ebs: Creating temporary keypair: packer_59d68581-e3e6-eb35-4ae3-c98d55cfa04f
+==> amazon-ebs: Creating temporary security group for this instance: packer_59d68584-cf8a-d0af-ad82-e058593945ea
+==> amazon-ebs: Authorizing access to port 22 on the temporary security group...
+==> amazon-ebs: Launching a source AWS instance...
+==> amazon-ebs: Adding tags to source instance
+ amazon-ebs: Adding tag: "Name": "Packer Builder"
+ amazon-ebs: Instance ID: i-013e8fb2ced4d714c
+==> amazon-ebs: Waiting for instance (i-013e8fb2ced4d714c) to become ready...
+==> amazon-ebs: Waiting for SSH to become available...
+==> amazon-ebs: Connected to SSH!
+==> amazon-ebs: Uploading ./scripts/welcome.txt => /home/ubuntu/
+==> amazon-ebs: Provisioning with shell script: /var/folders/8t/0yb5q0_x6mb2jldqq_vjn3lr0000gn/T/packer-shell661094204
+ amazon-ebs: total 32
+ amazon-ebs: drwxr-xr-x 4 ubuntu ubuntu 4096 Oct 5 19:19 .
+ amazon-ebs: drwxr-xr-x 3 root root 4096 Oct 5 19:19 ..
+ amazon-ebs: -rw-r--r-- 1 ubuntu ubuntu 220 Apr 9 2014 .bash_logout
+ amazon-ebs: -rw-r--r-- 1 ubuntu ubuntu 3637 Apr 9 2014 .bashrc
+ amazon-ebs: drwx------ 2 ubuntu ubuntu 4096 Oct 5 19:19 .cache
+ amazon-ebs: -rw-r--r-- 1 ubuntu ubuntu 675 Apr 9 2014 .profile
+ amazon-ebs: drwx------ 2 ubuntu ubuntu 4096 Oct 5 19:19 .ssh
+ amazon-ebs: -rw-r--r-- 1 ubuntu ubuntu 18 Oct 5 19:19 welcome.txt
+ amazon-ebs: WELCOME TO PACKER!
+==> amazon-ebs: Provisioning with shell script: ./example.sh
+ amazon-ebs: hello
+==> amazon-ebs: Stopping the source instance...
+ amazon-ebs: Stopping instance, attempt 1
+==> amazon-ebs: Waiting for the instance to stop...
+==> amazon-ebs: Creating the AMI: packer-linux-aws-demo-1507231105
+ amazon-ebs: AMI: ami-f76ea98d
+==> amazon-ebs: Waiting for AMI to become ready...
+```
+
+### A windows example
+
+Note that this uses a larger instance. You will be charged for it. Also keep
+in mind that using windows AMIs incurs a fee that you don't get when you use
+linux AMIs.
+
+You'll need to have a boostrapping file to enable ssh or winrm; here's a basic
+example of that file.
+
+```
+# set administrator password
+net user Administrator SuperS3cr3t!
+wmic useraccount where "name='Administrator'" set PasswordExpires=FALSE
+
+# First, make sure WinRM doesn't run and can't be connected to
+netsh advfirewall firewall add rule name="WinRM" protocol=TCP dir=in localport=5985 action=block
+net stop winrm
+
+# turn off PowerShell execution policy restrictions
+Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine
+
+# configure WinRM
+winrm quickconfig -q
+winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="0"}'
+winrm set winrm/config '@{MaxTimeoutms="7200000"}'
+winrm set winrm/config/service '@{AllowUnencrypted="true"}'
+winrm set winrm/config/service '@{MaxConcurrentOperationsPerUser="12000"}'
+winrm set winrm/config/service/auth '@{Basic="true"}'
+winrm set winrm/config/client/auth '@{Basic="true"}'
+
+net stop winrm
+set-service winrm -startupType automatic
+
+# Finally, allow WinRM connections and start the service
+netsh advfirewall firewall set rule name="WinRM" new action=allow
+net start winrm
+```
+
+
+Save the above code in a file named `bootstrap_win.txt`.
+
+The example config below shows the two different ways of using the powershell
+provisioner: `inline` and `script`.
+The first example, `inline`, allows you to provide short snippets of code, and
+will create the script file for you. The second example allows you to run more
+complex code by providing the path to a script to run on the guest vm.
+
+Here's an example of a `sample_script.ps1` that will work with the environment
+variables we will set in our packer config; copy the contents into your own
+`sample_script.ps1` and provide the path to it in your packer config:
+
+```
+Write-Output("PACKER_BUILD_NAME is automatically set for you,)
+Write-Output("or you can set it in your builder variables; )
+Write-Output("the default for this builder is: " + $Env:PACKER_BUILD_NAME )
+Write-Output("Remember that escaping variables in powershell requires backticks: )
+Write-Output("for example, VAR1 from our config is " + $Env:VAR1 )
+Write-Output("Likewise, VAR2 is " + $Env:VAR2 )
+Write-Output("and VAR3 is " + $Env:VAR3 )
+```
+
+Next you need to create a packer config that will use this bootstrap file. See
+the example below, which contains examples of using source_ami_filter for
+windows in addition to the powershell and windows-restart provisioners:
+
+```
+{
+ "variables": {
+ "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
+ "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
+ "region": "us-east-1"
+ },
+ "builders": [
+ {
+ "type": "amazon-ebs",
+ "access_key": "{{ user `aws_access_key` }}",
+ "secret_key": "{{ user `aws_secret_key` }}",
+ "region": "us-east-1",
+ "instance_type": "m3.medium",
+ "source_ami_filter": {
+ "filters": {
+ "virtualization-type": "hvm",
+ "name": "*WindowsServer2012R2*",
+ "root-device-type": "ebs"
+ },
+ "most_recent": true,
+ "owners": "amazon"
+ },
+ "ami_name": "packer-demo-{{timestamp}}",
+ "user_data_file": "./bootstrap_win.txt",
+ "communicator": "winrm",
+ "winrm_username": "Administrator",
+ "winrm_password": "SuperS3cr3t!"
+ }],
+ "provisioners": [
+ {
+ "type": "powershell",
+ "environment_vars": ["DEVOPS_LIFE_IMPROVER=PACKER"],
+ "inline": "Write-Output(\"HELLO NEW USER; WELCOME TO $Env:DEVOPS_LIFE_IMPROVER\")"
+ },
+ {
+ "type": "windows-restart"
+ },
+ {
+ "script": "./sample_script.ps1",
+ "type": "powershell",
+ "environment_vars": [
+ "VAR1=A`$Dollar",
+ "VAR2=A``Backtick",
+ "VAR3=A`'SingleQuote"
+ ]
+ }
+ ]
+}
+```
+
+Then `packer build firstrun.json`
+
+You should see output like this:
+
+```
+amazon-ebs output will be in this color.
+
+==> amazon-ebs: Prevalidating AMI Name: packer-demo-1507234504
+ amazon-ebs: Found Image ID: ami-d79776ad
+==> amazon-ebs: Creating temporary keypair: packer_59d692c8-81f9-6a15-2502-0ca730980bed
+==> amazon-ebs: Creating temporary security group for this instance: packer_59d692f0-dd01-6879-d8f8-7765327f5365
+==> amazon-ebs: Authorizing access to port 5985 on the temporary security group...
+==> amazon-ebs: Launching a source AWS instance...
+==> amazon-ebs: Adding tags to source instance
+ amazon-ebs: Adding tag: "Name": "Packer Builder"
+ amazon-ebs: Instance ID: i-04467596029d0a2ff
+==> amazon-ebs: Waiting for instance (i-04467596029d0a2ff) to become ready...
+==> amazon-ebs: Skipping waiting for password since WinRM password set...
+==> amazon-ebs: Waiting for WinRM to become available...
+ amazon-ebs: WinRM connected.
+==> amazon-ebs: Connected to WinRM!
+==> amazon-ebs: Provisioning with Powershell...
+==> amazon-ebs: Provisioning with powershell script: /var/folders/8t/0yb5q0_x6mb2jldqq_vjn3lr0000gn/T/packer-powershell-provisioner079851514
+ amazon-ebs: HELLO NEW USER; WELCOME TO PACKER
+==> amazon-ebs: Restarting Machine
+==> amazon-ebs: Waiting for machine to restart...
+ amazon-ebs: WIN-164614OO21O restarted.
+==> amazon-ebs: Machine successfully restarted, moving on
+==> amazon-ebs: Provisioning with Powershell...
+==> amazon-ebs: Provisioning with powershell script: ./scripts/sample_script.ps1
+ amazon-ebs: PACKER_BUILD_NAME is automatically set for you, or you can set it in your builder variables; the default for this builder is: amazon-ebs
+ amazon-ebs: Remember that escaping variables in powershell requires backticks; for example VAR1 from our config is A$Dollar
+ amazon-ebs: Likewise, VAR2 is A`Backtick
+ amazon-ebs: and VAR3 is A'SingleQuote
+==> amazon-ebs: Stopping the source instance...
+ amazon-ebs: Stopping instance, attempt 1
+==> amazon-ebs: Waiting for the instance to stop...
+==> amazon-ebs: Creating the AMI: packer-demo-1507234504
+ amazon-ebs: AMI: ami-2970b753
+==> amazon-ebs: Waiting for AMI to become ready...
+==> amazon-ebs: Terminating the source AWS instance...
+==> amazon-ebs: Cleaning up any extra volumes...
+==> amazon-ebs: No volumes to clean up, skipping
+==> amazon-ebs: Deleting temporary security group...
+==> amazon-ebs: Deleting temporary keypair...
+Build 'amazon-ebs' finished.
+
+==> Builds finished. The artifacts of successful builds are:
+--> amazon-ebs: AMIs were created:
+us-east-1: ami-2970b753
+```
+
+And if you navigate to your EC2 dashboard you should see your shiny new AMI.
+
+
[platforms]: /docs/builders/index.html
diff --git a/website/source/intro/getting-started/next.html.md b/website/source/intro/getting-started/next.html.md
index 7ee314893..fcc355164 100644
--- a/website/source/intro/getting-started/next.html.md
+++ b/website/source/intro/getting-started/next.html.md
@@ -20,10 +20,6 @@ From this point forward, the most important reference for you will be the
[documentation](/docs/index.html). The documentation is less of a guide and more of a
reference of all the overall features and options of Packer.
-If you're interested in learning more about how Packer fits into the HashiCorp
-ecosystem of tools, read our [Atlas getting started
-overview](https://atlas.hashicorp.com/help/intro/getting-started).
-
As you use Packer more, please voice your comments and concerns on the [mailing
list or IRC](/community.html). Additionally, Packer is [open
source](https://github.com/hashicorp/packer) so please contribute if you'd like
diff --git a/website/source/intro/getting-started/remote-builds.html.md b/website/source/intro/getting-started/remote-builds.html.md
deleted file mode 100644
index c9566ec92..000000000
--- a/website/source/intro/getting-started/remote-builds.html.md
+++ /dev/null
@@ -1,107 +0,0 @@
----
-layout: intro
-sidebar_current: intro-getting-started-remote-builds
-page_title: Remote Builds and Storage - Getting Started
-description: |-
- Up to this point in the guide, you have been running Packer on your local
- machine to build and provision images on AWS and DigitalOcean. However, you
- can use Atlas by HashiCorp to both run Packer builds remotely and store the
- output of builds.
----
-
-# Remote Builds and Storage
-
-Up to this point in the guide, you have been running Packer on your local
-machine to build and provision images on AWS and DigitalOcean. However, you can
-use [Atlas by HashiCorp](https://atlas.hashicorp.com) to run Packer builds
-remotely and store the output of builds.
-
-## Why Build Remotely?
-
-By building remotely, you can move access credentials off of developer machines,
-release local machines from long-running Packer processes, and automatically
-start Packer builds from trigger sources such as `vagrant push`, a version
-control system, or CI tool.
-
-## Run Packer Builds Remotely
-
-To run Packer remotely, there are two changes that must be made to the Packer
-template. The first is the addition of the `push`
-[configuration](https://www.packer.io/docs/templates/push.html), which sends the
-Packer template to Atlas so it can run Packer remotely. The second modification
-is updating the variables section to read variables from the Atlas environment
-rather than the local environment. Remove the `post-processors` section for now
-if it is still in your template.
-
-```json
-{
- "variables": {
- "aws_access_key": "{{env `aws_access_key`}}",
- "aws_secret_key": "{{env `aws_secret_key`}}"
- },
- "builders": [{
- "type": "amazon-ebs",
- "access_key": "{{user `aws_access_key`}}",
- "secret_key": "{{user `aws_secret_key`}}",
- "region": "us-east-1",
- "source_ami": "ami-9eaa1cf6",
- "instance_type": "t2.micro",
- "ssh_username": "ubuntu",
- "ami_name": "packer-example {{timestamp}}"
- }],
- "provisioners": [{
- "type": "shell",
- "inline": [
- "sleep 30",
- "sudo apt-get update",
- "sudo apt-get install -y redis-server"
- ]
- }],
- "push": {
- "name": "ATLAS_USERNAME/packer-tutorial"
- }
-}
-```
-
-To get an Atlas username, [create an account
-here](https://atlas.hashicorp.com/account/new?utm_source=oss&utm_medium=getting-started&utm_campaign=packer).
-Replace "ATLAS\_USERNAME" with your username, then run
-`packer push -create example.json` to send the configuration to Atlas, which
-automatically starts the build.
-
-This build will fail since neither `aws_access_key` or `aws_secret_key` are set
-in the Atlas environment. To set environment variables in Atlas, navigate to
-the [Builds tab](https://atlas.hashicorp.com/builds), click the
-"packer-tutorial" build configuration that was just created, and then click
-'variables' in the left navigation. Set `aws_access_key` and `aws_secret_key`
-with their respective values. Now restart the Packer build by either clicking
-'rebuild' in the Atlas UI or by running `packer push example.json` again. Now
-when you click on the active build, you can view the logs in real-time.
-
--> **Note:** Whenever a change is made to the Packer template, you must
-`packer push` to update the configuration in Atlas.
-
-## Store Packer Outputs
-
-Now we have Atlas building an AMI with Redis pre-configured. This is great, but
-it's even better to store and version the AMI output so it can be easily
-deployed by a tool like [Terraform](https://www.terraform.io). The `atlas`
-[post-processor](/docs/post-processors/atlas.html) makes this process easier:
-
-```json
-{
- "variables": ["..."],
- "builders": ["..."],
- "provisioners": ["..."],
- "push": ["..."],
- "post-processors": [{
- "type": "atlas",
- "artifact": "ATLAS_USERNAME/packer-tutorial",
- "artifact_type": "amazon.image"
- }]
-}
-```
-
-Update the `post-processors` block with your Atlas username, then
-`packer push example.json` and watch the build kick off in Atlas! When the build
-completes, the resulting artifact will be saved and stored in Atlas.
diff --git a/website/source/intro/hashicorp-ecosystem.html.md b/website/source/intro/hashicorp-ecosystem.html.md
deleted file mode 100644
index 1fb7bbaff..000000000
--- a/website/source/intro/hashicorp-ecosystem.html.md
+++ /dev/null
@@ -1,68 +0,0 @@
----
-layout: intro
-sidebar_current: intro-ecosystem
-page_title: Packer and the HashiCorp Ecosystem - Introduction
-description: |-
- Learn how Packer fits in with the rest of the HashiCorp ecosystem of tools
----
-
-# Packer and the HashiCorp Ecosystem
-
-HashiCorp is the creator of the open source projects Vagrant, Packer, Terraform,
-Serf, Consul, Nomad, and the commercial product Atlas. Packer is just one piece
-of the ecosystem HashiCorp has built to make application delivery a versioned,
-auditable, repeatable, and collaborative process. To learn more about our
-beliefs on the qualities of the modern datacenter and responsible application
-delivery, read [The Atlas Mindset: Version Control for
-Infrastructure](https://www.hashicorp.com/blog/atlas-mindset.html?utm_source=packer&utm_campaign=HashicorpEcosystem).
-
-If you are using Packer to build machine images and deployable artifacts, it's
-likely that you need a solution for deploying those artifacts. Terraform is our
-tool for creating, combining, and modifying infrastructure.
-
-Below are summaries of HashiCorp's open source projects and a graphic showing
-how Atlas connects them to create a full application delivery workflow.
-
-# HashiCorp Ecosystem
-
-![Atlas Workflow](docs/atlas-workflow.png)
-
-[Atlas](https://atlas.hashicorp.com/?utm_source=packer&utm_campaign=HashicorpEcosystem)
-is HashiCorp's only commercial product. It unites Packer, Terraform, and Consul
-to make application delivery a versioned, auditable, repeatable, and
-collaborative process.
-
-[Packer](https://www.packer.io/?utm_source=packer&utm_campaign=HashicorpEcosystem)
-is a HashiCorp tool for creating machine images and deployable artifacts such as
-AMIs, OpenStack images, Docker containers, etc.
-
-[Terraform](https://www.terraform.io/?utm_source=packer&utm_campaign=HashicorpEcosystem)
-is a HashiCorp tool for creating, combining, and modifying infrastructure. In
-the Atlas workflow Terraform reads from the artifact registry and provisions
-infrastructure.
-
-[Consul](https://www.consul.io/?utm_source=packer&utm_campaign=HashicorpEcosystem)
-is a HashiCorp tool for service discovery, service registry, and health checks.
-In the Atlas workflow Consul is configured at the Packer build stage and
-identifies the service(s) contained in each artifact. Since Consul is configured
-at the build phase with Packer, when the artifact is deployed with Terraform, it
-is fully configured with dependencies and service discovery pre-baked. This
-greatly reduces the risk of an unhealthy node in production due to configuration
-failure at runtime.
-
-[Serf](https://www.serf.io/?utm_source=packer&utm_campaign=HashicorpEcosystem) is
-a HashiCorp tool for cluster membership and failure detection. Consul uses
-Serf's gossip protocol as the foundation for service discovery.
-
-[Vagrant](https://www.vagrantup.com/?utm_source=packer&utm_campaign=HashicorpEcosystem)
-is a HashiCorp tool for managing development environments that mirror
-production. Vagrant environments reduce the friction of developing a project and
-reduce the risk of unexpected behavior appearing after deployment. Vagrant boxes
-can be built in parallel with production artifacts with Packer to maintain
-parity between development and production.
-
-[Nomad](https://www.nomadproject.io/?utm_source=packer&utm_campaign=HashicorpEcosystem)
-is a HashiCorp tool for managing a cluster of machines and running applications
-on them. Nomad abstracts away machines and the location of applications, and
-instead enables users to declare what they want to run and Nomad handles where
-they should run and how to run them.
diff --git a/website/source/layouts/community.erb b/website/source/layouts/community.erb
new file mode 100644
index 000000000..a5ab417c3
--- /dev/null
+++ b/website/source/layouts/community.erb
@@ -0,0 +1,19 @@
+<% wrap_layout :inner do %>
+ <% content_for :sidebar do %>
+