Fix for Support selection of datastore for dynamic provisioning in vSphere

This commit is contained in:
Balu Dontu
2017-02-16 16:12:01 -08:00
committed by Ritesh H Shukla
parent b201ac2f8f
commit 12f75f0b86
83 changed files with 8640 additions and 504 deletions

View File

@@ -17,12 +17,12 @@ limitations under the License.
package vim25
import (
"context"
"encoding/json"
"github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/soap"
"github.com/vmware/govmomi/vim25/types"
"golang.org/x/net/context"
)
// Client is a tiny wrapper around the vim25/soap Client that stores session

View File

@@ -17,9 +17,10 @@ limitations under the License.
package methods
import (
"context"
"github.com/vmware/govmomi/vim25/soap"
"github.com/vmware/govmomi/vim25/types"
"golang.org/x/net/context"
)
type RetrieveDynamicTypeManagerBody struct {

File diff suppressed because it is too large Load Diff

View File

@@ -17,21 +17,21 @@ limitations under the License.
package methods
import (
"context"
"time"
"github.com/vmware/govmomi/vim25/soap"
"github.com/vmware/govmomi/vim25/types"
"golang.org/x/net/context"
)
var serviceInstance = types.ManagedObjectReference{
var ServiceInstance = types.ManagedObjectReference{
Type: "ServiceInstance",
Value: "ServiceInstance",
}
func GetServiceContent(ctx context.Context, r soap.RoundTripper) (types.ServiceContent, error) {
req := types.RetrieveServiceContent{
This: serviceInstance,
This: ServiceInstance,
}
res, err := RetrieveServiceContent(ctx, r, &req)
@@ -44,7 +44,7 @@ func GetServiceContent(ctx context.Context, r soap.RoundTripper) (types.ServiceC
func GetCurrentTime(ctx context.Context, r soap.RoundTripper) (*time.Time, error) {
req := types.CurrentTime{
This: serviceInstance,
This: ServiceInstance,
}
res, err := CurrentTime(ctx, r, &req)

View File

@@ -17,11 +17,11 @@ limitations under the License.
package mo
import (
"context"
"fmt"
"github.com/vmware/govmomi/vim25/soap"
"github.com/vmware/govmomi/vim25/types"
"golang.org/x/net/context"
)
// Ancestors returns the entire ancestry tree of a specified managed object.
@@ -39,13 +39,28 @@ func Ancestors(ctx context.Context, rt soap.RoundTripper, pc, obj types.ManagedO
&types.SelectionSpec{Name: "traverseParent"},
},
},
&types.TraversalSpec{
SelectionSpec: types.SelectionSpec{},
Type: "VirtualMachine",
Path: "parentVApp",
Skip: types.NewBool(false),
SelectSet: []types.BaseSelectionSpec{
&types.SelectionSpec{Name: "traverseParent"},
},
},
},
Skip: types.NewBool(false),
}
pspec := types.PropertySpec{
Type: "ManagedEntity",
PathSet: []string{"name", "parent"},
pspec := []types.PropertySpec{
{
Type: "ManagedEntity",
PathSet: []string{"name", "parent"},
},
{
Type: "VirtualMachine",
PathSet: []string{"parentVApp"},
},
}
req := types.RetrieveProperties{
@@ -53,13 +68,12 @@ func Ancestors(ctx context.Context, rt soap.RoundTripper, pc, obj types.ManagedO
SpecSet: []types.PropertyFilterSpec{
{
ObjectSet: []types.ObjectSpec{ospec},
PropSet: []types.PropertySpec{pspec},
PropSet: pspec,
},
},
}
var ifaces []interface{}
err := RetrievePropertiesForRequest(ctx, rt, req, &ifaces)
if err != nil {
return nil, err
@@ -96,6 +110,15 @@ func Ancestors(ctx context.Context, rt soap.RoundTripper, pc, obj types.ManagedO
}
}
if me.Parent == nil {
// Special case for VirtualMachine within VirtualApp,
// unlikely to hit this other than via Finder.Element()
switch x := iface.(type) {
case VirtualMachine:
me.Parent = x.ParentVApp
}
}
if me.Parent == nil {
out = append(out, me)
break

View File

@@ -984,6 +984,18 @@ func init() {
t["HttpNfcLease"] = reflect.TypeOf((*HttpNfcLease)(nil)).Elem()
}
type InternalDynamicTypeManager struct {
Self types.ManagedObjectReference
}
func (m InternalDynamicTypeManager) Reference() types.ManagedObjectReference {
return m.Self
}
func init() {
t["InternalDynamicTypeManager"] = reflect.TypeOf((*InternalDynamicTypeManager)(nil)).Elem()
}
type InventoryView struct {
ManagedObjectView
}
@@ -1290,6 +1302,18 @@ func init() {
t["PropertyFilter"] = reflect.TypeOf((*PropertyFilter)(nil)).Elem()
}
type ReflectManagedMethodExecuter struct {
Self types.ManagedObjectReference
}
func (m ReflectManagedMethodExecuter) Reference() types.ManagedObjectReference {
return m.Self
}
func init() {
t["ReflectManagedMethodExecuter"] = reflect.TypeOf((*ReflectManagedMethodExecuter)(nil)).Elem()
}
type ResourcePlanningManager struct {
Self types.ManagedObjectReference
}
@@ -1496,18 +1520,6 @@ func init() {
t["UserDirectory"] = reflect.TypeOf((*UserDirectory)(nil)).Elem()
}
type VRPResourceManager struct {
Self types.ManagedObjectReference
}
func (m VRPResourceManager) Reference() types.ManagedObjectReference {
return m.Self
}
func init() {
t["VRPResourceManager"] = reflect.TypeOf((*VRPResourceManager)(nil)).Elem()
}
type View struct {
Self types.ManagedObjectReference
}

View File

@@ -17,12 +17,12 @@ limitations under the License.
package mo
import (
"context"
"reflect"
"github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/soap"
"github.com/vmware/govmomi/vim25/types"
"golang.org/x/net/context"
)
func ignoreMissingProperty(ref types.ManagedObjectReference, p types.MissingProperty) bool {

View File

@@ -17,12 +17,12 @@ limitations under the License.
package vim25
import (
"context"
"net"
"net/url"
"time"
"github.com/vmware/govmomi/vim25/soap"
"golang.org/x/net/context"
)
type RetryFunc func(err error) (retry bool, delay time.Duration)

View File

@@ -17,25 +17,31 @@ limitations under the License.
package soap
import (
"bufio"
"bytes"
"context"
"crypto/sha1"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/cookiejar"
"net/url"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"time"
"github.com/vmware/govmomi/vim25/progress"
"github.com/vmware/govmomi/vim25/types"
"github.com/vmware/govmomi/vim25/xml"
"golang.org/x/net/context"
)
type HasFault interface {
@@ -46,8 +52,11 @@ type RoundTripper interface {
RoundTrip(ctx context.Context, req, res HasFault) error
}
var DefaultVimNamespace = "urn:vim25"
var DefaultVimVersion = "6.0"
const (
DefaultVimNamespace = "urn:vim25"
DefaultVimVersion = "6.5"
DefaultMinVimVersion = "5.5"
)
type Client struct {
http.Client
@@ -58,8 +67,12 @@ type Client struct {
t *http.Transport
p *url.URL
hostsMu sync.Mutex
hosts map[string]string
Namespace string // Vim namespace
Version string // Vim version
UserAgent string
}
var schemeMatch = regexp.MustCompile(`^\w+://`)
@@ -101,17 +114,24 @@ func NewClient(u *url.URL, insecure bool) *Client {
}
// Initialize http.RoundTripper on client, so we can customize it below
c.t = &http.Transport{
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).Dial,
if t, ok := http.DefaultTransport.(*http.Transport); ok {
c.t = &http.Transport{
Proxy: t.Proxy,
DialContext: t.DialContext,
MaxIdleConns: t.MaxIdleConns,
IdleConnTimeout: t.IdleConnTimeout,
TLSHandshakeTimeout: t.TLSHandshakeTimeout,
ExpectContinueTimeout: t.ExpectContinueTimeout,
}
} else {
c.t = new(http.Transport)
}
if c.u.Scheme == "https" {
c.t.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.k}
c.t.TLSHandshakeTimeout = 10 * time.Second
c.hosts = make(map[string]string)
c.t.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.k}
// Don't bother setting DialTLS if InsecureSkipVerify=true
if !c.k {
c.t.DialTLS = c.dialTLS
}
c.Client.Transport = c.t
@@ -127,6 +147,156 @@ func NewClient(u *url.URL, insecure bool) *Client {
return &c
}
// SetRootCAs defines the set of root certificate authorities
// that clients use when verifying server certificates.
// By default TLS uses the host's root CA set.
//
// See: http.Client.Transport.TLSClientConfig.RootCAs
func (c *Client) SetRootCAs(file string) error {
pool := x509.NewCertPool()
for _, name := range filepath.SplitList(file) {
pem, err := ioutil.ReadFile(name)
if err != nil {
return err
}
pool.AppendCertsFromPEM(pem)
}
c.t.TLSClientConfig.RootCAs = pool
return nil
}
// Add default https port if missing
func hostAddr(addr string) string {
_, port := splitHostPort(addr)
if port == "" {
return addr + ":443"
}
return addr
}
// SetThumbprint sets the known certificate thumbprint for the given host.
// A custom DialTLS function is used to support thumbprint based verification.
// We first try tls.Dial with the default tls.Config, only falling back to thumbprint verification
// if it fails with an x509.UnknownAuthorityError or x509.HostnameError
//
// See: http.Client.Transport.DialTLS
func (c *Client) SetThumbprint(host string, thumbprint string) {
host = hostAddr(host)
c.hostsMu.Lock()
if thumbprint == "" {
delete(c.hosts, host)
} else {
c.hosts[host] = thumbprint
}
c.hostsMu.Unlock()
}
// Thumbprint returns the certificate thumbprint for the given host if known to this client.
func (c *Client) Thumbprint(host string) string {
host = hostAddr(host)
c.hostsMu.Lock()
defer c.hostsMu.Unlock()
return c.hosts[host]
}
// LoadThumbprints from file with the give name.
// If name is empty or name does not exist this function will return nil.
func (c *Client) LoadThumbprints(file string) error {
if file == "" {
return nil
}
for _, name := range filepath.SplitList(file) {
err := c.loadThumbprints(name)
if err != nil {
return err
}
}
return nil
}
func (c *Client) loadThumbprints(name string) error {
f, err := os.Open(name)
if err != nil {
if os.IsNotExist(err) {
return nil
}
return err
}
scanner := bufio.NewScanner(f)
for scanner.Scan() {
e := strings.SplitN(scanner.Text(), " ", 2)
if len(e) != 2 {
continue
}
c.SetThumbprint(e[0], e[1])
}
_ = f.Close()
return scanner.Err()
}
// ThumbprintSHA1 returns the thumbprint of the given cert in the same format used by the SDK and Client.SetThumbprint.
//
// See: SSLVerifyFault.Thumbprint, SessionManagerGenericServiceTicket.Thumbprint, HostConnectSpec.SslThumbprint
func ThumbprintSHA1(cert *x509.Certificate) string {
sum := sha1.Sum(cert.Raw)
hex := make([]string, len(sum))
for i, b := range sum {
hex[i] = fmt.Sprintf("%02X", b)
}
return strings.Join(hex, ":")
}
func (c *Client) dialTLS(network string, addr string) (net.Conn, error) {
// Would be nice if there was a tls.Config.Verify func,
// see tls.clientHandshakeState.doFullHandshake
conn, err := tls.Dial(network, addr, c.t.TLSClientConfig)
if err == nil {
return conn, nil
}
switch err.(type) {
case x509.UnknownAuthorityError:
case x509.HostnameError:
default:
return nil, err
}
thumbprint := c.Thumbprint(addr)
if thumbprint == "" {
return nil, err
}
config := &tls.Config{InsecureSkipVerify: true}
conn, err = tls.Dial(network, addr, config)
if err != nil {
return nil, err
}
cert := conn.ConnectionState().PeerCertificates[0]
peer := ThumbprintSHA1(cert)
if thumbprint != peer {
_ = conn.Close()
return nil, fmt.Errorf("Host %q thumbprint does not match %q", addr, thumbprint)
}
return conn, nil
}
// splitHostPort is similar to net.SplitHostPort,
// but rather than return error if there isn't a ':port',
// return an empty string for the port.
@@ -155,7 +325,13 @@ func (c *Client) SetCertificate(cert tls.Certificate) {
host, _ := splitHostPort(c.u.Host)
// Should be no reason to change the default port other than testing
port := os.Getenv("GOVC_TUNNEL_PROXY_PORT")
key := "GOVMOMI_TUNNEL_PROXY_PORT"
port := c.URL().Query().Get(key)
if port == "" {
port = os.Getenv(key)
}
if port != "" {
host += ":" + port
}
@@ -212,33 +388,11 @@ func (c *Client) UnmarshalJSON(b []byte) error {
}
func (c *Client) do(ctx context.Context, req *http.Request) (*http.Response, error) {
if nil == ctx || nil == ctx.Done() { // ctx.Done() is for context.TODO()
if nil == ctx || nil == ctx.Done() { // ctx.Done() is for ctx
return c.Client.Do(req)
}
var resc = make(chan *http.Response, 1)
var errc = make(chan error, 1)
// Perform request from separate routine.
go func() {
res, err := c.Client.Do(req)
if err != nil {
errc <- err
} else {
resc <- res
}
}()
// Wait for request completion of context expiry.
select {
case <-ctx.Done():
c.t.CancelRequest(req)
return nil, ctx.Err()
case err := <-errc:
return nil, err
case res := <-resc:
return res, nil
}
return c.Client.Do(req.WithContext(ctx))
}
func (c *Client) RoundTrip(ctx context.Context, reqBody, resBody HasFault) error {
@@ -267,6 +421,9 @@ func (c *Client) RoundTrip(ctx context.Context, reqBody, resBody HasFault) error
req.Header.Set(`Content-Type`, `text/xml; charset="utf-8"`)
soapAction := fmt.Sprintf("%s/%s", c.Namespace, c.Version)
req.Header.Set(`SOAPAction`, soapAction)
if c.UserAgent != "" {
req.Header.Set(`User-Agent`, c.UserAgent)
}
if d.enabled() {
d.debugRequest(req)
@@ -420,6 +577,7 @@ func (c *Client) UploadFile(file string, u *url.URL, param *Upload) error {
type Download struct {
Method string
Headers map[string]string
Ticket *http.Cookie
Progress progress.Sinker
}
@@ -428,19 +586,27 @@ var DefaultDownload = Download{
Method: "GET",
}
// Download GETs the remote file from the given URL
func (c *Client) Download(u *url.URL, param *Download) (io.ReadCloser, int64, error) {
// DownloadRequest wraps http.Client.Do, returning the http.Response without checking its StatusCode
func (c *Client) DownloadRequest(u *url.URL, param *Download) (*http.Response, error) {
req, err := http.NewRequest(param.Method, u.String(), nil)
if err != nil {
return nil, 0, err
return nil, err
}
for k, v := range param.Headers {
req.Header.Add(k, v)
}
if param.Ticket != nil {
req.AddCookie(param.Ticket)
}
res, err := c.Client.Do(req)
return c.Client.Do(req)
}
// Download GETs the remote file from the given URL
func (c *Client) Download(u *url.URL, param *Download) (io.ReadCloser, int64, error) {
res, err := c.DownloadRequest(u, param)
if err != nil {
return nil, 0, err
}
@@ -455,9 +621,7 @@ func (c *Client) Download(u *url.URL, param *Download) (io.ReadCloser, int64, er
return nil, 0, err
}
var r io.ReadCloser = res.Body
return r, res.ContentLength, nil
return res.Body, res.ContentLength, nil
}
// DownloadFile GETs the given URL to a local file

View File

@@ -39,13 +39,14 @@ func init() {
type ActionType string
const (
ActionTypeMigrationV1 = ActionType("MigrationV1")
ActionTypeVmPowerV1 = ActionType("VmPowerV1")
ActionTypeHostPowerV1 = ActionType("HostPowerV1")
ActionTypeHostMaintenanceV1 = ActionType("HostMaintenanceV1")
ActionTypeStorageMigrationV1 = ActionType("StorageMigrationV1")
ActionTypeStoragePlacementV1 = ActionType("StoragePlacementV1")
ActionTypePlacementV1 = ActionType("PlacementV1")
ActionTypeMigrationV1 = ActionType("MigrationV1")
ActionTypeVmPowerV1 = ActionType("VmPowerV1")
ActionTypeHostPowerV1 = ActionType("HostPowerV1")
ActionTypeHostMaintenanceV1 = ActionType("HostMaintenanceV1")
ActionTypeStorageMigrationV1 = ActionType("StorageMigrationV1")
ActionTypeStoragePlacementV1 = ActionType("StoragePlacementV1")
ActionTypePlacementV1 = ActionType("PlacementV1")
ActionTypeHostInfraUpdateHaV1 = ActionType("HostInfraUpdateHaV1")
)
func init() {
@@ -120,6 +121,18 @@ func init() {
t["AutoStartWaitHeartbeatSetting"] = reflect.TypeOf((*AutoStartWaitHeartbeatSetting)(nil)).Elem()
}
type BaseConfigInfoDiskFileBackingInfoProvisioningType string
const (
BaseConfigInfoDiskFileBackingInfoProvisioningTypeThin = BaseConfigInfoDiskFileBackingInfoProvisioningType("thin")
BaseConfigInfoDiskFileBackingInfoProvisioningTypeEagerZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("eagerZeroedThick")
BaseConfigInfoDiskFileBackingInfoProvisioningTypeLazyZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("lazyZeroedThick")
)
func init() {
t["BaseConfigInfoDiskFileBackingInfoProvisioningType"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfoProvisioningType)(nil)).Elem()
}
type BatchResultResult string
const (
@@ -281,9 +294,11 @@ type ClusterDasVmSettingsRestartPriority string
const (
ClusterDasVmSettingsRestartPriorityDisabled = ClusterDasVmSettingsRestartPriority("disabled")
ClusterDasVmSettingsRestartPriorityLowest = ClusterDasVmSettingsRestartPriority("lowest")
ClusterDasVmSettingsRestartPriorityLow = ClusterDasVmSettingsRestartPriority("low")
ClusterDasVmSettingsRestartPriorityMedium = ClusterDasVmSettingsRestartPriority("medium")
ClusterDasVmSettingsRestartPriorityHigh = ClusterDasVmSettingsRestartPriority("high")
ClusterDasVmSettingsRestartPriorityHighest = ClusterDasVmSettingsRestartPriority("highest")
ClusterDasVmSettingsRestartPriorityClusterRestartPriority = ClusterDasVmSettingsRestartPriority("clusterRestartPriority")
)
@@ -291,6 +306,40 @@ func init() {
t["ClusterDasVmSettingsRestartPriority"] = reflect.TypeOf((*ClusterDasVmSettingsRestartPriority)(nil)).Elem()
}
type ClusterHostInfraUpdateHaModeActionOperationType string
const (
ClusterHostInfraUpdateHaModeActionOperationTypeEnterQuarantine = ClusterHostInfraUpdateHaModeActionOperationType("enterQuarantine")
ClusterHostInfraUpdateHaModeActionOperationTypeExitQuarantine = ClusterHostInfraUpdateHaModeActionOperationType("exitQuarantine")
ClusterHostInfraUpdateHaModeActionOperationTypeEnterMaintenance = ClusterHostInfraUpdateHaModeActionOperationType("enterMaintenance")
)
func init() {
t["ClusterHostInfraUpdateHaModeActionOperationType"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeActionOperationType)(nil)).Elem()
}
type ClusterInfraUpdateHaConfigInfoBehaviorType string
const (
ClusterInfraUpdateHaConfigInfoBehaviorTypeManual = ClusterInfraUpdateHaConfigInfoBehaviorType("Manual")
ClusterInfraUpdateHaConfigInfoBehaviorTypeAutomated = ClusterInfraUpdateHaConfigInfoBehaviorType("Automated")
)
func init() {
t["ClusterInfraUpdateHaConfigInfoBehaviorType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoBehaviorType)(nil)).Elem()
}
type ClusterInfraUpdateHaConfigInfoRemediationType string
const (
ClusterInfraUpdateHaConfigInfoRemediationTypeQuarantineMode = ClusterInfraUpdateHaConfigInfoRemediationType("QuarantineMode")
ClusterInfraUpdateHaConfigInfoRemediationTypeMaintenanceMode = ClusterInfraUpdateHaConfigInfoRemediationType("MaintenanceMode")
)
func init() {
t["ClusterInfraUpdateHaConfigInfoRemediationType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoRemediationType)(nil)).Elem()
}
type ClusterPowerOnVmOption string
const (
@@ -341,6 +390,20 @@ func init() {
t["ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared)(nil)).Elem()
}
type ClusterVmReadinessReadyCondition string
const (
ClusterVmReadinessReadyConditionNone = ClusterVmReadinessReadyCondition("none")
ClusterVmReadinessReadyConditionPoweredOn = ClusterVmReadinessReadyCondition("poweredOn")
ClusterVmReadinessReadyConditionGuestHbStatusGreen = ClusterVmReadinessReadyCondition("guestHbStatusGreen")
ClusterVmReadinessReadyConditionAppHbStatusGreen = ClusterVmReadinessReadyCondition("appHbStatusGreen")
ClusterVmReadinessReadyConditionUseClusterDefault = ClusterVmReadinessReadyCondition("useClusterDefault")
)
func init() {
t["ClusterVmReadinessReadyCondition"] = reflect.TypeOf((*ClusterVmReadinessReadyCondition)(nil)).Elem()
}
type ComplianceResultStatus string
const (
@@ -732,6 +795,19 @@ func init() {
t["DrsRecommendationReasonCode"] = reflect.TypeOf((*DrsRecommendationReasonCode)(nil)).Elem()
}
type DvsEventPortBlockState string
const (
DvsEventPortBlockStateUnset = DvsEventPortBlockState("unset")
DvsEventPortBlockStateBlocked = DvsEventPortBlockState("blocked")
DvsEventPortBlockStateUnblocked = DvsEventPortBlockState("unblocked")
DvsEventPortBlockStateUnknown = DvsEventPortBlockState("unknown")
)
func init() {
t["DvsEventPortBlockState"] = reflect.TypeOf((*DvsEventPortBlockState)(nil)).Elem()
}
type DvsFilterOnFailure string
const (
@@ -931,6 +1007,20 @@ func init() {
t["GuestRegKeyWowSpec"] = reflect.TypeOf((*GuestRegKeyWowSpec)(nil)).Elem()
}
type HealthUpdateInfoComponentType string
const (
HealthUpdateInfoComponentTypeMemory = HealthUpdateInfoComponentType("Memory")
HealthUpdateInfoComponentTypePower = HealthUpdateInfoComponentType("Power")
HealthUpdateInfoComponentTypeFan = HealthUpdateInfoComponentType("Fan")
HealthUpdateInfoComponentTypeNetwork = HealthUpdateInfoComponentType("Network")
HealthUpdateInfoComponentTypeStorage = HealthUpdateInfoComponentType("Storage")
)
func init() {
t["HealthUpdateInfoComponentType"] = reflect.TypeOf((*HealthUpdateInfoComponentType)(nil)).Elem()
}
type HostAccessMode string
const (
@@ -1064,6 +1154,18 @@ func init() {
t["HostCpuPowerManagementInfoPolicyType"] = reflect.TypeOf((*HostCpuPowerManagementInfoPolicyType)(nil)).Elem()
}
type HostCryptoState string
const (
HostCryptoStateIncapable = HostCryptoState("incapable")
HostCryptoStatePrepared = HostCryptoState("prepared")
HostCryptoStateSafe = HostCryptoState("safe")
)
func init() {
t["HostCryptoState"] = reflect.TypeOf((*HostCryptoState)(nil)).Elem()
}
type HostDasErrorEventHostDasErrorReason string
const (
@@ -1199,12 +1301,35 @@ func init() {
t["HostFirewallRuleProtocol"] = reflect.TypeOf((*HostFirewallRuleProtocol)(nil)).Elem()
}
type HostGraphicsConfigGraphicsType string
const (
HostGraphicsConfigGraphicsTypeShared = HostGraphicsConfigGraphicsType("shared")
HostGraphicsConfigGraphicsTypeSharedDirect = HostGraphicsConfigGraphicsType("sharedDirect")
)
func init() {
t["HostGraphicsConfigGraphicsType"] = reflect.TypeOf((*HostGraphicsConfigGraphicsType)(nil)).Elem()
}
type HostGraphicsConfigSharedPassthruAssignmentPolicy string
const (
HostGraphicsConfigSharedPassthruAssignmentPolicyPerformance = HostGraphicsConfigSharedPassthruAssignmentPolicy("performance")
HostGraphicsConfigSharedPassthruAssignmentPolicyConsolidation = HostGraphicsConfigSharedPassthruAssignmentPolicy("consolidation")
)
func init() {
t["HostGraphicsConfigSharedPassthruAssignmentPolicy"] = reflect.TypeOf((*HostGraphicsConfigSharedPassthruAssignmentPolicy)(nil)).Elem()
}
type HostGraphicsInfoGraphicsType string
const (
HostGraphicsInfoGraphicsTypeBasic = HostGraphicsInfoGraphicsType("basic")
HostGraphicsInfoGraphicsTypeShared = HostGraphicsInfoGraphicsType("shared")
HostGraphicsInfoGraphicsTypeDirect = HostGraphicsInfoGraphicsType("direct")
HostGraphicsInfoGraphicsTypeBasic = HostGraphicsInfoGraphicsType("basic")
HostGraphicsInfoGraphicsTypeShared = HostGraphicsInfoGraphicsType("shared")
HostGraphicsInfoGraphicsTypeDirect = HostGraphicsInfoGraphicsType("direct")
HostGraphicsInfoGraphicsTypeSharedDirect = HostGraphicsInfoGraphicsType("sharedDirect")
)
func init() {
@@ -1451,8 +1576,9 @@ func init() {
type HostNasVolumeSecurityType string
const (
HostNasVolumeSecurityTypeAUTH_SYS = HostNasVolumeSecurityType("AUTH_SYS")
HostNasVolumeSecurityTypeSEC_KRB5 = HostNasVolumeSecurityType("SEC_KRB5")
HostNasVolumeSecurityTypeAUTH_SYS = HostNasVolumeSecurityType("AUTH_SYS")
HostNasVolumeSecurityTypeSEC_KRB5 = HostNasVolumeSecurityType("SEC_KRB5")
HostNasVolumeSecurityTypeSEC_KRB5I = HostNasVolumeSecurityType("SEC_KRB5I")
)
func init() {
@@ -1503,6 +1629,14 @@ const (
HostNumericSensorTypeTemperature = HostNumericSensorType("temperature")
HostNumericSensorTypeVoltage = HostNumericSensorType("voltage")
HostNumericSensorTypeOther = HostNumericSensorType("other")
HostNumericSensorTypeProcessor = HostNumericSensorType("processor")
HostNumericSensorTypeMemory = HostNumericSensorType("memory")
HostNumericSensorTypeStorage = HostNumericSensorType("storage")
HostNumericSensorTypeSystemBoard = HostNumericSensorType("systemBoard")
HostNumericSensorTypeBattery = HostNumericSensorType("battery")
HostNumericSensorTypeBios = HostNumericSensorType("bios")
HostNumericSensorTypeCable = HostNumericSensorType("cable")
HostNumericSensorTypeWatchdog = HostNumericSensorType("watchdog")
)
func init() {
@@ -1608,6 +1742,18 @@ func init() {
t["HostProtocolEndpointPEType"] = reflect.TypeOf((*HostProtocolEndpointPEType)(nil)).Elem()
}
type HostProtocolEndpointProtocolEndpointType string
const (
HostProtocolEndpointProtocolEndpointTypeScsi = HostProtocolEndpointProtocolEndpointType("scsi")
HostProtocolEndpointProtocolEndpointTypeNfs = HostProtocolEndpointProtocolEndpointType("nfs")
HostProtocolEndpointProtocolEndpointTypeNfs4x = HostProtocolEndpointProtocolEndpointType("nfs4x")
)
func init() {
t["HostProtocolEndpointProtocolEndpointType"] = reflect.TypeOf((*HostProtocolEndpointProtocolEndpointType)(nil)).Elem()
}
type HostReplayUnsupportedReason string
const (
@@ -1742,6 +1888,7 @@ const (
HostVirtualNicManagerNicTypeManagement = HostVirtualNicManagerNicType("management")
HostVirtualNicManagerNicTypeVsan = HostVirtualNicManagerNicType("vsan")
HostVirtualNicManagerNicTypeVSphereProvisioning = HostVirtualNicManagerNicType("vSphereProvisioning")
HostVirtualNicManagerNicTypeVsanWitness = HostVirtualNicManagerNicType("vsanWitness")
)
func init() {
@@ -1760,6 +1907,17 @@ func init() {
t["HostVmciAccessManagerMode"] = reflect.TypeOf((*HostVmciAccessManagerMode)(nil)).Elem()
}
type HostVmfsVolumeUnmapPriority string
const (
HostVmfsVolumeUnmapPriorityNone = HostVmfsVolumeUnmapPriority("none")
HostVmfsVolumeUnmapPriorityLow = HostVmfsVolumeUnmapPriority("low")
)
func init() {
t["HostVmfsVolumeUnmapPriority"] = reflect.TypeOf((*HostVmfsVolumeUnmapPriority)(nil)).Elem()
}
type HttpNfcLeaseState string
const (
@@ -1831,6 +1989,22 @@ func init() {
t["IoFilterOperation"] = reflect.TypeOf((*IoFilterOperation)(nil)).Elem()
}
type IoFilterType string
const (
IoFilterTypeCache = IoFilterType("cache")
IoFilterTypeReplication = IoFilterType("replication")
IoFilterTypeEncryption = IoFilterType("encryption")
IoFilterTypeCompression = IoFilterType("compression")
IoFilterTypeInspection = IoFilterType("inspection")
IoFilterTypeDatastoreIoControl = IoFilterType("datastoreIoControl")
IoFilterTypeDataProvider = IoFilterType("dataProvider")
)
func init() {
t["IoFilterType"] = reflect.TypeOf((*IoFilterType)(nil)).Elem()
}
type IscsiPortInfoPathStatus string
const (
@@ -2330,6 +2504,18 @@ func init() {
t["PropertyChangeOp"] = reflect.TypeOf((*PropertyChangeOp)(nil)).Elem()
}
type QuarantineModeFaultFaultType string
const (
QuarantineModeFaultFaultTypeNoCompatibleNonQuarantinedHost = QuarantineModeFaultFaultType("NoCompatibleNonQuarantinedHost")
QuarantineModeFaultFaultTypeCorrectionDisallowed = QuarantineModeFaultFaultType("CorrectionDisallowed")
QuarantineModeFaultFaultTypeCorrectionImpact = QuarantineModeFaultFaultType("CorrectionImpact")
)
func init() {
t["QuarantineModeFaultFaultType"] = reflect.TypeOf((*QuarantineModeFaultFaultType)(nil)).Elem()
}
type QuiesceMode string
const (
@@ -2371,6 +2557,10 @@ const (
RecommendationReasonCodeIolbDisabledInternal = RecommendationReasonCode("iolbDisabledInternal")
RecommendationReasonCodeXvmotionPlacement = RecommendationReasonCode("xvmotionPlacement")
RecommendationReasonCodeNetworkBandwidthReservation = RecommendationReasonCode("networkBandwidthReservation")
RecommendationReasonCodeHostInDegradation = RecommendationReasonCode("hostInDegradation")
RecommendationReasonCodeHostExitDegradation = RecommendationReasonCode("hostExitDegradation")
RecommendationReasonCodeMaxVmsConstraint = RecommendationReasonCode("maxVmsConstraint")
RecommendationReasonCodeFtConstraints = RecommendationReasonCode("ftConstraints")
)
func init() {
@@ -2420,6 +2610,7 @@ const (
ReplicationVmConfigFaultReasonForFaultInvalidPriorConfiguration = ReplicationVmConfigFaultReasonForFault("invalidPriorConfiguration")
ReplicationVmConfigFaultReasonForFaultReplicationNotEnabled = ReplicationVmConfigFaultReasonForFault("replicationNotEnabled")
ReplicationVmConfigFaultReasonForFaultReplicationConfigurationFailed = ReplicationVmConfigFaultReasonForFault("replicationConfigurationFailed")
ReplicationVmConfigFaultReasonForFaultEncryptedVm = ReplicationVmConfigFaultReasonForFault("encryptedVm")
)
func init() {
@@ -2436,6 +2627,7 @@ const (
ReplicationVmFaultReasonForFaultOfflineReplicating = ReplicationVmFaultReasonForFault("offlineReplicating")
ReplicationVmFaultReasonForFaultInvalidState = ReplicationVmFaultReasonForFault("invalidState")
ReplicationVmFaultReasonForFaultInvalidInstanceId = ReplicationVmFaultReasonForFault("invalidInstanceId")
ReplicationVmFaultReasonForFaultCloseDiskError = ReplicationVmFaultReasonForFault("closeDiskError")
)
func init() {
@@ -2493,6 +2685,19 @@ func init() {
t["ScheduledHardwareUpgradeInfoHardwareUpgradeStatus"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradeStatus)(nil)).Elem()
}
type ScsiDiskType string
const (
ScsiDiskTypeNative512 = ScsiDiskType("native512")
ScsiDiskTypeEmulated512 = ScsiDiskType("emulated512")
ScsiDiskTypeNative4k = ScsiDiskType("native4k")
ScsiDiskTypeUnknown = ScsiDiskType("unknown")
)
func init() {
t["ScsiDiskType"] = reflect.TypeOf((*ScsiDiskType)(nil)).Elem()
}
type ScsiLunDescriptorQuality string
const (
@@ -2612,6 +2817,32 @@ func init() {
t["SlpDiscoveryMethod"] = reflect.TypeOf((*SlpDiscoveryMethod)(nil)).Elem()
}
type SoftwarePackageConstraint string
const (
SoftwarePackageConstraintEquals = SoftwarePackageConstraint("equals")
SoftwarePackageConstraintLessThan = SoftwarePackageConstraint("lessThan")
SoftwarePackageConstraintLessThanEqual = SoftwarePackageConstraint("lessThanEqual")
SoftwarePackageConstraintGreaterThanEqual = SoftwarePackageConstraint("greaterThanEqual")
SoftwarePackageConstraintGreaterThan = SoftwarePackageConstraint("greaterThan")
)
func init() {
t["SoftwarePackageConstraint"] = reflect.TypeOf((*SoftwarePackageConstraint)(nil)).Elem()
}
type SoftwarePackageVibType string
const (
SoftwarePackageVibTypeBootbank = SoftwarePackageVibType("bootbank")
SoftwarePackageVibTypeTools = SoftwarePackageVibType("tools")
SoftwarePackageVibTypeMeta = SoftwarePackageVibType("meta")
)
func init() {
t["SoftwarePackageVibType"] = reflect.TypeOf((*SoftwarePackageVibType)(nil)).Elem()
}
type StateAlarmOperator string
const (
@@ -2827,6 +3058,18 @@ func init() {
t["VMwareDVSTeamingMatchStatus"] = reflect.TypeOf((*VMwareDVSTeamingMatchStatus)(nil)).Elem()
}
type VMwareDVSVspanSessionEncapType string
const (
VMwareDVSVspanSessionEncapTypeGre = VMwareDVSVspanSessionEncapType("gre")
VMwareDVSVspanSessionEncapTypeErspan2 = VMwareDVSVspanSessionEncapType("erspan2")
VMwareDVSVspanSessionEncapTypeErspan3 = VMwareDVSVspanSessionEncapType("erspan3")
)
func init() {
t["VMwareDVSVspanSessionEncapType"] = reflect.TypeOf((*VMwareDVSVspanSessionEncapType)(nil)).Elem()
}
type VMwareDVSVspanSessionType string
const (
@@ -2903,6 +3146,16 @@ func init() {
t["VMwareUplinkLacpMode"] = reflect.TypeOf((*VMwareUplinkLacpMode)(nil)).Elem()
}
type VStorageObjectConsumptionType string
const (
VStorageObjectConsumptionTypeDisk = VStorageObjectConsumptionType("disk")
)
func init() {
t["VStorageObjectConsumptionType"] = reflect.TypeOf((*VStorageObjectConsumptionType)(nil)).Elem()
}
type ValidateMigrationTestType string
const (
@@ -2916,6 +3169,66 @@ func init() {
t["ValidateMigrationTestType"] = reflect.TypeOf((*ValidateMigrationTestType)(nil)).Elem()
}
type VchaClusterMode string
const (
VchaClusterModeEnabled = VchaClusterMode("enabled")
VchaClusterModeDisabled = VchaClusterMode("disabled")
VchaClusterModeMaintenance = VchaClusterMode("maintenance")
)
func init() {
t["VchaClusterMode"] = reflect.TypeOf((*VchaClusterMode)(nil)).Elem()
}
type VchaClusterState string
const (
VchaClusterStateHealthy = VchaClusterState("healthy")
VchaClusterStateDegraded = VchaClusterState("degraded")
VchaClusterStateIsolated = VchaClusterState("isolated")
)
func init() {
t["VchaClusterState"] = reflect.TypeOf((*VchaClusterState)(nil)).Elem()
}
type VchaNodeRole string
const (
VchaNodeRoleActive = VchaNodeRole("active")
VchaNodeRolePassive = VchaNodeRole("passive")
VchaNodeRoleWitness = VchaNodeRole("witness")
)
func init() {
t["VchaNodeRole"] = reflect.TypeOf((*VchaNodeRole)(nil)).Elem()
}
type VchaNodeState string
const (
VchaNodeStateUp = VchaNodeState("up")
VchaNodeStateDown = VchaNodeState("down")
)
func init() {
t["VchaNodeState"] = reflect.TypeOf((*VchaNodeState)(nil)).Elem()
}
type VchaState string
const (
VchaStateConfigured = VchaState("configured")
VchaStateNotConfigured = VchaState("notConfigured")
VchaStateInvalid = VchaState("invalid")
VchaStatePrepared = VchaState("prepared")
)
func init() {
t["VchaState"] = reflect.TypeOf((*VchaState)(nil)).Elem()
}
type VirtualAppVAppState string
const (
@@ -3178,6 +3491,18 @@ func init() {
t["VirtualMachineConfigInfoSwapPlacementType"] = reflect.TypeOf((*VirtualMachineConfigInfoSwapPlacementType)(nil)).Elem()
}
type VirtualMachineConfigSpecEncryptedVMotionModes string
const (
VirtualMachineConfigSpecEncryptedVMotionModesDisabled = VirtualMachineConfigSpecEncryptedVMotionModes("disabled")
VirtualMachineConfigSpecEncryptedVMotionModesOpportunistic = VirtualMachineConfigSpecEncryptedVMotionModes("opportunistic")
VirtualMachineConfigSpecEncryptedVMotionModesRequired = VirtualMachineConfigSpecEncryptedVMotionModes("required")
)
func init() {
t["VirtualMachineConfigSpecEncryptedVMotionModes"] = reflect.TypeOf((*VirtualMachineConfigSpecEncryptedVMotionModes)(nil)).Elem()
}
type VirtualMachineConfigSpecNpivWwnOp string
const (
@@ -3414,8 +3739,16 @@ const (
VirtualMachineGuestOsIdentifierRhel7_64Guest = VirtualMachineGuestOsIdentifier("rhel7_64Guest")
VirtualMachineGuestOsIdentifierCentosGuest = VirtualMachineGuestOsIdentifier("centosGuest")
VirtualMachineGuestOsIdentifierCentos64Guest = VirtualMachineGuestOsIdentifier("centos64Guest")
VirtualMachineGuestOsIdentifierCentos6Guest = VirtualMachineGuestOsIdentifier("centos6Guest")
VirtualMachineGuestOsIdentifierCentos6_64Guest = VirtualMachineGuestOsIdentifier("centos6_64Guest")
VirtualMachineGuestOsIdentifierCentos7Guest = VirtualMachineGuestOsIdentifier("centos7Guest")
VirtualMachineGuestOsIdentifierCentos7_64Guest = VirtualMachineGuestOsIdentifier("centos7_64Guest")
VirtualMachineGuestOsIdentifierOracleLinuxGuest = VirtualMachineGuestOsIdentifier("oracleLinuxGuest")
VirtualMachineGuestOsIdentifierOracleLinux64Guest = VirtualMachineGuestOsIdentifier("oracleLinux64Guest")
VirtualMachineGuestOsIdentifierOracleLinux6Guest = VirtualMachineGuestOsIdentifier("oracleLinux6Guest")
VirtualMachineGuestOsIdentifierOracleLinux6_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux6_64Guest")
VirtualMachineGuestOsIdentifierOracleLinux7Guest = VirtualMachineGuestOsIdentifier("oracleLinux7Guest")
VirtualMachineGuestOsIdentifierOracleLinux7_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux7_64Guest")
VirtualMachineGuestOsIdentifierSuseGuest = VirtualMachineGuestOsIdentifier("suseGuest")
VirtualMachineGuestOsIdentifierSuse64Guest = VirtualMachineGuestOsIdentifier("suse64Guest")
VirtualMachineGuestOsIdentifierSlesGuest = VirtualMachineGuestOsIdentifier("slesGuest")
@@ -3446,16 +3779,22 @@ const (
VirtualMachineGuestOsIdentifierDebian7_64Guest = VirtualMachineGuestOsIdentifier("debian7_64Guest")
VirtualMachineGuestOsIdentifierDebian8Guest = VirtualMachineGuestOsIdentifier("debian8Guest")
VirtualMachineGuestOsIdentifierDebian8_64Guest = VirtualMachineGuestOsIdentifier("debian8_64Guest")
VirtualMachineGuestOsIdentifierDebian9Guest = VirtualMachineGuestOsIdentifier("debian9Guest")
VirtualMachineGuestOsIdentifierDebian9_64Guest = VirtualMachineGuestOsIdentifier("debian9_64Guest")
VirtualMachineGuestOsIdentifierDebian10Guest = VirtualMachineGuestOsIdentifier("debian10Guest")
VirtualMachineGuestOsIdentifierDebian10_64Guest = VirtualMachineGuestOsIdentifier("debian10_64Guest")
VirtualMachineGuestOsIdentifierAsianux3Guest = VirtualMachineGuestOsIdentifier("asianux3Guest")
VirtualMachineGuestOsIdentifierAsianux3_64Guest = VirtualMachineGuestOsIdentifier("asianux3_64Guest")
VirtualMachineGuestOsIdentifierAsianux4Guest = VirtualMachineGuestOsIdentifier("asianux4Guest")
VirtualMachineGuestOsIdentifierAsianux4_64Guest = VirtualMachineGuestOsIdentifier("asianux4_64Guest")
VirtualMachineGuestOsIdentifierAsianux5_64Guest = VirtualMachineGuestOsIdentifier("asianux5_64Guest")
VirtualMachineGuestOsIdentifierAsianux7_64Guest = VirtualMachineGuestOsIdentifier("asianux7_64Guest")
VirtualMachineGuestOsIdentifierOpensuseGuest = VirtualMachineGuestOsIdentifier("opensuseGuest")
VirtualMachineGuestOsIdentifierOpensuse64Guest = VirtualMachineGuestOsIdentifier("opensuse64Guest")
VirtualMachineGuestOsIdentifierFedoraGuest = VirtualMachineGuestOsIdentifier("fedoraGuest")
VirtualMachineGuestOsIdentifierFedora64Guest = VirtualMachineGuestOsIdentifier("fedora64Guest")
VirtualMachineGuestOsIdentifierCoreos64Guest = VirtualMachineGuestOsIdentifier("coreos64Guest")
VirtualMachineGuestOsIdentifierVmwarePhoton64Guest = VirtualMachineGuestOsIdentifier("vmwarePhoton64Guest")
VirtualMachineGuestOsIdentifierOther24xLinuxGuest = VirtualMachineGuestOsIdentifier("other24xLinuxGuest")
VirtualMachineGuestOsIdentifierOther26xLinuxGuest = VirtualMachineGuestOsIdentifier("other26xLinuxGuest")
VirtualMachineGuestOsIdentifierOtherLinuxGuest = VirtualMachineGuestOsIdentifier("otherLinuxGuest")
@@ -3490,9 +3829,12 @@ const (
VirtualMachineGuestOsIdentifierDarwin12_64Guest = VirtualMachineGuestOsIdentifier("darwin12_64Guest")
VirtualMachineGuestOsIdentifierDarwin13_64Guest = VirtualMachineGuestOsIdentifier("darwin13_64Guest")
VirtualMachineGuestOsIdentifierDarwin14_64Guest = VirtualMachineGuestOsIdentifier("darwin14_64Guest")
VirtualMachineGuestOsIdentifierDarwin15_64Guest = VirtualMachineGuestOsIdentifier("darwin15_64Guest")
VirtualMachineGuestOsIdentifierDarwin16_64Guest = VirtualMachineGuestOsIdentifier("darwin16_64Guest")
VirtualMachineGuestOsIdentifierVmkernelGuest = VirtualMachineGuestOsIdentifier("vmkernelGuest")
VirtualMachineGuestOsIdentifierVmkernel5Guest = VirtualMachineGuestOsIdentifier("vmkernel5Guest")
VirtualMachineGuestOsIdentifierVmkernel6Guest = VirtualMachineGuestOsIdentifier("vmkernel6Guest")
VirtualMachineGuestOsIdentifierVmkernel65Guest = VirtualMachineGuestOsIdentifier("vmkernel65Guest")
VirtualMachineGuestOsIdentifierOtherGuest = VirtualMachineGuestOsIdentifier("otherGuest")
VirtualMachineGuestOsIdentifierOtherGuest64 = VirtualMachineGuestOsIdentifier("otherGuest64")
)
@@ -3719,6 +4061,20 @@ func init() {
t["VirtualMachineTicketType"] = reflect.TypeOf((*VirtualMachineTicketType)(nil)).Elem()
}
type VirtualMachineToolsInstallType string
const (
VirtualMachineToolsInstallTypeGuestToolsTypeUnknown = VirtualMachineToolsInstallType("guestToolsTypeUnknown")
VirtualMachineToolsInstallTypeGuestToolsTypeMSI = VirtualMachineToolsInstallType("guestToolsTypeMSI")
VirtualMachineToolsInstallTypeGuestToolsTypeTar = VirtualMachineToolsInstallType("guestToolsTypeTar")
VirtualMachineToolsInstallTypeGuestToolsTypeOSP = VirtualMachineToolsInstallType("guestToolsTypeOSP")
VirtualMachineToolsInstallTypeGuestToolsTypeOpenVMTools = VirtualMachineToolsInstallType("guestToolsTypeOpenVMTools")
)
func init() {
t["VirtualMachineToolsInstallType"] = reflect.TypeOf((*VirtualMachineToolsInstallType)(nil)).Elem()
}
type VirtualMachineToolsRunningStatus string
const (
@@ -3854,6 +4210,18 @@ func init() {
t["VirtualMachineVideoCardUse3dRenderer"] = reflect.TypeOf((*VirtualMachineVideoCardUse3dRenderer)(nil)).Elem()
}
type VirtualMachineWindowsQuiesceSpecVssBackupContext string
const (
VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_auto = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_auto")
VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_backup")
VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_file_share_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_file_share_backup")
)
func init() {
t["VirtualMachineWindowsQuiesceSpecVssBackupContext"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpecVssBackupContext)(nil)).Elem()
}
type VirtualPointingDeviceHostChoice string
const (

View File

@@ -118,6 +118,40 @@ func init() {
t["BaseAuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem()
}
func (b *BaseConfigInfo) GetBaseConfigInfo() *BaseConfigInfo { return b }
type BaseBaseConfigInfo interface {
GetBaseConfigInfo() *BaseConfigInfo
}
func init() {
t["BaseBaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem()
}
func (b *BaseConfigInfoBackingInfo) GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo {
return b
}
type BaseBaseConfigInfoBackingInfo interface {
GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo
}
func init() {
t["BaseBaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem()
}
func (b *BaseConfigInfoFileBackingInfo) GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo {
return b
}
type BaseBaseConfigInfoFileBackingInfo interface {
GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo
}
func init() {
t["BaseBaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem()
}
func (b *CannotAccessNetwork) GetCannotAccessNetwork() *CannotAccessNetwork { return b }
type BaseCannotAccessNetwork interface {
@@ -376,6 +410,26 @@ func init() {
t["BaseCpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem()
}
func (b *CryptoSpec) GetCryptoSpec() *CryptoSpec { return b }
type BaseCryptoSpec interface {
GetCryptoSpec() *CryptoSpec
}
func init() {
t["BaseCryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem()
}
func (b *CryptoSpecNoOp) GetCryptoSpecNoOp() *CryptoSpecNoOp { return b }
type BaseCryptoSpecNoOp interface {
GetCryptoSpecNoOp() *CryptoSpecNoOp
}
func init() {
t["BaseCryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem()
}
func (b *CustomFieldDefEvent) GetCustomFieldDefEvent() *CustomFieldDefEvent { return b }
type BaseCustomFieldDefEvent interface {
@@ -1388,6 +1442,28 @@ func init() {
t["BaseHostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem()
}
func (b *HostProfilesEntityCustomizations) GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations {
return b
}
type BaseHostProfilesEntityCustomizations interface {
GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations
}
func init() {
t["BaseHostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem()
}
func (b *HostSriovDevicePoolInfo) GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo { return b }
type BaseHostSriovDevicePoolInfo interface {
GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo
}
func init() {
t["BaseHostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem()
}
func (b *HostSystemSwapConfigurationSystemSwapOption) GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption {
return b
}
@@ -1798,6 +1874,26 @@ func init() {
t["BaseNoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem()
}
func (b *NodeDeploymentSpec) GetNodeDeploymentSpec() *NodeDeploymentSpec { return b }
type BaseNodeDeploymentSpec interface {
GetNodeDeploymentSpec() *NodeDeploymentSpec
}
func init() {
t["BaseNodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem()
}
func (b *NodeNetworkSpec) GetNodeNetworkSpec() *NodeNetworkSpec { return b }
type BaseNodeNetworkSpec interface {
GetNodeNetworkSpec() *NodeNetworkSpec
}
func init() {
t["BaseNodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem()
}
func (b *NotEnoughCpus) GetNotEnoughCpus() *NotEnoughCpus { return b }
type BaseNotEnoughCpus interface {
@@ -2170,6 +2266,16 @@ func init() {
t["BaseProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem()
}
func (b *ProfileExecuteResult) GetProfileExecuteResult() *ProfileExecuteResult { return b }
type BaseProfileExecuteResult interface {
GetProfileExecuteResult() *ProfileExecuteResult
}
func init() {
t["BaseProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem()
}
func (b *ProfileExpression) GetProfileExpression() *ProfileExpression { return b }
type BaseProfileExpression interface {
@@ -2896,6 +3002,18 @@ func init() {
t["BaseVirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem()
}
func (b *VirtualMachineGuestQuiesceSpec) GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec {
return b
}
type BaseVirtualMachineGuestQuiesceSpec interface {
GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec
}
func init() {
t["BaseVirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem()
}
func (b *VirtualMachinePciPassthroughInfo) GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo {
return b
}
@@ -2920,6 +3038,18 @@ func init() {
t["BaseVirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem()
}
func (b *VirtualMachineSriovDevicePoolInfo) GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo {
return b
}
type BaseVirtualMachineSriovDevicePoolInfo interface {
GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo
}
func init() {
t["BaseVirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem()
}
func (b *VirtualMachineTargetInfo) GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo { return b }
type BaseVirtualMachineTargetInfo interface {
@@ -3028,6 +3158,26 @@ func init() {
t["BaseVirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem()
}
func (b *VirtualVmxnet3) GetVirtualVmxnet3() *VirtualVmxnet3 { return b }
type BaseVirtualVmxnet3 interface {
GetVirtualVmxnet3() *VirtualVmxnet3
}
func init() {
t["BaseVirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem()
}
func (b *VirtualVmxnet3Option) GetVirtualVmxnet3Option() *VirtualVmxnet3Option { return b }
type BaseVirtualVmxnet3Option interface {
GetVirtualVmxnet3Option() *VirtualVmxnet3Option
}
func init() {
t["BaseVirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem()
}
func (b *VirtualVmxnetOption) GetVirtualVmxnetOption() *VirtualVmxnetOption { return b }
type BaseVirtualVmxnetOption interface {
@@ -3285,3 +3435,25 @@ type BaseVsanUpgradeSystemUpgradeHistoryItem interface {
func init() {
t["BaseVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem()
}
func (b *VslmCreateSpecBackingSpec) GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec {
return b
}
type BaseVslmCreateSpecBackingSpec interface {
GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec
}
func init() {
t["BaseVslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem()
}
func (b *VslmMigrateSpec) GetVslmMigrateSpec() *VslmMigrateSpec { return b }
type BaseVslmMigrateSpec interface {
GetVslmMigrateSpec() *VslmMigrateSpec
}
func init() {
t["BaseVslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem()
}

View File

@@ -237,6 +237,10 @@ type RetrieveManagedMethodExecuter struct {
This ManagedObjectReference `xml:"_this"`
}
func init() {
t["RetrieveManagedMethodExecuter"] = reflect.TypeOf((*RetrieveManagedMethodExecuter)(nil)).Elem()
}
type RetrieveManagedMethodExecuterResponse struct {
Returnval *ReflectManagedMethodExecuter `xml:"urn:vim25 returnval"`
}

File diff suppressed because it is too large Load Diff

View File

@@ -71,7 +71,11 @@ func typeToString(typ reflect.Type) string {
case reflect.Float64:
return "xsd:double"
case reflect.String:
return "xsd:string"
name := typ.Name()
if name == "string" {
return "xsd:string"
}
return name
case reflect.Struct:
if typ == stringToTypeMap["xsd:dateTime"] {
return "xsd:dateTime"