build(deps): bump github.com/vmware/govmomi from 0.26.1 to 0.27.4

Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.26.1 to 0.27.4.
- [Release notes](https://github.com/vmware/govmomi/releases)
- [Changelog](https://github.com/vmware/govmomi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vmware/govmomi/compare/v0.26.1...v0.27.4)

---
updated-dependencies:
- dependency-name: github.com/vmware/govmomi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2022-04-14 11:07:45 +00:00 committed by Ondřej Budai
parent 1ded72b4dc
commit 2ba68442d3
37 changed files with 1535 additions and 237 deletions

2
go.mod
View file

@ -42,7 +42,7 @@ require (
github.com/spf13/cobra v1.4.0 github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.1 github.com/stretchr/testify v1.7.1
github.com/ubccr/kerby v0.0.0-20170626144437-201a958fc453 github.com/ubccr/kerby v0.0.0-20170626144437-201a958fc453
github.com/vmware/govmomi v0.26.1 github.com/vmware/govmomi v0.27.4
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9

4
go.sum
View file

@ -674,8 +674,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/vmware/govmomi v0.26.1 h1:awC7cFIT0SOCt3A6rbUCCEtFdt+X1L6Nppm0mkL7zQk= github.com/vmware/govmomi v0.27.4 h1:5kY8TAkhB20lsjzrjE073eRb8+HixBI29PVMG5lxq6I=
github.com/vmware/govmomi v0.26.1/go.mod h1:daTuJEcQosNMXYJOeku0qdBJP9SOLLWB3Mqz8THtv6o= github.com/vmware/govmomi v0.27.4/go.mod h1:daTuJEcQosNMXYJOeku0qdBJP9SOLLWB3Mqz8THtv6o=
github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk= github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

View file

@ -26,6 +26,7 @@ Anfernee Yongkun Gui <agui@vmware.com>
angystardust <angystardust@users.noreply.github.com> angystardust <angystardust@users.noreply.github.com>
aniketGslab <aniket.shinde@gslab.com> aniketGslab <aniket.shinde@gslab.com>
Ankit Vaidya <vaidyaa@vmware.com> Ankit Vaidya <vaidyaa@vmware.com>
Ankur Huralikoppi <huralikoppia@vmware.com>
Anna Carrigan <anna.carrigan@hpe.com> Anna Carrigan <anna.carrigan@hpe.com>
Ariel Chinn <arielchinn@gmail.com> Ariel Chinn <arielchinn@gmail.com>
Arran Walker <arran.walker@zopa.com> Arran Walker <arran.walker@zopa.com>
@ -45,6 +46,7 @@ Bob Killen <killen.bob@gmail.com>
Brad Fitzpatrick <bradfitz@golang.org> Brad Fitzpatrick <bradfitz@golang.org>
brian57860 <brian57860@users.noreply.github.com> brian57860 <brian57860@users.noreply.github.com>
Bruce Downs <bruceadowns@gmail.com> Bruce Downs <bruceadowns@gmail.com>
Cédric Blomart <cblomart@gmail.com>
Cheng Cheng <chengch@vmware.com> Cheng Cheng <chengch@vmware.com>
Chethan Venkatesh <chethanv@vmware.com> Chethan Venkatesh <chethanv@vmware.com>
Chris Marchesi <chrism@vancluevertech.com> Chris Marchesi <chrism@vancluevertech.com>
@ -52,7 +54,6 @@ Christian Höltje <docwhat@gerf.org>
Clint Greenwood <cgreenwood@vmware.com> Clint Greenwood <cgreenwood@vmware.com>
cpiment <pimentel.carlos@gmail.com> cpiment <pimentel.carlos@gmail.com>
CuiHaozhi <cuihaozhi@chinacloud.com.cn> CuiHaozhi <cuihaozhi@chinacloud.com.cn>
Cédric Blomart <cblomart@gmail.com>
Dan Ilan <danilan@google.com> Dan Ilan <danilan@google.com>
Dan Norris <protochron@users.noreply.github.com> Dan Norris <protochron@users.noreply.github.com>
Daniel Frederick Crisman <daniel@crisman.org> Daniel Frederick Crisman <daniel@crisman.org>
@ -91,6 +92,7 @@ Gavrie Philipson <gavrie.philipson@elastifile.com>
George Hicken <ghicken@vmware.com> George Hicken <ghicken@vmware.com>
Gerrit Renker <Gerrit.Renker@ctl.io> Gerrit Renker <Gerrit.Renker@ctl.io>
gthombare <gthombare@vmware.com> gthombare <gthombare@vmware.com>
HakanSunay <hakansunay@abv.bg>
Hasan Mahmood <mahmoodh@vmware.com> Hasan Mahmood <mahmoodh@vmware.com>
Heiko Reese <hreese@users.noreply.github.com> Heiko Reese <hreese@users.noreply.github.com>
Henrik Hodne <henrik@travis-ci.com> Henrik Hodne <henrik@travis-ci.com>
@ -107,9 +109,10 @@ Jeremy Canady <jcanady@jackhenry.com>
jeremy-clerc <jeremy@clerc.io> jeremy-clerc <jeremy@clerc.io>
Jiatong Wang <wjiatong@vmware.com> Jiatong Wang <wjiatong@vmware.com>
jingyizPensando <jingyiz@pensando.io> jingyizPensando <jingyiz@pensando.io>
João Pereira <joaodrp@gmail.com>
Jonas Ausevicius <jonas.ausevicius@virtustream.com> Jonas Ausevicius <jonas.ausevicius@virtustream.com>
Jorge Sevilla <jorge.sevilla@rstor.io> Jorge Sevilla <jorge.sevilla@rstor.io>
João Pereira <joaodrp@gmail.com> Julien PILLON <jpillon@lesalternatives.org>
Justin J. Novack <jnovack@users.noreply.github.com> Justin J. Novack <jnovack@users.noreply.github.com>
kayrus <kay.diam@gmail.com> kayrus <kay.diam@gmail.com>
Kevin George <georgek@vmware.com> Kevin George <georgek@vmware.com>
@ -141,14 +144,20 @@ Mincho Tonev <mtonev@vmware.com>
mingwei <mingwei@smartx.com> mingwei <mingwei@smartx.com>
Nicolas Lamirault <nicolas.lamirault@gmail.com> Nicolas Lamirault <nicolas.lamirault@gmail.com>
Nikhil Kathare <nikhil.kathare@netapp.com> Nikhil Kathare <nikhil.kathare@netapp.com>
Nikhil R Deshpande <ndeshpande@vmware.com>
Nikolas Grottendieck <git@nikolasgrottendieck.com>
Om Kumar <om.kumar@hpe.com>
Omar Kohl <omarkohl@gmail.com> Omar Kohl <omarkohl@gmail.com>
Parham Alvani <parham.alvani@gmail.com> Parham Alvani <parham.alvani@gmail.com>
Parveen Chahal <parkuma@microsoft.com> Parveen Chahal <parkuma@microsoft.com>
Paul Martin <25058109+rawstorage@users.noreply.github.com>
Pierre Gronlier <pierre.gronlier@corp.ovh.com> Pierre Gronlier <pierre.gronlier@corp.ovh.com>
Pieter Noordhuis <pnoordhuis@vmware.com> Pieter Noordhuis <pnoordhuis@vmware.com>
prydin <prydin@vmware.com> prydin <prydin@vmware.com>
rconde01 <rconde01@hotmail.com>
rHermes <teodor_spaeren@riseup.net> rHermes <teodor_spaeren@riseup.net>
Rowan Jacobs <rojacobs@pivotal.io> Rowan Jacobs <rojacobs@pivotal.io>
Roy Ling <royling0024@gmail.com>
rsikdar <rsikdar@berkeley.edu> rsikdar <rsikdar@berkeley.edu>
runner.mei <runner.mei@gmail.com> runner.mei <runner.mei@gmail.com>
S.Çağlar Onur <conur@vmware.com> S.Çağlar Onur <conur@vmware.com>
@ -167,6 +176,7 @@ Sten Feldman <exile@chamber.ee>
Stepan Mazurov <smazurov@gmail.com> Stepan Mazurov <smazurov@gmail.com>
Steve Purcell <steve@sanityinc.com> Steve Purcell <steve@sanityinc.com>
SUMIT AGRAWAL <asumit@vmware.com> SUMIT AGRAWAL <asumit@vmware.com>
Syuparn <s.hello.spagetti@gmail.com>
Takaaki Furukawa <takaaki.frkw@gmail.com> Takaaki Furukawa <takaaki.frkw@gmail.com>
Tamas Eger <tamas.eger@bitrise.io> Tamas Eger <tamas.eger@bitrise.io>
Tanay Kothari <tkothari@vmware.com> Tanay Kothari <tkothari@vmware.com>
@ -196,8 +206,10 @@ Yassine TIJANI <ytijani@vmware.com>
yiyingy <yiyingy@vmware.com> yiyingy <yiyingy@vmware.com>
ykakarap <yuva2811@gmail.com> ykakarap <yuva2811@gmail.com>
Yogesh Sobale <6104071+ysobale@users.noreply.github.com> Yogesh Sobale <6104071+ysobale@users.noreply.github.com>
Yue Yin <yueyin@yuyin-a01.vmware.com>
Yun Zhou <yunz@vmware.com> Yun Zhou <yunz@vmware.com>
Yuya Kusakabe <yuya.kusakabe@gmail.com> Yuya Kusakabe <yuya.kusakabe@gmail.com>
Zach G <zguan@vmware.com>
Zach Tucker <ztucker@vmware.com> Zach Tucker <ztucker@vmware.com>
Zacharias Taubert <zacharias.taubert@gmail.com> Zacharias Taubert <zacharias.taubert@gmail.com>
Zee Yang <zeey@vmware.com> Zee Yang <zeey@vmware.com>

View file

@ -190,11 +190,11 @@ func (c *Client) QueryAllVolume(ctx context.Context, queryFilter cnstypes.CnsQue
} }
// QueryVolumeAsync calls the CNS QueryAsync API and return a task, from which we can extract CnsQueryResult // QueryVolumeAsync calls the CNS QueryAsync API and return a task, from which we can extract CnsQueryResult
func (c *Client) QueryVolumeAsync(ctx context.Context, queryFilter cnstypes.CnsQueryFilter, querySelection cnstypes.CnsQuerySelection) (*object.Task, error) { func (c *Client) QueryVolumeAsync(ctx context.Context, queryFilter cnstypes.CnsQueryFilter, querySelection *cnstypes.CnsQuerySelection) (*object.Task, error) {
req := cnstypes.CnsQueryAsync{ req := cnstypes.CnsQueryAsync{
This: CnsVolumeManagerInstance, This: CnsVolumeManagerInstance,
Filter: queryFilter, Filter: queryFilter,
Selection: &querySelection, Selection: querySelection,
} }
res, err := methods.CnsQueryAsync(ctx, c, &req) res, err := methods.CnsQueryAsync(ctx, c, &req)
if err != nil { if err != nil {

View file

@ -394,6 +394,7 @@ type CnsBlockBackingDetails struct {
BackingDiskId string `xml:"backingDiskId,omitempty"` BackingDiskId string `xml:"backingDiskId,omitempty"`
BackingDiskUrlPath string `xml:"backingDiskUrlPath,omitempty"` BackingDiskUrlPath string `xml:"backingDiskUrlPath,omitempty"`
BackingDiskObjectId string `xml:"backingDiskObjectId,omitempty"`
} }
func init() { func init() {

View file

@ -26,6 +26,7 @@ import (
"github.com/vmware/govmomi/list" "github.com/vmware/govmomi/list"
"github.com/vmware/govmomi/object" "github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/property" "github.com/vmware/govmomi/property"
"github.com/vmware/govmomi/view"
"github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/types"
@ -789,9 +790,26 @@ func (f *Finder) NetworkList(ctx context.Context, path string) ([]object.Network
return ns, nil return ns, nil
} }
// Network finds a NetworkReference using a Name, Inventory Path, ManagedObject ID, Logical Switch UUID or Segment ID.
// With standard vSphere networking, Portgroups cannot have the same name within the same network folder.
// With NSX, Portgroups can have the same name, even within the same Switch. In this case, using an inventory path
// results in a MultipleFoundError. A MOID, switch UUID or segment ID can be used instead, as both are unique.
// See also: https://kb.vmware.com/s/article/79872#Duplicate_names
// Examples:
// - Name: "dvpg-1"
// - Inventory Path: "vds-1/dvpg-1"
// - ManagedObject ID: "DistributedVirtualPortgroup:dvportgroup-53"
// - Logical Switch UUID: "da2a59b8-2450-4cb2-b5cc-79c4c1d2144c"
// - Segment ID: "/infra/segments/vnet_ce50e69b-1784-4a14-9206-ffd7f1f146f7"
func (f *Finder) Network(ctx context.Context, path string) (object.NetworkReference, error) { func (f *Finder) Network(ctx context.Context, path string) (object.NetworkReference, error) {
networks, err := f.NetworkList(ctx, path) networks, err := f.NetworkList(ctx, path)
if err != nil { if err != nil {
if _, ok := err.(*NotFoundError); ok {
net, nerr := f.networkByID(ctx, path)
if nerr == nil {
return net, nil
}
}
return nil, err return nil, err
} }
@ -802,6 +820,41 @@ func (f *Finder) Network(ctx context.Context, path string) (object.NetworkRefere
return networks[0], nil return networks[0], nil
} }
func (f *Finder) networkByID(ctx context.Context, path string) (object.NetworkReference, error) {
if ref := object.ReferenceFromString(path); ref != nil {
// This is a MOID
return object.NewReference(f.client, *ref).(object.NetworkReference), nil
}
kind := []string{"DistributedVirtualPortgroup"}
m := view.NewManager(f.client)
v, err := m.CreateContainerView(ctx, f.client.ServiceContent.RootFolder, kind, true)
if err != nil {
return nil, err
}
defer v.Destroy(ctx)
filter := property.Filter{
"config.logicalSwitchUuid": path,
"config.segmentId": path,
}
refs, err := v.FindAny(ctx, kind, filter)
if err != nil {
return nil, err
}
if len(refs) == 0 {
return nil, &NotFoundError{"network", path}
}
if len(refs) > 1 {
return nil, &MultipleFoundError{"network", path}
}
return object.NewReference(f.client, refs[0]).(object.NetworkReference), nil
}
func (f *Finder) DefaultNetwork(ctx context.Context) (object.NetworkReference, error) { func (f *Finder) DefaultNetwork(ctx context.Context) (object.NetworkReference, error) {
network, err := f.Network(ctx, "*") network, err := f.Network(ctx, "*")
if err != nil { if err != nil {

View file

@ -197,12 +197,12 @@ func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) (
} }
for _, arg := range args { for _, arg := range args {
var ref types.ManagedObjectReference if ref := object.ReferenceFromString(arg); ref != nil {
if ref.FromString(arg) {
// e.g. output from object.collect // e.g. output from object.collect
refs = append(refs, ref) refs = append(refs, *ref)
continue continue
} }
elements, err := finder.ManagedObjectList(ctx, arg) elements, err := finder.ManagedObjectList(ctx, arg)
if err != nil { if err != nil {
return nil, err return nil, err

View file

@ -20,6 +20,7 @@ import (
"context" "context"
"flag" "flag"
"fmt" "fmt"
"io/ioutil"
"reflect" "reflect"
"strings" "strings"
@ -43,13 +44,39 @@ func (e *extraConfig) Set(v string) error {
return nil return nil
} }
type extraConfigFile []types.BaseOptionValue
func (e *extraConfigFile) String() string {
return fmt.Sprintf("%v", *e)
}
func (e *extraConfigFile) Set(v string) error {
r := strings.SplitN(v, "=", 2)
if len(r) < 2 {
return fmt.Errorf("failed to parse extraConfigFile: %s", v)
}
var fileContents = ""
if len(r[1]) > 0 {
contents, err := ioutil.ReadFile(r[1])
if err != nil {
return fmt.Errorf("failed to parse extraConfigFile '%s': %w", v, err)
}
fileContents = string(contents)
}
*e = append(*e, &types.OptionValue{Key: r[0], Value: fileContents})
return nil
}
type change struct { type change struct {
*flags.VirtualMachineFlag *flags.VirtualMachineFlag
*flags.ResourceAllocationFlag *flags.ResourceAllocationFlag
types.VirtualMachineConfigSpec types.VirtualMachineConfigSpec
extraConfig extraConfig extraConfig extraConfig
Latency string extraConfigFile extraConfigFile
Latency string
} }
func init() { func init() {
@ -119,6 +146,7 @@ func (cmd *change) Register(ctx context.Context, f *flag.FlagSet) {
f.StringVar(&cmd.Annotation, "annotation", "", "VM description") f.StringVar(&cmd.Annotation, "annotation", "", "VM description")
f.StringVar(&cmd.Uuid, "uuid", "", "BIOS UUID") f.StringVar(&cmd.Uuid, "uuid", "", "BIOS UUID")
f.Var(&cmd.extraConfig, "e", "ExtraConfig. <key>=<value>") f.Var(&cmd.extraConfig, "e", "ExtraConfig. <key>=<value>")
f.Var(&cmd.extraConfigFile, "f", "ExtraConfig. <key>=<absolute path to file>")
f.Var(flags.NewOptionalBool(&cmd.NestedHVEnabled), "nested-hv-enabled", "Enable nested hardware-assisted virtualization") f.Var(flags.NewOptionalBool(&cmd.NestedHVEnabled), "nested-hv-enabled", "Enable nested hardware-assisted virtualization")
cmd.Tools = &types.ToolsConfigInfo{} cmd.Tools = &types.ToolsConfigInfo{}
@ -140,6 +168,8 @@ Examples:
# Enable both cpu and memory hotplug on a guest: # Enable both cpu and memory hotplug on a guest:
govc vm.change -vm $vm -cpu-hot-add-enabled -memory-hot-add-enabled govc vm.change -vm $vm -cpu-hot-add-enabled -memory-hot-add-enabled
govc vm.change -vm $vm -e guestinfo.vmname $vm govc vm.change -vm $vm -e guestinfo.vmname $vm
# Read the contents of a file and use them as ExtraConfig value
govc vm.change -vm $vm -f guestinfo.data="$(realpath .)/vmdata.config"
# Read the variable set above inside the guest: # Read the variable set above inside the guest:
vmware-rpctool "info-get guestinfo.vmname" vmware-rpctool "info-get guestinfo.vmname"
govc vm.change -vm $vm -latency high govc vm.change -vm $vm -latency high
@ -164,9 +194,7 @@ func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error {
return flag.ErrHelp return flag.ErrHelp
} }
if len(cmd.extraConfig) > 0 { cmd.VirtualMachineConfigSpec.ExtraConfig = append(cmd.extraConfig, cmd.extraConfigFile...)
cmd.VirtualMachineConfigSpec.ExtraConfig = cmd.extraConfig
}
setAllocation(&cmd.CpuAllocation) setAllocation(&cmd.CpuAllocation)
setAllocation(&cmd.MemoryAllocation) setAllocation(&cmd.MemoryAllocation)

View file

@ -22,6 +22,8 @@ import (
"github.com/vmware/govmomi/govc/cli" "github.com/vmware/govmomi/govc/cli"
"github.com/vmware/govmomi/govc/flags" "github.com/vmware/govmomi/govc/flags"
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/vim25/types"
) )
type destroy struct { type destroy struct {
@ -73,24 +75,33 @@ func (cmd *destroy) Run(ctx context.Context, f *flag.FlagSet) error {
} }
for _, vm := range vms { for _, vm := range vms {
task, err := vm.PowerOff(ctx) var (
task *object.Task
state types.VirtualMachinePowerState
)
state, err = vm.PowerState(ctx)
if err != nil { if err != nil {
return err return err
} }
// Ignore error since the VM may already been in powered off state. if state == types.VirtualMachinePowerStatePoweredOn {
// vm.Destroy will fail if the VM is still powered on. task, err = vm.PowerOff(ctx)
_ = task.Wait(ctx) if err != nil {
return err
}
// Ignore error since the VM may already been in powered off state.
// vm.Destroy will fail if the VM is still powered on.
_ = task.Wait(ctx)
}
task, err = vm.Destroy(ctx) task, err = vm.Destroy(ctx)
if err != nil { if err != nil {
return err return err
} }
err = task.Wait(ctx) return task.Wait(ctx)
if err != nil {
return err
}
} }
return nil return nil

View file

@ -21,8 +21,10 @@ import (
"fmt" "fmt"
"net" "net"
"net/url" "net/url"
"os"
"sync" "sync"
"github.com/vmware/govmomi/internal"
"github.com/vmware/govmomi/property" "github.com/vmware/govmomi/property"
"github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/methods"
@ -119,6 +121,9 @@ func (m FileManager) DeleteFile(ctx context.Context, auth types.BaseGuestAuthent
return err return err
} }
// escape hatch to disable the preference to use ESX host management IP for guest file transfer
var useGuestTransferIP = os.Getenv("GOVMOMI_USE_GUEST_TRANSFER_IP") != "false"
// TransferURL rewrites the url with a valid hostname and adds the host's thumbprint. // TransferURL rewrites the url with a valid hostname and adds the host's thumbprint.
// The InitiateFileTransfer{From,To}Guest methods return a URL with the host set to "*" when connected directly to ESX, // The InitiateFileTransfer{From,To}Guest methods return a URL with the host set to "*" when connected directly to ESX,
// but return the address of VM's runtime host when connected to vCenter. // but return the address of VM's runtime host when connected to vCenter.
@ -138,14 +143,17 @@ func (m FileManager) TransferURL(ctx context.Context, u string) (*url.URL, error
name := turl.Hostname() name := turl.Hostname()
port := turl.Port() port := turl.Port()
isHostname := net.ParseIP(name) == nil
m.mu.Lock() m.mu.Lock()
mname, ok := m.hosts[name] mname, ok := m.hosts[name]
m.mu.Unlock() m.mu.Unlock()
if ok { if ok {
turl.Host = net.JoinHostPort(mname, port) turl.Host = mname
return turl, nil return turl, nil
} else {
mname = turl.Host
} }
c := property.DefaultCollector(m.c) c := property.DefaultCollector(m.c)
@ -164,7 +172,10 @@ func (m FileManager) TransferURL(ctx context.Context, u string) (*url.URL, error
"name", "name",
"runtime.connectionState", "runtime.connectionState",
"summary.config.sslThumbprint", "summary.config.sslThumbprint",
"config.virtualNicManagerInfo.netConfig", }
if isHostname {
props = append(props, "config.virtualNicManagerInfo.netConfig")
} }
var host mo.HostSystem var host mo.HostSystem
@ -173,38 +184,29 @@ func (m FileManager) TransferURL(ctx context.Context, u string) (*url.URL, error
return nil, err return nil, err
} }
if host.Config == nil { if isHostname {
return nil, fmt.Errorf("guest TransferURL failed for vm %q (%s): host %q (%s) config==nil, connectionState==%s", if host.Config == nil {
vm.Name, vm.Self, return nil, fmt.Errorf("guest TransferURL failed for vm %q (%s): host %q (%s) config==nil, connectionState==%s",
host.Name, host.Self, host.Runtime.ConnectionState) vm.Name, vm.Self,
} host.Name, host.Self, host.Runtime.ConnectionState)
// prefer an ESX management IP, as the hostname used when adding to VC may not be valid for this client
// See also object.HostSystem.ManagementIPs which we can't use here due to import cycle
for _, nc := range host.Config.VirtualNicManagerInfo.NetConfig {
if nc.NicType != string(types.HostVirtualNicManagerNicTypeManagement) {
continue
} }
for ix := range nc.CandidateVnic {
for _, selectedVnicKey := range nc.SelectedVnic {
if nc.CandidateVnic[ix].Key != selectedVnicKey {
continue
}
ip := net.ParseIP(nc.CandidateVnic[ix].Spec.Ip.IpAddress)
if ip != nil {
mname = ip.String()
m.mu.Lock()
m.hosts[name] = mname
m.mu.Unlock()
name = mname // InitiateFileTransfer{To,From}Guest methods return an ESX host's inventory name (HostSystem.Name).
break // This name was used to add the host to vCenter and cannot be changed (unless the host is removed from inventory and added back with another name).
} // The name used when adding to VC may not resolvable by this client's DNS, so we prefer an ESX management IP.
} // However, if there is more than one management vNIC, we don't know which IP(s) the client has a route to.
// Leave the hostname as-is in that case or if the env var has disabled the preference.
ips := internal.HostSystemManagementIPs(host.Config.VirtualNicManagerInfo.NetConfig)
if len(ips) == 1 && useGuestTransferIP {
mname = net.JoinHostPort(ips[0].String(), port)
turl.Host = mname
} }
} }
turl.Host = net.JoinHostPort(name, port) m.mu.Lock()
m.hosts[name] = mname
m.mu.Unlock()
m.c.SetThumbprint(turl.Host, host.Summary.Config.SslThumbprint) m.c.SetThumbprint(turl.Host, host.Summary.Config.SslThumbprint)

91
vendor/github.com/vmware/govmomi/history/collector.go generated vendored Normal file
View file

@ -0,0 +1,91 @@
/*
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 history
import (
"context"
"github.com/vmware/govmomi/property"
"github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/types"
)
type Collector struct {
r types.ManagedObjectReference
c *vim25.Client
}
func NewCollector(c *vim25.Client, ref types.ManagedObjectReference) *Collector {
return &Collector{
r: ref,
c: c,
}
}
// Reference returns the managed object reference of this collector
func (c Collector) Reference() types.ManagedObjectReference {
return c.r
}
// Client returns the vim25 client used by this collector
func (c Collector) Client() *vim25.Client {
return c.c
}
// Properties wraps property.DefaultCollector().RetrieveOne() and returns
// properties for the specified managed object reference
func (c Collector) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, dst interface{}) error {
return property.DefaultCollector(c.c).RetrieveOne(ctx, r, ps, dst)
}
func (c Collector) Destroy(ctx context.Context) error {
req := types.DestroyCollector{
This: c.r,
}
_, err := methods.DestroyCollector(ctx, c.c, &req)
return err
}
func (c Collector) Reset(ctx context.Context) error {
req := types.ResetCollector{
This: c.r,
}
_, err := methods.ResetCollector(ctx, c.c, &req)
return err
}
func (c Collector) Rewind(ctx context.Context) error {
req := types.RewindCollector{
This: c.r,
}
_, err := methods.RewindCollector(ctx, c.c, &req)
return err
}
func (c Collector) SetPageSize(ctx context.Context, maxCount int32) error {
req := types.SetCollectorPageSize{
This: c.r,
MaxCount: maxCount,
}
_, err := methods.SetCollectorPageSize(ctx, c.c, &req)
return err
}

View file

@ -17,9 +17,11 @@ limitations under the License.
package internal package internal
import ( import (
"net"
"path" "path"
"github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types"
) )
// InventoryPath composed of entities by Name // InventoryPath composed of entities by Name
@ -36,3 +38,26 @@ func InventoryPath(entities []mo.ManagedEntity) string {
return val return val
} }
func HostSystemManagementIPs(config []types.VirtualNicManagerNetConfig) []net.IP {
var ips []net.IP
for _, nc := range config {
if nc.NicType != string(types.HostVirtualNicManagerNicTypeManagement) {
continue
}
for ix := range nc.CandidateVnic {
for _, selectedVnicKey := range nc.SelectedVnic {
if nc.CandidateVnic[ix].Key != selectedVnicKey {
continue
}
ip := net.ParseIP(nc.CandidateVnic[ix].Spec.Ip.IpAddress)
if ip != nil {
ips = append(ips, ip)
}
}
}
}
return ips
}

View file

@ -25,6 +25,7 @@ import (
"github.com/vmware/govmomi/property" "github.com/vmware/govmomi/property"
"github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types" "github.com/vmware/govmomi/vim25/types"
) )
@ -134,3 +135,14 @@ func (c Common) SetCustomValue(ctx context.Context, key string, value string) er
_, err := methods.SetCustomValue(ctx, c.c, &req) _, err := methods.SetCustomValue(ctx, c.c, &req)
return err return err
} }
func ReferenceFromString(s string) *types.ManagedObjectReference {
var ref types.ManagedObjectReference
if !ref.FromString(s) {
return nil
}
if mo.IsManagedObjectType(ref.Type) {
return &ref
}
return nil
}

View file

@ -225,3 +225,17 @@ func (f Folder) MoveInto(ctx context.Context, list []types.ManagedObjectReferenc
return NewTask(f.c, res.Returnval), nil return NewTask(f.c, res.Returnval), nil
} }
func (f Folder) PlaceVmsXCluster(ctx context.Context, spec types.PlaceVmsXClusterSpec) (*types.PlaceVmsXClusterResult, error) {
req := types.PlaceVmsXCluster{
This: f.Reference(),
PlacementSpec: spec,
}
res, err := methods.PlaceVmsXCluster(ctx, f.c, &req)
if err != nil {
return nil, err
}
return &res.Returnval, nil
}

View file

@ -1,72 +0,0 @@
/*
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
}

View file

@ -21,6 +21,7 @@ import (
"fmt" "fmt"
"net" "net"
"github.com/vmware/govmomi/internal"
"github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods" "github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/mo"
@ -81,24 +82,17 @@ func (h HostSystem) ManagementIPs(ctx context.Context) ([]net.IP, error) {
return nil, err return nil, err
} }
var ips []net.IP config := mh.Config
for _, nc := range mh.Config.VirtualNicManagerInfo.NetConfig { if config == nil {
if nc.NicType != string(types.HostVirtualNicManagerNicTypeManagement) { return nil, nil
continue
}
for ix := range nc.CandidateVnic {
for _, selectedVnicKey := range nc.SelectedVnic {
if nc.CandidateVnic[ix].Key != selectedVnicKey {
continue
}
ip := net.ParseIP(nc.CandidateVnic[ix].Spec.Ip.IpAddress)
if ip != nil {
ips = append(ips, ip)
}
}
}
} }
return ips, nil
info := config.VirtualNicManagerInfo
if info == nil {
return nil, nil
}
return internal.HostSystemManagementIPs(info.NetConfig), nil
} }
func (h HostSystem) Disconnect(ctx context.Context) (*Task, error) { func (h HostSystem) Disconnect(ctx context.Context) (*Task, error) {

View file

@ -68,7 +68,13 @@ func EthernetCardTypes() VirtualDeviceList {
&types.VirtualSriovEthernetCard{}, &types.VirtualSriovEthernetCard{},
}).Select(func(device types.BaseVirtualDevice) bool { }).Select(func(device types.BaseVirtualDevice) bool {
c := device.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() c := device.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard()
c.GetVirtualDevice().Key = int32(rand.Uint32()) * -1
key := rand.Int31() * -1
if key == 0 {
key = -1
}
c.GetVirtualDevice().Key = key
return true return true
}) })
} }

View file

@ -171,6 +171,7 @@ const (
PbmObjectTypeVirtualDiskId = PbmObjectType("virtualDiskId") PbmObjectTypeVirtualDiskId = PbmObjectType("virtualDiskId")
PbmObjectTypeVirtualDiskUUID = PbmObjectType("virtualDiskUUID") PbmObjectTypeVirtualDiskUUID = PbmObjectType("virtualDiskUUID")
PbmObjectTypeDatastore = PbmObjectType("datastore") PbmObjectTypeDatastore = PbmObjectType("datastore")
PbmObjectTypeVsanObjectId = PbmObjectType("vsanObjectId")
PbmObjectTypeFileShareId = PbmObjectType("fileShareId") PbmObjectTypeFileShareId = PbmObjectType("fileShareId")
PbmObjectTypeUnknown = PbmObjectType("unknown") PbmObjectTypeUnknown = PbmObjectType("unknown")
) )

View file

@ -997,6 +997,17 @@ type PbmFetchComplianceResultResponse struct {
Returnval []PbmComplianceResult `xml:"returnval,omitempty"` Returnval []PbmComplianceResult `xml:"returnval,omitempty"`
} }
type PbmFetchEntityHealthStatusSpec struct {
types.DynamicData
ObjectRef PbmServerObjectRef `xml:"objectRef"`
BackingId string `xml:"backingId,omitempty"`
}
func init() {
types.Add("pbm:PbmFetchEntityHealthStatusSpec", reflect.TypeOf((*PbmFetchEntityHealthStatusSpec)(nil)).Elem())
}
type PbmFetchResourceType PbmFetchResourceTypeRequestType type PbmFetchResourceType PbmFetchResourceTypeRequestType
func init() { func init() {

View file

@ -97,10 +97,16 @@ func (p *Collector) CreateFilter(ctx context.Context, req types.CreateFilter) er
return nil return nil
} }
func (p *Collector) WaitForUpdates(ctx context.Context, v string) (*types.UpdateSet, error) { func (p *Collector) WaitForUpdates(ctx context.Context, version string, opts ...*types.WaitOptions) (*types.UpdateSet, error) {
req := types.WaitForUpdatesEx{ req := types.WaitForUpdatesEx{
This: p.Reference(), This: p.Reference(),
Version: v, Version: version,
}
if len(opts) == 1 {
req.Options = opts[0]
} else if len(opts) > 1 {
panic("only one option may be specified")
} }
res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req) res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req)

View file

@ -130,7 +130,7 @@ func (f Filter) MatchPropertyList(props []types.DynamicProperty) bool {
return len(f) == len(props) // false if a property such as VM "guest" is unset return len(f) == len(props) // false if a property such as VM "guest" is unset
} }
// MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches the Filter. // MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches all properties the Filter.
func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference { func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference {
var refs []types.ManagedObjectReference var refs []types.ManagedObjectReference
@ -142,3 +142,27 @@ func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.Manage
return refs return refs
} }
// MatchAnyPropertyList returns true if any given props match the Filter.
func (f Filter) MatchAnyPropertyList(props []types.DynamicProperty) bool {
for _, p := range props {
if f.MatchProperty(p) {
return true
}
}
return false
}
// MatchAnyObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches any property in the Filter.
func (f Filter) MatchAnyObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference {
var refs []types.ManagedObjectReference
for _, o := range objects {
if f.MatchAnyPropertyList(o.PropSet) {
refs = append(refs, o.Obj)
}
}
return refs
}

View file

@ -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 task
import (
"context"
"github.com/vmware/govmomi/history"
"github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types"
)
// HistoryCollector provides a mechanism for retrieving historical data and
// updates when the server appends new tasks.
type HistoryCollector struct {
*history.Collector
}
func newHistoryCollector(c *vim25.Client, ref types.ManagedObjectReference) *HistoryCollector {
return &HistoryCollector{
Collector: history.NewCollector(c, ref),
}
}
// RecentTasks returns a list of task managed objects that completed recently,
// that are currently running, or that are queued to run.
func (h HistoryCollector) RecentTasks(ctx context.Context) ([]types.TaskInfo, error) {
var o mo.TaskHistoryCollector
err := h.Properties(ctx, h.Reference(), []string{"recentTask"}, &o)
if err != nil {
return nil, err
}
return o.LatestPage, nil
}
// ReadNextTasks reads the scrollable view from the current position. The
// scrollable position is moved to the next newer page after the read. No item
// is returned when the end of the collector is reached.
func (h HistoryCollector) ReadNextTasks(ctx context.Context, maxCount int32) ([]types.TaskInfo, error) {
req := types.ReadNextTasks{
This: h.Reference(),
MaxCount: maxCount,
}
res, err := methods.ReadNextTasks(ctx, h.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}
// ReadPreviousTasks reads the scrollable view from the current position. The
// scrollable position is then moved to the next older page after the read. No
// item is returned when the head of the collector is reached.
func (h HistoryCollector) ReadPreviousTasks(ctx context.Context, maxCount int32) ([]types.TaskInfo, error) {
req := types.ReadPreviousTasks{
This: h.Reference(),
MaxCount: maxCount,
}
res, err := methods.ReadPreviousTasks(ctx, h.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}

45
vendor/github.com/vmware/govmomi/task/manager.go generated vendored Normal file
View file

@ -0,0 +1,45 @@
package task
import (
"context"
"github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/types"
)
type Manager struct {
r types.ManagedObjectReference
c *vim25.Client
}
// NewManager creates a new task manager
func NewManager(c *vim25.Client) *Manager {
m := Manager{
r: *c.ServiceContent.TaskManager,
c: c,
}
return &m
}
// Reference returns the task.Manager MOID
func (m Manager) Reference() types.ManagedObjectReference {
return m.r
}
// CreateCollectorForTasks returns a task history collector, a specialized
// history collector that gathers TaskInfo data objects.
func (m Manager) CreateCollectorForTasks(ctx context.Context, filter types.TaskFilterSpec) (*HistoryCollector, error) {
req := types.CreateCollectorForTasks{
This: m.r,
Filter: filter,
}
res, err := methods.CreateCollectorForTasks(ctx, m.c, &req)
if err != nil {
return nil, err
}
return newHistoryCollector(m.c, res.Returnval), nil
}

View file

@ -44,6 +44,7 @@ const (
VCenterVM = "/vcenter/vm" VCenterVM = "/vcenter/vm"
SessionCookieName = "vmware-api-session-id" SessionCookieName = "vmware-api-session-id"
UseHeaderAuthn = "vmware-use-header-authn" UseHeaderAuthn = "vmware-use-header-authn"
DebugEcho = "/vc-sim/debug/echo"
) )
// AssociatedObject is the same structure as types.ManagedObjectReference, // AssociatedObject is the same structure as types.ManagedObjectReference,

View file

@ -135,6 +135,18 @@ func (c *Client) WithSigner(ctx context.Context, s Signer) context.Context {
return context.WithValue(ctx, signerContext{}, s) return context.WithValue(ctx, signerContext{}, s)
} }
type headersContext struct{}
// WithHeader returns a new Context populated with the provided headers map.
// Calls to a VAPI REST client with this context will populate the HTTP headers
// map using the provided headers.
func (c *Client) WithHeader(
ctx context.Context,
headers http.Header) context.Context {
return context.WithValue(ctx, headersContext{}, headers)
}
type statusError struct { type statusError struct {
res *http.Response res *http.Response
} }
@ -143,6 +155,12 @@ func (e *statusError) Error() string {
return fmt.Sprintf("%s %s: %s", e.res.Request.Method, e.res.Request.URL, e.res.Status) return fmt.Sprintf("%s %s: %s", e.res.Request.Method, e.res.Request.URL, e.res.Status)
} }
// RawResponse may be used with the Do method as the resBody argument in order
// to capture the raw response data.
type RawResponse struct {
bytes.Buffer
}
// Do sends the http.Request, decoding resBody if provided. // Do sends the http.Request, decoding resBody if provided.
func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{}) error { func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{}) error {
switch req.Method { switch req.Method {
@ -162,6 +180,14 @@ func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{})
} }
} }
if headers, ok := ctx.Value(headersContext{}).(http.Header); ok {
for k, v := range headers {
for _, v := range v {
req.Header.Add(k, v)
}
}
}
return c.Client.Do(ctx, req, func(res *http.Response) error { return c.Client.Do(ctx, req, func(res *http.Response) error {
switch res.StatusCode { switch res.StatusCode {
case http.StatusOK: case http.StatusOK:
@ -183,6 +209,8 @@ func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{})
} }
switch b := resBody.(type) { switch b := resBody.(type) {
case *RawResponse:
return res.Write(b)
case io.Writer: case io.Writer:
_, err := io.Copy(b, res.Body) _, err := io.Copy(b, res.Body)
return err return err

View file

@ -52,7 +52,7 @@ func (r *Resource) WithAction(action string) *Resource {
func (r *Resource) WithParam(name string, value string) *Resource { func (r *Resource) WithParam(name string, value string) *Resource {
// ParseQuery handles empty case, and we control access to query string so shouldn't encounter an error case // ParseQuery handles empty case, and we control access to query string so shouldn't encounter an error case
params, _ := url.ParseQuery(r.u.RawQuery) params, _ := url.ParseQuery(r.u.RawQuery)
params[name] = []string{value} params[name] = append(params[name], value)
r.u.RawQuery = params.Encode() r.u.RawQuery = params.Encode()
return r return r
} }

View file

@ -126,3 +126,20 @@ func (v ContainerView) Find(ctx context.Context, kind []string, filter property.
return filter.MatchObjectContent(content), nil return filter.MatchObjectContent(content), nil
} }
// FindAny returns object references for entities of type kind, matching any property the given filter.
func (v ContainerView) FindAny(ctx context.Context, kind []string, filter property.Filter) ([]types.ManagedObjectReference, error) {
if len(filter) == 0 {
// Ensure we have at least 1 filter to avoid retrieving all properties.
filter = property.Filter{"name": "*"}
}
var content []types.ObjectContent
err := v.Retrieve(ctx, kind, filter.Keys(), &content)
if err != nil {
return nil, err
}
return filter.MatchAnyObjectContent(content), nil
}

View file

@ -2303,6 +2303,26 @@ func ConnectNvmeController(ctx context.Context, r soap.RoundTripper, req *types.
return resBody.Res, nil return resBody.Res, nil
} }
type ConnectNvmeControllerEx_TaskBody struct {
Req *types.ConnectNvmeControllerEx_Task `xml:"urn:vim25 ConnectNvmeControllerEx_Task,omitempty"`
Res *types.ConnectNvmeControllerEx_TaskResponse `xml:"ConnectNvmeControllerEx_TaskResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *ConnectNvmeControllerEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
func ConnectNvmeControllerEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ConnectNvmeControllerEx_Task) (*types.ConnectNvmeControllerEx_TaskResponse, error) {
var reqBody, resBody ConnectNvmeControllerEx_TaskBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type ConsolidateVMDisks_TaskBody struct { type ConsolidateVMDisks_TaskBody struct {
Req *types.ConsolidateVMDisks_Task `xml:"urn:vim25 ConsolidateVMDisks_Task,omitempty"` Req *types.ConsolidateVMDisks_Task `xml:"urn:vim25 ConsolidateVMDisks_Task,omitempty"`
Res *types.ConsolidateVMDisks_TaskResponse `xml:"ConsolidateVMDisks_TaskResponse,omitempty"` Res *types.ConsolidateVMDisks_TaskResponse `xml:"ConsolidateVMDisks_TaskResponse,omitempty"`
@ -3243,6 +3263,26 @@ func CreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.Cr
return resBody.Res, nil return resBody.Res, nil
} }
type CreateSoftwareAdapterBody struct {
Req *types.CreateSoftwareAdapter `xml:"urn:vim25 CreateSoftwareAdapter,omitempty"`
Res *types.CreateSoftwareAdapterResponse `xml:"CreateSoftwareAdapterResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *CreateSoftwareAdapterBody) Fault() *soap.Fault { return b.Fault_ }
func CreateSoftwareAdapter(ctx context.Context, r soap.RoundTripper, req *types.CreateSoftwareAdapter) (*types.CreateSoftwareAdapterResponse, error) {
var reqBody, resBody CreateSoftwareAdapterBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type CreateStoragePodBody struct { type CreateStoragePodBody struct {
Req *types.CreateStoragePod `xml:"urn:vim25 CreateStoragePod,omitempty"` Req *types.CreateStoragePod `xml:"urn:vim25 CreateStoragePod,omitempty"`
Res *types.CreateStoragePodResponse `xml:"CreateStoragePodResponse,omitempty"` Res *types.CreateStoragePodResponse `xml:"CreateStoragePodResponse,omitempty"`
@ -4763,6 +4803,26 @@ func DisconnectNvmeController(ctx context.Context, r soap.RoundTripper, req *typ
return resBody.Res, nil return resBody.Res, nil
} }
type DisconnectNvmeControllerEx_TaskBody struct {
Req *types.DisconnectNvmeControllerEx_Task `xml:"urn:vim25 DisconnectNvmeControllerEx_Task,omitempty"`
Res *types.DisconnectNvmeControllerEx_TaskResponse `xml:"DisconnectNvmeControllerEx_TaskResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *DisconnectNvmeControllerEx_TaskBody) Fault() *soap.Fault { return b.Fault_ }
func DisconnectNvmeControllerEx_Task(ctx context.Context, r soap.RoundTripper, req *types.DisconnectNvmeControllerEx_Task) (*types.DisconnectNvmeControllerEx_TaskResponse, error) {
var reqBody, resBody DisconnectNvmeControllerEx_TaskBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type DiscoverFcoeHbasBody struct { type DiscoverFcoeHbasBody struct {
Req *types.DiscoverFcoeHbas `xml:"urn:vim25 DiscoverFcoeHbas,omitempty"` Req *types.DiscoverFcoeHbas `xml:"urn:vim25 DiscoverFcoeHbas,omitempty"`
Res *types.DiscoverFcoeHbasResponse `xml:"DiscoverFcoeHbasResponse,omitempty"` Res *types.DiscoverFcoeHbasResponse `xml:"DiscoverFcoeHbasResponse,omitempty"`
@ -5643,6 +5703,26 @@ func ExtractOvfEnvironment(ctx context.Context, r soap.RoundTripper, req *types.
return resBody.Res, nil return resBody.Res, nil
} }
type FetchAuditRecordsBody struct {
Req *types.FetchAuditRecords `xml:"urn:vim25 FetchAuditRecords,omitempty"`
Res *types.FetchAuditRecordsResponse `xml:"FetchAuditRecordsResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *FetchAuditRecordsBody) Fault() *soap.Fault { return b.Fault_ }
func FetchAuditRecords(ctx context.Context, r soap.RoundTripper, req *types.FetchAuditRecords) (*types.FetchAuditRecordsResponse, error) {
var reqBody, resBody FetchAuditRecordsBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type FetchDVPortKeysBody struct { type FetchDVPortKeysBody struct {
Req *types.FetchDVPortKeys `xml:"urn:vim25 FetchDVPortKeys,omitempty"` Req *types.FetchDVPortKeys `xml:"urn:vim25 FetchDVPortKeys,omitempty"`
Res *types.FetchDVPortKeysResponse `xml:"FetchDVPortKeysResponse,omitempty"` Res *types.FetchDVPortKeysResponse `xml:"FetchDVPortKeysResponse,omitempty"`
@ -6323,6 +6403,26 @@ func GetSiteInfo(ctx context.Context, r soap.RoundTripper, req *types.GetSiteInf
return resBody.Res, nil return resBody.Res, nil
} }
type GetSystemVMsRestrictedDatastoresBody struct {
Req *types.GetSystemVMsRestrictedDatastores `xml:"urn:vim25 GetSystemVMsRestrictedDatastores,omitempty"`
Res *types.GetSystemVMsRestrictedDatastoresResponse `xml:"GetSystemVMsRestrictedDatastoresResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *GetSystemVMsRestrictedDatastoresBody) Fault() *soap.Fault { return b.Fault_ }
func GetSystemVMsRestrictedDatastores(ctx context.Context, r soap.RoundTripper, req *types.GetSystemVMsRestrictedDatastores) (*types.GetSystemVMsRestrictedDatastoresResponse, error) {
var reqBody, resBody GetSystemVMsRestrictedDatastoresBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type GetVchaClusterHealthBody struct { type GetVchaClusterHealthBody struct {
Req *types.GetVchaClusterHealth `xml:"urn:vim25 GetVchaClusterHealth,omitempty"` Req *types.GetVchaClusterHealth `xml:"urn:vim25 GetVchaClusterHealth,omitempty"`
Res *types.GetVchaClusterHealthResponse `xml:"GetVchaClusterHealthResponse,omitempty"` Res *types.GetVchaClusterHealthResponse `xml:"GetVchaClusterHealthResponse,omitempty"`
@ -13243,6 +13343,26 @@ func RemoveSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.Re
return resBody.Res, nil return resBody.Res, nil
} }
type RemoveSoftwareAdapterBody struct {
Req *types.RemoveSoftwareAdapter `xml:"urn:vim25 RemoveSoftwareAdapter,omitempty"`
Res *types.RemoveSoftwareAdapterResponse `xml:"RemoveSoftwareAdapterResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *RemoveSoftwareAdapterBody) Fault() *soap.Fault { return b.Fault_ }
func RemoveSoftwareAdapter(ctx context.Context, r soap.RoundTripper, req *types.RemoveSoftwareAdapter) (*types.RemoveSoftwareAdapterResponse, error) {
var reqBody, resBody RemoveSoftwareAdapterBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type RemoveUserBody struct { type RemoveUserBody struct {
Req *types.RemoveUser `xml:"urn:vim25 RemoveUser,omitempty"` Req *types.RemoveUser `xml:"urn:vim25 RemoveUser,omitempty"`
Res *types.RemoveUserResponse `xml:"RemoveUserResponse,omitempty"` Res *types.RemoveUserResponse `xml:"RemoveUserResponse,omitempty"`
@ -15683,6 +15803,26 @@ func TerminateVM(ctx context.Context, r soap.RoundTripper, req *types.TerminateV
return resBody.Res, nil return resBody.Res, nil
} }
type TestTimeServiceBody struct {
Req *types.TestTimeService `xml:"urn:vim25 TestTimeService,omitempty"`
Res *types.TestTimeServiceResponse `xml:"TestTimeServiceResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *TestTimeServiceBody) Fault() *soap.Fault { return b.Fault_ }
func TestTimeService(ctx context.Context, r soap.RoundTripper, req *types.TestTimeService) (*types.TestTimeServiceResponse, error) {
var reqBody, resBody TestTimeServiceBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}
type TurnDiskLocatorLedOff_TaskBody struct { type TurnDiskLocatorLedOff_TaskBody struct {
Req *types.TurnDiskLocatorLedOff_Task `xml:"urn:vim25 TurnDiskLocatorLedOff_Task,omitempty"` Req *types.TurnDiskLocatorLedOff_Task `xml:"urn:vim25 TurnDiskLocatorLedOff_Task,omitempty"`
Res *types.TurnDiskLocatorLedOff_TaskResponse `xml:"TurnDiskLocatorLedOff_TaskResponse,omitempty"` Res *types.TurnDiskLocatorLedOff_TaskResponse `xml:"TurnDiskLocatorLedOff_TaskResponse,omitempty"`
@ -16523,26 +16663,6 @@ func UpdateGraphicsConfig(ctx context.Context, r soap.RoundTripper, req *types.U
return resBody.Res, nil return resBody.Res, nil
} }
type UpdateHostCustomizations_TaskBody struct {
Req *types.UpdateHostCustomizations_Task `xml:"urn:vim25 UpdateHostCustomizations_Task,omitempty"`
Res *types.UpdateHostCustomizations_TaskResponse `xml:"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 { type UpdateHostImageAcceptanceLevelBody struct {
Req *types.UpdateHostImageAcceptanceLevel `xml:"urn:vim25 UpdateHostImageAcceptanceLevel,omitempty"` Req *types.UpdateHostImageAcceptanceLevel `xml:"urn:vim25 UpdateHostImageAcceptanceLevel,omitempty"`
Res *types.UpdateHostImageAcceptanceLevelResponse `xml:"UpdateHostImageAcceptanceLevelResponse,omitempty"` Res *types.UpdateHostImageAcceptanceLevelResponse `xml:"UpdateHostImageAcceptanceLevelResponse,omitempty"`

View file

@ -0,0 +1,44 @@
/*
Copyright (c) 2022 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES 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 PlaceVmsXClusterBody struct {
Req *types.PlaceVmsXCluster `xml:"urn:vim25 PlaceVmsXCluster,omitempty"`
Res *types.PlaceVmsXClusterResponse `xml:"PlaceVmsXClusterResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}
func (b *PlaceVmsXClusterBody) Fault() *soap.Fault { return b.Fault_ }
func PlaceVmsXCluster(ctx context.Context, r soap.RoundTripper, req *types.PlaceVmsXCluster) (*types.PlaceVmsXClusterResponse, error) {
var reqBody, resBody PlaceVmsXClusterBody
reqBody.Req = req
if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}
return resBody.Res, nil
}

View file

@ -256,3 +256,8 @@ func (t *typeInfo) LoadFromObjectContent(o types.ObjectContent) (reflect.Value,
return v, nil return v, nil
} }
func IsManagedObjectType(kind string) bool {
_, ok := t[kind]
return ok
}

View file

@ -87,7 +87,9 @@ func (d *debugRoundTrip) debugRequest(req *http.Request) string {
ext := d.ext(req.Header) ext := d.ext(req.Header)
// Capture body // Capture body
wc = d.newFile("req." + ext) wc = d.newFile("req." + ext)
req.Body = Trace(req.Body, wc, ext) if req.Body != nil {
req.Body = Trace(req.Body, wc, ext)
}
// Delay closing until marked done // Delay closing until marked done
d.cs = append(d.cs, wc) d.cs = append(d.cs, wc)

View file

@ -550,6 +550,8 @@ type CustomizationFailedReasonCode string
const ( const (
CustomizationFailedReasonCodeUserDefinedScriptDisabled = CustomizationFailedReasonCode("userDefinedScriptDisabled") CustomizationFailedReasonCodeUserDefinedScriptDisabled = CustomizationFailedReasonCode("userDefinedScriptDisabled")
CustomizationFailedReasonCodeCustomizationDisabled = CustomizationFailedReasonCode("customizationDisabled") CustomizationFailedReasonCodeCustomizationDisabled = CustomizationFailedReasonCode("customizationDisabled")
CustomizationFailedReasonCodeRawDataIsNotSupported = CustomizationFailedReasonCode("rawDataIsNotSupported")
CustomizationFailedReasonCodeWrongMetadataFormat = CustomizationFailedReasonCode("wrongMetadataFormat")
) )
func init() { func init() {
@ -815,6 +817,7 @@ const (
DistributedVirtualSwitchHostInfrastructureTrafficClassVsan = DistributedVirtualSwitchHostInfrastructureTrafficClass("vsan") DistributedVirtualSwitchHostInfrastructureTrafficClassVsan = DistributedVirtualSwitchHostInfrastructureTrafficClass("vsan")
DistributedVirtualSwitchHostInfrastructureTrafficClassVdp = DistributedVirtualSwitchHostInfrastructureTrafficClass("vdp") DistributedVirtualSwitchHostInfrastructureTrafficClassVdp = DistributedVirtualSwitchHostInfrastructureTrafficClass("vdp")
DistributedVirtualSwitchHostInfrastructureTrafficClassBackupNfc = DistributedVirtualSwitchHostInfrastructureTrafficClass("backupNfc") DistributedVirtualSwitchHostInfrastructureTrafficClassBackupNfc = DistributedVirtualSwitchHostInfrastructureTrafficClass("backupNfc")
DistributedVirtualSwitchHostInfrastructureTrafficClassNvmetcp = DistributedVirtualSwitchHostInfrastructureTrafficClass("nvmetcp")
) )
func init() { func init() {
@ -1400,6 +1403,19 @@ func init() {
t["HostDigestInfoDigestMethodType"] = reflect.TypeOf((*HostDigestInfoDigestMethodType)(nil)).Elem() t["HostDigestInfoDigestMethodType"] = reflect.TypeOf((*HostDigestInfoDigestMethodType)(nil)).Elem()
} }
type HostDigestVerificationSetting string
const (
HostDigestVerificationSettingDigestDisabled = HostDigestVerificationSetting("digestDisabled")
HostDigestVerificationSettingHeaderOnly = HostDigestVerificationSetting("headerOnly")
HostDigestVerificationSettingDataOnly = HostDigestVerificationSetting("dataOnly")
HostDigestVerificationSettingHeaderAndData = HostDigestVerificationSetting("headerAndData")
)
func init() {
t["HostDigestVerificationSetting"] = reflect.TypeOf((*HostDigestVerificationSetting)(nil)).Elem()
}
type HostDisconnectedEventReasonCode string type HostDisconnectedEventReasonCode string
const ( const (
@ -1509,6 +1525,18 @@ func init() {
t["HostFirewallRuleProtocol"] = reflect.TypeOf((*HostFirewallRuleProtocol)(nil)).Elem() t["HostFirewallRuleProtocol"] = reflect.TypeOf((*HostFirewallRuleProtocol)(nil)).Elem()
} }
type HostFruFruType string
const (
HostFruFruTypeUndefined = HostFruFruType("undefined")
HostFruFruTypeBoard = HostFruFruType("board")
HostFruFruTypeProduct = HostFruFruType("product")
)
func init() {
t["HostFruFruType"] = reflect.TypeOf((*HostFruFruType)(nil)).Elem()
}
type HostGraphicsConfigGraphicsType string type HostGraphicsConfigGraphicsType string
const ( const (
@ -1768,6 +1796,40 @@ func init() {
t["HostMaintenanceSpecPurpose"] = reflect.TypeOf((*HostMaintenanceSpecPurpose)(nil)).Elem() t["HostMaintenanceSpecPurpose"] = reflect.TypeOf((*HostMaintenanceSpecPurpose)(nil)).Elem()
} }
type HostMemoryTierFlags string
const (
HostMemoryTierFlagsMemoryTier = HostMemoryTierFlags("memoryTier")
HostMemoryTierFlagsPersistentTier = HostMemoryTierFlags("persistentTier")
HostMemoryTierFlagsCachingTier = HostMemoryTierFlags("cachingTier")
)
func init() {
t["HostMemoryTierFlags"] = reflect.TypeOf((*HostMemoryTierFlags)(nil)).Elem()
}
type HostMemoryTierType string
const (
HostMemoryTierTypeDRAM = HostMemoryTierType("DRAM")
HostMemoryTierTypePMem = HostMemoryTierType("PMem")
)
func init() {
t["HostMemoryTierType"] = reflect.TypeOf((*HostMemoryTierType)(nil)).Elem()
}
type HostMemoryTieringType string
const (
HostMemoryTieringTypeNoTiering = HostMemoryTieringType("noTiering")
HostMemoryTieringTypeHardwareTiering = HostMemoryTieringType("hardwareTiering")
)
func init() {
t["HostMemoryTieringType"] = reflect.TypeOf((*HostMemoryTieringType)(nil)).Elem()
}
type HostMountInfoInaccessibleReason string type HostMountInfoInaccessibleReason string
const ( const (
@ -1905,6 +1967,7 @@ const (
HostNvmeTransportTypePcie = HostNvmeTransportType("pcie") HostNvmeTransportTypePcie = HostNvmeTransportType("pcie")
HostNvmeTransportTypeFibreChannel = HostNvmeTransportType("fibreChannel") HostNvmeTransportTypeFibreChannel = HostNvmeTransportType("fibreChannel")
HostNvmeTransportTypeRdma = HostNvmeTransportType("rdma") HostNvmeTransportTypeRdma = HostNvmeTransportType("rdma")
HostNvmeTransportTypeTcp = HostNvmeTransportType("tcp")
HostNvmeTransportTypeLoopback = HostNvmeTransportType("loopback") HostNvmeTransportTypeLoopback = HostNvmeTransportType("loopback")
HostNvmeTransportTypeUnsupported = HostNvmeTransportType("unsupported") HostNvmeTransportTypeUnsupported = HostNvmeTransportType("unsupported")
) )
@ -2072,6 +2135,28 @@ func init() {
t["HostProtocolEndpointProtocolEndpointType"] = reflect.TypeOf((*HostProtocolEndpointProtocolEndpointType)(nil)).Elem() t["HostProtocolEndpointProtocolEndpointType"] = reflect.TypeOf((*HostProtocolEndpointProtocolEndpointType)(nil)).Elem()
} }
type HostPtpConfigDeviceType string
const (
HostPtpConfigDeviceTypeNone = HostPtpConfigDeviceType("none")
HostPtpConfigDeviceTypeVirtualNic = HostPtpConfigDeviceType("virtualNic")
HostPtpConfigDeviceTypePciPassthruNic = HostPtpConfigDeviceType("pciPassthruNic")
)
func init() {
t["HostPtpConfigDeviceType"] = reflect.TypeOf((*HostPtpConfigDeviceType)(nil)).Elem()
}
type HostQualifiedNameType string
const (
HostQualifiedNameTypeNvmeQualifiedName = HostQualifiedNameType("nvmeQualifiedName")
)
func init() {
t["HostQualifiedNameType"] = reflect.TypeOf((*HostQualifiedNameType)(nil)).Elem()
}
type HostRdmaDeviceConnectionState string type HostRdmaDeviceConnectionState string
const ( const (
@ -2115,6 +2200,17 @@ func init() {
t["HostRuntimeInfoNetStackInstanceRuntimeInfoState"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfoState)(nil)).Elem() t["HostRuntimeInfoNetStackInstanceRuntimeInfoState"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfoState)(nil)).Elem()
} }
type HostRuntimeInfoStateEncryptionInfoProtectionMode string
const (
HostRuntimeInfoStateEncryptionInfoProtectionModeNone = HostRuntimeInfoStateEncryptionInfoProtectionMode("none")
HostRuntimeInfoStateEncryptionInfoProtectionModeTpm = HostRuntimeInfoStateEncryptionInfoProtectionMode("tpm")
)
func init() {
t["HostRuntimeInfoStateEncryptionInfoProtectionMode"] = reflect.TypeOf((*HostRuntimeInfoStateEncryptionInfoProtectionMode)(nil)).Elem()
}
type HostRuntimeInfoStatelessNvdsMigrationState string type HostRuntimeInfoStatelessNvdsMigrationState string
const ( const (
@ -2328,6 +2424,8 @@ const (
HostVirtualNicManagerNicTypeVsanWitness = HostVirtualNicManagerNicType("vsanWitness") HostVirtualNicManagerNicTypeVsanWitness = HostVirtualNicManagerNicType("vsanWitness")
HostVirtualNicManagerNicTypeVSphereBackupNFC = HostVirtualNicManagerNicType("vSphereBackupNFC") HostVirtualNicManagerNicTypeVSphereBackupNFC = HostVirtualNicManagerNicType("vSphereBackupNFC")
HostVirtualNicManagerNicTypePtp = HostVirtualNicManagerNicType("ptp") HostVirtualNicManagerNicTypePtp = HostVirtualNicManagerNicType("ptp")
HostVirtualNicManagerNicTypeNvmeTcp = HostVirtualNicManagerNicType("nvmeTcp")
HostVirtualNicManagerNicTypeNvmeRdma = HostVirtualNicManagerNicType("nvmeRdma")
) )
func init() { func init() {
@ -2471,6 +2569,7 @@ const (
IoFilterTypeInspection = IoFilterType("inspection") IoFilterTypeInspection = IoFilterType("inspection")
IoFilterTypeDatastoreIoControl = IoFilterType("datastoreIoControl") IoFilterTypeDatastoreIoControl = IoFilterType("datastoreIoControl")
IoFilterTypeDataProvider = IoFilterType("dataProvider") IoFilterTypeDataProvider = IoFilterType("dataProvider")
IoFilterTypeDataCapture = IoFilterType("dataCapture")
) )
func init() { func init() {
@ -4950,6 +5049,17 @@ func init() {
t["VirtualMachineVideoCardUse3dRenderer"] = reflect.TypeOf((*VirtualMachineVideoCardUse3dRenderer)(nil)).Elem() t["VirtualMachineVideoCardUse3dRenderer"] = reflect.TypeOf((*VirtualMachineVideoCardUse3dRenderer)(nil)).Elem()
} }
type VirtualMachineVirtualPMemSnapshotMode string
const (
VirtualMachineVirtualPMemSnapshotModeIndependent_persistent = VirtualMachineVirtualPMemSnapshotMode("independent_persistent")
VirtualMachineVirtualPMemSnapshotModeIndependent_eraseonrevert = VirtualMachineVirtualPMemSnapshotMode("independent_eraseonrevert")
)
func init() {
t["VirtualMachineVirtualPMemSnapshotMode"] = reflect.TypeOf((*VirtualMachineVirtualPMemSnapshotMode)(nil)).Elem()
}
type VirtualMachineWindowsQuiesceSpecVssBackupContext string type VirtualMachineWindowsQuiesceSpecVssBackupContext string
const ( const (

View file

@ -54,7 +54,7 @@ func (r ManagedObjectReference) String() string {
func (r *ManagedObjectReference) FromString(o string) bool { func (r *ManagedObjectReference) FromString(o string) bool {
s := strings.SplitN(o, ":", 2) s := strings.SplitN(o, ":", 2)
if len(s) < 2 { if len(s) != 2 {
return false return false
} }

View file

@ -1256,6 +1256,18 @@ func init() {
t["BaseHostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem() t["BaseHostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem()
} }
func (b *HostDataTransportConnectionInfo) GetHostDataTransportConnectionInfo() *HostDataTransportConnectionInfo {
return b
}
type BaseHostDataTransportConnectionInfo interface {
GetHostDataTransportConnectionInfo() *HostDataTransportConnectionInfo
}
func init() {
t["BaseHostDataTransportConnectionInfo"] = reflect.TypeOf((*HostDataTransportConnectionInfo)(nil)).Elem()
}
func (b *HostDatastoreConnectInfo) GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo { return b } func (b *HostDatastoreConnectInfo) GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo { return b }
type BaseHostDatastoreConnectInfo interface { type BaseHostDatastoreConnectInfo interface {
@ -1358,6 +1370,16 @@ func init() {
t["BaseHostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem() t["BaseHostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem()
} }
func (b *HostHbaCreateSpec) GetHostHbaCreateSpec() *HostHbaCreateSpec { return b }
type BaseHostHbaCreateSpec interface {
GetHostHbaCreateSpec() *HostHbaCreateSpec
}
func init() {
t["BaseHostHbaCreateSpec"] = reflect.TypeOf((*HostHbaCreateSpec)(nil)).Elem()
}
func (b *HostHostBusAdapter) GetHostHostBusAdapter() *HostHostBusAdapter { return b } func (b *HostHostBusAdapter) GetHostHostBusAdapter() *HostHostBusAdapter { return b }
type BaseHostHostBusAdapter interface { type BaseHostHostBusAdapter interface {
@ -3012,6 +3034,18 @@ func init() {
t["BaseVirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem() t["BaseVirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem()
} }
func (b *VirtualMachineBaseIndependentFilterSpec) GetVirtualMachineBaseIndependentFilterSpec() *VirtualMachineBaseIndependentFilterSpec {
return b
}
type BaseVirtualMachineBaseIndependentFilterSpec interface {
GetVirtualMachineBaseIndependentFilterSpec() *VirtualMachineBaseIndependentFilterSpec
}
func init() {
t["BaseVirtualMachineBaseIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineBaseIndependentFilterSpec)(nil)).Elem()
}
func (b *VirtualMachineBootOptionsBootableDevice) GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice { func (b *VirtualMachineBootOptionsBootableDevice) GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice {
return b return b
} }

View file

@ -1852,6 +1852,14 @@ func init() {
t["ArrayOfClusterDasVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigSpec)(nil)).Elem() t["ArrayOfClusterDasVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigSpec)(nil)).Elem()
} }
type ArrayOfClusterDatastoreUpdateSpec struct {
ClusterDatastoreUpdateSpec []ClusterDatastoreUpdateSpec `xml:"ClusterDatastoreUpdateSpec,omitempty"`
}
func init() {
t["ArrayOfClusterDatastoreUpdateSpec"] = reflect.TypeOf((*ArrayOfClusterDatastoreUpdateSpec)(nil)).Elem()
}
type ArrayOfClusterDpmHostConfigInfo struct { type ArrayOfClusterDpmHostConfigInfo struct {
ClusterDpmHostConfigInfo []ClusterDpmHostConfigInfo `xml:"ClusterDpmHostConfigInfo,omitempty"` ClusterDpmHostConfigInfo []ClusterDpmHostConfigInfo `xml:"ClusterDpmHostConfigInfo,omitempty"`
} }
@ -1996,6 +2004,14 @@ func init() {
t["ArrayOfClusterRuleSpec"] = reflect.TypeOf((*ArrayOfClusterRuleSpec)(nil)).Elem() t["ArrayOfClusterRuleSpec"] = reflect.TypeOf((*ArrayOfClusterRuleSpec)(nil)).Elem()
} }
type ArrayOfClusterTagCategoryUpdateSpec struct {
ClusterTagCategoryUpdateSpec []ClusterTagCategoryUpdateSpec `xml:"ClusterTagCategoryUpdateSpec,omitempty"`
}
func init() {
t["ArrayOfClusterTagCategoryUpdateSpec"] = reflect.TypeOf((*ArrayOfClusterTagCategoryUpdateSpec)(nil)).Elem()
}
type ArrayOfClusterVmOrchestrationInfo struct { type ArrayOfClusterVmOrchestrationInfo struct {
ClusterVmOrchestrationInfo []ClusterVmOrchestrationInfo `xml:"ClusterVmOrchestrationInfo,omitempty"` ClusterVmOrchestrationInfo []ClusterVmOrchestrationInfo `xml:"ClusterVmOrchestrationInfo,omitempty"`
} }
@ -3316,6 +3332,14 @@ func init() {
t["ArrayOfHostMemberRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostMemberRuntimeInfo)(nil)).Elem() t["ArrayOfHostMemberRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostMemberRuntimeInfo)(nil)).Elem()
} }
type ArrayOfHostMemoryTierInfo struct {
HostMemoryTierInfo []HostMemoryTierInfo `xml:"HostMemoryTierInfo,omitempty"`
}
func init() {
t["ArrayOfHostMemoryTierInfo"] = reflect.TypeOf((*ArrayOfHostMemoryTierInfo)(nil)).Elem()
}
type ArrayOfHostMultipathInfoLogicalUnit struct { type ArrayOfHostMultipathInfoLogicalUnit struct {
HostMultipathInfoLogicalUnit []HostMultipathInfoLogicalUnit `xml:"HostMultipathInfoLogicalUnit,omitempty"` HostMultipathInfoLogicalUnit []HostMultipathInfoLogicalUnit `xml:"HostMultipathInfoLogicalUnit,omitempty"`
} }
@ -3404,6 +3428,14 @@ func init() {
t["ArrayOfHostNumericSensorInfo"] = reflect.TypeOf((*ArrayOfHostNumericSensorInfo)(nil)).Elem() t["ArrayOfHostNumericSensorInfo"] = reflect.TypeOf((*ArrayOfHostNumericSensorInfo)(nil)).Elem()
} }
type ArrayOfHostNvmeConnectSpec struct {
HostNvmeConnectSpec []HostNvmeConnectSpec `xml:"HostNvmeConnectSpec,omitempty"`
}
func init() {
t["ArrayOfHostNvmeConnectSpec"] = reflect.TypeOf((*ArrayOfHostNvmeConnectSpec)(nil)).Elem()
}
type ArrayOfHostNvmeController struct { type ArrayOfHostNvmeController struct {
HostNvmeController []HostNvmeController `xml:"HostNvmeController,omitempty"` HostNvmeController []HostNvmeController `xml:"HostNvmeController,omitempty"`
} }
@ -3412,6 +3444,14 @@ func init() {
t["ArrayOfHostNvmeController"] = reflect.TypeOf((*ArrayOfHostNvmeController)(nil)).Elem() t["ArrayOfHostNvmeController"] = reflect.TypeOf((*ArrayOfHostNvmeController)(nil)).Elem()
} }
type ArrayOfHostNvmeDisconnectSpec struct {
HostNvmeDisconnectSpec []HostNvmeDisconnectSpec `xml:"HostNvmeDisconnectSpec,omitempty"`
}
func init() {
t["ArrayOfHostNvmeDisconnectSpec"] = reflect.TypeOf((*ArrayOfHostNvmeDisconnectSpec)(nil)).Elem()
}
type ArrayOfHostNvmeDiscoveryLogEntry struct { type ArrayOfHostNvmeDiscoveryLogEntry struct {
HostNvmeDiscoveryLogEntry []HostNvmeDiscoveryLogEntry `xml:"HostNvmeDiscoveryLogEntry,omitempty"` HostNvmeDiscoveryLogEntry []HostNvmeDiscoveryLogEntry `xml:"HostNvmeDiscoveryLogEntry,omitempty"`
} }
@ -3620,14 +3660,6 @@ func init() {
t["ArrayOfHostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*ArrayOfHostProfileManagerCompositionValidationResultResultElement)(nil)).Elem() 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 { type ArrayOfHostProfilesEntityCustomizations struct {
HostProfilesEntityCustomizations []BaseHostProfilesEntityCustomizations `xml:"HostProfilesEntityCustomizations,omitempty,typeattr"` HostProfilesEntityCustomizations []BaseHostProfilesEntityCustomizations `xml:"HostProfilesEntityCustomizations,omitempty,typeattr"`
} }
@ -3668,6 +3700,22 @@ func init() {
t["ArrayOfHostProxySwitchHostLagConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchHostLagConfig)(nil)).Elem() t["ArrayOfHostProxySwitchHostLagConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchHostLagConfig)(nil)).Elem()
} }
type ArrayOfHostPtpConfigPtpPort struct {
HostPtpConfigPtpPort []HostPtpConfigPtpPort `xml:"HostPtpConfigPtpPort,omitempty"`
}
func init() {
t["ArrayOfHostPtpConfigPtpPort"] = reflect.TypeOf((*ArrayOfHostPtpConfigPtpPort)(nil)).Elem()
}
type ArrayOfHostQualifiedName struct {
HostQualifiedName []HostQualifiedName `xml:"HostQualifiedName,omitempty"`
}
func init() {
t["ArrayOfHostQualifiedName"] = reflect.TypeOf((*ArrayOfHostQualifiedName)(nil)).Elem()
}
type ArrayOfHostRdmaDevice struct { type ArrayOfHostRdmaDevice struct {
HostRdmaDevice []HostRdmaDevice `xml:"HostRdmaDevice,omitempty"` HostRdmaDevice []HostRdmaDevice `xml:"HostRdmaDevice,omitempty"`
} }
@ -5492,6 +5540,14 @@ func init() {
t["ArrayOfVirtualDiskRuleSpec"] = reflect.TypeOf((*ArrayOfVirtualDiskRuleSpec)(nil)).Elem() t["ArrayOfVirtualDiskRuleSpec"] = reflect.TypeOf((*ArrayOfVirtualDiskRuleSpec)(nil)).Elem()
} }
type ArrayOfVirtualMachineBaseIndependentFilterSpec struct {
VirtualMachineBaseIndependentFilterSpec []BaseVirtualMachineBaseIndependentFilterSpec `xml:"VirtualMachineBaseIndependentFilterSpec,omitempty,typeattr"`
}
func init() {
t["ArrayOfVirtualMachineBaseIndependentFilterSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineBaseIndependentFilterSpec)(nil)).Elem()
}
type ArrayOfVirtualMachineBootOptionsBootableDevice struct { type ArrayOfVirtualMachineBootOptionsBootableDevice struct {
VirtualMachineBootOptionsBootableDevice []BaseVirtualMachineBootOptionsBootableDevice `xml:"VirtualMachineBootOptionsBootableDevice,omitempty,typeattr"` VirtualMachineBootOptionsBootableDevice []BaseVirtualMachineBootOptionsBootableDevice `xml:"VirtualMachineBootOptionsBootableDevice,omitempty,typeattr"`
} }
@ -5764,6 +5820,14 @@ func init() {
t["ArrayOfVirtualMachinePropertyRelation"] = reflect.TypeOf((*ArrayOfVirtualMachinePropertyRelation)(nil)).Elem() t["ArrayOfVirtualMachinePropertyRelation"] = reflect.TypeOf((*ArrayOfVirtualMachinePropertyRelation)(nil)).Elem()
} }
type ArrayOfVirtualMachineQuickStatsMemoryTierStats struct {
VirtualMachineQuickStatsMemoryTierStats []VirtualMachineQuickStatsMemoryTierStats `xml:"VirtualMachineQuickStatsMemoryTierStats,omitempty"`
}
func init() {
t["ArrayOfVirtualMachineQuickStatsMemoryTierStats"] = reflect.TypeOf((*ArrayOfVirtualMachineQuickStatsMemoryTierStats)(nil)).Elem()
}
type ArrayOfVirtualMachineRelocateSpecDiskLocator struct { type ArrayOfVirtualMachineRelocateSpecDiskLocator struct {
VirtualMachineRelocateSpecDiskLocator []VirtualMachineRelocateSpecDiskLocator `xml:"VirtualMachineRelocateSpecDiskLocator,omitempty"` VirtualMachineRelocateSpecDiskLocator []VirtualMachineRelocateSpecDiskLocator `xml:"VirtualMachineRelocateSpecDiskLocator,omitempty"`
} }
@ -8330,8 +8394,10 @@ func init() {
type ClusterComputeResourceVcsSlots struct { type ClusterComputeResourceVcsSlots struct {
DynamicData DynamicData
Host ManagedObjectReference `xml:"host"` SystemId string `xml:"systemId,omitempty"`
TotalSlots int32 `xml:"totalSlots"` Host ManagedObjectReference `xml:"host"`
Datastore []ManagedObjectReference `xml:"datastore,omitempty"`
TotalSlots int32 `xml:"totalSlots"`
} }
func init() { func init() {
@ -8355,6 +8421,7 @@ func init() {
type ClusterConfigInfoEx struct { type ClusterConfigInfoEx struct {
ComputeResourceConfigInfo ComputeResourceConfigInfo
SystemVMsConfig *ClusterSystemVMsConfigInfo `xml:"systemVMsConfig,omitempty"`
DasConfig ClusterDasConfigInfo `xml:"dasConfig"` DasConfig ClusterDasConfigInfo `xml:"dasConfig"`
DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"` DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"`
DrsConfig ClusterDrsConfigInfo `xml:"drsConfig"` DrsConfig ClusterDrsConfigInfo `xml:"drsConfig"`
@ -8393,6 +8460,7 @@ func init() {
type ClusterConfigSpecEx struct { type ClusterConfigSpecEx struct {
ComputeResourceConfigSpec ComputeResourceConfigSpec
SystemVMsConfig *ClusterSystemVMsConfigSpec `xml:"systemVMsConfig,omitempty"`
DasConfig *ClusterDasConfigInfo `xml:"dasConfig,omitempty"` DasConfig *ClusterDasConfigInfo `xml:"dasConfig,omitempty"`
DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"` DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"`
DrsConfig *ClusterDrsConfigInfo `xml:"drsConfig,omitempty"` DrsConfig *ClusterDrsConfigInfo `xml:"drsConfig,omitempty"`
@ -8660,6 +8728,16 @@ func init() {
t["ClusterDasVmSettings"] = reflect.TypeOf((*ClusterDasVmSettings)(nil)).Elem() t["ClusterDasVmSettings"] = reflect.TypeOf((*ClusterDasVmSettings)(nil)).Elem()
} }
type ClusterDatastoreUpdateSpec struct {
ArrayUpdateSpec
Datastore *ManagedObjectReference `xml:"datastore,omitempty"`
}
func init() {
t["ClusterDatastoreUpdateSpec"] = reflect.TypeOf((*ClusterDatastoreUpdateSpec)(nil)).Elem()
}
type ClusterDependencyRuleInfo struct { type ClusterDependencyRuleInfo struct {
ClusterRuleInfo ClusterRuleInfo
@ -9287,6 +9365,40 @@ func init() {
t["ClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem() t["ClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem()
} }
type ClusterSystemVMsConfigInfo struct {
DynamicData
AllowedDatastores []ManagedObjectReference `xml:"allowedDatastores,omitempty"`
NotAllowedDatastores []ManagedObjectReference `xml:"notAllowedDatastores,omitempty"`
DsTagCategoriesToExclude []string `xml:"dsTagCategoriesToExclude,omitempty"`
}
func init() {
t["ClusterSystemVMsConfigInfo"] = reflect.TypeOf((*ClusterSystemVMsConfigInfo)(nil)).Elem()
}
type ClusterSystemVMsConfigSpec struct {
DynamicData
AllowedDatastores []ClusterDatastoreUpdateSpec `xml:"allowedDatastores,omitempty"`
NotAllowedDatastores []ClusterDatastoreUpdateSpec `xml:"notAllowedDatastores,omitempty"`
DsTagCategoriesToExclude []ClusterTagCategoryUpdateSpec `xml:"dsTagCategoriesToExclude,omitempty"`
}
func init() {
t["ClusterSystemVMsConfigSpec"] = reflect.TypeOf((*ClusterSystemVMsConfigSpec)(nil)).Elem()
}
type ClusterTagCategoryUpdateSpec struct {
ArrayUpdateSpec
Category string `xml:"category,omitempty"`
}
func init() {
t["ClusterTagCategoryUpdateSpec"] = reflect.TypeOf((*ClusterTagCategoryUpdateSpec)(nil)).Elem()
}
type ClusterUsageSummary struct { type ClusterUsageSummary struct {
DynamicData DynamicData
@ -9910,6 +10022,25 @@ func init() {
t["ConnectNvmeController"] = reflect.TypeOf((*ConnectNvmeController)(nil)).Elem() t["ConnectNvmeController"] = reflect.TypeOf((*ConnectNvmeController)(nil)).Elem()
} }
type ConnectNvmeControllerExRequestType struct {
This ManagedObjectReference `xml:"_this"`
ConnectSpec []HostNvmeConnectSpec `xml:"connectSpec,omitempty"`
}
func init() {
t["ConnectNvmeControllerExRequestType"] = reflect.TypeOf((*ConnectNvmeControllerExRequestType)(nil)).Elem()
}
type ConnectNvmeControllerEx_Task ConnectNvmeControllerExRequestType
func init() {
t["ConnectNvmeControllerEx_Task"] = reflect.TypeOf((*ConnectNvmeControllerEx_Task)(nil)).Elem()
}
type ConnectNvmeControllerEx_TaskResponse struct {
Returnval ManagedObjectReference `xml:"returnval"`
}
type ConnectNvmeControllerRequestType struct { type ConnectNvmeControllerRequestType struct {
This ManagedObjectReference `xml:"_this"` This ManagedObjectReference `xml:"_this"`
ConnectSpec HostNvmeConnectSpec `xml:"connectSpec"` ConnectSpec HostNvmeConnectSpec `xml:"connectSpec"`
@ -10962,6 +11093,24 @@ type CreateSnapshot_TaskResponse struct {
Returnval ManagedObjectReference `xml:"returnval"` Returnval ManagedObjectReference `xml:"returnval"`
} }
type CreateSoftwareAdapter CreateSoftwareAdapterRequestType
func init() {
t["CreateSoftwareAdapter"] = reflect.TypeOf((*CreateSoftwareAdapter)(nil)).Elem()
}
type CreateSoftwareAdapterRequestType struct {
This ManagedObjectReference `xml:"_this"`
Spec BaseHostHbaCreateSpec `xml:"spec,typeattr"`
}
func init() {
t["CreateSoftwareAdapterRequestType"] = reflect.TypeOf((*CreateSoftwareAdapterRequestType)(nil)).Elem()
}
type CreateSoftwareAdapterResponse struct {
}
type CreateStoragePod CreateStoragePodRequestType type CreateStoragePod CreateStoragePodRequestType
func init() { func init() {
@ -11557,6 +11706,17 @@ func init() {
t["CustomizationAutoIpV6Generator"] = reflect.TypeOf((*CustomizationAutoIpV6Generator)(nil)).Elem() t["CustomizationAutoIpV6Generator"] = reflect.TypeOf((*CustomizationAutoIpV6Generator)(nil)).Elem()
} }
type CustomizationCloudinitPrep struct {
CustomizationIdentitySettings
Metadata string `xml:"metadata"`
Userdata string `xml:"userdata,omitempty"`
}
func init() {
t["CustomizationCloudinitPrep"] = reflect.TypeOf((*CustomizationCloudinitPrep)(nil)).Elem()
}
type CustomizationCustomIpGenerator struct { type CustomizationCustomIpGenerator struct {
CustomizationIpGenerator CustomizationIpGenerator
@ -14351,6 +14511,17 @@ func init() {
t["DeviceUnsupportedForVmVersionFault"] = reflect.TypeOf((*DeviceUnsupportedForVmVersionFault)(nil)).Elem() t["DeviceUnsupportedForVmVersionFault"] = reflect.TypeOf((*DeviceUnsupportedForVmVersionFault)(nil)).Elem()
} }
type DiagnosticManagerAuditRecordResult struct {
DynamicData
Records []string `xml:"records,omitempty"`
NextToken string `xml:"nextToken"`
}
func init() {
t["DiagnosticManagerAuditRecordResult"] = reflect.TypeOf((*DiagnosticManagerAuditRecordResult)(nil)).Elem()
}
type DiagnosticManagerBundleInfo struct { type DiagnosticManagerBundleInfo struct {
DynamicData DynamicData
@ -14683,6 +14854,25 @@ func init() {
t["DisconnectNvmeController"] = reflect.TypeOf((*DisconnectNvmeController)(nil)).Elem() t["DisconnectNvmeController"] = reflect.TypeOf((*DisconnectNvmeController)(nil)).Elem()
} }
type DisconnectNvmeControllerExRequestType struct {
This ManagedObjectReference `xml:"_this"`
DisconnectSpec []HostNvmeDisconnectSpec `xml:"disconnectSpec,omitempty"`
}
func init() {
t["DisconnectNvmeControllerExRequestType"] = reflect.TypeOf((*DisconnectNvmeControllerExRequestType)(nil)).Elem()
}
type DisconnectNvmeControllerEx_Task DisconnectNvmeControllerExRequestType
func init() {
t["DisconnectNvmeControllerEx_Task"] = reflect.TypeOf((*DisconnectNvmeControllerEx_Task)(nil)).Elem()
}
type DisconnectNvmeControllerEx_TaskResponse struct {
Returnval ManagedObjectReference `xml:"returnval"`
}
type DisconnectNvmeControllerRequestType struct { type DisconnectNvmeControllerRequestType struct {
This ManagedObjectReference `xml:"_this"` This ManagedObjectReference `xml:"_this"`
DisconnectSpec HostNvmeDisconnectSpec `xml:"disconnectSpec"` DisconnectSpec HostNvmeDisconnectSpec `xml:"disconnectSpec"`
@ -18509,6 +18699,25 @@ func init() {
t["FeatureRequirementsNotMetFault"] = reflect.TypeOf((*FeatureRequirementsNotMetFault)(nil)).Elem() t["FeatureRequirementsNotMetFault"] = reflect.TypeOf((*FeatureRequirementsNotMetFault)(nil)).Elem()
} }
type FetchAuditRecords FetchAuditRecordsRequestType
func init() {
t["FetchAuditRecords"] = reflect.TypeOf((*FetchAuditRecords)(nil)).Elem()
}
type FetchAuditRecordsRequestType struct {
This ManagedObjectReference `xml:"_this"`
Token string `xml:"token,omitempty"`
}
func init() {
t["FetchAuditRecordsRequestType"] = reflect.TypeOf((*FetchAuditRecordsRequestType)(nil)).Elem()
}
type FetchAuditRecordsResponse struct {
Returnval DiagnosticManagerAuditRecordResult `xml:"returnval"`
}
type FetchDVPortKeys FetchDVPortKeysRequestType type FetchDVPortKeys FetchDVPortKeysRequestType
func init() { func init() {
@ -19758,6 +19967,24 @@ type GetSiteInfoResponse struct {
Returnval SiteInfo `xml:"returnval"` Returnval SiteInfo `xml:"returnval"`
} }
type GetSystemVMsRestrictedDatastores GetSystemVMsRestrictedDatastoresRequestType
func init() {
t["GetSystemVMsRestrictedDatastores"] = reflect.TypeOf((*GetSystemVMsRestrictedDatastores)(nil)).Elem()
}
type GetSystemVMsRestrictedDatastoresRequestType struct {
This ManagedObjectReference `xml:"_this"`
}
func init() {
t["GetSystemVMsRestrictedDatastoresRequestType"] = reflect.TypeOf((*GetSystemVMsRestrictedDatastoresRequestType)(nil)).Elem()
}
type GetSystemVMsRestrictedDatastoresResponse struct {
Returnval []ManagedObjectReference `xml:"returnval,omitempty"`
}
type GetVchaClusterHealth GetVchaClusterHealthRequestType type GetVchaClusterHealth GetVchaClusterHealthRequestType
func init() { func init() {
@ -21176,9 +21403,16 @@ type HostCapability struct {
RemoteDeviceVMotionSupported *bool `xml:"remoteDeviceVMotionSupported"` RemoteDeviceVMotionSupported *bool `xml:"remoteDeviceVMotionSupported"`
MaxSupportedVmMemory int32 `xml:"maxSupportedVmMemory,omitempty"` MaxSupportedVmMemory int32 `xml:"maxSupportedVmMemory,omitempty"`
AhDeviceHintsSupported *bool `xml:"ahDeviceHintsSupported"` AhDeviceHintsSupported *bool `xml:"ahDeviceHintsSupported"`
NvmeOverTcpSupported *bool `xml:"nvmeOverTcpSupported"`
NvmeStorageFabricServicesSupported *bool `xml:"nvmeStorageFabricServicesSupported"`
AssignHwPciConfigSupported *bool `xml:"assignHwPciConfigSupported"` AssignHwPciConfigSupported *bool `xml:"assignHwPciConfigSupported"`
TimeConfigSupported *bool `xml:"timeConfigSupported"`
NvmeBatchOperationsSupported *bool `xml:"nvmeBatchOperationsSupported"`
PMemFailoverSupported *bool `xml:"pMemFailoverSupported"` PMemFailoverSupported *bool `xml:"pMemFailoverSupported"`
HostConfigEncryptionSupported *bool `xml:"hostConfigEncryptionSupported"` HostConfigEncryptionSupported *bool `xml:"hostConfigEncryptionSupported"`
PtpConfigSupported *bool `xml:"ptpConfigSupported"`
MaxSupportedPtpPorts int32 `xml:"maxSupportedPtpPorts,omitempty"`
PMemIndependentSnapshotSupported *bool `xml:"pMemIndependentSnapshotSupported"`
} }
func init() { func init() {
@ -21833,6 +22067,16 @@ func init() {
t["HostDasOkEvent"] = reflect.TypeOf((*HostDasOkEvent)(nil)).Elem() t["HostDasOkEvent"] = reflect.TypeOf((*HostDasOkEvent)(nil)).Elem()
} }
type HostDataTransportConnectionInfo struct {
DynamicData
StaticMemoryConsumed int64 `xml:"staticMemoryConsumed"`
}
func init() {
t["HostDataTransportConnectionInfo"] = reflect.TypeOf((*HostDataTransportConnectionInfo)(nil)).Elem()
}
type HostDatastoreBrowserSearchResults struct { type HostDatastoreBrowserSearchResults struct {
DynamicData DynamicData
@ -21927,8 +22171,14 @@ func init() {
type HostDateTimeConfig struct { type HostDateTimeConfig struct {
DynamicData DynamicData
TimeZone string `xml:"timeZone,omitempty"` TimeZone string `xml:"timeZone,omitempty"`
NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"` NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"`
PtpConfig *HostPtpConfig `xml:"ptpConfig,omitempty"`
Protocol string `xml:"protocol,omitempty"`
Enabled *bool `xml:"enabled"`
DisableEvents *bool `xml:"disableEvents"`
DisableFallback *bool `xml:"disableFallback"`
ResetToFactoryDefaults *bool `xml:"resetToFactoryDefaults"`
} }
func init() { func init() {
@ -21941,12 +22191,35 @@ type HostDateTimeInfo struct {
TimeZone HostDateTimeSystemTimeZone `xml:"timeZone"` TimeZone HostDateTimeSystemTimeZone `xml:"timeZone"`
SystemClockProtocol string `xml:"systemClockProtocol,omitempty"` SystemClockProtocol string `xml:"systemClockProtocol,omitempty"`
NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"` NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"`
PtpConfig *HostPtpConfig `xml:"ptpConfig,omitempty"`
Enabled *bool `xml:"enabled"`
DisableEvents *bool `xml:"disableEvents"`
DisableFallback *bool `xml:"disableFallback"`
InFallbackState *bool `xml:"inFallbackState"`
ServiceSync *bool `xml:"serviceSync"`
LastSyncTime *time.Time `xml:"lastSyncTime"`
RemoteNtpServer string `xml:"remoteNtpServer,omitempty"`
NtpRunTime int64 `xml:"ntpRunTime,omitempty"`
PtpRunTime int64 `xml:"ptpRunTime,omitempty"`
NtpDuration string `xml:"ntpDuration,omitempty"`
PtpDuration string `xml:"ptpDuration,omitempty"`
} }
func init() { func init() {
t["HostDateTimeInfo"] = reflect.TypeOf((*HostDateTimeInfo)(nil)).Elem() t["HostDateTimeInfo"] = reflect.TypeOf((*HostDateTimeInfo)(nil)).Elem()
} }
type HostDateTimeSystemServiceTestResult struct {
DynamicData
WorkingNormally bool `xml:"workingNormally"`
Report []string `xml:"report,omitempty"`
}
func init() {
t["HostDateTimeSystemServiceTestResult"] = reflect.TypeOf((*HostDateTimeSystemServiceTestResult)(nil)).Elem()
}
type HostDateTimeSystemTimeZone struct { type HostDateTimeSystemTimeZone struct {
DynamicData DynamicData
@ -22794,6 +23067,8 @@ type HostHardwareInfo struct {
PersistentMemoryInfo *HostPersistentMemoryInfo `xml:"persistentMemoryInfo,omitempty"` PersistentMemoryInfo *HostPersistentMemoryInfo `xml:"persistentMemoryInfo,omitempty"`
SgxInfo *HostSgxInfo `xml:"sgxInfo,omitempty"` SgxInfo *HostSgxInfo `xml:"sgxInfo,omitempty"`
SevInfo *HostSevInfo `xml:"sevInfo,omitempty"` SevInfo *HostSevInfo `xml:"sevInfo,omitempty"`
MemoryTieringType string `xml:"memoryTieringType,omitempty"`
MemoryTierInfo []HostMemoryTierInfo `xml:"memoryTierInfo,omitempty"`
} }
func init() { func init() {
@ -22851,6 +23126,14 @@ func init() {
t["HostHasComponentFailureFault"] = reflect.TypeOf((*HostHasComponentFailureFault)(nil)).Elem() t["HostHasComponentFailureFault"] = reflect.TypeOf((*HostHasComponentFailureFault)(nil)).Elem()
} }
type HostHbaCreateSpec struct {
DynamicData
}
func init() {
t["HostHbaCreateSpec"] = reflect.TypeOf((*HostHbaCreateSpec)(nil)).Elem()
}
type HostHostBusAdapter struct { type HostHostBusAdapter struct {
DynamicData DynamicData
@ -23791,6 +24074,19 @@ func init() {
t["HostMemorySpec"] = reflect.TypeOf((*HostMemorySpec)(nil)).Elem() t["HostMemorySpec"] = reflect.TypeOf((*HostMemorySpec)(nil)).Elem()
} }
type HostMemoryTierInfo struct {
DynamicData
Name string `xml:"name"`
Type string `xml:"type"`
Flags []string `xml:"flags,omitempty"`
Size int64 `xml:"size"`
}
func init() {
t["HostMemoryTierInfo"] = reflect.TypeOf((*HostMemoryTierInfo)(nil)).Elem()
}
type HostMissingNetworksEvent struct { type HostMissingNetworksEvent struct {
HostDasEvent HostDasEvent
@ -24242,6 +24538,16 @@ func init() {
t["HostNewNetworkConnectInfo"] = reflect.TypeOf((*HostNewNetworkConnectInfo)(nil)).Elem() t["HostNewNetworkConnectInfo"] = reflect.TypeOf((*HostNewNetworkConnectInfo)(nil)).Elem()
} }
type HostNfcConnectionInfo struct {
HostDataTransportConnectionInfo
StreamingMemoryConsumed int64 `xml:"streamingMemoryConsumed,omitempty"`
}
func init() {
t["HostNfcConnectionInfo"] = reflect.TypeOf((*HostNfcConnectionInfo)(nil)).Elem()
}
type HostNicFailureCriteria struct { type HostNicFailureCriteria struct {
DynamicData DynamicData
@ -24460,7 +24766,8 @@ func init() {
type HostNvmeDiscoverSpec struct { type HostNvmeDiscoverSpec struct {
HostNvmeSpec HostNvmeSpec
AutoConnect *bool `xml:"autoConnect"` AutoConnect *bool `xml:"autoConnect"`
RootDiscoveryController *bool `xml:"rootDiscoveryController"`
} }
func init() { func init() {
@ -24546,6 +24853,18 @@ func init() {
t["HostNvmeOverRdmaParameters"] = reflect.TypeOf((*HostNvmeOverRdmaParameters)(nil)).Elem() t["HostNvmeOverRdmaParameters"] = reflect.TypeOf((*HostNvmeOverRdmaParameters)(nil)).Elem()
} }
type HostNvmeOverTcpParameters struct {
HostNvmeTransportParameters
Address string `xml:"address"`
PortNumber int32 `xml:"portNumber,omitempty"`
DigestVerification string `xml:"digestVerification,omitempty"`
}
func init() {
t["HostNvmeOverTcpParameters"] = reflect.TypeOf((*HostNvmeOverTcpParameters)(nil)).Elem()
}
type HostNvmeSpec struct { type HostNvmeSpec struct {
DynamicData DynamicData
@ -25302,6 +25621,41 @@ func init() {
t["HostProxySwitchSpec"] = reflect.TypeOf((*HostProxySwitchSpec)(nil)).Elem() t["HostProxySwitchSpec"] = reflect.TypeOf((*HostProxySwitchSpec)(nil)).Elem()
} }
type HostPtpConfig struct {
DynamicData
Domain int32 `xml:"domain,omitempty"`
Port []HostPtpConfigPtpPort `xml:"port,omitempty"`
}
func init() {
t["HostPtpConfig"] = reflect.TypeOf((*HostPtpConfig)(nil)).Elem()
}
type HostPtpConfigPtpPort struct {
DynamicData
Index int32 `xml:"index"`
DeviceType string `xml:"deviceType,omitempty"`
Device string `xml:"device,omitempty"`
IpConfig *HostIpConfig `xml:"ipConfig,omitempty"`
}
func init() {
t["HostPtpConfigPtpPort"] = reflect.TypeOf((*HostPtpConfigPtpPort)(nil)).Elem()
}
type HostQualifiedName struct {
DynamicData
Value string `xml:"value"`
Type string `xml:"type"`
}
func init() {
t["HostQualifiedName"] = reflect.TypeOf((*HostQualifiedName)(nil)).Elem()
}
type HostRdmaDevice struct { type HostRdmaDevice struct {
DynamicData DynamicData
@ -25634,6 +25988,7 @@ type HostRuntimeInfo struct {
CryptoState string `xml:"cryptoState,omitempty"` CryptoState string `xml:"cryptoState,omitempty"`
CryptoKeyId *CryptoKeyId `xml:"cryptoKeyId,omitempty"` CryptoKeyId *CryptoKeyId `xml:"cryptoKeyId,omitempty"`
StatelessNvdsMigrationReady string `xml:"statelessNvdsMigrationReady,omitempty"` StatelessNvdsMigrationReady string `xml:"statelessNvdsMigrationReady,omitempty"`
StateEncryption *HostRuntimeInfoStateEncryptionInfo `xml:"stateEncryption,omitempty"`
} }
func init() { func init() {
@ -25665,6 +26020,18 @@ func init() {
t["HostRuntimeInfoNetworkRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetworkRuntimeInfo)(nil)).Elem() t["HostRuntimeInfoNetworkRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetworkRuntimeInfo)(nil)).Elem()
} }
type HostRuntimeInfoStateEncryptionInfo struct {
DynamicData
ProtectionMode string `xml:"protectionMode"`
RequireSecureBoot *bool `xml:"requireSecureBoot"`
RequireExecInstalledOnly *bool `xml:"requireExecInstalledOnly"`
}
func init() {
t["HostRuntimeInfoStateEncryptionInfo"] = reflect.TypeOf((*HostRuntimeInfoStateEncryptionInfo)(nil)).Elem()
}
type HostScheduleReconcileDatastoreInventory HostScheduleReconcileDatastoreInventoryRequestType type HostScheduleReconcileDatastoreInventory HostScheduleReconcileDatastoreInventoryRequestType
func init() { func init() {
@ -26288,6 +26655,7 @@ type HostSystemInfo struct {
Uuid string `xml:"uuid"` Uuid string `xml:"uuid"`
OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"` OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"`
SerialNumber string `xml:"serialNumber,omitempty"` SerialNumber string `xml:"serialNumber,omitempty"`
QualifiedName []HostQualifiedName `xml:"qualifiedName,omitempty"`
} }
func init() { func init() {
@ -26389,6 +26757,34 @@ func init() {
t["HostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem() t["HostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem()
} }
type HostTcpHba struct {
HostHostBusAdapter
AssociatedPnic string `xml:"associatedPnic,omitempty"`
}
func init() {
t["HostTcpHba"] = reflect.TypeOf((*HostTcpHba)(nil)).Elem()
}
type HostTcpHbaCreateSpec struct {
HostHbaCreateSpec
Pnic string `xml:"pnic"`
}
func init() {
t["HostTcpHbaCreateSpec"] = reflect.TypeOf((*HostTcpHbaCreateSpec)(nil)).Elem()
}
type HostTcpTargetTransport struct {
HostTargetTransport
}
func init() {
t["HostTcpTargetTransport"] = reflect.TypeOf((*HostTcpTargetTransport)(nil)).Elem()
}
type HostTpmAttestationInfo struct { type HostTpmAttestationInfo struct {
DynamicData DynamicData
@ -41754,6 +42150,24 @@ type RemoveSnapshot_TaskResponse struct {
Returnval ManagedObjectReference `xml:"returnval"` Returnval ManagedObjectReference `xml:"returnval"`
} }
type RemoveSoftwareAdapter RemoveSoftwareAdapterRequestType
func init() {
t["RemoveSoftwareAdapter"] = reflect.TypeOf((*RemoveSoftwareAdapter)(nil)).Elem()
}
type RemoveSoftwareAdapterRequestType struct {
This ManagedObjectReference `xml:"_this"`
HbaDeviceName string `xml:"hbaDeviceName"`
}
func init() {
t["RemoveSoftwareAdapterRequestType"] = reflect.TypeOf((*RemoveSoftwareAdapterRequestType)(nil)).Elem()
}
type RemoveSoftwareAdapterResponse struct {
}
type RemoveUser RemoveUserRequestType type RemoveUser RemoveUserRequestType
func init() { func init() {
@ -46821,6 +47235,24 @@ func init() {
type TerminateVMResponse struct { type TerminateVMResponse struct {
} }
type TestTimeService TestTimeServiceRequestType
func init() {
t["TestTimeService"] = reflect.TypeOf((*TestTimeService)(nil)).Elem()
}
type TestTimeServiceRequestType struct {
This ManagedObjectReference `xml:"_this"`
}
func init() {
t["TestTimeServiceRequestType"] = reflect.TypeOf((*TestTimeServiceRequestType)(nil)).Elem()
}
type TestTimeServiceResponse struct {
Returnval *HostDateTimeSystemServiceTestResult `xml:"returnval,omitempty"`
}
type ThirdPartyLicenseAssignmentFailed struct { type ThirdPartyLicenseAssignmentFailed struct {
RuntimeFault RuntimeFault
@ -48164,25 +48596,6 @@ func init() {
type UpdateGraphicsConfigResponse struct { 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 type UpdateHostImageAcceptanceLevel UpdateHostImageAcceptanceLevelRequestType
func init() { func init() {
@ -51310,11 +51723,12 @@ func init() {
type VirtualDeviceConfigSpec struct { type VirtualDeviceConfigSpec struct {
DynamicData DynamicData
Operation VirtualDeviceConfigSpecOperation `xml:"operation,omitempty"` Operation VirtualDeviceConfigSpecOperation `xml:"operation,omitempty"`
FileOperation VirtualDeviceConfigSpecFileOperation `xml:"fileOperation,omitempty"` FileOperation VirtualDeviceConfigSpecFileOperation `xml:"fileOperation,omitempty"`
Device BaseVirtualDevice `xml:"device,typeattr"` Device BaseVirtualDevice `xml:"device,typeattr"`
Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
Backing *VirtualDeviceConfigSpecBackingSpec `xml:"backing,omitempty"` Backing *VirtualDeviceConfigSpecBackingSpec `xml:"backing,omitempty"`
FilterSpec []BaseVirtualMachineBaseIndependentFilterSpec `xml:"filterSpec,omitempty,typeattr"`
} }
func init() { func init() {
@ -51494,15 +51908,16 @@ func init() {
type VirtualDisk struct { type VirtualDisk struct {
VirtualDevice VirtualDevice
CapacityInKB int64 `xml:"capacityInKB"` CapacityInKB int64 `xml:"capacityInKB"`
CapacityInBytes int64 `xml:"capacityInBytes,omitempty"` CapacityInBytes int64 `xml:"capacityInBytes,omitempty"`
Shares *SharesInfo `xml:"shares,omitempty"` Shares *SharesInfo `xml:"shares,omitempty"`
StorageIOAllocation *StorageIOAllocationInfo `xml:"storageIOAllocation,omitempty"` StorageIOAllocation *StorageIOAllocationInfo `xml:"storageIOAllocation,omitempty"`
DiskObjectId string `xml:"diskObjectId,omitempty"` DiskObjectId string `xml:"diskObjectId,omitempty"`
VFlashCacheConfigInfo *VirtualDiskVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"` VFlashCacheConfigInfo *VirtualDiskVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"`
Iofilter []string `xml:"iofilter,omitempty"` Iofilter []string `xml:"iofilter,omitempty"`
VDiskId *ID `xml:"vDiskId,omitempty"` VDiskId *ID `xml:"vDiskId,omitempty"`
NativeUnmanagedLinkedClone *bool `xml:"nativeUnmanagedLinkedClone"` NativeUnmanagedLinkedClone *bool `xml:"nativeUnmanagedLinkedClone"`
IndependentFilters []BaseVirtualMachineBaseIndependentFilterSpec `xml:"independentFilters,omitempty,typeattr"`
} }
func init() { func init() {
@ -52318,6 +52733,14 @@ func init() {
t["VirtualMachineAffinityInfo"] = reflect.TypeOf((*VirtualMachineAffinityInfo)(nil)).Elem() t["VirtualMachineAffinityInfo"] = reflect.TypeOf((*VirtualMachineAffinityInfo)(nil)).Elem()
} }
type VirtualMachineBaseIndependentFilterSpec struct {
DynamicData
}
func init() {
t["VirtualMachineBaseIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineBaseIndependentFilterSpec)(nil)).Elem()
}
type VirtualMachineBootOptions struct { type VirtualMachineBootOptions struct {
DynamicData DynamicData
@ -52534,6 +52957,7 @@ type VirtualMachineConfigInfo struct {
GuestMonitoringModeInfo *VirtualMachineGuestMonitoringModeInfo `xml:"guestMonitoringModeInfo,omitempty"` GuestMonitoringModeInfo *VirtualMachineGuestMonitoringModeInfo `xml:"guestMonitoringModeInfo,omitempty"`
SevEnabled *bool `xml:"sevEnabled"` SevEnabled *bool `xml:"sevEnabled"`
PmemFailoverEnabled *bool `xml:"pmemFailoverEnabled"` PmemFailoverEnabled *bool `xml:"pmemFailoverEnabled"`
Pmem *VirtualMachineVirtualPMem `xml:"pmem,omitempty"`
} }
func init() { func init() {
@ -52668,6 +53092,7 @@ type VirtualMachineConfigSpec struct {
GuestMonitoringModeInfo *VirtualMachineGuestMonitoringModeInfo `xml:"guestMonitoringModeInfo,omitempty"` GuestMonitoringModeInfo *VirtualMachineGuestMonitoringModeInfo `xml:"guestMonitoringModeInfo,omitempty"`
SevEnabled *bool `xml:"sevEnabled"` SevEnabled *bool `xml:"sevEnabled"`
PmemFailoverEnabled *bool `xml:"pmemFailoverEnabled"` PmemFailoverEnabled *bool `xml:"pmemFailoverEnabled"`
Pmem *VirtualMachineVirtualPMem `xml:"pmem,omitempty"`
} }
func init() { func init() {
@ -52887,6 +53312,14 @@ func init() {
t["VirtualMachineDynamicPassthroughInfo"] = reflect.TypeOf((*VirtualMachineDynamicPassthroughInfo)(nil)).Elem() t["VirtualMachineDynamicPassthroughInfo"] = reflect.TypeOf((*VirtualMachineDynamicPassthroughInfo)(nil)).Elem()
} }
type VirtualMachineEmptyIndependentFilterSpec struct {
VirtualMachineBaseIndependentFilterSpec
}
func init() {
t["VirtualMachineEmptyIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineEmptyIndependentFilterSpec)(nil)).Elem()
}
type VirtualMachineEmptyProfileSpec struct { type VirtualMachineEmptyProfileSpec struct {
VirtualMachineProfileSpec VirtualMachineProfileSpec
} }
@ -53148,6 +53581,18 @@ func init() {
t["VirtualMachineImportSpec"] = reflect.TypeOf((*VirtualMachineImportSpec)(nil)).Elem() t["VirtualMachineImportSpec"] = reflect.TypeOf((*VirtualMachineImportSpec)(nil)).Elem()
} }
type VirtualMachineIndependentFilterSpec struct {
VirtualMachineBaseIndependentFilterSpec
FilterName string `xml:"filterName"`
FilterClass string `xml:"filterClass,omitempty"`
FilterCapabilities []KeyValue `xml:"filterCapabilities,omitempty"`
}
func init() {
t["VirtualMachineIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineIndependentFilterSpec)(nil)).Elem()
}
type VirtualMachineInstantCloneSpec struct { type VirtualMachineInstantCloneSpec struct {
DynamicData DynamicData
@ -53403,34 +53848,47 @@ func init() {
type VirtualMachineQuickStats struct { type VirtualMachineQuickStats struct {
DynamicData DynamicData
OverallCpuUsage int32 `xml:"overallCpuUsage,omitempty"` OverallCpuUsage int32 `xml:"overallCpuUsage,omitempty"`
OverallCpuDemand int32 `xml:"overallCpuDemand,omitempty"` OverallCpuDemand int32 `xml:"overallCpuDemand,omitempty"`
OverallCpuReadiness int32 `xml:"overallCpuReadiness,omitempty"` OverallCpuReadiness int32 `xml:"overallCpuReadiness,omitempty"`
GuestMemoryUsage int32 `xml:"guestMemoryUsage,omitempty"` GuestMemoryUsage int32 `xml:"guestMemoryUsage,omitempty"`
HostMemoryUsage int32 `xml:"hostMemoryUsage,omitempty"` HostMemoryUsage int32 `xml:"hostMemoryUsage,omitempty"`
GuestHeartbeatStatus ManagedEntityStatus `xml:"guestHeartbeatStatus"` GuestHeartbeatStatus ManagedEntityStatus `xml:"guestHeartbeatStatus"`
DistributedCpuEntitlement int32 `xml:"distributedCpuEntitlement,omitempty"` DistributedCpuEntitlement int32 `xml:"distributedCpuEntitlement,omitempty"`
DistributedMemoryEntitlement int32 `xml:"distributedMemoryEntitlement,omitempty"` DistributedMemoryEntitlement int32 `xml:"distributedMemoryEntitlement,omitempty"`
StaticCpuEntitlement int32 `xml:"staticCpuEntitlement,omitempty"` StaticCpuEntitlement int32 `xml:"staticCpuEntitlement,omitempty"`
StaticMemoryEntitlement int32 `xml:"staticMemoryEntitlement,omitempty"` StaticMemoryEntitlement int32 `xml:"staticMemoryEntitlement,omitempty"`
GrantedMemory int32 `xml:"grantedMemory,omitempty"` GrantedMemory int32 `xml:"grantedMemory,omitempty"`
PrivateMemory int32 `xml:"privateMemory,omitempty"` PrivateMemory int32 `xml:"privateMemory,omitempty"`
SharedMemory int32 `xml:"sharedMemory,omitempty"` SharedMemory int32 `xml:"sharedMemory,omitempty"`
SwappedMemory int32 `xml:"swappedMemory,omitempty"` SwappedMemory int32 `xml:"swappedMemory,omitempty"`
BalloonedMemory int32 `xml:"balloonedMemory,omitempty"` BalloonedMemory int32 `xml:"balloonedMemory,omitempty"`
ConsumedOverheadMemory int32 `xml:"consumedOverheadMemory,omitempty"` ConsumedOverheadMemory int32 `xml:"consumedOverheadMemory,omitempty"`
FtLogBandwidth int32 `xml:"ftLogBandwidth,omitempty"` FtLogBandwidth int32 `xml:"ftLogBandwidth,omitempty"`
FtSecondaryLatency int32 `xml:"ftSecondaryLatency,omitempty"` FtSecondaryLatency int32 `xml:"ftSecondaryLatency,omitempty"`
FtLatencyStatus ManagedEntityStatus `xml:"ftLatencyStatus,omitempty"` FtLatencyStatus ManagedEntityStatus `xml:"ftLatencyStatus,omitempty"`
CompressedMemory int64 `xml:"compressedMemory,omitempty"` CompressedMemory int64 `xml:"compressedMemory,omitempty"`
UptimeSeconds int32 `xml:"uptimeSeconds,omitempty"` UptimeSeconds int32 `xml:"uptimeSeconds,omitempty"`
SsdSwappedMemory int64 `xml:"ssdSwappedMemory,omitempty"` SsdSwappedMemory int64 `xml:"ssdSwappedMemory,omitempty"`
ActiveMemory int32 `xml:"activeMemory,omitempty"`
MemoryTierStats []VirtualMachineQuickStatsMemoryTierStats `xml:"memoryTierStats,omitempty"`
} }
func init() { func init() {
t["VirtualMachineQuickStats"] = reflect.TypeOf((*VirtualMachineQuickStats)(nil)).Elem() t["VirtualMachineQuickStats"] = reflect.TypeOf((*VirtualMachineQuickStats)(nil)).Elem()
} }
type VirtualMachineQuickStatsMemoryTierStats struct {
DynamicData
MemoryTierType string `xml:"memoryTierType"`
ReadBandwidth int64 `xml:"readBandwidth"`
}
func init() {
t["VirtualMachineQuickStatsMemoryTierStats"] = reflect.TypeOf((*VirtualMachineQuickStatsMemoryTierStats)(nil)).Elem()
}
type VirtualMachineRelocateSpec struct { type VirtualMachineRelocateSpec struct {
DynamicData DynamicData
@ -53460,6 +53918,7 @@ type VirtualMachineRelocateSpecDiskLocator struct {
DiskBackingInfo BaseVirtualDeviceBackingInfo `xml:"diskBackingInfo,omitempty,typeattr"` DiskBackingInfo BaseVirtualDeviceBackingInfo `xml:"diskBackingInfo,omitempty,typeattr"`
Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"`
Backing *VirtualMachineRelocateSpecDiskLocatorBackingSpec `xml:"backing,omitempty"` Backing *VirtualMachineRelocateSpecDiskLocatorBackingSpec `xml:"backing,omitempty"`
FilterSpec []BaseVirtualMachineBaseIndependentFilterSpec `xml:"filterSpec,omitempty,typeattr"`
} }
func init() { func init() {
@ -53859,6 +54318,16 @@ func init() {
t["VirtualMachineVideoCard"] = reflect.TypeOf((*VirtualMachineVideoCard)(nil)).Elem() t["VirtualMachineVideoCard"] = reflect.TypeOf((*VirtualMachineVideoCard)(nil)).Elem()
} }
type VirtualMachineVirtualPMem struct {
DynamicData
SnapshotMode string `xml:"snapshotMode,omitempty"`
}
func init() {
t["VirtualMachineVirtualPMem"] = reflect.TypeOf((*VirtualMachineVirtualPMem)(nil)).Elem()
}
type VirtualMachineWindowsQuiesceSpec struct { type VirtualMachineWindowsQuiesceSpec struct {
VirtualMachineGuestQuiesceSpec VirtualMachineGuestQuiesceSpec

View file

@ -0,0 +1,117 @@
/*
Copyright (c) 2022 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES 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 ArrayOfPlaceVmsXClusterResultPlacementFaults struct {
PlaceVmsXClusterResultPlacementFaults []PlaceVmsXClusterResultPlacementFaults `xml:"PlaceVmsXClusterResultPlacementFaults,omitempty"`
}
func init() {
t["ArrayOfPlaceVmsXClusterResultPlacementFaults"] = reflect.TypeOf((*ArrayOfPlaceVmsXClusterResultPlacementFaults)(nil)).Elem()
}
type ArrayOfPlaceVmsXClusterResultPlacementInfo struct {
PlaceVmsXClusterResultPlacementInfo []PlaceVmsXClusterResultPlacementInfo `xml:"PlaceVmsXClusterResultPlacementInfo,omitempty"`
}
func init() {
t["ArrayOfPlaceVmsXClusterResultPlacementInfo"] = reflect.TypeOf((*ArrayOfPlaceVmsXClusterResultPlacementInfo)(nil)).Elem()
}
type ArrayOfPlaceVmsXClusterSpecVmPlacementSpec struct {
PlaceVmsXClusterSpecVmPlacementSpec []PlaceVmsXClusterSpecVmPlacementSpec `xml:"PlaceVmsXClusterSpecVmPlacementSpec,omitempty"`
}
func init() {
t["ArrayOfPlaceVmsXClusterSpecVmPlacementSpec"] = reflect.TypeOf((*ArrayOfPlaceVmsXClusterSpecVmPlacementSpec)(nil)).Elem()
}
type PlaceVmsXCluster PlaceVmsXClusterRequestType
func init() {
t["PlaceVmsXCluster"] = reflect.TypeOf((*PlaceVmsXCluster)(nil)).Elem()
}
type PlaceVmsXClusterRequestType struct {
This ManagedObjectReference `xml:"_this"`
PlacementSpec PlaceVmsXClusterSpec `xml:"placementSpec"`
}
func init() {
t["PlaceVmsXClusterRequestType"] = reflect.TypeOf((*PlaceVmsXClusterRequestType)(nil)).Elem()
}
type PlaceVmsXClusterResponse struct {
Returnval PlaceVmsXClusterResult `xml:"returnval"`
}
type PlaceVmsXClusterResult struct {
DynamicData
PlacementInfos []PlaceVmsXClusterResultPlacementInfo `xml:"placementInfos,omitempty"`
Faults []PlaceVmsXClusterResultPlacementFaults `xml:"faults,omitempty"`
}
func init() {
t["PlaceVmsXClusterResult"] = reflect.TypeOf((*PlaceVmsXClusterResult)(nil)).Elem()
}
type PlaceVmsXClusterResultPlacementFaults struct {
DynamicData
ResourcePool ManagedObjectReference `xml:"resourcePool"`
VmName string `xml:"vmName"`
Faults []LocalizedMethodFault `xml:"faults,omitempty"`
}
func init() {
t["PlaceVmsXClusterResultPlacementFaults"] = reflect.TypeOf((*PlaceVmsXClusterResultPlacementFaults)(nil)).Elem()
}
type PlaceVmsXClusterResultPlacementInfo struct {
DynamicData
VmName string `xml:"vmName"`
Recommendation ClusterRecommendation `xml:"recommendation"`
}
func init() {
t["PlaceVmsXClusterResultPlacementInfo"] = reflect.TypeOf((*PlaceVmsXClusterResultPlacementInfo)(nil)).Elem()
}
type PlaceVmsXClusterSpec struct {
DynamicData
ResourcePools []ManagedObjectReference `xml:"resourcePools,omitempty"`
VmPlacementSpecs []PlaceVmsXClusterSpecVmPlacementSpec `xml:"vmPlacementSpecs,omitempty"`
}
func init() {
t["PlaceVmsXClusterSpec"] = reflect.TypeOf((*PlaceVmsXClusterSpec)(nil)).Elem()
}
type PlaceVmsXClusterSpecVmPlacementSpec struct {
DynamicData
ConfigSpec VirtualMachineConfigSpec `xml:"configSpec"`
}
func init() {
t["PlaceVmsXClusterSpecVmPlacementSpec"] = reflect.TypeOf((*PlaceVmsXClusterSpecVmPlacementSpec)(nil)).Elem()
}

3
vendor/modules.txt vendored
View file

@ -412,7 +412,7 @@ github.com/ubccr/kerby/khttp
github.com/valyala/bytebufferpool github.com/valyala/bytebufferpool
# github.com/valyala/fasttemplate v1.2.1 # github.com/valyala/fasttemplate v1.2.1
github.com/valyala/fasttemplate github.com/valyala/fasttemplate
# github.com/vmware/govmomi v0.26.1 # github.com/vmware/govmomi v0.27.4
## explicit ## explicit
github.com/vmware/govmomi/cns github.com/vmware/govmomi/cns
github.com/vmware/govmomi/cns/methods github.com/vmware/govmomi/cns/methods
@ -427,6 +427,7 @@ github.com/vmware/govmomi/govc/vm
github.com/vmware/govmomi/govc/vm/guest github.com/vmware/govmomi/govc/vm/guest
github.com/vmware/govmomi/guest github.com/vmware/govmomi/guest
github.com/vmware/govmomi/guest/toolbox github.com/vmware/govmomi/guest/toolbox
github.com/vmware/govmomi/history
github.com/vmware/govmomi/internal github.com/vmware/govmomi/internal
github.com/vmware/govmomi/list github.com/vmware/govmomi/list
github.com/vmware/govmomi/nfc github.com/vmware/govmomi/nfc